diff options
author | Insun Kang <insun@google.com> | 2012-02-16 20:28:27 +0900 |
---|---|---|
committer | Insun Kang <insun@google.com> | 2012-03-15 08:36:52 +0900 |
commit | f9d660a5e0196240add5daf0199f128d471e592c (patch) | |
tree | f67d9d6c7d7e22e8cedefaae1bf0e7a4872deda5 /include/media/mediaplayer.h | |
parent | dfaf549e3e310bc22444f4404b19f4907b24c286 (diff) | |
download | frameworks_av-f9d660a5e0196240add5daf0199f128d471e592c.zip frameworks_av-f9d660a5e0196240add5daf0199f128d471e592c.tar.gz frameworks_av-f9d660a5e0196240add5daf0199f128d471e592c.tar.bz2 |
Defines MediaPlayer APIs to support multiple audio/video/timedtext
tracks.
o Newly introduced APIs are (MediaPlayer):
getTrackInfo() / addExternalSource() / enableTrack() / disableTrack().
o Timed text tracks are supported only, for now.
o TODOs:
- Define the audio/video behavior for enableTrack and disableTrack.
- Refactoring AwesomePlayer / TimedTextDriver so that all types of
track index can be managed in the correct order and be ready for
supporting audio/video tracks.
(MediaExtractor and MediaSource for text file might be necessary.)
Change-Id: Idb85e1b3f2ed49a64f377d05472dd6663ce94e07
Diffstat (limited to 'include/media/mediaplayer.h')
-rw-r--r-- | include/media/mediaplayer.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index 662dd13..a68ab4e 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -120,6 +120,9 @@ enum media_info_type { MEDIA_INFO_NOT_SEEKABLE = 801, // New media metadata is available. MEDIA_INFO_METADATA_UPDATE = 802, + + //9xx + MEDIA_INFO_TIMED_TEXT_ERROR = 900, }; @@ -140,9 +143,6 @@ enum media_player_states { // The same enum space is used for both set and get, in case there are future keys that // can be both set and get. But as of now, all parameters are either set only or get only. enum media_parameter_keys { - KEY_PARAMETER_TIMED_TEXT_TRACK_INDEX = 1000, // set only - KEY_PARAMETER_TIMED_TEXT_ADD_OUT_OF_BAND_SOURCE = 1001, // set only - // Streaming/buffering parameters KEY_PARAMETER_CACHE_STAT_COLLECT_FREQ_MS = 1100, // set only @@ -155,6 +155,23 @@ enum media_parameter_keys { KEY_PARAMETER_PLAYBACK_RATE_PERMILLE = 1300, // set only }; +// Keep INVOKE_ID_* in sync with MediaPlayer.java. +enum media_player_invoke_ids { + INVOKE_ID_GET_TRACK_INFO = 1, + INVOKE_ID_ADD_EXTERNAL_SOURCE = 2, + INVOKE_ID_ADD_EXTERNAL_SOURCE_FD = 3, + INVOKE_ID_SELECT_TRACK = 4, + INVOKE_ID_UNSELECT_TRACK = 5, +}; + +// Keep MEDIA_TRACK_TYPE_* in sync with MediaPlayer.java. +enum media_track_type { + MEDIA_TRACK_TYPE_UNKNOWN = 0, + MEDIA_TRACK_TYPE_VIDEO = 1, + MEDIA_TRACK_TYPE_AUDIO = 2, + MEDIA_TRACK_TYPE_TIMEDTEXT = 3, +}; + // ---------------------------------------------------------------------------- // ref-counted object for callbacks class MediaPlayerListener: virtual public RefBase |