diff options
author | Lajos Molnar <lajos@google.com> | 2015-04-30 18:18:34 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-04-30 18:53:52 -0700 |
commit | 1de1e25cba872bd4c077c2e394f8ca9c70b65856 (patch) | |
tree | 7f01e01b5a3731a9c345684e38755d97e6a67f19 /media/libstagefright | |
parent | 31de88566257d5546cf4eee9064d96926a4b0c24 (diff) | |
download | frameworks_av-1de1e25cba872bd4c077c2e394f8ca9c70b65856.zip frameworks_av-1de1e25cba872bd4c077c2e394f8ca9c70b65856.tar.gz frameworks_av-1de1e25cba872bd4c077c2e394f8ca9c70b65856.tar.bz2 |
stagefright: remove NativeWindowWrapper
Now that Surface and SurfaceTextureClient are the same and Surface,
it does not add value.
Bug: 19489395
Change-Id: I016ecd1cf5cc51ce6244b6fa34ecd75f84e3db01
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 14 | ||||
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 11 |
2 files changed, 8 insertions, 17 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 4fcee90..7b87676 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -24,6 +24,8 @@ #include <inttypes.h> #include <utils/Trace.h> +#include <gui/Surface.h> + #include <media/stagefright/ACodec.h> #include <binder/MemoryDealer.h> @@ -37,7 +39,6 @@ #include <media/stagefright/BufferProducerWrapper.h> #include <media/stagefright/MediaCodecList.h> #include <media/stagefright/MediaDefs.h> -#include <media/stagefright/NativeWindowWrapper.h> #include <media/stagefright/OMXClient.h> #include <media/stagefright/OMXCodec.h> @@ -1316,9 +1317,8 @@ status_t ACodec::configureCodec( } } if (haveNativeWindow) { - sp<NativeWindowWrapper> windowWrapper( - static_cast<NativeWindowWrapper *>(obj.get())); - sp<ANativeWindow> nativeWindow = windowWrapper->getNativeWindow(); + sp<ANativeWindow> nativeWindow = + static_cast<ANativeWindow *>(static_cast<Surface *>(obj.get())); // START of temporary support for automatic FRC - THIS WILL BE REMOVED int32_t autoFrc; @@ -1477,10 +1477,8 @@ status_t ACodec::configureCodec( } if (haveNativeWindow) { - sp<NativeWindowWrapper> nativeWindow( - static_cast<NativeWindowWrapper *>(obj.get())); - CHECK(nativeWindow != NULL); - mNativeWindow = nativeWindow->getNativeWindow(); + mNativeWindow = static_cast<Surface *>(obj.get()); + CHECK(mNativeWindow != NULL); native_window_set_scaling_mode( mNativeWindow.get(), NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index 8a2dc35..25887ef 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -42,7 +42,6 @@ #include <media/stagefright/MediaErrors.h> #include <media/stagefright/MediaFilter.h> #include <media/stagefright/MetaData.h> -#include <media/stagefright/NativeWindowWrapper.h> #include <private/android_filesystem_config.h> #include <utils/Log.h> #include <utils/Singleton.h> @@ -481,9 +480,7 @@ status_t MediaCodec::configure( msg->setInt32("flags", flags); if (nativeWindow != NULL) { - msg->setObject( - "native-window", - new NativeWindowWrapper(nativeWindow)); + msg->setObject("native-window", nativeWindow); } if (crypto != NULL) { @@ -1614,11 +1611,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { if (obj != NULL) { format->setObject("native-window", obj); - - status_t err = setNativeWindow( - static_cast<NativeWindowWrapper *>(obj.get()) - ->getSurfaceTextureClient()); - + status_t err = setNativeWindow(static_cast<Surface *>(obj.get())); if (err != OK) { PostReplyWithError(replyID, err); break; |