Commit 5bcfa0fa authored by gbazin's avatar gbazin
Browse files

 * dvdcss_readv optimisations for Win32. We now send only one read command
   to the DVD drive for the whole iovec.
 * Fixed _win32_dvdcss_aread to work around the WinASPI32 64kb transfer
   size restriction.
 * New and theoretically better Win32 pthread implementation which fixes a
   problem I was having when changing title on a DVD (netlist related).
   vlc_cond_multicast may or may not work.
 * Fixed the "quit" event handling in directx/vout_events.c.
 * dvd_ifo.c now takes into account error messages from UDFFindFile.
 * Temporarily disabled aout_Probe() in aout_SDL (this function
   is creating an awful lot of problems - libSDL bug ).
parent 1977c0ab
...@@ -3,7 +3,13 @@ ...@@ -3,7 +3,13 @@
#===================# #===================#
HEAD HEAD
* dvdcss_readv() optimisations for Win32.
* Fixed _win32_dvdcss_aread() to work around the WinASPI32 64kb transfer
size restriction.
* New and theoretically better Win32 pthread implementation.
* dvd_ifo.c now takes into account error messages from UDFFindFile.
* Fixed the "quit" event handling in directx/vout_events.c.
* Temporarily disabled aout_Probe() in aout_SDL (libSDL bug).
* libdvdcss segfault fixes. * libdvdcss segfault fixes.
* Tuned constants, since it seems to make people happy. * Tuned constants, since it seems to make people happy.
* Fixed the "paused movie won't restart" bug. * Fixed the "paused movie won't restart" bug.
...@@ -22,10 +28,11 @@ HEAD ...@@ -22,10 +28,11 @@ HEAD
* Fixed 2 Win32 bugs in libdvdcss (in _win32_dvdcss_readv), one of them * Fixed 2 Win32 bugs in libdvdcss (in _win32_dvdcss_readv), one of them
should have prevented the Win9x dvd input from working. should have prevented the Win9x dvd input from working.
* Moved the "if(Win2k)" out of the loop in _win32_dvdcss_readv. * Moved the "if(Win2k)" out of the loop in _win32_dvdcss_readv.
* Put a readv() function in input_iovec.h, the input_es now compiles. * Put a readv() function in input_iovec.h, the input_es plugin now compiles
* Modified input_ts to use this function. (Win32).
* Modified input_ts to use readv() in input_iovec.h (Win32).
* Fixed an initialisation bug in vout_directx.c. * Fixed an initialisation bug in vout_directx.c.
* Right clicking on the mouse now displays the navigation menu. * Right clicking on the mouse displays the navigation menu (DirectX plugin).
* Fixed audio/video synchro bug with esd, should fix buggy sound due * Fixed audio/video synchro bug with esd, should fix buggy sound due
to 44100-48000 Hz conversions. to 44100-48000 Hz conversions.
* The Win32 GetMessage function has been isolated in a thread. This has * The Win32 GetMessage function has been isolated in a thread. This has
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library. * libdvdcss.c: DVD reading library.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: libdvdcss.c,v 1.8 2001/07/25 00:23:40 sam Exp $ * $Id: libdvdcss.c,v 1.9 2001/07/25 08:41:21 gbazin Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -65,7 +65,7 @@ static int _dvdcss_readv ( dvdcss_handle, struct iovec *p_iovec, int i_blocks ); ...@@ -65,7 +65,7 @@ static int _dvdcss_readv ( dvdcss_handle, struct iovec *p_iovec, int i_blocks );
*****************************************************************************/ *****************************************************************************/
#if defined( WIN32 ) #if defined( WIN32 )
static int _win32_dvdcss_readv ( int i_fd, struct iovec *p_iovec, static int _win32_dvdcss_readv ( int i_fd, struct iovec *p_iovec,
int i_num_buffers ); int i_num_buffers, char *p_tmp_buffer );
static int _win32_dvdcss_aopen ( char c_drive, dvdcss_handle dvdcss ); static int _win32_dvdcss_aopen ( char c_drive, dvdcss_handle dvdcss );
static int _win32_dvdcss_aclose ( int i_fd ); static int _win32_dvdcss_aclose ( int i_fd );
static int _win32_dvdcss_aseek ( int i_fd, int i_blocks, int i_method ); static int _win32_dvdcss_aseek ( int i_fd, int i_blocks, int i_method );
...@@ -403,6 +403,10 @@ static int _dvdcss_open ( dvdcss_handle dvdcss, char *psz_target ) ...@@ -403,6 +403,10 @@ static int _dvdcss_open ( dvdcss_handle dvdcss, char *psz_target )
} }
} }
/* initialise readv temporary buffer */
dvdcss->p_readv_buffer = NULL;
dvdcss->i_readv_buf_size = 0;
#else #else
dvdcss->i_fd = open( psz_target, 0 ); dvdcss->i_fd = open( psz_target, 0 );
...@@ -428,8 +432,18 @@ static int _dvdcss_close ( dvdcss_handle dvdcss ) ...@@ -428,8 +432,18 @@ static int _dvdcss_close ( dvdcss_handle dvdcss )
{ {
_win32_dvdcss_aclose( dvdcss->i_fd ); _win32_dvdcss_aclose( dvdcss->i_fd );
} }
/* Free readv temporary buffer */
if( dvdcss->p_readv_buffer )
{
free( dvdcss->p_readv_buffer );
dvdcss->p_readv_buffer = NULL;
dvdcss->i_readv_buf_size = 0;
}
#else #else
close( dvdcss->i_fd ); close( dvdcss->i_fd );
#endif #endif
return 0; return 0;
...@@ -513,14 +527,36 @@ static int _dvdcss_readv ( dvdcss_handle dvdcss, struct iovec *p_iovec, ...@@ -513,14 +527,36 @@ static int _dvdcss_readv ( dvdcss_handle dvdcss, struct iovec *p_iovec,
int i_read; int i_read;
#if defined( WIN32 ) #if defined( WIN32 )
i_read = _win32_dvdcss_readv( dvdcss->i_fd, p_iovec, i_blocks ); /* Check the size of the readv temp buffer, just in case we need to
* realloc something bigger */
if( dvdcss->i_readv_buf_size < i_blocks * DVDCSS_BLOCK_SIZE )
{
dvdcss->i_readv_buf_size = i_blocks * DVDCSS_BLOCK_SIZE;
if( dvdcss->p_readv_buffer ) free( dvdcss->p_readv_buffer );
/* Allocate a buffer which will be used as a temporary storage
* for readv */
dvdcss->p_readv_buffer = malloc( dvdcss->i_readv_buf_size );
if( !dvdcss->p_readv_buffer )
{
_dvdcss_error( dvdcss, " failed (readv)" );
return -1;
}
}
i_read = _win32_dvdcss_readv( dvdcss->i_fd, p_iovec, i_blocks,
dvdcss->p_readv_buffer );
return i_read; return i_read;
#else #else
i_read = readv( dvdcss->i_fd, p_iovec, i_blocks ); i_read = readv( dvdcss->i_fd, p_iovec, i_blocks );
return i_read / DVDCSS_BLOCK_SIZE; return i_read / DVDCSS_BLOCK_SIZE;
#endif #endif
} }
#if defined( WIN32 ) #if defined( WIN32 )
/***************************************************************************** /*****************************************************************************
...@@ -528,75 +564,58 @@ static int _dvdcss_readv ( dvdcss_handle dvdcss, struct iovec *p_iovec, ...@@ -528,75 +564,58 @@ static int _dvdcss_readv ( dvdcss_handle dvdcss, struct iovec *p_iovec,
* _win32_dvdcss_aread for win9x * _win32_dvdcss_aread for win9x
*****************************************************************************/ *****************************************************************************/
static int _win32_dvdcss_readv( int i_fd, struct iovec *p_iovec, static int _win32_dvdcss_readv( int i_fd, struct iovec *p_iovec,
int i_num_buffers ) int i_num_buffers, char *p_tmp_buffer )
{ {
int i_index, i_len, i_total = 0; int i_index;
unsigned char *p_base; int i_blocks, i_blocks_total = 0;
int i_blocks;
if( WIN2K ) for( i_index = i_num_buffers; i_index; i_index-- )
{ {
for( i_index = i_num_buffers; i_index; i_index-- ) i_blocks_total += p_iovec[i_index-1].iov_len;
{ }
i_len = p_iovec->iov_len;
p_base = p_iovec->iov_base;
if( i_len > 0 ) if( i_blocks_total <= 0 ) return 0;
{
unsigned long int i_bytes;
if( !ReadFile( (HANDLE) i_fd, p_base, i_len, &i_bytes, NULL ) )
{
return -1;
/* One of the reads failed, too bad.
We won't even bother returning the reads that went well,
and like in the posix spec the file postition is left
unspecified after a failure */
}
i_blocks = i_bytes / DVDCSS_BLOCK_SIZE;
i_total += i_blocks;
if( i_blocks != (i_len / DVDCSS_BLOCK_SIZE) )
{
/* we reached the end of the file */
return i_total;
}
} i_blocks_total /= DVDCSS_BLOCK_SIZE;
p_iovec++; if( WIN2K )
{
unsigned long int i_bytes;
if( !ReadFile( (HANDLE)i_fd, p_tmp_buffer,
i_blocks_total * DVDCSS_BLOCK_SIZE, &i_bytes, NULL ) )
{
return -1;
/* The read failed... too bad.
As in the posix spec the file postition is left
unspecified after a failure */
} }
i_blocks = i_bytes / DVDCSS_BLOCK_SIZE;
} }
else /* Win9x */ else /* Win9x */
{ {
for( i_index = i_num_buffers; i_index; i_index-- ) i_blocks = _win32_dvdcss_aread( i_fd, p_tmp_buffer, i_blocks_total );
if( i_blocks < 0 )
{ {
i_len = p_iovec->iov_len / DVDCSS_BLOCK_SIZE; return -1; /* idem */
p_base = p_iovec->iov_base;
if( i_len > 0 )
{
i_blocks = _win32_dvdcss_aread( i_fd, p_base, i_len );
if( i_blocks < 0 )
{
return -1; /* idem */
}
i_total += i_blocks;
if( i_blocks != i_len )
{
/* we reached the end of the file or a signal interrupted
the read */
return i_total;
}
}
p_iovec++;
} }
} }
return i_total; /* We just have to copy the content of the temp buffer into the iovecs */
i_index = 0;
i_blocks_total = i_blocks;
while( i_blocks_total > 0 )
{
memcpy( p_iovec[i_index].iov_base,
&p_tmp_buffer[(i_blocks - i_blocks_total) * DVDCSS_BLOCK_SIZE],
p_iovec[i_index].iov_len );
/* if we read less blocks than asked, we'll just end up copying
garbage, this isn't an issue as we return the number of
blocks actually read */
i_blocks_total -= ( p_iovec[i_index].iov_len / DVDCSS_BLOCK_SIZE );
i_index++;
}
return i_blocks;
} }
/***************************************************************************** /*****************************************************************************
...@@ -611,7 +630,7 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss ) ...@@ -611,7 +630,7 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss )
int i, j, i_hostadapters; int i, j, i_hostadapters;
long (*lpGetSupport)( void ); long (*lpGetSupport)( void );
long (*lpSendCommand)( void* ); long (*lpSendCommand)( void* );
hASPI = LoadLibrary( "wnaspi32.dll" ); hASPI = LoadLibrary( "wnaspi32.dll" );
if( hASPI == NULL ) if( hASPI == NULL )
{ {
...@@ -621,7 +640,7 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss ) ...@@ -621,7 +640,7 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss )
(FARPROC) lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" ); (FARPROC) lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" );
(FARPROC) lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" ); (FARPROC) lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" );
if(lpGetSupport == NULL || lpSendCommand == NULL ) if(lpGetSupport == NULL || lpSendCommand == NULL )
{ {
_dvdcss_debug( dvdcss, "unable to get aspi function pointers" ); _dvdcss_debug( dvdcss, "unable to get aspi function pointers" );
...@@ -680,8 +699,8 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss ) ...@@ -680,8 +699,8 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss )
lpSendCommand( (void*) &srbDiskInfo ); lpSendCommand( (void*) &srbDiskInfo );
if( srbDiskInfo.SRB_Status == SS_COMP && if( (srbDiskInfo.SRB_Status == SS_COMP) &&
srbDiskInfo.SRB_Int13HDriveInfo == c_drive ) (srbDiskInfo.SRB_Int13HDriveInfo == c_drive) )
{ {
fd->i_sid = MAKEWORD( i, j ); fd->i_sid = MAKEWORD( i, j );
return (int) fd; return (int) fd;
...@@ -692,8 +711,7 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss ) ...@@ -692,8 +711,7 @@ static int _win32_dvdcss_aopen( char c_drive, dvdcss_handle dvdcss )
free( (void*) fd ); free( (void*) fd );
FreeLibrary( hASPI ); FreeLibrary( hASPI );
_dvdcss_debug( dvdcss, "unable to get haid and target (aspi)" ); _dvdcss_debug( dvdcss, "unable to get haid and target (aspi)" );
return( -1 );
return( -1 );
} }
/***************************************************************************** /*****************************************************************************
...@@ -743,56 +761,78 @@ static int _win32_dvdcss_aseek( int i_fd, int i_blocks, int i_method ) ...@@ -743,56 +761,78 @@ static int _win32_dvdcss_aseek( int i_fd, int i_blocks, int i_method )
static int _win32_dvdcss_aread( int i_fd, void *p_data, int i_blocks ) static int _win32_dvdcss_aread( int i_fd, void *p_data, int i_blocks )
{ {
HANDLE hEvent; HANDLE hEvent;
DWORD dwStart, dwLen;
struct SRB_ExecSCSICmd ssc; struct SRB_ExecSCSICmd ssc;
struct w32_aspidev *fd = (struct w32_aspidev *) i_fd; struct w32_aspidev *fd = (struct w32_aspidev *) i_fd;
memset( &ssc, 0, sizeof( ssc ) ); /* Create the transfer completion event */
dwStart = fd->i_blocks;
dwLen = i_blocks;
hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
if( hEvent == NULL ) if( hEvent == NULL )
{ {
return -1; return -1;
} }
memset( &ssc, 0, sizeof( ssc ) );
ssc.SRB_Cmd = SC_EXEC_SCSI_CMD; ssc.SRB_Cmd = SC_EXEC_SCSI_CMD;
ssc.SRB_Flags = SRB_DIR_IN | SRB_EVENT_NOTIFY; ssc.SRB_Flags = SRB_DIR_IN | SRB_EVENT_NOTIFY;
ssc.SRB_HaId = LOBYTE( fd->i_sid ); ssc.SRB_HaId = LOBYTE( fd->i_sid );
ssc.SRB_Target = HIBYTE( fd->i_sid ); ssc.SRB_Target = HIBYTE( fd->i_sid );
ssc.SRB_SenseLen = SENSE_LEN; ssc.SRB_SenseLen = SENSE_LEN;
ssc.SRB_PostProc = (LPVOID) hEvent;
ssc.SRB_PostProc = (LPVOID) hEvent;
ssc.SRB_BufLen = dwLen * DVDCSS_BLOCK_SIZE;
ssc.SRB_BufPointer = p_data; ssc.SRB_BufPointer = p_data;
ssc.SRB_CDBLen = 12; ssc.SRB_CDBLen = 12;
ssc.CDBByte[0] = 0xA8; /* RAW */ ssc.CDBByte[0] = 0xA8; /* RAW */
ssc.CDBByte[2] = (UCHAR) dwStart >> 24; ssc.CDBByte[2] = (UCHAR) (fd->i_blocks >> 24);
ssc.CDBByte[3] = (UCHAR) (dwStart >> 16) & 0xff; ssc.CDBByte[3] = (UCHAR) (fd->i_blocks >> 16) & 0xff;
ssc.CDBByte[4] = (UCHAR) (dwStart >> 8) & 0xff; ssc.CDBByte[4] = (UCHAR) (fd->i_blocks >> 8) & 0xff;
ssc.CDBByte[5] = (UCHAR) (dwStart) & 0xff; ssc.CDBByte[5] = (UCHAR) (fd->i_blocks) & 0xff;
ssc.CDBByte[6] = (UCHAR) dwLen >> 24;
ssc.CDBByte[7] = (UCHAR) (dwLen >> 16) & 0xff; /* We have to break down the reads into 64kb pieces (ASPI restriction) */
ssc.CDBByte[8] = (UCHAR) (dwLen >> 8) & 0xff; if( i_blocks > 32 )
ssc.CDBByte[9] = (UCHAR) (dwLen) & 0xff;
ResetEvent( hEvent );
if( fd->lpSendCommand( (void*) &ssc ) == SS_PENDING )
{ {
WaitForSingleObject( hEvent, INFINITE ); ssc.SRB_BufLen = 32 * DVDCSS_BLOCK_SIZE;
ssc.CDBByte[9] = 32;
fd->i_blocks += 32;
/* Initiate transfer */
ResetEvent( hEvent );
fd->lpSendCommand( (void*) &ssc );
/* transfer the next 64kb (_win32_dvdcss_aread is called recursively)
* We need to check the status of the read on return */
if( _win32_dvdcss_aread( i_fd, p_data + 32 * DVDCSS_BLOCK_SIZE,
i_blocks - 32) < 0 )
{
return -1;
}
} }
else
{
/* This is the last transfer */
ssc.SRB_BufLen = i_blocks * DVDCSS_BLOCK_SIZE;
ssc.CDBByte[9] = (UCHAR) i_blocks;
fd->i_blocks += i_blocks;
/* Initiate transfer */
ResetEvent( hEvent );
fd->lpSendCommand( (void*) &ssc );
}
/* If the command has still not been processed, wait until it's finished */
if( ssc.SRB_Status == SS_PENDING )
{
WaitForSingleObject( hEvent, INFINITE );
}
CloseHandle( hEvent ); CloseHandle( hEvent );
/* check that the transfer went as planned */
if( ssc.SRB_Status != SS_COMP ) if( ssc.SRB_Status != SS_COMP )
{ {
return -1; return -1;
} }
fd->i_blocks += i_blocks;
return i_blocks; return i_blocks;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* private.h: private DVD reading library data * private.h: private DVD reading library data
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: libdvdcss.h,v 1.5 2001/07/25 00:23:40 sam Exp $ * $Id: libdvdcss.h,v 1.6 2001/07/25 08:41:21 gbazin Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -46,6 +46,10 @@ struct dvdcss_s ...@@ -46,6 +46,10 @@ struct dvdcss_s
boolean_t b_errors; boolean_t b_errors;
boolean_t b_debug; boolean_t b_debug;
#if defined( WIN32 )
char *p_readv_buffer;
int i_readv_buf_size;
#endif
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This header provides a portable threads implementation. * This header provides a portable threads implementation.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.20 2001/07/18 14:21:00 massiot Exp $ * $Id: threads.h,v 1.21 2001/07/25 08:41:21 gbazin Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
# include <kernel/scheduler.h> # include <kernel/scheduler.h>
# include <byteorder.h> # include <byteorder.h>
#elif defined( WIN32 ) /* Win32 with MinGW32 compiler */ #elif defined( WIN32 )
# include <windows.h> # include <windows.h>
# include <process.h> # include <process.h>
...@@ -134,9 +134,15 @@ typedef struct ...@@ -134,9 +134,15 @@ typedef struct
} vlc_cond_t; } vlc_cond_t;
#elif defined( WIN32 ) #elif defined( WIN32 )
typedef HANDLE vlc_thread_t; typedef HANDLE vlc_thread_t;
typedef HANDLE vlc_mutex_t; typedef CRITICAL_SECTION vlc_mutex_t;
typedef HANDLE vlc_cond_t;
typedef struct
{
int i_waiting_threads;
HANDLE signal;
} vlc_cond_t;
typedef unsigned (__stdcall *PTHREAD_START) (void *); typedef unsigned (__stdcall *PTHREAD_START) (void *);
#endif #endif
...@@ -188,7 +194,23 @@ typedef struct wrapper_s ...@@ -188,7 +194,23 @@ typedef struct wrapper_s
struct itimerval itimer; struct itimerval itimer;
} wrapper_t; } wrapper_t;
#endif
#ifdef WIN32
struct itimerval
{
struct timeval it_value;
struct timeval it_interval;
};
int setitimer(int kind, const struct itimerval* itnew,
struct itimerval* itold);
#define ITIMER_REAL 1
#define ITIMER_PROF 2
#endif /* WIN32 */
#endif /* PROFILING */
/***************************************************************************** /*****************************************************************************
* vlc_threads_init: initialize threads system * vlc_threads_init: initialize threads system
...@@ -274,8 +296,8 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex ) ...@@ -274,8 +296,8 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
return B_OK; return B_OK;
#elif defined( WIN32 ) #elif defined( WIN32 )
*p_mutex = CreateMutex(0,FALSE,0); InitializeCriticalSection( p_mutex );
return (*p_mutex?0:1); return 0;
#endif #endif
} }
...@@ -312,7 +334,7 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex ) ...@@ -312,7 +334,7 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
return err; return err;
#elif defined( WIN32 ) #elif defined( WIN32 )
WaitForSingleObject( *p_mutex, INFINITE ); EnterCriticalSection( p_mutex );
return 0; return 0;
#endif #endif
...@@ -348,7 +370,7 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex ) ...@@ -348,7 +370,7 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
return B_OK; return B_OK;
#elif defined( WIN32 ) #elif defined( WIN32 )
ReleaseMutex( *p_mutex ); LeaveCriticalSection( p_mutex );
return 0; return 0;
#endif #endif
...@@ -375,7 +397,7 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex ) ...@@ -375,7 +397,7 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
return B_OK;