2000-02-13 05:31:35 +01:00
|
|
|
/*****************************************************************************
|
1999-08-08 14:42:54 +02:00
|
|
|
* interface.h: interface access for other threads
|
|
|
|
* This library provides basic functions for threads to interact with user
|
|
|
|
* interface, such as message output.
|
2000-02-13 05:31:35 +01:00
|
|
|
*****************************************************************************
|
2000-03-03 08:03:34 +01:00
|
|
|
* Copyright (C) 1999, 2000 VideoLAN
|
2002-07-20 20:01:43 +02:00
|
|
|
* $Id: interface.h,v 1.32 2002/07/20 18:01:41 sam Exp $
|
2000-03-03 08:03:34 +01:00
|
|
|
*
|
2001-03-21 14:42:35 +01:00
|
|
|
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
2000-03-03 08:03:34 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2000-05-25 00:39:44 +02:00
|
|
|
*
|
2000-03-03 08:03:34 +01:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2000-05-25 00:39:44 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2000-03-03 08:03:34 +01:00
|
|
|
*
|
2000-05-25 00:39:44 +02:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
2000-03-03 08:03:34 +01:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2000-02-13 05:31:35 +01:00
|
|
|
/*****************************************************************************
|
1999-08-08 14:42:54 +02:00
|
|
|
* intf_thread_t: describe an interface thread
|
2000-02-13 05:31:35 +01:00
|
|
|
*****************************************************************************
|
1999-08-08 14:42:54 +02:00
|
|
|
* This structe describes all interface-specific data of the main (interface)
|
|
|
|
* thread.
|
2000-02-13 05:31:35 +01:00
|
|
|
*****************************************************************************/
|
2002-07-20 20:01:43 +02:00
|
|
|
struct intf_thread_t
|
1999-08-08 14:42:54 +02:00
|
|
|
{
|
* ALL: the first libvlc commit.
As for video output 4, this breaks almost everything, but I'll slowly
do what remains to be fixed during the weekend.
Changes in vlc:
===============
* vlc is now a very small program (20 lines) which uses the libvlc API;
it is quite simple for the moment but can be extended in the future.
* interfaces, decoders, video outputs, etc. are now almost the same
objects (yes, I know, this is C++ redone in C) and are structured in
a tree. More about this later, but basically it allows the following
nice features:
- several interfaces
- several playlists with several outputs
- input plugins spawning helper interfaces (will be used for DVD menus)
- anything spawning anything; I swear there are useful uses for this!
* libvlc can be used in other programs; I'm currently writing a Mozilla
plugin for my employer.
Things currently broken:
========================
* most interfaces, most ports
* the playlist handling (almost finished rewriting this though). This means
no file can be played from the GUI, you need to use the commandline. This
also means it segfaults at EOF, when exiting the program, and it sometimes
refuses to open a file when asked to.
2002-06-01 14:32:02 +02:00
|
|
|
VLC_COMMON_MEMBERS
|
|
|
|
|
|
|
|
/* Thread properties and locks */
|
|
|
|
vlc_bool_t b_block;
|
1999-08-08 14:42:54 +02:00
|
|
|
|
2000-02-13 05:31:35 +01:00
|
|
|
/* Specific interfaces */
|
* ALL: the first libvlc commit.
As for video output 4, this breaks almost everything, but I'll slowly
do what remains to be fixed during the weekend.
Changes in vlc:
===============
* vlc is now a very small program (20 lines) which uses the libvlc API;
it is quite simple for the moment but can be extended in the future.
* interfaces, decoders, video outputs, etc. are now almost the same
objects (yes, I know, this is C++ redone in C) and are structured in
a tree. More about this later, but basically it allows the following
nice features:
- several interfaces
- several playlists with several outputs
- input plugins spawning helper interfaces (will be used for DVD menus)
- anything spawning anything; I swear there are useful uses for this!
* libvlc can be used in other programs; I'm currently writing a Mozilla
plugin for my employer.
Things currently broken:
========================
* most interfaces, most ports
* the playlist handling (almost finished rewriting this though). This means
no file can be played from the GUI, you need to use the commandline. This
also means it segfaults at EOF, when exiting the program, and it sometimes
refuses to open a file when asked to.
2002-06-01 14:32:02 +02:00
|
|
|
intf_console_t * p_console; /* console */
|
|
|
|
intf_sys_t * p_sys; /* system interface */
|
2000-08-21 11:33:42 +02:00
|
|
|
|
Beginning of Interface II
---------------------------
* Plugins have completely disappeared, we now only use the new module API.
* All intf and vout modules are now independant. So far, only the Gnome
intf module and the SDL vout module have been ported. configure.in has
been modified to reflect the changes (x11 and dummy aren't compiled by
default anymore, while SDL and Gnome are).
Note that this is _not_ Interface II, it's just a step forward. For
instance, it lacks the whole message passing scheme.
Things that should work:
* Right-clicking on the SDL video output window brings the Gnome menu.
* Pause, Play, Exit, About work from the menu or from the interface window.
* The old SDL keys still work.
Things that are broken or may be broken:
* Xlib calls are not locked yet, which may lead to "Unexpected async reply"
errors, and make the vlc segfault.
* Sound only works for the first file.
* The SDL vout_sdl.c file is absolutely ugly and kludgey.
* The vlc immediately quits when no filename is given as an argument. Not
a real bug, but still annoying.
* The Gnome menu does not work in fullscreen mode.
Things that will come soon, maybe tomorrow:
* Complete navigation buttons (fast forward, slow, etc.).
* File/Open menu to add files to the playlist.
* Return of the X11 video output for those of us who do not have SDL.
* Textmode interface for those of us who do not have Gnome.
* aout and vout autospawn (maybe).
2001-02-11 02:15:12 +01:00
|
|
|
/* Plugin used and shortcuts to access its capabilities */
|
* ALL: the first libvlc commit.
As for video output 4, this breaks almost everything, but I'll slowly
do what remains to be fixed during the weekend.
Changes in vlc:
===============
* vlc is now a very small program (20 lines) which uses the libvlc API;
it is quite simple for the moment but can be extended in the future.
* interfaces, decoders, video outputs, etc. are now almost the same
objects (yes, I know, this is C++ redone in C) and are structured in
a tree. More about this later, but basically it allows the following
nice features:
- several interfaces
- several playlists with several outputs
- input plugins spawning helper interfaces (will be used for DVD menus)
- anything spawning anything; I swear there are useful uses for this!
* libvlc can be used in other programs; I'm currently writing a Mozilla
plugin for my employer.
Things currently broken:
========================
* most interfaces, most ports
* the playlist handling (almost finished rewriting this though). This means
no file can be played from the GUI, you need to use the commandline. This
also means it segfaults at EOF, when exiting the program, and it sometimes
refuses to open a file when asked to.
2002-06-01 14:32:02 +02:00
|
|
|
module_t * p_module;
|
|
|
|
int ( *pf_open ) ( intf_thread_t * );
|
|
|
|
void ( *pf_close ) ( intf_thread_t * );
|
|
|
|
void ( *pf_run ) ( intf_thread_t * );
|
2000-02-14 09:44:59 +01:00
|
|
|
|
Beginning of Interface II
---------------------------
* Plugins have completely disappeared, we now only use the new module API.
* All intf and vout modules are now independant. So far, only the Gnome
intf module and the SDL vout module have been ported. configure.in has
been modified to reflect the changes (x11 and dummy aren't compiled by
default anymore, while SDL and Gnome are).
Note that this is _not_ Interface II, it's just a step forward. For
instance, it lacks the whole message passing scheme.
Things that should work:
* Right-clicking on the SDL video output window brings the Gnome menu.
* Pause, Play, Exit, About work from the menu or from the interface window.
* The old SDL keys still work.
Things that are broken or may be broken:
* Xlib calls are not locked yet, which may lead to "Unexpected async reply"
errors, and make the vlc segfault.
* Sound only works for the first file.
* The SDL vout_sdl.c file is absolutely ugly and kludgey.
* The vlc immediately quits when no filename is given as an argument. Not
a real bug, but still annoying.
* The Gnome menu does not work in fullscreen mode.
Things that will come soon, maybe tomorrow:
* Complete navigation buttons (fast forward, slow, etc.).
* File/Open menu to add files to the playlist.
* Return of the X11 video output for those of us who do not have SDL.
* Textmode interface for those of us who do not have Gnome.
* aout and vout autospawn (maybe).
2001-02-11 02:15:12 +01:00
|
|
|
/* XXX: new message passing stuff will go here */
|
* ALL: the first libvlc commit.
As for video output 4, this breaks almost everything, but I'll slowly
do what remains to be fixed during the weekend.
Changes in vlc:
===============
* vlc is now a very small program (20 lines) which uses the libvlc API;
it is quite simple for the moment but can be extended in the future.
* interfaces, decoders, video outputs, etc. are now almost the same
objects (yes, I know, this is C++ redone in C) and are structured in
a tree. More about this later, but basically it allows the following
nice features:
- several interfaces
- several playlists with several outputs
- input plugins spawning helper interfaces (will be used for DVD menus)
- anything spawning anything; I swear there are useful uses for this!
* libvlc can be used in other programs; I'm currently writing a Mozilla
plugin for my employer.
Things currently broken:
========================
* most interfaces, most ports
* the playlist handling (almost finished rewriting this though). This means
no file can be played from the GUI, you need to use the commandline. This
also means it segfaults at EOF, when exiting the program, and it sometimes
refuses to open a file when asked to.
2002-06-01 14:32:02 +02:00
|
|
|
vlc_mutex_t change_lock;
|
|
|
|
vlc_bool_t b_menu_change;
|
|
|
|
vlc_bool_t b_menu;
|
2002-07-17 23:54:37 +02:00
|
|
|
|
* ALL: the first libvlc commit.
As for video output 4, this breaks almost everything, but I'll slowly
do what remains to be fixed during the weekend.
Changes in vlc:
===============
* vlc is now a very small program (20 lines) which uses the libvlc API;
it is quite simple for the moment but can be extended in the future.
* interfaces, decoders, video outputs, etc. are now almost the same
objects (yes, I know, this is C++ redone in C) and are structured in
a tree. More about this later, but basically it allows the following
nice features:
- several interfaces
- several playlists with several outputs
- input plugins spawning helper interfaces (will be used for DVD menus)
- anything spawning anything; I swear there are useful uses for this!
* libvlc can be used in other programs; I'm currently writing a Mozilla
plugin for my employer.
Things currently broken:
========================
* most interfaces, most ports
* the playlist handling (almost finished rewriting this though). This means
no file can be played from the GUI, you need to use the commandline. This
also means it segfaults at EOF, when exiting the program, and it sometimes
refuses to open a file when asked to.
2002-06-01 14:32:02 +02:00
|
|
|
};
|
2002-02-19 01:50:20 +01:00
|
|
|
|
2000-02-13 05:31:35 +01:00
|
|
|
/*****************************************************************************
|
1999-08-08 14:42:54 +02:00
|
|
|
* Prototypes
|
2000-02-13 05:31:35 +01:00
|
|
|
*****************************************************************************/
|
2002-06-01 20:04:49 +02:00
|
|
|
#define intf_Create(a) __intf_Create(CAST_TO_VLC_OBJECT(a))
|
2002-07-17 23:54:37 +02:00
|
|
|
VLC_EXPORT( intf_thread_t *, __intf_Create, ( vlc_object_t * ) );
|
|
|
|
VLC_EXPORT( vlc_error_t, intf_RunThread, ( intf_thread_t * ) );
|
|
|
|
VLC_EXPORT( void, intf_StopThread, ( intf_thread_t * ) );
|
|
|
|
VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
|
2000-01-11 00:36:06 +01:00
|
|
|
|