Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
dda8e39f
Commit
dda8e39f
authored
Oct 23, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/libvlc.c: hid p_static_vlc in a vlc_current_object function so that
it can later be used from outside as well.
parent
aa9e8c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
35 deletions
+30
-35
src/libvlc.c
src/libvlc.c
+30
-35
No files found.
src/libvlc.c
View file @
dda8e39f
...
...
@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.9
7 2003/09/29 17:36:34 gbazin
Exp $
* $Id: libvlc.c,v 1.9
8 2003/10/23 16:43:37 sam
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -99,6 +99,23 @@ static void ShowConsole ( void );
#endif
static
int
ConsoleWidth
(
void
);
/*****************************************************************************
* vlc_current_object: return the current object.
*****************************************************************************
* If i_object is non-zero, return the corresponding object. Otherwise,
* return the statically allocated p_vlc object.
*****************************************************************************/
vlc_t
*
vlc_current_object
(
int
i_object
)
{
if
(
i_object
)
{
return
vlc_object_get
(
p_libvlc
,
i_object
);
}
return
p_static_vlc
;
}
/*****************************************************************************
* VLC_Version: return the libvlc version.
*****************************************************************************
...
...
@@ -221,13 +238,11 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
char
*
psz_parser
;
char
*
psz_language
;
vlc_bool_t
b_exit
=
VLC_FALSE
;
vlc_t
*
p_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
)
;
module_t
*
p_help_module
;
playlist_t
*
p_playlist
;
vlc_value_t
lockval
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
if
(
!
p_vlc
)
{
return
VLC_ENOOBJ
;
...
...
@@ -608,7 +623,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
var_Create
(
p_vlc
,
"drawableh"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vlc
,
"drawableportx"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vlc
,
"drawableporty"
,
VLC_VAR_INTEGER
);
/*
* Get input filenames given as commandline arguments
*/
...
...
@@ -630,9 +645,7 @@ int VLC_AddIntf( int i_object, char const *psz_module, vlc_bool_t b_block )
{
int
i_err
;
intf_thread_t
*
p_intf
;
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
if
(
!
p_vlc
)
{
...
...
@@ -672,9 +685,7 @@ int VLC_AddIntf( int i_object, char const *psz_module, vlc_bool_t b_block )
*****************************************************************************/
int
VLC_Destroy
(
int
i_object
)
{
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
if
(
!
p_vlc
)
{
...
...
@@ -739,9 +750,7 @@ int VLC_Destroy( int i_object )
*****************************************************************************/
int
VLC_Die
(
int
i_object
)
{
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
if
(
!
p_vlc
)
{
...
...
@@ -766,9 +775,7 @@ int VLC_AddTarget( int i_object, char const *psz_target,
{
int
i_err
;
playlist_t
*
p_playlist
;
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
if
(
!
p_vlc
)
{
...
...
@@ -807,11 +814,9 @@ int VLC_AddTarget( int i_object, char const *psz_target,
*****************************************************************************/
int
VLC_Set
(
int
i_object
,
char
const
*
psz_var
,
vlc_value_t
value
)
{
vlc_t
*
p_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
)
;
int
i_ret
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
if
(
!
p_vlc
)
{
return
VLC_ENOOBJ
;
...
...
@@ -861,11 +866,9 @@ int VLC_Set( int i_object, char const *psz_var, vlc_value_t value )
*****************************************************************************/
int
VLC_Get
(
int
i_object
,
char
const
*
psz_var
,
vlc_value_t
*
p_value
)
{
vlc_t
*
p_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
)
;
int
i_ret
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
if
(
!
p_vlc
)
{
return
VLC_ENOOBJ
;
...
...
@@ -885,9 +888,7 @@ int VLC_Get( int i_object, char const *psz_var, vlc_value_t *p_value )
int
VLC_Play
(
int
i_object
)
{
playlist_t
*
p_playlist
;
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
/* Check that the handle is valid */
if
(
!
p_vlc
)
...
...
@@ -929,9 +930,7 @@ int VLC_Stop( int i_object )
playlist_t
*
p_playlist
;
vout_thread_t
*
p_vout
;
aout_instance_t
*
p_aout
;
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
/* Check that the handle is valid */
if
(
!
p_vlc
)
...
...
@@ -997,9 +996,7 @@ int VLC_Stop( int i_object )
int
VLC_Pause
(
int
i_object
)
{
input_thread_t
*
p_input
;
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
if
(
!
p_vlc
)
{
...
...
@@ -1027,9 +1024,7 @@ int VLC_Pause( int i_object )
int
VLC_FullScreen
(
int
i_object
)
{
vout_thread_t
*
p_vout
;
vlc_t
*
p_vlc
;
p_vlc
=
i_object
?
vlc_object_get
(
p_libvlc
,
i_object
)
:
p_static_vlc
;
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
if
(
!
p_vlc
)
{
...
...
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