調整架構
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
ndkVersion "21.3.6528147"
|
||||
|
||||
compileSdkVersion 33
|
||||
|
||||
defaultConfig {
|
||||
@@ -21,7 +23,10 @@ android {
|
||||
if (gstRoot == null)
|
||||
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')
|
||||
|
||||
arguments "NDK_APPLICATION_MK=jni/Application.mk", "GSTREAMER_JAVA_SRC_DIR=src", "GSTREAMER_ROOT_ANDROID=$gstRoot", "GSTREAMER_ASSETS_DIR=src/assets"
|
||||
arguments "NDK_APPLICATION_MK=jni/Application.mk",
|
||||
"GSTREAMER_JAVA_SRC_DIR=src",
|
||||
"GSTREAMER_ROOT_ANDROID=$gstRoot",
|
||||
"GSTREAMER_ASSETS_DIR=src/assets"
|
||||
|
||||
targets "gst_player"
|
||||
|
||||
@@ -65,6 +70,6 @@ afterEvaluate {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
//implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||
}
|
||||
|
||||
@@ -19,11 +19,10 @@ public class GstLibrary implements Closeable {
|
||||
|
||||
private GstCallback gstCallback;
|
||||
|
||||
private final String rtspUrl;
|
||||
private String rtspUrl;
|
||||
|
||||
public GstLibrary(Context context, String rtspUrl) {
|
||||
public GstLibrary(Context context) {
|
||||
this.mAppContext = context.getApplicationContext();
|
||||
this.rtspUrl = rtspUrl;
|
||||
|
||||
// Initialize GStreamer and warn if it fails
|
||||
try {
|
||||
@@ -56,6 +55,10 @@ public class GstLibrary implements Closeable {
|
||||
nativePause();
|
||||
}
|
||||
|
||||
public void setRtspUrl(String rtspUrl) {
|
||||
this.rtspUrl = rtspUrl;
|
||||
}
|
||||
|
||||
public void releaseSurface() {
|
||||
nativeSurfaceFinalize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user