Pepper_47_C_interfaces
Public Attributes | List of all members
PPB_CameraDevice_Private_0_1 Struct Reference

#include <ppb_camera_device_private.h>

Collaboration diagram for PPB_CameraDevice_Private_0_1:
Collaboration graph

Public Attributes

PP_Resource(* Create )(PP_Instance instance)
 
PP_Bool(* IsCameraDevice )(PP_Resource resource)
 
int32_t(* Open )(PP_Resource camera_device, struct PP_Var device_id, struct PP_CompletionCallback callback)
 
void(* Close )(PP_Resource camera_device)
 
int32_t(* GetCameraCapabilities )(PP_Resource camera_device, PP_Resource *capabilities, struct PP_CompletionCallback callback)
 

Detailed Description

To query camera capabilities:

  1. Get a PPB_CameraDevice_Private object by Create().
  2. Open() camera device with track id of MediaStream video track.
  3. Call GetCameraCapabilities() to get a PPB_CameraCapabilities_Private object, which can be used to query camera capabilities.

Definition at line 44 of file ppb_camera_device_private.h.

Member Data Documentation

void(* PPB_CameraDevice_Private_0_1::Close)(PP_Resource camera_device)

Disconnects from the camera and cancels all pending requests. After this returns, no callbacks will be called. If PPB_CameraDevice_Private is destroyed and is not closed yet, this function will be automatically called. Calling this more than once has no effect.

Parameters
[in]camera_deviceA PP_Resource corresponding to a camera device resource.

Definition at line 91 of file ppb_camera_device_private.h.

PP_Resource(* PPB_CameraDevice_Private_0_1::Create)(PP_Instance instance)

Creates a PPB_CameraDevice_Private resource.

Parameters
[in]instanceA PP_Instance identifying one instance of a module.
Returns
A PP_Resource corresponding to a PPB_CameraDevice_Private resource if successful, 0 if failed.

Definition at line 54 of file ppb_camera_device_private.h.

int32_t(* PPB_CameraDevice_Private_0_1::GetCameraCapabilities)(PP_Resource camera_device, PP_Resource *capabilities, struct PP_CompletionCallback callback)

Gets the camera capabilities.

The camera capabilities do not change for a given camera source.

Parameters
[in]camera_deviceA PP_Resource corresponding to a camera device resource.
[out]capabilitiesA PPB_CameraCapabilities_Private for storing the camera capabilities on success. Otherwise, the value will not be changed.
[in]callbackPP_CompletionCallback to be called upon completion of GetCameraCapabilities().
Returns
An int32_t containing a result code from pp_errors.h.

Definition at line 107 of file ppb_camera_device_private.h.

PP_Bool(* PPB_CameraDevice_Private_0_1::IsCameraDevice)(PP_Resource resource)

Determines if a resource is a camera device resource.

Parameters
[in]resourceThe PP_Resource to test.
Returns
A PP_Bool with PP_TRUE if the given resource is a camera device resource or PP_FALSE otherwise.

Definition at line 64 of file ppb_camera_device_private.h.

int32_t(* PPB_CameraDevice_Private_0_1::Open)(PP_Resource camera_device, struct PP_Var device_id, struct PP_CompletionCallback callback)

Opens a camera device.

Parameters
[in]camera_deviceA PP_Resource corresponding to a camera device resource.
[in]device_idA PP_Var identifying a camera device. The type is string. The ID can be obtained from MediaStreamTrack.getSources() or MediaStreamVideoTrack.id.
[in]callbackA PP_CompletionCallback to be called upon completion of Open().
Returns
An error code from pp_errors.h.

Definition at line 78 of file ppb_camera_device_private.h.


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