Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: media/filters/ffmpeg_video_decoder.cc

Issue 1442933002: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/filters/ffmpeg_video_decoder.h ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 0); 158 0);
159 return 0; 159 return 0;
160 } 160 }
161 161
162 std::string FFmpegVideoDecoder::GetDisplayName() const { 162 std::string FFmpegVideoDecoder::GetDisplayName() const {
163 return "FFmpegVideoDecoder"; 163 return "FFmpegVideoDecoder";
164 } 164 }
165 165
166 void FFmpegVideoDecoder::Initialize(const VideoDecoderConfig& config, 166 void FFmpegVideoDecoder::Initialize(const VideoDecoderConfig& config,
167 bool low_delay, 167 bool low_delay,
168 const SetCdmReadyCB& /* set_cdm_ready_cb */,
168 const InitCB& init_cb, 169 const InitCB& init_cb,
169 const OutputCB& output_cb) { 170 const OutputCB& output_cb) {
170 DCHECK(task_runner_->BelongsToCurrentThread()); 171 DCHECK(task_runner_->BelongsToCurrentThread());
171 DCHECK(config.IsValidConfig()); 172 DCHECK(config.IsValidConfig());
172 DCHECK(!output_cb.is_null()); 173 DCHECK(!output_cb.is_null());
173 174
174 InitCB bound_init_cb = BindToCurrentLoop(init_cb); 175 InitCB bound_init_cb = BindToCurrentLoop(init_cb);
175 176
176 if (config.is_encrypted()) { 177 if (config.is_encrypted()) {
177 bound_init_cb.Run(false); 178 bound_init_cb.Run(false);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { 368 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
368 ReleaseFFmpegResources(); 369 ReleaseFFmpegResources();
369 return false; 370 return false;
370 } 371 }
371 372
372 av_frame_.reset(av_frame_alloc()); 373 av_frame_.reset(av_frame_alloc());
373 return true; 374 return true;
374 } 375 }
375 376
376 } // namespace media 377 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder.h ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698