OSDN Git Service

StageFright: Removes hacks for Nvidia MPEG2 decoder
authorSuresh Choudhary <sureshc@nvidia.com>
Tue, 30 Jul 2013 13:30:10 +0000 (19:00 +0530)
committerAdam Hampson <ahampson@google.com>
Fri, 9 Aug 2013 20:36:15 +0000 (13:36 -0700)
Removes the NVIDIA MPEG2 decoder specific hacks in legacy code as
Nvidia HW MPEG2 decoder is enabled and tested now.

Change-Id: Ifc67e1119d9741551336753f85f9cfdfd3fc8600

media/libstagefright/AwesomePlayer.cpp
media/libstagefright/OMXCodec.cpp

index bd28118..f12f4d4 100644 (file)
@@ -1103,8 +1103,7 @@ void AwesomePlayer::initRenderer_l() {
     setVideoScalingMode_l(mVideoScalingMode);
     if (USE_SURFACE_ALLOC
             && !strncmp(component, "OMX.", 4)
-            && strncmp(component, "OMX.google.", 11)
-            && strcmp(component, "OMX.Nvidia.mpeg2v.decode")) {
+            && strncmp(component, "OMX.google.", 11)) {
         // Hardware decoders avoid the CPU color conversion by decoding
         // directly to ANativeBuffers, so we must use a renderer that
         // just pushes those buffers to the ANativeWindow.
index 9d349a1..89a51f8 100644 (file)
@@ -359,12 +359,7 @@ sp<MediaSource> OMXCodec::Create(
             observer->setCodec(codec);
 
             err = codec->configureCodec(meta);
-
             if (err == OK) {
-                if (!strcmp("OMX.Nvidia.mpeg2v.decode", componentName)) {
-                    codec->mFlags |= kOnlySubmitOneInputBufferAtOneTime;
-                }
-
                 return codec;
             }
 
@@ -1344,8 +1339,7 @@ OMXCodec::OMXCodec(
       mLeftOverBuffer(NULL),
       mPaused(false),
       mNativeWindow(
-              (!strncmp(componentName, "OMX.google.", 11)
-              || !strcmp(componentName, "OMX.Nvidia.mpeg2v.decode"))
+              (!strncmp(componentName, "OMX.google.", 11))
                         ? NULL : nativeWindow) {
     mPortStatus[kPortIndexInput] = ENABLED;
     mPortStatus[kPortIndexOutput] = ENABLED;