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