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

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

Issue 1442933002: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors Created 5 years, 1 month 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 (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_DEMUXER_STREAM_H_ 5 #ifndef MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_
6 #define MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ 6 #define MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_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 "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // Decryptor-based DemuxerStream implementation that converts a potentially 27 // Decryptor-based DemuxerStream implementation that converts a potentially
28 // encrypted demuxer stream to a clear demuxer stream. 28 // encrypted demuxer stream to a clear demuxer stream.
29 // All public APIs and callbacks are trampolined to the |task_runner_| so 29 // All public APIs and callbacks are trampolined to the |task_runner_| so
30 // that no locks are required for thread safety. 30 // that no locks are required for thread safety.
31 class MEDIA_EXPORT DecryptingDemuxerStream : public DemuxerStream { 31 class MEDIA_EXPORT DecryptingDemuxerStream : public DemuxerStream {
32 public: 32 public:
33 DecryptingDemuxerStream( 33 DecryptingDemuxerStream(
34 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 34 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
35 const scoped_refptr<MediaLog>& media_log, 35 const scoped_refptr<MediaLog>& media_log,
36 const SetCdmReadyCB& set_cdm_ready_cb,
37 const base::Closure& waiting_for_decryption_key_cb); 36 const base::Closure& waiting_for_decryption_key_cb);
38 37
39 // Cancels all pending operations immediately and fires all pending callbacks. 38 // Cancels all pending operations immediately and fires all pending callbacks.
40 ~DecryptingDemuxerStream() override; 39 ~DecryptingDemuxerStream() override;
41 40
42 void Initialize(DemuxerStream* stream, const PipelineStatusCB& status_cb); 41 void Initialize(DemuxerStream* stream,
42 const SetCdmReadyCB& set_cdm_ready_cb,
43 const PipelineStatusCB& status_cb);
43 44
44 // Cancels all pending operations and fires all pending callbacks. If in 45 // Cancels all pending operations and fires all pending callbacks. If in
45 // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending 46 // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending
46 // operation to finish before satisfying |closure|. Sets the state to 47 // operation to finish before satisfying |closure|. Sets the state to
47 // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise. 48 // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise.
48 void Reset(const base::Closure& closure); 49 void Reset(const base::Closure& closure);
49 50
50 // Returns the name of this class for logging purpose. 51 // Returns the name of this class for logging purpose.
51 std::string GetDisplayName() const; 52 std::string GetDisplayName() const;
52 53
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 base::WeakPtr<DecryptingDemuxerStream> weak_this_; 137 base::WeakPtr<DecryptingDemuxerStream> weak_this_;
137 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; 138 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_;
138 139
139 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); 140 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream);
140 }; 141 };
141 142
142 } // namespace media 143 } // namespace media
143 144
144 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ 145 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_
OLDNEW
« no previous file with comments | « media/filters/decrypting_audio_decoder_unittest.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698