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
1c8e75e8
Commit
1c8e75e8
authored
Jul 24, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use var_TriggerCallback instead of var_SetVoid (the result is exactly the same
but a bit faster).
parent
ec1ca416
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
44 additions
and
44 deletions
+44
-44
modules/access/v4l2.c
modules/access/v4l2.c
+2
-2
modules/control/gestures.c
modules/control/gestures.c
+2
-2
modules/control/hotkeys.c
modules/control/hotkeys.c
+7
-7
modules/control/rc.c
modules/control/rc.c
+6
-6
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+8
-8
modules/gui/ncurses.c
modules/gui/ncurses.c
+4
-4
modules/gui/pda/pda_callbacks.c
modules/gui/pda/pda_callbacks.c
+2
-2
modules/gui/qt4/actions_manager.cpp
modules/gui/qt4/actions_manager.cpp
+1
-1
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+1
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+6
-6
modules/gui/skins2/commands/cmd_dvd.cpp
modules/gui/skins2/commands/cmd_dvd.cpp
+4
-4
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+1
-1
No files found.
modules/access/v4l2.c
View file @
1c8e75e8
...
...
@@ -3055,12 +3055,12 @@ static int Control( vlc_object_t *p_obj, demux_sys_t *p_sys, int i_fd,
case
VLC_VAR_BOOL
:
val
.
b_bool
=
control
.
value
;
var_Change
(
p_obj
,
psz_name
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
var_
SetVoid
(
p_obj
,
"controls-update"
);
var_
TriggerCallback
(
p_obj
,
"controls-update"
);
break
;
case
VLC_VAR_INTEGER
:
val
.
i_int
=
control
.
value
;
var_Change
(
p_obj
,
psz_name
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
var_
SetVoid
(
p_obj
,
"controls-update"
);
var_
TriggerCallback
(
p_obj
,
"controls-update"
);
break
;
}
}
...
...
modules/control/gestures.c
View file @
1c8e75e8
...
...
@@ -236,7 +236,7 @@ static void RunIntf( intf_thread_t *p_intf )
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"rate-slower"
);
var_
TriggerCallback
(
p_input
,
"rate-slower"
);
vlc_object_release
(
p_input
);
}
break
;
...
...
@@ -246,7 +246,7 @@ static void RunIntf( intf_thread_t *p_intf )
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"rate-faster"
);
var_
TriggerCallback
(
p_input
,
"rate-faster"
);
vlc_object_release
(
p_input
);
}
break
;
...
...
modules/control/hotkeys.c
View file @
1c8e75e8
...
...
@@ -689,19 +689,19 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
}
else
if
(
i_action
==
ACTIONID_FRAME_NEXT
)
{
var_
SetVoid
(
p_input
,
"frame-next"
);
var_
TriggerCallback
(
p_input
,
"frame-next"
);
vout_OSDMessage
(
VLC_OBJECT
(
p_input
),
DEFAULT_CHAN
,
"%s"
,
_
(
"Next frame"
)
);
}
else
if
(
i_action
==
ACTIONID_FASTER
)
{
var_
SetVoid
(
p_input
,
"rate-faster"
);
var_
TriggerCallback
(
p_input
,
"rate-faster"
);
vout_OSDMessage
(
VLC_OBJECT
(
p_input
),
DEFAULT_CHAN
,
"%s"
,
_
(
"Faster"
)
);
}
else
if
(
i_action
==
ACTIONID_SLOWER
)
{
var_
SetVoid
(
p_input
,
"rate-slower"
);
var_
TriggerCallback
(
p_input
,
"rate-slower"
);
vout_OSDMessage
(
VLC_OBJECT
(
p_input
),
DEFAULT_CHAN
,
"%s"
,
_
(
"Slower"
)
);
}
...
...
@@ -754,13 +754,13 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
}
/* Only makes sense with DVD */
else
if
(
i_action
==
ACTIONID_TITLE_PREV
)
var_
SetVoid
(
p_input
,
"prev-title"
);
var_
TriggerCallback
(
p_input
,
"prev-title"
);
else
if
(
i_action
==
ACTIONID_TITLE_NEXT
)
var_
SetVoid
(
p_input
,
"next-title"
);
var_
TriggerCallback
(
p_input
,
"next-title"
);
else
if
(
i_action
==
ACTIONID_CHAPTER_PREV
)
var_
SetVoid
(
p_input
,
"prev-chapter"
);
var_
TriggerCallback
(
p_input
,
"prev-chapter"
);
else
if
(
i_action
==
ACTIONID_CHAPTER_NEXT
)
var_
SetVoid
(
p_input
,
"next-chapter"
);
var_
TriggerCallback
(
p_input
,
"next-chapter"
);
else
if
(
i_action
==
ACTIONID_DISC_MENU
)
var_SetInteger
(
p_input
,
"title 0"
,
2
);
...
...
modules/control/rc.c
View file @
1c8e75e8
...
...
@@ -1086,12 +1086,12 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
}
else
if
(
!
strcmp
(
psz_cmd
,
"faster"
)
)
{
var_
SetVoid
(
p_input
,
"rate-faster"
);
var_
TriggerCallback
(
p_input
,
"rate-faster"
);
i_error
=
VLC_SUCCESS
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"slower"
)
)
{
var_
SetVoid
(
p_input
,
"rate-slower"
);
var_
TriggerCallback
(
p_input
,
"rate-slower"
);
i_error
=
VLC_SUCCESS
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"normal"
)
)
...
...
@@ -1120,9 +1120,9 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
}
}
else
if
(
!
strcmp
(
psz_cmd
,
"chapter_n"
)
)
var_
SetVoid
(
p_input
,
"next-chapter"
);
var_
TriggerCallback
(
p_input
,
"next-chapter"
);
else
if
(
!
strcmp
(
psz_cmd
,
"chapter_p"
)
)
var_
SetVoid
(
p_input
,
"prev-chapter"
);
var_
TriggerCallback
(
p_input
,
"prev-chapter"
);
i_error
=
VLC_SUCCESS
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"title"
)
||
...
...
@@ -1144,9 +1144,9 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
}
}
else
if
(
!
strcmp
(
psz_cmd
,
"title_n"
)
)
var_
SetVoid
(
p_input
,
"next-title"
);
var_
TriggerCallback
(
p_input
,
"next-title"
);
else
if
(
!
strcmp
(
psz_cmd
,
"title_p"
)
)
var_
SetVoid
(
p_input
,
"prev-title"
);
var_
TriggerCallback
(
p_input
,
"prev-title"
);
i_error
=
VLC_SUCCESS
;
}
...
...
modules/gui/beos/InterfaceWindow.cpp
View file @
1c8e75e8
...
...
@@ -565,14 +565,14 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
case
PREV_TITLE
:
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"prev-title"
);
var_
TriggerCallback
(
p_input
,
"prev-title"
);
}
break
;
case
NEXT_TITLE
:
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"next-title"
);
var_
TriggerCallback
(
p_input
,
"next-title"
);
}
break
;
...
...
@@ -590,14 +590,14 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
case
PREV_CHAPTER
:
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"prev-chapter"
);
var_
TriggerCallback
(
p_input
,
"prev-chapter"
);
}
break
;
case
NEXT_CHAPTER
:
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"next-chapter"
);
var_
TriggerCallback
(
p_input
,
"next-chapter"
);
}
break
;
...
...
@@ -636,7 +636,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
if
(
val
.
i_int
>
1
)
{
var_
SetVoid
(
p_input
,
"prev-chapter"
);
var_
TriggerCallback
(
p_input
,
"prev-chapter"
);
break
;
}
}
...
...
@@ -646,7 +646,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
if
(
val
.
i_int
>
1
)
{
var_
SetVoid
(
p_input
,
"prev-title"
);
var_
TriggerCallback
(
p_input
,
"prev-title"
);
break
;
}
}
...
...
@@ -668,7 +668,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
int
i_chapter_count
=
var_CountChoices
(
p_input
,
"chapter"
);
if
(
i_chapter_count
>
val
.
i_int
)
{
var_
SetVoid
(
p_input
,
"next-chapter"
);
var_
TriggerCallback
(
p_input
,
"next-chapter"
);
break
;
}
}
...
...
@@ -679,7 +679,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
int
i_title_count
=
var_CountChoices
(
p_input
,
"title"
);
if
(
i_title_count
>
val
.
i_int
)
{
var_
SetVoid
(
p_input
,
"next-title"
);
var_
TriggerCallback
(
p_input
,
"next-title"
);
break
;
}
}
...
...
modules/gui/ncurses.c
View file @
1c8e75e8
...
...
@@ -1167,22 +1167,22 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
case
'['
:
if
(
p_sys
->
p_input
)
var_
SetVoid
(
p_sys
->
p_input
,
"prev-title"
);
var_
TriggerCallback
(
p_sys
->
p_input
,
"prev-title"
);
break
;
case
']'
:
if
(
p_sys
->
p_input
)
var_
SetVoid
(
p_sys
->
p_input
,
"next-title"
);
var_
TriggerCallback
(
p_sys
->
p_input
,
"next-title"
);
break
;
case
'<'
:
if
(
p_sys
->
p_input
)
var_
SetVoid
(
p_sys
->
p_input
,
"prev-chapter"
);
var_
TriggerCallback
(
p_sys
->
p_input
,
"prev-chapter"
);
break
;
case
'>'
:
if
(
p_sys
->
p_input
)
var_
SetVoid
(
p_sys
->
p_input
,
"next-chapter"
);
var_
TriggerCallback
(
p_sys
->
p_input
,
"next-chapter"
);
break
;
case
'p'
:
...
...
modules/gui/pda/pda_callbacks.c
View file @
1c8e75e8
...
...
@@ -358,7 +358,7 @@ void onRewind(GtkButton *button, gpointer user_data)
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
var_
SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-slower"
);
var_
TriggerCallback
(
p_intf
->
p_sys
->
p_input
,
"rate-slower"
);
}
}
...
...
@@ -413,7 +413,7 @@ void onForward(GtkButton *button, gpointer user_data)
if
(
p_intf
->
p_sys
->
p_input
!=
NULL
)
{
var_
SetVoid
(
p_intf
->
p_sys
->
p_input
,
"rate-faster"
);
var_
TriggerCallback
(
p_intf
->
p_sys
->
p_input
,
"rate-faster"
);
}
}
...
...
modules/gui/qt4/actions_manager.cpp
View file @
1c8e75e8
...
...
@@ -165,7 +165,7 @@ void ActionsManager::frame()
{
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
if
(
p_input
)
var_
SetVoid
(
p_input
,
"frame-next"
);
var_
TriggerCallback
(
p_input
,
"frame-next"
);
}
void
ActionsManager
::
toggleMuteAudio
()
...
...
modules/gui/qt4/components/extended_panels.cpp
View file @
1c8e75e8
...
...
@@ -803,7 +803,7 @@ void ExtV4l2::ValueChange( int value )
var_SetBool
(
p_obj
,
psz_var
,
value
);
break
;
case
VLC_VAR_VOID
:
var_
SetVoid
(
p_obj
,
psz_var
);
var_
TriggerCallback
(
p_obj
,
psz_var
);
break
;
}
free
(
psz_var
);
...
...
modules/gui/qt4/input_manager.cpp
View file @
1c8e75e8
...
...
@@ -672,8 +672,8 @@ void InputManager::sectionPrev()
if
(
hasInput
()
)
{
int
i_type
=
var_Type
(
p_input
,
"next-chapter"
);
var_
SetVoid
(
p_input
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
"prev-chapter"
:
"prev-title"
);
var_
TriggerCallback
(
p_input
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
"prev-chapter"
:
"prev-title"
);
}
}
...
...
@@ -682,8 +682,8 @@ void InputManager::sectionNext()
if
(
hasInput
()
)
{
int
i_type
=
var_Type
(
p_input
,
"next-chapter"
);
var_
SetVoid
(
p_input
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
"next-chapter"
:
"next-title"
);
var_
TriggerCallback
(
p_input
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
"next-chapter"
:
"next-title"
);
}
}
...
...
@@ -787,13 +787,13 @@ void InputManager::reverse()
void
InputManager
::
slower
()
{
if
(
hasInput
()
)
var_
SetVoid
(
p_input
,
"rate-slower"
);
var_
TriggerCallback
(
p_input
,
"rate-slower"
);
}
void
InputManager
::
faster
()
{
if
(
hasInput
()
)
var_
SetVoid
(
p_input
,
"rate-faster"
);
var_
TriggerCallback
(
p_input
,
"rate-faster"
);
}
void
InputManager
::
littlefaster
()
...
...
modules/gui/skins2/commands/cmd_dvd.cpp
View file @
1c8e75e8
...
...
@@ -31,7 +31,7 @@ void CmdDvdNextTitle::execute()
FIND_ANYWHERE
);
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"next-title"
);
var_
TriggerCallback
(
p_input
,
"next-title"
);
vlc_object_release
(
p_input
);
}
}
...
...
@@ -44,7 +44,7 @@ void CmdDvdPreviousTitle::execute()
FIND_ANYWHERE
);
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"prev-title"
);
var_
TriggerCallback
(
p_input
,
"prev-title"
);
vlc_object_release
(
p_input
);
}
}
...
...
@@ -57,7 +57,7 @@ void CmdDvdNextChapter::execute()
FIND_ANYWHERE
);
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"next-chapter"
);
var_
TriggerCallback
(
p_input
,
"next-chapter"
);
vlc_object_release
(
p_input
);
}
}
...
...
@@ -70,7 +70,7 @@ void CmdDvdPreviousChapter::execute()
FIND_ANYWHERE
);
if
(
p_input
)
{
var_
SetVoid
(
p_input
,
"prev-chapter"
);
var_
TriggerCallback
(
p_input
,
"prev-chapter"
);
vlc_object_release
(
p_input
);
}
}
...
...
src/video_output/vout_intf.c
View file @
1c8e75e8
...
...
@@ -1144,7 +1144,7 @@ static int CropCallback( vlc_object_t *p_this, char const *psz_cmd,
p_vout
->
fmt_in
.
i_visible_width
,
p_vout
->
fmt_in
.
i_visible_height
);
var_
SetVoid
(
p_vout
,
"crop-update"
);
var_
TriggerCallback
(
p_vout
,
"crop-update"
);
return
VLC_SUCCESS
;
}
...
...
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