diff options
author | Andreas Huber <andih@google.com> | 2012-09-21 16:02:39 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-09-24 10:01:46 -0700 |
commit | ea4bbfdcad9478ea19257fb19a32de68a2dfd958 (patch) | |
tree | 8e775ec4f40848819681f3ed4d5186cc7aa53a31 /media/libstagefright/wifi-display/source/PlaybackSession.cpp | |
parent | 94a68ecf2b56bd56994d0352cbaad56e58dcf0dc (diff) | |
download | frameworks_av-ea4bbfdcad9478ea19257fb19a32de68a2dfd958.zip frameworks_av-ea4bbfdcad9478ea19257fb19a32de68a2dfd958.tar.gz frameworks_av-ea4bbfdcad9478ea19257fb19a32de68a2dfd958.tar.bz2 |
Attempt an orderly shutdown of the wifi display connection if possible.
Shutdown the session if the encoder signals an error.
related-to-bug:7207481
Change-Id: Id78000a336f8bb8904e7d2102f8f81a4139cdd61
Diffstat (limited to 'media/libstagefright/wifi-display/source/PlaybackSession.cpp')
-rw-r--r-- | media/libstagefright/wifi-display/source/PlaybackSession.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/wifi-display/source/PlaybackSession.cpp b/media/libstagefright/wifi-display/source/PlaybackSession.cpp index 24f33df..bd84c66 100644 --- a/media/libstagefright/wifi-display/source/PlaybackSession.cpp +++ b/media/libstagefright/wifi-display/source/PlaybackSession.cpp @@ -822,6 +822,11 @@ void WifiDisplaySource::PlaybackSession::onMessageReceived( CHECK(msg->findInt32("err", &err)); ALOGE("converter signaled error %d", err); + + // Inform WifiDisplaySource of our premature death (wish). + sp<AMessage> notify = mNotify->dup(); + notify->setInt32("what", kWhatSessionDead); + notify->post(); } break; } @@ -857,7 +862,7 @@ status_t WifiDisplaySource::PlaybackSession::addSource( pullLooper->start( false /* runOnCallingThread */, false /* canCallJava */, - PRIORITY_DEFAULT); + PRIORITY_AUDIO); sp<ALooper> codecLooper = new ALooper; codecLooper->setName("codec_looper"); @@ -865,7 +870,7 @@ status_t WifiDisplaySource::PlaybackSession::addSource( codecLooper->start( false /* runOnCallingThread */, false /* canCallJava */, - PRIORITY_DEFAULT); + PRIORITY_AUDIO); size_t trackIndex; |