Revert of Enabling audio quality test on mac. (patchset #1 id:1 of https://codereview...
[chromium-blink-merge.git] / media / blink / null_encrypted_media_player_support.cc
bloba67893bc7e5ac91fb790cb53c52c493f1c58cc5d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "media/blink/null_encrypted_media_player_support.h"
7 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h"
8 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
10 namespace media {
12 scoped_ptr<EncryptedMediaPlayerSupport>
13 NullEncryptedMediaPlayerSupport::Create(blink::WebMediaPlayerClient* client) {
14 return scoped_ptr<EncryptedMediaPlayerSupport>(
15 new NullEncryptedMediaPlayerSupport());
18 NullEncryptedMediaPlayerSupport::NullEncryptedMediaPlayerSupport() {
21 NullEncryptedMediaPlayerSupport::~NullEncryptedMediaPlayerSupport() {
24 blink::WebMediaPlayer::MediaKeyException
25 NullEncryptedMediaPlayerSupport::GenerateKeyRequest(
26 blink::WebLocalFrame* frame,
27 const blink::WebString& key_system,
28 const unsigned char* init_data,
29 unsigned init_data_length) {
30 return blink::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported;
33 blink::WebMediaPlayer::MediaKeyException
34 NullEncryptedMediaPlayerSupport::AddKey(
35 const blink::WebString& key_system,
36 const unsigned char* key,
37 unsigned key_length,
38 const unsigned char* init_data,
39 unsigned init_data_length,
40 const blink::WebString& session_id) {
41 return blink::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported;
44 blink::WebMediaPlayer::MediaKeyException
45 NullEncryptedMediaPlayerSupport::CancelKeyRequest(
46 const blink::WebString& key_system,
47 const blink::WebString& session_id) {
48 return blink::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported;
51 void NullEncryptedMediaPlayerSupport::SetInitialContentDecryptionModule(
52 blink::WebContentDecryptionModule* initial_cdm) {
55 void NullEncryptedMediaPlayerSupport::SetContentDecryptionModule(
56 blink::WebContentDecryptionModule* cdm) {
59 void NullEncryptedMediaPlayerSupport::SetContentDecryptionModule(
60 blink::WebContentDecryptionModule* cdm,
61 blink::WebContentDecryptionModuleResult result) {
62 result.completeWithError(
63 blink::WebContentDecryptionModuleExceptionNotSupportedError,
65 "Null MediaKeys object is not supported.");
68 Demuxer::NeedKeyCB NullEncryptedMediaPlayerSupport::CreateNeedKeyCB() {
69 return Demuxer::NeedKeyCB();
72 SetDecryptorReadyCB
73 NullEncryptedMediaPlayerSupport::CreateSetDecryptorReadyCB() {
74 return SetDecryptorReadyCB();
77 void NullEncryptedMediaPlayerSupport::OnPipelineDecryptError() {
80 } // namespace media