| 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 27 matching lines...) Expand all Loading... |
| 38 void Initialize(DemuxerStream* stream, | 38 void Initialize(DemuxerStream* stream, |
| 39 const PipelineStatusCB& status_cb); | 39 const PipelineStatusCB& status_cb); |
| 40 | 40 |
| 41 // Cancels all pending operations and fires all pending callbacks. If in | 41 // Cancels all pending operations and fires all pending callbacks. If in |
| 42 // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending | 42 // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending |
| 43 // operation to finish before satisfying |closure|. Sets the state to | 43 // operation to finish before satisfying |closure|. Sets the state to |
| 44 // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise. | 44 // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise. |
| 45 void Reset(const base::Closure& closure); | 45 void Reset(const base::Closure& closure); |
| 46 | 46 |
| 47 // DemuxerStream implementation. | 47 // DemuxerStream implementation. |
| 48 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 48 virtual void Read(const ReadCB& read_cb) override; |
| 49 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; | 49 virtual AudioDecoderConfig audio_decoder_config() override; |
| 50 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; | 50 virtual VideoDecoderConfig video_decoder_config() override; |
| 51 virtual Type type() OVERRIDE; | 51 virtual Type type() override; |
| 52 virtual void EnableBitstreamConverter() OVERRIDE; | 52 virtual void EnableBitstreamConverter() override; |
| 53 virtual bool SupportsConfigChanges() OVERRIDE; | 53 virtual bool SupportsConfigChanges() override; |
| 54 virtual VideoRotation video_rotation() OVERRIDE; | 54 virtual VideoRotation video_rotation() override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // For a detailed state diagram please see this link: http://goo.gl/8jAok | 57 // For a detailed state diagram please see this link: http://goo.gl/8jAok |
| 58 // TODO(xhwang): Add a ASCII state diagram in this file after this class | 58 // TODO(xhwang): Add a ASCII state diagram in this file after this class |
| 59 // stabilizes. | 59 // stabilizes. |
| 60 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream. | 60 // TODO(xhwang): Update this diagram for DecryptingDemuxerStream. |
| 61 enum State { | 61 enum State { |
| 62 kUninitialized = 0, | 62 kUninitialized = 0, |
| 63 kDecryptorRequested, | 63 kDecryptorRequested, |
| 64 kIdle, | 64 kIdle, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // NOTE: Weak pointers must be invalidated before all other member variables. | 127 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 128 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; | 128 base::WeakPtrFactory<DecryptingDemuxerStream> weak_factory_; |
| 129 base::WeakPtr<DecryptingDemuxerStream> weak_this_; | 129 base::WeakPtr<DecryptingDemuxerStream> weak_this_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); | 131 DISALLOW_COPY_AND_ASSIGN(DecryptingDemuxerStream); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace media | 134 } // namespace media |
| 135 | 135 |
| 136 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ | 136 #endif // MEDIA_FILTERS_DECRYPTING_DEMUXER_STREAM_H_ |
| OLD | NEW |