Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
07b66252
Commit
07b66252
authored
May 20, 2007
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
static handle_callback
parent
971b8d4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
31 deletions
+26
-31
src/control/callback.c
src/control/callback.c
+26
-31
No files found.
src/control/callback.c
View file @
07b66252
...
...
@@ -24,9 +24,31 @@
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
int
libvlc_private_
handle_callback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
static
int
handle_callback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
);
void
*
p_data
)
{
struct
libvlc_callback_entry_t
*
entry
=
p_data
;
libvlc_event_t
event
;
event
.
type
=
entry
->
i_event_type
;
switch
(
event
.
type
)
{
case
VOLUME_CHANGED
:
event
.
value_type
=
BOOLEAN_EVENT
;
break
;
case
INPUT_POSITION_CHANGED
:
break
;
default:
break
;
}
event
.
old_value
=
oldval
;
event
.
new_value
=
newval
;
/* Call the client entry */
entry
->
f_callback
(
entry
->
p_instance
,
&
event
,
entry
->
p_user_data
);
return
VLC_SUCCESS
;
}
void
libvlc_callback_register_for_event
(
libvlc_instance_t
*
p_instance
,
libvlc_event_type_t
i_event_type
,
...
...
@@ -59,7 +81,7 @@ void libvlc_callback_register_for_event( libvlc_instance_t *p_instance,
int
res
=
var_AddCallback
(
p_instance
->
p_libvlc_int
,
callback_name
,
libvlc_private_
handle_callback
,
handle_callback
,
entry
);
if
(
res
!=
VLC_SUCCESS
)
...
...
@@ -101,30 +123,3 @@ void libvlc_callback_unregister_for_event( libvlc_instance_t *p_instance,
p_listitem
=
p_listitem
->
next
;
}
}
int
libvlc_private_handle_callback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
struct
libvlc_callback_entry_t
*
entry
=
p_data
;
libvlc_event_t
event
;
event
.
type
=
entry
->
i_event_type
;
switch
(
event
.
type
)
{
case
VOLUME_CHANGED
:
event
.
value_type
=
BOOLEAN_EVENT
;
break
;
case
INPUT_POSITION_CHANGED
:
break
;
default:
break
;
}
event
.
old_value
=
oldval
;
event
.
new_value
=
newval
;
/* Call the client entry */
entry
->
f_callback
(
entry
->
p_instance
,
&
event
,
entry
->
p_user_data
);
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