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

Side by Side Diff: media/base/android/media_decoder_job.h

Issue 805273007: Android: Propagate sample rate change to audio decoder job (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved UpdateOutput() back to original location Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 // Returns true if the |configs| doesn't match the current demuxer configs 225 // Returns true if the |configs| doesn't match the current demuxer configs
226 // the decoder job has. 226 // the decoder job has.
227 virtual bool AreDemuxerConfigsChanged( 227 virtual bool AreDemuxerConfigsChanged(
228 const DemuxerConfigs& configs) const = 0; 228 const DemuxerConfigs& configs) const = 0;
229 229
230 // Returns true if |media_codec_bridge_| needs to be reconfigured for the 230 // Returns true if |media_codec_bridge_| needs to be reconfigured for the
231 // new DemuxerConfigs, or false otherwise. 231 // new DemuxerConfigs, or false otherwise.
232 virtual bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const; 232 virtual bool IsCodecReconfigureNeeded(const DemuxerConfigs& configs) const;
233 233
234 // Update the output format from the decoder, returns true if the output 234 // Update the output format from the decoder. Runs |config_changed_cb| only if
235 // format changes, or false otherwise. 235 // format actually changes and there are no errors. Returns false on error,
236 virtual bool UpdateOutputFormat(); 236 // true otherwise
237 virtual bool UpdateOutputFormat(const base::Closure& config_changed_cb) = 0;
237 238
238 // Return the index to |received_data_| that is not currently being decoded. 239 // Return the index to |received_data_| that is not currently being decoded.
239 size_t inactive_demuxer_data_index() const { 240 size_t inactive_demuxer_data_index() const {
240 return 1 - current_demuxer_data_index_; 241 return 1 - current_demuxer_data_index_;
241 } 242 }
242 243
243 // The UI message loop where callbacks should be dispatched. 244 // The UI message loop where callbacks should be dispatched.
244 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 245 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
245 246
246 // The task runner that decoder job runs on. 247 // The task runner that decoder job runs on.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // This access unit is passed to the decoder during config changes to drain 339 // This access unit is passed to the decoder during config changes to drain
339 // the decoder. 340 // the decoder.
340 AccessUnit eos_unit_; 341 AccessUnit eos_unit_;
341 342
342 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); 343 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob);
343 }; 344 };
344 345
345 } // namespace media 346 } // namespace media
346 347
347 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ 348 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698