SharpRTSP icon indicating copy to clipboard operation
SharpRTSP copied to clipboard

make "describeResponse" available as member

Open ChristophKrause opened this issue 6 years ago • 7 comments

Within describeResponse the SDP is read and parsed.

I see no way to get o not parsed information.

For example: I need the of a=framerate:XX because the fr is not always provided with the SPS

ChristophKrause avatar Mar 21 '19 13:03 ChristophKrause

You can already get the SDP as a string, just pop it through this lib.

https://github.com/clux/sdp-transform

winkmichael avatar Mar 21 '19 13:03 winkmichael

thanks for the link. parsing is not the problem, but getting the sdp string with making a second connection to the source is something i do not really like.

But i do not see a ways with the current verison of this lib.

ChristophKrause avatar Mar 21 '19 13:03 ChristophKrause

The SDP is in the message response of DESCRIBE. You can access in Data propertie. See https://github.com/ngraziano/SharpRTSP/blob/master/RtspClientExample/RTSPClient.cs#L706 for an exemple. System.Text.Encoding.UTF8.GetString(message.Data) allow to get it as string.

Where do you need it ? (which program are you using, clientExample ? other custom ?)

ngraziano avatar Mar 21 '19 14:03 ngraziano

I am using custom.

This is to receive Axis RTSP Streams, they do not offer framerate with the sps.

Am I overlooking something? How can I set the Rtsp_MessageReceived event. In my implementation I have the following lines sing (var rtspClient = new RtspClient(connectionParameters)) { rtspClient.FrameReceived += receiveFrame; ... As far as I can see this event is offered only internal :(

ChristophKrause avatar Mar 21 '19 15:03 ChristophKrause

Not all cameras include the FPS value in the SDP.

winkmichael avatar Mar 21 '19 15:03 winkmichael

RTSPClient.cs is an example of client, feel free to modify it after copying it to your project.

Around line 706 , you can store the SDP in a new global property of your version of RTSPClient class. You can also create a new event and call it around same line to notify the receive of the SDP.

If your modification are interesting for other you can create a pull request after that.

ngraziano avatar Mar 21 '19 15:03 ngraziano

Ill take a look at this and will do some modifications .

thx for the advise

ChristophKrause avatar Mar 22 '19 06:03 ChristophKrause