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

Unified Diff: media/filters/audio_renderer_impl.h

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments mostly resolved (I believe); need to add/update tests if this looks good Created 8 years 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/filters/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index 1d716be84d36f00dadfc811ff597309dc814df95..2268e13b17899588e29c9e6ccd9f6634d6e20496 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -29,24 +29,28 @@
#include "media/base/audio_renderer.h"
#include "media/base/audio_renderer_sink.h"
#include "media/base/buffers.h"
+#include "media/base/decryptor.h"
#include "media/filters/audio_renderer_algorithm.h"
namespace media {
+class AudioDecoderSelector;
class AudioSplicer;
+class DecryptingDemuxerStream;
class MEDIA_EXPORT AudioRendererImpl
: public AudioRenderer,
- NON_EXPORTED_BASE(public media::AudioRendererSink::RenderCallback) {
+ NON_EXPORTED_BASE(public AudioRendererSink::RenderCallback) {
public:
// Methods called on Render thread ------------------------------------------
// An AudioRendererSink is used as the destination for the rendered audio.
- explicit AudioRendererImpl(media::AudioRendererSink* sink);
+ explicit AudioRendererImpl(AudioRendererSink* sink);
// Methods called on pipeline thread ----------------------------------------
// AudioRenderer implementation.
virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
const AudioDecoderList& decoders,
+ const SetDecryptorReadyCB& set_decryptor_ready_cb,
const PipelineStatusCB& init_cb,
const StatisticsCB& statistics_cb,
const base::Closure& underflow_cb,
@@ -138,20 +142,22 @@ class MEDIA_EXPORT AudioRendererImpl
// in the kPrerolling state.
bool IsBeforePrerollTime(const scoped_refptr<Buffer>& buffer);
- // Pops the front of |decoders|, assigns it to |decoder_| and then
- // calls initialize on the new decoder.
- void InitializeNextDecoder(const scoped_refptr<DemuxerStream>& demuxer_stream,
- scoped_ptr<AudioDecoderList> decoders);
+ // Called when |decoder_selector_| selected the |selected_decoder|.
+ // |decrypting_demuxer_stream| is also populated if a DecryptingDemuxerStream
+ // created to help decrypt the encrypted stream.
ddorwin 2012/12/13 05:08:25 is/was ...
xhwang 2012/12/13 11:24:36 Done.
+ // |decoder_selector| is passed here to keep the AudioDecoderSelector alive
+ // until OnDecoderSelected() finishes.
+ void OnDecoderSelected(
+ scoped_ptr<AudioDecoderSelector> decoder_selector,
+ const scoped_refptr<AudioDecoder>& selected_decoder,
+ const scoped_refptr<DecryptingDemuxerStream>& decrypting_demuxer_stream);
- // Called when |decoder_| initialization completes.
- // |demuxer_stream| & |decoders| are used if initialization failed and
- // InitializeNextDecoder() needs to be called again.
- void OnDecoderInitDone(const scoped_refptr<DemuxerStream>& demuxer_stream,
- scoped_ptr<AudioDecoderList> decoders,
- PipelineStatus status);
+ // Called when |decrypting_demuxer_stream_| finishes Reset().
+ void OnDecryptingDemuxerStreamReset(const base::Closure& callback);
- // Audio decoder.
+ // These two will be set by AudioDecoderSelector::SelectAudioDecoder().
scoped_refptr<AudioDecoder> decoder_;
+ scoped_refptr<DecryptingDemuxerStream> decrypting_demuxer_stream_;
scoped_ptr<AudioSplicer> splicer_;

Powered by Google App Engine
This is Rietveld 408576698