Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 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 PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_ | |
| 6 #define PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_ | |
| 7 | |
| 8 #include "ppapi/c/pp_media_codec.h" | |
| 9 #include "ppapi/c/pp_size.h" | |
| 10 #include "ppapi/cpp/completion_callback.h" | |
| 11 #include "ppapi/cpp/graphics_3d.h" | |
| 12 #include "ppapi/cpp/resource.h" | |
| 13 #include "ppapi/cpp/size.h" | |
| 14 | |
| 15 /// @file | |
| 16 /// This file defines the API to create and use a MediaCodecVideoDecoder | |
| 17 /// resource. | |
| 18 | |
| 19 struct PP_FileInfo; | |
| 20 | |
| 21 namespace pp { | |
| 22 | |
| 23 class InstanceHandle; | |
| 24 | |
| 25 /// The <code>MediaCodecVideoDecoder</code> class represents a video decoder | |
| 26 /// resource. | |
| 27 class MediaCodecVideoDecoder : public Resource { | |
| 28 public: | |
| 29 /// Default constructor for creating an is_null() | |
| 30 /// <code>MediaCodecVideoDecoder</code> object. | |
| 31 MediaCodecVideoDecoder(); | |
| 32 | |
| 33 /// A constructor used to create a <code>MediaCodecVideoDecoder</code> and | |
| 34 /// associate it with the provided <code>Instance</code>. | |
| 35 /// @param[in] instance The instance with which this resource will be | |
| 36 /// associated. | |
| 37 explicit MediaCodecVideoDecoder(const InstanceHandle& instance); | |
| 38 | |
| 39 /// The copy constructor for <code>MediaCodecVideoDecoder</code>. | |
| 40 /// @param[in] other A reference to a <code>MediaCodecVideoDecoder</code>. | |
| 41 MediaCodecVideoDecoder(const MediaCodecVideoDecoder& other); | |
| 42 | |
| 43 int32_t Initialize(const Graphics3D& context, | |
| 44 PP_MediaCodec_Profile profile, | |
| 45 const CompletionCallback& cc); | |
| 46 | |
| 47 int32_t GetBitstreamBuffer( | |
|
igorc
2014/04/11 22:13:18
Is this documented somewhere? I also don't see it
bbudge
2014/04/16 00:51:05
Whoops, should be deleted.
| |
| 48 uint32_t size, | |
| 49 const CompletionCallbackWithOutput<PP_MediaCodec_BitstreamBuffer>& cc); | |
| 50 | |
| 51 int32_t Decode( | |
| 52 const PP_MediaCodec_BitstreamBuffer& bitstream_buffer, | |
| 53 const CompletionCallback& cc); | |
| 54 | |
| 55 int32_t GetPictureBuffer( | |
| 56 const CompletionCallbackWithOutput<PP_MediaCodec_PictureBuffer>& cc); | |
| 57 | |
| 58 void RecyclePictureBuffer( | |
| 59 const PP_MediaCodec_PictureBuffer& picture_buffer); | |
| 60 | |
| 61 int32_t Flush( | |
| 62 const CompletionCallback& cc); | |
| 63 | |
| 64 int32_t Reset( | |
| 65 const CompletionCallback& cc); | |
| 66 }; | |
| 67 | |
| 68 } // namespace pp | |
| 69 | |
| 70 #endif // PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_ | |
| OLD | NEW |