diff options
author | Andreas Huber <andih@google.com> | 2010-03-05 10:42:10 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-03-05 10:42:10 -0800 |
commit | 3ac94efc21c9dbcdf83ab2c630ab35dce229c9dc (patch) | |
tree | 6da0f5c50b8fff67b976c07fe98d7f7f0087aa4d /media/libstagefright/include | |
parent | e354bba55dd31e2c66424091fe4bfd68ae19274e (diff) | |
download | frameworks_base-3ac94efc21c9dbcdf83ab2c630ab35dce229c9dc.zip frameworks_base-3ac94efc21c9dbcdf83ab2c630ab35dce229c9dc.tar.gz frameworks_base-3ac94efc21c9dbcdf83ab2c630ab35dce229c9dc.tar.bz2 |
Instead of allocating the decoder instances in response to a call to setDataSource, postpone allocation to the preparation phase where it belongs.
related-to-bug: 2492205
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 3590987..7106524 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -112,10 +112,12 @@ private: sp<DataSource> mFileSource; + sp<MediaSource> mVideoTrack; sp<MediaSource> mVideoSource; sp<AwesomeRenderer> mVideoRenderer; bool mVideoRendererIsPreview; + sp<MediaSource> mAudioTrack; sp<MediaSource> mAudioSource; AudioPlayer *mAudioPlayer; int64_t mDurationUs; @@ -199,8 +201,11 @@ private: void cancelPlayerEvents(bool keepBufferingGoing = false); - status_t setAudioSource(sp<MediaSource> source); - status_t setVideoSource(sp<MediaSource> source); + void setAudioSource(sp<MediaSource> source); + status_t initAudioDecoder(); + + void setVideoSource(sp<MediaSource> source); + status_t initVideoDecoder(); void onStreamDone(); @@ -210,6 +215,8 @@ private: void onBufferingUpdate(); void onCheckAudioStatus(); void onPrepareAsyncEvent(); + void abortPrepare(status_t err); + status_t finishSetDataSource_l(); AwesomePlayer(const AwesomePlayer &); |