Prosody Audio Video Format (AVF): API: sm_avfplay_put_data

This function is deprecated.

Prototype Definition

int sm_avfplay_put_data(struct sm_avfplay_put_data_parms *datap)

Parameters

*datap
a structure of the following type:
typedef struct sm_avfplay_put_data_parms {
	tSMAVFplayId avfplay;					/* in */
	char *data;						/* in */
	tSM_INT max_length;					/* in */
	tSM_INT done_length;					/* out */
} SM_AVFPLAY_PUT_DATA_PARMS;

Description

Attempt to write data to a AVF player. Less than the maximum will be written when either:

To permit maximum system throughput, this function refuses to write to an AVF player whose status has changed since it was last checked. This allows an application to avoid checking the status during bulk data transfer. The application only needs to check the status (using sm_avfplay_status()) when a call to sm_avfplay_put_data() returns with done_length equal to zero. If a status change occurs while writing data, done_length may indicate that some, but not all, of the data was written. In this case, often the most convenient way for an application to react is to note how much data has been sent, and to try to send more. Since the new attempt will indicate that no data was written, it means that the application does not need to have different cases to handle a status change at the beginning of the data buffer and a status change after a partial write.

Fields

avfplay (Deprecated)
The AVF player
data (Deprecated)
A pointer to the data to be written.
max_length (Deprecated)
The amount of data in the buffer.
done_length (Deprecated)
The amount of data actually written.

Returns

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


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