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_PPAPI_CDM_VIDEO_DECODER_H_ | |
6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CDM_VIDEO_DECODER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
ddorwin
2012/11/17 02:56:22
Why is this needed?
Tom Finegan
2012/11/17 04:35:06
Done.
| |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "webkit/media/crypto/ppapi/content_decryption_module.h" | |
12 | |
13 namespace webkit_media { | |
ddorwin
2012/11/17 02:56:22
Should this be in a cdm namespace instead? It's no
Tom Finegan
2012/11/17 04:35:06
All of the decoder wrappers are in webkit_media. I
ddorwin
2012/12/04 04:22:37
SG. Please add a TODO or story. Either is fine.
Tom Finegan
2012/12/04 20:59:40
Done. (added story)
| |
14 | |
15 class CdmVideoDecoder { | |
16 public: | |
17 virtual ~CdmVideoDecoder() {} | |
18 virtual bool Initialize(const cdm::VideoDecoderConfig& config) = 0; | |
19 virtual void Deinitialize() = 0; | |
20 virtual void Reset() = 0; | |
21 | |
22 // Decodes |compressed_frame|. Stores output frame in |decoded_frame| and | |
23 // returns |cdm::kSuccess| when an output frame is available. Returns | |
24 // |cdm::kNeedMoreData| when |compressed_frame| does not produce an output | |
25 // frame. Returns |cdm::kDecodeError| when decoding fails. | |
26 virtual cdm::Status DecodeFrame(const uint8_t* compressed_frame, | |
27 int32_t compressed_frame_size, | |
28 int64_t timestamp, | |
29 cdm::VideoFrame* decoded_frame) = 0; | |
30 }; | |
31 | |
32 // Initializes appropriate video decoder based on GYP flags and the value of | |
33 // |config.codec|. Returns a scoped_ptr containing a non-null initialized | |
34 // CdmVideoDecoder* upon success. | |
35 scoped_ptr<CdmVideoDecoder> InitializeVideoDecoder( | |
36 cdm::Allocator* allocator, | |
37 const cdm::VideoDecoderConfig& config); | |
38 | |
39 } // namespace webkit_media | |
40 | |
41 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CDM_VIDEO_DECODER_H_ | |
OLD | NEW |