static sout_access_out_t *GrabberCreate( sout_stream_t *p_sout );
static void ThreadSend( vlc_object_t *p_this );
-static void SDPHandleUrl( sout_stream_t *, char * );
+static void SDPHandleUrl( sout_stream_t *, const char * );
static int SapSetup( sout_stream_t *p_stream );
static int FileSetup( sout_stream_t *p_stream );
/*****************************************************************************
* SDPHandleUrl:
*****************************************************************************/
-static void SDPHandleUrl( sout_stream_t *p_stream, char *psz_url )
+static void SDPHandleUrl( sout_stream_t *p_stream, const char *psz_url )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
vlc_url_t url;
msg_Err (p_stream, "bad SRTP key/salt combination (%m)");
goto error;
}
+ id->i_sequence = 0; /* FIXME: awful hack for libvlc_srtp */
}
vlc_mutex_init( &id->lock_sink );
case VLC_FOURCC( 'm', 'p', '3', ' ' ):
id->i_payload_type = 14;
id->psz_enc = "MPA";
+ id->i_clock_rate = 90000; /* not 44100 */
id->pf_packetize = rtp_packetize_mpa;
break;
case VLC_FOURCC( 'm', 'p', 'g', 'v' ):
block_t *p_next;
assert( p_stream->p_sys->p_mux == NULL );
+ (void)p_stream;
while( p_buffer != NULL )
{
sout_stream_id_t *id = (sout_stream_id_t *)p_this;
unsigned i_caching = id->i_caching;
- while( !id->b_die )
+ while( vlc_object_alive (id) )
{
block_t *out = block_FifoGet( id->p_fifo );
if( out == NULL )
if( id->srtp )
{ /* FIXME: this is awfully inefficient */
size_t len = out->i_buffer;
- int val = srtp_send( id->srtp, out->p_buffer, &len,
- out->i_buffer );
- if( val == ENOSPC )
- {
- out = block_Realloc( out, 0, len );
- if( out == NULL )
- continue;
- val = srtp_send( id->srtp, out->p_buffer, &len,
- out->i_buffer );
- }
+ out = block_Realloc( out, 0, len + 10 );
+ out->i_buffer = len;
+
+ int val = srtp_send( id->srtp, out->p_buffer, &len, len + 10 );
if( val )
{
errno = val;
}
-static int AccessOutGrabberWriteBuffer( sout_stream_t *p_stream,
- const block_t *p_buffer )
+static ssize_t AccessOutGrabberWriteBuffer( sout_stream_t *p_stream,
+ const block_t *p_buffer )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_t *id = p_sys->es[0];
int64_t i_dts = p_buffer->i_dts;
uint8_t *p_data = p_buffer->p_buffer;
- unsigned int i_data = p_buffer->i_buffer;
- unsigned int i_max = id->i_mtu - 12;
+ size_t i_data = p_buffer->i_buffer;
+ size_t i_max = id->i_mtu - 12;
- unsigned i_packet = ( p_buffer->i_buffer + i_max - 1 ) / i_max;
+ size_t i_packet = ( p_buffer->i_buffer + i_max - 1 ) / i_max;
while( i_data > 0 )
{
- unsigned int i_size;
+ size_t i_size;
/* output complete packet */
if( p_sys->packet &&
}
-static int AccessOutGrabberWrite( sout_access_out_t *p_access,
- block_t *p_buffer )
+static ssize_t AccessOutGrabberWrite( sout_access_out_t *p_access,
+ block_t *p_buffer )
{
sout_stream_t *p_stream = (sout_stream_t*)p_access->p_sys;