* 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
|
|
|
/*****************************************************************************
|
2006-09-23 15:37:50 +02:00
|
|
|
* libvlc.c: Implementation of the old libvlc API
|
* 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
|
|
|
*****************************************************************************
|
2007-04-05 18:42:16 +02:00
|
|
|
* Copyright (C) 1998-2007 the VideoLAN team
|
* ALL: Better announce system
- The SAP handler now runs in a separate thread.
- RTP sessions can be announced with sap (sdp=sap://,name=...)
TODO: Make this more configurable
- Better SDP generation (the timestamp problem is not resolved)
About this, there is a problem : as, for a RTP session, the URI
is the complete SDP, if the session is recreated, as the URI has
changed, a new item is added to the playlist
- Experimental flow control algorithm :
It does not follow the "Recommended" implementation, as it needs
to count the sessions (to achieve this, we should make this work
together with the SAP listener)
It is disabled by default (use --sap-flow-control to enable).
When it is disabled, sap announcement interval is set by --sap-interval
* src/misc/net.c : created net_ReadNonBlock
* sap.c : Fixed memory problem
2004-04-18 20:21:09 +02:00
|
|
|
* $Id$
|
* 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
|
|
|
*
|
|
|
|
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
|
|
|
* Samuel Hocevar <sam@zoy.org>
|
2004-09-26 19:54:56 +02:00
|
|
|
* Gildas Bazin <gbazin@videolan.org>
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
* Derk-Jan Hartman <hartman at videolan dot org>
|
2006-01-30 23:02:47 +01:00
|
|
|
* Rémi Denis-Courmont <rem # videolan : org>
|
* 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
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2006-01-13 00:10:04 +01:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
* 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
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Pretend we are a builtin module
|
|
|
|
*****************************************************************************/
|
|
|
|
#define MODULE_NAME main
|
2002-08-09 00:28:23 +02:00
|
|
|
#define MODULE_PATH main
|
* 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
|
|
|
#define __BUILTIN__
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Preamble
|
|
|
|
*****************************************************************************/
|
2008-01-23 22:50:58 +01:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2008-05-31 20:56:22 +02:00
|
|
|
#include <vlc_common.h>
|
2002-11-10 19:04:24 +01:00
|
|
|
|
2006-11-26 15:20:34 +01:00
|
|
|
#include "control/libvlc_internal.h"
|
2007-08-19 16:54:33 +02:00
|
|
|
#include "libvlc.h"
|
* 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
|
|
|
|
2006-11-12 00:37:25 +01:00
|
|
|
#include <vlc_playlist.h>
|
* 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
|
|
|
|
2006-11-26 15:20:34 +01:00
|
|
|
#include <vlc_aout.h>
|
|
|
|
#include <vlc_vout.h>
|
* 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
|
|
|
|
2006-09-15 18:18:08 +02:00
|
|
|
#define LIBVLC_FUNC \
|
|
|
|
libvlc_int_t * p_libvlc = vlc_current_object( i_object ); \
|
|
|
|
if( !p_libvlc ) return VLC_ENOOBJ;
|
|
|
|
#define LIBVLC_FUNC_END \
|
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
|
|
|
|
|
|
|
|
2002-08-20 20:08:51 +02:00
|
|
|
/*****************************************************************************
|
2008-05-08 22:29:40 +02:00
|
|
|
* VLC_VariableSet: set a "safe" vlc variable
|
2002-08-20 20:08:51 +02:00
|
|
|
*****************************************************************************/
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value )
|
2002-08-20 20:08:51 +02:00
|
|
|
{
|
2002-12-14 20:34:07 +01:00
|
|
|
int i_ret;
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_FUNC;
|
2002-08-20 20:08:51 +02:00
|
|
|
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
/* FIXME: Temporary hack for Mozilla, if variable starts with conf:: then
|
|
|
|
* we handle it as a configuration variable. Don't tell Gildas :) -- sam */
|
|
|
|
if( !strncmp( psz_var, "conf::", 6 ) )
|
2002-08-20 20:08:51 +02:00
|
|
|
{
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
module_config_t *p_item;
|
2002-10-14 18:46:56 +02:00
|
|
|
char const *psz_newvar = psz_var + 6;
|
2002-08-20 20:08:51 +02:00
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_item = config_FindConfig( VLC_OBJECT(p_libvlc), psz_newvar );
|
2002-08-20 20:08:51 +02:00
|
|
|
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
if( p_item )
|
2002-08-20 20:08:51 +02:00
|
|
|
{
|
2008-05-08 22:29:40 +02:00
|
|
|
/* VLC_VariableSet is only used from the browser plugins, so we
|
|
|
|
* can pretty much assume that the input is _not_ trusted. */
|
|
|
|
if( !p_item->b_safe )
|
|
|
|
return VLC_EGENERIC;
|
|
|
|
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
switch( p_item->i_type )
|
2002-08-20 20:08:51 +02:00
|
|
|
{
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
case CONFIG_ITEM_BOOL:
|
2006-09-15 16:31:51 +02:00
|
|
|
config_PutInt( p_libvlc, psz_newvar, value.b_bool );
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
break;
|
|
|
|
case CONFIG_ITEM_INTEGER:
|
2006-09-15 16:31:51 +02:00
|
|
|
config_PutInt( p_libvlc, psz_newvar, value.i_int );
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
break;
|
|
|
|
case CONFIG_ITEM_FLOAT:
|
2006-09-15 16:31:51 +02:00
|
|
|
config_PutFloat( p_libvlc, psz_newvar, value.f_float );
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
break;
|
|
|
|
default:
|
2006-09-15 16:31:51 +02:00
|
|
|
config_PutPsz( p_libvlc, psz_newvar, value.psz_string );
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
break;
|
2002-08-20 20:08:51 +02:00
|
|
|
}
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
return VLC_SUCCESS;
|
2002-08-20 20:08:51 +02:00
|
|
|
}
|
|
|
|
}
|
2008-05-08 22:39:23 +02:00
|
|
|
/* EXPLICIT HACK (this is the legacy API anyway):
|
|
|
|
* VLC_VariableSet is only used from the browser plugins, so we
|
|
|
|
* can pretty much assume that the input is _not_ trusted. */
|
|
|
|
module_config_t *p_item;
|
|
|
|
p_item = config_FindConfig( VLC_OBJECT(p_libvlc), psz_var );
|
|
|
|
if( !p_item )
|
|
|
|
return VLC_ENOVAR;
|
|
|
|
if( !p_item->b_safe )
|
|
|
|
return VLC_EGENERIC;
|
2002-08-20 20:08:51 +02:00
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
i_ret = var_Set( p_libvlc, psz_var, value );
|
2002-12-14 20:34:07 +01:00
|
|
|
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_FUNC_END;
|
2002-12-14 20:34:07 +01:00
|
|
|
return i_ret;
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
* VLC_VariableGet: get a vlc variable
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
*****************************************************************************/
|
2004-09-28 15:55:00 +02:00
|
|
|
int VLC_VariableGet( int i_object, char const *psz_var, vlc_value_t *p_value )
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
{
|
2002-12-14 20:34:07 +01:00
|
|
|
int i_ret;
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_FUNC;
|
2006-09-15 16:31:51 +02:00
|
|
|
i_ret = var_Get( p_libvlc , psz_var, p_value );
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_FUNC_END;
|
2002-12-14 20:34:07 +01:00
|
|
|
return i_ret;
|
2002-08-20 20:08:51 +02:00
|
|
|
}
|
|
|
|
|
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* VLC_VariableType: get a vlc variable type
|
|
|
|
*****************************************************************************/
|
|
|
|
int VLC_VariableType( int i_object, char const *psz_var, int *pi_type )
|
|
|
|
{
|
|
|
|
int i_type;
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_FUNC;
|
2005-05-31 15:24:34 +02:00
|
|
|
/* FIXME: Temporary hack for Mozilla, if variable starts with conf:: then
|
|
|
|
* we handle it as a configuration variable. Don't tell Gildas :) -- sam */
|
|
|
|
if( !strncmp( psz_var, "conf::", 6 ) )
|
|
|
|
{
|
|
|
|
module_config_t *p_item;
|
|
|
|
char const *psz_newvar = psz_var + 6;
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_item = config_FindConfig( VLC_OBJECT(p_libvlc), psz_newvar );
|
2005-05-31 15:24:34 +02:00
|
|
|
|
|
|
|
if( p_item )
|
|
|
|
{
|
|
|
|
switch( p_item->i_type )
|
|
|
|
{
|
|
|
|
case CONFIG_ITEM_BOOL:
|
|
|
|
i_type = VLC_VAR_BOOL;
|
|
|
|
break;
|
|
|
|
case CONFIG_ITEM_INTEGER:
|
|
|
|
i_type = VLC_VAR_INTEGER;
|
|
|
|
break;
|
|
|
|
case CONFIG_ITEM_FLOAT:
|
|
|
|
i_type = VLC_VAR_FLOAT;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
i_type = VLC_VAR_STRING;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
i_type = 0;
|
|
|
|
}
|
|
|
|
else
|
2006-09-15 16:31:51 +02:00
|
|
|
i_type = VLC_VAR_TYPE & var_Type( p_libvlc , psz_var );
|
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
|
|
|
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_FUNC_END;
|
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
|
|
|
|
|
|
|
if( i_type > 0 )
|
|
|
|
{
|
|
|
|
*pi_type = i_type;
|
|
|
|
return VLC_SUCCESS;
|
|
|
|
}
|
|
|
|
return VLC_ENOVAR;
|
|
|
|
}
|
|
|
|
|
2006-09-15 18:18:08 +02:00
|
|
|
#define LIBVLC_PLAYLIST_FUNC \
|
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );\
|
2008-05-07 21:26:56 +02:00
|
|
|
if( !p_libvlc ) return VLC_ENOOBJ; \
|
|
|
|
playlist_t *p_playlist = pl_Yield( p_libvlc ); \
|
|
|
|
if( !p_playlist ) return VLC_ENOOBJ
|
2006-09-15 18:18:08 +02:00
|
|
|
|
|
|
|
#define LIBVLC_PLAYLIST_FUNC_END \
|
2008-05-07 21:26:56 +02:00
|
|
|
pl_Release( p_libvlc ); \
|
2006-09-15 18:18:08 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
|
|
|
|
2004-01-06 09:50:20 +01:00
|
|
|
/*****************************************************************************
|
2004-06-05 18:09:00 +02:00
|
|
|
* VLC_AddTarget: adds a target for playing.
|
|
|
|
*****************************************************************************
|
2006-09-15 18:18:08 +02:00
|
|
|
* This function adds psz_target to the playlist
|
2004-01-06 09:50:20 +01:00
|
|
|
*****************************************************************************/
|
2006-09-15 18:18:08 +02:00
|
|
|
|
2004-06-05 18:09:00 +02:00
|
|
|
int VLC_AddTarget( int i_object, char const *psz_target,
|
|
|
|
char const **ppsz_options, int i_options,
|
|
|
|
int i_mode, int i_pos )
|
2004-01-06 09:50:20 +01:00
|
|
|
{
|
2004-06-05 18:09:00 +02:00
|
|
|
int i_err;
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
i_err = playlist_AddExt( p_playlist, psz_target,
|
2006-11-12 00:37:25 +01:00
|
|
|
NULL, i_mode, i_pos, -1,
|
2008-04-14 00:08:29 +02:00
|
|
|
ppsz_options, i_options, true, false );
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
2004-06-05 18:09:00 +02:00
|
|
|
return i_err;
|
2004-01-06 09:50:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2005-11-09 14:44:49 +01:00
|
|
|
* VLC_Play: play the playlist
|
2004-01-06 09:50:20 +01:00
|
|
|
*****************************************************************************/
|
2004-06-05 18:09:00 +02:00
|
|
|
int VLC_Play( int i_object )
|
2004-01-06 09:50:20 +01:00
|
|
|
{
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
playlist_Play( p_playlist );
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
2004-06-05 18:58:57 +02:00
|
|
|
return VLC_SUCCESS;
|
2004-01-06 09:50:20 +01:00
|
|
|
}
|
|
|
|
|
2002-09-29 20:19:53 +02:00
|
|
|
/*****************************************************************************
|
2004-06-05 18:09:00 +02:00
|
|
|
* VLC_Pause: toggle pause
|
2002-09-29 20:19:53 +02:00
|
|
|
*****************************************************************************/
|
2004-06-05 18:09:00 +02:00
|
|
|
int VLC_Pause( int i_object )
|
2002-09-29 20:19:53 +02:00
|
|
|
{
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
playlist_Pause( p_playlist );
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
2004-06-05 18:58:57 +02:00
|
|
|
return VLC_SUCCESS;
|
2002-09-29 20:19:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2006-07-16 18:06:29 +02:00
|
|
|
* VLC_Stop: stop playback
|
2002-09-29 20:19:53 +02:00
|
|
|
*****************************************************************************/
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
int VLC_Stop( int i_object )
|
2002-09-29 20:19:53 +02:00
|
|
|
{
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
playlist_Stop( p_playlist );
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
2004-06-05 18:58:57 +02:00
|
|
|
return VLC_SUCCESS;
|
2004-06-05 18:09:00 +02:00
|
|
|
}
|
2004-01-25 18:16:06 +01:00
|
|
|
|
2004-06-05 18:09:00 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* VLC_IsPlaying: Query for Playlist Status
|
|
|
|
*****************************************************************************/
|
2008-04-14 00:08:29 +02:00
|
|
|
bool VLC_IsPlaying( int i_object )
|
2004-06-05 18:09:00 +02:00
|
|
|
{
|
2008-04-14 00:08:29 +02:00
|
|
|
bool b_playing;
|
2004-06-05 18:09:00 +02:00
|
|
|
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
if( p_playlist->p_input )
|
2005-08-11 00:31:12 +02:00
|
|
|
{
|
2005-11-15 15:37:18 +01:00
|
|
|
vlc_value_t val;
|
2008-05-07 21:26:56 +02:00
|
|
|
var_Get( p_playlist->p_input, "state", &val );
|
2005-11-15 15:37:18 +01:00
|
|
|
b_playing = ( val.i_int == PLAYING_S );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-05-07 21:26:56 +02:00
|
|
|
b_playing = playlist_IsPlaying( p_playlist );
|
2005-08-11 00:31:12 +02:00
|
|
|
}
|
2006-09-15 18:18:08 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return b_playing;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current position in a input
|
|
|
|
*
|
|
|
|
* Return the current position as a float
|
|
|
|
* \note For some inputs, this will be unknown.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return a float in the range of 0.0 - 1.0
|
|
|
|
*/
|
|
|
|
float VLC_PositionGet( int i_object )
|
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
|
|
|
var_Get( p_input, "position", &val );
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return val.f_float;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the current position in a input
|
|
|
|
*
|
|
|
|
* Set the current position in a input and then return
|
|
|
|
* the current position as a float.
|
|
|
|
* \note For some inputs, this will be unknown.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \param i_position a float in the range of 0.0 - 1.0
|
|
|
|
* \return a float in the range of 0.0 - 1.0
|
|
|
|
*/
|
|
|
|
float VLC_PositionSet( int i_object, float i_position )
|
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 16:31:51 +02:00
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
/* Check that the handle is valid */
|
2006-09-15 16:31:51 +02:00
|
|
|
if( !p_libvlc )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
2004-06-05 18:09:00 +02:00
|
|
|
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
|
|
|
val.f_float = i_position;
|
|
|
|
var_Set( p_input, "position", val );
|
|
|
|
var_Get( p_input, "position", &val );
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return val.f_float;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current position in a input
|
|
|
|
*
|
|
|
|
* Return the current position in seconds from the start.
|
|
|
|
* \note For some inputs, this will be unknown.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return the offset from 0:00 in seconds
|
|
|
|
*/
|
|
|
|
int VLC_TimeGet( int i_object )
|
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 16:31:51 +02:00
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
/* Check that the handle is valid */
|
2006-09-15 16:31:51 +02:00
|
|
|
if( !p_libvlc )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
|
|
|
var_Get( p_input, "time", &val );
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return val.i_time / 1000000;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Seek to a position in the current input
|
|
|
|
*
|
|
|
|
* Seek i_seconds in the current input. If b_relative is set,
|
|
|
|
* then the seek will be relative to the current position, otherwise
|
|
|
|
* it will seek to i_seconds from the beginning of the input.
|
|
|
|
* \note For some inputs, this will be unknown.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \param i_seconds seconds from current position or from beginning of input
|
|
|
|
* \param b_relative seek relative from current position
|
|
|
|
* \return VLC_SUCCESS on success
|
|
|
|
*/
|
2008-04-14 00:08:29 +02:00
|
|
|
int VLC_TimeSet( int i_object, int i_seconds, bool b_relative )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 16:31:51 +02:00
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
/* Check that the handle is valid */
|
2006-09-15 16:31:51 +02:00
|
|
|
if( !p_libvlc )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( b_relative )
|
|
|
|
{
|
2005-03-29 10:48:45 +02:00
|
|
|
val.i_time = i_seconds;
|
|
|
|
val.i_time = val.i_time * 1000000L;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
var_Set( p_input, "time-offset", val );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-03-29 10:48:45 +02:00
|
|
|
val.i_time = i_seconds;
|
|
|
|
val.i_time = val.i_time * 1000000L;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
var_Set( p_input, "time", val );
|
|
|
|
}
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the total length of a input
|
|
|
|
*
|
|
|
|
* Return the total length in seconds from the current input.
|
|
|
|
* \note For some inputs, this will be unknown.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return the length in seconds
|
|
|
|
*/
|
|
|
|
int VLC_LengthGet( int i_object )
|
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 16:31:51 +02:00
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
/* Check that the handle is valid */
|
2006-09-15 16:31:51 +02:00
|
|
|
if( !p_libvlc )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
|
|
|
var_Get( p_input, "length", &val );
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
2005-03-29 10:48:45 +02:00
|
|
|
return val.i_time / 1000000L;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Play the input faster than realtime
|
|
|
|
*
|
|
|
|
* 2x, 4x, 8x faster than realtime
|
|
|
|
* \note For some inputs, this will be impossible.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return the current speedrate
|
|
|
|
*/
|
|
|
|
float VLC_SpeedFaster( int i_object )
|
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 16:31:51 +02:00
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
/* Check that the handle is valid */
|
2006-09-15 16:31:51 +02:00
|
|
|
if( !p_libvlc )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2008-04-14 00:08:29 +02:00
|
|
|
val.b_bool = true;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
var_Set( p_input, "rate-faster", val );
|
|
|
|
var_Get( p_input, "rate", &val );
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
2004-06-22 21:31:54 +02:00
|
|
|
return val.f_float / INPUT_RATE_DEFAULT;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Play the input slower than realtime
|
|
|
|
*
|
|
|
|
* 1/2x, 1/4x, 1/8x slower than realtime
|
|
|
|
* \note For some inputs, this will be impossible.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return the current speedrate
|
|
|
|
*/
|
|
|
|
float VLC_SpeedSlower( int i_object )
|
|
|
|
{
|
|
|
|
input_thread_t *p_input;
|
|
|
|
vlc_value_t val;
|
2006-09-15 16:31:51 +02:00
|
|
|
libvlc_int_t *p_libvlc = vlc_current_object( i_object );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
/* Check that the handle is valid */
|
2006-09-15 16:31:51 +02:00
|
|
|
if( !p_libvlc )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
|
|
|
if( !p_input )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_ENOOBJ;
|
|
|
|
}
|
|
|
|
|
2008-04-14 00:08:29 +02:00
|
|
|
val.b_bool = true;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
var_Set( p_input, "rate-slower", val );
|
|
|
|
var_Get( p_input, "rate", &val );
|
|
|
|
vlc_object_release( p_input );
|
|
|
|
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
2004-06-22 21:31:54 +02:00
|
|
|
return val.f_float / INPUT_RATE_DEFAULT;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the current playlist item
|
|
|
|
*
|
|
|
|
* Returns the index of the playlistitem that is currently selected for play.
|
|
|
|
* This is valid even if nothing is currently playing.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return the current index
|
|
|
|
*/
|
|
|
|
int VLC_PlaylistIndex( int i_object )
|
|
|
|
{
|
2007-04-05 18:42:16 +02:00
|
|
|
(void)i_object;
|
2006-05-14 20:29:00 +02:00
|
|
|
printf( "This function is deprecated and should not be used anymore" );
|
|
|
|
return -1;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
}
|
2004-06-05 18:09:00 +02:00
|
|
|
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
/**
|
2006-09-15 21:48:42 +02:00
|
|
|
* Total number of items in the playlist
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return amount of playlist items
|
|
|
|
*/
|
|
|
|
int VLC_PlaylistNumberOfItems( int i_object )
|
|
|
|
{
|
|
|
|
int i_size;
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
i_size = p_playlist->items.i_size;
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return i_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2006-09-15 21:48:42 +02:00
|
|
|
* Go to next playlist item
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return VLC_SUCCESS on success
|
|
|
|
*/
|
|
|
|
int VLC_PlaylistNext( int i_object )
|
|
|
|
{
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
playlist_Next( p_playlist );
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2006-09-15 21:48:42 +02:00
|
|
|
* Go to previous playlist item
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return VLC_SUCCESS on success
|
|
|
|
*/
|
|
|
|
int VLC_PlaylistPrev( int i_object )
|
|
|
|
{
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
playlist_Prev( p_playlist );
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_SUCCESS;
|
2002-09-29 20:19:53 +02:00
|
|
|
}
|
|
|
|
|
2006-09-15 21:48:42 +02:00
|
|
|
/**
|
|
|
|
* Empty the playlist
|
|
|
|
*/
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
int VLC_PlaylistClear( int i_object )
|
2002-09-29 20:19:53 +02:00
|
|
|
{
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC;
|
2008-05-07 21:26:56 +02:00
|
|
|
playlist_Clear( p_playlist, true );
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_PLAYLIST_FUNC_END;
|
2006-05-14 20:29:00 +02:00
|
|
|
return VLC_SUCCESS;
|
2002-09-29 20:19:53 +02:00
|
|
|
}
|
|
|
|
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
/**
|
|
|
|
* Change the volume
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \param i_volume something in a range from 0-200
|
|
|
|
* \return the new volume (range 0-200 %)
|
|
|
|
*/
|
|
|
|
int VLC_VolumeSet( int i_object, int i_volume )
|
|
|
|
{
|
2004-06-12 02:19:59 +02:00
|
|
|
audio_volume_t i_vol = 0;
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
|
2004-06-12 02:19:59 +02:00
|
|
|
if( i_volume >= 0 && i_volume <= 200 )
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
{
|
|
|
|
i_vol = i_volume * AOUT_VOLUME_MAX / 200;
|
2006-09-15 16:31:51 +02:00
|
|
|
aout_VolumeSet( p_libvlc, i_vol );
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
}
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return i_vol * 200 / AOUT_VOLUME_MAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current volume
|
|
|
|
*
|
|
|
|
* Retrieve the current volume.
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return the current volume (range 0-200 %)
|
|
|
|
*/
|
|
|
|
int VLC_VolumeGet( int i_object )
|
|
|
|
{
|
|
|
|
audio_volume_t i_volume;
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC;
|
2006-09-15 16:31:51 +02:00
|
|
|
aout_VolumeGet( p_libvlc, &i_volume );
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return i_volume*200/AOUT_VOLUME_MAX;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mute/Unmute the volume
|
|
|
|
*
|
|
|
|
* \param i_object a vlc object id
|
|
|
|
* \return VLC_SUCCESS on success
|
|
|
|
*/
|
|
|
|
int VLC_VolumeMute( int i_object )
|
|
|
|
{
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC;
|
2006-09-15 16:31:51 +02:00
|
|
|
aout_VolumeMute( p_libvlc, NULL );
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC_END;
|
* WARNING: Libvlc API change
- VLC_Set VLC_Get were changed to VLC_VariableGet VLC_VariableSet
- VLC_ClearPlaylist was changed to VLC_PlaylistClear
- Added a lot of new calls:
VLC_PositionGet, VLC_PositionSet, VLC_TimeGet, VLC_TimeSet,
VLC_LengthGet, VLC_SpeedFaster, VLC_SpeedSlower, VLC_PlaylistIndex,
VLC_PlaylistNumberOfItems, VLC_PlaylistNext, VLC_PlaylistPrev,
VLC_VolumeGet, VLC_VolumeSet, VLC_VolumeMute.
- everything doxygenized.
- There are NO mozilla functions of these additions yet. (someone else please?)
2004-06-06 15:02:26 +02:00
|
|
|
return VLC_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2002-09-29 20:19:53 +02:00
|
|
|
/*****************************************************************************
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
* VLC_FullScreen: toggle fullscreen mode
|
2002-09-29 20:19:53 +02:00
|
|
|
*****************************************************************************/
|
Changes to the libvlc API:
* ./include/vlc/vlc.h: changed the naming conventions for libvlc. Now
exported functions start with VLC_ instead of vlc_ to avoid conflicts.
* ./include/vlc/vlc.h: removed the vlc_object_t, vlc_list_t, vlc_error_t
and vlc_t types; they are now internal types only.
* ./include/vlc/vlc.h: merged the reentrant and non-reentrant libvlc
calls. In non-reentrant mode, we just use 0 as the first argument. In
reentrant mode, we use an object's ID. (see below)
Internal changes:
* ./src/libvlc.c, ./src/misc/objects.c: instead of manipulating vlc_object_t
pointers, we manipulate their i_object_id. When needed, an object is
retrieved using vlc_object_get (I hope the lookup isn't too expensive,
that's why I designed the pp_objects layout to allow log2(n) seeks).
* ./src/misc/objects.c: activated the per-object variable storage. Unused
yet, unless you want to try "getfoo" and "setfoo blablah" in vlc -I rc.
* ./include/vlc_objects.h: moved the vlc_object_t and vlc_list_t definitions
here.
Misc:
* ./src/vlc.c, ./mozilla/vlcshell.cpp: removed inclusion of config.h in
code portions not part of libvlc; it was just required for the
COPYRIGHT_MESSAGE string which is now available from VLC_Version().
2002-10-12 00:32:56 +02:00
|
|
|
int VLC_FullScreen( int i_object )
|
2002-09-29 20:19:53 +02:00
|
|
|
{
|
|
|
|
vout_thread_t *p_vout;
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC;
|
2006-09-15 16:31:51 +02:00
|
|
|
p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD );
|
2002-09-29 20:19:53 +02:00
|
|
|
|
|
|
|
if( !p_vout )
|
|
|
|
{
|
2006-09-15 16:31:51 +02:00
|
|
|
if( i_object ) vlc_object_release( p_libvlc );
|
2002-10-14 18:46:56 +02:00
|
|
|
return VLC_ENOOBJ;
|
2002-09-29 20:19:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
|
|
|
|
vlc_object_release( p_vout );
|
2006-09-15 21:48:42 +02:00
|
|
|
LIBVLC_FUNC_END;
|
2004-01-09 21:36:21 +01:00
|
|
|
return VLC_SUCCESS;
|
|
|
|
}
|