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 /** |
| 7 * This file defines the API for receiving video bitstream buffers from the |
| 8 * browser's video encoder. |
| 9 */ |
| 10 |
| 11 label Chrome { |
| 12 [channel=dev] M37 = 0.1 |
| 13 }; |
| 14 |
| 15 /** |
| 16 * Struct describing a video bitstream buffer. The plugin can determine which |
| 17 * Encode call generated the buffer using |encode_id|. |
| 18 */ |
| 19 struct PP_VideoEncoderBitstreamBuffer { |
| 20 /** |
| 21 * |encode_id| parameter of the Encode call on the <code>PPB_VideoEncoder</cod
e> |
| 22 * interface which generated this buffer. |
| 23 */ |
| 24 uint32_t encode_id; |
| 25 |
| 26 /** |
| 27 * Start address of buffer. |
| 28 */ |
| 29 mem_t buffer; |
| 30 |
| 31 /** |
| 32 * Buffer size in bytes. |
| 33 */ |
| 34 uint32_t size; |
| 35 |
| 36 /** |
| 37 * Whether the buffer contains a key frame. |
| 38 */ |
| 39 PP_Bool key_frame; |
| 40 }; |
| 41 |
| 42 [macro="PPP_VIDEOENCODER_INTERFACE"] |
| 43 interface PPP_VideoEncoder { |
| 44 /** |
| 45 * Function for receiving bitstream buffers. |
| 46 * |
| 47 * In order to receive bitstream, you must register for them by calling |
| 48 * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By |
| 49 * default, no events are delivered. |
| 50 * |
| 51 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 52 * of a module. |
| 53 * @param[in] encoder A <code>PP_Resource</code> identifying the encoder |
| 54 * resource that produced the |buffer|. |
| 55 * @param[in] biffer A <code>PP_VideoEncoderBitstreamBuffer> containing the |
| 56 * encoder video stream. |
| 57 */ |
| 58 void HandleBitstreamBuffer( |
| 59 [in] PP_Instance instance, |
| 60 [in] PP_Resource encoder, |
| 61 [in] PP_VideoEncoderBitstreamBuffer buffer); |
| 62 }; |
OLD | NEW |