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

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

Issue 10910293: Add is_encrypted() in VideoDecoderConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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/filters/source_buffer_stream.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/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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 DCHECK(!demuxer_stream_); 127 DCHECK(!demuxer_stream_);
128 if (!stream) { 128 if (!stream) {
129 status_cb.Run(PIPELINE_ERROR_DECODE); 129 status_cb.Run(PIPELINE_ERROR_DECODE);
130 return; 130 return;
131 } 131 }
132 132
133 // TODO(scherkus): this check should go in Pipeline prior to creating 133 // TODO(scherkus): this check should go in Pipeline prior to creating
134 // decoder objects. 134 // decoder objects.
135 const VideoDecoderConfig& config = stream->video_decoder_config(); 135 const VideoDecoderConfig& config = stream->video_decoder_config();
136 if (!config.IsValidConfig()) { 136 if (!config.IsValidConfig() || config.is_encrypted()) {
137 DLOG(ERROR) << "Invalid video stream - " << config.AsHumanReadableString(); 137 DLOG(ERROR) << "Unsupported video stream - "
138 << config.AsHumanReadableString();
138 status_cb.Run(PIPELINE_ERROR_DECODE); 139 status_cb.Run(PIPELINE_ERROR_DECODE);
139 return; 140 return;
140 } 141 }
141 142
142 VideoDecodeAccelerator* vda = 143 VideoDecodeAccelerator* vda =
143 factories_->CreateVideoDecodeAccelerator(config.profile(), this); 144 factories_->CreateVideoDecodeAccelerator(config.profile(), this);
144 if (!vda) { 145 if (!vda) {
145 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); 146 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED);
146 return; 147 return;
147 } 148 }
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 555
555 error_occured_ = true; 556 error_occured_ = true;
556 557
557 if (!pending_read_cb_.is_null()) { 558 if (!pending_read_cb_.is_null()) {
558 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); 559 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL);
559 return; 560 return;
560 } 561 }
561 } 562 }
562 563
563 } // namespace media 564 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698