OLD | NEW |
(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 |
OLD | NEW |