Group avi_dev

group avi_dev

AVI player virtual device

This describes a virtual capture device which takes its input from an AVI file.

Functions

void pjmedia_avi_dev_param_default(pjmedia_avi_dev_param *p)

Reset pjmedia_avi_dev_param with the default settings. This mostly will reset all values to NULL or zero.

Parameters:

p – The parameter to be initialized.

pj_status_t pjmedia_avi_dev_create_factory(pj_pool_factory *pf, unsigned max_dev, pjmedia_vid_dev_factory **p_ret)

Create a AVI device factory, and register it to the video device subsystem. At least one factory needs to be created before an AVI device can be allocated and used, and normally only one factory is needed per application.

Parameters:
  • pf – Pool factory to be used.

  • max_dev – Number of devices to be reserved.

  • p_ret – Pointer to return the factory instance, to be used when allocating a virtual device.

Returns:

PJ_SUCCESS on success or the appropriate error code.

pj_status_t pjmedia_avi_dev_alloc(pjmedia_vid_dev_factory *f, pjmedia_avi_dev_param *param, pjmedia_vid_dev_index *p_id)

Allocate one device ID to be used to play the specified AVI file in the parameter.

Parameters:
  • f – The factory.

  • param – The parameter, with at least the AVI file path set.

  • p_id – Optional pointer to receive device ID to play the file.

Returns:

PJ_SUCCESS or the appropriate error code.

pj_status_t pjmedia_avi_dev_get_param(pjmedia_vid_dev_index id, pjmedia_avi_dev_param *param)

Retrieve the parameters set for the virtual device.

Parameters:
  • id – Device ID.

  • param – Structure to receive the settings.

Returns:

PJ_SUCCESS or the appropriate error code.

pj_status_t pjmedia_avi_dev_free(pjmedia_vid_dev_index id)

Free the resources associated with the virtual device.

Parameters:

id – The device ID.

Returns:

PJ_SUCCESS or the appropriate error code.

struct pjmedia_avi_dev_param
#include <avi_dev.h>

Settings for the AVI player virtual device. This param corresponds to PJMEDIA_VID_DEV_CAP_AVI_PLAY capability of the video device/stream.

Public Members

pj_str_t path

Specifies the full path of the AVI file to be played.

pj_str_t title

If this setting is specified when setting the device, this specifies the title to be assigned as the device name. If this setting not specified, the filename part of the path will be used.

pjmedia_avi_streams *avi_streams

The underlying AVI streams created by the device. If the value is NULL, that means the device has not been configured yet. Application can use this field to retrieve the audio stream of the AVI. This setting is “get”-only and will be ignored in “set capability” operation.