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

Side by Side Diff: media/filters/decrypting_audio_decoder.h

Issue 11824066: Encrypted Media: Update config/state after config changed in DecryptingAudioDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename SetAudioConfig to UpdateAudioConfig Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/decrypting_audio_decoder.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_FILTERS_DECRYPTING_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/audio_decoder.h" 10 #include "media/base/audio_decoder.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 Decryptor::Status status, 95 Decryptor::Status status,
96 const Decryptor::AudioBuffers& frames); 96 const Decryptor::AudioBuffers& frames);
97 97
98 // Callback for the |decryptor_| to notify this object that a new key has been 98 // Callback for the |decryptor_| to notify this object that a new key has been
99 // added. 99 // added.
100 void OnKeyAdded(); 100 void OnKeyAdded();
101 101
102 // Resets decoder and calls |reset_cb_|. 102 // Resets decoder and calls |reset_cb_|.
103 void DoReset(); 103 void DoReset();
104 104
105 // Updates audio configs from |demuxer_stream_| and resets
106 // |output_timestamp_base_| and |total_samples_decoded_|.
107 void UpdateDecoderConfig();
108
105 // Sets timestamp and duration for |queued_audio_frames_| to make sure the 109 // Sets timestamp and duration for |queued_audio_frames_| to make sure the
106 // renderer always receives continuous frames without gaps and overlaps. 110 // renderer always receives continuous frames without gaps and overlaps.
107 void EnqueueFrames(const Decryptor::AudioBuffers& frames); 111 void EnqueueFrames(const Decryptor::AudioBuffers& frames);
108 112
109 // Converts number of samples to duration. 113 // Converts number of samples to duration.
110 base::TimeDelta NumberOfSamplesToDuration(int number_of_samples) const; 114 base::TimeDelta NumberOfSamplesToDuration(int number_of_samples) const;
111 115
112 scoped_refptr<base::MessageLoopProxy> message_loop_; 116 scoped_refptr<base::MessageLoopProxy> message_loop_;
113 117
114 State state_; 118 State state_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 151
148 base::TimeDelta output_timestamp_base_; 152 base::TimeDelta output_timestamp_base_;
149 int total_samples_decoded_; 153 int total_samples_decoded_;
150 154
151 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); 155 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder);
152 }; 156 };
153 157
154 } // namespace media 158 } // namespace media
155 159
156 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ 160 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698