diff options
author | James Dong <jdong@google.com> | 2012-04-26 17:11:28 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2012-05-14 14:06:50 -0700 |
commit | ab7a2e544643edcb2e09ed5f204580afd763edc1 (patch) | |
tree | 8cc651013168e8d5d5373d74f2b73025f847bad9 /media/libstagefright/include | |
parent | 94f60e297b9e45fac387cf10b6ce1acc067cb4a1 (diff) | |
download | frameworks_av-ab7a2e544643edcb2e09ed5f204580afd763edc1.zip frameworks_av-ab7a2e544643edcb2e09ed5f204580afd763edc1.tar.gz frameworks_av-ab7a2e544643edcb2e09ed5f204580afd763edc1.tar.bz2 |
Switch audio tracks at runtime
o The switching is not allowed if there is an audio seek operation ongoing.
o related-to-bug: 6110705
Change-Id: Ib92a165f3984aa033d97800184d3d17319522db5
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 909654a..68380a8 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -168,6 +168,7 @@ private: sp<AwesomeRenderer> mVideoRenderer; bool mVideoRendererIsPreview; + ssize_t mActiveAudioTrackIndex; sp<MediaSource> mAudioTrack; sp<MediaSource> mAudioSource; AudioPlayer *mAudioPlayer; @@ -309,8 +310,14 @@ private: int mFd; String8 mURI; int64_t mBitrate; + + // FIXME: + // These two indices are just 0 or 1 for now + // They are not representing the actual track + // indices in the stream. ssize_t mAudioTrackIndex; ssize_t mVideoTrackIndex; + int64_t mNumVideoFramesDecoded; int64_t mNumVideoFramesDropped; int32_t mVideoWidth; @@ -323,6 +330,8 @@ private: status_t setVideoScalingMode_l(int32_t mode); status_t getTrackInfo(Parcel* reply) const; + status_t selectAudioTrack_l(const sp<MediaSource>& source, size_t trackIndex); + // when select is true, the given track is selected. // otherwise, the given track is unselected. status_t selectTrack(size_t trackIndex, bool select); |