summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-04-30 18:18:34 -0700
committerLajos Molnar <lajos@google.com>2015-04-30 18:53:52 -0700
commit1de1e25cba872bd4c077c2e394f8ca9c70b65856 (patch)
tree7f01e01b5a3731a9c345684e38755d97e6a67f19 /cmds
parent31de88566257d5546cf4eee9064d96926a4b0c24 (diff)
downloadframeworks_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 'cmds')
-rw-r--r--cmds/stagefright/SimplePlayer.cpp14
-rw-r--r--cmds/stagefright/SimplePlayer.h4
-rw-r--r--cmds/stagefright/sf2.cpp5
3 files changed, 9 insertions, 14 deletions
diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp
index bd33d86..50913cd 100644
--- a/cmds/stagefright/SimplePlayer.cpp
+++ b/cmds/stagefright/SimplePlayer.cpp
@@ -30,7 +30,6 @@
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/MediaCodec.h>
#include <media/stagefright/MediaErrors.h>
-#include <media/stagefright/NativeWindowWrapper.h>
#include <media/stagefright/NuMediaExtractor.h>
namespace android {
@@ -74,8 +73,7 @@ status_t SimplePlayer::setSurface(const sp<IGraphicBufferProducer> &bufferProduc
surface = new Surface(bufferProducer);
}
- msg->setObject(
- "native-window", new NativeWindowWrapper(surface));
+ msg->setObject("surface", surface);
sp<AMessage> response;
return PostAndAwaitResponse(msg, &response);
@@ -133,10 +131,8 @@ void SimplePlayer::onMessageReceived(const sp<AMessage> &msg) {
err = INVALID_OPERATION;
} else {
sp<RefBase> obj;
- CHECK(msg->findObject("native-window", &obj));
-
- mNativeWindow = static_cast<NativeWindowWrapper *>(obj.get());
-
+ CHECK(msg->findObject("surface", &obj));
+ mSurface = static_cast<Surface *>(obj.get());
err = OK;
}
@@ -325,7 +321,7 @@ status_t SimplePlayer::onPrepare() {
err = state->mCodec->configure(
format,
- isVideo ? mNativeWindow->getSurfaceTextureClient() : NULL,
+ isVideo ? mSurface : NULL,
NULL /* crypto */,
0 /* flags */);
@@ -412,7 +408,7 @@ status_t SimplePlayer::onReset() {
mStateByTrackIndex.clear();
mCodecLooper.clear();
mExtractor.clear();
- mNativeWindow.clear();
+ mSurface.clear();
mPath.clear();
return OK;
diff --git a/cmds/stagefright/SimplePlayer.h b/cmds/stagefright/SimplePlayer.h
index ce993e8..ae9dfd2 100644
--- a/cmds/stagefright/SimplePlayer.h
+++ b/cmds/stagefright/SimplePlayer.h
@@ -25,8 +25,8 @@ struct ALooper;
struct AudioTrack;
class IGraphicBufferProducer;
struct MediaCodec;
-struct NativeWindowWrapper;
struct NuMediaExtractor;
+class Surface;
struct SimplePlayer : public AHandler {
SimplePlayer();
@@ -84,7 +84,7 @@ private:
State mState;
AString mPath;
- sp<NativeWindowWrapper> mNativeWindow;
+ sp<Surface> mSurface;
sp<NuMediaExtractor> mExtractor;
sp<ALooper> mCodecLooper;
diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp
index 891d84b..0d64d2f 100644
--- a/cmds/stagefright/sf2.cpp
+++ b/cmds/stagefright/sf2.cpp
@@ -38,10 +38,10 @@
#include <media/stagefright/MediaExtractor.h>
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MetaData.h>
-#include <media/stagefright/NativeWindowWrapper.h>
#include <media/stagefright/Utils.h>
#include <gui/SurfaceComposerClient.h>
+#include <gui/Surface.h>
#include "include/ESDS.h"
@@ -154,8 +154,7 @@ protected:
sp<AMessage> format = makeFormat(mSource->getFormat());
if (mSurface != NULL) {
- format->setObject(
- "native-window", new NativeWindowWrapper(mSurface));
+ format->setObject("surface", mSurface);
}
mCodec->initiateSetup(format);