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

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

Issue 10408003: Plumb extra_data() to VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rev interface versino Created 8 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/video/video_decode_accelerator.h » ('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/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 const VideoDecoderConfig& config = stream->video_decoder_config(); 145 const VideoDecoderConfig& config = stream->video_decoder_config();
146 // TODO(scherkus): this check should go in Pipeline prior to creating 146 // TODO(scherkus): this check should go in Pipeline prior to creating
147 // decoder objects. 147 // decoder objects.
148 if (!config.IsValidConfig()) { 148 if (!config.IsValidConfig()) {
149 DLOG(ERROR) << "Invalid video stream - " << config.AsHumanReadableString(); 149 DLOG(ERROR) << "Invalid video stream - " << config.AsHumanReadableString();
150 status_cb.Run(PIPELINE_ERROR_DECODE); 150 status_cb.Run(PIPELINE_ERROR_DECODE);
151 return; 151 return;
152 } 152 }
153 153
154 vda_ = factories_->CreateVideoDecodeAccelerator(config.profile(), this); 154 std::vector<uint8_t> extra_data;
155 if (config.extra_data()) {
156 extra_data.assign(config.extra_data(),
157 config.extra_data() + config.extra_data_size());
158 }
159 vda_ = factories_->CreateVideoDecodeAccelerator(
160 config.profile(), config.coded_size(), extra_data, this);
155 if (!vda_) { 161 if (!vda_) {
156 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); 162 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED);
157 return; 163 return;
158 } 164 }
159 165
160 demuxer_stream_ = stream; 166 demuxer_stream_ = stream;
161 statistics_cb_ = statistics_cb; 167 statistics_cb_ = statistics_cb;
162 168
163 demuxer_stream_->EnableBitstreamConverter(); 169 demuxer_stream_->EnableBitstreamConverter();
164 170
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 534
529 error_occured_ = true; 535 error_occured_ = true;
530 536
531 if (!pending_read_cb_.is_null()) { 537 if (!pending_read_cb_.is_null()) {
532 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); 538 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL);
533 return; 539 return;
534 } 540 }
535 } 541 }
536 542
537 } // namespace media 543 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698