From 1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 14 Feb 2013 17:11:27 -0800 Subject: Refactoring: Rename SurfaceTextureClient to Surface Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830 --- cmds/stagefright/SimplePlayer.cpp | 8 ++++---- cmds/stagefright/codec.cpp | 3 ++- cmds/stagefright/stagefright.cpp | 4 ++-- cmds/stagefright/stream.cpp | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'cmds') diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp index 93de112..5d2d721 100644 --- a/cmds/stagefright/SimplePlayer.cpp +++ b/cmds/stagefright/SimplePlayer.cpp @@ -20,7 +20,7 @@ #include "SimplePlayer.h" -#include +#include #include #include #include @@ -67,13 +67,13 @@ status_t SimplePlayer::setDataSource(const char *path) { status_t SimplePlayer::setSurface(const sp &bufferProducer) { sp msg = new AMessage(kWhatSetSurface, id()); - sp surfaceTextureClient; + sp surface; if (bufferProducer != NULL) { - surfaceTextureClient = new SurfaceTextureClient(bufferProducer); + surface = new Surface(bufferProducer); } msg->setObject( - "native-window", new NativeWindowWrapper(surfaceTextureClient)); + "native-window", new NativeWindowWrapper(surface)); sp response; return PostAndAwaitResponse(msg, &response); diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp index 723a6e5..fdfefdf 100644 --- a/cmds/stagefright/codec.cpp +++ b/cmds/stagefright/codec.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include static void usage(const char *me) { @@ -413,7 +414,7 @@ int main(int argc, char **argv) { looper->registerHandler(player); player->setDataSource(argv[0]); - player->setSurface(surface->getSurfaceTexture()); + player->setSurface(surface->getIGraphicBufferProducer()); player->start(); sleep(60); player->stop(); diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 2aae64d..5bdbfbb 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -53,7 +53,7 @@ #include -#include +#include #include using namespace android; @@ -941,7 +941,7 @@ int main(int argc, char **argv) { CHECK(useSurfaceTexAlloc); sp texture = new GLConsumer(0 /* tex */); - gSurface = new SurfaceTextureClient(texture->getBufferQueue()); + gSurface = new Surface(texture->getBufferQueue()); } CHECK_EQ((status_t)OK, diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp index af6afe0..d49ab4a 100644 --- a/cmds/stagefright/stream.cpp +++ b/cmds/stagefright/stream.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -373,7 +374,7 @@ int main(int argc, char **argv) { service->create(client, 0); if (player != NULL && player->setDataSource(source) == NO_ERROR) { - player->setVideoSurfaceTexture(surface->getSurfaceTexture()); + player->setVideoSurfaceTexture(surface->getISurfaceTexture()); player->start(); client->waitForEOS(); -- cgit v1.1