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 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 private: | 55 private: |
56 enum DecoderState { | 56 enum DecoderState { |
57 kUninitialized, | 57 kUninitialized, |
58 kNormal, | 58 kNormal, |
59 kDecodeFinished, | 59 kDecodeFinished, |
60 kError | 60 kError |
61 }; | 61 }; |
62 | 62 |
63 // Handles decoding an unencrypted encoded buffer. | 63 // Handles decoding an unencrypted encoded buffer. |
64 bool FFmpegDecode(const scoped_refptr<DecoderBuffer>& buffer, | 64 bool FFmpegDecode(const scoped_refptr<DecoderBuffer>& buffer, |
65 bool* produced_frame); | 65 bool* has_produced_frame); |
66 | 66 |
67 // Handles (re-)initializing the decoder with a (new) config. | 67 // Handles (re-)initializing the decoder with a (new) config. |
68 // Returns true if initialization was successful. | 68 // Returns true if initialization was successful. |
69 bool ConfigureDecoder(bool low_delay); | 69 bool ConfigureDecoder(bool low_delay); |
70 | 70 |
71 // Releases resources associated with |codec_context_| and |av_frame_| | 71 // Releases resources associated with |codec_context_| and |av_frame_| |
72 // and resets them to NULL. | 72 // and resets them to NULL. |
73 void ReleaseFFmpegResources(); | 73 void ReleaseFFmpegResources(); |
74 | 74 |
75 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 75 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
(...skipping 11 matching lines...) Expand all Loading... |
87 VideoFramePool frame_pool_; | 87 VideoFramePool frame_pool_; |
88 | 88 |
89 bool decode_nalus_; | 89 bool decode_nalus_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 91 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace media | 94 } // namespace media |
95 | 95 |
96 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 96 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
OLD | NEW |