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
cb435e27
Commit
cb435e27
authored
May 30, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add libvlc_set_exit_handler(), more powerful than libvlc_wait()
parent
6197b056
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
include/vlc/libvlc.h
include/vlc/libvlc.h
+16
-0
src/control/core.c
src/control/core.c
+7
-0
src/libvlc.sym
src/libvlc.sym
+1
-0
No files found.
include/vlc/libvlc.h
View file @
cb435e27
...
...
@@ -145,6 +145,22 @@ VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t *p_instance );
VLC_PUBLIC_API
int
libvlc_add_intf
(
libvlc_instance_t
*
p_instance
,
const
char
*
name
);
/**
* Registers a callback for the LibVLC exit event. This is mostly useful if
* you have started at least one interface with libvlc_add_intf().
* Typically, this function will wake up your application main loop (from
* another thread).
*
* \param p_instance LibVLC instance
* \param cb callback to invoke when LibVLC wants to exit
* \param opaque data pointer for the callback
* \warning This function and libvlc_wait() cannot be used at the same time.
* Use either or none of them but not both.
*/
VLC_PUBLIC_API
void
libvlc_set_exit_handler
(
libvlc_instance_t
*
p_instance
,
void
(
*
cb
)
(
void
*
),
void
*
opaque
);
/**
* Waits until an interface causes the instance to exit.
* You should start at least one interface first, using libvlc_add_intf().
...
...
src/control/core.c
View file @
cb435e27
...
...
@@ -114,6 +114,13 @@ int libvlc_add_intf( libvlc_instance_t *p_i, const char *name )
return
libvlc_InternalAddIntf
(
p_i
->
p_libvlc_int
,
name
)
?
-
1
:
0
;
}
void
libvlc_set_exit_handler
(
libvlc_instance_t
*
p_i
,
void
(
*
cb
)
(
void
*
),
void
*
data
)
{
libvlc_int_t
*
p_libvlc
=
p_i
->
p_libvlc_int
;
libvlc_SetExitHandler
(
p_libvlc
,
cb
,
data
);
}
void
libvlc_wait
(
libvlc_instance_t
*
p_i
)
{
libvlc_int_t
*
p_libvlc
=
p_i
->
p_libvlc_int
;
...
...
src/libvlc.sym
View file @
cb435e27
...
...
@@ -217,4 +217,5 @@ libvlc_vlm_set_mux
libvlc_vlm_set_output
libvlc_vlm_show_media
libvlc_vlm_stop_media
libvlc_set_exit_handler
libvlc_wait
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