其他分享
首页 > 其他分享> > 编译运行gstreamer android tutorials

编译运行gstreamer android tutorials

作者:互联网

下载gst-docs代码

gst-docs: https://github.com/GStreamer/gst-docs.git

修改的点

修改examples/tutorials/android/local.properties

增加sdk、ndk目录

sdk.dir=/home/hui/Android/Sdk
ndk.dir=/home/hui/Android/Sdk/ndk/21.3.6528147

新建examples/tutorials/android/gradle.properties

增加gstAndroidRoot环境变量

gstAndroidRoot=/home/hui/disk4t/codes/gstreamer-gstplayer/gstreamer/gstreamer-1.0-android-universal-1.19.3

修改tutorial下的每一个build.gradle

 android {
-    compileSdkVersion 23
+    compileSdkVersion 30
     buildToolsVersion '27.0.3'
 
     defaultConfig {
         applicationId "org.freedesktop.gstreamer.tutorials.tutorial_3"
         minSdkVersion 15
-        targetSdkVersion 15
+        targetSdkVersion 30
         versionCode 1
         versionName "1.0"


-   throw new GradleException('GSTREAMER_ROOT_ANDROID must be set, or "gstAndroidRoot" must be defined in your gradle.properties in the top level directory of the unpacked universal GStreamer Android binaries')
+   throw GradleException('GSTREAMER_ROOT_ANDROID must be set, or "gstAndroidRoot" must be defined in your gradle.properties in the top level directory of the unpacked universal GStreamer Android binaries')
 

下载gstreamer-android libs

下载gstreamer-1.0-android-universal-1.19.3解压到/home/hui/disk4t/codes/gstreamer-gstplayer/gstreamer/gstreamer-1.0-android-universal-1.19.3,前面gstAndroidRoot用的地址就是这个目录

下载地址:

https://gstreamer.freedesktop.org/data/pkg/android/1.19.3/gstreamer-1.0-android-universal-1.19.3.tar.xz

import到android studio后编译OK。

使用官网cerbero提供的编译方式也可以生成gstreamer-1.0-android-universal-1.19.3.tar.xz


标签:1.0,universal,gstreamer,1.19,gstAndroidRoot,tutorials,android
来源: https://blog.csdn.net/hongszh/article/details/122269112