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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 15 matching lines...) Expand all
26 class MediaLog; 26 class MediaLog;
27 27
28 // Decryptor-based VideoDecoder implementation that can decrypt and decode 28 // Decryptor-based VideoDecoder implementation that can decrypt and decode
29 // encrypted video buffers and return decrypted and decompressed video frames. 29 // encrypted video buffers and return decrypted and decompressed video frames.
30 // All public APIs and callbacks are trampolined to the |task_runner_| so 30 // All public APIs and callbacks are trampolined to the |task_runner_| so
31 // that no locks are required for thread safety. 31 // that no locks are required for thread safety.
32 class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder { 32 class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
33 public: 33 public:
34 DecryptingVideoDecoder( 34 DecryptingVideoDecoder(
35 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 35 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
36 const scoped_refptr<MediaLog>& media_log, 36 MediaLog* media_log,
37 const base::Closure& waiting_for_decryption_key_cb); 37 const base::Closure& waiting_for_decryption_key_cb);
38 ~DecryptingVideoDecoder() override; 38 ~DecryptingVideoDecoder() override;
39 39
40 // VideoDecoder implementation. 40 // VideoDecoder implementation.
41 std::string GetDisplayName() const override; 41 std::string GetDisplayName() const override;
42 void Initialize(const VideoDecoderConfig& config, 42 void Initialize(const VideoDecoderConfig& config,
43 bool low_delay, 43 bool low_delay,
44 CdmContext* cdm_context, 44 CdmContext* cdm_context,
45 const InitCB& init_cb, 45 const InitCB& init_cb,
46 const OutputCB& output_cb) override; 46 const OutputCB& output_cb) override;
(...skipping 29 matching lines...) Expand all
76 76
77 // Callback for the |decryptor_| to notify this object that a new key has been 77 // Callback for the |decryptor_| to notify this object that a new key has been
78 // added. 78 // added.
79 void OnKeyAdded(); 79 void OnKeyAdded();
80 80
81 // Reset decoder and call |reset_cb_|. 81 // Reset decoder and call |reset_cb_|.
82 void DoReset(); 82 void DoReset();
83 83
84 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 84 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
85 85
86 scoped_refptr<MediaLog> media_log_; 86 MediaLog* media_log_;
87 87
88 State state_; 88 State state_;
89 89
90 InitCB init_cb_; 90 InitCB init_cb_;
91 OutputCB output_cb_; 91 OutputCB output_cb_;
92 DecodeCB decode_cb_; 92 DecodeCB decode_cb_;
93 base::Closure reset_cb_; 93 base::Closure reset_cb_;
94 base::Closure waiting_for_decryption_key_cb_; 94 base::Closure waiting_for_decryption_key_cb_;
95 95
96 VideoDecoderConfig config_; 96 VideoDecoderConfig config_;
(...skipping 16 matching lines...) Expand all
113 113
114 base::WeakPtr<DecryptingVideoDecoder> weak_this_; 114 base::WeakPtr<DecryptingVideoDecoder> weak_this_;
115 base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_; 115 base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder); 117 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder);
118 }; 118 };
119 119
120 } // namespace media 120 } // namespace media
121 121
122 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ 122 #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