VLC  4.0.0-dev
vlm_internal.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlm_internal.h: Internal vlm structures
3  *****************************************************************************
4  * Copyright (C) 1998-2006 VLC authors and VideoLAN
5  *
6  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22 
23 #ifndef LIBVLC_VLM_INTERNAL_H
24 #define LIBVLC_VLM_INTERNAL_H 1
25 
26 #include <vlc_vlm.h>
27 #include <vlc_player.h>
28 #include "input_interface.h"
29 
30 /* Private */
31 typedef struct
32 {
33  /* instance name */
34  char *psz_name;
35 
36  /* "playlist" index */
37  int i_index;
38 
39  vlc_object_t *p_parent;
40  input_item_t *p_item;
41  vlc_player_t *player;
42  vlc_player_listener_id *listener;
43 
45 
46 
47 typedef struct
48 {
49  struct vlc_object_t obj;
51 
52  /* actual input instances */
56 
57 typedef struct
58 {
59  /* names "schedule" is reserved */
60  char *psz_name;
61  bool b_enabled;
62  /* list of commands to execute on date */
63  int i_command;
64  char **command;
65 
66  /* the date of 1st execution */
67  time_t date;
68 
69  /* if != 0, repeat period in seconds */
70  time_t period;
71  /* number of times you have to repeat
72  i_repeat < 0 : endless repeat */
73  int i_repeat;
75 
76 
77 struct vlm_t
78 {
79  struct vlc_object_t obj;
80 
85  unsigned users;
86 
87  /* tell vlm thread there is work to do */
89  bool exiting;
90  /* */
91  int64_t i_id;
92 
93  /* Media list */
94  int i_media;
96 
97  /* Schedule list */
100 };
101 
102 int vlm_ControlInternal( vlm_t *p_vlm, int i_query, ... );
103 int ExecuteCommand( vlm_t *, const char *, vlm_message_t ** );
104 void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched );
105 
106 #endif
vlc_player_t
Definition: player.h:227
vlm_schedule_sys_t::i_repeat
int i_repeat
Definition: vlm_internal.h:73
vlc_player.h
vlm_media_instance_sys_t
Definition: vlm_internal.h:31
vlc_object_t::obj
struct vlc_object_marker * obj
Definition: vlc_objects.h:48
vlm_t::i_media
int i_media
Definition: vlm_internal.h:94
psz_name
const char * psz_name
Definition: text_style.c:53
vlm_schedule_sys_t::command
char ** command
Definition: vlm_internal.h:64
vlc_player_listener_id
Definition: player.h:128
vlc_vlm.h
vlm_schedule_sys_t
Definition: vlm_internal.h:57
input_item_t
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:77
vlm_media_sys_t::i_instance
int i_instance
Definition: vlm_internal.h:53
vlm_t::users
unsigned users
Definition: vlm_internal.h:85
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
vlm_t::schedule
vlm_schedule_sys_t ** schedule
Definition: vlm_internal.h:99
vlm_schedule_sys_t::period
time_t period
Definition: vlm_internal.h:70
vlm_t::input_state_changed
bool input_state_changed
Definition: vlm_internal.h:88
vlm_media_t
VLM media.
Definition: vlc_vlm.h:44
vlm_t
Definition: vlm_internal.h:77
vlm_t::exiting
bool exiting
Definition: vlm_internal.h:89
vlm_media_sys_t::cfg
vlm_media_t cfg
Definition: vlm_internal.h:50
vlc_thread_t
Thread handle.
Definition: vlc_threads.h:180
vlm_t::media
vlm_media_sys_t ** media
Definition: vlm_internal.h:95
vlm_schedule_sys_t::date
time_t date
Definition: vlm_internal.h:67
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
vlm_t::i_schedule
int i_schedule
Definition: vlm_internal.h:98
vlm_t::thread
vlc_thread_t thread
Definition: vlm_internal.h:82
input_interface.h
vlm_schedule_sys_t::psz_name
char * psz_name
Definition: vlm_internal.h:60
ExecuteCommand
int ExecuteCommand(vlm_t *, const char *, vlm_message_t **)
vlm_t::lock_manage
vlc_mutex_t lock_manage
Definition: vlm_internal.h:83
vlc_cond_t
Condition variable.
Definition: vlc_threads.h:349
vlm_ControlInternal
int vlm_ControlInternal(vlm_t *p_vlm, int i_query,...)
Definition: vlm.c:966
vlm_t::wait_manage
vlc_cond_t wait_manage
Definition: vlm_internal.h:84
vlm_schedule_sys_t::i_command
int i_command
Definition: vlm_internal.h:63
vlm_media_sys_t
Definition: vlm_internal.h:47
vlm_ScheduleDelete
void vlm_ScheduleDelete(vlm_t *vlm, vlm_schedule_sys_t *sched)
vlm_t::i_id
int64_t i_id
Definition: vlm_internal.h:91
vlm_message_t
Definition: vlc_vlm.h:176
vlm_t::lock
vlc_mutex_t lock
Definition: vlm_internal.h:81
vlm_t::obj
struct vlc_object_t obj
Definition: vlm_internal.h:79