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

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

Issue 893363002: Update {virtual,override,final} to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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
« no previous file with comments | « media/audio/android/opensles_output.h ('k') | media/base/android/media_drm_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_AUDIO_DECODER_JOB_H_ 5 #ifndef MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_
6 #define MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ 6 #define MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "media/base/android/media_decoder_job.h" 12 #include "media/base/android/media_decoder_job.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 class AudioCodecBridge; 16 class AudioCodecBridge;
17 class AudioTimestampHelper; 17 class AudioTimestampHelper;
18 18
19 // Class for managing audio decoding jobs. 19 // Class for managing audio decoding jobs.
20 class AudioDecoderJob : public MediaDecoderJob { 20 class AudioDecoderJob : public MediaDecoderJob {
21 public: 21 public:
22 // Creates a new AudioDecoderJob instance for decoding audio. 22 // Creates a new AudioDecoderJob instance for decoding audio.
23 // |request_data_cb| - Callback used to request more data for the decoder. 23 // |request_data_cb| - Callback used to request more data for the decoder.
24 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that 24 // |on_demuxer_config_changed_cb| - Callback used to inform the caller that
25 // demuxer config has changed. 25 // demuxer config has changed.
26 AudioDecoderJob(const base::Closure& request_data_cb, 26 AudioDecoderJob(const base::Closure& request_data_cb,
27 const base::Closure& on_demuxer_config_changed_cb); 27 const base::Closure& on_demuxer_config_changed_cb);
28 virtual ~AudioDecoderJob(); 28 ~AudioDecoderJob() override;
29 29
30 // MediaDecoderJob implementation. 30 // MediaDecoderJob implementation.
31 virtual bool HasStream() const override; 31 bool HasStream() const override;
32 virtual void Flush() override; 32 void Flush() override;
33 virtual void SetDemuxerConfigs(const DemuxerConfigs& configs) override; 33 void SetDemuxerConfigs(const DemuxerConfigs& configs) override;
34 34
35 // Sets the volume of the audio output. 35 // Sets the volume of the audio output.
36 void SetVolume(double volume); 36 void SetVolume(double volume);
37 37
38 // Sets the base timestamp for |audio_timestamp_helper_|. 38 // Sets the base timestamp for |audio_timestamp_helper_|.
39 void SetBaseTimestamp(base::TimeDelta base_timestamp); 39 void SetBaseTimestamp(base::TimeDelta base_timestamp);
40 40
41 private: 41 private:
42 // MediaDecoderJob implementation. 42 // MediaDecoderJob implementation.
43 virtual void ReleaseOutputBuffer( 43 void ReleaseOutputBuffer(
44 int output_buffer_index, 44 int output_buffer_index,
45 size_t size, 45 size_t size,
46 bool render_output, 46 bool render_output,
47 base::TimeDelta current_presentation_timestamp, 47 base::TimeDelta current_presentation_timestamp,
48 const ReleaseOutputCompletionCallback& callback) override; 48 const ReleaseOutputCompletionCallback& callback) override;
49 virtual bool ComputeTimeToRender() const override; 49 bool ComputeTimeToRender() const override;
50 virtual bool AreDemuxerConfigsChanged( 50 bool AreDemuxerConfigsChanged(const DemuxerConfigs& configs) const override;
51 const DemuxerConfigs& configs) const override; 51 MediaDecoderJobStatus CreateMediaCodecBridgeInternal() override;
52 virtual MediaDecoderJobStatus CreateMediaCodecBridgeInternal() override; 52 void OnOutputFormatChanged() override;
53 virtual void OnOutputFormatChanged() override;
54 53
55 // Helper method to set the audio output volume. 54 // Helper method to set the audio output volume.
56 void SetVolumeInternal(); 55 void SetVolumeInternal();
57 56
58 void ResetTimestampHelper(); 57 void ResetTimestampHelper();
59 58
60 // Audio configs from the demuxer. 59 // Audio configs from the demuxer.
61 AudioCodec audio_codec_; 60 AudioCodec audio_codec_;
62 int num_channels_; 61 int num_channels_;
63 int config_sampling_rate_; 62 int config_sampling_rate_;
(...skipping 12 matching lines...) Expand all
76 75
77 // Object to calculate the current audio timestamp for A/V sync. 76 // Object to calculate the current audio timestamp for A/V sync.
78 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_; 77 scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_;
79 78
80 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob); 79 DISALLOW_COPY_AND_ASSIGN(AudioDecoderJob);
81 }; 80 };
82 81
83 } // namespace media 82 } // namespace media
84 83
85 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_ 84 #endif // MEDIA_BASE_ANDROID_AUDIO_DECODER_JOB_H_
OLDNEW
« no previous file with comments | « media/audio/android/opensles_output.h ('k') | media/base/android/media_drm_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698