diff options
author | Min Qin <qinmin@chromium.org> | 2014-11-03 11:03:11 -0800 |
---|---|---|
committer | Min Qin <qinmin@chromium.org> | 2014-11-03 19:04:55 +0000 |
commit | d926ad8c6e3e0d121058ed505dcfd0c3ef9054a4 (patch) | |
tree | 898fa6ffa939597a4ed054179417b3cf33390bd0 /media/base/android/media_decoder_job.h | |
parent | dc683691c9cb0d54039438129b7a99a605f96687 (diff) | |
download | chromium_src-d926ad8c6e3e0d121058ed505dcfd0c3ef9054a4.zip chromium_src-d926ad8c6e3e0d121058ed505dcfd0c3ef9054a4.tar.gz chromium_src-d926ad8c6e3e0d121058ed505dcfd0c3ef9054a4.tar.bz2 |
Send metadata change to renderer after decoder is drained
MediaSourcePlayer sends a metadata change to renderer whenever it receives a config change.
However, the decoder might still be in the draining process when this happens.
To fix this, we should wait for a OUTPUT_FORMAT_CHANGED status before sending out the IPC.
BUG=381975
Review URL: https://codereview.chromium.org/623363002
Cr-Commit-Position: refs/heads/master@{#299338}
(cherry picked from commit 07cdc5cc953f92e8c494375faf5e408f3e04ead9)
Conflicts:
media/base/android/audio_decoder_job.h
media/base/android/media_source_player_unittest.cc
media/base/android/video_decoder_job.h
NOTRY=true
R=qinmin@chromium.org
Review URL: https://codereview.chromium.org/696453003
Cr-Commit-Position: refs/branch-heads/2171@{#332}
Cr-Branched-From: 267aeeb8d85c8503a7fd12bd14654b8ea78d3974-refs/heads/master@{#297060}
Diffstat (limited to 'media/base/android/media_decoder_job.h')
-rw-r--r-- | media/base/android/media_decoder_job.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/media/base/android/media_decoder_job.h b/media/base/android/media_decoder_job.h index 3b5da14..15d9635 100644 --- a/media/base/android/media_decoder_job.h +++ b/media/base/android/media_decoder_job.h @@ -84,9 +84,8 @@ class MediaDecoderJob { // Releases all the decoder resources as the current tab is going background. virtual void ReleaseDecoderResources(); - // Sets the demuxer configs. Returns true if configs has changed, or false - // otherwise. - bool SetDemuxerConfigs(const DemuxerConfigs& configs); + // Sets the demuxer configs. + virtual void SetDemuxerConfigs(const DemuxerConfigs& configs) = 0; // Returns whether the decoder has finished decoding all the data. bool OutputEOSReached() const; @@ -228,13 +227,14 @@ class MediaDecoderJob { virtual bool AreDemuxerConfigsChanged( const DemuxerConfigs& configs) const = 0; - // Updates the demuxer configs. - virtual void UpdateDemuxerConfigs(const DemuxerConfigs& configs) = 0; - // Returns true if |media_codec_bridge_| needs to be reconfigured for the // new DemuxerConfigs, or false otherwise. virtual bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const; + // Update the output format from the decoder, returns true if the output + // format changes, or false otherwise. + virtual bool UpdateOutputFormat(); + // Return the index to |received_data_| that is not currently being decoded. size_t inactive_demuxer_data_index() const { return 1 - current_demuxer_data_index_; |