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