Group s8_video_device_implementors_api

group s8_video_device_implementors_api

API for video device implementors.

Functions

pj_status_t pjmedia_vid_dev_get_local_index(pjmedia_vid_dev_index id, pjmedia_vid_dev_factory **p_f, unsigned *p_local_index)

Internal API: return the factory instance and device index that’s local to the factory for a given device ID.

Parameters:
  • id – Device id.

  • p_f – Out: factory instance

  • p_local_index – Out: device index within the factory

Returns:

PJ_SUCCESS on success.

pj_status_t pjmedia_vid_dev_get_global_index(const pjmedia_vid_dev_factory *f, unsigned local_idx, pjmedia_vid_dev_index *pid)

Internal API: return the global device index given a factory instance and a local device index.

Parameters:
  • f – Factory.

  • local_idx – Local index.

  • pid – Returned global index.

Returns:

PJ_SUCCESS on success.

struct pjmedia_vid_dev_factory_op
#include <videodev_imp.h>

Video device factory operations.

Public Members

pj_status_t (*init)(pjmedia_vid_dev_factory *f)

Initialize the video device factory.

Param f:

The video device factory.

pj_status_t (*destroy)(pjmedia_vid_dev_factory *f)

Close this video device factory and release all resources back to the operating system.

Param f:

The video device factory.

unsigned (*get_dev_count)(pjmedia_vid_dev_factory *f)

Get the number of video devices installed in the system.

Param f:

The video device factory.

pj_status_t (*get_dev_info)(pjmedia_vid_dev_factory *f, unsigned index, pjmedia_vid_dev_info *info)

Get the video device information and capabilities.

Param f:

The video device factory.

Param index:

Device index.

Param info:

The video device information structure which will be initialized by this function once it returns successfully.

pj_status_t (*default_param)(pj_pool_t *pool, pjmedia_vid_dev_factory *f, unsigned index, pjmedia_vid_dev_param *param)

Initialize the specified video device parameter with the default values for the specified device.

Param f:

The video device factory.

Param index:

Device index.

Param param:

The video device parameter.

pj_status_t (*create_stream)(pjmedia_vid_dev_factory *f, pjmedia_vid_dev_param *param, const pjmedia_vid_dev_cb *cb, void *user_data, pjmedia_vid_dev_stream **p_vid_strm)

Open the video device and create video stream. See pjmedia_vid_dev_stream_create()

pj_status_t (*refresh)(pjmedia_vid_dev_factory *f)

Refresh the list of video devices installed in the system.

Param f:

The video device factory.

struct pjmedia_vid_dev_factory
#include <videodev_imp.h>

This structure describes a video device factory.

Forward declaration for video device factory

Public Members

unsigned drv_idx

Driver index

struct pjmedia_vid_dev_factory::[anonymous] sys

Internal data to be initialized by video subsystem.

pjmedia_vid_dev_factory_op *op

Operations

struct pjmedia_vid_dev_stream_op
#include <videodev_imp.h>

Video stream operations.

struct pjmedia_vid_dev_stream
#include <videodev_imp.h>

This structure describes the video device stream.

Forward declaration for pjmedia_vid_dev_stream

Public Members

unsigned drv_idx

Driver index

pj_bool_t is_running

Has it been started?

struct pjmedia_vid_dev_stream::[anonymous] sys

Internal data to be initialized by video subsystem

pjmedia_vid_dev_stream_op *op

Operations