Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
a308763e
Commit
a308763e
authored
May 31, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate libvlccore and libvlc headers
Now, we still need to remove the vlc/vlc.h hack.
parent
2f1752dd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
380 deletions
+109
-380
include/vlc/deprecated.h
include/vlc/deprecated.h
+0
-374
include/vlc/libvlc_structures.h
include/vlc/libvlc_structures.h
+22
-0
include/vlc/vlc.h
include/vlc/vlc.h
+4
-1
include/vlc_common.h
include/vlc_common.h
+81
-1
src/Makefile.am
src/Makefile.am
+0
-1
src/test/headers.c
src/test/headers.c
+2
-3
No files found.
include/vlc/deprecated.h
View file @
a308763e
...
@@ -202,380 +202,6 @@ VLC_DEPRECATED_API libvlc_media_player_t * libvlc_playlist_get_media_player(
...
@@ -202,380 +202,6 @@ VLC_DEPRECATED_API libvlc_media_player_t * libvlc_playlist_get_media_player(
/** @}*/
/** @}*/
/**
* \defgroup libvlc_old Libvlc Old (Deprecated)
* This is libvlc, the base library of the VLC program. (Deprecated)
* This is the legacy API. Please consider using the new libvlc API
*
* @deprecated
* @{
*/
/*****************************************************************************
* Exported vlc API (Deprecated)
*****************************************************************************/
/*****************************************************************************
* Playlist
*****************************************************************************/
/* Used by VLC_AddTarget() */
#define PLAYLIST_INSERT 0x0001
#define PLAYLIST_APPEND 0x0002
#define PLAYLIST_GO 0x0004
#define PLAYLIST_PREPARSE 0x0008
#define PLAYLIST_SPREPARSE 0x0010
#define PLAYLIST_NO_REBUILD 0x0020
#define PLAYLIST_END -666
/*****************************************************************************
* Error values
*****************************************************************************/
#define VLC_SUCCESS -0
/* No error */
#define VLC_ENOMEM -1
/* Not enough memory */
#define VLC_ETHREAD -2
/* Thread error */
#define VLC_ETIMEOUT -3
/* Timeout */
#define VLC_ENOMOD -10
/* Module not found */
#define VLC_ENOOBJ -20
/* Object not found */
#define VLC_EBADOBJ -21
/* Bad object type */
#define VLC_ENOVAR -30
/* Variable not found */
#define VLC_EBADVAR -31
/* Bad variable value */
#define VLC_ENOITEM -40
/**< Item not found */
#define VLC_EEXIT -255
/* Program exited */
#define VLC_EEXITSUCCESS -999
/* Program exited successfully */
#define VLC_EGENERIC -666
/* Generic error */
#if !defined( __LIBVLC__ )
/* Otherwise they are declared and exported in vlc_common.h */
/**
* Retrieve libvlc version
*
* \return a string containing the libvlc version
*/
VLC_DEPRECATED_API
char
const
*
VLC_Version
(
void
);
/**
* Retrieve the username of the libvlc builder
*
* \return a string containing the username of the libvlc builder
*/
VLC_DEPRECATED_API
char
const
*
VLC_CompileBy
(
void
);
/**
* Retrieve the host of the libvlc builder
*
* \return a string containing the host of the libvlc builder
*/
VLC_DEPRECATED_API
char
const
*
VLC_CompileHost
(
void
);
/**
* Retrieve the domain name of the host of the libvlc builder
*
* \return a string containing the domain name of the host of the libvlc builder
*/
VLC_DEPRECATED_API
char
const
*
VLC_CompileDomain
(
void
);
/**
* Retrieve libvlc compiler version
*
* \return a string containing the libvlc compiler version
*/
VLC_DEPRECATED_API
char
const
*
VLC_Compiler
(
void
);
/**
* Retrieve libvlc changeset
*
* \return a string containing the libvlc subversion changeset
*/
VLC_DEPRECATED_API
char
const
*
VLC_Changeset
(
void
);
#endif
/* __LIBVLC__ */
/**
* Set a VLC variable
*
* This function sets a variable of VLC
*
* \note Was previously called VLC_Set
*
* \param i_object a vlc object id
* \param psz_var a vlc variable name
* \param value a vlc_value_t structure
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_VariableSet
(
int
,
char
const
*
,
vlc_value_t
);
/**
* Get a VLC variable
*
* This function gets the value of a variable of VLC
* It stores it in the p_value argument
*
* \note Was previously called VLC_Get
*
* \param i_object a vlc object id
* \param psz_var a vlc variable name
* \param p_value a pointer to a vlc_value_t structure
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_VariableGet
(
int
,
char
const
*
,
vlc_value_t
*
);
/**
* Get a VLC variable type
*
* This function gets the type of a variable of VLC
* It stores it in the p_type argument
*
* \param i_object a vlc object id
* \param psz_var a vlc variable name
* \param pi_type a pointer to an integer
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_VariableType
(
int
,
char
const
*
,
int
*
);
/**
* Add a target to the current playlist
*
* This funtion will add a target to the current playlist. If a playlist does
* not exist, it will be created.
*
* \param i_object a vlc object id
* \param psz_target the URI of the target to play
* \param ppsz_options an array of strings with input options (ie. :input-repeat)
* \param i_options the amount of options in the ppsz_options array
* \param i_mode the insert mode to insert the target into the playlist (PLAYLIST_* defines)
* \param i_pos the position at which to add the new target (PLAYLIST_END for end)
* \return the item id on success and -1 on error
*/
VLC_DEPRECATED_API
int
VLC_AddTarget
(
int
,
char
const
*
,
const
char
**
,
int
,
int
,
int
);
/**
* Start the playlist and play the currently selected playlist item
*
* If there is something in the playlist, and the playlist is not running,
* then start the playlist and play the currently selected playlist item.
* If an item is currently paused, then resume it.
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_Play
(
int
);
/**
* Pause the currently playing item. Resume it if already paused
*
* If an item is currently playing then pause it.
* If the item is already paused, then resume playback.
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_Pause
(
int
);
/**
* Stop the playlist
*
* If an item is currently playing then stop it.
* Set the playlist to a stopped state.
*
* \note This function is new. The old VLC_Stop is now called VLC_CleanUp
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_Stop
(
int
);
/**
* Tell if VLC is playing
*
* If an item is currently playing, it returns
* true, else false
*
* \param i_object a vlc object id
* \return true or false
*/
VLC_DEPRECATED_API
bool
VLC_IsPlaying
(
int
);
/**
* Get the current position in a input
*
* Return the current position as a float
* This method should be used for time sliders etc
* \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
*/
VLC_DEPRECATED_API
float
VLC_PositionGet
(
int
);
/**
* Set the current position in a input
*
* Set the current position as a float
* This method should be used for time sliders etc
* \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
*/
VLC_DEPRECATED_API
float
VLC_PositionSet
(
int
,
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
*/
VLC_DEPRECATED_API
int
VLC_TimeGet
(
int
);
/**
* 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
*/
VLC_DEPRECATED_API
int
VLC_TimeSet
(
int
,
int
,
bool
);
/**
* 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
*/
VLC_DEPRECATED_API
int
VLC_LengthGet
(
int
);
/**
* 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
*/
VLC_DEPRECATED_API
float
VLC_SpeedFaster
(
int
);
/**
* 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
*/
VLC_DEPRECATED_API
float
VLC_SpeedSlower
(
int
);
/**
* Return the current playlist item
*
* \param i_object a vlc object id
* \return the index of the playlistitem that is currently selected for play
*/
VLC_DEPRECATED_API
int
VLC_PlaylistIndex
(
int
);
/**
* Total amount of items in the playlist
*
* \param i_object a vlc object id
* \return amount of playlist items
*/
VLC_DEPRECATED_API
int
VLC_PlaylistNumberOfItems
(
int
);
/**
* Next playlist item
*
* Skip to the next playlistitem and play it.
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_PlaylistNext
(
int
);
/**
* Previous playlist item
*
* Skip to the previous playlistitem and play it.
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_PlaylistPrev
(
int
);
/**
* Clear the contents of the playlist
*
* Completly empty the entire playlist.
*
* \note Was previously called VLC_ClearPlaylist
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_PlaylistClear
(
int
);
/**
* 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 %)
*/
VLC_DEPRECATED_API
int
VLC_VolumeSet
(
int
,
int
);
/**
* Get the current volume
*
* Retrieve the current volume.
*
* \param i_object a vlc object id
* \return the current volume (range 0-200 %)
*/
VLC_DEPRECATED_API
int
VLC_VolumeGet
(
int
);
/**
* Mute/Unmute the volume
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_VolumeMute
(
int
);
/**
* Toggle Fullscreen mode
*
* Switch between normal and fullscreen video
*
* \param i_object a vlc object id
* \return VLC_SUCCESS on success
*/
VLC_DEPRECATED_API
int
VLC_FullScreen
(
int
);
/**@} */
# ifdef __cplusplus
# ifdef __cplusplus
}
}
# endif
# endif
...
...
include/vlc/libvlc_structures.h
View file @
a308763e
...
@@ -24,6 +24,28 @@
...
@@ -24,6 +24,28 @@
#ifndef _LIBVLC_STRUCTURES_H
#ifndef _LIBVLC_STRUCTURES_H
#define _LIBVLC_STRUCTURES_H 1
#define _LIBVLC_STRUCTURES_H 1
#if defined (WIN32) && defined (DLL_EXPORT)
# define VLC_PUBLIC_API __declspec(dllexport)
#else
# define VLC_PUBLIC_API
#endif
#ifdef __LIBVLC__
/* Avoid unuseful warnings from libvlc with our deprecated APIs */
# define VLC_DEPRECATED_API VLC_PUBLIC_API
#elif defined(__GNUC__) && \
(__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
#else
# define VLC_DEPRECATED_API VLC_PUBLIC_API
#endif
#if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
typedef
signed
__int64
vlc_int64_t
;
# else
typedef
signed
long
long
vlc_int64_t
;
#endif
# ifdef __cplusplus
# ifdef __cplusplus
extern
"C"
{
extern
"C"
{
# endif
# endif
...
...
include/vlc/vlc.h
View file @
a308763e
...
@@ -28,11 +28,14 @@
...
@@ -28,11 +28,14 @@
#ifndef _VLC_VLC_H
#ifndef _VLC_VLC_H
#define _VLC_VLC_H 1
#define _VLC_VLC_H 1
# ifdef __LIBVLC__
# include <vlc_common.h>
/* FIXME */
# endif
# ifdef __cplusplus
# ifdef __cplusplus
extern
"C"
{
extern
"C"
{
# endif
# endif
#include <vlc/common.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_events.h>
#include <vlc/libvlc_events.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc.h>
...
...
include/vlc_common.h
View file @
a308763e
...
@@ -48,6 +48,10 @@
...
@@ -48,6 +48,10 @@
#include <stdio.h>
#include <stdio.h>
#include <inttypes.h>
#include <inttypes.h>
#ifndef __cplusplus
# include <stdbool.h>
#endif
/*****************************************************************************
/*****************************************************************************
* Basic types definitions
* Basic types definitions
*****************************************************************************/
*****************************************************************************/
...
@@ -118,6 +122,8 @@ static inline void __vlc_fourcc_to_char( vlc_fourcc_t fcc, char *psz_fourcc )
...
@@ -118,6 +122,8 @@ static inline void __vlc_fourcc_to_char( vlc_fourcc_t fcc, char *psz_fourcc )
*****************************************************************************/
*****************************************************************************/
/* Internal types */
/* Internal types */
typedef
struct
vlc_list_t
vlc_list_t
;
typedef
struct
vlc_object_t
vlc_object_t
;
typedef
struct
libvlc_int_t
libvlc_int_t
;
typedef
struct
libvlc_int_t
libvlc_int_t
;
typedef
struct
variable_t
variable_t
;
typedef
struct
variable_t
variable_t
;
typedef
struct
date_t
date_t
;
typedef
struct
date_t
date_t
;
...
@@ -374,6 +380,81 @@ struct _stati64;
...
@@ -374,6 +380,81 @@ struct _stati64;
struct
stat
;
struct
stat
;
#endif
#endif
/**
* VLC value structure
*/
typedef
union
{
int
i_int
;
bool
b_bool
;
float
f_float
;
char
*
psz_string
;
void
*
p_address
;
vlc_object_t
*
p_object
;
vlc_list_t
*
p_list
;
mtime_t
i_time
;
struct
{
char
*
psz_name
;
int
i_object_id
;
}
var
;
/* Make sure the structure is at least 64bits */
struct
{
char
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
;
}
padding
;
}
vlc_value_t
;
/**
* VLC list structure
*/
struct
vlc_list_t
{
int
i_count
;
vlc_value_t
*
p_values
;
int
*
pi_types
;
};
/**
* \defgroup var_type Variable types
* These are the different types a vlc variable can have.
* @{
*/
#define VLC_VAR_VOID 0x0010
#define VLC_VAR_BOOL 0x0020
#define VLC_VAR_INTEGER 0x0030
#define VLC_VAR_HOTKEY 0x0031
#define VLC_VAR_STRING 0x0040
#define VLC_VAR_MODULE 0x0041
#define VLC_VAR_FILE 0x0042
#define VLC_VAR_DIRECTORY 0x0043
#define VLC_VAR_VARIABLE 0x0044
#define VLC_VAR_FLOAT 0x0050
#define VLC_VAR_TIME 0x0060
#define VLC_VAR_ADDRESS 0x0070
#define VLC_VAR_MUTEX 0x0080
#define VLC_VAR_LIST 0x0090
/**@}*/
/*****************************************************************************
* Error values (shouldn't be exposed)
*****************************************************************************/
#define VLC_SUCCESS -0
/* No error */
#define VLC_ENOMEM -1
/* Not enough memory */
#define VLC_ETHREAD -2
/* Thread error */
#define VLC_ETIMEOUT -3
/* Timeout */
#define VLC_ENOMOD -10
/* Module not found */
#define VLC_ENOOBJ -20
/* Object not found */
#define VLC_EBADOBJ -21
/* Bad object type */
#define VLC_ENOVAR -30
/* Variable not found */
#define VLC_EBADVAR -31
/* Bad variable value */
#define VLC_ENOITEM -40
/**< Item not found */
#define VLC_EEXIT -255
/* Program exited */
#define VLC_EEXITSUCCESS -999
/* Program exited successfully */
#define VLC_EGENERIC -666
/* Generic error */
/*****************************************************************************
/*****************************************************************************
* Variable callbacks
* Variable callbacks
*****************************************************************************/
*****************************************************************************/
...
@@ -397,7 +478,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
...
@@ -397,7 +478,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
#else
#else
# define LIBVLC_EXPORT
# define LIBVLC_EXPORT
#endif
#endif
#define VLC_PUBLIC_API LIBVLC_EXTERN LIBVLC_EXPORT
#define VLC_EXPORT( type, name, args ) \
#define VLC_EXPORT( type, name, args ) \
LIBVLC_EXTERN LIBVLC_EXPORT type name args
LIBVLC_EXTERN LIBVLC_EXPORT type name args
...
...
src/Makefile.am
View file @
a308763e
...
@@ -25,7 +25,6 @@ pluginsincludedir = $(pkgincludedir)/plugins
...
@@ -25,7 +25,6 @@ pluginsincludedir = $(pkgincludedir)/plugins
pkginclude_HEADERS
=
\
pkginclude_HEADERS
=
\
../include/vlc/vlc.h
\
../include/vlc/vlc.h
\
../include/vlc/common.h
\
../include/vlc/deprecated.h
\
../include/vlc/deprecated.h
\
../include/vlc/libvlc.h
\
../include/vlc/libvlc.h
\
../include/vlc/libvlc_structures.h
\
../include/vlc/libvlc_structures.h
\
...
...
src/test/headers.c
View file @
a308763e
...
@@ -33,15 +33,14 @@
...
@@ -33,15 +33,14 @@
#endif
#endif
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc/common.h>
#include <vlc/deprecated.h>
#include <vlc/deprecated.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_events.h>
#include <vlc/libvlc_events.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_vlm.h>
#include <vlc/libvlc_vlm.h>
#include <vlc/mediacontrol.h>
//
#include <vlc/mediacontrol.h>
#include <vlc/mediacontrol_structures.h>
//
#include <vlc/mediacontrol_structures.h>
#include <stdio.h>
#include <stdio.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment