Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
ce98868f
Commit
ce98868f
authored
Feb 14, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing file
parent
ef273c07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
117 additions
and
0 deletions
+117
-0
src/control/vlm.c
src/control/vlm.c
+117
-0
No files found.
src/control/vlm.c
0 → 100644
View file @
ce98868f
/*****************************************************************************
* vlm.c: libvlc new API VLM handling functions
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* $Id: playlist.c 14265 2006-02-12 17:31:39Z zorglub $
*
* Authors: Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <libvlc_internal.h>
#include <vlc/libvlc.h>
#include <vlc/vlc.h>
#include <vlc_input.h>
#include <vlc_vlm.h>
void
InitVLM
(
libvlc_instance_t
*
p_instance
)
{
if
(
p_instance
->
p_vlm
)
return
;
p_instance
->
p_vlm
=
vlm_New
(
p_instance
->
p_vlc
);
}
#define CHECK_VLM { if( !p_instance->p_vlm ) InitVLM( p_instance ); \
if( !p_instance->p_vlm ) {\
libvlc_exception_raise( p_exception, \
"Unable to create VLM" ); return; } }
void
libvlc_vlm_add_broadcast
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
char
*
psz_input
,
char
*
psz_output
,
int
i_options
,
char
**
ppsz_options
,
int
b_enabled
,
int
b_loop
,
libvlc_exception_t
*
p_exception
)
{
vlm_media_t
*
p_media
;
CHECK_VLM
;
p_media
=
vlm_MediaNew
(
p_instance
->
p_vlm
,
psz_name
,
BROADCAST_TYPE
);
if
(
!
p_media
)
{
libvlc_exception_raise
(
p_exception
,
"Media %s creation failed"
,
psz_name
);
return
;
}
libvlc_vlm_change_media
(
p_instance
,
psz_name
,
psz_input
,
psz_output
,
i_options
,
ppsz_options
,
b_enabled
,
b_loop
,
p_exception
);
}
void
libvlc_vlm_del_media
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
libvlc_exception_t
*
p_exception
)
{
char
*
psz_message
;
vlm_message_t
*
answer
;
CHECK_VLM
;
asprintf
(
&
psz_message
,
"del %s"
,
psz_name
);
vlm_ExecuteCommand
(
p_instance
->
p_vlm
,
psz_message
,
&
answer
);
if
(
answer
->
psz_value
)
{
libvlc_exception_raise
(
p_exception
,
"Unable to delete %s"
,
psz_name
);
}
free
(
psz_message
);
}
void
libvlc_vlm_set_enabled
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
int
b_enabled
,
libvlc_exception_t
*
p_exception
)
{
vlm_media_t
*
p_media
;
CHECK_VLM
;
if
(
b_enabled
!=
0
)
b_enabled
=
1
;
p_media
=
vlm_MediaSearch
(
p_instance
->
p_vlm
,
psz_name
);
if
(
!
p_media
)
{
libvlc_exception_raise
(
p_exception
,
"Media %s does not exist"
,
psz_name
);
return
;
}
p_media
->
b_enabled
=
b_enabled
;
}
void
libvlc_vlm_change_media
(
libvlc_instance_t
*
p_instance
,
char
*
psz_name
,
char
*
psz_input
,
char
*
psz_output
,
int
i_options
,
char
**
ppsz_options
,
int
b_enabled
,
int
b_loop
,
libvlc_exception_t
*
p_exception
)
{
vlm_media_t
*
p_media
;
CHECK_VLM
;
if
(
b_enabled
!=
0
)
b_enabled
=
1
;
if
(
b_loop
!=
0
)
b_loop
=
1
;
p_media
=
vlm_MediaSearch
(
p_instance
->
p_vlm
,
psz_name
);
if
(
!
p_media
)
{
libvlc_exception_raise
(
p_exception
,
"Media %s does not exist"
,
psz_name
);
return
;
}
p_media
->
b_enabled
=
b_enabled
;
p_media
->
b_loop
=
b_loop
;
}
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