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
11104cb5
Commit
11104cb5
authored
Sep 01, 2013
by
Sergey Radionov
Committed by
Rémi Denis-Courmont
Sep 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: libvlc_MediaSubItemTreeAdded event type added
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
5ad7967e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
include/vlc/libvlc_events.h
include/vlc/libvlc_events.h
+5
-0
lib/event.c
lib/event.c
+1
-0
lib/media.c
lib/media.c
+26
-0
No files found.
include/vlc/libvlc_events.h
View file @
11104cb5
...
...
@@ -52,6 +52,7 @@ enum libvlc_event_e {
libvlc_MediaParsedChanged
,
libvlc_MediaFreed
,
libvlc_MediaStateChanged
,
libvlc_MediaSubItemTreeAdded
,
libvlc_MediaPlayerMediaChanged
=
0x100
,
libvlc_MediaPlayerNothingSpecial
,
...
...
@@ -137,6 +138,10 @@ typedef struct libvlc_event_t
{
libvlc_state_t
new_state
;
}
media_state_changed
;
struct
{
libvlc_media_t
*
item
;
}
media_subitemtree_added
;
/* media instance */
struct
...
...
lib/event.c
View file @
11104cb5
...
...
@@ -259,6 +259,7 @@ static const event_name_t event_list[] = {
DEF
(
MediaParsedChanged
)
DEF
(
MediaFreed
)
DEF
(
MediaStateChanged
)
DEF
(
MediaSubItemTreeAdded
)
DEF
(
MediaPlayerMediaChanged
)
DEF
(
MediaPlayerNothingSpecial
)
...
...
lib/media.c
View file @
11104cb5
...
...
@@ -119,6 +119,23 @@ static void input_item_subitem_added( const vlc_event_t *p_event,
libvlc_media_release
(
p_md_child
);
}
/**************************************************************************
* input_item_subitemtree_added (Private) (vlc event Callback)
**************************************************************************/
static
void
input_item_subitemtree_added
(
const
vlc_event_t
*
p_event
,
void
*
user_data
)
{
libvlc_media_t
*
p_md
=
user_data
;
libvlc_event_t
event
;
/* Construct the event */
event
.
type
=
libvlc_MediaSubItemTreeAdded
;
event
.
u
.
media_subitemtree_added
.
item
=
p_md
;
/* Send the event */
libvlc_event_send
(
p_md
->
p_event_manager
,
&
event
);
}
/**************************************************************************
* input_item_meta_changed (Private) (vlc event Callback)
**************************************************************************/
...
...
@@ -201,6 +218,10 @@ static void install_input_item_observer( libvlc_media_t *p_md )
vlc_InputItemPreparsedChanged
,
input_item_preparsed_changed
,
p_md
);
vlc_event_attach
(
&
p_md
->
p_input_item
->
event_manager
,
vlc_InputItemSubItemTreeAdded
,
input_item_subitemtree_added
,
p_md
);
}
/**************************************************************************
...
...
@@ -224,6 +245,10 @@ static void uninstall_input_item_observer( libvlc_media_t *p_md )
vlc_InputItemPreparsedChanged
,
input_item_preparsed_changed
,
p_md
);
vlc_event_detach
(
&
p_md
->
p_input_item
->
event_manager
,
vlc_InputItemSubItemTreeAdded
,
input_item_subitemtree_added
,
p_md
);
}
/**************************************************************************
...
...
@@ -277,6 +302,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
libvlc_event_manager_register_event_type
(
em
,
libvlc_MediaDurationChanged
);
libvlc_event_manager_register_event_type
(
em
,
libvlc_MediaStateChanged
);
libvlc_event_manager_register_event_type
(
em
,
libvlc_MediaParsedChanged
);
libvlc_event_manager_register_event_type
(
em
,
libvlc_MediaSubItemTreeAdded
);
vlc_gc_incref
(
p_md
->
p_input_item
);
...
...
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