Enable/disable video according to user settings

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-09-22 15:12:56 +02:00
parent 6366fac197
commit 16d112430f

View file

@ -96,8 +96,8 @@ public class VideoCallActivity extends SoftVolumeActivity {
// Before creating the graph, the orientation must be known to LC => this is done here // Before creating the graph, the orientation must be known to LC => this is done here
LinphoneManager.getLc().setDeviceRotation(AndroidVideoWindowImpl.rotationToAngle(getWindowManager().getDefaultDisplay().getOrientation())); LinphoneManager.getLc().setDeviceRotation(AndroidVideoWindowImpl.rotationToAngle(getWindowManager().getDefaultDisplay().getOrientation()));
if (!LinphoneManager.getInstance().shareMyCamera()) LinphoneManager.getInstance().sendStaticImage(!LinphoneManager.getInstance().shareMyCamera());
LinphoneManager.getInstance().sendStaticImage(false);
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE); PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG); mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG);
mWakeLock.acquire(); mWakeLock.acquire();
@ -158,6 +158,7 @@ public class VideoCallActivity extends SoftVolumeActivity {
case R.id.videocall_menu_change_resolution: case R.id.videocall_menu_change_resolution:
LinphoneManager.getInstance().changeResolution(); LinphoneManager.getInstance().changeResolution();
// previous call will cause graph reconstruction -> regive preview window // previous call will cause graph reconstruction -> regive preview window
LinphoneManager.getLc().setPreviewWindow(mVideoCaptureView);
rewriteChangeResolutionItem(item); rewriteChangeResolutionItem(item);
break; break;
case R.id.videocall_menu_terminate_call: case R.id.videocall_menu_terminate_call: