- /* create the SDP for a muxed stream (only once) */
- /* FIXME http://www.faqs.org/rfcs/rfc4566.html
- o= - should be local username (no spaces allowed)
- o= time should be hashed with some other value to garantee uniqueness
- o= don't use the localhost address. use fully qualified domain name or IP4 address
- a= source-filter: we need our source address
- a= x-plgroup: (missing)
- RTP packets need to get the correct src IP address */
- if( ipv == '4'
- && net_AddressIsMulticast( VLC_OBJECT(p_stream), p_sys->psz_destination ) )
- {
- snprintf( psz_ttl, sizeof( psz_ttl ), "/%d", p_sys->i_ttl );
- psz_ttl[sizeof( psz_ttl ) - 1] = '\0';
- }
- else
- {
- psz_ttl[0] = '\0';
- }
-
- asprintf( &p_sys->psz_sdp,
- "v=0\r\n"
- /* FIXME: source address not known :( */
- "o=- "I64Fu" %d IN IP%c %s\r\n"
- "s=%s\r\n"
- "i=%s\r\n"
- "u=%s\r\n"
- "e=%s\r\n"
- "c=IN IP%c %s%s\r\n"
- "t=0 0\r\n" /* permanent stream */ /* when scheduled from vlm, we should set this info correctly */
- "a=tool:"PACKAGE_STRING"\r\n"
- "a=recvonly\r\n"
- "a=type:broadcast\r\n"
- "m=video %d RTP/AVP %d\r\n"
- "a=rtpmap:%d %s\r\n",
- p_sys->i_sdp_id, p_sys->i_sdp_version,
- ipv, ipv == '6' ? "::1" : "127.0.0.1" /* FIXME */,
- p_sys->psz_session_name,
- p_sys->psz_session_description,
- p_sys->psz_session_url,
- p_sys->psz_session_email,
- ipv, p_sys->psz_destination, psz_ttl,
- p_sys->i_port, p_sys->i_payload_type,
- p_sys->i_payload_type, psz_rtpmap );
- msg_Dbg( p_stream, "sdp=%s", p_sys->psz_sdp );
-
- /* create the rtp context */
- p_sys->ssrc[0] = rand()&0xff;
- p_sys->ssrc[1] = rand()&0xff;
- p_sys->ssrc[2] = rand()&0xff;
- p_sys->ssrc[3] = rand()&0xff;
- p_sys->i_sequence = rand()&0xffff;
- p_sys->i_timestamp_start = rand()&0xffffffff;