Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
PPB_VideoSource_Private_0_1 Struct Reference

#include <ppb_video_source_private.h>

Public Attributes

PP_Resource(* Create )(PP_Instance instance)
 
PP_Bool(* IsVideoSource )(PP_Resource resource)
 
int32_t(* Open )(PP_Resource source, struct PP_Var stream_url, struct PP_CompletionCallback callback)
 
int32_t(* GetFrame )(PP_Resource source, struct PP_VideoFrame_Private *frame, struct PP_CompletionCallback callback)
 
void(* Close )(PP_Resource source)
 

Detailed Description

The PPB_VideoSource_Private interface contains pointers to several functions for creating video source resources and using them to receive video frames from a MediaStream video track in the browser.

Member Data Documentation

void(* PPB_VideoSource_Private_0_1::Close)(PP_Resource source)

Closes the video source.

Parameters
[in]sourceA PP_Resource corresponding to a video source resource.
PP_Resource(* PPB_VideoSource_Private_0_1::Create)(PP_Instance instance)

Creates a video source resource.

Parameters
[in]instanceA PP_Instance identifying an instance of a module.
Returns
A PP_Resource with a nonzero ID on success or zero on failure. Failure means the instance was invalid.
int32_t(* PPB_VideoSource_Private_0_1::GetFrame)(PP_Resource source, struct PP_VideoFrame_Private *frame, struct PP_CompletionCallback callback)

Gets a frame from the video source. The returned image data is only valid until the next call to GetFrame. The image data resource inside the returned frame will have its reference count incremented by one and must be managed by the plugin.

Parameters
[in]sourceA PP_Resource corresponding to a video source resource.
[out]frameA PP_VideoFrame_Private to hold a video frame from the source.
[in]callbackA PP_CompletionCallback to be called upon completion of GetNextFrame().
Returns
An int32_t containing a result code from pp_errors.h. Returns PP_ERROR_BADRESOURCE if source isn't a valid video source. Returns PP_ERROR_FAILED if the source is not open, or if some other browser error occurs.
PP_Bool(* PPB_VideoSource_Private_0_1::IsVideoSource)(PP_Resource resource)

Determines if a resource is a video source resource.

Parameters
[in]resourceThe PP_Resource to test.
Returns
A PP_Bool with PP_TRUE if the given resource is a video source resource or PP_FALSE otherwise.
int32_t(* PPB_VideoSource_Private_0_1::Open)(PP_Resource source, struct PP_Var stream_url, struct PP_CompletionCallback callback)

Opens a video source for getting frames.

Parameters
[in]sourceA PP_Resource corresponding to a video source resource.
[in]stream_urlA PP_Var string holding a URL identifying a MediaStream.
[in]callbackA PP_CompletionCallback to be called upon completion of Open().
Returns
An int32_t containing a result code from pp_errors.h. Returns PP_ERROR_BADRESOURCE if source isn't a valid video source. Returns PP_ERROR_INPROGRESS if source is already open. Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is some other browser error.

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