HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide
Table 3-2 RTSP Troubleshooting Tips
TipsScenarioAPI
The following is invalid:
rtsp_get_msg_hdr(msg,
RTSP_USER_AGENT_HDR, &arr,
&size);
Instead, use the following:
rtsp_get_msg_hdr(msg,
RTSP_USER_AGENT_HDR, ptr,
&size);
Using the address of an array when a
char ** expected as an argument.
Example:
char arr[10]; int size=10;
char **ptr = &arr;
rtsp_get_msg_hdr
Use:
rtsp_free_xport_spec(pxport)
Do not use:
rtsp_free_xport_specx(&xportspec)
Calling rtsp_free_* APIs with an
argument whose memory is not
dynamically allocated.
Example:
rtsp_xport_spec_t xportspec;
rtsp_xport_spec_t *pxport;
....
pxport =
rtsp_alloc_xport_spec(NULL);
All rtsp_free APIs
References to pxport after calling the
following is incorrect:
rtsp_free_xport_spec(pxport)
Referring pointers to rtsp_*
structures after they are freed using
the rtsp_free_* APIs.
All rtsp_free APIs
The following is an incorrect use of
rtsp_xport_spec_t:
rtsp_xport_spec_t xport; rtsp_msg_t
*msg; // Initialize msg xport.sport.rtp
= 7000; xport.sport.rtcp =
7001;rtsp_set_msg_hdr(msg,
RTSP_TRANSPORT_HDR, &xport, 0);
Use xport; as follows:
rtsp_xport_spec_t xport; rtsp_msg_t
*msg; // Initialize
msgrtsp_init_xport_spec(&xport);
xport.sport.rtp = 7000; xport.sport.rtcp
= 7001;rtsp_set_msg_hdr(msg,
RTSP_TRANSPORT_HDR, &xport, 0);
Using statically declared rtsp_*
structures without initializing them.
All rtsp_* data
structures
Troubleshooting SDP
This section describes how to troubleshoot Session Description Protocol (SDP) suite of
APIs.
The sdp_create_buf API
The definition of sdp_create_buf is as follows:
sdp_create_buf(sdp_t *sdp, char **sdp_buf, size_t *bufsize);
Troubleshooting SDP 83