VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
input_internal.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * input_internal.h: Internal input structures
3  *****************************************************************************
4  * Copyright (C) 1998-2006 VLC authors and VideoLAN
5  * $Id: b3ad9e7463481e92b929ed999f764289636f05ff $
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 #ifndef LIBVLC_INPUT_INTERNAL_H
25 #define LIBVLC_INPUT_INTERNAL_H 1
26 
27 #include <vlc_access.h>
28 #include <vlc_demux.h>
29 #include <vlc_input.h>
30 #include <libvlc.h>
31 #include "input_interface.h"
32 
33 /*****************************************************************************
34  * Private input fields
35  *****************************************************************************/
36 
37 #define INPUT_CONTROL_FIFO_SIZE 100
38 
39 /* input_source_t: gathers all information per input source */
40 typedef struct
41 {
42  /* Access/Stream/Demux plugins */
46 
47  /* Title infos for that input */
48  bool b_title_demux; /* Titles/Seekpoints provided by demux */
49  int i_title;
51 
54 
59 
60  /* Properties */
66 
67  /* */
68  int64_t i_pts_delay;
69 
70  bool b_eof; /* eof of demuxer */
71 
73 
74 typedef struct
75 {
76  int i_type;
79 
80 /** Private input fields */
82 {
83  /* Global properties */
84  double f_fps;
85  int i_state;
89 
90  /* Current state */
92  int i_rate;
93 
94  /* Playtime configuration and state */
95  int64_t i_start; /* :start-time,0 by default */
96  int64_t i_stop; /* :stop-time, 0 if none */
97  int64_t i_run; /* :run-time, 0 if none */
98  int64_t i_time; /* Current time */
99  bool b_fast_seek;/* :input-fast-seek */
100 
101  /* Output */
102  bool b_out_pace_control; /* XXX Move it ot es_sout ? */
103  sout_instance_t *p_sout; /* Idem ? */
106 
107  /* Title infos FIXME multi-input (not easy) ? */
108  int i_title;
110 
113 
114  /* User bookmarks FIXME won't be easy with multiples input */
118 
119  /* Input attachment */
122 
123  /* Main input properties */
124 
125  /* Input item */
127 
128  /* Main source */
130  /* Slave sources (subs, and others) */
131  int i_slave;
133 
134  /* Resources */
137 
138  /* Stats counters */
139  struct {
158  } counters;
159 
160  /* Buffer of pending actions */
165 
166  bool b_abort;
169 };
170 
171 /***************************************************************************
172  * Internal control helpers
173  ***************************************************************************/
175 {
177 
179 
181 
183 
185 
187 
191 
195 
197 
198  INPUT_CONTROL_NAV_ACTIVATE, // NOTE: INPUT_CONTROL_NAV_* values must be
199  INPUT_CONTROL_NAV_UP, // contiguous and in the same order as
200  INPUT_CONTROL_NAV_DOWN, // INPUT_NAV_* and DEMUX_NAV_*.
203 
206 
209 
211 
213 
215 
217 };
218 
219 /* Internal helpers */
220 
221 /* XXX for string value you have to allocate it before calling
222  * input_ControlPush
223  */
225 
226 /* Bound pts_delay */
227 #define INPUT_PTS_DELAY_MAX INT64_C(60000000)
228 
229 /**********************************************************************
230  * Item metadata
231  **********************************************************************/
232 /* input_ExtractAttachmentAndCacheArt:
233  * Becarefull; p_item lock HAS to be taken */
235 
236 /***************************************************************************
237  * Internal prototypes
238  ***************************************************************************/
239 
240 /* var.c */
244 void input_ControlVarTitle( input_thread_t *, int i_title );
245 
247 
248 /* Subtitles */
249 char **subtitles_Detect( input_thread_t *, char* path, const char *fname );
250 int subtitles_Filter( const char *);
251 
252 /* input.c */
253 void input_SplitMRL( const char **, const char **, const char **,
254  const char **, char * );
255 
256 #endif