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

Side by Side Diff: webkit/media/crypto/ppapi/clear_key_cdm.cc

Issue 11091005: Update PluginInstance for decrypt-and-decode video. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: a lot of change, need to be reviewed again Created 8 years, 2 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
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 "webkit/media/crypto/ppapi/clear_key_cdm.h" 5 #include "webkit/media/crypto/ppapi/clear_key_cdm.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "media/base/decoder_buffer.h" 12 #include "media/base/decoder_buffer.h"
13 13
14 static const char kClearKeyCdmVersion[] = "0.1.0.0"; 14 static const char kClearKeyCdmVersion[] = "0.1.0.0";
15 15
16 static scoped_refptr<media::DecoderBuffer> CopyDecoderBufferFrom( 16 static scoped_refptr<media::DecoderBuffer> CopyDecoderBufferFrom(
17 const cdm::InputBuffer& input_buffer) { 17 const cdm::InputBuffer& input_buffer) {
18 DCHECK(input_buffer.data);
18 // TODO(tomfinegan): Get rid of this copy. 19 // TODO(tomfinegan): Get rid of this copy.
19 scoped_refptr<media::DecoderBuffer> output_buffer = 20 scoped_refptr<media::DecoderBuffer> output_buffer =
20 media::DecoderBuffer::CopyFrom(input_buffer.data, input_buffer.data_size); 21 media::DecoderBuffer::CopyFrom(input_buffer.data, input_buffer.data_size);
21 22
22 std::vector<media::SubsampleEntry> subsamples; 23 std::vector<media::SubsampleEntry> subsamples;
23 for (int32_t i = 0; i < input_buffer.num_subsamples; ++i) { 24 for (int32_t i = 0; i < input_buffer.num_subsamples; ++i) {
24 media::SubsampleEntry subsample; 25 media::SubsampleEntry subsample;
25 subsample.clear_bytes = input_buffer.subsamples[i].clear_bytes; 26 subsample.clear_bytes = input_buffer.subsamples[i].clear_bytes;
26 subsample.cypher_bytes = input_buffer.subsamples[i].cipher_bytes; 27 subsample.cypher_bytes = input_buffer.subsamples[i].cipher_bytes;
27 subsamples.push_back(subsample); 28 subsamples.push_back(subsample);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 249 }
249 250
250 cdm::Status ClearKeyCdm::DecryptAndDecodeFrame( 251 cdm::Status ClearKeyCdm::DecryptAndDecodeFrame(
251 const cdm::InputBuffer& encrypted_buffer, 252 const cdm::InputBuffer& encrypted_buffer,
252 cdm::VideoFrame* video_frame) { 253 cdm::VideoFrame* video_frame) {
253 NOTIMPLEMENTED(); 254 NOTIMPLEMENTED();
254 return cdm::kDecryptError; 255 return cdm::kDecryptError;
255 } 256 }
256 257
257 } // namespace webkit_media 258 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698