summaryrefslogtreecommitdiff
path: root/cmds/stagefright/stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/stagefright/stream.cpp')
-rw-r--r--cmds/stagefright/stream.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp
index efa14455..a9f0ab27 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);