From a846c2043a8abdbc8fd1f7511d824e6a64a8baf5 Mon Sep 17 00:00:00 2001 From: "glaznev@webrtc.org" Date: Mon, 15 Sep 2014 17:52:42 +0000 Subject: HW video decoding optimization to better support HD resolution: - Change hw video decoder wrapper to allow to feed multiple input and query for an output every 10 ms. - Add an option to decode video frame into an Android surface object. Create shared with video renderer EGL context and external texture on video decoder thread. - Support external texture rendering in Android renderer. - Support TextureVideoFrame in Java and use it to pass texture from video decoder to renderer. - Fix HW encoder and decoder detection code to avoid query codec capabilities from sw codecs. BUG= R=tkchin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/18299004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7185 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../android/src/org/appspot/apprtc/AppRTCDemoActivity.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java') diff --git a/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java b/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java index 213da7b..468ce22 100644 --- a/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java +++ b/examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java @@ -77,7 +77,6 @@ import java.util.regex.Pattern; public class AppRTCDemoActivity extends Activity implements AppRTCClient.IceServersObserver { private static final String TAG = "AppRTCDemoActivity"; - private static boolean factoryStaticInitialized; private PeerConnectionFactory factory; private VideoSource videoSource; private boolean videoSourceStopped; @@ -133,13 +132,6 @@ public class AppRTCDemoActivity extends Activity hudView.setVisibility(View.INVISIBLE); addContentView(hudView, hudLayout); - if (!factoryStaticInitialized) { - abortUnless(PeerConnectionFactory.initializeAndroidGlobals( - this, true, true), - "Failed to initializeAndroidGlobals"); - factoryStaticInitialized = true; - } - AudioManager audioManager = ((AudioManager) getSystemService(AUDIO_SERVICE)); // TODO(fischman): figure out how to do this Right(tm) and remove the @@ -282,6 +274,9 @@ public class AppRTCDemoActivity extends Activity @Override public void onIceServers(List iceServers) { + abortUnless(PeerConnectionFactory.initializeAndroidGlobals( + this, true, true, VideoRendererGui.getEGLContext()), + "Failed to initializeAndroidGlobals"); factory = new PeerConnectionFactory(); MediaConstraints pcConstraints = appRtcClient.pcConstraints(); -- cgit v1.2.3