Index: media/filters/decoder_selector.h |
diff --git a/media/filters/decoder_selector.h b/media/filters/decoder_selector.h |
index d0da9245a2e55dc1fe0833a84dd8ae5652300e3e..712d03977266accfb2f08ab708d41fc254d6b34f 100644 |
--- a/media/filters/decoder_selector.h |
+++ b/media/filters/decoder_selector.h |
@@ -11,7 +11,6 @@ |
#include "base/memory/scoped_vector.h" |
#include "base/memory/weak_ptr.h" |
#include "build/build_config.h" |
-#include "media/base/cdm_context.h" |
#include "media/base/demuxer_stream.h" |
#include "media/base/pipeline_status.h" |
#include "media/filters/decoder_stream_traits.h" |
@@ -22,6 +21,7 @@ class SingleThreadTaskRunner; |
namespace media { |
+class CdmContext; |
class DecoderBuffer; |
class DecryptingDemuxerStream; |
class MediaLog; |
@@ -68,10 +68,10 @@ class MEDIA_EXPORT DecoderSelector { |
// 1. This must not be called again before |select_decoder_cb| is run. |
// 2. Decoders that fail to initialize will be deleted. Future calls will |
// select from the decoders following the decoder that was last returned. |
- // 3. |set_cdm_ready_cb| is optional. If |set_cdm_ready_cb| is |
+ // 3. |cdm_context| is optional. If |cdm_context| is |
// null, no CDM will be available to perform decryption. |
void SelectDecoder(DemuxerStream* stream, |
- const SetCdmReadyCB& set_cdm_ready_cb, |
+ CdmContext* cdm_context, |
const SelectDecoderCB& select_decoder_cb, |
const typename Decoder::OutputCB& output_cb, |
const base::Closure& waiting_for_decryption_key_cb); |
@@ -81,6 +81,13 @@ class MEDIA_EXPORT DecoderSelector { |
void InitializeDecryptingDecoder(); |
void DecryptingDecoderInitDone(bool success); |
#endif |
+ |
+ // Requests that this object notifies when a CDM is ready through the |
+ // |cdm_ready_cb| provided. |
+ // TODO(xhwang): Remove after DecryptingDemuxerStream::Initialize() is fixed |
+ // to take |cdm_context_| directly. |
+ void SetCdmReadyCallback(const CdmReadyCB& cdm_ready_cb); |
+ |
void InitializeDecryptingDemuxerStream(); |
void DecryptingDemuxerStreamInitDone(PipelineStatus status); |
void InitializeDecoder(); |
@@ -92,7 +99,7 @@ class MEDIA_EXPORT DecoderSelector { |
scoped_refptr<MediaLog> media_log_; |
DemuxerStream* input_stream_; |
- SetCdmReadyCB set_cdm_ready_cb_; |
+ CdmContext* cdm_context_; |
SelectDecoderCB select_decoder_cb_; |
typename Decoder::OutputCB output_cb_; |
base::Closure waiting_for_decryption_key_cb_; |