Set OpenGL as the default renderer
Description: This cl sets OpenGL as the default renderer which is widely used and should be test first BUG= TEST=test on android Review URL: https://webrtc-codereview.appspot.com/573007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2260 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ada5db4e75
commit
e3ba738ba3
@ -67,19 +67,19 @@
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/radio_group1">
|
||||
<RadioButton
|
||||
android:id="@+id/radio_surface"
|
||||
android:onClick="onClick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/surfaceview"
|
||||
android:checked="true"
|
||||
android:textColor="#f00"/>
|
||||
<RadioButton
|
||||
android:id="@+id/radio_opengl"
|
||||
android:onClick="onClick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/opengl"
|
||||
android:checked="true"
|
||||
android:textColor="#0f0"/>
|
||||
<RadioButton
|
||||
android:id="@+id/radio_surface"
|
||||
android:onClick="onClick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/surfaceview"
|
||||
android:textColor="#0f0" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
@ -120,7 +120,7 @@ public class WebRTCDemo extends TabActivity implements IViEAndroidCallback,
|
||||
private boolean loopbackMode = true;
|
||||
private CheckBox cbStats;
|
||||
private boolean isStatsOn = true;
|
||||
private boolean isSurfaceView = true;
|
||||
private boolean useOpenGLRender = true;
|
||||
|
||||
// Video settings
|
||||
private Spinner spCodecType;
|
||||
@ -385,11 +385,11 @@ public class WebRTCDemo extends TabActivity implements IViEAndroidCallback,
|
||||
|
||||
RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radio_group1);
|
||||
radioGroup.clearCheck();
|
||||
if (isSurfaceView == true) {
|
||||
radioGroup.check(R.id.radio_surface);
|
||||
if (useOpenGLRender == true) {
|
||||
radioGroup.check(R.id.radio_opengl);
|
||||
}
|
||||
else {
|
||||
radioGroup.check(R.id.radio_opengl);
|
||||
radioGroup.check(R.id.radio_surface);
|
||||
}
|
||||
|
||||
// voice codec
|
||||
@ -482,7 +482,7 @@ public class WebRTCDemo extends TabActivity implements IViEAndroidCallback,
|
||||
remoteIp.getBytes());
|
||||
|
||||
if (enableVideoReceive) {
|
||||
if(!isSurfaceView) {
|
||||
if(useOpenGLRender) {
|
||||
Log.v(TAG, "Create OpenGL Render");
|
||||
remoteSurfaceView = ViERenderer.CreateRenderer(this, true);
|
||||
ret = ViEAndroidAPI.AddRemoteRenderer(channel, remoteSurfaceView);
|
||||
@ -704,10 +704,10 @@ public class WebRTCDemo extends TabActivity implements IViEAndroidCallback,
|
||||
}
|
||||
break;
|
||||
case R.id.radio_surface:
|
||||
isSurfaceView = true;
|
||||
useOpenGLRender = false;
|
||||
break;
|
||||
case R.id.radio_opengl:
|
||||
isSurfaceView = false;
|
||||
useOpenGLRender = true;
|
||||
break;
|
||||
case R.id.cbNack:
|
||||
enableNack = cbEnableNack.isChecked();
|
||||
|
Loading…
x
Reference in New Issue
Block a user