Prosody Audio Video Format (AVF): API: sm_avfplay_sync

This function is deprecated.

Prototype Definition

int sm_avfplay_sync(struct sm_avfplay_sync_parms *avfsp)

Parameters

*avfsp
a structure of the following type:
typedef struct sm_avfplay_sync_parms {
	tSMAVFplayId avfplay;					/* in */
	tSMAVFplayId sync_avfplay;				/* in */
} SM_AVFPLAY_SYNC_PARMS;

Description

Ensures that all future playbacks on avfplay are synchronised with those on sync_avfplay. To achieve synchronised playbacks following a call to sm_avfplay_sync() , sm_avfplay_start() must be called on both avfplay and sync_avfplay . The playbacks can be started in any order. Once started, the playbacks will not process data until at least one full AVF frame has been put to both. If data is supplied to one playback before the other has started, that data will be buffered until the other playback has received at least one full AVF frame. Once the playbacks begin processing data, they progress as usual.

When two playbacks are synchronised and processing data, if one playback is stopped then restarted it will not re-synchronise with the running playback and an error will be returned. If both playbacks are stopped then restarted, the two playbacks will synchronise as described above.

Fields

avfplay (Deprecated)
A tSMAVFplayId that has been prevously created by a call to sm_avfplay_create().
sync_avfplay (Deprecated)
The tSMAVFplayId, that has been prevously created by a call to sm_avfplay_create(), of the player with which we wish to synchronise. Or, set to 0 to un-synchronise.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody Audio Video Format (AVF) API.