Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
f02445b5
Commit
f02445b5
authored
Sep 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove interface b_block property.
parent
25314fa7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
61 deletions
+40
-61
include/vlc_interface.h
include/vlc_interface.h
+0
-1
modules/codec/cmml/cmml.c
modules/codec/cmml/cmml.c
+0
-1
modules/control/ntservice.c
modules/control/ntservice.c
+0
-1
modules/control/rc.c
modules/control/rc.c
+0
-1
src/interface/interface.c
src/interface/interface.c
+23
-55
src/libvlc-common.c
src/libvlc-common.c
+16
-1
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+1
-1
No files found.
include/vlc_interface.h
View file @
f02445b5
...
@@ -54,7 +54,6 @@ struct intf_thread_t
...
@@ -54,7 +54,6 @@ struct intf_thread_t
VLC_COMMON_MEMBERS
VLC_COMMON_MEMBERS
/* Thread properties and locks */
/* Thread properties and locks */
vlc_bool_t
b_block
;
vlc_bool_t
b_play
;
vlc_bool_t
b_play
;
/* Specific interfaces */
/* Specific interfaces */
...
...
modules/codec/cmml/cmml.c
View file @
f02445b5
...
@@ -127,7 +127,6 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -127,7 +127,6 @@ static int OpenDecoder( vlc_object_t *p_this )
/* initialise the CMML responder interface */
/* initialise the CMML responder interface */
p_sys
->
p_intf
=
intf_Create
(
p_dec
,
"cmml"
,
0
,
NULL
);
p_sys
->
p_intf
=
intf_Create
(
p_dec
,
"cmml"
,
0
,
NULL
);
p_sys
->
p_intf
->
b_block
=
VLC_FALSE
;
intf_RunThread
(
p_sys
->
p_intf
);
intf_RunThread
(
p_sys
->
p_intf
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
modules/control/ntservice.c
View file @
f02445b5
...
@@ -324,7 +324,6 @@ static void WINAPI ServiceDispatch( DWORD numArgs, char **args )
...
@@ -324,7 +324,6 @@ static void WINAPI ServiceDispatch( DWORD numArgs, char **args )
}
}
/* Try to run the interface */
/* Try to run the interface */
p_new_intf
->
b_block
=
VLC_FALSE
;
if
(
intf_RunThread
(
p_new_intf
)
)
if
(
intf_RunThread
(
p_new_intf
)
)
{
{
vlc_object_detach
(
p_new_intf
);
vlc_object_detach
(
p_new_intf
);
...
...
modules/control/rc.c
View file @
f02445b5
...
@@ -1462,7 +1462,6 @@ static int Intf( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -1462,7 +1462,6 @@ static int Intf( vlc_object_t *p_this, char const *psz_cmd,
p_newintf
=
intf_Create
(
p_this
->
p_libvlc
,
newval
.
psz_string
,
0
,
NULL
);
p_newintf
=
intf_Create
(
p_this
->
p_libvlc
,
newval
.
psz_string
,
0
,
NULL
);
if
(
p_newintf
)
if
(
p_newintf
)
{
{
p_newintf
->
b_block
=
VLC_FALSE
;
if
(
intf_RunThread
(
p_newintf
)
)
if
(
intf_RunThread
(
p_newintf
)
)
{
{
vlc_object_detach
(
p_newintf
);
vlc_object_detach
(
p_newintf
);
...
...
src/interface/interface.c
View file @
f02445b5
...
@@ -136,14 +136,11 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
...
@@ -136,14 +136,11 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
/*****************************************************************************
/*****************************************************************************
* intf_RunThread: launch the interface thread
* intf_RunThread: launch the interface thread
*****************************************************************************
*****************************************************************************
* This function either creates a new thread and runs the interface in it,
* This function either creates a new thread and runs the interface in it.
* or runs the interface in the current thread, depending on b_block.
*****************************************************************************/
*****************************************************************************/
/**
/**
*
Run
the interface thread.
*
Starts and runs
the interface thread.
*
*
* If b_block is not set, runs the interface in the thread, else,
* creates a new thread and runs the interface.
* \param p_intf the interface thread
* \param p_intf the interface thread
* \return VLC_SUCCESS on success, an error number else
* \return VLC_SUCCESS on success, an error number else
*/
*/
...
@@ -172,51 +169,26 @@ int intf_RunThread( intf_thread_t *p_intf )
...
@@ -172,51 +169,26 @@ int intf_RunThread( intf_thread_t *p_intf )
}
}
else
else
#endif
#endif
if
(
p_intf
->
b_block
)
/* This interface doesn't need to be run */
if
(
p_intf
->
pf_run
==
NULL
)
return
VLC_SUCCESS
;
/* Run the interface in a separate thread */
if
(
!
strcmp
(
p_intf
->
p_module
->
psz_object_name
,
"macosx"
)
)
{
{
/* If we are clivlc+macosx, don't run the macosx GUI */
msg_Err
(
p_intf
,
"You cannot run the MacOS X module as an "
if
(
!
strcmp
(
p_intf
->
p_module
->
psz_object_name
,
"macosx"
)
)
"extra interface. Please read the "
{
"README.MacOSX.rtf file."
);
msg_Err
(
p_intf
,
"You cannot run the MacOS X module as an "
return
VLC_EGENERIC
;
"interface in clivlc mode. Please read the "
"README.MacOSX.rtf file."
);
return
VLC_EGENERIC
;
}
/* If the main interface does not have a run function,
* implement a waiting loop ourselves
*/
if
(
p_intf
->
pf_run
)
RunInterface
(
p_intf
);
else
{
while
(
!
intf_ShouldDie
(
p_intf
)
)
msleep
(
INTF_IDLE_SLEEP
*
2
);
}
vlc_object_kill
(
p_intf
);
}
}
else
{
/* This interface doesn't need to be run */
if
(
!
p_intf
->
pf_run
)
return
VLC_SUCCESS
;
/* Run the interface in a separate thread */
if
(
!
strcmp
(
p_intf
->
p_module
->
psz_object_name
,
"macosx"
)
)
{
msg_Err
(
p_intf
,
"You cannot run the MacOS X module as an "
"extra interface. Please read the "
"README.MacOSX.rtf file."
);
return
VLC_EGENERIC
;
}
/* Run the interface in a separate thread */
/* Run the interface in a separate thread */
if
(
vlc_thread_create
(
p_intf
,
"interface"
,
RunInterface
,
if
(
vlc_thread_create
(
p_intf
,
"interface"
,
RunInterface
,
VLC_THREAD_PRIORITY_LOW
,
VLC_FALSE
)
)
VLC_THREAD_PRIORITY_LOW
,
VLC_FALSE
)
)
{
{
msg_Err
(
p_intf
,
"cannot spawn interface thread"
);
msg_Err
(
p_intf
,
"cannot spawn interface thread"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -232,14 +204,11 @@ int intf_RunThread( intf_thread_t *p_intf )
...
@@ -232,14 +204,11 @@ int intf_RunThread( intf_thread_t *p_intf )
void
intf_StopThread
(
intf_thread_t
*
p_intf
)
void
intf_StopThread
(
intf_thread_t
*
p_intf
)
{
{
/* Tell the interface to die */
/* Tell the interface to die */
if
(
!
p_intf
->
b_block
)
vlc_object_kill
(
p_intf
);
if
(
p_intf
->
pf_run
!=
NULL
)
{
{
vlc_object_kill
(
p_intf
);
vlc_cond_signal
(
&
p_intf
->
object_wait
);
if
(
p_intf
->
pf_run
)
vlc_thread_join
(
p_intf
);
{
vlc_cond_signal
(
&
p_intf
->
object_wait
);
vlc_thread_join
(
p_intf
);
}
}
}
}
}
...
@@ -426,7 +395,6 @@ static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -426,7 +395,6 @@ static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd,
}
}
/* Try to run the interface */
/* Try to run the interface */
p_intf
->
b_block
=
VLC_FALSE
;
if
(
intf_RunThread
(
p_intf
)
!=
VLC_SUCCESS
)
if
(
intf_RunThread
(
p_intf
)
!=
VLC_SUCCESS
)
{
{
vlc_object_detach
(
p_intf
);
vlc_object_detach
(
p_intf
);
...
...
src/libvlc-common.c
View file @
f02445b5
...
@@ -1132,7 +1132,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
...
@@ -1132,7 +1132,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
/* Try to run the interface */
/* Try to run the interface */
p_intf
->
b_play
=
b_play
;
p_intf
->
b_play
=
b_play
;
p_intf
->
b_block
=
b_block
;
i_err
=
intf_RunThread
(
p_intf
);
i_err
=
intf_RunThread
(
p_intf
);
if
(
i_err
)
if
(
i_err
)
{
{
...
@@ -1141,6 +1140,22 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
...
@@ -1141,6 +1140,22 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
p_intf
=
NULL
;
p_intf
=
NULL
;
return
i_err
;
return
i_err
;
}
}
if
(
b_block
)
{
/* FIXME: should be moved to interface/interface.c */
if
(
p_intf
->
pf_run
)
vlc_thread_join
(
p_intf
);
else
{
vlc_mutex_lock
(
&
p_intf
->
object_lock
);
vlc_cond_wait
(
&
p_intf
->
object_wait
,
&
p_intf
->
object_lock
);
vlc_mutex_unlock
(
&
p_intf
->
object_lock
);
}
vlc_object_detach
(
p_intf
);
intf_Destroy
(
p_intf
);
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
};
};
...
...
src/video_output/vout_intf.c
View file @
f02445b5
...
@@ -107,7 +107,7 @@ void *vout_RequestWindow( vout_thread_t *p_vout,
...
@@ -107,7 +107,7 @@ void *vout_RequestWindow( vout_thread_t *p_vout,
for
(
i
=
0
;
i
<
p_list
->
i_count
;
i
++
)
for
(
i
=
0
;
i
<
p_list
->
i_count
;
i
++
)
{
{
p_intf
=
(
intf_thread_t
*
)
p_list
->
p_values
[
i
].
p_object
;
p_intf
=
(
intf_thread_t
*
)
p_list
->
p_values
[
i
].
p_object
;
if
(
p_intf
->
b_block
&&
p_intf
->
pf_request_window
)
break
;
if
(
p_intf
->
pf_request_window
)
break
;
p_intf
=
NULL
;
p_intf
=
NULL
;
}
}
...
...
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