VLC  4.0.0-dev
vlc_demux.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_demux.h: Demuxer descriptor, queries and methods
3  *****************************************************************************
4  * Copyright (C) 1999-2005 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 VLC_DEMUX_H
24 #define VLC_DEMUX_H 1
25 
26 #include <stdlib.h>
27 #include <string.h>
28 
29 #include <vlc_es.h>
30 #include <vlc_stream.h>
31 #include <vlc_es_out.h>
32 
33 /**
34  * \defgroup demux Demultiplexer
35  * \ingroup input
36  * Demultiplexers (file format parsers)
37  * @{
38  * \file
39  * Demultiplexer modules interface
40  */
41 
42 /* pf_demux return values */
43 #define VLC_DEMUXER_EOF 0
44 #define VLC_DEMUXER_EGENERIC -1
45 #define VLC_DEMUXER_SUCCESS 1
46 
47 /* DEMUX_TEST_AND_CLEAR flags */
48 #define INPUT_UPDATE_TITLE 0x0010
49 #define INPUT_UPDATE_SEEKPOINT 0x0020
50 #define INPUT_UPDATE_META 0x0040
51 #define INPUT_UPDATE_TITLE_LIST 0x0100
52 
53 /* Demux module descriptor helpers */
54 #define add_file_extension(ext) add_shortcut("ext-" ext)
55 
56 /* demux_meta_t is returned by "meta reader" module to the demuxer */
57 typedef struct demux_meta_t
58 {
59  struct vlc_object_t obj;
60  input_item_t *p_item; /***< the input item that is being read */
61 
62  vlc_meta_t *p_meta; /**< meta data */
63 
64  int i_attachments; /**< number of attachments */
65  input_attachment_t **attachments; /**< array of attachments */
67 
68 /**
69  * Control query identifiers for use with demux_t.pf_control
70  *
71  * In the individual identifier description, the input stream refers to
72  * demux_t.s if non-NULL, and the output refers to demux_t.out.
73  *
74  * A demuxer is synchronous if it only accesses its input stream and the
75  * output from within its demux_t callbacks, i.e. demux.pf_demux and
76  * demux_t.pf_control.
77  *
78  * A demuxer is threaded if it accesses either or both input and output
79  * asynchronously.
80  *
81  * An access-demuxer is a demuxer without input, i.e. demux_t.s == NULL).
82  */
83 enum demux_query_e
84 {
85  /** Checks whether the stream supports seeking.
86  * Can fail if seeking is not supported (same as returning false).
87  * \bug Failing should not be allowed.
88  *
89  * arg1 = bool * */
91 
92  /** Checks whether (long) pause then stream resumption is supported.
93  * Can fail only if synchronous and <b>not</b> an access-demuxer. The
94  * underlying input stream then determines if pause is supported.
95  * \bug Failing should not be allowed.
96  *
97  * arg1= bool * */
98  DEMUX_CAN_PAUSE = 0x002,
99 
100  /** Whether the stream can be read at an arbitrary pace.
101  * Cannot fail.
102  *
103  * arg1= bool * */
105 
106  /** Retrieves the PTS delay (roughly the default buffer duration).
107  * Can fail only if synchronous and <b>not</b> an access-demuxer. The
108  * underlying input stream then determines the PTS delay.
109  *
110  * arg1= vlc_tick_t * */
111  DEMUX_GET_PTS_DELAY = 0x101,
112 
113  /** Retrieves stream meta-data.
114  * Should fail if no meta-data were retrieved.
115  *
116  * arg1= vlc_meta_t * */
117  DEMUX_GET_META = 0x105,
118 
119  /** Retrieves an estimate of signal quality and strength.
120  * Can fail.
121  *
122  * arg1=double *quality, arg2=double *strength */
123  DEMUX_GET_SIGNAL = 0x107,
124 
125  /** Retrieves the demuxed content type
126  * Can fail if the control is not implemented
127  *
128  * arg1= int* */
129  DEMUX_GET_TYPE = 0x109,
130 
131  /** Sets the paused or playing/resumed state.
132  *
133  * Streams are initially in playing state. The control always specifies a
134  * change from paused to playing (false) or from playing to paused (true)
135  * and streams are initially playing; a no-op cannot be requested.
136  *
137  * The control is never used if DEMUX_CAN_PAUSE fails.
138  * Can fail.
139  *
140  * arg1= bool */
141  DEMUX_SET_PAUSE_STATE = 0x200,
142 
143  /** Seeks to the beginning of a title.
144  *
145  * The control is never used if DEMUX_GET_TITLE_INFO fails.
146  * Can fail.
147  *
148  * arg1= int */
150 
151  /** Seeks to the beginning of a chapter of the current title.
152  *
153  * The control is never used if DEMUX_GET_TITLE_INFO fails.
154  * Can fail.
155  *
156  * arg1= int */
157  DEMUX_SET_SEEKPOINT, /* arg1= int can fail */
158 
159  /** Check which INPUT_UPDATE_XXX flag is set and reset the ones set.
160  *
161  * The unsigned* argument is set with the flags needed to be checked,
162  * on return it contains the values that were reset during the call
163  *
164  * arg1= unsigned * */
165  DEMUX_TEST_AND_CLEAR_FLAGS, /* arg1= unsigned* can fail */
166 
167  /** Read the title number currently playing
168  *
169  * Can fail.
170  *
171  * arg1= int * */
172  DEMUX_GET_TITLE, /* arg1= int* can fail */
173 
174  /* Read the seekpoint/chapter currently playing
175  *
176  * Can fail.
177  *
178  * arg1= int * */
179  DEMUX_GET_SEEKPOINT, /* arg1= int* can fail */
180 
181  /* I. Common queries to access_demux and demux */
182  /* POSITION double between 0.0 and 1.0 */
183  DEMUX_GET_POSITION = 0x300, /* arg1= double * res= */
184  DEMUX_SET_POSITION, /* arg1= double arg2= bool b_precise res=can fail */
185 
186  /* LENGTH/TIME in microsecond, 0 if unknown */
187  DEMUX_GET_LENGTH, /* arg1= vlc_tick_t * res= */
188  DEMUX_GET_TIME, /* arg1= vlc_tick_t * res= */
189  DEMUX_SET_TIME, /* arg1= vlc_tick_t arg2= bool b_precise res=can fail */
190  /* Normal or original time, used mainly by the ts module */
191  DEMUX_GET_NORMAL_TIME, /* arg1= vlc_tick_t * res= can fail, in that case VLC_TICK_0 will be used as NORMAL_TIME */
192 
193  /**
194  * \todo Document
195  *
196  * \warning The prototype is different from STREAM_GET_TITLE_INFO
197  *
198  * Can fail, meaning there is only one title and one chapter.
199  *
200  * arg1= input_title_t ***, arg2=int *, arg3=int *pi_title_offset(0),
201  * arg4= int *pi_seekpoint_offset(0) */
203 
204  /* DEMUX_SET_GROUP_* / DEMUX_SET_ES is only a hint for demuxer (mainly DVB)
205  * to avoid parsing everything (you should not use this to call
206  * es_out_Control()).
207  * If you don't know what to do with it, just IGNORE it: it is safe(r). */
210  DEMUX_SET_GROUP_LIST, /* arg1= size_t, arg2= const int *, can fail */
211  DEMUX_SET_ES, /* arg1= int can fail */
212  DEMUX_SET_ES_LIST, /* arg1= size_t, arg2= const int * (can be NULL) can fail */
213 
214  /* Ask the demux to demux until the given date at the next pf_demux call
215  * but not more (and not less, at the precision available of course).
216  * XXX: not mandatory (except for subtitle demux) but will help a lot
217  * for multi-input
218  */
219  DEMUX_SET_NEXT_DEMUX_TIME, /* arg1= vlc_tick_t can fail */
220  /* FPS for correct subtitles handling */
221  DEMUX_GET_FPS, /* arg1= double * res=can fail */
222 
223  /* Meta data */
224  DEMUX_HAS_UNSUPPORTED_META, /* arg1= bool * res can fail */
225 
226  /*
227  * Fetches attachment from the demux.
228  * The returned attachments are owned by the demuxer and must not be modified
229  * arg1=input_attachment_t***, int* res=can fail
230  */
232 
233  /* RECORD you are ensured that it is never called twice with the same state
234  * you should accept it only if the stream can be recorded without
235  * any modification or header addition. */
236  DEMUX_CAN_RECORD, /* arg1=bool* res=can fail(assume false) */
237  /**
238  * \todo Document
239  *
240  * \warning The prototype is different from STREAM_SET_RECORD_STATE
241  *
242  * The control is never used if DEMUX_CAN_RECORD fails or returns false.
243  * Can fail.
244  *
245  * arg1= bool */
247 
248  /* II. Specific access_demux queries */
249 
250  /* DEMUX_CAN_CONTROL_RATE is called only if DEMUX_CAN_CONTROL_PACE has
251  * returned false. *pb_rate should be true when the rate can be changed
252  * (using DEMUX_SET_RATE). */
253  DEMUX_CAN_CONTROL_RATE, /* arg1= bool*pb_rate */
254  /* DEMUX_SET_RATE is called only if DEMUX_CAN_CONTROL_RATE has returned true.
255  * It should return the value really used in *p_rate */
256  DEMUX_SET_RATE, /* arg1= float*p_rate res=can fail */
257 
258  /* Menu (VCD/DVD/BD) Navigation */
259  /** Activate the navigation item selected. Can fail */
261  /** Use the up arrow to select a navigation item above. Can fail */
262  DEMUX_NAV_UP,
263  /** Use the down arrow to select a navigation item under. Can fail */
265  /** Use the left arrow to select a navigation item on the left. Can fail */
267  /** Use the right arrow to select a navigation item on the right. Can fail */
269  /** Activate the popup Menu (for BD). Can fail */
271  /** Activate disc Root Menu. Can fail */
272  DEMUX_NAV_MENU, /* res=can fail */
273  /** Enable/Disable a demux filter
274  * \warning This has limited support, and is likely to break if more than
275  * a single demux_filter is present in the chain. This is not guaranteed to
276  * work in future VLC versions, nor with all demux filters
277  */
280 };
281 
282 /*************************************************************************
283  * Main Demux
284  *************************************************************************/
285 
286 VLC_API demux_t *demux_New( vlc_object_t *p_obj, const char *psz_name,
287  stream_t *s, es_out_t *out );
288 
289 static inline void demux_Delete(demux_t *demux)
290 {
291  vlc_stream_Delete(demux);
292 }
293 
294 VLC_API int demux_vaControlHelper( stream_t *, int64_t i_start, int64_t i_end,
295  int64_t i_bitrate, int i_align, int i_query, va_list args );
296 
297 VLC_API int demux_Demux( demux_t *p_demux ) VLC_USED;
298 VLC_API int demux_vaControl( demux_t *p_demux, int i_query, va_list args );
299 
300 static inline int demux_Control( demux_t *p_demux, int i_query, ... )
301 {
302  va_list args;
303  int i_result;
304 
305  va_start( args, i_query );
306  i_result = demux_vaControl( p_demux, i_query, args );
307  va_end( args );
308  return i_result;
309 }
310 
311 /*************************************************************************
312  * Miscellaneous helpers for demuxers
313  *************************************************************************/
314 
315 #ifndef __cplusplus
316 static inline void demux_UpdateTitleFromStream( demux_t *demux,
317  int *restrict titlep, int *restrict seekpointp,
318  unsigned *restrict updatep )
319 {
320  stream_t *s = demux->s;
321  unsigned title, seekpoint;
322 
323  if( vlc_stream_Control( s, STREAM_GET_TITLE, &title ) == VLC_SUCCESS
324  && title != (unsigned)*titlep )
325  {
326  *titlep = title;
327  *updatep |= INPUT_UPDATE_TITLE;
328  }
329 
331  &seekpoint ) == VLC_SUCCESS
332  && seekpoint != (unsigned)*seekpointp )
333  {
334  *seekpointp = seekpoint;
335  *updatep |= INPUT_UPDATE_SEEKPOINT;
336  }
337 }
338 # define demux_UpdateTitleFromStream(demux) \
339  demux_UpdateTitleFromStream(demux, \
340  &((demux_sys_t *)((demux)->p_sys))->current_title, \
341  &((demux_sys_t *)((demux)->p_sys))->current_seekpoint, \
342  &((demux_sys_t *)((demux)->p_sys))->updates)
343 #endif
344 
345 VLC_USED
346 static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension )
347 {
348  const char *name = (p_demux->psz_filepath != NULL) ? p_demux->psz_filepath
349  : p_demux->psz_location;
350  const char *psz_ext = strrchr ( name, '.' );
351  if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
352  return false;
353  return true;
354 }
355 
356 VLC_USED
357 static inline bool demux_IsContentType(demux_t *demux, const char *type)
358 {
359  return stream_IsMimeType(demux->s, type);
360 }
361 
362 VLC_USED
363 static inline bool demux_IsForced( demux_t *p_demux, const char *psz_name )
364 {
365  if( p_demux->psz_name == NULL || strcmp( p_demux->psz_name, psz_name ) )
366  return false;
367  return true;
368 }
369 
370 static inline int demux_SetPosition( demux_t *p_demux, double pos, bool precise,
371  bool absolute)
372 {
373  if( !absolute )
374  {
375  double current_pos;
376  int ret = demux_Control( p_demux, DEMUX_GET_POSITION, &current_pos );
377  if( ret != VLC_SUCCESS )
378  return ret;
379  pos += current_pos;
380  }
381 
382  if( pos < 0.f )
383  pos = 0.f;
384  else if( pos > 1.f )
385  pos = 1.f;
386  return demux_Control( p_demux, DEMUX_SET_POSITION, pos, precise );
387 }
388 
389 static inline int demux_SetTime( demux_t *p_demux, vlc_tick_t time, bool precise,
390  bool absolute )
391 {
392  if( !absolute )
393  {
394  vlc_tick_t current_time;
395  int ret = demux_Control( p_demux, DEMUX_GET_TIME, &current_time );
396  if( ret != VLC_SUCCESS )
397  return ret;
398  time += current_time;
399  }
400 
401  if( time < 0 )
402  time = 0;
403  return demux_Control( p_demux, DEMUX_SET_TIME, time, precise );
404 }
405 
406 /**
407  * This function will create a packetizer suitable for a demuxer that parses
408  * elementary stream.
409  *
410  * The provided es_format_t will be cleaned on error or by
411  * demux_PacketizerDestroy.
412  */
413 VLC_API decoder_t * demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char *psz_msg ) VLC_USED;
414 
415 /**
416  * This function will destroy a packetizer create by demux_PacketizerNew.
417  */
418 VLC_API void demux_PacketizerDestroy( decoder_t *p_packetizer );
419 
420 /* */
421 #define DEMUX_INIT_COMMON() do { \
422  p_demux->pf_control = Control; \
423  p_demux->pf_demux = Demux; \
424  p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \
425  if( !p_demux->p_sys ) return VLC_ENOMEM;\
426  } while(0)
427 
428 /**
429  * \defgroup chained_demux Chained demultiplexer
430  * Demultiplexers wrapped by another demultiplexer
431  * @{
432  */
433 
435 
436 /**
437  * Creates a chained demuxer.
438  *
439  * This creates a thread running a demuxer whose input stream is generated
440  * directly by the caller. This typically handles some sort of stream within a
441  * stream, e.g. MPEG-TS within something else.
442  *
443  * \note There are a number of limitations to this approach. The chained
444  * demuxer is run asynchronously in a separate thread. Most demuxer controls
445  * are synchronous and therefore unavailable in this case. Also the input
446  * stream is a simple FIFO, so the chained demuxer cannot perform seeks.
447  * Lastly, most errors cannot be detected.
448  *
449  * \param parent parent VLC object
450  * \param name chained demux module name (e.g. "ts")
451  * \param out elementary stream output for the chained demux
452  * \return a non-NULL pointer on success, NULL on failure.
453  */
455  const char *name,
456  es_out_t *out);
457 
458 /**
459  * Destroys a chained demuxer.
460  *
461  * Sends an end-of-stream to the chained demuxer, and releases all underlying
462  * allocated resources.
463  */
465 
466 /**
467  * Sends data to a chained demuxer.
468  *
469  * This queues data for a chained demuxer to consume.
470  *
471  * \param block data block to queue
472  */
474 
475 /**
476  * Controls a chained demuxer.
477  *
478  * This performs a <b>demux</b> (i.e. DEMUX_...) control request on a chained
479  * demux.
480  *
481  * \note In most cases, vlc_demux_chained_Control() should be used instead.
482  * \warning As per vlc_demux_chained_New(), most demux controls are not, and
483  * cannot be, supported; VLC_EGENERIC is returned.
484  *
485  * \param query demux control (see \ref demux_query_e)
486  * \param args variable arguments (depending on the query)
487  */
489  va_list args);
490 
491 static inline int vlc_demux_chained_Control(vlc_demux_chained_t *dc, int query,
492  ...)
493 {
494  va_list ap;
495  int ret;
496 
497  va_start(ap, query);
498  ret = vlc_demux_chained_ControlVa(dc, query, ap);
499  va_end(ap);
500  return ret;
501 }
502 
503 /**
504  * @}
505  */
506 
507 /**
508  * @}
509  */
510 
511 #endif
DEMUX_GET_META
@ DEMUX_GET_META
Retrieves stream meta-data.
Definition: vlc_demux.h:118
DEMUX_SET_PAUSE_STATE
@ DEMUX_SET_PAUSE_STATE
Sets the paused or playing/resumed state.
Definition: vlc_demux.h:142
DEMUX_GET_SIGNAL
@ DEMUX_GET_SIGNAL
Retrieves an estimate of signal quality and strength.
Definition: vlc_demux.h:124
demux_UpdateTitleFromStream
#define demux_UpdateTitleFromStream(demux)
Definition: vlc_demux.h:339
vlc_es.h
STREAM_GET_TITLE
@ STREAM_GET_TITLE
arg1=unsigned * res=can fail
Definition: vlc_stream.h:157
VLC_API
#define VLC_API
Definition: fourcc_gen.c:31
DEMUX_NAV_UP
@ DEMUX_NAV_UP
Use the up arrow to select a navigation item above.
Definition: vlc_demux.h:263
input_attachment_t
Definition: vlc_input.h:159
DEMUX_GET_TYPE
@ DEMUX_GET_TYPE
Retrieves the demuxed content type Can fail if the control is not implemented.
Definition: vlc_demux.h:130
strcasecmp
int strcasecmp(const char *, const char *)
psz_name
const char * psz_name
Definition: text_style.c:53
DEMUX_SET_TIME
@ DEMUX_SET_TIME
Definition: vlc_demux.h:190
demux_Control
static int demux_Control(demux_t *p_demux, int i_query,...)
Definition: vlc_demux.h:301
vlc_common.h
DEMUX_GET_TITLE_INFO
@ DEMUX_GET_TITLE_INFO
Definition: vlc_demux.h:203
DEMUX_CAN_RECORD
@ DEMUX_CAN_RECORD
Definition: vlc_demux.h:237
vlc_es_out.h
input_item_t
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:77
demux_IsForced
static bool demux_IsForced(demux_t *p_demux, const char *psz_name)
Definition: vlc_demux.h:364
demux_PacketizerNew
VLC_EXPORT decoder_t * demux_PacketizerNew(demux_t *p_demux, es_format_t *p_fmt, const char *psz_msg)
This function will create a packetizer suitable for a demuxer that parses elementary stream.
Definition: demux.c:373
DEMUX_SET_TITLE
@ DEMUX_SET_TITLE
Seeks to the beginning of a title.
Definition: vlc_demux.h:150
DEMUX_SET_GROUP_LIST
@ DEMUX_SET_GROUP_LIST
Definition: vlc_demux.h:211
DEMUX_SET_ES
@ DEMUX_SET_ES
Definition: vlc_demux.h:212
DEMUX_SET_ES_LIST
@ DEMUX_SET_ES_LIST
Definition: vlc_demux.h:213
decoder_t
Definition: vlc_codec.h:101
psz_ext
const char psz_ext[7]
Definition: image.c:586
DEMUX_SET_SEEKPOINT
@ DEMUX_SET_SEEKPOINT
Seeks to the beginning of a chapter of the current title.
Definition: vlc_demux.h:158
demux_meta_t::obj
struct vlc_object_t obj
Definition: vlc_demux.h:60
demux_vaControl
VLC_EXPORT int demux_vaControl(demux_t *p_demux, int i_query, va_list args)
Definition: demux.c:229
vlc_demux_chained_Send
VLC_EXPORT void vlc_demux_chained_Send(vlc_demux_chained_t *, block_t *block)
Sends data to a chained demuxer.
Definition: demux_chained.c:133
DEMUX_SET_RATE
@ DEMUX_SET_RATE
Definition: vlc_demux.h:257
stream_t::psz_location
const char * psz_location
Location (URL with the scheme stripped)
Definition: vlc_stream.h:52
DEMUX_HAS_UNSUPPORTED_META
@ DEMUX_HAS_UNSUPPORTED_META
Definition: vlc_demux.h:225
vlc_meta_t
Definition: meta.c:39
DEMUX_GET_TIME
@ DEMUX_GET_TIME
Definition: vlc_demux.h:189
DEMUX_SET_GROUP_ALL
@ DEMUX_SET_GROUP_ALL
Definition: vlc_demux.h:210
stream_t::psz_name
char * psz_name
Definition: vlc_stream.h:50
es_out_t
Definition: vlc_es_out.h:143
demux_meta_t::p_item
input_item_t * p_item
Definition: vlc_demux.h:61
DEMUX_CAN_PAUSE
@ DEMUX_CAN_PAUSE
Checks whether (long) pause then stream resumption is supported.
Definition: vlc_demux.h:99
DEMUX_SET_NEXT_DEMUX_TIME
@ DEMUX_SET_NEXT_DEMUX_TIME
Definition: vlc_demux.h:220
demux_PacketizerDestroy
VLC_EXPORT void demux_PacketizerDestroy(decoder_t *p_packetizer)
This function will destroy a packetizer create by demux_PacketizerNew.
Definition: demux.c:403
DEMUX_GET_LENGTH
@ DEMUX_GET_LENGTH
Definition: vlc_demux.h:188
es_format_t
Definition: vlc_es.h:617
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
DEMUX_SET_GROUP_DEFAULT
@ DEMUX_SET_GROUP_DEFAULT
Definition: vlc_demux.h:209
demux_New
VLC_EXPORT demux_t * demux_New(vlc_object_t *p_obj, const char *psz_name, stream_t *s, es_out_t *out)
Definition: demux.c:72
DEMUX_SET_POSITION
@ DEMUX_SET_POSITION
Definition: vlc_demux.h:185
DEMUX_NAV_LEFT
@ DEMUX_NAV_LEFT
Use the left arrow to select a navigation item on the left.
Definition: vlc_demux.h:267
INPUT_UPDATE_TITLE
#define INPUT_UPDATE_TITLE
Definition: vlc_demux.h:49
DEMUX_GET_NORMAL_TIME
@ DEMUX_GET_NORMAL_TIME
Definition: vlc_demux.h:192
vlc_stream_Control
static int vlc_stream_Control(stream_t *s, int query,...)
Definition: vlc_stream.h:294
DEMUX_GET_SEEKPOINT
@ DEMUX_GET_SEEKPOINT
Definition: vlc_demux.h:180
DEMUX_NAV_POPUP
@ DEMUX_NAV_POPUP
Activate the popup Menu (for BD).
Definition: vlc_demux.h:271
DEMUX_NAV_ACTIVATE
@ DEMUX_NAV_ACTIVATE
Activate the navigation item selected.
Definition: vlc_demux.h:261
DEMUX_CAN_SEEK
@ DEMUX_CAN_SEEK
Checks whether the stream supports seeking.
Definition: vlc_demux.h:91
stream_t
stream_t definition
Definition: vlc_stream.h:46
stream_t::s
stream_t * s
Input stream.
Definition: vlc_stream.h:65
DEMUX_NAV_DOWN
@ DEMUX_NAV_DOWN
Use the down arrow to select a navigation item under.
Definition: vlc_demux.h:265
DEMUX_FILTER_DISABLE
@ DEMUX_FILTER_DISABLE
Definition: vlc_demux.h:280
demux_meta_t::attachments
input_attachment_t ** attachments
array of attachments
Definition: vlc_demux.h:66
DEMUX_NAV_MENU
@ DEMUX_NAV_MENU
Activate disc Root Menu.
Definition: vlc_demux.h:273
STREAM_GET_SEEKPOINT
@ STREAM_GET_SEEKPOINT
arg1=unsigned * res=can fail
Definition: vlc_stream.h:158
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
DEMUX_GET_FPS
@ DEMUX_GET_FPS
Definition: vlc_demux.h:222
vlc_stream.h
DEMUX_GET_PTS_DELAY
@ DEMUX_GET_PTS_DELAY
Retrieves the PTS delay (roughly the default buffer duration).
Definition: vlc_demux.h:112
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
name
const char name[16]
Definition: httpd.c:1268
vlc_demux_chained_t
Definition: demux_chained.c:35
DEMUX_CAN_CONTROL_PACE
@ DEMUX_CAN_CONTROL_PACE
Whether the stream can be read at an arbitrary pace.
Definition: vlc_demux.h:105
DEMUX_FILTER_ENABLE
@ DEMUX_FILTER_ENABLE
Enable/Disable a demux filter.
Definition: vlc_demux.h:279
DEMUX_GET_TITLE
@ DEMUX_GET_TITLE
Read the title number currently playing.
Definition: vlc_demux.h:173
DEMUX_GET_POSITION
@ DEMUX_GET_POSITION
Definition: vlc_demux.h:184
demux_IsContentType
static bool demux_IsContentType(demux_t *demux, const char *type)
Definition: vlc_demux.h:358
demux_SetPosition
static int demux_SetPosition(demux_t *p_demux, double pos, bool precise, bool absolute)
Definition: vlc_demux.h:371
vlc_demux_chained_Control
static int vlc_demux_chained_Control(vlc_demux_chained_t *dc, int query,...)
Definition: vlc_demux.h:492
DEMUX_SET_RECORD_STATE
@ DEMUX_SET_RECORD_STATE
Definition: vlc_demux.h:247
vlc_stream_Delete
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:133
demux_meta_t::i_attachments
int i_attachments
number of attachments
Definition: vlc_demux.h:65
vlc_demux_chained_Delete
VLC_EXPORT void vlc_demux_chained_Delete(vlc_demux_chained_t *)
Destroys a chained demuxer.
Definition: demux_chained.c:163
stream_IsMimeType
static bool stream_IsMimeType(stream_t *s, const char *type)
Checks for a MIME type.
Definition: vlc_stream.h:391
demux_Demux
VLC_EXPORT int demux_Demux(demux_t *p_demux)
Definition: demux.c:202
demux_meta_t
Definition: vlc_demux.h:58
INPUT_UPDATE_SEEKPOINT
#define INPUT_UPDATE_SEEKPOINT
Definition: vlc_demux.h:50
stream_t::psz_filepath
char * psz_filepath
Local file path (if applicable)
Definition: vlc_stream.h:53
demux_meta_t::p_meta
vlc_meta_t * p_meta
meta data
Definition: vlc_demux.h:63
DEMUX_NAV_RIGHT
@ DEMUX_NAV_RIGHT
Use the right arrow to select a navigation item on the right.
Definition: vlc_demux.h:269
DEMUX_CAN_CONTROL_RATE
@ DEMUX_CAN_CONTROL_RATE
Definition: vlc_demux.h:254
DEMUX_GET_ATTACHMENTS
@ DEMUX_GET_ATTACHMENTS
Definition: vlc_demux.h:232
vlc_demux_chained_ControlVa
VLC_EXPORT int vlc_demux_chained_ControlVa(vlc_demux_chained_t *, int query, va_list args)
Controls a chained demuxer.
Definition: demux_chained.c:138
demux_vaControlHelper
VLC_EXPORT int demux_vaControlHelper(stream_t *, int64_t i_start, int64_t i_end, int64_t i_bitrate, int i_align, int i_query, va_list args)
Definition: demux.c:237
demux_Delete
static void demux_Delete(demux_t *demux)
Definition: vlc_demux.h:290
demux_IsPathExtension
static bool demux_IsPathExtension(demux_t *p_demux, const char *psz_extension)
Definition: vlc_demux.h:347
demux_query_e
demux_query_e
Control query identifiers for use with demux_t.pf_control.
Definition: vlc_demux.h:84
block_t
Definition: vlc_block.h:117
demux_SetTime
static int demux_SetTime(demux_t *p_demux, vlc_tick_t time, bool precise, bool absolute)
Definition: vlc_demux.h:390
vlc_demux_chained_New
VLC_EXPORT vlc_demux_chained_t * vlc_demux_chained_New(vlc_object_t *parent, const char *name, es_out_t *out)
Creates a chained demuxer.
Definition: demux_chained.c:100
vlc_demux_chained_t::out
es_out_t * out
Definition: demux_chained.c:71
demux_meta_t
struct demux_meta_t demux_meta_t
DEMUX_TEST_AND_CLEAR_FLAGS
@ DEMUX_TEST_AND_CLEAR_FLAGS
Check which INPUT_UPDATE_XXX flag is set and reset the ones set.
Definition: vlc_demux.h:166