KEMBAR78
HPXMedia - 1.5 User Guide API Addendum | PDF | Pointer (Computer Programming) | Software Engineering
0% found this document useful (0 votes)
21 views5 pages

HPXMedia - 1.5 User Guide API Addendum

Uploaded by

Juan Calvo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views5 pages

HPXMedia - 1.5 User Guide API Addendum

Uploaded by

Juan Calvo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

HPX Media 1.

USER GUIDE API ADDENDUM:


The enclosed API reference supersedes any information documented in the 1.5 manual with respect to the following features.
 RTP Live Streaming
 Single Side Recording
 File Offset Recording
 New Codecs Supported

RTP LIVE STREAMING


The purpose of live streaming allows an application to send the mixed RTP stream to a remote IP destination for live monitoring.
To use this feature a forwarding license will be consumed for every live streaming session established.

Example: Monitoring 100 endpoints and Forwarding 10(recording). If you also want to offer live monitoring, 1 additional
forwarding license is required otherwise a forwarding license will be consumed that was required for recording.

To setup a live streaming session:


The application should invoke crCreateResource(). Each time a new RTP resource is created, one license resource is consumed.
Then the user application can begin RTP streaming to IP destination by invoking crStartRTP().

To stop a live streaming session:


The application should invoke crStopRTP() to stop streaming the RTP to the remote IP destination. Then call crDeleteResource() to
free up the media resource and license.

Support payload types for live streaming are: ulaw, alaw, GSM6.10, G723 and G729a with a fixed packet size of 30ms.

SINGLE SIDE RECORDING


The purpose of single side recording allows the application to record either the TX or RX media stream.

Use crSetParam() to disabling mixing. Select either the Primary (Tx) or Secondary (Rx) media stream and then forward the stream
to the Primary HPX Media port and set the Secondary port to 0. Refer to the manual to understand how to use crSetParam().

FILE OFFSET RECORDING


The purpose of the file offset feature allows an application to record from a specific location within a file and typically used to
append to the end of a previously recorded file. Use the crSetParam() to specify the offset position.

Options:
0 (default)
> 0, to specify specific location.
-1, NOT Supported

If the file name provided does not exist, HPX Media will create the file when recording is started and write the data to the file from
the offset position.

NEW CODECS SUPPORTED


 PCM8 – CR_ENC_RAW_PCM8
 ADPCM 32K – CR_ENC_RAW_ADPCM4

User Guide Addendum AudioCodes Page 1 of 5


HPX Media 1.5
CRCREATE RESOURCE ()
Description
This function allows the user application to create a new resource on the recording device. Currently, this function only allows
the user to create an RTP resource used for transmitting RTP media to a network device (IP address and port number). Each
time this function is invoked, one HPX Media license is required.

BOOL CR C REATE R ESOURCE (


const int nCrDevID,
const int nRecSessionID,
const int nResourceType,
MEDIA_INFO_PARAMS *pMediaInfoParams,
Int *pnResourceID,
ULONG *pErrorCode
);

P ARAMETERS
nCrDevID The non-negative number used to identify the recorder device.
nRecSessionID Record Session ID (0-max sessions)
nResourceType Currently the only supported option is CR_RESOURCE_TYPE_RTP
*pMediaInfoParams Pointer to a data structure used to identify IP endpoint - as transmit
mode is used, this is the destination IP address and port.
*pnResourceID Pointer to Resource ID returned to user by Recording device
*pErrorCode The error code if an error exits, ‘0’ if no Error

D ATA S TRUCTURE
STRUCTURE: MEDIA_INFO_PARAMS
Type Name Description
Char *stream_ip Destination IP
Int stream_port Destination Port
Int stream_payloadtype ulaw, alaw, GSM6.10, G723 & G729a
Int stream_proto CR_RESOURCE_TYPE_RTP
int Reserved[3]

R ETURN V ALUES
If the function succeeds, the return value is TRUE (1).
If the function fails, the return value will be FALSE (0). In this case, the user should check the
returned ErrorCode to determine the specific reason for error.

Possible errors (for this API) are:


 5 – HPX Media device is not opened
 7 – Invalid session ID
 19 – OS Failure
 33 – Resource already exists
 34 – OS Timeout

E VENTS
None

User Guide Addendum AudioCodes Page 2 of 5


HPX Media 1.5
CRD ELETE RESOURCE ()
Description
This function deletes the resource per the specific Resource ID.

BOOL CR C REATE R ESOURCE (


const int nCrDevID,
const int nRecSessionID,
const Int *pnResourceID,
ULONG *pErrorCode
);

P ARAMETERS
nCrDevID The non-negative number used to identify the recorder device.
nRecSessionID Record Session ID (0-max sessions)
*pnResourceID Pointer to Resource ID returned to user by Recording device
*pErrorCode The error code if an error exits, ‘0’ if no Error

R ETURN V ALUES
If the function succeeds, the return value is TRUE (1).
If the function fails, the return value will be FALSE (0). In this case, the user should check the
returned ErrorCode to determine the specific reason for error.

Possible errors (for this API) are:


 5 – HPX Media device is not opened
 7 – Invalid session ID
 19 – OS Failure
 32 – Resource not created, does not exist

E VENTS
None

User Guide Addendum AudioCodes Page 3 of 5


HPX Media 1.5
CRSTART RTP()
Description
This function is used to start RTP media using the specified Resource ID of type RTP. Currently only media can be transmitted to
a destination IP Address and port number using this function. Users can specify the CODEC type when using this function.

BOOL CR S TART RTP(


const int nCrDevID,
const int nRecSessionID,
const int nResourceID,
const int nMode,
CRRTP_PARAMS const *pCrRtpParams,
ULONG *pErrorCode
);

P ARAMETERS
nCrDevID The non-negative number used to identify the recorder device.
nRecSessionID Record Session ID (0-max sessions)
nResourceID ID of the resource that should be deleted
nMode Defines the mode of RTP transport, currently only transmit
(CR_MODE_RTP_TX) is supported
*pCrRtpParams Pointer to a data structure used to identify IP endpoint - as transmit
mode is used, this is the destination IP address and port.
*pErrorCode The error code if an error exits, ‘0’ if no Error

D ATA S TRUCTURE
STRUCTURE: CRRTP_PARAMS
Type Name Description
const ULONG ulRtpCoderType The type of CODEC of the transmitted RTP
const ULONG ulIPAddr Destination IP Address
const USHORT usUDPPort Port used by the destination device to receive
incoming RTP
const USHORT usframseSize Not supported at this time
const USHORT usFramesPerPkt Not supported at this time

R ETURN V ALUES
If the function succeeds, the return value is TRUE (1).
If the function fails, the return value will be FALSE (0). In this case, the user should check the
returned ErrorCode to determine the specific reason for error.

Possible errors (for this API) are:


 3 – Invalid IP Address
 5 – HPX Media device is not opened
 7 – Invalid session ID
 19 – OS Failure
 22 – Already activated

E VENTS
None

User Guide Addendum AudioCodes Page 4 of 5


HPX Media 1.5
CRSTOPRTP()
Description
This function is used to stop the transport of RTP on this resource. The resource will not be deleted unless user invokes
crDeleteResource().

BOOL CR S TOP RTP(


const int nCrDevID,
const int nRecSessionID,
const int nResourceID,
const int nMode,
ULONG *pErrorCode
);

P ARAMETERS
nCrDevI The non-negative number used to identify the recorder device.
nRecSessionID Record Session ID (0-max sessions)
nResourceID ID of the resource that should be deleted
nMode Defines the mode of RTP transport, currently only transmit
(CR_MODE_RTP_TX) is supported
*pErrorCode The error code if an error exits, ‘0’ if no Error

R ETURN V ALUES
If the function succeeds, the return value is TRUE (1).
If the function fails, the return value will be FALSE (0). In this case, the user should check the
returned ErrorCode to determine the specific reason for error.

Possible errors (for this API) are:


 5 – HPX Media device is not opened
 7 – Invalid session ID
 9 – Session not attached
 19 – OS Failure
 20 – RTP has not been activated

E VENTS
None

User Guide Addendum AudioCodes Page 5 of 5

You might also like