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

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

Issue 1143223007: media: Reland "Simplify {Audio|Video}Decoder initialization callback." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 "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/decryptor.h" 10 #include "media/base/decryptor.h"
(...skipping 18 matching lines...) Expand all
29 DecryptingVideoDecoder( 29 DecryptingVideoDecoder(
30 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 30 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
31 const SetDecryptorReadyCB& set_decryptor_ready_cb, 31 const SetDecryptorReadyCB& set_decryptor_ready_cb,
32 const base::Closure& waiting_for_decryption_key_cb); 32 const base::Closure& waiting_for_decryption_key_cb);
33 ~DecryptingVideoDecoder() override; 33 ~DecryptingVideoDecoder() override;
34 34
35 // VideoDecoder implementation. 35 // VideoDecoder implementation.
36 std::string GetDisplayName() const override; 36 std::string GetDisplayName() const override;
37 void Initialize(const VideoDecoderConfig& config, 37 void Initialize(const VideoDecoderConfig& config,
38 bool low_delay, 38 bool low_delay,
39 const PipelineStatusCB& status_cb, 39 const InitCB& init_cb,
40 const OutputCB& output_cb) override; 40 const OutputCB& output_cb) override;
41 void Decode(const scoped_refptr<DecoderBuffer>& buffer, 41 void Decode(const scoped_refptr<DecoderBuffer>& buffer,
42 const DecodeCB& decode_cb) override; 42 const DecodeCB& decode_cb) override;
43 void Reset(const base::Closure& closure) override; 43 void Reset(const base::Closure& closure) override;
44 44
45 static const char kDecoderName[]; 45 static const char kDecoderName[];
46 46
47 private: 47 private:
48 // For a detailed state diagram please see this link: http://goo.gl/8jAok 48 // For a detailed state diagram please see this link: http://goo.gl/8jAok
49 // TODO(xhwang): Add a ASCII state diagram in this file after this class 49 // TODO(xhwang): Add a ASCII state diagram in this file after this class
(...skipping 28 matching lines...) Expand all
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 State state_; 86 State state_;
87 87
88 PipelineStatusCB init_cb_; 88 InitCB init_cb_;
89 OutputCB output_cb_; 89 OutputCB output_cb_;
90 DecodeCB decode_cb_; 90 DecodeCB decode_cb_;
91 base::Closure reset_cb_; 91 base::Closure reset_cb_;
92 base::Closure waiting_for_decryption_key_cb_; 92 base::Closure waiting_for_decryption_key_cb_;
93 93
94 VideoDecoderConfig config_; 94 VideoDecoderConfig config_;
95 95
96 // Callback to request/cancel decryptor creation notification. 96 // Callback to request/cancel decryptor creation notification.
97 SetDecryptorReadyCB set_decryptor_ready_cb_; 97 SetDecryptorReadyCB set_decryptor_ready_cb_;
98 98
(...skipping 15 matching lines...) Expand all
114 114
115 base::WeakPtr<DecryptingVideoDecoder> weak_this_; 115 base::WeakPtr<DecryptingVideoDecoder> weak_this_;
116 base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_; 116 base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder); 118 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder);
119 }; 119 };
120 120
121 } // namespace media 121 } // namespace media
122 122
123 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ 123 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/decrypting_audio_decoder_unittest.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698