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

Side by Side Diff: media/cdm/ppapi/clear_key_cdm.cc

Issue 23546014: Plumb PPAPI PlatformVerification into CDM.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « media/cdm/ppapi/clear_key_cdm.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/cdm/ppapi/clear_key_cdm.h" 5 #include "media/cdm/ppapi/clear_key_cdm.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 if (status == media::Decryptor::kError) 488 if (status == media::Decryptor::kError)
489 return cdm::kDecryptError; 489 return cdm::kDecryptError;
490 490
491 if (status == media::Decryptor::kNoKey) 491 if (status == media::Decryptor::kNoKey)
492 return cdm::kNoKey; 492 return cdm::kNoKey;
493 493
494 DCHECK_EQ(status, media::Decryptor::kSuccess); 494 DCHECK_EQ(status, media::Decryptor::kSuccess);
495 return cdm::kSuccess; 495 return cdm::kSuccess;
496 } 496 }
497 497
498 void ClearKeyCdm::OnPlatformChallengeResponse(
499 const cdm::PlatformChallengeResponse& response) {
500 NOTIMPLEMENTED();
501 }
502
503 void ClearKeyCdm::OnQueryOutputProtectionStatus(
504 uint32_t link_mask, uint32_t output_protection_mask) {
505 NOTIMPLEMENTED();
506 };
507
498 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) 508 #if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
499 int64 ClearKeyCdm::CurrentTimeStampInMicroseconds() const { 509 int64 ClearKeyCdm::CurrentTimeStampInMicroseconds() const {
500 return output_timestamp_base_in_microseconds_ + 510 return output_timestamp_base_in_microseconds_ +
501 base::Time::kMicrosecondsPerSecond * 511 base::Time::kMicrosecondsPerSecond *
502 total_samples_generated_ / samples_per_second_; 512 total_samples_generated_ / samples_per_second_;
503 } 513 }
504 514
505 int ClearKeyCdm::GenerateFakeAudioFramesFromDuration( 515 int ClearKeyCdm::GenerateFakeAudioFramesFromDuration(
506 int64 duration_in_microseconds, 516 int64 duration_in_microseconds,
507 cdm::AudioFrames* audio_frames) const { 517 cdm::AudioFrames* audio_frames) const {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 int samples_generated = GenerateFakeAudioFramesFromDuration( 558 int samples_generated = GenerateFakeAudioFramesFromDuration(
549 timestamp_in_microseconds - CurrentTimeStampInMicroseconds(), 559 timestamp_in_microseconds - CurrentTimeStampInMicroseconds(),
550 audio_frames); 560 audio_frames);
551 total_samples_generated_ += samples_generated; 561 total_samples_generated_ += samples_generated;
552 562
553 return samples_generated == 0 ? cdm::kNeedMoreData : cdm::kSuccess; 563 return samples_generated == 0 ? cdm::kNeedMoreData : cdm::kSuccess;
554 } 564 }
555 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER 565 #endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
556 566
557 } // namespace media 567 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/ppapi/clear_key_cdm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698