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.
-
pj_status_t (*init)(pjmedia_vid_dev_factory *f)
-
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
-
unsigned drv_idx
-
struct pjmedia_vid_dev_stream_op
- #include <videodev_imp.h>
Video stream operations.
Public Members
-
pj_status_t (*get_param)(pjmedia_vid_dev_stream *strm, pjmedia_vid_dev_param *param)
-
pj_status_t (*get_cap)(pjmedia_vid_dev_stream *strm, pjmedia_vid_dev_cap cap, void *value)
-
pj_status_t (*set_cap)(pjmedia_vid_dev_stream *strm, pjmedia_vid_dev_cap cap, const void *value)
-
pj_status_t (*start)(pjmedia_vid_dev_stream *strm)
-
pj_status_t (*get_frame)(pjmedia_vid_dev_stream *strm, pjmedia_frame *frame)
-
pj_status_t (*put_frame)(pjmedia_vid_dev_stream *strm, const pjmedia_frame *frame)
-
pj_status_t (*stop)(pjmedia_vid_dev_stream *strm)
-
pj_status_t (*destroy)(pjmedia_vid_dev_stream *strm)
-
pj_status_t (*get_param)(pjmedia_vid_dev_stream *strm, pjmedia_vid_dev_param *param)
-
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
-
struct pjmedia_vid_dev_stream::[anonymous] sys
Internal data to be initialized by video subsystem
-
pjmedia_vid_dev_stream_op *op
Operations
-
unsigned drv_idx
-
pj_status_t pjmedia_vid_dev_get_local_index(pjmedia_vid_dev_index id, pjmedia_vid_dev_factory **p_f, unsigned *p_local_index)