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
be07ad94
Commit
be07ad94
authored
May 20, 2007
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use oldval and newval in libvlc_event_t
parent
580e968c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
include/vlc/libvlc_structures.h
include/vlc/libvlc_structures.h
+16
-0
src/control/callback.c
src/control/callback.c
+12
-0
No files found.
include/vlc/libvlc_structures.h
View file @
be07ad94
...
...
@@ -144,14 +144,30 @@ typedef struct libvlc_log_message_t
* - VOLUME_CHANGED
* - INPUT_POSITION_CHANGED
*/
typedef
enum
{
VOLUME_CHANGED
,
INPUT_POSITION_CHANGED
,
}
libvlc_event_type_t
;
typedef
enum
{
INT_EVENT
,
BOOLEAN_EVENT
,
FLOAT_EVENT
,
STRING_EVENT
,
ADDRESS_EVENT
,
OBJECT_EVENT
,
LIST_EVENT
,
TIME_EVENT
,
VAR_EVENT
,
}
libvlc_event_value_type_t
;
typedef
struct
{
libvlc_event_type_t
type
;
libvlc_event_value_type_t
value_type
;
vlc_value_t
old_value
;
vlc_value_t
new_value
;
char
reserved
[
8
];
/* For future use */
}
libvlc_event_t
;
...
...
src/control/callback.c
View file @
be07ad94
...
...
@@ -110,6 +110,18 @@ int libvlc_private_handle_callback( vlc_object_t *p_this, char const *psz_cmd,
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
);
...
...
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