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

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

Issue 1447533006: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "media/base/cdm_context.h" 10 #include "media/base/cdm_context.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Decryptor-based VideoDecoder implementation that can decrypt and decode 25 // Decryptor-based VideoDecoder implementation that can decrypt and decode
26 // encrypted video buffers and return decrypted and decompressed video frames. 26 // encrypted video buffers and return decrypted and decompressed video frames.
27 // All public APIs and callbacks are trampolined to the |task_runner_| so 27 // All public APIs and callbacks are trampolined to the |task_runner_| so
28 // that no locks are required for thread safety. 28 // that no locks are required for thread safety.
29 class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder { 29 class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
30 public: 30 public:
31 DecryptingVideoDecoder( 31 DecryptingVideoDecoder(
32 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 32 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
33 const scoped_refptr<MediaLog>& media_log, 33 const scoped_refptr<MediaLog>& media_log,
34 const SetCdmReadyCB& set_cdm_ready_cb,
35 const base::Closure& waiting_for_decryption_key_cb); 34 const base::Closure& waiting_for_decryption_key_cb);
36 ~DecryptingVideoDecoder() override; 35 ~DecryptingVideoDecoder() override;
37 36
38 // VideoDecoder implementation. 37 // VideoDecoder implementation.
39 std::string GetDisplayName() const override; 38 std::string GetDisplayName() const override;
40 void Initialize(const VideoDecoderConfig& config, 39 void Initialize(const VideoDecoderConfig& config,
41 bool low_delay, 40 bool low_delay,
41 const SetCdmReadyCB& set_cdm_ready_cb,
42 const InitCB& init_cb, 42 const InitCB& init_cb,
43 const OutputCB& output_cb) override; 43 const OutputCB& output_cb) override;
44 void Decode(const scoped_refptr<DecoderBuffer>& buffer, 44 void Decode(const scoped_refptr<DecoderBuffer>& buffer,
45 const DecodeCB& decode_cb) override; 45 const DecodeCB& decode_cb) override;
46 void Reset(const base::Closure& closure) override; 46 void Reset(const base::Closure& closure) override;
47 47
48 static const char kDecoderName[]; 48 static const char kDecoderName[];
49 49
50 private: 50 private:
51 // For a detailed state diagram please see this link: http://goo.gl/8jAok 51 // For a detailed state diagram please see this link: http://goo.gl/8jAok
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 base::WeakPtr<DecryptingVideoDecoder> weak_this_; 119 base::WeakPtr<DecryptingVideoDecoder> weak_this_;
120 base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_; 120 base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder); 122 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder);
123 }; 123 };
124 124
125 } // namespace media 125 } // namespace media
126 126
127 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ 127 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/decrypting_demuxer_stream_unittest.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698