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

Side by Side Diff: ppapi/c/ppp_video_encoder.h

Issue 365153003: Pepper: add PPB_VideoEncoder interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update API to prevent the user from dealing with buffer management Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « ppapi/c/ppb_video_encoder.h ('k') | ppapi/cpp/video_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
6 /* From ppp_video_encoder.idl modified Mon Jul 14 13:52:37 2014. */
7
8 #ifndef PPAPI_C_PPP_VIDEO_ENCODER_H_
9 #define PPAPI_C_PPP_VIDEO_ENCODER_H_
10
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/c/pp_stdint.h"
16
17 #define PPP_VIDEOENCODER_INTERFACE_0_1 "PPP_VideoEncoder;0.1" /* dev */
18 /**
19 * @file
20 * This file defines the API for receiving video bitstream buffers from the
21 * browser's video encoder.
22 */
23
24
25 /**
26 * @addtogroup Structs
27 * @{
28 */
29 /**
30 * Struct describing a video bitstream buffer. The plugin can determine which
31 * Encode call generated the buffer using |encode_id|.
32 */
33 struct PP_VideoEncoderBitstreamBuffer { /* dev */
34 /**
35 * |encode_id| parameter of the Encode call on the
36 <code>PPB_VideoEncoder</code>
37 * interface which generated this buffer.
38 */
39 uint32_t encode_id;
40 /**
41 * Start address of buffer.
42 */
43 void* buffer;
44 /**
45 * Buffer size in bytes.
46 */
47 uint32_t size;
48 /**
49 * Whether the buffer contains a key frame.
50 */
51 PP_Bool key_frame;
52 };
53 /**
54 * @}
55 */
56
57 /**
58 * @addtogroup Interfaces
59 * @{
60 */
61 struct PPP_VideoEncoder_0_1 { /* dev */
62 /**
63 * Function for receiving bitstream buffers.
64 *
65 * In order to receive bitstream, you must register for them by calling
66 * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By
67 * default, no events are delivered.
68 *
69 * @param[in] instance A <code>PP_Instance</code> identifying one instance
70 * of a module.
71 * @param[in] encoder A <code>PP_Resource</code> identifying the encoder
72 * resource that produced the |buffer|.
73 * @param[in] biffer A <code>PP_VideoEncoderBitstreamBuffer> containing the
74 * encoder video stream.
75 */
76 void (*HandleBitstreamBuffer)(
77 PP_Instance instance,
78 PP_Resource encoder,
79 const struct PP_VideoEncoderBitstreamBuffer* buffer);
80 };
81 /**
82 * @}
83 */
84
85 #endif /* PPAPI_C_PPP_VIDEO_ENCODER_H_ */
86
OLDNEW
« no previous file with comments | « ppapi/c/ppb_video_encoder.h ('k') | ppapi/cpp/video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698