Home --> Documentations --> PJMEDIA Reference
Video and audio playback from AVI file.
More...
|
pj_status_t | pjmedia_avi_player_create_streams (pj_pool_t *pool, const char *filename, unsigned flags, pjmedia_avi_streams **p_streams) |
|
unsigned | pjmedia_avi_streams_get_num_streams (pjmedia_avi_streams *streams) |
|
pjmedia_avi_stream * | pjmedia_avi_streams_get_stream (pjmedia_avi_streams *streams, unsigned idx) |
|
pjmedia_avi_stream * | pjmedia_avi_streams_get_stream_by_media (pjmedia_avi_streams *streams, unsigned start_idx, pjmedia_type media_type) |
|
pjmedia_port * | pjmedia_avi_stream_get_port (pjmedia_avi_stream *stream) |
|
pj_ssize_t | pjmedia_avi_stream_get_len (pjmedia_avi_stream *stream) |
|
pj_status_t | pjmedia_avi_stream_set_eof_cb (pjmedia_avi_stream *stream, void *user_data, pj_status_t(*cb)(pjmedia_avi_stream *stream, void *usr_data)) |
|
pj_status_t | pjmedia_avi_stream_set_eof_cb2 (pjmedia_avi_stream *stream, void *user_data, void(*cb)(pjmedia_avi_stream *stream, void *usr_data)) |
|
◆ pjmedia_avi_stream
◆ pjmedia_avi_streams
Opaque data type for AVI streams. AVI streams is a collection of zero or more AVI stream.
◆ pjmedia_avi_file_player_option
AVI file player options.
Enumerator |
---|
PJMEDIA_AVI_FILE_NO_LOOP | Tell the file player to return NULL frame when the whole file has been played.
|
◆ pjmedia_avi_player_create_streams()
Create avi streams to play an AVI file. AVI player supports reading AVI file with uncompressed video format and 16 bit PCM or compressed G.711 A-law/U-law audio format.
- Parameters
-
pool | Pool to create the streams. |
filename | File name to open. |
flags | Avi streams creation flags. |
p_streams | Pointer to receive the avi streams instance. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_avi_streams_get_num_streams()
Get the number of AVI stream.
- Parameters
-
- Returns
- The number of AVI stream.
◆ pjmedia_avi_streams_get_stream()
Return the idx-th stream of the AVI streams.
- Parameters
-
streams | The AVI streams. |
idx | The stream index. |
- Returns
- The AVI stream or NULL if it does not exist.
◆ pjmedia_avi_streams_get_stream_by_media()
Return an AVI stream with a certain media type from the AVI streams.
- Parameters
-
streams | The AVI streams. |
start_idx | The starting index. |
media_type | The media type of the stream. |
- Returns
- The AVI stream or NULL if it does not exist.
◆ pjmedia_avi_stream_get_port()
Return the media port of an AVI stream.
- Parameters
-
- Returns
- The media port.
◆ pjmedia_avi_stream_get_len()
Get the data length, in bytes.
- Parameters
-
- Returns
- The length of the data, in bytes. Upon error it will return negative value.
◆ pjmedia_avi_stream_set_eof_cb()
Register a callback to be called when the file reading has reached the end of file. If the file is set to play repeatedly, then the callback will be called multiple times. Note that only one callback can be registered for each AVI stream.
- Parameters
-
stream | The AVI stream. |
user_data | User data to be specified in the callback |
cb | Callback to be called. If the callback returns non- PJ_SUCCESS, the playback will stop. Note that if application destroys the file port in the callback, it must return non-PJ_SUCCESS here. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_avi_stream_set_eof_cb2()
Register a callback to be called when the file reading has reached the end of file. If the file is set to play repeatedly, then the callback will be called multiple times. Note that only one callback can be registered for each AVI stream.
- Parameters
-
stream | The AVI stream. |
user_data | User data to be specified in the callback |
cb | Callback to be called. Note that if application wishes to stop the playback, it can disconnect the port in the callback, and only after all connections have been removed could the application safely destroy the port. |
- Returns
- PJ_SUCCESS on success.
PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.
|