| 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 #include "media/filters/ffmpeg_video_decoder.h" | 5 #include "media/filters/ffmpeg_video_decoder.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 0); | 164 0); |
| 165 return 0; | 165 return 0; |
| 166 } | 166 } |
| 167 | 167 |
| 168 std::string FFmpegVideoDecoder::GetDisplayName() const { | 168 std::string FFmpegVideoDecoder::GetDisplayName() const { |
| 169 return "FFmpegVideoDecoder"; | 169 return "FFmpegVideoDecoder"; |
| 170 } | 170 } |
| 171 | 171 |
| 172 void FFmpegVideoDecoder::Initialize(const VideoDecoderConfig& config, | 172 void FFmpegVideoDecoder::Initialize(const VideoDecoderConfig& config, |
| 173 bool low_delay, | 173 bool low_delay, |
| 174 const SetCdmReadyCB& /* set_cdm_ready_cb */, | 174 CdmContext* /* cdm_context */, |
| 175 const InitCB& init_cb, | 175 const InitCB& init_cb, |
| 176 const OutputCB& output_cb) { | 176 const OutputCB& output_cb) { |
| 177 DCHECK(thread_checker_.CalledOnValidThread()); | 177 DCHECK(thread_checker_.CalledOnValidThread()); |
| 178 DCHECK(config.IsValidConfig()); | 178 DCHECK(config.IsValidConfig()); |
| 179 DCHECK(!output_cb.is_null()); | 179 DCHECK(!output_cb.is_null()); |
| 180 | 180 |
| 181 InitCB bound_init_cb = BindToCurrentLoop(init_cb); | 181 InitCB bound_init_cb = BindToCurrentLoop(init_cb); |
| 182 | 182 |
| 183 if (config.is_encrypted()) { | 183 if (config.is_encrypted()) { |
| 184 bound_init_cb.Run(false); | 184 bound_init_cb.Run(false); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { | 375 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { |
| 376 ReleaseFFmpegResources(); | 376 ReleaseFFmpegResources(); |
| 377 return false; | 377 return false; |
| 378 } | 378 } |
| 379 | 379 |
| 380 av_frame_.reset(av_frame_alloc()); | 380 av_frame_.reset(av_frame_alloc()); |
| 381 return true; | 381 return true; |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace media | 384 } // namespace media |
| OLD | NEW |