diff options
Diffstat (limited to 'cmds/stagefright/stream.cpp')
-rw-r--r-- | cmds/stagefright/stream.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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, |