diff options
author | Andreas Huber <andih@google.com> | 2011-09-26 11:26:59 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-26 11:26:59 -0700 |
commit | 070b91e1f67e6e2f129b6b492f38fbec7c8618e4 (patch) | |
tree | a6c6a25ce9bd1b423243fca18300955b7e7ef3fb /cmds | |
parent | dc9bacd838442a524585887e6ea6696836be2eda (diff) | |
parent | 93d5ab693626fa2700375e838e4bb90e4d50e605 (diff) | |
download | frameworks_av-070b91e1f67e6e2f129b6b492f38fbec7c8618e4.zip frameworks_av-070b91e1f67e6e2f129b6b492f38fbec7c8618e4.tar.gz frameworks_av-070b91e1f67e6e2f129b6b492f38fbec7c8618e4.tar.bz2 |
Merge "Properly connect to surface flinger in our shell tools"
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/stagefright/sf2.cpp | 10 | ||||
-rw-r--r-- | cmds/stagefright/stagefright.cpp | 10 | ||||
-rw-r--r-- | cmds/stagefright/stream.cpp | 2 |
3 files changed, 19 insertions, 3 deletions
diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp index 6fa66cf..263ecd1 100644 --- a/cmds/stagefright/sf2.cpp +++ b/cmds/stagefright/sf2.cpp @@ -569,12 +569,16 @@ int main(int argc, char **argv) { CHECK(control->isValid()); SurfaceComposerClient::openGlobalTransaction(); - CHECK_EQ(control->setLayer(30000), (status_t)OK); + CHECK_EQ(control->setLayer(INT_MAX), (status_t)OK); CHECK_EQ(control->show(), (status_t)OK); SurfaceComposerClient::closeGlobalTransaction(); surface = control->getSurface(); CHECK(surface != NULL); + + CHECK_EQ((status_t)OK, + native_window_api_connect( + surface.get(), NATIVE_WINDOW_API_MEDIA)); } sp<Controller> controller = @@ -589,6 +593,10 @@ int main(int argc, char **argv) { looper->unregisterHandler(controller->id()); if (!decodeAudio && useSurface) { + CHECK_EQ((status_t)OK, + native_window_api_disconnect( + surface.get(), NATIVE_WINDOW_API_MEDIA)); + composerClient->dispose(); } diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index a126e83..528d197 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -917,7 +917,7 @@ int main(int argc, char **argv) { CHECK(control->isValid()); SurfaceComposerClient::openGlobalTransaction(); - CHECK_EQ(control->setLayer(30000), (status_t)OK); + CHECK_EQ(control->setLayer(INT_MAX), (status_t)OK); CHECK_EQ(control->show(), (status_t)OK); SurfaceComposerClient::closeGlobalTransaction(); @@ -929,6 +929,10 @@ int main(int argc, char **argv) { sp<SurfaceTexture> texture = new SurfaceTexture(0 /* tex */); gSurface = new SurfaceTextureClient(texture); } + + CHECK_EQ((status_t)OK, + native_window_api_connect( + gSurface.get(), NATIVE_WINDOW_API_MEDIA)); } DataSource::RegisterDefaultSniffers(); @@ -1122,6 +1126,10 @@ int main(int argc, char **argv) { } if ((useSurfaceAlloc || useSurfaceTexAlloc) && !audioOnly) { + CHECK_EQ((status_t)OK, + native_window_api_disconnect( + gSurface.get(), NATIVE_WINDOW_API_MEDIA)); + gSurface.clear(); if (useSurfaceAlloc) { diff --git a/cmds/stagefright/stream.cpp b/cmds/stagefright/stream.cpp index b13236a..2378345 100644 --- a/cmds/stagefright/stream.cpp +++ b/cmds/stagefright/stream.cpp @@ -323,7 +323,7 @@ int main(int argc, char **argv) { CHECK(control->isValid()); SurfaceComposerClient::openGlobalTransaction(); - CHECK_EQ(control->setLayer(30000), (status_t)OK); + CHECK_EQ(control->setLayer(INT_MAX), (status_t)OK); CHECK_EQ(control->show(), (status_t)OK); SurfaceComposerClient::closeGlobalTransaction(); |