AVI File Writer
- group PJMEDIA_AVI_FILE_WRITE
Video and audio recording to AVI file.
Functions
-
pj_status_t pjmedia_avi_writer_create_streams(pj_pool_t *pool, const char *filename, pj_uint32_t max_fsize, unsigned num_streams, const pjmedia_format format[], unsigned flags, pjmedia_avi_streams **p_streams)
Create avi streams to write to an AVI file. AVI writer supports recording AVI file with uncompressed video format and 16 bit PCM.
Note that video recording file size can grow very quickly, and once it reaches the maximum size specified, the file will be automatically closed and the callback (if any) will be called.
- Parameters:
pool – Pool to create the streams.
filename – File name to write to.
max_fsize – Maximum file size.
num_streams – Number of streams to write. Typically this should be 2, one for video, and one for audio.
format – The format of the streams.
flags – Avi streams creation flags. Currently must be zero.
p_streams – Pointer to receive the avi streams instance.
- Returns:
PJ_SUCCESS on success.
-
pj_status_t pjmedia_avi_streams_set_cb(pjmedia_avi_streams *streams, void *user_data, void (*cb)(pjmedia_avi_streams *streams, void *usr_data))
Register the callback to be called when the file writing has reached maximum size.
- Parameters:
streams – The AVI writer streams.
user_data – User data to be specified in the callback, and will be given on the callback.
cb – Callback to be called.
- Returns:
PJ_SUCCESS on success.
-
pj_status_t pjmedia_avi_writer_create_streams(pj_pool_t *pool, const char *filename, pj_uint32_t max_fsize, unsigned num_streams, const pjmedia_format format[], unsigned flags, pjmedia_avi_streams **p_streams)