diff options
| author | Mathias Agopian <mathias@google.com> | 2013-02-14 17:11:27 -0800 | 
|---|---|---|
| committer | Mathias Agopian <mathias@google.com> | 2013-02-15 12:47:35 -0800 | 
| commit | 1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 (patch) | |
| tree | 8e63f996a20f020e0af736eab89d632204c2c631 /cmds | |
| parent | 05f625c46b992ab66b8d1527a366fe2746b4e3c7 (diff) | |
| download | frameworks_av-1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3.zip frameworks_av-1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3.tar.gz frameworks_av-1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3.tar.bz2  | |
Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/stagefright/SimplePlayer.cpp | 8 | ||||
| -rw-r--r-- | cmds/stagefright/codec.cpp | 3 | ||||
| -rw-r--r-- | cmds/stagefright/stagefright.cpp | 4 | ||||
| -rw-r--r-- | cmds/stagefright/stream.cpp | 3 | 
4 files changed, 10 insertions, 8 deletions
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 <gui/SurfaceTextureClient.h> +#include <gui/Surface.h>  #include <media/AudioTrack.h>  #include <media/ICrypto.h>  #include <media/stagefright/foundation/ABuffer.h> @@ -67,13 +67,13 @@ status_t SimplePlayer::setDataSource(const char *path) {  status_t SimplePlayer::setSurface(const sp<IGraphicBufferProducer> &bufferProducer) {      sp<AMessage> msg = new AMessage(kWhatSetSurface, id()); -    sp<SurfaceTextureClient> surfaceTextureClient; +    sp<Surface> 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<AMessage> 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 <media/stagefright/NuMediaExtractor.h>  #include <gui/ISurfaceComposer.h>  #include <gui/SurfaceComposerClient.h> +#include <gui/Surface.h>  #include <ui/DisplayInfo.h>  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 <fcntl.h> -#include <gui/SurfaceTextureClient.h> +#include <gui/Surface.h>  #include <gui/SurfaceComposerClient.h>  using namespace android; @@ -941,7 +941,7 @@ int main(int argc, char **argv) {              CHECK(useSurfaceTexAlloc);              sp<GLConsumer> 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 <media/IMediaPlayerService.h>  #include <gui/ISurfaceComposer.h>  #include <gui/SurfaceComposerClient.h> +#include <gui/Surface.h>  #include <fcntl.h>  #include <ui/DisplayInfo.h> @@ -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();  | 
