[Live-devel] rtsp client and server in the same app
Mat Laibowitz
mlaibow.davinci at gmail.com
Sun Oct 26 04:04:33 PDT 2008
Yeah, but one is a server and one is a client, so it should work that way I
think.
Maybe I am missing something about ports in multicast.
Thanks,
-mat
2008/10/26 Yedidia Amit <amit.yedidia at elbitsystems.com>
> I think its beacuse both are trying to use the same port (8554)
>
>
> Regards,
>
> Amit Yedidia
>
> Elbit System Ltd.
>
> Email: amit.yedidia at elbitsystems.com
>
> Tel: 972-4-8318905
>
> ----------------------------------------------------------
>
>
>
> ------------------------------
> *From:* live-devel-bounces at ns.live555.com [mailto:
> live-devel-bounces at ns.live555.com] *On Behalf Of *Mat Laibowitz
> *Sent:* Sunday, October 26, 2008 11:53 AM
> *To:* live-devel at ns.live555.com; mlaibow.davinci at gmail.com
> *Subject:* Re: [Live-devel] rtsp client and server in the same app
>
> A little more info. It is not the SDP request that fails, it is the OPTIONS
> request that returns NULL.
> I added a check fro null after the getOptionsRequest as shown below. And it
> returns NULL when called in the same program as starting a RTSP server.
> So the actual error message is the same, but it is from the OPTIONS request
> and not the SDP request.
> -mat
>
> Created Client:
> 0xc3b98
>
> Sending request: OPTIONS rtsp://18.85.45.131:8554/videoStreamRTSP/1.0
>
> CSeq:
> 1
>
> User-Agent: spinner_video_control (LIVE555 Streaming Media
> v2008.09.02)
>
>
>
>
>
> RTSP "OPTIONS" request failed:Failed to read response: Cannot assign
> requested
> address
>
> Sending request: DESCRIBE rtsp://18.85.45.131:8554/videoStreamRTSP/1.0
>
> CSeq:
> 2
>
> Accept:
> application/sdp
>
> User-Agent: spinner_video_control (LIVE555 Streaming Media
> v2008.09.02)
>
>
> -------------------------------------------------------
>
>
>
>
> Failed to get a SDP description from URL "rtsp://
> 18.85.45.131:8554/videoStream": Failed to read response: Cannot assign
> requested address
> /
>
> if (sendOptionsRequest) {
> // Begin by sending an "OPTIONS" command:
> char* optionsResponse
> = getOptionsResponse(ourClient, rtspUrl, username, password);
> if (sendOptionsRequestOnly) {
> if (optionsResponse == NULL) {
> *env << clientProtocolName << " \"OPTIONS\" request failed: "
> << env->getResultMsg() << "\n";
> } else {
> *env << clientProtocolName << " \"OPTIONS\" request returned: "
> << optionsResponse << "\n";
> }
> return shutdown(FAILURE);
> }
> if(optionsResponse == NULL) {
> *env << clientProtocolName << " \"OPTIONS\" request failed:" <<
> env->getResultMsg() << "\n";
> } else {
> *env << clientProtocolName << " \"OPTIONS\" request returned: "
> << optionsResponse << "\n";
> }
> delete[] optionsResponse;
> }
>
>
> On Sun, Oct 26, 2008 at 5:20 AM, Mat Laibowitz <mlaibow.davinci at gmail.com>wrote:
>
>> So I have made it pretty far referencing the complete source code and the
>> test programs.
>> But I am a bit stuck on one issue.
>> I have built a RTSP server with a custom FrameSource that talks to my
>> hardware for encoding.
>> This works great, it uses the background read handling and can be received
>> by openRTSP or mplayer or vlc or quicktime without fail.
>>
>> I have also created a custom client based on openRTSP that talks to my
>> hardware to decode the stream and display it on the framebuffer or record it
>> to a file. This also works great and when the two programs are on different
>> nodes the client can receive from the server.
>>
>> If I put them both on the same node, they also work, provided that I turn
>> off the connection to the hardware enc/dec in one of the programs (the
>> client will just record the mpeg4 stream to file and not decode it and
>> display it).
>> This is because of a limit of the platform that I can only access the
>> hardware codec from one process/program.
>>
>> So I am trying to combine the client and the server in one application.
>> The code is essentially the same, it just uses one environment and one
>> call to the task loop.
>>
>> The RTSP server starts up fine and I can receive the video anywhere
>> including with a version of the same application with the server and
>> hardware decoding turned off.
>>
>> However, the client always fails when started from the same program as the
>> server.
>> The error message is:
>> Failed to get a SDP description from URL "rtsp://
>> 18.85.45.131:8554/videoStream":
>> Failed to read response: Cannot assign requested address
>>
>> I am guessing that the client somehow is trying to use some resource that
>> is already in use by the server. But I am not sure what that can be. Any
>> help would be greatly appreciated. I thought it was a port or sockets
>> problem at first, but one is a client and one is a server, and they both
>> work if they are in separate programs on the same device.
>>
>> Thanks for a great system, I am quite happy to have my devices streaming
>> video between them, I just need to solve this one integration issue and it
>> will be great.
>>
>> -mat
>>
>
> **
> *The information in this e-mail transmission contains proprietary and
> business
> sensitive information. Unauthorized interception of this e-mail may
> constitute
> a violation of law. If you are not the intended recipient, you are hereby
> notified that any review, dissemination, distribution or duplication of
> this
> communication is strictly prohibited. You are also asked to contact the
> sender
> by reply email and immediately destroy all copies of the original message.
> *
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081026/4aac5f3d/attachment-0001.html>
More information about the live-devel
mailing list