* darwin_specific.c: Darwin specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: darwin_specific.c,v 1.2 2001/04/13 14:33:22 sam Exp $
+ * $Id: darwin_specific.c,v 1.15 2002/07/17 22:23:20 jlj Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-#include "defs.h"
-
#include <string.h> /* strdup() */
#include <stdlib.h> /* free() */
-#include "common.h"
-#include "threads.h"
-#include "mtime.h"
-
-#include "darwin_specific.h"
+#include <vlc/vlc.h>
/*****************************************************************************
* Static vars
*****************************************************************************/
static char * psz_program_path;
-void system_Create( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
+/*****************************************************************************
+ * system_Init: fill in program path.
+ *****************************************************************************/
+void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
{
char i_dummy;
char *p_char, *p_oldchar = &i_dummy;
for( ; *p_char ; )
{
if( *p_char == '/' )
- {
+ {
*p_oldchar = '/';
- *p_char = '\0';
- p_oldchar = p_char;
- }
+ *p_char = '\0';
+ p_oldchar = p_char;
+ }
- p_char++;
+ p_char++;
+ }
+
+ /* Run the interface with a real-time priority too */
+ {
+ struct sched_param param;
+ param.sched_priority = 10;
+ if (pthread_setschedparam(pthread_self(), SCHED_RR, ¶m))
+ {
+ msg_Err( p_this, "pthread_setschedparam failed" );
+ }
}
-
- return;
}
-void system_Destroy( void )
+/*****************************************************************************
+ * system_Configure: check for system specific configuration options.
+ *****************************************************************************/
+void system_Configure( vlc_t *p_this )
+{
+
+}
+
+/*****************************************************************************
+ * system_End: free the program path.
+ *****************************************************************************/
+void system_End( vlc_t *p_this )
{
free( psz_program_path );
}
+/*****************************************************************************
+ * system_GetProgramPath: get the full path to the program.
+ *****************************************************************************/
char * system_GetProgramPath( void )
{
return( psz_program_path );