diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-08-27 17:15:59 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-27 17:16:00 -0700 |
| commit | 2352a815fe99a00702dd00c5d1c6cfdfadba10fd (patch) | |
| tree | 522f85faa8a80d4f86d0659b7694d871bc160953 | |
| parent | 68536901073cba8d673f410ebf79d44cd6c79e39 (diff) | |
| parent | a6195decfe4f9021bbbd7deb050495c33371366b (diff) | |
| download | frameworks_av-2352a815fe99a00702dd00c5d1c6cfdfadba10fd.zip frameworks_av-2352a815fe99a00702dd00c5d1c6cfdfadba10fd.tar.gz frameworks_av-2352a815fe99a00702dd00c5d1c6cfdfadba10fd.tar.bz2 | |
Merge "Use new surface flinger API." into jb-mr1-dev
| -rw-r--r-- | cmds/stagefright/codec.cpp | 6 | ||||
| -rw-r--r-- | cmds/stagefright/sf2.cpp | 1 | ||||
| -rw-r--r-- | cmds/stagefright/stagefright.cpp | 1 | ||||
| -rw-r--r-- | cmds/stagefright/stream.cpp | 6 | ||||
| -rw-r--r-- | media/libstagefright/tests/SurfaceMediaSource_test.cpp | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp index bfe20cc..723a6e5 100644 --- a/cmds/stagefright/codec.cpp +++ b/cmds/stagefright/codec.cpp @@ -34,6 +34,7 @@ #include <media/stagefright/MediaCodecList.h> #include <media/stagefright/MediaDefs.h> #include <media/stagefright/NuMediaExtractor.h> +#include <gui/ISurfaceComposer.h> #include <gui/SurfaceComposerClient.h> #include <ui/DisplayInfo.h> @@ -379,8 +380,10 @@ int main(int argc, char **argv) { composerClient = new SurfaceComposerClient; CHECK_EQ(composerClient->initCheck(), (status_t)OK); + sp<IBinder> display(SurfaceComposerClient::getBuiltInDisplay( + ISurfaceComposer::eDisplayIdMain)); DisplayInfo info; - SurfaceComposerClient::getDisplayInfo(0, &info); + SurfaceComposerClient::getDisplayInfo(display, &info); ssize_t displayWidth = info.w; ssize_t displayHeight = info.h; @@ -388,7 +391,6 @@ int main(int argc, char **argv) { control = composerClient->createSurface( String8("A Surface"), - 0, displayWidth, displayHeight, PIXEL_FORMAT_RGB_565, diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp index 3bbfbdc..c817443 100644 --- a/cmds/stagefright/sf2.cpp +++ b/cmds/stagefright/sf2.cpp @@ -612,7 +612,6 @@ int main(int argc, char **argv) { control = composerClient->createSurface( String8("A Surface"), - 0, 1280, 800, PIXEL_FORMAT_RGB_565, diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index 0362f39..b92a8a0 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -922,7 +922,6 @@ int main(int argc, char **argv) { control = composerClient->createSurface( String8("A Surface"), - 0, 1280, 800, PIXEL_FORMAT_RGB_565, diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp index ac88d1f..7329dcc 100644 --- a/cmds/stagefright/stream.cpp +++ b/cmds/stagefright/stream.cpp @@ -33,6 +33,7 @@ #include <binder/IServiceManager.h> #include <media/IMediaPlayerService.h> +#include <gui/ISurfaceComposer.h> #include <gui/SurfaceComposerClient.h> #include <fcntl.h> @@ -306,8 +307,10 @@ int main(int argc, char **argv) { sp<SurfaceComposerClient> composerClient = new SurfaceComposerClient; CHECK_EQ(composerClient->initCheck(), (status_t)OK); + sp<IBinder> display(SurfaceComposerClient::getBuiltInDisplay( + ISurfaceComposer::eDisplayIdMain)); DisplayInfo info; - SurfaceComposerClient::getDisplayInfo(0, &info); + SurfaceComposerClient::getDisplayInfo(display, &info); ssize_t displayWidth = info.w; ssize_t displayHeight = info.h; @@ -316,7 +319,6 @@ int main(int argc, char **argv) { sp<SurfaceControl> control = composerClient->createSurface( String8("A Surface"), - 0, displayWidth, displayHeight, PIXEL_FORMAT_RGB_565, diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp index cc2aca7..a61d6a2 100644 --- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp +++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp @@ -90,7 +90,7 @@ protected: ASSERT_EQ(NO_ERROR, mComposerClient->initCheck()); mSurfaceControl = mComposerClient->createSurface( - String8("Test Surface"), 0, + String8("Test Surface"), getSurfaceWidth(), getSurfaceHeight(), PIXEL_FORMAT_RGB_888, 0); |
