Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / media / cdm / ppapi / external_clear_key / fake_cdm_video_decoder.h
blobd10372e94e8c6ce0c805f0dfa2a9b2e2cf2aa631
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FAKE_CDM_VIDEO_DECODER_H_
6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FAKE_CDM_VIDEO_DECODER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "media/cdm/ppapi/api/content_decryption_module.h"
11 #include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
13 namespace media {
15 class FakeCdmVideoDecoder : public CdmVideoDecoder {
16 public:
17 explicit FakeCdmVideoDecoder(cdm::Host* host);
18 ~FakeCdmVideoDecoder() override;
20 // CdmVideoDecoder implementation.
21 bool Initialize(const cdm::VideoDecoderConfig& config) override;
22 void Deinitialize() override;
23 void Reset() override;
24 cdm::Status DecodeFrame(const uint8_t* compressed_frame,
25 int32_t compressed_frame_size,
26 int64_t timestamp,
27 cdm::VideoFrame* decoded_frame) override;
28 bool is_initialized() const override { return is_initialized_; }
30 private:
31 bool is_initialized_;
32 cdm::Size video_size_;
34 cdm::Host* const host_;
36 DISALLOW_COPY_AND_ASSIGN(FakeCdmVideoDecoder);
39 } // namespace media
41 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_FAKE_CDM_VIDEO_DECODER_H_