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_FFMPEG_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 int GetVideoBuffer(AVCodecContext *codec_context, AVFrame* frame); | 43 int GetVideoBuffer(AVCodecContext *codec_context, AVFrame* frame); |
44 | 44 |
45 protected: | 45 protected: |
46 virtual ~FFmpegVideoDecoder(); | 46 virtual ~FFmpegVideoDecoder(); |
47 | 47 |
48 private: | 48 private: |
49 enum DecoderState { | 49 enum DecoderState { |
50 kUninitialized, | 50 kUninitialized, |
51 kNormal, | 51 kNormal, |
52 kFlushCodec, | 52 kFlushCodec, |
53 kDecodeFinished, | 53 kDecodeFinished |
54 }; | 54 }; |
55 | 55 |
56 // Carries out the reading operation scheduled by Read(). | 56 // Carries out the reading operation scheduled by Read(). |
57 void DoRead(const ReadCB& read_cb); | 57 void DoRead(const ReadCB& read_cb); |
58 | 58 |
59 // Reads from the demuxer stream with corresponding callback method. | 59 // Reads from the demuxer stream with corresponding callback method. |
60 void ReadFromDemuxerStream(); | 60 void ReadFromDemuxerStream(); |
61 void DecryptOrDecodeBuffer(DemuxerStream::Status status, | 61 void DecryptOrDecodeBuffer(DemuxerStream::Status status, |
62 const scoped_refptr<DecoderBuffer>& buffer); | 62 const scoped_refptr<DecoderBuffer>& buffer); |
63 | 63 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 scoped_refptr<DemuxerStream> demuxer_stream_; | 115 scoped_refptr<DemuxerStream> demuxer_stream_; |
116 | 116 |
117 Decryptor* decryptor_; | 117 Decryptor* decryptor_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 119 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
120 }; | 120 }; |
121 | 121 |
122 } // namespace media | 122 } // namespace media |
123 | 123 |
124 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 124 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
OLD | NEW |