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

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: Plugin should call RecyclePicture during Flush. 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..0b0457311b82f885dde8ecd78cb4190b86dc727d
--- /dev/null
+++ b/ppapi/cpp/media_codec_video_decoder.h
@@ -0,0 +1,68 @@
+// 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_VideoProfile profile,
+ const CompletionCallback& cc);
+
+ int32_t Decode(
+ uint32_t user_id,
+ uint32_t size,
+ const void* buffer,
+ const CompletionCallback& cc);
+
+ int32_t GetPicture(
+ const CompletionCallbackWithOutput<PP_MediaCodec_Picture>& cc);
+
+ void RecyclePicture(
+ const PP_MediaCodec_Picture& picture);
+
+ int32_t Flush(
+ const CompletionCallback& cc);
+
+ int32_t Reset(
+ const CompletionCallback& cc);
dmichael (off chromium) 2014/04/17 20:23:26 nit: I'm not sure why we seem to put parameters th
bbudge 2014/04/18 17:03:17 Done.
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_MEDIA_CODEC_VIDEO_DECODER_H_

Powered by Google App Engine
This is Rietveld 408576698