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 <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 const DecodeCB& decode_cb) override; | 45 const DecodeCB& decode_cb) override; |
46 void Reset(const base::Closure& closure) override; | 46 void Reset(const base::Closure& closure) override; |
47 | 47 |
48 // Callback called from within FFmpeg to allocate a buffer based on | 48 // Callback called from within FFmpeg to allocate a buffer based on |
49 // the dimensions of |codec_context|. See AVCodecContext.get_buffer2 | 49 // the dimensions of |codec_context|. See AVCodecContext.get_buffer2 |
50 // documentation inside FFmpeg. | 50 // documentation inside FFmpeg. |
51 int GetVideoBuffer(struct AVCodecContext* codec_context, | 51 int GetVideoBuffer(struct AVCodecContext* codec_context, |
52 AVFrame* frame, | 52 AVFrame* frame, |
53 int flags); | 53 int flags); |
54 | 54 |
55 void SetVideoFramePoolDelegate( | |
sandersd (OOO until July 31)
2016/12/15 00:38:01
This should also be a constructor parameter.
| |
56 std::unique_ptr<VideoFramePoolDelegate> delegate); | |
57 | |
55 private: | 58 private: |
56 enum DecoderState { | 59 enum DecoderState { |
57 kUninitialized, | 60 kUninitialized, |
58 kNormal, | 61 kNormal, |
59 kDecodeFinished, | 62 kDecodeFinished, |
60 kError | 63 kError |
61 }; | 64 }; |
62 | 65 |
63 // Handles decoding an unencrypted encoded buffer. | 66 // Handles decoding an unencrypted encoded buffer. |
64 bool FFmpegDecode(const scoped_refptr<DecoderBuffer>& buffer, | 67 bool FFmpegDecode(const scoped_refptr<DecoderBuffer>& buffer, |
(...skipping 22 matching lines...) Expand all Loading... | |
87 VideoFramePool frame_pool_; | 90 VideoFramePool frame_pool_; |
88 | 91 |
89 bool decode_nalus_; | 92 bool decode_nalus_; |
90 | 93 |
91 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 94 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace media | 97 } // namespace media |
95 | 98 |
96 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 99 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
OLD | NEW |