summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-04-11 17:23:27 -0700
committerGloria Wang <gwang@google.com>2011-04-13 11:11:34 -0700
commitb483c4724846c0b8d4e82afcbb7c17f671bae81c (patch)
tree3323eb5f46357ffff206c880b36fcf30dd984e02 /media/libmedia/mediaplayer.cpp
parentfa4e195a735ab99e02388ac5c5611e73a76c7c72 (diff)
downloadframeworks_av-b483c4724846c0b8d4e82afcbb7c17f671bae81c.zip
frameworks_av-b483c4724846c0b8d4e82afcbb7c17f671bae81c.tar.gz
frameworks_av-b483c4724846c0b8d4e82afcbb7c17f671bae81c.tar.bz2
- Add another parameter in notify() to be able to send timed text sample
through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939. Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 0ee0249..e80e742 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -551,7 +551,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId)
return mPlayer->attachAuxEffect(effectId);
}
-void MediaPlayer::notify(int msg, int ext1, int ext2)
+void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
{
LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2);
bool send = true;
@@ -641,6 +641,9 @@ void MediaPlayer::notify(int msg, int ext1, int ext2)
mVideoWidth = ext1;
mVideoHeight = ext2;
break;
+ case MEDIA_TIMED_TEXT:
+ LOGV("Received timed text message");
+ break;
default:
LOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2);
break;
@@ -653,7 +656,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2)
if ((listener != 0) && send) {
Mutex::Autolock _l(mNotifyLock);
LOGV("callback application");
- listener->notify(msg, ext1, ext2);
+ listener->notify(msg, ext1, ext2, obj);
LOGV("back from callback");
}
}