]> git.sesse.net Git - vlc/blobdiff - src/input/vlm_internal.h
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / input / vlm_internal.h
index 24f100107e59705c28e516478b86bedc615282c6..03e58284db722399588c53ae97ea904f5c02372d 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
+# error This header file can only be included from LibVLC.
+#endif
+
 #ifndef _VLM_INTERNAL_H
 #define _VLM_INTERNAL_H 1
 
 #include <vlc_vlm.h>
+#include "input_interface.h"
 
-
-enum
-{
-       VOD_TYPE = 0,
-       BROADCAST_TYPE,
-       SCHEDULE_TYPE,
-};
-
+/* Private */
 typedef struct
 {
     /* instance name */
@@ -42,50 +40,35 @@ typedef struct
     /* "playlist" index */
     int i_index;
 
-    vlc_bool_t      b_sout_keep;
-
-    input_item_t    item;
-    input_thread_t  *p_input;
-    sout_instance_t *p_sout;
-
-} 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;
+    bool      b_sout_keep;
 
-    /* "playlist" */
-    int     i_input;
-    char    **input;
+    input_item_t      *p_item;
+    input_thread_t    *p_input;
+    input_resource_t *p_input_resource;
 
-    int     i_option;
-    char    **option;
+} vlm_media_instance_sys_t;
 
-    char    *psz_output;
 
-    /* only for broadcast */
-    vlc_bool_t b_loop;
+typedef struct
+{
+    vlm_media_t cfg;
 
-    /* only for vod */
-    vod_media_t *vod_media;
-    char *psz_vod_output;
-    char *psz_mux;
+    struct
+    {
+        input_item_t *p_item;
+        vod_media_t *p_media;
+    } vod;
 
     /* actual input instances */
-    int                  i_instance;
-    vlm_media_instance_t **instance;
-};
+    int                      i_instance;
+    vlm_media_instance_sys_t **instance;
+} vlm_media_sys_t;
 
-struct vlm_schedule_t
+typedef struct
 {
     /* names "schedule" is reserved */
     char    *psz_name;
-    vlc_bool_t b_enabled;
+    bool b_enabled;
     /* list of commands to execute on date */
     int i_command;
     char **command;
@@ -98,23 +81,37 @@ struct vlm_schedule_t
     /* number of times you have to repeat
        i_repeat < 0 : endless repeat     */
     int i_repeat;
-};
+} vlm_schedule_sys_t;
 
 
 struct vlm_t
 {
     VLC_COMMON_MEMBERS
 
-    vlc_mutex_t lock;
+    vlc_mutex_t  lock;
+    vlc_thread_t thread;
+    vlc_mutex_t  lock_manage;
+    vlc_cond_t   wait_manage;
+    /* tell vlm thread there is work to do */
+    bool         input_state_changed;
+    /* */
+    int64_t        i_id;
 
-    int            i_media;
-    vlm_media_t    **media;
+    /* Vod server (used by media) */
+    vod_t          *p_vod;
 
-    int            i_vod;
-    vod_t          *vod;
+    /* Media list */
+    int                i_media;
+    vlm_media_sys_t    **media;
 
+    /* Schedule list */
     int            i_schedule;
-    vlm_schedule_t **schedule;
+    vlm_schedule_sys_t **schedule;
 };
 
+int64_t vlm_Date(void);
+int vlm_ControlInternal( vlm_t *p_vlm, int i_query, ... );
+int ExecuteCommand( vlm_t *, const char *, vlm_message_t ** );
+void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched );
+
 #endif