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/java/android/media/MediaPlayer.java +16 −4 Original line number Diff line number Diff line Loading @@ -1253,14 +1253,26 @@ public class MediaPlayer */ public native void attachAuxEffect(int effectId); /* Do not change these values without updating their counterparts * in include/media/mediaplayer.h! /* Do not change these values (starting with KEY_PARAMETER) without updating * their counterparts in include/media/mediaplayer.h! */ /** /* * Key used in setParameter method. * Indicates the index of the timed text track to be enabled/disabled * Indicates the index of the timed text track to be enabled/disabled. * The index includes both the in-band and out-of-band timed text. * The index should start from in-band text if any. Application can retrieve the number * of in-band text tracks by using MediaMetadataRetriever::extractMetadata(). * Note it might take a few hundred ms to scan an out-of-band text file * before displaying it. */ private static final int KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000; /* * Key used in setParameter method. * Used to add out-of-band timed text source path. * Application can add multiple text sources by calling setParameter() with * KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE multiple times. */ private static final int KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001; /** * Sets the parameter indicated by key. 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 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/java/android/media/MediaPlayer.java +16 −4 Original line number Diff line number Diff line Loading @@ -1253,14 +1253,26 @@ public class MediaPlayer */ public native void attachAuxEffect(int effectId); /* Do not change these values without updating their counterparts * in include/media/mediaplayer.h! /* Do not change these values (starting with KEY_PARAMETER) without updating * their counterparts in include/media/mediaplayer.h! */ /** /* * Key used in setParameter method. * Indicates the index of the timed text track to be enabled/disabled * Indicates the index of the timed text track to be enabled/disabled. * The index includes both the in-band and out-of-band timed text. * The index should start from in-band text if any. Application can retrieve the number * of in-band text tracks by using MediaMetadataRetriever::extractMetadata(). * Note it might take a few hundred ms to scan an out-of-band text file * before displaying it. */ private static final int KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000; /* * Key used in setParameter method. * Used to add out-of-band timed text source path. * Application can add multiple text sources by calling setParameter() with * KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE multiple times. */ private static final int KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001; /** * Sets the parameter indicated by key. 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