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
65fd1e94
Commit
65fd1e94
authored
Jun 07, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* use var_Set/Get "state"/"position"/"rate" instead of old functions.
I haven't tested thoses changes ...
parent
d53d9b9d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
44 additions
and
50 deletions
+44
-50
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.cpp
+2
-3
modules/gui/gtk/control.c
modules/gui/gtk/control.c
+4
-4
modules/gui/gtk/gnome.c
modules/gui/gtk/gnome.c
+4
-2
modules/gui/gtk/gtk.c
modules/gui/gtk/gtk.c
+2
-2
modules/gui/gtk/gtk_callbacks.c
modules/gui/gtk/gtk_callbacks.c
+6
-7
modules/gui/gtk/menu.c
modules/gui/gtk/menu.c
+5
-5
modules/gui/kde/interface.cpp
modules/gui/kde/interface.cpp
+6
-7
modules/gui/pda/pda.c
modules/gui/pda/pda.c
+5
-5
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+3
-3
modules/gui/qt/intf.cpp
modules/gui/qt/intf.cpp
+6
-7
modules/gui/skins/src/vlcproc.cpp
modules/gui/skins/src/vlcproc.cpp
+1
-5
No files found.
modules/gui/beos/VlcWrapper.cpp
View file @
65fd1e94
...
...
@@ -121,8 +121,7 @@ void VlcWrapper::InputSetRate( int rate )
{
return
;
}
input_SetRate
(
p_input
,
rate
);
var_SetInteger
(
p_input
,
"rate"
,
rate
);
}
BList
*
VlcWrapper
::
GetChannels
(
int
i_cat
)
...
...
@@ -423,7 +422,7 @@ void VlcWrapper::PlaylistPause()
{
if
(
p_input
)
{
input_SetStatus
(
p_input
,
INPUT_STATUS_PAUSE
);
var_SetInteger
(
p_input
,
"state"
,
PAUSE_S
);
}
}
...
...
modules/gui/gtk/control.c
View file @
65fd1e94
...
...
@@ -2,7 +2,7 @@
* control.c : functions to handle stream control buttons.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id
: control.c,v 1.1 2002/08/04 17:23:43 sam Exp
$
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -118,7 +118,7 @@ gboolean GtkControlPause( GtkWidget *widget,
return
FALSE
;
}
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PAUSE
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PAUSE_S
);
return
TRUE
;
}
...
...
@@ -134,7 +134,7 @@ gboolean GtkControlSlow( GtkWidget *widget,
return
FALSE
;
}
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_SLOWER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-slower"
);
return
TRUE
;
}
...
...
@@ -150,7 +150,7 @@ gboolean GtkControlFast( GtkWidget *widget,
return
FALSE
;
}
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_FASTER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-faster"
);
return
TRUE
;
}
...
...
modules/gui/gtk/gnome.c
View file @
65fd1e94
...
...
@@ -463,11 +463,13 @@ static void Manage( intf_thread_t *p_intf )
{
if
(
newvalue
>=
0
.
&&
newvalue
<
100
.
)
{
off_t
i_seek
=
(
newvalue
*
p_area
->
i_size
)
/
10
0
;
double
f_fpos
=
(
double
)
newvalue
/
100
.
0
;
/* release the lock to be able to seek */
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
input_Seek
(
p_input
,
i_seek
,
INPUT_SEEK_SET
);
var_SetFloat
(
p_input
,
"position"
,
f_fpos
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
}
/* Update the old value */
...
...
modules/gui/gtk/gtk.c
View file @
65fd1e94
...
...
@@ -476,11 +476,11 @@ static int Manage( intf_thread_t *p_intf )
{
if
(
newvalue
>=
0
.
&&
newvalue
<
100
.
)
{
off_t
i_seek
=
(
newvalue
*
p_area
->
i_size
)
/
10
0
;
double
f_fpos
=
(
double
)
newvalue
/
100
.
0
;
/* release the lock to be able to seek */
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
input_Seek
(
p_input
,
i_seek
,
INPUT_SEEK_SET
);
var_SetFloat
(
p_input
,
"position"
,
f_fpos
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
}
...
...
modules/gui/gtk/gtk_callbacks.c
View file @
65fd1e94
...
...
@@ -245,7 +245,7 @@ void GtkTitlePrev( GtkButton * button, gpointer user_data )
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
...
...
@@ -272,7 +272,7 @@ void GtkTitleNext( GtkButton * button, gpointer user_data )
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_title_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
...
...
@@ -298,7 +298,7 @@ void GtkChapterPrev( GtkButton * button, gpointer user_data )
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
...
...
@@ -324,7 +324,7 @@ void GtkChapterNext( GtkButton * button, gpointer user_data )
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_intf
->
p_sys
->
p_input
,
p_area
);
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
PLAYING_S
);
p_intf
->
p_sys
->
b_chapter_update
=
VLC_TRUE
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
...
...
@@ -405,9 +405,8 @@ void GtkJumpOk( GtkButton *button,
i_seconds
=
GET_VALUE
(
"jump_second_spinbutton"
);
#undef GET_VALUE
input_Seek
(
p_intf
->
p_sys
->
p_input
,
i_seconds
+
60
*
i_minutes
+
3600
*
i_hours
,
INPUT_SEEK_SECONDS
|
INPUT_SEEK_SET
);
var_SetTime
(
p_intf
->
p_sys
->
p_input
,
"time"
,
(
int64_t
)(
i_seconds
+
60
*
i_minutes
+
3600
*
i_hours
)
*
I64C
(
1000000
));
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
}
...
...
modules/gui/gtk/menu.c
View file @
65fd1e94
...
...
@@ -2,7 +2,7 @@
* menu.c : functions to handle menu items.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id
: menu.c,v 1.13 2003/12/22 14:32:56 sam Exp
$
* $Id$
*
* Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -186,7 +186,7 @@ void GtkPopupNavigationToggle( GtkCheckMenuItem * menuitem,
GtkSetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
@@ -210,7 +210,7 @@ void GtkPopupNavigationToggle( GtkCheckMenuItem * menuitem,
\
p_intf->p_sys->b_program_update = VLC_FALSE; \
\
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PLAY
); \
var_SetInteger( p_intf->p_sys->p_input, "state", PLAYING_S
); \
}
void
GtkMenubarProgramToggle
(
GtkCheckMenuItem
*
menuitem
,
gpointer
user_data
)
...
...
@@ -250,7 +250,7 @@ void GtkMenubarTitleToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
p_intf
->
p_sys
->
b_title_update
=
VLC_FALSE
;
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
@@ -289,7 +289,7 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
p_intf
->
p_sys
->
b_chapter_update
=
VLC_FALSE
;
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
modules/gui/kde/interface.cpp
View file @
65fd1e94
...
...
@@ -377,9 +377,8 @@ void KInterface::slotSliderMoved( int position )
// XXX is this locking really useful ?
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
off_t
i_seek
=
(
position
*
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
->
i_size
)
/
10000
;
input_Seek
(
p_intf
->
p_sys
->
p_input
,
i_seek
,
INPUT_SEEK_SET
);
var_SetFloat
(
p_intf
->
p_sys
->
p_input
,
"position"
,
(
double
)
position
/
10000.0
);
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
}
}
...
...
@@ -573,7 +572,7 @@ void KInterface::slotPlay()
{
if
(
p_intf
->
p_sys
->
p_input
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
@@ -581,7 +580,7 @@ void KInterface::slotPause()
{
if
(
p_intf
->
p_sys
->
p_input
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PAUSE
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PAUSE_S
);
}
}
...
...
@@ -627,7 +626,7 @@ void KInterface::slotSlow()
{
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_SLOWER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-slower"
);
}
}
...
...
@@ -635,7 +634,7 @@ void KInterface::slotFast()
{
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_FASTER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-faster"
);
}
}
...
...
modules/gui/pda/pda.c
View file @
65fd1e94
...
...
@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id
: pda.c,v 1.23 2004/03/03 20:39:52 gbazin Exp
$
* $Id$
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
...
...
@@ -468,11 +468,11 @@ static int Manage( intf_thread_t *p_intf )
* finished dragging the slider */
else
if
(
p_intf
->
p_sys
->
b_slider_free
)
{
off_t
i_seek
=
(
newvalue
*
p_area
->
i_size
)
/
10
0
;
double
f_pos
=
(
double
)
newvalue
/
100
.
0
;
/* release the lock to be able to seek */
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
input_Seek
(
p_input
,
i_seek
,
INPUT_SEEK_SET
);
var_SetFloat
(
p_input
,
"position"
,
f_pos
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
/* Update the old value */
...
...
@@ -502,11 +502,11 @@ static int Manage( intf_thread_t *p_intf )
* finished dragging the slider */
else
if
(
p_intf
->
p_sys
->
b_slider_free
)
{
off_t
i_seek
=
(
newvalue
*
p_area
->
i_size
)
/
10
0
;
double
f_pos
=
(
double
)
newvalue
/
100
.
0
;
/* release the lock to be able to seek */
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
input_Seek
(
p_input
,
i_seek
,
INPUT_SEEK_SET
);
var_SetFloat
(
p_input
,
"position"
,
f_pos
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
/* Update the old value */
...
...
modules/gui/pda/pda_callbacks.c
View file @
65fd1e94
...
...
@@ -356,7 +356,7 @@ void onRewind(GtkButton *button, gpointer user_data)
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_SLOWER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-slower"
);
}
}
...
...
@@ -367,7 +367,7 @@ void onPause(GtkButton *button, gpointer user_data)
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PAUSE
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PAUSE_S
);
}
}
...
...
@@ -415,7 +415,7 @@ void onForward(GtkButton *button, gpointer user_data)
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_FASTER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-faster"
);
}
}
...
...
modules/gui/qt/intf.cpp
View file @
65fd1e94
...
...
@@ -370,9 +370,8 @@ void IntfWindow::Manage( void )
* finished dragging the slider */
else
if
(
p_slider
->
b_free
)
{
off_t
i_seek
=
(
i_value
*
p_area
->
i_size
)
/
SLIDER_MAX
;
input_Seek
(
p_intf
->
p_sys
->
p_input
,
i_seek
,
INPUT_SEEK_SET
);
double
f_pos
=
(
double
)
i_value
/
(
double
)
SLIDER_MAX
;
var_SetFloat
(
p_intf
->
p_sys
->
p_input
,
"position"
,
f_pos
);
/* Update the old value */
p_slider
->
setOldValue
(
i_value
);
...
...
@@ -400,7 +399,7 @@ void IntfWindow::PlaybackPlay( void )
{
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PLAYING_S
);
}
}
...
...
@@ -411,7 +410,7 @@ void IntfWindow::PlaybackPause( void )
{
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PAUSE
);
var_SetInteger
(
p_intf
->
p_sys
->
p_input
,
"state"
,
PAUSE_S
);
}
}
...
...
@@ -422,7 +421,7 @@ void IntfWindow::PlaybackSlow( void )
{
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_SLOWER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-slower"
);
}
}
...
...
@@ -433,7 +432,7 @@ void IntfWindow::PlaybackFast( void )
{
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_FASTER
);
var_SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-faster"
);
}
}
...
...
modules/gui/skins/src/vlcproc.cpp
View file @
65fd1e94
...
...
@@ -573,11 +573,7 @@ void VlcProc::MoveStream( long Pos )
if
(
p_intf
->
p_sys
->
p_input
==
NULL
)
return
;
off_t
i_seek
=
(
off_t
)(
Pos
*
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
->
i_size
/
SLIDER_RANGE
);
input_Seek
(
p_intf
->
p_sys
->
p_input
,
i_seek
,
INPUT_SEEK_SET
);
var_SetFloat
(
p_intf
->
p_input
,
"position"
,
(
double
)
Pos
/
SLIDER_RANGE
);
// Refresh interface
InterfaceRefresh
();
...
...
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