OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef WEBKIT_MEDIA_CRYPTO_DECODERS_VIDEO_DECODER_H_ | |
6 #define WEBKIT_MEDIA_CRYPTO_DECODERS_VIDEO_DECODER_H_ | |
7 | |
8 #include "webkit/media/crypto/ppapi/content_decryption_module.h" | |
9 | |
10 namespace webkit_media { | |
11 | |
12 VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) { | |
13 switch (pixel_format) { | |
14 case PIX_FMT_YUV422P: | |
15 return VideoFrame::YV16; | |
16 case PIX_FMT_YUV420P: | |
17 return VideoFrame::YV12; | |
18 default: | |
19 DVLOG(1) << "Unsupported PixelFormat: " << pixel_format; | |
20 } | |
21 return VideoFrame::INVALID; | |
22 } | |
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.
| |
23 | |
24 class VideoDecoder { | |
25 public: | |
26 virtual bool Initialize(const cdm::VideoDecoderConfig& config) = 0; | |
27 virtual bool DecodeFrame(const cdm::VideoFrame& compressed_frame, | |
28 cdm::VideoFrame* decompressed_frame) = 0; | |
29 | |
30 protected: | |
31 VideoDecoder(); | |
32 virtual ~VideoDecoder(); | |
33 VideoDecoder(const VideoDecoder&); | |
ddorwin
2012/08/29 17:33:49
private:
DISALLOW_IMPLICIT_CONSTRUCTORS( VideoDec
Tom Finegan
2012/08/30 17:09:23
Done.
| |
34 void operator=(const VideoDecoder&); | |
35 }; | |
36 | |
37 } // namespace webkit_media | |
38 | |
39 #endif // WEBKIT_MEDIA_CRYPTO_DECODERS_VIDEO_DECODER_H_ | |
OLD | NEW |