EpStreamRead :
Read data from a stream.
Syntax
CMAPI bool EpStreamRead (
HANDLE hStream,
PUCHAR pBuffer,
int bufLen,
PVOID pAppData,
PRTPDATACALLBACK pCallback
);
Parameters
hStream
Stream handle returned by EpGetStreamHandle.
pBuffer
Pointer to a buffer for incoming data.
bufLen
Buffer size
pAppData
Pointer to an application data area. It will be associated with the buffer and will be passed back to the application callback function as the pAppData parameter.
pCallback
Pointer to an application callback function to be called when data buffer is received or an error occurred.
Return Value
If no errors occurs, this function returns true. If an error occurs, false is returned, and a specific error code can be retrieved by calling EpApiGetLastError.
ERROR CODE | DESCRIPTION |
EP_ERR_INIT | EpAPI is not initialized. |
EP_ERR_HANDLE_INVALID | Specified stream handle is invalid. |
EpStreamWrite :
Write data to a stream.
Syntax
CMAPI bool EpStreamWrite (
HANDLE hStream,
PUCHAR pBuffer,
int bufLen,
PVOID pAppData,
PRTPDATACALLBACK pCallback
);
Parameters
hStream
Stream handle returned by EpGetStreamHandle.
pBuffer
Pointer to a buffer which contains data.
bufLen
Data length
pAppData
Pointer to an application data area. It will be associated with the buffer and will be passed back to the application callback function as the pAppData parameter.
pCallback
Pointer to an application callback function to be called when data buffer has been written or an error occurred.
Return Value
If no error occurs, this function returns true. If an error occurs, false is returned, and a specific error code can be retrieved by calling EpApiGetLastError.
ERROR CODE | DESCRIPTION |
EP_ERR_INIT | EpAPI is not initialized. |
EP_ERR_HANDLE_INVALID | Specified stream handle is invalid. |
EpStreamCodecInGet :
Returns stream inbound codec format information.
Syntax
CMAPI bool EpStreamCodecInGet (
HANDLE hStream,
PWAVEFORMATEX pWaveFormat
);
Parameters
hStream
Stream handle returned by EpGetStreamHandle.
pWaveFormat
Pointer to a WAVEFORMATEX data structure. Upon successful completion of the request this structure is filled with stream inbound codec format data.
Return Value
If no error occurs, this function returns true. If an error occurs, false is returned, and a specific error code can be retrieved by calling EpApiGetLastError.
ERROR CODE | DESCRIPTION |
EP_ERR_INIT | EpAPI is not initialized. |
EP_ERR_HANDLE_INVALID | Specified stream handle is invalid. |
EpStreamCodecInSet:
Sets stream inbound codec format.
Syntax
CMAPI bool EpStreamCodecInSet (
HANDLE hStream,
PWAVEFORMATEX pWaveFormat,
ULONG pktSizeMs
);
Parameters
hStream
Stream handle returned by EpGetStreamHandle.
pWaveFormat
Pointer to a WAVEFORMATEX data structure which contains codec information.
pktSizeMs
Packet size in milliseconds. If value 0 (zero) is specified a default value (20) is used.
Return Value
If no error occurs, this function returns true. If an error occurs, false is returned, and a specific error code can be retrieved by calling EpApiGetLastError.
ERROR CODE | DESCRIPTION |
EP_ERR_INIT | EpAPI is not initialized. |
EP_ERR_HANDLE_INVALID | Specified stream handle is invalid. |
EpStreamCodecOutGet :
Returns stream outbound codec format information.
Syntax
CMAPI bool EpStreamCodecOutGet (
HANDLE hStream,
PWAVEFORMATEX pWaveFormat
);
Parameters
hStream
Stream handle returned by EpGetStreamHandle.
pWaveFormat
Pointer to a WAVEFORMATEX data structure. Upon successful completion of the request this structure is filled with stream outbound codec format data.
Return Value
If no error occurs, this function returns true. If an error occurs, false is returned, and a specific error code can be retrieved by calling EpApiGetLastError.
ERROR CODE | DESCRIPTION |
EP_ERR_INIT | EpAPI is not initialized. |
EP_ERR_HANDLE_INVALID | Specified stream handle is invalid. |
EpStremCodecOutSet :
Sets stream outbound codec format.
Syntax
CMAPI bool EpStreamCodecInSet (
HANDLE hStream,
PWAVEFORMATEX pWaveFormat,
ULONG pktSizeMs
);
Parameters
hStream
Stream handle returned by EpGetStreamHandle.
pWaveFormat
Pointer to a WAVEFORMATEX data structure which contains codec information.
pktSizeMs
Packet size in milliseconds. If value 0 (zero) is specified a default value (20) is used.
Return Value
If no error occurs, this function returns true. If an error occurs, false is returned, and a specific error code can be retrieved by calling EpApiGetLastError
ERROR CODE | DESCRIPTION |
EP_ERR_INIT | EpAPI is not initialized. |
EP_ERR_HANDLE_INVALID | Specified stream handle is invalid. |
Comments
0 comments
Please sign in to leave a comment.