[Android] Benchmark: get dav1d version as resValue
Duncan McNamara
git at videolan.org
Fri Nov 17 09:35:14 UTC 2023
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Thu Nov 16 11:07:58 2023 +0100| [43daafe205e1f808c0ae038bd18b205cb8d59855] | committer: Nicolas Pomepuy
Benchmark: get dav1d version as resValue
This is to send the dav1d version in use to the benchmark.
> https://code.videolan.org/videolan/vlc-android/commit/43daafe205e1f808c0ae038bd18b205cb8d59855
---
application/vlc-android/build.gradle | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/application/vlc-android/build.gradle b/application/vlc-android/build.gradle
index ea878db606..cb3117d9ab 100644
--- a/application/vlc-android/build.gradle
+++ b/application/vlc-android/build.gradle
@@ -23,6 +23,7 @@ android {
resValue "string", "build_host", hostName()
resValue "string", "build_revision", revision()
resValue "string", "changelog", changelog()
+ resValue "string", "dav1d_version", dav1dVersion()
resValue 'string', 'tv_provider_authority', "${rootProject.ext.appId}.tv"
buildConfigField 'String', 'LIBVLC_VERSION', "\"${rootProject.ext.libvlcVersion}\""
buildConfigField 'String', 'ML_VERSION', "\"${rootProject.ext.medialibraryVersion}\""
@@ -242,6 +243,18 @@ def revision() {
return code.toString()
}
+def dav1dVersion() {
+ def code = new ByteArrayOutputStream()
+ if (file("../../libvlcjni/vlc/contrib/src/dav1d/rules.mak").exists()) {
+ exec {
+ commandLine 'bash', '-c', 'grep "DAV1D_VERSION := " ../../libvlcjni/vlc/contrib/src/dav1d/rules.mak | cut -d = -f2'
+ standardOutput = code
+ }
+ return code.toString().replaceAll(" ", "")
+ }
+ return "0.0.0"
+}
+
/**
* Generate a changelog string from the NEWS file
* @return a string containing the latest changelog entry
More information about the Android
mailing list