c++ - live555 asynchronous rtsp client -


Someone live555 RTSP client managed to get the job unexpectedly and share knowledge or better ... code Wants

typedef void (responseHandler) (RTSPClient * rtspClient, int resultcode, char * resultString);

When your handler is called, Live 555 will give you the following information:

  • The RTP client on which the command was issued -> You are later allowed to call the RTP method.

  • Result code that is 0 on success, positive if an RTSP error code was returned by the server, and if there were some network / socket error.

Use this information to decide on how to move forward in your handler Take a look at RTSPClient.hh where all this has been explained.

e.g. This means that when you want to call the sendDescribeCommand method:

  unsigned sendDescribeCommand (responseHandler * responseHandler, Authenticator * authenticator = NULL);  

After completion of DESCRIBE you have to specify which handler (signature handling handler) will be called. In your handler, you have to decide on the result code, whether you want to do a SETUP (specify a handler again) or finish (if any error has occurred).

As Jensb has suggested that OpenRTSP client is a very good starting point.


Comments