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

Unified Diff: media/filters/decoder_selector.h

Issue 2701203003: media: Prefer decrypting pipeline when CDM is attached (Closed)
Patch Set: comments addressed Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_selector.h
diff --git a/media/filters/decoder_selector.h b/media/filters/decoder_selector.h
index dfd948ef18aaaa9abc747637f561ba11cc73e907..09378b86c113745a5b9cbb6ba0f7b5235665f426 100644
--- a/media/filters/decoder_selector.h
+++ b/media/filters/decoder_selector.h
@@ -37,6 +37,7 @@ class MEDIA_EXPORT DecoderSelector {
public:
typedef DecoderStreamTraits<StreamType> StreamTraits;
typedef typename StreamTraits::DecoderType Decoder;
+ typedef typename StreamTraits::DecoderConfigType DecoderConfig;
// Indicates completion of Decoder selection.
// - First parameter: The initialized Decoder. If it's set to NULL, then
@@ -93,7 +94,11 @@ class MEDIA_EXPORT DecoderSelector {
scoped_refptr<MediaLog> media_log_;
StreamTraits* traits_;
+
+ // Could be the |stream| passed in SelectDecoder, or |decrypted_stream_| when
+ // a DecryptingDemuxerStream is selected.
DemuxerStream* input_stream_;
+
CdmContext* cdm_context_;
SelectDecoderCB select_decoder_cb_;
typename Decoder::OutputCB output_cb_;
@@ -102,6 +107,9 @@ class MEDIA_EXPORT DecoderSelector {
std::unique_ptr<Decoder> decoder_;
std::unique_ptr<DecryptingDemuxerStream> decrypted_stream_;
+ // Config of the |input_stream| used to initialize decoders.
+ DecoderConfig config_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<DecoderSelector> weak_ptr_factory_;
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698