diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 20:01:23 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 20:01:23 +0000 |
commit | 61c366758c40e380efec5af0750767830d6ddda1 (patch) | |
tree | 2e2c52a25b54e3f681a260f5f83389e2b098406a /media | |
parent | 466af5e50e2feda27571f593ce060e8061bd5a96 (diff) | |
download | chromium_src-61c366758c40e380efec5af0750767830d6ddda1.zip chromium_src-61c366758c40e380efec5af0750767830d6ddda1.tar.gz chromium_src-61c366758c40e380efec5af0750767830d6ddda1.tar.bz2 |
Move AccessUnit out of MediaPlayerHostMsg_ReadFromDemuxerAck_Params.
This avoids super long type names in several places.
TBR=jschuh@chromium.org
BUG=233420
TEST=This CL doesn't affect any functionality.
Review URL: https://chromiumcodereview.appspot.com/20839003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/base/android/demuxer_stream_player_params.cc | 9 | ||||
-rw-r--r-- | media/base/android/demuxer_stream_player_params.h | 28 | ||||
-rw-r--r-- | media/base/android/media_source_player.cc | 6 | ||||
-rw-r--r-- | media/base/android/media_source_player.h | 23 |
4 files changed, 31 insertions, 35 deletions
diff --git a/media/base/android/demuxer_stream_player_params.cc b/media/base/android/demuxer_stream_player_params.cc index 3ed1a8c..827be11 100644 --- a/media/base/android/demuxer_stream_player_params.cc +++ b/media/base/android/demuxer_stream_player_params.cc @@ -19,6 +19,10 @@ MediaPlayerHostMsg_DemuxerReady_Params:: MediaPlayerHostMsg_DemuxerReady_Params:: ~MediaPlayerHostMsg_DemuxerReady_Params() {} +AccessUnit::AccessUnit() : end_of_stream(false) {} + +AccessUnit::~AccessUnit() {} + MediaPlayerHostMsg_ReadFromDemuxerAck_Params:: MediaPlayerHostMsg_ReadFromDemuxerAck_Params() : type(DemuxerStream::UNKNOWN) {} @@ -26,9 +30,4 @@ MediaPlayerHostMsg_ReadFromDemuxerAck_Params:: MediaPlayerHostMsg_ReadFromDemuxerAck_Params:: ~MediaPlayerHostMsg_ReadFromDemuxerAck_Params() {} -MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit::AccessUnit() - : end_of_stream(false) {} - -MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit::~AccessUnit() {} - } // namespace media diff --git a/media/base/android/demuxer_stream_player_params.h b/media/base/android/demuxer_stream_player_params.h index 585af2b..a9fb052 100644 --- a/media/base/android/demuxer_stream_player_params.h +++ b/media/base/android/demuxer_stream_player_params.h @@ -36,21 +36,21 @@ struct MEDIA_EXPORT MediaPlayerHostMsg_DemuxerReady_Params { std::string key_system; }; -struct MEDIA_EXPORT MediaPlayerHostMsg_ReadFromDemuxerAck_Params { - struct MEDIA_EXPORT AccessUnit { - AccessUnit(); - ~AccessUnit(); - - DemuxerStream::Status status; - bool end_of_stream; - // TODO(ycheo): Use the shared memory to transfer the block data. - std::vector<uint8> data; - base::TimeDelta timestamp; - std::vector<char> key_id; - std::vector<char> iv; - std::vector<media::SubsampleEntry> subsamples; - }; +struct MEDIA_EXPORT AccessUnit { + AccessUnit(); + ~AccessUnit(); + + DemuxerStream::Status status; + bool end_of_stream; + // TODO(ycheo): Use the shared memory to transfer the block data. + std::vector<uint8> data; + base::TimeDelta timestamp; + std::vector<char> key_id; + std::vector<char> iv; + std::vector<media::SubsampleEntry> subsamples; +}; +struct MEDIA_EXPORT MediaPlayerHostMsg_ReadFromDemuxerAck_Params { MediaPlayerHostMsg_ReadFromDemuxerAck_Params(); ~MediaPlayerHostMsg_ReadFromDemuxerAck_Params(); diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc index d5d2ba2..8fa7be5 100644 --- a/media/base/android/media_source_player.cc +++ b/media/base/android/media_source_player.cc @@ -100,7 +100,7 @@ class VideoDecoderJob : public MediaDecoderJob { }; void MediaDecoderJob::Decode( - const MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit& unit, + const AccessUnit& unit, const base::TimeTicks& start_time_ticks, const base::TimeDelta& start_presentation_timestamp, const MediaDecoderJob::DecoderCallback& callback) { @@ -115,7 +115,7 @@ void MediaDecoderJob::Decode( } MediaDecoderJob::DecodeStatus MediaDecoderJob::QueueInputBuffer( - const MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit& unit) { + const AccessUnit& unit) { base::TimeDelta timeout = base::TimeDelta::FromMilliseconds( kMediaCodecTimeoutInMilliseconds); int input_buf_index = media_codec_bridge_->DequeueInputBuffer(timeout); @@ -148,7 +148,7 @@ MediaDecoderJob::DecodeStatus MediaDecoderJob::QueueInputBuffer( } void MediaDecoderJob::DecodeInternal( - const MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit& unit, + const AccessUnit& unit, const base::TimeTicks& start_time_ticks, const base::TimeDelta& start_presentation_timestamp, bool needs_flush, diff --git a/media/base/android/media_source_player.h b/media/base/android/media_source_player.h index f493f33..ad29fac 100644 --- a/media/base/android/media_source_player.h +++ b/media/base/android/media_source_player.h @@ -55,11 +55,10 @@ class MediaDecoderJob { size_t)> DecoderCallback; // Called by MediaSourcePlayer to decode some data. - void Decode( - const MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit& unit, - const base::TimeTicks& start_time_ticks, - const base::TimeDelta& start_presentation_timestamp, - const MediaDecoderJob::DecoderCallback& callback); + void Decode(const AccessUnit& unit, + const base::TimeTicks& start_time_ticks, + const base::TimeDelta& start_presentation_timestamp, + const MediaDecoderJob::DecoderCallback& callback); // Flush the decoder. void Flush(); @@ -87,8 +86,7 @@ class MediaDecoderJob { const base::TimeDelta& presentation_timestamp, const MediaDecoderJob::DecoderCallback& callback, DecodeStatus status); - DecodeStatus QueueInputBuffer( - const MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit& unit); + DecodeStatus QueueInputBuffer(const AccessUnit& unit); // Helper function to decoder data on |thread_|. |unit| contains all the data // to be decoded. |start_time_ticks| and |start_presentation_timestamp| @@ -96,12 +94,11 @@ class MediaDecoderJob { // frame is rendered. We use these information to estimate when the current // frame should be rendered. If |needs_flush| is true, codec needs to be // flushed at the beginning of this call. - void DecodeInternal( - const MediaPlayerHostMsg_ReadFromDemuxerAck_Params::AccessUnit& unit, - const base::TimeTicks& start_time_ticks, - const base::TimeDelta& start_presentation_timestamp, - bool needs_flush, - const MediaDecoderJob::DecoderCallback& callback); + void DecodeInternal(const AccessUnit& unit, + const base::TimeTicks& start_time_ticks, + const base::TimeDelta& start_presentation_timestamp, + bool needs_flush, + const MediaDecoderJob::DecoderCallback& callback); // The UI message loop where callbacks should be dispatched. scoped_refptr<base::MessageLoopProxy> ui_loop_; |