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

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

Issue 11270057: Add type argument to pepper content decryptor method GenerateKeyRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased and addressed TODOs related to integration of this CL. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/crypto/ppapi/cdm_wrapper.cc ('k') | webkit/media/crypto/ppapi/clear_key_cdm.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 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 class FFmpegCdmAudioDecoder; 39 class FFmpegCdmAudioDecoder;
40 class FFmpegCdmVideoDecoder; 40 class FFmpegCdmVideoDecoder;
41 41
42 // Clear key implementation of the cdm::ContentDecryptionModule interface. 42 // Clear key implementation of the cdm::ContentDecryptionModule interface.
43 class ClearKeyCdm : public cdm::ContentDecryptionModule { 43 class ClearKeyCdm : public cdm::ContentDecryptionModule {
44 public: 44 public:
45 explicit ClearKeyCdm(cdm::Allocator* allocator, cdm::CdmHost*); 45 explicit ClearKeyCdm(cdm::Allocator* allocator, cdm::CdmHost*);
46 virtual ~ClearKeyCdm(); 46 virtual ~ClearKeyCdm();
47 47
48 // ContentDecryptionModule implementation. 48 // ContentDecryptionModule implementation.
49 // TODO(tomfinegan): Update ContentDecryptionModule to pass "type" through.
50 virtual cdm::Status GenerateKeyRequest( 49 virtual cdm::Status GenerateKeyRequest(
51 const uint8_t* init_data, 50 const char* type, int type_size,
52 int init_data_size, 51 const uint8_t* init_data, int init_data_size,
53 cdm::KeyMessage* key_request) OVERRIDE; 52 cdm::KeyMessage* key_request) OVERRIDE;
54 virtual cdm::Status AddKey(const char* session_id, 53 virtual cdm::Status AddKey(const char* session_id, int session_id_size,
55 int session_id_size, 54 const uint8_t* key, int key_size,
56 const uint8_t* key, 55 const uint8_t* key_id, int key_id_size) OVERRIDE;
57 int key_size,
58 const uint8_t* key_id,
59 int key_id_size) OVERRIDE;
60 virtual cdm::Status CancelKeyRequest(const char* session_id, 56 virtual cdm::Status CancelKeyRequest(const char* session_id,
61 int session_id_size) OVERRIDE; 57 int session_id_size) OVERRIDE;
62 virtual void TimerExpired(cdm::KeyMessage* msg, bool* populated) OVERRIDE; 58 virtual void TimerExpired(cdm::KeyMessage* msg, bool* populated) OVERRIDE;
63 virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, 59 virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer,
64 cdm::DecryptedBlock* decrypted_block) OVERRIDE; 60 cdm::DecryptedBlock* decrypted_block) OVERRIDE;
65 virtual cdm::Status InitializeAudioDecoder( 61 virtual cdm::Status InitializeAudioDecoder(
66 const cdm::AudioDecoderConfig& audio_decoder_config) OVERRIDE; 62 const cdm::AudioDecoderConfig& audio_decoder_config) OVERRIDE;
67 virtual cdm::Status InitializeVideoDecoder( 63 virtual cdm::Status InitializeVideoDecoder(
68 const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE; 64 const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE;
69 virtual void DeinitializeDecoder(cdm::StreamType decoder_type) OVERRIDE; 65 virtual void DeinitializeDecoder(cdm::StreamType decoder_type) OVERRIDE;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER 174 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
179 175
180 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) 176 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
181 cdm::Size video_size_; 177 cdm::Size video_size_;
182 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER 178 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
183 }; 179 };
184 180
185 } // namespace webkit_media 181 } // namespace webkit_media
186 182
187 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 183 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
OLDNEW
« no previous file with comments | « webkit/media/crypto/ppapi/cdm_wrapper.cc ('k') | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698