diff options
author | James Dong <jdong@google.com> | 2012-04-11 17:56:22 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2012-04-16 12:08:10 -0700 |
commit | eec46abb88dcc50621fd2d3f17a6b8d24fd07a19 (patch) | |
tree | 0b3e4cfec4f7f76a99bc82907c205253fb7c2ebe /media/libstagefright/include | |
parent | 25736fd247ba757feefe15d3071f7e747c64fea4 (diff) | |
download | frameworks_av-eec46abb88dcc50621fd2d3f17a6b8d24fd07a19.zip frameworks_av-eec46abb88dcc50621fd2d3f17a6b8d24fd07a19.tar.gz frameworks_av-eec46abb88dcc50621fd2d3f17a6b8d24fd07a19.tar.bz2 |
Fix for multiple audio/timed track feature implementation - part one
o getTrackInfo now returns all tracks, rather than just the timed text tracks.
o the index of the track info is kept to the same as the track index if the
track is not from an external source
o correctly maps the selectTrack() and unselectTrack() calls to the right
track index
o TODO:
1) note that the selectTrack() and unselectTrack() only works for timed text
track at present; 2) the lock is timed text specific
o related-to-bug: 6110705
Change-Id: Ib1feeef2184bc992930ace0d1197b6c00a2636d7
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 06e9468..9115f91 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -235,6 +235,7 @@ private: mutable Mutex mTimedTextLock; sp<WVMExtractor> mWVMExtractor; + sp<MediaExtractor> mExtractor; status_t setDataSource_l( const char *uri, @@ -257,7 +258,7 @@ private: void setVideoSource(sp<MediaSource> source); status_t initVideoDecoder(uint32_t flags = 0); - void addTextSource(const sp<MediaSource>& source); + void addTextSource(size_t trackIndex, const sp<MediaSource>& source); void onStreamDone(); @@ -318,6 +319,14 @@ private: Vector<TrackStat> mTracks; } mStats; + status_t getTrackInfo(Parcel* reply) const; + + // when select is true, the given track is selected. + // otherwise, the given track is unselected. + status_t selectTrack(size_t trackIndex, bool select); + + size_t countTracks() const; + AwesomePlayer(const AwesomePlayer &); AwesomePlayer &operator=(const AwesomePlayer &); }; |