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

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

Issue 11260007: Add FFmpeg audio decoder for the clear key CDM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO. 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 | « no previous file | 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 17 matching lines...) Expand all
28 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) 28 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
29 #undef CLEAR_KEY_CDM_USE_FFMPEG_DECODER 29 #undef CLEAR_KEY_CDM_USE_FFMPEG_DECODER
30 #endif 30 #endif
31 31
32 namespace media { 32 namespace media {
33 class DecoderBuffer; 33 class DecoderBuffer;
34 } 34 }
35 35
36 namespace webkit_media { 36 namespace webkit_media {
37 37
38 class FFmpegCdmAudioDecoder;
38 class FFmpegCdmVideoDecoder; 39 class FFmpegCdmVideoDecoder;
39 40
40 // Clear key implementation of the cdm::ContentDecryptionModule interface. 41 // Clear key implementation of the cdm::ContentDecryptionModule interface.
41 class ClearKeyCdm : public cdm::ContentDecryptionModule { 42 class ClearKeyCdm : public cdm::ContentDecryptionModule {
42 public: 43 public:
43 explicit ClearKeyCdm(cdm::Allocator* allocator, cdm::CdmHost*); 44 explicit ClearKeyCdm(cdm::Allocator* allocator, cdm::CdmHost*);
44 virtual ~ClearKeyCdm(); 45 virtual ~ClearKeyCdm();
45 46
46 // ContentDecryptionModule implementation. 47 // ContentDecryptionModule implementation.
47 virtual cdm::Status GenerateKeyRequest( 48 virtual cdm::Status GenerateKeyRequest(
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 154
154 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) 155 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
155 int channel_count_; 156 int channel_count_;
156 int bits_per_channel_; 157 int bits_per_channel_;
157 int samples_per_second_; 158 int samples_per_second_;
158 base::TimeDelta last_timestamp_; 159 base::TimeDelta last_timestamp_;
159 base::TimeDelta last_duration_; 160 base::TimeDelta last_duration_;
160 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER 161 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
161 162
162 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER) 163 #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER)
164 scoped_ptr<FFmpegCdmAudioDecoder> audio_decoder_;
163 scoped_ptr<FFmpegCdmVideoDecoder> video_decoder_; 165 scoped_ptr<FFmpegCdmVideoDecoder> video_decoder_;
164 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER 166 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
165 167
166 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) 168 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
167 cdm::Size video_size_; 169 cdm::Size video_size_;
168 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER 170 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
169 }; 171 };
170 172
171 } // namespace webkit_media 173 } // namespace webkit_media
172 174
173 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 175 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698