Loading include/media/mediaplayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ enum media_player_states { enum media_set_parameter_keys { KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000, KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001, }; // ---------------------------------------------------------------------------- // ref-counted object for callbacks Loading media/libstagefright/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ LOCAL_SRC_FILES:= \ ThrottledSource.cpp \ TimeSource.cpp \ TimedEventQueue.cpp \ TimedTextPlayer.cpp \ Utils.cpp \ VBRISeeker.cpp \ WAVExtractor.cpp \ Loading Loading @@ -89,6 +88,7 @@ LOCAL_STATIC_LIBRARIES := \ libstagefright_avcenc \ libstagefright_m4vh263enc \ libstagefright_matroska \ libstagefright_timedtext \ libvpx \ libstagefright_mpeg2ts \ libstagefright_httplive \ Loading media/libstagefright/AwesomePlayer.cpp +22 −4 Original line number Diff line number Diff line Loading @@ -29,9 +29,10 @@ #include "include/NuCachedSource2.h" #include "include/ThrottledSource.h" #include "include/MPEG2TSExtractor.h" #include "include/TimedTextPlayer.h" #include "include/WVMExtractor.h" #include "timedtext/TimedTextPlayer.h" #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> #include <media/IMediaPlayerService.h> Loading Loading @@ -1282,6 +1283,7 @@ void AwesomePlayer::setAudioSource(sp<MediaSource> source) { } void AwesomePlayer::addTextSource(sp<MediaSource> source) { Mutex::Autolock autoLock(mTimedTextLock); CHECK(source != NULL); if (mTextPlayer == NULL) { Loading Loading @@ -2066,11 +2068,27 @@ void AwesomePlayer::postAudioSeekComplete_l() { } status_t AwesomePlayer::setParameter(int key, const Parcel &request) { if (key == KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX) { switch (key) { case KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX: { Mutex::Autolock autoLock(mTimedTextLock); return setTimedTextTrackIndex(request.readInt32()); } case KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE: { Mutex::Autolock autoLock(mTimedTextLock); if (mTextPlayer == NULL) { mTextPlayer = new TimedTextPlayer(this, mListener, &mQueue); } return mTextPlayer->setParameter(key, request); } default: { return ERROR_UNSUPPORTED; } } } status_t AwesomePlayer::getParameter(int key, Parcel *reply) { return OK; Loading media/libstagefright/MPEG4Extractor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ #include "include/MPEG4Extractor.h" #include "include/SampleTable.h" #include "include/ESDS.h" #include "include/TimedTextPlayer.h" #include "timedtext/TimedTextPlayer.h" #include <arpa/inet.h> Loading media/libstagefright/include/AwesomePlayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,7 @@ private: int64_t mLastVideoTimeUs; TimedTextPlayer *mTextPlayer; mutable Mutex mTimedTextLock; sp<WVMExtractor> mWVMExtractor; Loading Loading
include/media/mediaplayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ enum media_player_states { enum media_set_parameter_keys { KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000, KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001, }; // ---------------------------------------------------------------------------- // ref-counted object for callbacks Loading
media/libstagefright/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ LOCAL_SRC_FILES:= \ ThrottledSource.cpp \ TimeSource.cpp \ TimedEventQueue.cpp \ TimedTextPlayer.cpp \ Utils.cpp \ VBRISeeker.cpp \ WAVExtractor.cpp \ Loading Loading @@ -89,6 +88,7 @@ LOCAL_STATIC_LIBRARIES := \ libstagefright_avcenc \ libstagefright_m4vh263enc \ libstagefright_matroska \ libstagefright_timedtext \ libvpx \ libstagefright_mpeg2ts \ libstagefright_httplive \ Loading
media/libstagefright/AwesomePlayer.cpp +22 −4 Original line number Diff line number Diff line Loading @@ -29,9 +29,10 @@ #include "include/NuCachedSource2.h" #include "include/ThrottledSource.h" #include "include/MPEG2TSExtractor.h" #include "include/TimedTextPlayer.h" #include "include/WVMExtractor.h" #include "timedtext/TimedTextPlayer.h" #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> #include <media/IMediaPlayerService.h> Loading Loading @@ -1282,6 +1283,7 @@ void AwesomePlayer::setAudioSource(sp<MediaSource> source) { } void AwesomePlayer::addTextSource(sp<MediaSource> source) { Mutex::Autolock autoLock(mTimedTextLock); CHECK(source != NULL); if (mTextPlayer == NULL) { Loading Loading @@ -2066,11 +2068,27 @@ void AwesomePlayer::postAudioSeekComplete_l() { } status_t AwesomePlayer::setParameter(int key, const Parcel &request) { if (key == KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX) { switch (key) { case KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX: { Mutex::Autolock autoLock(mTimedTextLock); return setTimedTextTrackIndex(request.readInt32()); } case KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE: { Mutex::Autolock autoLock(mTimedTextLock); if (mTextPlayer == NULL) { mTextPlayer = new TimedTextPlayer(this, mListener, &mQueue); } return mTextPlayer->setParameter(key, request); } default: { return ERROR_UNSUPPORTED; } } } status_t AwesomePlayer::getParameter(int key, Parcel *reply) { return OK; Loading
media/libstagefright/MPEG4Extractor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ #include "include/MPEG4Extractor.h" #include "include/SampleTable.h" #include "include/ESDS.h" #include "include/TimedTextPlayer.h" #include "timedtext/TimedTextPlayer.h" #include <arpa/inet.h> Loading
media/libstagefright/include/AwesomePlayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,7 @@ private: int64_t mLastVideoTimeUs; TimedTextPlayer *mTextPlayer; mutable Mutex mTimedTextLock; sp<WVMExtractor> mWVMExtractor; Loading