Allow setting GST_DEBUG on Android through mach

This commit is contained in:
Fernando Jiménez Moreno 2019-10-14 17:27:29 +02:00
parent eee2c895f4
commit 11993bb8f5
7 changed files with 26 additions and 6 deletions

View file

@ -76,7 +76,8 @@ public class MainActivity extends Activity implements Servo.Client {
Intent intent = getIntent();
String args = intent.getStringExtra("servoargs");
String log = intent.getStringExtra("servolog");
mServoView.setServoArgs(args, log);
String gstdebug = intent.getStringExtra("gstdebug");
mServoView.setServoArgs(args, log, gstdebug);
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
mServoView.loadUri(intent.getData());

View file

@ -74,6 +74,7 @@ public class JNIServo {
public boolean enableSubpixelTextAntialiasing = true;
public long VRExternalContext = 0;
public String logStr;
public String gstDebugStr;
public boolean enableLogs = false;
}

View file

@ -45,6 +45,7 @@ public class ServoView extends GLSurfaceView
private boolean mAnimating;
private String mServoArgs;
private String mServoLog;
private String mGstDebug;
private GestureDetector mGestureDetector;
private ScaleGestureDetector mScaleGestureDetector;
@ -90,9 +91,10 @@ public class ServoView extends GLSurfaceView
initGestures(context);
}
public void setServoArgs(String args, String log) {
public void setServoArgs(String args, String log, String gstdebug) {
mServoArgs = args;
mServoLog = log;
mGstDebug = gstdebug;
}
public void reload() {
@ -176,6 +178,7 @@ public class ServoView extends GLSurfaceView
String uri = mInitialUri == null ? null : mInitialUri.toString();
options.url = uri;
options.logStr = mServoLog;
options.gstDebugStr = mGstDebug;
mServo = new Servo(options, this, this, mClient, mActivity);
});
}