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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_FAKE_CDM_VIDEO_DECODER_H_
6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_FAKE_CDM_VIDEO_DECODER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "webkit/media/crypto/ppapi/cdm/content_decryption_module.h"
11 #include "webkit/media/crypto/ppapi/cdm_video_decoder.h"
13 namespace webkit_media
{
15 class FakeCdmVideoDecoder
: public CdmVideoDecoder
{
17 explicit FakeCdmVideoDecoder(cdm::Allocator
* allocator
);
18 virtual ~FakeCdmVideoDecoder();
20 // CdmVideoDecoder implementation.
21 virtual bool Initialize(const cdm::VideoDecoderConfig
& config
) OVERRIDE
;
22 virtual void Deinitialize() OVERRIDE
;
23 virtual void Reset() OVERRIDE
;
24 virtual cdm::Status
DecodeFrame(const uint8_t* compressed_frame
,
25 int32_t compressed_frame_size
,
27 cdm::VideoFrame
* decoded_frame
) OVERRIDE
;
28 virtual bool is_initialized() const OVERRIDE
{ return is_initialized_
; }
32 cdm::Size video_size_
;
34 cdm::Host
* const host_
;
36 DISALLOW_COPY_AND_ASSIGN(FakeCdmVideoDecoder
);
39 } // namespace webkit_media
41 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_FAKE_CDM_VIDEO_DECODER_H_