OLD | NEW |
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 "media/base/decryptor.h" | 10 #include "media/base/decryptor.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // Callback for the |decryptor_| to notify this object that a new key has been | 84 // Callback for the |decryptor_| to notify this object that a new key has been |
85 // added. | 85 // added. |
86 void OnKeyAdded(); | 86 void OnKeyAdded(); |
87 | 87 |
88 // Resets decoder and calls |reset_cb_|. | 88 // Resets decoder and calls |reset_cb_|. |
89 void DoReset(); | 89 void DoReset(); |
90 | 90 |
91 // Returns Decryptor::StreamType converted from |stream_type_|. | 91 // Returns Decryptor::StreamType converted from |stream_type_|. |
92 Decryptor::StreamType GetDecryptorStreamType() const; | 92 Decryptor::StreamType GetDecryptorStreamType() const; |
93 | 93 |
| 94 // Sets |{audio|video}_config_| based on |demuxer_stream_|. |
| 95 void SetDecoderConfig(); |
| 96 |
94 scoped_refptr<base::MessageLoopProxy> message_loop_; | 97 scoped_refptr<base::MessageLoopProxy> message_loop_; |
95 | 98 |
96 State state_; | 99 State state_; |
97 | 100 |
98 PipelineStatusCB init_cb_; | 101 PipelineStatusCB init_cb_; |
99 ReadCB read_cb_; | 102 ReadCB read_cb_; |
100 base::Closure reset_cb_; | 103 base::Closure reset_cb_; |
101 | 104 |
102 // Pointer to the input demuxer stream that will feed us encrypted buffers. | 105 // Pointer to the input demuxer stream that will feed us encrypted buffers. |
103 scoped_refptr<DemuxerStream> demuxer_stream_; | 106 scoped_refptr<DemuxerStream> demuxer_stream_; |
(...skipping 15 matching lines...) Expand all Loading... |
119 // If this variable is true and kNoKey is returned then we need to try | 122 // If this variable is true and kNoKey is returned then we need to try |
120 // decrypting again in case the newly added key is the correct decryption key. | 123 // decrypting again in case the newly added key is the correct decryption key. |
121 bool key_added_while_decrypt_pending_; | 124 bool key_added_while_decrypt_pending_; |
122 | 125 |
123 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); | 126 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); |
124 }; | 127 }; |
125 | 128 |
126 } // namespace media | 129 } // namespace media |
127 | 130 |
128 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ | 131 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ |
OLD | NEW |