| 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 23 matching lines...) Expand all Loading... |
| 34 // VideoDecoder implementation. | 34 // VideoDecoder implementation. |
| 35 virtual void Initialize(const VideoDecoderConfig& config, | 35 virtual void Initialize(const VideoDecoderConfig& config, |
| 36 bool low_delay, | 36 bool low_delay, |
| 37 const PipelineStatusCB& status_cb) OVERRIDE; | 37 const PipelineStatusCB& status_cb) OVERRIDE; |
| 38 virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 38 virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 39 const DecodeCB& decode_cb) OVERRIDE; | 39 const DecodeCB& decode_cb) OVERRIDE; |
| 40 virtual void Reset(const base::Closure& closure) OVERRIDE; | 40 virtual void Reset(const base::Closure& closure) OVERRIDE; |
| 41 virtual void Stop() OVERRIDE; | 41 virtual void Stop() OVERRIDE; |
| 42 | 42 |
| 43 // Callback called from within FFmpeg to allocate a buffer based on | 43 // Callback called from within FFmpeg to allocate a buffer based on |
| 44 // the dimensions of |codec_context|. See AVCodecContext.get_buffer | 44 // the dimensions of |codec_context|. See AVCodecContext.get_buffer2 |
| 45 // documentation inside FFmpeg. | 45 // documentation inside FFmpeg. |
| 46 int GetVideoBuffer(AVCodecContext *codec_context, AVFrame* frame); | 46 int GetVideoBuffer(struct AVCodecContext* codec_context, |
| 47 AVFrame* frame, |
| 48 int flags); |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 enum DecoderState { | 51 enum DecoderState { |
| 50 kUninitialized, | 52 kUninitialized, |
| 51 kNormal, | 53 kNormal, |
| 52 kFlushCodec, | 54 kFlushCodec, |
| 53 kDecodeFinished, | 55 kDecodeFinished, |
| 54 kError | 56 kError |
| 55 }; | 57 }; |
| 56 | 58 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 81 VideoDecoderConfig config_; | 83 VideoDecoderConfig config_; |
| 82 | 84 |
| 83 VideoFramePool frame_pool_; | 85 VideoFramePool frame_pool_; |
| 84 | 86 |
| 85 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 87 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 } // namespace media | 90 } // namespace media |
| 89 | 91 |
| 90 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 92 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| OLD | NEW |