Chromium Code Reviews| Index: webkit/media/crypto/decoders/video_decoder.h |
| diff --git a/webkit/media/crypto/decoders/video_decoder.h b/webkit/media/crypto/decoders/video_decoder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ad497db13725fcd575831bc238b7c0afcc53ea23 |
| --- /dev/null |
| +++ b/webkit/media/crypto/decoders/video_decoder.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WEBKIT_MEDIA_CRYPTO_DECODERS_VIDEO_DECODER_H_ |
| +#define WEBKIT_MEDIA_CRYPTO_DECODERS_VIDEO_DECODER_H_ |
| + |
| +#include "webkit/media/crypto/ppapi/content_decryption_module.h" |
| + |
| +namespace webkit_media { |
| + |
| +VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) { |
| + switch (pixel_format) { |
| + case PIX_FMT_YUV422P: |
| + return VideoFrame::YV16; |
| + case PIX_FMT_YUV420P: |
| + return VideoFrame::YV12; |
| + default: |
| + DVLOG(1) << "Unsupported PixelFormat: " << pixel_format; |
| + } |
| + return VideoFrame::INVALID; |
| +} |
|
Tom Finegan
2012/08/29 01:37:46
This should not be here-- copy/paste error that I
Tom Finegan
2012/08/30 17:09:23
Done.
|
| + |
| +class VideoDecoder { |
| + public: |
| + virtual bool Initialize(const cdm::VideoDecoderConfig& config) = 0; |
| + virtual bool DecodeFrame(const cdm::VideoFrame& compressed_frame, |
| + cdm::VideoFrame* decompressed_frame) = 0; |
| + |
| + protected: |
| + VideoDecoder(); |
| + virtual ~VideoDecoder(); |
| + VideoDecoder(const VideoDecoder&); |
|
ddorwin
2012/08/29 17:33:49
private:
DISALLOW_IMPLICIT_CONSTRUCTORS( VideoDec
Tom Finegan
2012/08/30 17:09:23
Done.
|
| + void operator=(const VideoDecoder&); |
| +}; |
| + |
| +} // namespace webkit_media |
| + |
| +#endif // WEBKIT_MEDIA_CRYPTO_DECODERS_VIDEO_DECODER_H_ |