Pepper_31_C_interfaces
Public Attributes | List of all members
PPB_VideoDecoder_Dev_0_16 Struct Reference

#include <ppb_video_decoder_dev.h>

Collaboration diagram for PPB_VideoDecoder_Dev_0_16:
Collaboration graph

Public Attributes

PP_Resource(* Create )(PP_Instance instance, PP_Resource context, PP_VideoDecoder_Profile profile)
 
PP_Bool(* IsVideoDecoder )(PP_Resource resource)
 
int32_t(* Decode )(PP_Resource video_decoder, const struct PP_VideoBitstreamBuffer_Dev *bitstream_buffer, struct PP_CompletionCallback callback)
 
void(* AssignPictureBuffers )(PP_Resource video_decoder, uint32_t no_of_buffers, const struct PP_PictureBuffer_Dev buffers[])
 
void(* ReusePictureBuffer )(PP_Resource video_decoder, int32_t picture_buffer_id)
 
int32_t(* Flush )(PP_Resource video_decoder, struct PP_CompletionCallback callback)
 
int32_t(* Reset )(PP_Resource video_decoder, struct PP_CompletionCallback callback)
 
void(* Destroy )(PP_Resource video_decoder)
 

Detailed Description

Video decoder interface.

Typical usage:

See PPP_VideoDecoder_Dev for the notifications the decoder may send the plugin.

Definition at line 52 of file ppb_video_decoder_dev.h.

Member Data Documentation

void(* PPB_VideoDecoder_Dev_0_16::AssignPictureBuffers)(PP_Resource video_decoder, uint32_t no_of_buffers, const struct PP_PictureBuffer_Dev buffers[])

Provides the decoder with texture-backed picture buffers for video decoding.

This function should be called when the plugin has its ProvidePictureBuffers method called. The decoder will stall until it has received all the buffers it's asked for.

Parameters: |video_decoder| is the previously created handle to the decoder resource. |no_of_buffers| how many buffers are behind picture buffer pointer. |buffers| contains the reference to the picture buffer that was allocated.

Definition at line 104 of file ppb_video_decoder_dev.h.

PP_Resource(* PPB_VideoDecoder_Dev_0_16::Create)(PP_Instance instance, PP_Resource context, PP_VideoDecoder_Profile profile)

Creates & initializes a video decoder.

Parameters: |instance| pointer to the plugin instance. |context| a PPB_Graphics3D resource in which decoding will happen. |profile| the video stream's format profile.

The created decoder is returned as PP_Resource. 0 means failure.

Definition at line 63 of file ppb_video_decoder_dev.h.

int32_t(* PPB_VideoDecoder_Dev_0_16::Decode)(PP_Resource video_decoder, const struct PP_VideoBitstreamBuffer_Dev *bitstream_buffer, struct PP_CompletionCallback callback)

Dispatches bitstream buffer to the decoder.

Parameters: |video_decoder| is the previously created handle to the decoder resource. |bitstream_buffer| is the bitstream buffer that contains the input data. |callback| will be called when |bitstream_buffer| has been processed by the decoder.

Returns an error code from pp_errors.h.

Definition at line 87 of file ppb_video_decoder_dev.h.

void(* PPB_VideoDecoder_Dev_0_16::Destroy)(PP_Resource video_decoder)

Tear down the decoder as quickly as possible. Pending inputs and outputs are dropped and the decoder frees all of its resources. Although resources may be freed asynchronously, after this method returns no more callbacks will be made on the client. Any resources held by the client at that point may be freed.

Parameters: |video_decoder| is the previously created handle to the decoder resource.

Definition at line 158 of file ppb_video_decoder_dev.h.

int32_t(* PPB_VideoDecoder_Dev_0_16::Flush)(PP_Resource video_decoder, struct PP_CompletionCallback callback)

Flush input and output buffers in the decoder. Any pending inputs are decoded and pending outputs are delivered to the plugin. Once done flushing, the decoder will call |callback|.

Parameters: |video_decoder| is the previously created handle to the decoder resource. |callback| is one-time callback that will be called once the flushing request has been completed.

Returns an error code from pp_errors.h.

Definition at line 132 of file ppb_video_decoder_dev.h.

PP_Bool(* PPB_VideoDecoder_Dev_0_16::IsVideoDecoder)(PP_Resource resource)

Tests whether |resource| is a video decoder created through Create function of this interface.

Parameters: |resource| is handle to resource to test.

Returns true if is a video decoder, false otherwise.

Definition at line 75 of file ppb_video_decoder_dev.h.

int32_t(* PPB_VideoDecoder_Dev_0_16::Reset)(PP_Resource video_decoder, struct PP_CompletionCallback callback)

Reset the decoder as quickly as possible. Pending inputs and outputs are dropped and the decoder is put back into a state ready to receive further Decode() calls. |callback| will be called when the reset is done.

Parameters: |video_decoder| is the previously created handle to the decoder resource. |callback| is one-time callback that will be called once the reset request has been completed.

Returns an error code from pp_errors.h.

Definition at line 146 of file ppb_video_decoder_dev.h.

void(* PPB_VideoDecoder_Dev_0_16::ReusePictureBuffer)(PP_Resource video_decoder, int32_t picture_buffer_id)

Tells the decoder to reuse the given picture buffer. Typical use of this function is to call from PictureReady callback to recycle picture buffer back to the decoder after blitting the image so that decoder can use the image for output again.

Parameters: |video_decoder| is the previously created handle to the decoder resource. |picture_buffer_id| contains the id of the picture buffer that was processed.

Definition at line 118 of file ppb_video_decoder_dev.h.


The documentation for this struct was generated from the following file: