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

Unified Diff: ppapi/cpp/media_codec_video_decoder.h

Issue 210373003: Pepper VideoDecoder API definition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
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..421b1563c1670d57c6a1298b0c594e7803809485
--- /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(Graphics3D* context,
dmichael (off chromium) 2014/04/09 21:54:07 Shouldn't this be "const Graphics3D&"?
bbudge 2014/04/11 17:15:16 I suppose it could be even though we use it in a n
+ PP_MediaCodec_Profile profile,
+ const CompletionCallback& cc);
+
+ int32_t GetBitstreamBuffer(
+ 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_

Powered by Google App Engine
This is Rietveld 408576698