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

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

Issue 1446713003: Revert of media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 */,
169 const InitCB& init_cb, 168 const InitCB& init_cb,
170 const OutputCB& output_cb) { 169 const OutputCB& output_cb) {
171 DCHECK(task_runner_->BelongsToCurrentThread()); 170 DCHECK(task_runner_->BelongsToCurrentThread());
172 DCHECK(config.IsValidConfig()); 171 DCHECK(config.IsValidConfig());
173 DCHECK(!output_cb.is_null()); 172 DCHECK(!output_cb.is_null());
174 173
175 InitCB bound_init_cb = BindToCurrentLoop(init_cb); 174 InitCB bound_init_cb = BindToCurrentLoop(init_cb);
176 175
177 if (config.is_encrypted()) { 176 if (config.is_encrypted()) {
178 bound_init_cb.Run(false); 177 bound_init_cb.Run(false);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { 367 if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
369 ReleaseFFmpegResources(); 368 ReleaseFFmpegResources();
370 return false; 369 return false;
371 } 370 }
372 371
373 av_frame_.reset(av_frame_alloc()); 372 av_frame_.reset(av_frame_alloc());
374 return true; 373 return true;
375 } 374 }
376 375
377 } // namespace media 376 } // 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