Commit 3d213b2f authored by Marian Durkovic's avatar Marian Durkovic

send proper info in m= line of SAP announcements:

  m=video 1234 udp 33      for raw UDP
  m=video 1234 RTP/AVP 33  for RTP
parent 771d94ca
...@@ -253,6 +253,7 @@ struct session_descriptor_t ...@@ -253,6 +253,7 @@ struct session_descriptor_t
sap_session_t *p_sap; /* If we have a sap session, remember it */ sap_session_t *p_sap; /* If we have a sap session, remember it */
char *psz_sdp; char *psz_sdp;
vlc_bool_t b_rtp;
}; };
#define METHOD_TYPE_SAP 1 #define METHOD_TYPE_SAP 1
......
...@@ -369,6 +369,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -369,6 +369,7 @@ static int Open( vlc_object_t *p_this )
p_session->i_ttl = config_GetInt( p_sout, "ttl" ); p_session->i_ttl = config_GetInt( p_sout, "ttl" );
p_session->i_payload = 33; p_session->i_payload = 33;
p_session->b_rtp = strstr( psz_access, "rtp") ? 1 : 0;
msg_Info( p_this, "SAP Enabled"); msg_Info( p_this, "SAP Enabled");
......
...@@ -615,15 +615,16 @@ static char *SDPGenerate( sap_handler_t *p_sap, ...@@ -615,15 +615,16 @@ static char *SDPGenerate( sap_handler_t *p_sap,
"s=%s\r\n" "s=%s\r\n"
"t=0 0\r\n" "t=0 0\r\n"
"c=IN IP%c %s/%d\r\n" "c=IN IP%c %s/%d\r\n"
"m=video %d udp %d\r\n" "m=video %d %s %d\r\n"
"a=tool:"PACKAGE_STRING"\r\n" "a=tool:"PACKAGE_STRING"\r\n"
"a=type:broadcast\r\n" "a=type:broadcast\r\n"
"%s%s%s", "%s%s%s",
i_sdp_id, i_sdp_version, i_sdp_id, i_sdp_version,
ipv, p_addr->psz_machine, ipv, p_addr->psz_machine,
psz_name, ipv, psz_name, ipv, psz_uri, p_session->i_ttl,
psz_uri, p_session->i_ttl, p_session->i_port,
p_session->i_port, p_session->i_payload, p_session->b_rtp ? "RTP/AVP" : "udp",
p_session->i_payload,
psz_group ? "a=x-plgroup:" : "", psz_group ? "a=x-plgroup:" : "",
psz_group ? psz_group : "", psz_group ? "\r\n" : "" ) == -1 ) psz_group ? psz_group : "", psz_group ? "\r\n" : "" ) == -1 )
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment