Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
8750bd1e
Commit
8750bd1e
authored
Sep 28, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Add hooks for getting/setting variables (not working yet)
* Really change VLC_Get to VLC_VariableGet
parent
31b1820e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
5 deletions
+90
-5
mozilla/vlcintf.idl
mozilla/vlcintf.idl
+9
-0
mozilla/vlcpeer.cpp
mozilla/vlcpeer.cpp
+76
-0
mozilla/vlcpeer.h
mozilla/vlcpeer.h
+1
-1
mozilla/vlcplugin.cpp
mozilla/vlcplugin.cpp
+1
-1
mozilla/vlcplugin.h
mozilla/vlcplugin.h
+1
-1
src/libvlc.c
src/libvlc.c
+2
-2
No files found.
mozilla/vlcintf.idl
View file @
8750bd1e
...
...
@@ -16,6 +16,15 @@ interface VlcIntf : nsISupports
PRInt64
get_volume
()
;
void
mute
()
;
/*
Get
/
Set
variable
*/
void
set_int_variable
(
in
string
psz_var
,
in
PRInt64
i_value
)
;
void
set_bool_variable
(
in
string
psz_var
,
in
PRBool
b_value
)
;
void
set_str_variable
(
in
string
psz_var
,
in
string
psz_value
)
;
PRInt64
get_int_variable
(
in
string
psz_var
)
;
PRBool
get_bool_variable
(
in
string
psz_var
)
;
string
get_str_variable
(
in
string
psz_var
)
;
/*
Playlist
management
*/
void
clear_playlist
()
;
void
add_item
(
in
string
psz_name
)
;
...
...
mozilla/vlcpeer.cpp
View file @
8750bd1e
...
...
@@ -128,6 +128,82 @@ NS_IMETHODIMP VlcPeer::Fullscreen()
return
NS_OK
;
}
/* Set/Get vlc variables */
NS_IMETHODIMP
VlcPeer
::
Set_int_variable
(
const
char
*
psz_var
,
PRInt64
value
)
{
vlc_value_t
val
;
val
.
i_int
=
value
;
if
(
p_plugin
)
{
VLC_VariableSet
(
p_plugin
->
i_vlc
,
psz_var
,
val
);
}
return
NS_OK
;
}
NS_IMETHODIMP
VlcPeer
::
Set_str_variable
(
const
char
*
psz_var
,
const
char
*
value
)
{
vlc_value_t
val
;
val
.
psz_string
=
strdup
(
value
);
if
(
p_plugin
)
{
VLC_VariableSet
(
p_plugin
->
i_vlc
,
psz_var
,
val
);
}
return
NS_OK
;
}
NS_IMETHODIMP
VlcPeer
::
Set_bool_variable
(
const
char
*
psz_var
,
PRBool
value
)
{
vlc_value_t
val
;
val
.
b_bool
=
value
>=
1
?
VLC_TRUE
:
VLC_FALSE
;
if
(
p_plugin
)
{
VLC_VariableSet
(
p_plugin
->
i_vlc
,
psz_var
,
val
);
}
return
NS_OK
;
}
NS_IMETHODIMP
VlcPeer
::
Get_int_variable
(
const
char
*
psz_var
,
PRInt64
*
result
)
{
vlc_value_t
val
;
if
(
p_plugin
)
{
fprintf
(
stderr
,
"Choppage de %s
\n
"
,
psz_var
);
VLC_VariableGet
(
p_plugin
->
i_vlc
,
psz_var
,
&
val
);
fprintf
(
stderr
,
"Valeur %i
\n
"
,
val
.
i_int
);
*
result
=
(
PRInt64
)
val
.
i_int
;
}
return
NS_OK
;
}
NS_IMETHODIMP
VlcPeer
::
Get_bool_variable
(
const
char
*
psz_var
,
PRBool
*
result
)
{
vlc_value_t
val
;
if
(
p_plugin
)
{
VLC_VariableGet
(
p_plugin
->
i_vlc
,
psz_var
,
&
val
);
*
result
=
(
PRBool
)
val
.
b_bool
;
}
return
NS_OK
;
}
NS_IMETHODIMP
VlcPeer
::
Get_str_variable
(
const
char
*
psz_var
,
char
**
result
)
{
vlc_value_t
val
;
if
(
p_plugin
)
{
fprintf
(
stderr
,
"Choppage de %s
\n
"
,
psz_var
);
VLC_VariableGet
(
p_plugin
->
i_vlc
,
psz_var
,
&
val
);
if
(
val
.
psz_string
)
{
*
result
=
strdup
(
val
.
psz_string
);
}
else
{
*
result
=
strdup
(
""
);
}
}
return
NS_OK
;
}
/* Playlist control */
NS_IMETHODIMP
VlcPeer
::
Clear_playlist
()
...
...
mozilla/vlcpeer.h
View file @
8750bd1e
...
...
@@ -2,7 +2,7 @@
* vlcpeer.h: scriptable peer descriptor
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id
: vlcpeer.h,v 1.3 2003/04/09 16:18:36 sam Exp
$
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
mozilla/vlcplugin.cpp
View file @
8750bd1e
...
...
@@ -2,7 +2,7 @@
* vlcplugin.cpp: a VLC plugin for Mozilla
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id
: vlcplugin.cpp,v 1.6 2003/10/23 17:04:39 sam Exp
$
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
mozilla/vlcplugin.h
View file @
8750bd1e
...
...
@@ -2,7 +2,7 @@
* vlcplugin.h: a VLC plugin for Mozilla
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id
: vlcplugin.h,v 1.13 2003/10/23 17:04:40 sam Exp
$
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
src/libvlc.c
View file @
8750bd1e
...
...
@@ -991,7 +991,7 @@ int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value )
/*****************************************************************************
* VLC_VariableGet: get a vlc variable
*****************************************************************************/
int
VLC_Get
(
int
i_object
,
char
const
*
psz_var
,
vlc_value_t
*
p_value
)
int
VLC_
Variable
Get
(
int
i_object
,
char
const
*
psz_var
,
vlc_value_t
*
p_value
)
{
vlc_t
*
p_vlc
=
vlc_current_object
(
i_object
);
int
i_ret
;
...
...
@@ -1001,7 +1001,7 @@ int VLC_Get( int i_object, char const *psz_var, vlc_value_t *p_value )
return
VLC_ENOOBJ
;
}
i_ret
=
var_Get
(
p_vlc
,
psz_var
,
p_value
);
i_ret
=
var_Get
(
p_vlc
,
psz_var
,
p_value
);
if
(
i_object
)
vlc_object_release
(
p_vlc
);
return
i_ret
;
...
...
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