diff options
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 17 | ||||
-rw-r--r-- | media/libstagefright/include/ESDS.h | 6 |
2 files changed, 21 insertions, 2 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 2306f31..0d17d65 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -25,6 +25,7 @@ #include <media/stagefright/DataSource.h> #include <media/stagefright/OMXClient.h> #include <media/stagefright/TimeSource.h> +#include <media/stagefright/MetaData.h> #include <utils/threads.h> #include <drm/DrmManagerClient.h> @@ -100,7 +101,7 @@ struct AwesomePlayer { void postAudioEOS(int64_t delayUs = 0ll); void postAudioSeekComplete(); - + void postAudioTearDown(); status_t dump(int fd, const Vector<String16> &args) const; private: @@ -171,6 +172,7 @@ private: ssize_t mActiveAudioTrackIndex; sp<MediaSource> mAudioTrack; + sp<MediaSource> mOmxSource; sp<MediaSource> mAudioSource; AudioPlayer *mAudioPlayer; int64_t mDurationUs; @@ -211,7 +213,8 @@ private: bool mAudioStatusEventPending; sp<TimedEventQueue::Event> mVideoLagEvent; bool mVideoLagEventPending; - + sp<TimedEventQueue::Event> mAudioTearDownEvent; + bool mAudioTearDownEventPending; sp<TimedEventQueue::Event> mAsyncPrepareEvent; Condition mPreparedCondition; bool mIsAsyncPrepare; @@ -223,6 +226,8 @@ private: void postStreamDoneEvent_l(status_t status); void postCheckAudioStatusEvent(int64_t delayUs); void postVideoLagEvent_l(); + void postAudioTearDownEvent(); + status_t play_l(); MediaBuffer *mVideoBuffer; @@ -257,6 +262,7 @@ private: void setAudioSource(sp<MediaSource> source); status_t initAudioDecoder(); + void setVideoSource(sp<MediaSource> source); status_t initVideoDecoder(uint32_t flags = 0); @@ -273,6 +279,9 @@ private: void abortPrepare(status_t err); void finishAsyncPrepare_l(); void onVideoLagUpdate(); + void onAudioTearDownEvent(); + + void beginPrepareAsync_l(); bool getCachedDuration_l(int64_t *durationUs, bool *eos); @@ -285,6 +294,7 @@ private: void finishSeekIfNecessary(int64_t videoTimeUs); void ensureCacheIsFetching_l(); + void createAudioPlayer_l(); status_t startAudioPlayer_l(bool sendErrorNotification = true); void shutdownVideoDecoder_l(); @@ -327,6 +337,9 @@ private: Vector<TrackStat> mTracks; } mStats; + bool mOffloadAudio; + bool mAudioTearDown; + status_t setVideoScalingMode(int32_t mode); status_t setVideoScalingMode_l(int32_t mode); status_t getTrackInfo(Parcel* reply) const; diff --git a/media/libstagefright/include/ESDS.h b/media/libstagefright/include/ESDS.h index 3a79951..2f40dae 100644 --- a/media/libstagefright/include/ESDS.h +++ b/media/libstagefright/include/ESDS.h @@ -33,6 +33,9 @@ public: status_t getObjectTypeIndication(uint8_t *objectTypeIndication) const; status_t getCodecSpecificInfo(const void **data, size_t *size) const; + status_t getCodecSpecificOffset(size_t *offset, size_t *size) const; + status_t getBitRate(uint32_t *brateMax, uint32_t *brateAvg) const; + status_t getStreamType(uint8_t *streamType) const; private: enum { @@ -49,6 +52,9 @@ private: size_t mDecoderSpecificOffset; size_t mDecoderSpecificLength; uint8_t mObjectTypeIndication; + uint8_t mStreamType; + uint32_t mBitRateMax; + uint32_t mBitRateAvg; status_t skipDescriptorHeader( size_t offset, size_t size, |