/*****************************************************************************
* Preamble
*****************************************************************************/
+#include "config.h"
+#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#include <errno.h>
#include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/sout.h>
+#include <vlc_sout.h>
+#include <vlc_block.h>
-#include "vlc_httpd.h"
-#include "vlc_url.h"
-#include "network.h"
-#include "charset.h"
+#include <vlc_httpd.h>
+#include <vlc_url.h>
+#include <vlc_network.h>
+#include <vlc_charset.h>
/*****************************************************************************
* Module descriptor
#define PORT_VIDEO_LONGTEXT N_( \
"This allows you to specify the default video port for the RTP streaming." )
-#define TTL_TEXT N_("Time-To-Live (TTL)")
+#define TTL_TEXT N_("Hop limit (TTL)")
#define TTL_LONGTEXT N_( \
- "This allows you to specify the Time-To-Live for the output stream." )
+ "This is the hop limit (also known as \"Time-To-Live\" or TTL) of " \
+ "the multicast packets sent by the stream output (0 = use operating " \
+ "system built-in default).")
#define RFC3016_TEXT N_("MP4A LATM")
#define RFC3016_LONGTEXT N_( \
sout_stream_t *p_stream = (sout_stream_t*)p_this;
sout_instance_t *p_sout = p_stream->p_sout;
sout_stream_sys_t *p_sys = NULL;
- sout_cfg_t *p_cfg = NULL;
+ config_chain_t *p_cfg = NULL;
vlc_value_t val;
vlc_bool_t b_rtsp = VLC_FALSE;
- sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, p_stream->p_cfg );
+ config_ChainParse( p_stream, SOUT_CFG_PREFIX,
+ ppsz_sout_options, p_stream->p_cfg );
p_sys = malloc( sizeof( sout_stream_sys_t ) );
var_Get( p_stream, SOUT_CFG_PREFIX "sdp", &val );
if( *val.psz_string )
{
- sout_cfg_t *p_cfg;
+ config_chain_t *p_cfg;
SDPHandleUrl( p_stream, val.psz_string );
{
uint8_t *p_buffer = p_fmt->p_extra;
int i_buffer = p_fmt->i_extra;
- char *p_64_sps;
- char *p_64_pps;
+ char *p_64_sps = NULL;
+ char *p_64_pps = NULL;
char hexa[6];
while( i_buffer > 4 &&
}
else
id->psz_fmtp = strdup( "packetization-mode=1" );
+if( p_fmt->i_extra > 0 )
+msg_Dbg( p_stream, "WE HAVE %d bytes extra data", p_fmt->i_extra );
break;
case VLC_FOURCC( 'm', 'p', '4', 'v' ):
{
int i;
- if( psz_session ) return NULL;
+ if( !psz_session ) return NULL;
for( i = 0; i < p_stream->p_sys->i_rtsp; i++ )
{
answer->i_status = 200;
answer->psz_status = strdup( "OK" );
httpd_MsgAdd( answer, "Content-type", "%s", "application/sdp" );
-
+ httpd_MsgAdd( answer, "Content-Base", "%s/", p_sys->psz_rtsp_control );
answer->p_body = (uint8_t *)psz_sdp;
answer->i_body = strlen( psz_sdp );
break;
p_data+=3;
i_data-=3;
i_nal_type = p_data[0]&0x1f;
+
+ /* Skip global headers */
+ if( i_nal_type == 7 || i_nal_type == 8 )
+ return VLC_SUCCESS;
if( i_data <= i_max ) /* The whole pack will fit in one rtp payload */
{