From b483c4724846c0b8d4e82afcbb7c17f671bae81c Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Mon, 11 Apr 2011 17:23:27 -0700 Subject: - 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 --- media/libmedia/mediaplayer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'media/libmedia/mediaplayer.cpp') 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"); } } -- cgit v1.1