Chromium Code Reviews| Index: ppapi/cpp/media_codec_video_decoder.h |
| diff --git a/ppapi/cpp/media_codec_video_decoder.h b/ppapi/cpp/media_codec_video_decoder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0ba762a78f704955b5cd570887c42413bd90699d |
| --- /dev/null |
| +++ b/ppapi/cpp/media_codec_video_decoder.h |
| @@ -0,0 +1,70 @@ |
| +// Copyright (c) 2014 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 PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_ |
| +#define PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_ |
| + |
| +#include "ppapi/c/pp_media_codec.h" |
| +#include "ppapi/c/pp_size.h" |
| +#include "ppapi/cpp/completion_callback.h" |
| +#include "ppapi/cpp/graphics_3d.h" |
| +#include "ppapi/cpp/resource.h" |
| +#include "ppapi/cpp/size.h" |
| + |
| +/// @file |
| +/// This file defines the API to create and use a MediaCodecVideoDecoder |
| +/// resource. |
| + |
| +struct PP_FileInfo; |
| + |
| +namespace pp { |
| + |
| +class InstanceHandle; |
| + |
| +/// The <code>MediaCodecVideoDecoder</code> class represents a video decoder |
| +/// resource. |
| +class MediaCodecVideoDecoder : public Resource { |
| + public: |
| + /// Default constructor for creating an is_null() |
| + /// <code>MediaCodecVideoDecoder</code> object. |
| + MediaCodecVideoDecoder(); |
| + |
| + /// A constructor used to create a <code>MediaCodecVideoDecoder</code> and |
| + /// associate it with the provided <code>Instance</code>. |
| + /// @param[in] instance The instance with which this resource will be |
| + /// associated. |
| + explicit MediaCodecVideoDecoder(const InstanceHandle& instance); |
| + |
| + /// The copy constructor for <code>MediaCodecVideoDecoder</code>. |
| + /// @param[in] other A reference to a <code>MediaCodecVideoDecoder</code>. |
| + MediaCodecVideoDecoder(const MediaCodecVideoDecoder& other); |
| + |
| + int32_t Initialize(const Graphics3D& context, |
| + PP_MediaCodec_Profile profile, |
| + const CompletionCallback& cc); |
| + |
| + 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.
|
| + uint32_t size, |
| + const CompletionCallbackWithOutput<PP_MediaCodec_BitstreamBuffer>& cc); |
| + |
| + int32_t Decode( |
| + const PP_MediaCodec_BitstreamBuffer& bitstream_buffer, |
| + const CompletionCallback& cc); |
| + |
| + int32_t GetPictureBuffer( |
| + const CompletionCallbackWithOutput<PP_MediaCodec_PictureBuffer>& cc); |
| + |
| + void RecyclePictureBuffer( |
| + const PP_MediaCodec_PictureBuffer& picture_buffer); |
| + |
| + int32_t Flush( |
| + const CompletionCallback& cc); |
| + |
| + int32_t Reset( |
| + const CompletionCallback& cc); |
| +}; |
| + |
| +} // namespace pp |
| + |
| +#endif // PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_ |