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

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

Issue 1254293003: MediaCodecPlayer implementation (stage 4 - preroll) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-browserseek
Patch Set: Rebased Created 5 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CODEC_AUDIO_DECODER_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
7 7
8 #include "media/base/android/media_codec_decoder.h" 8 #include "media/base/android/media_codec_decoder.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 12 matching lines...) Expand all
23 const base::Closure& starvation_cb, 23 const base::Closure& starvation_cb,
24 const base::Closure& stop_done_cb, 24 const base::Closure& stop_done_cb,
25 const base::Closure& error_cb, 25 const base::Closure& error_cb,
26 const SetTimeCallback& update_current_time_cb); 26 const SetTimeCallback& update_current_time_cb);
27 ~MediaCodecAudioDecoder() override; 27 ~MediaCodecAudioDecoder() override;
28 28
29 const char* class_name() const override; 29 const char* class_name() const override;
30 30
31 bool HasStream() const override; 31 bool HasStream() const override;
32 void SetDemuxerConfigs(const DemuxerConfigs& configs) override; 32 void SetDemuxerConfigs(const DemuxerConfigs& configs) override;
33 void ReleaseDecoderResources() override;
33 void Flush() override; 34 void Flush() override;
34 35
35 // Sets the volume of the audio output. 36 // Sets the volume of the audio output.
36 void SetVolume(double volume); 37 void SetVolume(double volume);
37 38
38 // Sets the base timestamp for |audio_timestamp_helper_|. 39 // Sets the base timestamp for |audio_timestamp_helper_|.
39 void SetBaseTimestamp(base::TimeDelta base_timestamp); 40 void SetBaseTimestamp(base::TimeDelta base_timestamp);
40 41
41 protected: 42 protected:
42 bool IsCodecReconfigureNeeded(const DemuxerConfigs& curr, 43 bool IsCodecReconfigureNeeded(const DemuxerConfigs& curr,
43 const DemuxerConfigs& next) const override; 44 const DemuxerConfigs& next) const override;
44 ConfigStatus ConfigureInternal() override; 45 ConfigStatus ConfigureInternal() override;
45 void OnOutputFormatChanged() override; 46 void OnOutputFormatChanged() override;
46 void Render(int buffer_index, 47 void Render(int buffer_index,
47 size_t offset, 48 size_t offset,
48 size_t size, 49 size_t size,
49 bool render_output, 50 RenderMode render_mode,
50 base::TimeDelta pts, 51 base::TimeDelta pts,
51 bool eos_encountered) override; 52 bool eos_encountered) override;
52 53
53 private: 54 private:
54 // A helper method to set the volume. 55 // A helper method to set the volume.
55 void SetVolumeInternal(); 56 void SetVolumeInternal();
56 57
57 // Recreates |audio_timestamp_helper_|, called when sampling rate is changed. 58 // Recreates |audio_timestamp_helper_|, called when sampling rate is changed.
58 void ResetTimestampHelper(); 59 void ResetTimestampHelper();
59 60
(...skipping 23 matching lines...) Expand all
83 84
84 // Reports current playback time to the callee. 85 // Reports current playback time to the callee.
85 SetTimeCallback update_current_time_cb_; 86 SetTimeCallback update_current_time_cb_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder); 88 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder);
88 }; 89 };
89 90
90 } // namespace media 91 } // namespace media
91 92
92 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_ 93 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/media_codec_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698