| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // Allow decoding of individual NALU. Entire frames are required by default. | 34 // Allow decoding of individual NALU. Entire frames are required by default. |
| 35 // Disables low-latency mode. Must be called before Initialize(). | 35 // Disables low-latency mode. Must be called before Initialize(). |
| 36 void set_decode_nalus(bool decode_nalus) { decode_nalus_ = decode_nalus; } | 36 void set_decode_nalus(bool decode_nalus) { decode_nalus_ = decode_nalus; } |
| 37 | 37 |
| 38 // VideoDecoder implementation. | 38 // VideoDecoder implementation. |
| 39 std::string GetDisplayName() const override; | 39 std::string GetDisplayName() const override; |
| 40 void Initialize(const VideoDecoderConfig& config, | 40 void Initialize(const VideoDecoderConfig& config, |
| 41 bool low_delay, | 41 bool low_delay, |
| 42 const PipelineStatusCB& status_cb, | 42 const PipelineStatusCB& status_cb, |
| 43 const OutputCB& output_cb) override; | 43 const OutputCB& output_cb, |
| 44 const base::Closure& waiting_for_encryption_key_cb) override; |
| 44 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 45 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 45 const DecodeCB& decode_cb) override; | 46 const DecodeCB& decode_cb) override; |
| 46 void Reset(const base::Closure& closure) override; | 47 void Reset(const base::Closure& closure) override; |
| 47 | 48 |
| 48 // Callback called from within FFmpeg to allocate a buffer based on | 49 // Callback called from within FFmpeg to allocate a buffer based on |
| 49 // the dimensions of |codec_context|. See AVCodecContext.get_buffer2 | 50 // the dimensions of |codec_context|. See AVCodecContext.get_buffer2 |
| 50 // documentation inside FFmpeg. | 51 // documentation inside FFmpeg. |
| 51 int GetVideoBuffer(struct AVCodecContext* codec_context, | 52 int GetVideoBuffer(struct AVCodecContext* codec_context, |
| 52 AVFrame* frame, | 53 AVFrame* frame, |
| 53 int flags); | 54 int flags); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 VideoFramePool frame_pool_; | 88 VideoFramePool frame_pool_; |
| 88 | 89 |
| 89 bool decode_nalus_; | 90 bool decode_nalus_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 92 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace media | 95 } // namespace media |
| 95 | 96 |
| 96 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 97 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| OLD | NEW |