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
f64fd9ac
Commit
f64fd9ac
authored
Mar 01, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start cleaning up VLM + fixed vlm_New() race condition.
parent
894e084c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
296 additions
and
228 deletions
+296
-228
include/vlc_vlm.h
include/vlc_vlm.h
+3
-102
src/control/vlm.c
src/control/vlm.c
+1
-1
src/input/vlm.c
src/input/vlm.c
+168
-125
src/input/vlm_internal.h
src/input/vlm_internal.h
+123
-0
src/misc/objects.c
src/misc/objects.c
+1
-0
No files found.
include/vlc_vlm.h
View file @
f64fd9ac
...
...
@@ -36,77 +36,6 @@ extern "C" {
#include <vlc_input.h>
/* VLM specific - structures and functions */
enum
{
VOD_TYPE
=
0
,
BROADCAST_TYPE
,
SCHEDULE_TYPE
,
};
typedef
struct
{
/* instance name */
char
*
psz_name
;
/* "playlist" index */
int
i_index
;
input_item_t
item
;
input_thread_t
*
p_input
;
}
vlm_media_instance_t
;
struct
vlm_media_t
{
vlc_bool_t
b_enabled
;
int
i_type
;
/* name "media" is reserved */
char
*
psz_name
;
input_item_t
item
;
/* "playlist" */
int
i_input
;
char
**
input
;
int
i_option
;
char
**
option
;
char
*
psz_output
;
/* only for broadcast */
vlc_bool_t
b_loop
;
/* only for vod */
vod_media_t
*
vod_media
;
char
*
psz_vod_output
;
char
*
psz_mux
;
/* actual input instances */
int
i_instance
;
vlm_media_instance_t
**
instance
;
};
struct
vlm_schedule_t
{
/* names "schedule" is reserved */
char
*
psz_name
;
vlc_bool_t
b_enabled
;
/* list of commands to execute on date */
int
i_command
;
char
**
command
;
/* the date of 1st execution */
mtime_t
i_date
;
/* if != 0 repeat schedule every (period) */
mtime_t
i_period
;
/* number of times you have to repeat
i_repeat < 0 : endless repeat */
int
i_repeat
;
};
/* ok, here is the structure of a vlm_message:
The parent node is ( name_of_the_command , NULL ), or
...
...
@@ -122,42 +51,14 @@ struct vlm_message_t
};
struct
vlm_t
{
VLC_COMMON_MEMBERS
vlc_mutex_t
lock
;
int
i_media
;
vlm_media_t
**
media
;
int
i_vod
;
vod_t
*
vod
;
int
i_schedule
;
vlm_schedule_t
**
schedule
;
};
#define vlm_New( a ) __vlm_New( VLC_OBJECT(a) )
VLC_EXPORT
(
vlm_t
*
,
__vlm_New
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
vlm_Delete
,
(
vlm_t
*
)
);
VLC_EXPORT
(
int
,
vlm_ExecuteCommand
,
(
vlm_t
*
,
const
char
*
,
vlm_message_t
**
)
);
VLC_EXPORT
(
void
,
vlm_MessageDelete
,
(
vlm_message_t
*
)
);
VLC_EXPORT
(
vlm_media_t
*
,
vlm_MediaNew
,
(
vlm_t
*
,
const
char
*
,
int
)
);
VLC_EXPORT
(
void
,
vlm_MediaDelete
,
(
vlm_t
*
,
vlm_media_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
vlm_MediaSetup
,
(
vlm_t
*
,
vlm_media_t
*
,
const
char
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
vlm_MediaControl
,
(
vlm_t
*
,
vlm_media_t
*
,
const
char
*
,
const
char
*
,
const
char
*
)
);
VLC_EXPORT
(
vlm_media_t
*
,
vlm_MediaSearch
,(
vlm_t
*
,
const
char
*
)
);
VLC_EXPORT
(
vlm_schedule_t
*
,
vlm_ScheduleNew
,
(
vlm_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
vlm_ScheduleDelete
,
(
vlm_t
*
,
vlm_schedule_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
vlm_ScheduleSetup
,
(
vlm_schedule_t
*
,
const
char
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
vlm_MediaVodControl
,
(
void
*
,
vod_media_t
*
,
const
char
*
,
int
,
va_list
)
);
VLC_EXPORT
(
int
,
vlm_Save
,
(
vlm_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
vlm_Load
,
(
vlm_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
vlm_Delete
,
(
vlm_t
*
)
);
VLC_EXPORT
(
int
,
vlm_ExecuteCommand
,
(
vlm_t
*
,
const
char
*
,
vlm_message_t
**
)
);
VLC_EXPORT
(
vlm_message_t
*
,
vlm_MessageNew
,
(
const
char
*
,
const
char
*
,
...
)
);
VLC_EXPORT
(
vlm_message_t
*
,
vlm_MessageAdd
,
(
vlm_message_t
*
,
vlm_message_t
*
)
);
VLC_EXPORT
(
void
,
vlm_MessageDelete
,
(
vlm_message_t
*
)
);
#ifdef __cpluplus
}
...
...
src/control/vlm.c
View file @
f64fd9ac
...
...
@@ -25,7 +25,7 @@
#include <vlc/libvlc.h>
#include <vlc_es.h>
#include <vlc_input.h>
#include
<vlc_vlm.h>
#include
"../input/vlm_internal.h"
static
void
InitVLM
(
libvlc_instance_t
*
p_instance
)
{
...
...
src/input/vlm.c
View file @
f64fd9ac
This diff is collapsed.
Click to expand it.
src/input/vlm_internal.h
0 → 100644
View file @
f64fd9ac
/*****************************************************************************
* vlm_internal.h: Internal vlm structures
*****************************************************************************
* Copyright (C) 1998-2006 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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.
*****************************************************************************/
#ifndef _VLM_INTERNAL_H
#define _VLM_INTERNAL_H 1
#include <vlc_vlm.h>
enum
{
VOD_TYPE
=
0
,
BROADCAST_TYPE
,
SCHEDULE_TYPE
,
};
typedef
struct
{
/* instance name */
char
*
psz_name
;
/* "playlist" index */
int
i_index
;
input_item_t
item
;
input_thread_t
*
p_input
;
}
vlm_media_instance_t
;
struct
vlm_media_t
{
vlc_bool_t
b_enabled
;
int
i_type
;
/* name "media" is reserved */
char
*
psz_name
;
input_item_t
item
;
/* "playlist" */
int
i_input
;
char
**
input
;
int
i_option
;
char
**
option
;
char
*
psz_output
;
/* only for broadcast */
vlc_bool_t
b_loop
;
/* only for vod */
vod_media_t
*
vod_media
;
char
*
psz_vod_output
;
char
*
psz_mux
;
/* actual input instances */
int
i_instance
;
vlm_media_instance_t
**
instance
;
};
struct
vlm_schedule_t
{
/* names "schedule" is reserved */
char
*
psz_name
;
vlc_bool_t
b_enabled
;
/* list of commands to execute on date */
int
i_command
;
char
**
command
;
/* the date of 1st execution */
mtime_t
i_date
;
/* if != 0 repeat schedule every (period) */
mtime_t
i_period
;
/* number of times you have to repeat
i_repeat < 0 : endless repeat */
int
i_repeat
;
};
struct
vlm_t
{
VLC_COMMON_MEMBERS
vlc_mutex_t
lock
;
int
i_media
;
vlm_media_t
**
media
;
int
i_vod
;
vod_t
*
vod
;
int
i_schedule
;
vlm_schedule_t
**
schedule
;
};
vlm_media_t
*
vlm_MediaNew
(
vlm_t
*
,
const
char
*
,
int
);
void
vlm_MediaDelete
(
vlm_t
*
,
vlm_media_t
*
,
const
char
*
);
int
vlm_MediaSetup
(
vlm_t
*
,
vlm_media_t
*
,
const
char
*
,
const
char
*
);
int
vlm_MediaControl
(
vlm_t
*
,
vlm_media_t
*
,
const
char
*
,
const
char
*
,
const
char
*
);
vlm_media_t
*
vlm_MediaSearch
(
vlm_t
*
,
const
char
*
);
#endif
src/misc/objects.c
View file @
f64fd9ac
...
...
@@ -55,6 +55,7 @@
#include "vlc_httpd.h"
#include "vlc_vlm.h"
#include "input/vlm_internal.h"
#include "vlc_vod.h"
#include "vlc_tls.h"
#include "vlc_xml.h"
...
...
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