VLC 4.0.0-dev
Loading...
Searching...
No Matches
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
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
53/* Demux module descriptor helpers */
54#define add_file_extension(ext) add_shortcut("ext-" ext)
56/* demux_meta_t is returned by "meta reader" module to the demuxer */
57typedef struct demux_meta_t
59 struct vlc_object_t obj;
60 input_item_t *p_item; /***< the input item that is being read */
62 vlc_meta_t *p_meta; /**< meta data */
64 int i_attachments; /**< number of attachments */
65 input_attachment_t **attachments; /**< array of attachments */
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 */
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 * */
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,
100 /** Whether the stream can be read at an arbitrary pace.
101 * Cannot fail.
102 *
103 * arg1= bool * */
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,
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,
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,
125 /** Retrieves the demuxed content type
126 * Can fail if the control is not implemented
127 *
128 * arg1= int* */
129 DEMUX_GET_TYPE = 0x109,
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,
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 */
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 */
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 */
167 /** Read the title number currently playing
168 *
169 * Can fail.
170 *
171 * arg1= int * */
172 DEMUX_GET_TITLE, /* arg1= int* can fail */
174 /* Read the seekpoint/chapter currently playing
175 *
176 * Can fail.
177 *
178 * arg1= int * */
179 DEMUX_GET_SEEKPOINT, /* arg1= int* can fail */
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 */
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 */
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) */
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 */
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 */
223 /* Meta data */
224 DEMUX_HAS_UNSUPPORTED_META, /* arg1= bool * res can fail */
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 */
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 arg2= string */
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 */
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 */
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};
282/*************************************************************************
283 * Main Demux
284 *************************************************************************/
285
286VLC_API demux_t *demux_New( vlc_object_t *p_obj, const char *module_name,
287 const char *url, stream_t *s, es_out_t *out );
288
289static inline void demux_Delete(demux_t *demux)
291 vlc_stream_Delete(demux);
292}
293
294VLC_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
297VLC_API int demux_Demux( demux_t *p_demux ) VLC_USED;
298VLC_API int demux_vaControl( demux_t *p_demux, int i_query, va_list args );
299
300static inline int demux_Control( demux_t *p_demux, int i_query, ... )
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
315VLC_USED static inline bool vlc_demux_CanSeek(demux_t *demux)
317 bool can_seek = false;
318 demux_Control(demux, DEMUX_CAN_SEEK, &can_seek);
319 return can_seek;
320}
321
322VLC_USED static inline bool vlc_demux_CanPause(demux_t *demux)
324 bool can_pause = false;
325 demux_Control(demux, DEMUX_CAN_PAUSE, &can_pause);
326 return can_pause;
327}
328
329VLC_USED static inline bool vlc_demux_CanPace(demux_t *demux)
331 bool can_control_pace = false;
332 demux_Control(demux, DEMUX_CAN_CONTROL_PACE, &can_control_pace);
333 return can_control_pace;
334}
335
336VLC_USED static inline bool vlc_demux_CanRate(demux_t *demux)
338 bool can_control_rate = false;
339 demux_Control(demux, DEMUX_CAN_CONTROL_RATE, &can_control_rate);
340 return can_control_rate;
341}
342
343VLC_USED static inline bool vlc_demux_CanRecord(demux_t *demux)
345 bool can_record = false;
346 demux_Control(demux, DEMUX_CAN_RECORD, &can_record);
347 return can_record;
348}
349
350VLC_USED static inline bool vlc_demux_HasUnsupportedMeta(demux_t *demux)
352 bool has_unsupported_meta = false;
353 demux_Control(demux, DEMUX_HAS_UNSUPPORTED_META, &has_unsupported_meta);
354 return has_unsupported_meta;
355}
356
357VLC_USED static inline int vlc_demux_GetPtsDelay(demux_t *demux, vlc_tick_t *pts_delay)
359 return demux_Control(demux, DEMUX_GET_PTS_DELAY, pts_delay);
360}
361
362VLC_USED static inline int vlc_demux_GetSeekpoint(demux_t *demux, int *seekpoint)
364 return demux_Control(demux, DEMUX_GET_SEEKPOINT, seekpoint);
365}
366
367VLC_USED static inline int vlc_demux_GetSignal(demux_t *demux, double *quality, double *strength)
369 return demux_Control(demux, DEMUX_GET_SIGNAL, quality, strength);
370}
371
372VLC_USED static inline int vlc_demux_GetTitle(demux_t *demux, int *title)
374 return demux_Control(demux, DEMUX_GET_TITLE, title);
375}
376
377VLC_USED static inline int vlc_demux_GetMeta(demux_t *demux, vlc_meta_t *meta)
379 return demux_Control(demux, DEMUX_GET_META, meta);
380}
381
382VLC_USED static inline int vlc_demux_GetType(demux_t *demux, int *type)
384 return demux_Control(demux, DEMUX_GET_TYPE, type);
385}
386
387VLC_USED static inline int vlc_demux_GetTitleInfo(demux_t *demux, input_title_t ***title_info, int *size, int *pi_title_offset, int *pi_seekpoint_offset)
389 return demux_Control(demux, DEMUX_GET_TITLE_INFO, title_info, size, pi_title_offset, pi_seekpoint_offset);
390}
391
392VLC_USED static inline int vlc_demux_GetPosition(demux_t *demux, double *position)
394 return demux_Control(demux, DEMUX_GET_POSITION, position);
395}
396
397VLC_USED static inline int vlc_demux_GetLength(demux_t *demux, vlc_tick_t *length)
399 return demux_Control(demux, DEMUX_GET_LENGTH, length);
400}
401
402VLC_USED static inline int vlc_demux_GetTime(demux_t *demux, vlc_tick_t *time)
404 return demux_Control(demux, DEMUX_GET_TIME, time);
405}
406
407VLC_USED static inline int vlc_demux_GetNormalTime(demux_t *demux, vlc_tick_t *normal_time)
409 return demux_Control(demux, DEMUX_GET_NORMAL_TIME, normal_time);
410}
411
412VLC_USED static inline int vlc_demux_GetFPS(demux_t *demux, double *fps)
414 return demux_Control(demux, DEMUX_GET_FPS, fps);
415}
416
417VLC_USED static inline int vlc_demux_GetAttachments(demux_t *demux, input_attachment_t ***attachments)
419 return demux_Control(demux, DEMUX_GET_ATTACHMENTS, attachments);
420}
421
422VLC_USED static inline int vlc_demux_SetPauseState(demux_t *demux, bool pause_state)
424 return demux_Control(demux, DEMUX_SET_PAUSE_STATE, pause_state);
425}
426
427VLC_USED static inline int vlc_demux_SetSeekPoint(demux_t *demux, int seekpoint)
429 return demux_Control(demux, DEMUX_SET_SEEKPOINT, seekpoint);
430}
431
432VLC_USED static inline int vlc_demux_SetTitle(demux_t *demux, int title)
434 return demux_Control(demux, DEMUX_SET_TITLE, title);
435}
436
437VLC_USED static inline int vlc_demux_SetRate(demux_t *demux, float rate)
439 return demux_Control(demux, DEMUX_SET_RATE, rate);
440}
441
442VLC_USED static inline int vlc_demux_SetRecordState(demux_t *demux, bool record_state, const char *dir_path, const char *ext)
444 return demux_Control(demux, DEMUX_SET_RECORD_STATE, record_state, dir_path, ext);
445}
446
447VLC_USED static inline int vlc_demux_NavActivate(demux_t *demux)
449 return demux_Control(demux, DEMUX_NAV_ACTIVATE);
450}
451
452VLC_USED static inline int vlc_demux_NavUp(demux_t *demux)
454 return demux_Control(demux, DEMUX_NAV_UP);
455}
456
457VLC_USED static inline int vlc_demux_NavDown(demux_t *demux)
459 return demux_Control(demux, DEMUX_NAV_DOWN);
460}
461
462VLC_USED static inline int vlc_demux_NavLeft(demux_t *demux)
464 return demux_Control(demux, DEMUX_NAV_LEFT);
465}
466
467VLC_USED static inline int vlc_demux_NavRight(demux_t *demux)
469 return demux_Control(demux, DEMUX_NAV_RIGHT);
470}
471
472VLC_USED static inline int vlc_demux_NavPopup(demux_t *demux)
474 return demux_Control(demux, DEMUX_NAV_POPUP);
475}
476
477VLC_USED static inline int vlc_demux_NavMenu(demux_t *demux)
479 return demux_Control(demux, DEMUX_NAV_MENU);
480}
481
482VLC_USED static inline int vlc_demux_FilterEnable(demux_t *demux)
484 return demux_Control(demux, DEMUX_FILTER_ENABLE);
485}
486
487VLC_USED static inline int vlc_demux_FilterDisable(demux_t *demux)
489 return demux_Control(demux, DEMUX_FILTER_DISABLE);
490}
491
492#ifndef __cplusplus
493static inline void demux_UpdateTitleFromStream( demux_t *demux,
494 int *restrict titlep, int *restrict seekpointp,
495 unsigned *restrict updatep )
496{
497 stream_t *s = demux->s;
498 unsigned title, seekpoint;
499
501 && title != (unsigned)*titlep )
502 {
503 *titlep = title;
504 *updatep |= INPUT_UPDATE_TITLE;
505 }
506
508 &seekpoint ) == VLC_SUCCESS
509 && seekpoint != (unsigned)*seekpointp )
510 {
511 *seekpointp = seekpoint;
512 *updatep |= INPUT_UPDATE_SEEKPOINT;
513 }
514}
515# define demux_UpdateTitleFromStream(demux) \
516 demux_UpdateTitleFromStream(demux, \
517 &((demux_sys_t *)((demux)->p_sys))->current_title, \
518 &((demux_sys_t *)((demux)->p_sys))->current_seekpoint, \
519 &((demux_sys_t *)((demux)->p_sys))->updates)
520#endif
521
523static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension )
525 const char *name = (p_demux->psz_filepath != NULL) ? p_demux->psz_filepath
526 : p_demux->psz_location;
527 const char *psz_ext = strrchr ( name, '.' );
528 if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
529 return false;
530 return true;
531}
532
534static inline bool demux_IsContentType(demux_t *demux, const char *type)
536 return stream_IsMimeType(demux->s, type);
537}
538
540static inline bool demux_IsForced( demux_t *p_demux, const char *psz_name )
542 if( p_demux->psz_name == NULL || strcmp( p_demux->psz_name, psz_name ) )
543 return false;
544 return true;
545}
546
547static inline int demux_SetPosition( demux_t *p_demux, double pos, bool precise )
549 if( pos < 0.f )
550 pos = 0.f;
551 else if( pos > 1.f )
552 pos = 1.f;
553 return demux_Control( p_demux, DEMUX_SET_POSITION, pos, precise );
554}
555
556static inline int demux_SetTime( demux_t *p_demux, vlc_tick_t time, bool precise )
558 if( time < 0 )
559 time = 0;
560 return demux_Control( p_demux, DEMUX_SET_TIME, time, precise );
561}
562
563/**
564 * This function will create a packetizer suitable for a demuxer that parses
565 * elementary stream.
566 *
567 * The provided es_format_t will be cleaned on error or by
568 * demux_PacketizerDestroy.
569 */
570VLC_API decoder_t * demux_PacketizerNew( vlc_object_t *p_demux, es_format_t *p_fmt, const char *psz_msg ) VLC_USED;
571
572/**
573 * This function will destroy a packetizer create by demux_PacketizerNew.
574 */
575VLC_API void demux_PacketizerDestroy( decoder_t *p_packetizer );
576
577/* */
578#define DEMUX_INIT_COMMON() do { \
579 p_demux->pf_read = NULL; \
580 p_demux->pf_block = NULL; \
581 p_demux->pf_seek = NULL; \
582 p_demux->pf_control = Control; \
583 p_demux->pf_demux = Demux; \
584 p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \
585 if( !p_demux->p_sys ) return VLC_ENOMEM;\
586 } while(0)
587
588/**
589 * \defgroup chained_demux Chained demultiplexer
590 * Demultiplexers wrapped by another demultiplexer
591 * @{
592 */
593
596/**
597 * Creates a chained demuxer.
598 *
599 * This creates a thread running a demuxer whose input stream is generated
600 * directly by the caller. This typically handles some sort of stream within a
601 * stream, e.g. MPEG-TS within something else.
602 *
603 * \note There are a number of limitations to this approach. The chained
604 * demuxer is run asynchronously in a separate thread. Most demuxer controls
605 * are synchronous and therefore unavailable in this case. Also the input
606 * stream is a simple FIFO, so the chained demuxer cannot perform seeks.
607 * Lastly, most errors cannot be detected.
608 *
609 * \param parent parent VLC object
610 * \param name chained demux module name (e.g. "ts")
611 * \param out elementary stream output for the chained demux
612 * \return a non-NULL pointer on success, NULL on failure.
613 */
615 const char *name,
616 es_out_t *out);
617
618/**
619 * Destroys a chained demuxer.
620 *
621 * Sends an end-of-stream to the chained demuxer, and releases all underlying
622 * allocated resources.
623 */
625
626/**
627 * Sends data to a chained demuxer.
628 *
629 * This queues data for a chained demuxer to consume.
630 *
631 * \param demux the chained demuxer instance to send the block to
632 * \param block data block to queue
633 */
635
636/**
637 * Controls a chained demuxer.
638 *
639 * This performs a <b>demux</b> (i.e. DEMUX_...) control request on a chained
640 * demux.
641 *
642 * \note In most cases, vlc_demux_chained_Control() should be used instead.
643 * \warning As per vlc_demux_chained_New(), most demux controls are not, and
644 * cannot be, supported; VLC_EGENERIC is returned.
645 *
646 * \param demux the chained demuxer instance to send the request to
647 * \param query demux control (see \ref demux_query_e)
648 * \param args variable arguments (depending on the query)
649 */
651 int query, va_list args);
652
653static inline int vlc_demux_chained_Control(vlc_demux_chained_t *dc, int query,
654 ...)
655{
656 va_list ap;
657 int ret;
658
659 va_start(ap, query);
660 ret = vlc_demux_chained_ControlVa(dc, query, ap);
661 va_end(ap);
662 return ret;
663}
664
665/**
666 * @}
667 */
668
669/**
670 * @}
671 */
672
673#endif
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
static int vlc_demux_chained_Control(vlc_demux_chained_t *dc, int query,...)
Definition vlc_demux.h:654
void vlc_demux_chained_Delete(vlc_demux_chained_t *)
Destroys a chained demuxer.
Definition demux_chained.c:164
int vlc_demux_chained_ControlVa(vlc_demux_chained_t *demux, int query, va_list args)
Controls a chained demuxer.
Definition demux_chained.c:139
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:102
void vlc_demux_chained_Send(vlc_demux_chained_t *demux, block_t *block)
Sends data to a chained demuxer.
Definition demux_chained.c:134
static int vlc_demux_GetAttachments(demux_t *demux, input_attachment_t ***attachments)
Definition vlc_demux.h:418
demux_t * demux_New(vlc_object_t *p_obj, const char *module_name, const char *url, stream_t *s, es_out_t *out)
Definition demux.c:73
static int vlc_demux_SetTitle(demux_t *demux, int title)
Definition vlc_demux.h:433
static int vlc_demux_NavDown(demux_t *demux)
Definition vlc_demux.h:458
static int demux_SetTime(demux_t *p_demux, vlc_tick_t time, bool precise)
Definition vlc_demux.h:557
static int vlc_demux_NavUp(demux_t *demux)
Definition vlc_demux.h:453
static int vlc_demux_GetPtsDelay(demux_t *demux, vlc_tick_t *pts_delay)
Definition vlc_demux.h:358
static bool demux_IsForced(demux_t *p_demux, const char *psz_name)
Definition vlc_demux.h:541
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:542
static int vlc_demux_GetTitleInfo(demux_t *demux, input_title_t ***title_info, int *size, int *pi_title_offset, int *pi_seekpoint_offset)
Definition vlc_demux.h:388
#define demux_UpdateTitleFromStream(demux)
Definition vlc_demux.h:516
static int vlc_demux_GetType(demux_t *demux, int *type)
Definition vlc_demux.h:383
static int vlc_demux_NavRight(demux_t *demux)
Definition vlc_demux.h:468
#define INPUT_UPDATE_SEEKPOINT
Definition vlc_demux.h:50
#define INPUT_UPDATE_TITLE
Definition vlc_demux.h:49
static int demux_SetPosition(demux_t *p_demux, double pos, bool precise)
Definition vlc_demux.h:548
static int vlc_demux_GetSeekpoint(demux_t *demux, int *seekpoint)
Definition vlc_demux.h:363
static int vlc_demux_GetPosition(demux_t *demux, double *position)
Definition vlc_demux.h:393
static int vlc_demux_SetPauseState(demux_t *demux, bool pause_state)
Definition vlc_demux.h:423
static bool vlc_demux_CanPace(demux_t *demux)
Definition vlc_demux.h:330
static int vlc_demux_GetNormalTime(demux_t *demux, vlc_tick_t *normal_time)
Definition vlc_demux.h:408
decoder_t * demux_PacketizerNew(vlc_object_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:684
demux_query_e
Control query identifiers for use with demux_t.pf_control.
Definition vlc_demux.h:85
static int vlc_demux_GetTitle(demux_t *demux, int *title)
Definition vlc_demux.h:373
static bool vlc_demux_CanSeek(demux_t *demux)
Definition vlc_demux.h:316
static int vlc_demux_GetFPS(demux_t *demux, double *fps)
Definition vlc_demux.h:413
void demux_PacketizerDestroy(decoder_t *p_packetizer)
This function will destroy a packetizer create by demux_PacketizerNew.
Definition demux.c:715
static int vlc_demux_SetSeekPoint(demux_t *demux, int seekpoint)
Definition vlc_demux.h:428
static int vlc_demux_FilterDisable(demux_t *demux)
Definition vlc_demux.h:488
static int vlc_demux_NavActivate(demux_t *demux)
Definition vlc_demux.h:448
static bool vlc_demux_CanPause(demux_t *demux)
Definition vlc_demux.h:323
static int vlc_demux_SetRecordState(demux_t *demux, bool record_state, const char *dir_path, const char *ext)
Definition vlc_demux.h:443
static int demux_Control(demux_t *p_demux, int i_query,...)
Definition vlc_demux.h:301
static int vlc_demux_GetMeta(demux_t *demux, vlc_meta_t *meta)
Definition vlc_demux.h:378
static int vlc_demux_FilterEnable(demux_t *demux)
Definition vlc_demux.h:483
static int vlc_demux_NavMenu(demux_t *demux)
Definition vlc_demux.h:478
static bool demux_IsContentType(demux_t *demux, const char *type)
Definition vlc_demux.h:535
static void demux_Delete(demux_t *demux)
Definition vlc_demux.h:290
static int vlc_demux_GetLength(demux_t *demux, vlc_tick_t *length)
Definition vlc_demux.h:398
static bool vlc_demux_CanRecord(demux_t *demux)
Definition vlc_demux.h:344
static int vlc_demux_SetRate(demux_t *demux, float rate)
Definition vlc_demux.h:438
static int vlc_demux_GetTime(demux_t *demux, vlc_tick_t *time)
Definition vlc_demux.h:403
int demux_Demux(demux_t *p_demux)
Definition demux.c:220
static bool vlc_demux_HasUnsupportedMeta(demux_t *demux)
Definition vlc_demux.h:351
static bool vlc_demux_CanRate(demux_t *demux)
Definition vlc_demux.h:337
static int vlc_demux_NavPopup(demux_t *demux)
Definition vlc_demux.h:473
static bool demux_IsPathExtension(demux_t *p_demux, const char *psz_extension)
Definition vlc_demux.h:524
static int vlc_demux_NavLeft(demux_t *demux)
Definition vlc_demux.h:463
int demux_vaControl(demux_t *p_demux, int i_query, va_list args)
Definition demux.c:247
static int vlc_demux_GetSignal(demux_t *demux, double *quality, double *strength)
Definition vlc_demux.h:368
@ DEMUX_GET_SIGNAL
Retrieves an estimate of signal quality and strength.
Definition vlc_demux.h:124
@ DEMUX_TEST_AND_CLEAR_FLAGS
Check which INPUT_UPDATE_XXX flag is set and reset the ones set.
Definition vlc_demux.h:166
@ DEMUX_GET_TIME
Definition vlc_demux.h:189
@ DEMUX_GET_TYPE
Retrieves the demuxed content type Can fail if the control is not implemented.
Definition vlc_demux.h:130
@ DEMUX_GET_ATTACHMENTS
Definition vlc_demux.h:232
@ DEMUX_GET_PTS_DELAY
Retrieves the PTS delay (roughly the default buffer duration).
Definition vlc_demux.h:112
@ DEMUX_NAV_LEFT
Use the left arrow to select a navigation item on the left.
Definition vlc_demux.h:267
@ DEMUX_NAV_MENU
Activate disc Root Menu.
Definition vlc_demux.h:273
@ DEMUX_CAN_CONTROL_PACE
Whether the stream can be read at an arbitrary pace.
Definition vlc_demux.h:105
@ DEMUX_GET_POSITION
Definition vlc_demux.h:184
@ DEMUX_SET_TITLE
Seeks to the beginning of a title.
Definition vlc_demux.h:150
@ DEMUX_SET_RECORD_STATE
Definition vlc_demux.h:247
@ DEMUX_NAV_ACTIVATE
Activate the navigation item selected.
Definition vlc_demux.h:261
@ DEMUX_SET_ES
Definition vlc_demux.h:212
@ DEMUX_SET_TIME
Definition vlc_demux.h:190
@ DEMUX_NAV_DOWN
Use the down arrow to select a navigation item under.
Definition vlc_demux.h:265
@ DEMUX_SET_SEEKPOINT
Seeks to the beginning of a chapter of the current title.
Definition vlc_demux.h:158
@ DEMUX_SET_GROUP_LIST
Definition vlc_demux.h:211
@ DEMUX_SET_PAUSE_STATE
Sets the paused or playing/resumed state.
Definition vlc_demux.h:142
@ DEMUX_CAN_PAUSE
Checks whether (long) pause then stream resumption is supported.
Definition vlc_demux.h:99
@ DEMUX_CAN_RECORD
Definition vlc_demux.h:237
@ DEMUX_HAS_UNSUPPORTED_META
Definition vlc_demux.h:225
@ DEMUX_SET_GROUP_ALL
Definition vlc_demux.h:210
@ DEMUX_GET_NORMAL_TIME
Definition vlc_demux.h:192
@ DEMUX_SET_GROUP_DEFAULT
Definition vlc_demux.h:209
@ DEMUX_GET_TITLE
Read the title number currently playing.
Definition vlc_demux.h:173
@ DEMUX_NAV_UP
Use the up arrow to select a navigation item above.
Definition vlc_demux.h:263
@ DEMUX_GET_FPS
Definition vlc_demux.h:222
@ DEMUX_GET_LENGTH
Definition vlc_demux.h:188
@ DEMUX_SET_ES_LIST
Definition vlc_demux.h:213
@ DEMUX_NAV_POPUP
Activate the popup Menu (for BD).
Definition vlc_demux.h:271
@ DEMUX_SET_POSITION
Definition vlc_demux.h:185
@ DEMUX_SET_RATE
Definition vlc_demux.h:257
@ DEMUX_CAN_CONTROL_RATE
Definition vlc_demux.h:254
@ DEMUX_CAN_SEEK
Checks whether the stream supports seeking.
Definition vlc_demux.h:91
@ DEMUX_FILTER_DISABLE
Definition vlc_demux.h:280
@ DEMUX_SET_NEXT_DEMUX_TIME
Definition vlc_demux.h:220
@ DEMUX_GET_SEEKPOINT
Definition vlc_demux.h:180
@ DEMUX_GET_TITLE_INFO
Definition vlc_demux.h:203
@ DEMUX_GET_META
Retrieves stream meta-data.
Definition vlc_demux.h:118
@ DEMUX_FILTER_ENABLE
Enable/Disable a demux filter.
Definition vlc_demux.h:279
@ DEMUX_NAV_RIGHT
Use the right arrow to select a navigation item on the right.
Definition vlc_demux.h:269
#define VLC_SUCCESS
No error.
Definition vlc_common.h:478
static bool stream_IsMimeType(stream_t *s, const char *type)
Checks for a MIME type.
Definition vlc_stream.h:627
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition stream.c:143
static int vlc_stream_Control(stream_t *s, int query,...)
Definition vlc_stream.h:410
@ STREAM_GET_TITLE
arg1=(unsigned *) res=can fail
Definition vlc_stream.h:267
@ STREAM_GET_SEEKPOINT
arg1=(unsigned *) res=can fail
Definition vlc_stream.h:268
const char name[16]
Definition httpd.c:1298
const char psz_ext[7]
Definition image.c:569
Definition vlc_codec.h:102
Definition vlc_demux.h:59
int i_attachments
number of attachments
Definition vlc_demux.h:65
vlc_meta_t * p_meta
meta data
Definition vlc_demux.h:63
input_attachment_t ** attachments
array of attachments
Definition vlc_demux.h:66
input_item_t * p_item
Definition vlc_demux.h:61
struct vlc_object_t obj
Definition vlc_demux.h:60
Definition vlc_es.h:633
Definition vlc_es_out.h:142
Definition vlc_input.h:169
Describes an input and is used to spawn input_thread_t objects.
Definition vlc_input_item.h:98
Definition vlc_input.h:103
stream_t definition
Definition vlc_stream.h:135
char * psz_name
Definition vlc_stream.h:138
stream_t * s
Input stream.
Definition vlc_stream.h:153
const char * psz_location
Location (URL with the scheme stripped)
Definition vlc_stream.h:140
char * psz_filepath
Local file path (if applicable)
Definition vlc_stream.h:141
Definition demux_chained.c:36
es_out_t * out
Definition demux_chained.c:50
Definition vlc_frame.h:123
Definition meta.c:40
VLC object common members.
Definition vlc_objects.h:53
const char * psz_name
Definition text_style.c:33
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
Elementary streams output interface.
int strcasecmp(const char *, const char *)
Byte streams and byte stream filter modules interface.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48