diff options
author | Marco Nelissen <marcone@google.com> | 2013-11-04 21:59:12 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-04 21:59:12 -0800 |
commit | 36bbb12410d4119cf3871ae9453a898c80d94800 (patch) | |
tree | e58ce30e3cef7220c48f6e2c73cd2ef48c146156 /media/libmediaplayerservice | |
parent | 21264c4f0de2e2e74a62290a4aaafea4cc865528 (diff) | |
parent | 921688852b72bfa921913b8afe18c0d749c6797d (diff) | |
download | frameworks_av-36bbb12410d4119cf3871ae9453a898c80d94800.zip frameworks_av-36bbb12410d4119cf3871ae9453a898c80d94800.tar.gz frameworks_av-36bbb12410d4119cf3871ae9453a898c80d94800.tar.bz2 |
am 92168885: am f8a1169d: Merge "Notify current video size if available" into klp-dev
* commit '921688852b72bfa921913b8afe18c0d749c6797d':
Notify current video size if available
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp index d8b35d7..f1782cc 100644 --- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp +++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp @@ -201,7 +201,16 @@ void NuPlayer::HTTPLiveSource::onSessionNotify(const sp<AMessage> &msg) { switch (what) { case LiveSession::kWhatPrepared: { - notifyVideoSizeChanged(0, 0); + // notify the current size here if we have it, otherwise report an initial size of (0,0) + sp<AMessage> format = getFormat(false /* audio */); + int32_t width; + int32_t height; + if (format != NULL && + format->findInt32("width", &width) && format->findInt32("height", &height)) { + notifyVideoSizeChanged(width, height); + } else { + notifyVideoSizeChanged(0, 0); + } uint32_t flags = FLAG_CAN_PAUSE; if (mLiveSession->isSeekable()) { |