OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VIDEO_FRAME_STREAM_H_ | 5 #ifndef MEDIA_FILTERS_VIDEO_FRAME_STREAM_H_ |
6 #define MEDIA_FILTERS_VIDEO_FRAME_STREAM_H_ | 6 #define MEDIA_FILTERS_VIDEO_FRAME_STREAM_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 // Stops the decoder, fires any existing pending read callback or reset | 62 // Stops the decoder, fires any existing pending read callback or reset |
63 // callback and calls |closure| on completion. Note that |closure| is always | 63 // callback and calls |closure| on completion. Note that |closure| is always |
64 // called asynchronously. The VideoFrameStream cannot be used anymore after | 64 // called asynchronously. The VideoFrameStream cannot be used anymore after |
65 // it is stopped. This method can be called at any time but not during another | 65 // it is stopped. This method can be called at any time but not during another |
66 // pending Stop(). | 66 // pending Stop(). |
67 void Stop(const base::Closure& closure); | 67 void Stop(const base::Closure& closure); |
68 | 68 |
69 // Returns true if the decoder currently has the ability to decode and return | 69 // Returns true if the decoder currently has the ability to decode and return |
70 // a VideoFrame. | 70 // a VideoFrame. |
71 bool HasOutputFrameAvailable() const; | 71 bool CanReadWithoutStalling() const; |
72 | 72 |
73 // DemuxerStream implementation. | 73 // DemuxerStream implementation. |
74 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 74 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
75 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; | 75 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; |
76 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; | 76 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; |
77 virtual Type type() OVERRIDE; | 77 virtual Type type() OVERRIDE; |
78 virtual void EnableBitstreamConverter() OVERRIDE; | 78 virtual void EnableBitstreamConverter() OVERRIDE; |
79 | 79 |
80 private: | 80 private: |
81 enum State { | 81 enum State { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // These two will be set by VideoDecoderSelector::SelectVideoDecoder(). | 135 // These two will be set by VideoDecoderSelector::SelectVideoDecoder(). |
136 scoped_ptr<VideoDecoder> decoder_; | 136 scoped_ptr<VideoDecoder> decoder_; |
137 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; | 137 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; |
138 | 138 |
139 DISALLOW_COPY_AND_ASSIGN(VideoFrameStream); | 139 DISALLOW_COPY_AND_ASSIGN(VideoFrameStream); |
140 }; | 140 }; |
141 | 141 |
142 } // namespace media | 142 } // namespace media |
143 | 143 |
144 #endif // MEDIA_FILTERS_VIDEO_FRAME_STREAM_H_ | 144 #endif // MEDIA_FILTERS_VIDEO_FRAME_STREAM_H_ |
OLD | NEW |