From 8d0b0e89493bfebe5de2e7c927cf0ba0f22382fb Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Thu, 18 Jun 2015 17:33:58 +0200 Subject: [PATCH] live555: Add satip support Register a satip-access, which uses a hardcoded default SDP dataset instead of querying it via DESCRIBE. While some SAT>IP servers implement a common DESCRIBE the spec is allowing servers to only support DESCRIBE of already configured sessions, which requires SETUP to be executed before DESCRIBE can be used at all. Signed-off-by: Julian Scheel Signed-off-by: Jean-Baptiste Kempf --- modules/access/live555.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp index 4b84e8e9ca..3e10492cae 100644 --- a/modules/access/live555.cpp +++ b/modules/access/live555.cpp @@ -102,7 +102,7 @@ vlc_module_begin () add_submodule () set_description( N_("RTSP/RTP access and demux") ) - add_shortcut( "rtsp", "pnm", "live", "livedotcom" ) + add_shortcut( "rtsp", "pnm", "live", "livedotcom", "satip" ) set_capability( "access_demux", 0 ) set_callbacks( Open, Close ) add_bool( "rtsp-tcp", false, @@ -332,6 +332,17 @@ static int Open ( vlc_object_t *p_this ) while( (p = strchr( p, ' ' )) != NULL ) *p = '+'; } + if( strcasecmp( p_demux->psz_access, "satip" ) == 0 ) + { + asprintf(&p_sys->p_sdp, "v=0\r\n" + "o=- 0 %s\r\n" + "s=SATIP:stream\r\n" + "i=SATIP RTP Stream\r\n" + "m=video 0 RTP/AVP 33\r\n" + "a=control:rtsp://%s\r\n\r\n", + p_sys->url.psz_host, p_sys->psz_path); + } + if( p_demux->s != NULL ) { /* Gather the complete sdp file */ @@ -524,7 +535,15 @@ static void continueAfterOPTIONS( RTSPClient* client, int result_code, result_code == 0 && result_string != NULL && strstr( result_string, "GET_PARAMETER" ) != NULL; - client->sendDescribeCommand( continueAfterDESCRIBE ); + if( p_sys->p_sdp == NULL ) + { + client->sendDescribeCommand( continueAfterDESCRIBE ); + } + else + { + p_sys->b_error = false; + p_sys->event_rtsp = 1; + } delete[] result_string; } -- GitLab