Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: webkit/media/crypto/ppapi/cdm_video_decoder.h

Issue 11316045: Add a libvpx video decoder to ClearKeyCdm and move the fake video decoder to its own class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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/memory/scoped_ptr.h"
10 #include "webkit/media/crypto/ppapi/content_decryption_module.h"
11
12 namespace webkit_media {
13
14 class CdmVideoDecoder {
15 public:
16 virtual ~CdmVideoDecoder() {}
17 virtual bool Initialize(const cdm::VideoDecoderConfig& config) = 0;
18 virtual void Deinitialize() = 0;
19 virtual void Reset() = 0;
20
21 // Decodes |compressed_frame|. Stores output frame in |decoded_frame| and
22 // returns |cdm::kSuccess| when an output frame is available. Returns
23 // |cdm::kNeedMoreData| when |compressed_frame| does not produce an output
24 // frame. Returns |cdm::kDecodeError| when decoding fails.
25 virtual cdm::Status DecodeFrame(const uint8_t* compressed_frame,
26 int32_t compressed_frame_size,
27 int64_t timestamp,
28 cdm::VideoFrame* decoded_frame) = 0;
29 };
30
31 // Initializes appropriate video decoder based on GYP flags and the value of
32 // |config.codec|. Returns a scoped_ptr containing a non-null initialized
33 // CdmVideoDecoder* upon success.
34 scoped_ptr<CdmVideoDecoder> CreateVideoDecoder(
35 cdm::Allocator* allocator,
36 const cdm::VideoDecoderConfig& config);
37
38 } // namespace webkit_media
39
40 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CDM_VIDEO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698