summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-07-25 19:22:42 -0700
committerMathias Agopian <mathias@google.com>2012-07-25 20:38:26 -0700
commit3dca4c7a5622fc6aa03397d749c4b4c1201cc4f3 (patch)
tree0867a719c65c8063b65f33d8e2304cd679245da8 /cmds
parent28567defef0ba95cb38f2d80eba30b01db207a77 (diff)
downloadframeworks_av-3dca4c7a5622fc6aa03397d749c4b4c1201cc4f3.zip
frameworks_av-3dca4c7a5622fc6aa03397d749c4b4c1201cc4f3.tar.gz
frameworks_av-3dca4c7a5622fc6aa03397d749c4b4c1201cc4f3.tar.bz2
update to new getDisplayInfo API
Change-Id: Ie273677e34b9e8475abfa0ae27620d98b3a15b77
Diffstat (limited to 'cmds')
-rw-r--r--cmds/stagefright/codec.cpp7
-rw-r--r--cmds/stagefright/stream.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp
index f3370a5..bfe20cc 100644
--- a/cmds/stagefright/codec.cpp
+++ b/cmds/stagefright/codec.cpp
@@ -35,6 +35,7 @@
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/NuMediaExtractor.h>
#include <gui/SurfaceComposerClient.h>
+#include <ui/DisplayInfo.h>
static void usage(const char *me) {
fprintf(stderr, "usage: %s [-a] use audio\n"
@@ -378,8 +379,10 @@ int main(int argc, char **argv) {
composerClient = new SurfaceComposerClient;
CHECK_EQ(composerClient->initCheck(), (status_t)OK);
- ssize_t displayWidth = composerClient->getDisplayWidth(0);
- ssize_t displayHeight = composerClient->getDisplayHeight(0);
+ DisplayInfo info;
+ SurfaceComposerClient::getDisplayInfo(0, &info);
+ ssize_t displayWidth = info.w;
+ ssize_t displayHeight = info.h;
ALOGV("display is %ld x %ld\n", displayWidth, displayHeight);
diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp
index efa1445..a9f0ab2 100644
--- a/cmds/stagefright/stream.cpp
+++ b/cmds/stagefright/stream.cpp
@@ -35,6 +35,7 @@
#include <gui/SurfaceComposerClient.h>
#include <fcntl.h>
+#include <ui/DisplayInfo.h>
using namespace android;
@@ -304,8 +305,10 @@ int main(int argc, char **argv) {
sp<SurfaceComposerClient> composerClient = new SurfaceComposerClient;
CHECK_EQ(composerClient->initCheck(), (status_t)OK);
- ssize_t displayWidth = composerClient->getDisplayWidth(0);
- ssize_t displayHeight = composerClient->getDisplayHeight(0);
+ DisplayInfo info;
+ SurfaceComposerClient::getDisplayInfo(0, &info);
+ ssize_t displayWidth = info.w;
+ ssize_t displayHeight = info.h;
ALOGV("display is %d x %d\n", displayWidth, displayHeight);