Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
b3793e34
Commit
b3793e34
authored
Mar 04, 2003
by
Christophe Massiot
Browse files
* Made rt-priority a real-time variable (shut-up sam) and misc attempts
to improve responsiveness under OS X
parent
514f5dff
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/gui/macosx/intf.m
View file @
b3793e34
...
...
@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.6
4
2003/03/04 2
2
:36:
18 hartman
Exp $
* $Id: intf.m,v 1.6
5
2003/03/04 2
3
:36:
57 massiot
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -402,7 +402,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
[
NSTimer
scheduledTimerWithTimeInterval
:
0
.
5
target:
self
selector
:
@selector
(
manageIntf
:
)
userInfo:
nil
repeats
:
TRU
E
];
userInfo:
nil
repeats
:
FALS
E
];
[
NSThread
detachNewThreadSelector
:
@selector
(
manage
)
toTarget:
self
withObject
:
nil
];
...
...
@@ -767,6 +767,10 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
vlc_object_release
(
p_playlist
);
[
self
updateMessageArray
];
[
NSTimer
scheduledTimerWithTimeInterval
:
0
.
5
target:
self
selector
:
@selector
(
manageIntf
:
)
userInfo:
nil
repeats
:
FALSE
];
}
-
(
void
)
updateMessageArray
...
...
src/libvlc.c
View file @
b3793e34
...
...
@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.
69
2003/03/0
3 14:21:08 gbazin
Exp $
* $Id: libvlc.c,v 1.
70
2003/03/0
4 23:36:57 massiot
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -138,7 +138,6 @@ int VLC_Create( void )
{
return
i_ret
;
}
vlc_thread_set_priority
(
p_vlc
,
VLC_THREAD_PRIORITY_LOW
);
/* Now that the thread system is initialized, we don't have much, but
* at least we have var_Create */
...
...
@@ -183,6 +182,7 @@ int VLC_Create( void )
{
return
VLC_EGENERIC
;
}
vlc_thread_set_priority
(
p_vlc
,
VLC_THREAD_PRIORITY_LOW
);
p_vlc
->
psz_object_name
=
"root"
;
...
...
src/libvlc.h
View file @
b3793e34
...
...
@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.4
5
2003/0
2/20 16:07:38 gbazin
Exp $
* $Id: libvlc.h,v 1.4
6
2003/0
3/04 23:36:57 massiot
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -576,6 +576,10 @@ vlc_module_begin();
add_integer
(
"win9x-cv-method"
,
0
,
NULL
,
WIN9X_CV_TEXT
,
WIN9X_CV_LONGTEXT
,
VLC_TRUE
);
#endif
#if defined(SYS_DARWIN)
add_integer
(
"rt-priority"
,
1
,
NULL
,
NULL
,
NULL
,
VLC_TRUE
);
#endif
/* Usage (mainly useful for cmd line stuff) */
add_usage_hint
(
PLAYLIST_USAGE
);
...
...
src/misc/threads.c
View file @
b3793e34
...
...
@@ -2,7 +2,7 @@
* threads.c : threads implementation for the VideoLAN client
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: threads.c,v 1.3
8
2003/03/0
2 01:35:30 gbazin
Exp $
* $Id: threads.c,v 1.3
9
2003/03/0
4 23:36:57 massiot
Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -611,12 +611,13 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
i_ret
=
pthread_create
(
&
p_this
->
thread_id
,
NULL
,
func
,
p_data
);
#ifdef SYS_DARWIN
if
(
i_priority
)
{
int
i_error
;
struct
sched_param
param
;
memset
(
&
param
,
0
,
sizeof
(
struct
sched_param
)
);
param
.
sched_priority
=
i_
priority
;
param
.
sched_priority
=
config_GetInt
(
p_this
,
"rt-
priority
"
)
;
if
(
(
i_error
=
pthread_setschedparam
(
p_this
->
thread_id
,
SCHED_RR
,
&
param
))
)
{
...
...
@@ -626,6 +627,7 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
}
}
#endif
#elif defined( HAVE_CTHREADS_H )
p_this
->
thread_id
=
cthread_fork
(
(
cthread_fn_t
)
func
,
(
any_t
)
p_data
);
...
...
@@ -696,12 +698,14 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
}
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
#ifdef SYS_DARWIN
if
(
i_priority
)
{
int
i_error
;
struct
sched_param
param
;
memset
(
&
param
,
0
,
sizeof
(
struct
sched_param
)
);
param
.
sched_priority
=
i_
priority
;
param
.
sched_priority
=
config_GetInt
(
p_this
,
"rt-
priority
"
)
;
if
(
(
i_error
=
pthread_setschedparam
(
pthread_self
(),
SCHED_RR
,
&
param
))
)
{
...
...
@@ -710,6 +714,7 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
i_priority
=
0
;
}
}
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment