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 "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // render main thread. If a Decryptor depends on the render main thread | 48 // render main thread. If a Decryptor depends on the render main thread |
49 // (e.g. PpapiDecryptor), the pending DecryptCB would not be satisfied. | 49 // (e.g. PpapiDecryptor), the pending DecryptCB would not be satisfied. |
50 void Stop(const base::Closure& closure); | 50 void Stop(const base::Closure& closure); |
51 | 51 |
52 // DemuxerStream implementation. | 52 // DemuxerStream implementation. |
53 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 53 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
54 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; | 54 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; |
55 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; | 55 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; |
56 virtual Type type() OVERRIDE; | 56 virtual Type type() OVERRIDE; |
57 virtual void EnableBitstreamConverter() OVERRIDE; | 57 virtual void EnableBitstreamConverter() OVERRIDE; |
| 58 virtual bool SupportsConfigChanges() OVERRIDE; |
58 | 59 |
59 private: | 60 private: |
60 // For a detailed state diagram please see this link: http://goo.gl/8jAok | 61 // For a detailed state diagram please see this link: http://goo.gl/8jAok |
61 // TODO(xhwang): Add a ASCII state diagram in this file after this class | 62 // TODO(xhwang): Add a ASCII state diagram in this file after this class |
62 // stabilizes. | 63 // stabilizes. |
63 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream. | 64 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream. |
64 enum State { | 65 enum State { |
65 kUninitialized = 0, | 66 kUninitialized = 0, |
66 kDecryptorRequested, | 67 kDecryptorRequested, |
67 kIdle, | 68 kIdle, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // NOTE: Weak pointers must be invalidated before all other member variables. | 130 // NOTE: Weak pointers must be invalidated before all other member variables. |
130 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; | 131 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; |
131 base::WeakPtr<DecryptingDemuxerStream> weak_this_; | 132 base::WeakPtr<DecryptingDemuxerStream> weak_this_; |
132 | 133 |
133 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); | 134 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); |
134 }; | 135 }; |
135 | 136 |
136 } // namespace media | 137 } // namespace media |
137 | 138 |
138 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ | 139 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ |
OLD | NEW |