Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
02857df0
Commit
02857df0
authored
Sep 20, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interface.c: Support execution of the interface Run() method on first thread.
parent
88ef1217
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
95 deletions
+7
-95
include/vlc_interface.h
include/vlc_interface.h
+1
-0
src/interface/interface.c
src/interface/interface.c
+6
-95
No files found.
include/vlc_interface.h
View file @
02857df0
...
@@ -55,6 +55,7 @@ struct intf_thread_t
...
@@ -55,6 +55,7 @@ struct intf_thread_t
/* Thread properties and locks */
/* Thread properties and locks */
vlc_bool_t
b_play
;
vlc_bool_t
b_play
;
vlc_bool_t
b_should_run_on_first_thread
;
/* Specific interfaces */
/* Specific interfaces */
intf_console_t
*
p_console
;
/** console */
intf_console_t
*
p_console
;
/** console */
...
...
src/interface/interface.c
View file @
02857df0
...
@@ -41,10 +41,6 @@
...
@@ -41,10 +41,6 @@
#include "vlc_interface.h"
#include "vlc_interface.h"
#include "modules/modules.h" // Gruik!
#include "modules/modules.h" // Gruik!
#ifdef __APPLE__
# include <Cocoa/Cocoa.h>
#endif
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
...
@@ -55,21 +51,6 @@ static int SwitchIntfCallback( vlc_object_t *, char const *,
...
@@ -55,21 +51,6 @@ static int SwitchIntfCallback( vlc_object_t *, char const *,
static
int
AddIntfCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
AddIntfCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
#ifdef __APPLE__
static
void
Manager
(
intf_thread_t
*
p_intf
);
/*****************************************************************************
* VLCApplication interface
*****************************************************************************/
@
interface
VLCApplication
:
NSApplication
{
libvlc_int_t
*
o_libvlc
;
}
-
(
void
)
setVLC
:
(
libvlc_int_t
*
)
p_libvlc
;
@
end
#endif
/*****************************************************************************
/*****************************************************************************
* intf_Create: prepare interface before main loop
* intf_Create: prepare interface before main loop
*****************************************************************************
*****************************************************************************
...
@@ -146,43 +127,16 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
...
@@ -146,43 +127,16 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
*/
*/
int
intf_RunThread
(
intf_thread_t
*
p_intf
)
int
intf_RunThread
(
intf_thread_t
*
p_intf
)
{
{
#ifdef __APPLE__
# warning FIXME
#if 0
NSAutoreleasePool * o_pool;
/* If !clivlc, then run as a OS X application */
if( strncmp( p_intf->p_libvlc->psz_object_name, "clivlc", 6) )
{
o_pool = [[NSAutoreleasePool alloc] init];
[VLCApplication sharedApplication];
[NSApp setVLC: p_intf->p_libvlc];
if( p_intf->pf_run )
RunInterface( p_intf );
else
{
[NSApp run];
while( !intf_ShouldDie( p_intf ) )
msleep( INTF_IDLE_SLEEP * 2);
}
vlc_object_kill( p_intf );
return VLC_SUCCESS;
}
#endif
#endif
/* This interface doesn't need to be run */
/* This interface doesn't need to be run */
if
(
p_intf
->
pf_run
==
NULL
)
if
(
p_intf
->
pf_run
==
NULL
)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
/* Run the interface in a separate thread */
/* Hack to get Mac OS X Cocoa runtime,
if
(
!
strcmp
(
p_intf
->
p_module
->
psz_object_name
,
"macosx"
)
)
* which need access to the main thread */
if
(
p_intf
->
b_should_run_on_first_thread
)
{
{
msg_Err
(
p_intf
,
"You cannot run the MacOS X module as an "
RunInterface
(
p_intf
);
"extra interface. Please read the "
return
VLC_SUCCESS
;
"README.MacOSX.rtf file."
);
return
VLC_EGENERIC
;
}
}
/* Run the interface in a separate thread */
/* Run the interface in a separate thread */
...
@@ -238,29 +192,6 @@ void intf_Destroy( intf_thread_t *p_intf )
...
@@ -238,29 +192,6 @@ void intf_Destroy( intf_thread_t *p_intf )
/* Following functions are local */
/* Following functions are local */
/*****************************************************************************
* Manager: helper thread for blocking OS X
*****************************************************************************/
#ifdef __APPLE__
static
void
Manager
(
intf_thread_t
*
p_intf
)
{
while
(
!
p_intf
->
b_die
)
{
msleep
(
INTF_IDLE_SLEEP
);
if
(
p_intf
->
p_libvlc
->
b_die
)
{
p_intf
->
b_die
=
VLC_TRUE
;
if
(
strncmp
(
p_intf
->
p_libvlc
->
psz_object_name
,
"clivlc"
,
6
)
)
{
[
NSApp
stop
:
NULL
];
}
return
;
}
}
}
#endif
/*****************************************************************************
/*****************************************************************************
* RunInterface: setups necessary data and give control to the interface
* RunInterface: setups necessary data and give control to the interface
*****************************************************************************/
*****************************************************************************/
...
@@ -407,23 +338,3 @@ static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -407,23 +338,3 @@ static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
#ifdef __APPLE__
/*****************************************************************************
* VLCApplication implementation
*****************************************************************************/
@
implementation
VLCApplication
-
(
void
)
setVLC
:
(
libvlc_int_t
*
)
p_libvlc
{
o_libvlc
=
p_libvlc
;
}
-
(
void
)
terminate
:
(
id
)
sender
{
vlc_object_kill
(
o_libvlc
);
[
super
terminate
:
sender
];
}
@
end
#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