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
3d59250a
Commit
3d59250a
authored
Jul 04, 2008
by
Sebastien Escudier
Committed by
Antoine Cellerier
Jul 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add vod in libvlc_vlm
Signed-off-by:
Antoine Cellerier
<
dionoea@videolan.org
>
parent
bd5c6159
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
2 deletions
+80
-2
include/vlc/libvlc_vlm.h
include/vlc/libvlc_vlm.h
+28
-2
src/control/vlm.c
src/control/vlm.c
+50
-0
src/libvlc.sym
src/libvlc.sym
+2
-0
No files found.
include/vlc/libvlc_vlm.h
View file @
3d59250a
...
...
@@ -38,7 +38,7 @@ extern "C" {
* @{
*/
/**
* Release the vlm instance related to the given libvlc_instance_t
*
...
...
@@ -46,7 +46,7 @@ extern "C" {
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_vlm_release
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Add a broadcast, with one input.
*
...
...
@@ -63,6 +63,21 @@ VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t
VLC_PUBLIC_API
void
libvlc_vlm_add_broadcast
(
libvlc_instance_t
*
,
char
*
,
char
*
,
char
*
,
int
,
char
**
,
int
,
int
,
libvlc_exception_t
*
);
/**
* Add a vod, with one input.
*
* \param p_instance the instance
* \param psz_name the name of the new vod media
* \param psz_input the input MRL
* \param i_options number of additional options
* \param ppsz_options additional options
* \param b_enabled boolean for enabling the new vod
* \param the muxer of the vod media
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_vlm_add_vod
(
libvlc_instance_t
*
,
char
*
,
char
*
,
int
,
char
**
,
int
,
char
*
,
libvlc_exception_t
*
);
/**
* Delete a media (VOD or broadcast).
*
...
...
@@ -127,6 +142,17 @@ VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
VLC_PUBLIC_API
void
libvlc_vlm_set_loop
(
libvlc_instance_t
*
,
char
*
,
int
,
libvlc_exception_t
*
);
/**
* Set a media's vod muxer.
*
* \param p_instance the instance
* \param psz_name the media to work on
* \param the new muxer
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_vlm_set_mux
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
char
*
psz_mux
,
libvlc_exception_t
*
p_exception
);
/**
* Edit the parameters of a media. This will delete all existing inputs and
* add the specified one.
...
...
src/control/vlm.c
View file @
3d59250a
...
...
@@ -211,6 +211,40 @@ void libvlc_vlm_add_broadcast( libvlc_instance_t *p_instance, char *psz_name,
#endif
}
void
libvlc_vlm_add_vod
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
char
*
psz_input
,
int
i_options
,
char
**
ppsz_options
,
int
b_enabled
,
char
*
psz_mux
,
libvlc_exception_t
*
p_exception
)
{
#ifdef ENABLE_VLM
vlm_t
*
p_vlm
;
vlm_media_t
m
;
int
n
;
VLM
(
p_vlm
);
vlm_media_Init
(
&
m
);
m
.
psz_name
=
strdup
(
psz_name
);
m
.
b_enabled
=
b_enabled
;
m
.
b_vod
=
true
;
m
.
vod
.
psz_mux
=
psz_mux
?
strdup
(
psz_mux
)
:
NULL
;
if
(
psz_input
)
TAB_APPEND
(
m
.
i_input
,
m
.
ppsz_input
,
strdup
(
psz_input
)
);
for
(
n
=
0
;
n
<
i_options
;
n
++
)
TAB_APPEND
(
m
.
i_option
,
m
.
ppsz_option
,
strdup
(
ppsz_options
[
n
])
);
if
(
vlm_Control
(
p_vlm
,
VLM_ADD_MEDIA
,
&
m
,
NULL
)
)
{
vlm_media_Clean
(
&
m
);
libvlc_exception_raise
(
p_exception
,
"Media %s creation failed"
,
psz_name
);
}
vlm_media_Clean
(
&
m
);
#else
libvlc_exception_raise
(
p_exception
,
"VLM has been disabled in this libvlc."
);
return
VLC_EGENERIC
;
#endif
}
void
libvlc_vlm_del_media
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
libvlc_exception_t
*
p_exception
)
{
...
...
@@ -281,6 +315,22 @@ void libvlc_vlm_set_loop( libvlc_instance_t *p_instance, char *psz_name,
#endif
}
void
libvlc_vlm_set_mux
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
char
*
psz_mux
,
libvlc_exception_t
*
p_exception
)
{
#ifdef ENABLE_VLM
#define VLM_CHANGE_CODE { if( p_media->b_vod ) { \
free( p_media->vod.psz_mux ); \
p_media->vod.psz_mux = psz_mux ? strdup( psz_mux ) : NULL; \
} }
VLM_CHANGE
(
"Unable to change %s mux property"
,
VLM_CHANGE_CODE
);
#undef VLM_CHANGE_CODE
#else
libvlc_exception_raise
(
p_exception
,
"VLM has been disabled in this libvlc."
);
return
VLC_EGENERIC
;
#endif
}
void
libvlc_vlm_set_output
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
char
*
psz_output
,
libvlc_exception_t
*
p_exception
)
{
...
...
src/libvlc.sym
View file @
3d59250a
...
...
@@ -184,6 +184,7 @@ libvlc_video_set_teletext
libvlc_video_set_viewport
libvlc_video_take_snapshot
libvlc_vlm_add_broadcast
libvlc_vlm_add_vod
libvlc_vlm_add_input
libvlc_vlm_change_media
libvlc_vlm_del_media
...
...
@@ -201,6 +202,7 @@ libvlc_vlm_seek_media
libvlc_vlm_set_enabled
libvlc_vlm_set_input
libvlc_vlm_set_loop
libvlc_vlm_set_mux
libvlc_vlm_set_output
libvlc_vlm_show_media
libvlc_vlm_stop_media
...
...
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