cURL / Mailing Lists / curl-library / Single Mail

curl-library

multi interface and RTSP interleved

From: Paweł Kopalko <pawel.kopalko_at_gmail.com>
Date: Tue, 13 Sep 2016 13:39:03 +0200

Hi,

>What libcurl version are you using on what platform?

sorry I forgot to state the "what-where-why" ;)
I'm using a curl-7.49.1 compiled as static library with a ubuntu 16.04
32bit (for POC, the target system is MIPS), the rtsp server is spook on a
webcam, I use interleave since I plan to tunnel RTP using curl.

>You remove the same easy handle twice? And you set an option in between
which looks really strange?

 I found out I remove the handle twice after I posted the example I fixed
that but there is no change in the behaviour. The idea about the "strange"
option is from a response from this mailing list:
https://curl.haxx.se/mail/lib-2016-03/0029.html
I assumed CURL_RTSPREQ_RECEIVE is required in multi also

>You didn't elaborate on what the differences in beaviors are between your
>easy-using app and your multi-version so it's not easy for anyone to
guess.

The problem that I'm facing is that the easy_perform version works great,
and the multi, just sort of "falls through" to the rtsp_teardown, and the
write callback gets never called at all. I have about two or three calls
to multi_perform inside the do {} while() and then it just exits, I can set
verbose and provide logs if that would help

what should in fact be in the do {} while() loop that calls multi_perform ?
my understanding is that after I issue rtsp_play with transport set to
interleaved the lib reads something constantly so there should always be
something to do for the multi_perform. But what I see is that it basically
ends something and then exits loop, like there was nothing more to do.
Should I put the do {} while () in another loop? something like that:

rtsp_options()
rtsp_describe()
rtsp_setup()
rtsp_play()
add handle to multi
while(run)
{
   do
    {
      multi_perform( &pending_handle)
     } while (pending_handle)
}
rtsp_teardown()

BR Pawel

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-09-13