Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Unified Diff: media/base/android/audio_decoder_job.cc

Issue 623363002: Send metadata change to renderer after decoder is drained (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/android/audio_decoder_job.cc
diff --git a/media/base/android/audio_decoder_job.cc b/media/base/android/audio_decoder_job.cc
index cb882cee42e1a8938fe8e462d7934a9af5a4adb9..e3769200abd473e9981a29ca680ed795ae1baf6b 100644
--- a/media/base/android/audio_decoder_job.cc
+++ b/media/base/android/audio_decoder_job.cc
@@ -51,6 +51,17 @@ bool AudioDecoderJob::HasStream() const {
return audio_codec_ != kUnknownAudioCodec;
}
+void AudioDecoderJob::SetDemuxerConfigs(const DemuxerConfigs& configs) {
+ // TODO(qinmin): split DemuxerConfig for audio and video separately so we
+ // can simply store the stucture here.
+ audio_codec_ = configs.audio_codec;
+ num_channels_ = configs.audio_channels;
+ sampling_rate_ = configs.audio_sampling_rate;
+ set_is_content_encrypted(configs.is_audio_encrypted);
+ audio_extra_data_ = configs.audio_extra_data;
+ bytes_per_frame_ = kBytesPerAudioOutputSample * num_channels_;
+}
+
void AudioDecoderJob::SetVolume(double volume) {
volume_ = volume;
SetVolumeInternal();
@@ -94,17 +105,6 @@ bool AudioDecoderJob::ComputeTimeToRender() const {
return false;
}
-void AudioDecoderJob::UpdateDemuxerConfigs(const DemuxerConfigs& configs) {
- // TODO(qinmin): split DemuxerConfig for audio and video separately so we
- // can simply store the stucture here.
- audio_codec_ = configs.audio_codec;
- num_channels_ = configs.audio_channels;
- sampling_rate_ = configs.audio_sampling_rate;
- set_is_content_encrypted(configs.is_audio_encrypted);
- audio_extra_data_ = configs.audio_extra_data;
- bytes_per_frame_ = kBytesPerAudioOutputSample * num_channels_;
-}
-
bool AudioDecoderJob::AreDemuxerConfigsChanged(
const DemuxerConfigs& configs) const {
return audio_codec_ != configs.audio_codec ||

Powered by Google App Engine
This is Rietveld 408576698