Prosody generic: API: sm_channel_input_data_redirect

Prototype Definition

int sm_channel_input_data_redirect(struct sm_channel_input_data_redirect_parms *redp)

Parameters

*redp
a structure of the following type:
typedef struct sm_channel_input_data_redirect_parms {
	tSMChannelId channel;					/* in */
	tSM_INT enable;						/* in */
	tSMDatafeedId datafeed;					/* out */
} SM_CHANNEL_INPUT_DATA_REDIRECT_PARMS;

Description

When enable is non-zero, request a datafeed identifier from an input channel that will carry the data usually retrieved through the api (e.g. sm_get_recorded_data() ). This identifer can subsequently be used in a call to any of the *_datafeed_connect() functions to connect the input data from the channel to a destination. Note though that the data will be raw octets and not audio data, so the destination must be expecting raw octets. The identifier is valid until the channel is released or this function is called with enable set to zero.

There must be no operation in progress (e.g. record) on the input half of the channel when this function is called.

Datafeed connections can only be made between objects allocated on the same tSMModuleId.

Requires the modules datafeed and redirect to have been downloaded.

Fields

channel
The channel to redirect the received data on
enable
Enables (non-zero) or disables (zero) the redirection of data
datafeed
The datafeed which the received data is passed to when redirected

Returns

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


This function is part of the Prosody generic API.