Files | |
file | avsync-soc.h |
RDK HAL AVSync Public API. | |
Data Structures | |
struct | AVSyncVideoFrame_ |
This structure is to encapsulate information related to a video frame's metadata. More... | |
Typedefs | |
typedef struct AVSyncVideoFrame_ | AVSyncVideoFrame |
typedef void(* | AVSyncFrameFree) (AVSyncVideoFrame *frame) |
Frame delete callback prototype. | |
Functions | |
void * | avsync_soc_init (int refreshRate, int syncType, int *sessionId, int *session) |
Initializes AV Sync session. | |
void | avsync_soc_term (void *sync, int session) |
Terminates AV Sync session. | |
int | avsync_soc_set_mode (void *sync, int type) |
Sets Mode for AV Sync session. | |
void | avsync_soc_free_frame_callback (void *sync, AVSyncFrameFree *freeCB) |
Registers the callback to free the allocated video frames and metadata. | |
bool | avsync_soc_push_frame (void *sync, AVSyncVideoFrame *f) |
Push a video frame to the AVSync module. | |
AVSyncVideoFrame * | avsync_soc_pop_frame (void *sync) |
Pop a video frame from the AVSync module. | |
void | avsync_soc_set_rate (void *sync, float rate) |
Sets playback rate for AV Sync session. | |
void | avsync_soc_pause (void *sync, bool pause) |
Pauses or resume AV Sync session. | |
void | avsync_soc_set_interval (void *sync, uint32_t interval) |
Sets vsync interval for AV Sync session. | |
void | avsync_soc_eos (void *sync) |
Signals EOS for AV Sync session. | |
typedef void(* AVSyncFrameFree) (AVSyncVideoFrame *frame) |
Frame delete callback prototype.
typedef struct AVSyncVideoFrame_ AVSyncVideoFrame |
void avsync_soc_eos | ( | void * | sync | ) |
Signals EOS for AV Sync session.
This function is used to signal the end of stream(EOS) to the AVSync module.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
void avsync_soc_free_frame_callback | ( | void * | sync, |
AVSyncFrameFree * | freeCB ) |
Registers the callback to free the allocated video frames and metadata.
This function is used to set the frame free callback function for an AVSync object.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | freeCB | - A pointer to the AVSyncFrameFree structure |
void * avsync_soc_init | ( | int | refreshRate, |
int | syncType, | ||
int * | sessionId, | ||
int * | session ) |
Initializes AV Sync session.
This function initializes AV Sync session and returns a pointer to an AVSync object used for audio-video synchronization.
[in] | refreshRate | - The display refresh rate in hertz Valid range: 1Hz to 1000Hz |
[in] | syncType | - The type of syncronization to use Valid range: 0 to maximum number of syncType |
[out] | sessionId | - A pointer to an integer that will be set to the ID of the avsync session. |
[out] | session | - A pointer to an integer that will be set to the file descriptor of the avsync session |
handle | for avsync module or null for failure |
void avsync_soc_pause | ( | void * | sync, |
bool | pause ) |
Pauses or resume AV Sync session.
This function is used to pause or resume playback of an AVSync object.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | pause | - a boolean value that indicates whether to pause (true) or resume (false) playback |
AVSyncVideoFrame * avsync_soc_pop_frame | ( | void * | sync | ) |
Pop a video frame from the AVSync module.
This function is used to pop/retrieve a video frame from the AVSync module's frame queue.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
A | pointer to the AVSyncVideoFrame structure that contains the frame metadata. Valid value: any non-zero value |
bool avsync_soc_push_frame | ( | void * | sync, |
AVSyncVideoFrame * | f ) |
Push a video frame to the AVSync module.
This function is used to push a video frame to the AVSync module for synchronization.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | f | - A pointer to the AVSyncVideoFrame structure that contains the frame metadata. Valid value: any non-zero value |
true | if successful, false otherwise |
void avsync_soc_set_interval | ( | void * | sync, |
uint32_t | interval ) |
Sets vsync interval for AV Sync session.
This function is used to set the interval between vertical synchronization (vsync interval) events for the AVSync module.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | interval | - the desired interval between vsync events. Valid range: 1-1000 milliseconds |
int avsync_soc_set_mode | ( | void * | sync, |
int | type ) |
Sets Mode for AV Sync session.
This function is used to set the synchronization mode for an AVSync object. Possible modes are Video Master, Audio Master and Program Clock Reference Master.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | type | - The new mode to set. Possible values are: 0, 1, 2 |
0 | if successful, -1 otherwise |
void avsync_soc_set_rate | ( | void * | sync, |
float | rate ) |
Sets playback rate for AV Sync session.
This function is used to set the playback rate/speed of an AVSync object
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | rate | - is the playback rate. Valid range: 0.0 to 256.0 |
void avsync_soc_term | ( | void * | sync, |
int | session ) |
Terminates AV Sync session.
This function is used to terminate and clean up resources associated with an AVSync object.
[in] | sync | - A pointer to the AVSync structure that was created by the avsync_soc_init() function |
[in] | session | - The file descriptor of the avsync session |