Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ppb_video_encoder.h
Go to the documentation of this file.
1 /* Copyright 2015 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 ppb_video_encoder.idl modified Thu Oct 20 13:57:04 2016. */
7 
8 #ifndef PPAPI_C_PPB_VIDEO_ENCODER_H_
9 #define PPAPI_C_PPB_VIDEO_ENCODER_H_
10 
12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_codecs.h"
15 #include "ppapi/c/pp_instance.h"
16 #include "ppapi/c/pp_macros.h"
17 #include "ppapi/c/pp_resource.h"
18 #include "ppapi/c/pp_size.h"
19 #include "ppapi/c/pp_stdint.h"
21 
22 #define PPB_VIDEOENCODER_INTERFACE_0_1 "PPB_VideoEncoder;0.1" /* dev */
23 #define PPB_VIDEOENCODER_INTERFACE_0_2 "PPB_VideoEncoder;0.2"
24 #define PPB_VIDEOENCODER_INTERFACE PPB_VIDEOENCODER_INTERFACE_0_2
25 
94  int32_t (*GetSupportedProfiles)(PP_Resource video_encoder,
95  struct PP_ArrayOutput output,
96  struct PP_CompletionCallback callback);
118  int32_t (*Initialize)(PP_Resource video_encoder,
119  PP_VideoFrame_Format input_format,
120  const struct PP_Size* input_visible_size,
121  PP_VideoProfile output_profile,
122  uint32_t initial_bitrate,
123  PP_HardwareAcceleration acceleration,
124  struct PP_CompletionCallback callback);
136  int32_t (*GetFramesRequired)(PP_Resource video_encoder);
149  int32_t (*GetFrameCodedSize)(PP_Resource video_encoder,
150  struct PP_Size* coded_size);
164  int32_t (*GetVideoFrame)(PP_Resource video_encoder,
165  PP_Resource* video_frame,
166  struct PP_CompletionCallback callback);
182  int32_t (*Encode)(PP_Resource video_encoder,
183  PP_Resource video_frame,
184  PP_Bool force_keyframe,
185  struct PP_CompletionCallback callback);
202  int32_t (*GetBitstreamBuffer)(PP_Resource video_encoder,
203  struct PP_BitstreamBuffer* bitstream_buffer,
204  struct PP_CompletionCallback callback);
214  PP_Resource video_encoder,
215  const struct PP_BitstreamBuffer* bitstream_buffer);
226  uint32_t bitrate,
227  uint32_t framerate);
238  void (*Close)(PP_Resource video_encoder);
239 };
240 
242 
243 struct PPB_VideoEncoder_0_1 { /* dev */
244  PP_Resource (*Create)(PP_Instance instance);
245  PP_Bool (*IsVideoEncoder)(PP_Resource resource);
246  int32_t (*GetSupportedProfiles)(PP_Resource video_encoder,
247  struct PP_ArrayOutput output,
248  struct PP_CompletionCallback callback);
249  int32_t (*Initialize)(PP_Resource video_encoder,
250  PP_VideoFrame_Format input_format,
251  const struct PP_Size* input_visible_size,
252  PP_VideoProfile output_profile,
253  uint32_t initial_bitrate,
254  PP_HardwareAcceleration acceleration,
255  struct PP_CompletionCallback callback);
256  int32_t (*GetFramesRequired)(PP_Resource video_encoder);
257  int32_t (*GetFrameCodedSize)(PP_Resource video_encoder,
258  struct PP_Size* coded_size);
259  int32_t (*GetVideoFrame)(PP_Resource video_encoder,
260  PP_Resource* video_frame,
261  struct PP_CompletionCallback callback);
262  int32_t (*Encode)(PP_Resource video_encoder,
263  PP_Resource video_frame,
264  PP_Bool force_keyframe,
265  struct PP_CompletionCallback callback);
266  int32_t (*GetBitstreamBuffer)(PP_Resource video_encoder,
267  struct PP_BitstreamBuffer* bitstream_buffer,
268  struct PP_CompletionCallback callback);
269  void (*RecycleBitstreamBuffer)(
270  PP_Resource video_encoder,
271  const struct PP_BitstreamBuffer* bitstream_buffer);
272  void (*RequestEncodingParametersChange)(PP_Resource video_encoder,
273  uint32_t bitrate,
274  uint32_t framerate);
275  void (*Close)(PP_Resource video_encoder);
276 };
281 #endif /* PPAPI_C_PPB_VIDEO_ENCODER_H_ */
282 
PP_HardwareAcceleration
Definition: pp_codecs.h:56
int32_t(* GetFrameCodedSize)(PP_Resource video_encoder, struct PP_Size *coded_size)
Definition: ppb_video_encoder.h:149
int32_t(* GetBitstreamBuffer)(PP_Resource video_encoder, struct PP_BitstreamBuffer *bitstream_buffer, struct PP_CompletionCallback callback)
Definition: ppb_video_encoder.h:202
Definition: ppb_video_encoder.h:59
void(* RequestEncodingParametersChange)(PP_Resource video_encoder, uint32_t bitrate, uint32_t framerate)
Definition: ppb_video_encoder.h:225
int32_t(* GetVideoFrame)(PP_Resource video_encoder, PP_Resource *video_frame, struct PP_CompletionCallback callback)
Definition: ppb_video_encoder.h:164
PP_Bool(* IsVideoEncoder)(PP_Resource resource)
Definition: ppb_video_encoder.h:79
int32_t PP_Resource
Definition: pp_resource.h:40
PP_VideoFrame_Format
Definition: ppb_video_frame.h:31
int32_t(* Encode)(PP_Resource video_encoder, PP_Resource video_frame, PP_Bool force_keyframe, struct PP_CompletionCallback callback)
Definition: ppb_video_encoder.h:182
int32_t(* GetFramesRequired)(PP_Resource video_encoder)
Definition: ppb_video_encoder.h:136
Definition: pp_codecs.h:228
void(* Close)(PP_Resource video_encoder)
Definition: ppb_video_encoder.h:238
Definition: pp_array_output.h:103
PP_Resource(* Create)(PP_Instance instance)
Definition: ppb_video_encoder.h:69
int32_t PP_Instance
Definition: pp_instance.h:34
PP_Bool
Definition: pp_bool.h:30
Definition: pp_completion_callback.h:139
void(* RecycleBitstreamBuffer)(PP_Resource video_encoder, const struct PP_BitstreamBuffer *bitstream_buffer)
Definition: ppb_video_encoder.h:213
int32_t(* GetSupportedProfiles)(PP_Resource video_encoder, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
Definition: ppb_video_encoder.h:94
int32_t(* Initialize)(PP_Resource video_encoder, PP_VideoFrame_Format input_format, const struct PP_Size *input_visible_size, PP_VideoProfile output_profile, uint32_t initial_bitrate, PP_HardwareAcceleration acceleration, struct PP_CompletionCallback callback)
Definition: ppb_video_encoder.h:118
Definition: ppb_video_encoder.h:243
Definition: pp_size.h:27