/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include <sys/types.h>
#define MAX_EMPTY_BLOCKS 200
-#if defined(WIN32) || defined(UNDER_CE)
-# define WINSOCK_STRERROR_SIZE 20
-static const char *winsock_strerror( char *buf )
-{
- snprintf( buf, WINSOCK_STRERROR_SIZE, "Winsock error %d",
- WSAGetLastError( ) );
- buf[WINSOCK_STRERROR_SIZE - 1] = '\0';
- return buf;
-}
-#endif
-
/*****************************************************************************
* Module descriptor
*****************************************************************************/
NULL
};
-static int Write ( sout_access_out_t *, block_t * );
+static ssize_t Write ( sout_access_out_t *, block_t * );
static int Seek ( sout_access_out_t *, off_t );
static void ThreadWrite( vlc_object_t * );
};
#define DEFAULT_PORT 1234
-#define RTP_HEADER_LENGTH 12
/*****************************************************************************
* Open: open the file
if( i_handle == -1 )
{
msg_Err( p_access, "failed to create raw UDP socket" );
- vlc_object_destroy (p_sys->p_thread);
+ vlc_object_release (p_sys->p_thread);
free (p_sys);
return VLC_EGENERIC;
}
{
msg_Err( p_access->p_sout, "cannot spawn sout access thread" );
net_Close (i_handle);
- vlc_object_destroy( p_sys->p_thread );
+ vlc_object_release( p_sys->p_thread );
free (p_sys);
return VLC_EGENERIC;
}
net_Close( p_sys->p_thread->i_handle );
vlc_object_detach( p_sys->p_thread );
- vlc_object_destroy( p_sys->p_thread );
+ vlc_object_release( p_sys->p_thread );
/* update p_sout->i_out_pace_nocontrol */
p_access->p_sout->i_out_pace_nocontrol--;
/*****************************************************************************
* Write: standard write on a file descriptor.
*****************************************************************************/
-static int Write( sout_access_out_t *p_access, block_t *p_buffer )
+static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
{
sout_access_out_sys_t *p_sys = p_access->p_sys;
int i_len = 0;
#endif
return NULL;
}
-
-