summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-08-24 22:34:11 -0700
committerJeff Brown <jeffbrown@google.com>2012-08-24 22:42:51 -0700
commita6195decfe4f9021bbbd7deb050495c33371366b (patch)
tree09b9019be81ae19ce8555b505248802fc918e4e3 /cmds
parent96272d57caa39566842795ba1f0605a5a5f72272 (diff)
downloadframeworks_av-a6195decfe4f9021bbbd7deb050495c33371366b.zip
frameworks_av-a6195decfe4f9021bbbd7deb050495c33371366b.tar.gz
frameworks_av-a6195decfe4f9021bbbd7deb050495c33371366b.tar.bz2
Use new surface flinger API.
Change-Id: I594c6e15db5f617d2feaac1a65b5316daa3812d0
Diffstat (limited to 'cmds')
-rw-r--r--cmds/stagefright/codec.cpp6
-rw-r--r--cmds/stagefright/sf2.cpp1
-rw-r--r--cmds/stagefright/stagefright.cpp1
-rw-r--r--cmds/stagefright/stream.cpp6
4 files changed, 8 insertions, 6 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,