Hello,

 

            I am currently working on an rtsp client application on an
embedded system and have been trying to use libcurl version 7.21.7.

 

            The problem that I have is that whilst I can receive the
options, describe, setup and teardown responses I cannot receive any
data packets even though they are clearly being sent from the server
(captured in wireshark). Am I correct in saying that once the following
sequence has been sent data should arrive in the desired function
'rtsp_write' or am I missing something critical. 

 

curl_easy_set_opt(curl, CURLOPT_NOPROGRESS, 1L);

curl_easy_set_opt(curl, CURLOPT_VERBOSE, 1L);

curl_easy_set_opt(curl, CURLOPT_URL, url);

curl_easy_set_opt(curl, CURLOPT_WRITEHEADDER, stdout);

 

// options

curl_easy_set_opt(curl, CURLOPT_RTSP_STREAM_URI, uri);

curl_easy_set_opt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);

curl_easy_perform(curl);

 

// describe

curl_easy_set_opt(curl, CURLOPT_WRITEDATA, sdp);

curl_easy_set_opt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE);

curl_easy_perform(curl);

curl_easy_set_opt(curl, CURLOPT_WRITEDATA, stdout);

 

// setup the stream

curl_easy_set_opt(curl, CURLOPT_RTSP_STREAM_URI, uri);

curl_easy_set_opt(curl, CURLOPT_RTSP_TRANSPORT, transport);

curl_easy_set_opt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);

curl_easy_perform(curl);

 

// play the stream

curl_easy_set_opt(curl, CURLOPT_RTSP_STREAM_URI, uri);

curl_easy_set_opt(curl, CURLOPT_RTSP_RANGE, NULL);

curl_easy_set_opt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_PLAY);

curl_easy_perform(curl);

 

// setup receive function for data

curl_easy_set_opt(curl, CURLOPT_WRITEFUNCTION, rtsp_write);

curl_easy_set_opt(curl, CURLOPT_WRITEDATA, NULL);

 

// process loop 

while(!ctx->terminate)

{

            SDL_Delay(10);

}

 

// end stream

curl_easy_set_opt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_TEARDOWN);

curl_easy_perform(curl);

 

 

Kind Regards

Michael Dale

Building Block Video Ltd
17 Apex Park
Hailsham
East Sussex, 
BN27 3JU
England

Tel:+44(0)1323 842727
Fax:+44(0)1323 842728

 <mailto:[email protected]> mailto:[email protected]

Any emails from me, and any attached files, are intended only for the
person, persons, entity, or entities to which they are addressed; they
may contain confidential and/or privileged materials, which should not
be retransmitted or otherwise disseminated.
If you receive an email from me in error, please let me know, and delete
the material from your computer.

 

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to