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 /**
189 * Get time and live state
190 *
191 * Set arg2 to true if the stream is live. In that case DEMUX_GET_LENGTH
192 * will represent a seek range, and DEMUX_GET_POSITION the position within
193 * that seek range.
194 * arg1= vlc_tick_t *, arg2 bool * res= */
196 DEMUX_SET_TIME, /* arg1= vlc_tick_t arg2= bool b_precise res=can fail */
197 /* Normal or original time, used mainly by the ts module */
198 DEMUX_GET_NORMAL_TIME, /* arg1= vlc_tick_t * res= can fail, in that case VLC_TICK_0 will be used as NORMAL_TIME */
200 /**
201 * \todo Document
202 *
203 * \warning The prototype is different from STREAM_GET_TITLE_INFO
204 *
205 * Can fail, meaning there is only one title and one chapter.
206 *
207 * arg1= input_title_t ***, arg2=int *, arg3=int *pi_title_offset(0),
208 * arg4= int *pi_seekpoint_offset(0) */
211 /* DEMUX_SET_GROUP_* / DEMUX_SET_ES is only a hint for demuxer (mainly DVB)
212 * to avoid parsing everything (you should not use this to call
213 * es_out_Control()).
214 * If you don't know what to do with it, just IGNORE it: it is safe(r). */
217 DEMUX_SET_GROUP_LIST, /* arg1= size_t, arg2= const int *, can fail */
218 DEMUX_SET_ES, /* arg1= int can fail */
219 DEMUX_SET_ES_LIST, /* arg1= size_t, arg2= const int * (can be NULL) can fail */
221 /* Ask the demux to demux until the given date at the next pf_demux call
222 * but not more (and not less, at the precision available of course).
223 * XXX: not mandatory (except for subtitle demux) but will help a lot
224 * for multi-input
225 */
226 DEMUX_SET_NEXT_DEMUX_TIME, /* arg1= vlc_tick_t can fail */
227 /* FPS for correct subtitles handling */
228 DEMUX_GET_FPS, /* arg1= double * res=can fail */
230 /* Meta data */
231 DEMUX_HAS_UNSUPPORTED_META, /* arg1= bool * res can fail */
233 /*
234 * Fetches attachment from the demux.
235 * The returned attachments are owned by the demuxer and must not be modified
236 * arg1=input_attachment_t***, int* res=can fail
237 */
240 /* RECORD you are ensured that it is never called twice with the same state
241 * you should accept it only if the stream can be recorded without
242 * any modification or header addition. */
243 DEMUX_CAN_RECORD, /* arg1=bool* res=can fail(assume false) */
244 /**
245 * \todo Document
246 *
247 * \warning The prototype is different from STREAM_SET_RECORD_STATE
248 *
249 * The control is never used if DEMUX_CAN_RECORD fails or returns false.
250 * Can fail.
251 *
252 * arg1= bool arg2= string */
255 /* II. Specific access_demux queries */
256
257 /* DEMUX_CAN_CONTROL_RATE is called only if DEMUX_CAN_CONTROL_PACE has
258 * returned false. *pb_rate should be true when the rate can be changed
259 * (using DEMUX_SET_RATE). */
260 DEMUX_CAN_CONTROL_RATE, /* arg1= bool*pb_rate */
261 /* DEMUX_SET_RATE is called only if DEMUX_CAN_CONTROL_RATE has returned true.
262 * It should return the value really used in *p_rate */
263 DEMUX_SET_RATE, /* arg1= float*p_rate res=can fail */
265 /* Menu (VCD/DVD/BD) Navigation */
266 /** Activate the navigation item selected. Can fail */
268 /** Use the up arrow to select a navigation item above. Can fail */
270 /** Use the down arrow to select a navigation item under. Can fail */
272 /** Use the left arrow to select a navigation item on the left. Can fail */
274 /** Use the right arrow to select a navigation item on the right. Can fail */
276 /** Activate the popup Menu (for BD). Can fail */
278 /** Activate disc Root Menu. Can fail */
279 DEMUX_NAV_MENU, /* res=can fail */
280 /** Enable/Disable a demux filter
281 * \warning This has limited support, and is likely to break if more than
282 * a single demux_filter is present in the chain. This is not guaranteed to
283 * work in future VLC versions, nor with all demux filters
284 */
287};
289/*************************************************************************
290 * Main Demux
291 *************************************************************************/
292
293VLC_API demux_t *demux_New( vlc_object_t *p_obj, const char *module_name,
294 const char *url, stream_t *s, es_out_t *out );
295
296static inline void demux_Delete(demux_t *demux)
298 vlc_stream_Delete(demux);
299}
300
301VLC_API int demux_vaControlHelper( stream_t *, int64_t i_start, int64_t i_end,
302 int64_t i_bitrate, int i_align, int i_query, va_list args );
303
304VLC_API int demux_Demux( demux_t *p_demux ) VLC_USED;
305VLC_API int demux_vaControl( demux_t *p_demux, int i_query, va_list args );
306
307static inline int demux_Control( demux_t *p_demux, int i_query, ... )
309 va_list args;
310 int i_result;
311
312 va_start( args, i_query );
313 i_result = demux_vaControl( p_demux, i_query, args );
314 va_end( args );
315 return i_result;
316}
317
318/*************************************************************************
319 * Miscellaneous helpers for demuxers
320 *************************************************************************/
321
322VLC_USED static inline bool vlc_demux_CanSeek(demux_t *demux)
324 bool can_seek = false;
325 demux_Control(demux, DEMUX_CAN_SEEK, &can_seek);
326 return can_seek;
327}
328
329VLC_USED static inline bool vlc_demux_CanPause(demux_t *demux)
331 bool can_pause = false;
332 demux_Control(demux, DEMUX_CAN_PAUSE, &can_pause);
333 return can_pause;
334}
335
336VLC_USED static inline bool vlc_demux_CanPace(demux_t *demux)
338 bool can_control_pace = false;
339 demux_Control(demux, DEMUX_CAN_CONTROL_PACE, &can_control_pace);
340 return can_control_pace;
341}
342
343VLC_USED static inline bool vlc_demux_CanRate(demux_t *demux)
345 bool can_control_rate = false;
346 demux_Control(demux, DEMUX_CAN_CONTROL_RATE, &can_control_rate);
347 return can_control_rate;
348}
349
350VLC_USED static inline bool vlc_demux_CanRecord(demux_t *demux)
352 bool can_record = false;
353 demux_Control(demux, DEMUX_CAN_RECORD, &can_record);
354 return can_record;
355}
356
357VLC_USED static inline bool vlc_demux_HasUnsupportedMeta(demux_t *demux)
359 bool has_unsupported_meta = false;
360 demux_Control(demux, DEMUX_HAS_UNSUPPORTED_META, &has_unsupported_meta);
361 return has_unsupported_meta;
362}
363
364VLC_USED static inline int vlc_demux_GetPtsDelay(demux_t *demux, vlc_tick_t *pts_delay)
366 return demux_Control(demux, DEMUX_GET_PTS_DELAY, pts_delay);
367}
368
369VLC_USED static inline int vlc_demux_GetSeekpoint(demux_t *demux, int *seekpoint)
371 return demux_Control(demux, DEMUX_GET_SEEKPOINT, seekpoint);
372}
373
374VLC_USED static inline int vlc_demux_GetSignal(demux_t *demux, double *quality, double *strength)
376 return demux_Control(demux, DEMUX_GET_SIGNAL, quality, strength);
377}
378
379VLC_USED static inline int vlc_demux_GetTitle(demux_t *demux, int *title)
381 return demux_Control(demux, DEMUX_GET_TITLE, title);
382}
383
384VLC_USED static inline int vlc_demux_GetMeta(demux_t *demux, vlc_meta_t *meta)
386 return demux_Control(demux, DEMUX_GET_META, meta);
387}
388
389VLC_USED static inline int vlc_demux_GetType(demux_t *demux, int *type)
391 return demux_Control(demux, DEMUX_GET_TYPE, type);
392}
393
394VLC_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)
396 return demux_Control(demux, DEMUX_GET_TITLE_INFO, title_info, size, pi_title_offset, pi_seekpoint_offset);
397}
398
399VLC_USED static inline int vlc_demux_GetPosition(demux_t *demux, double *position)
401 return demux_Control(demux, DEMUX_GET_POSITION, position);
402}
403
404VLC_USED static inline int vlc_demux_GetLength(demux_t *demux, vlc_tick_t *length)
406 return demux_Control(demux, DEMUX_GET_LENGTH, length);
407}
408
409VLC_USED static inline int vlc_demux_GetTime(demux_t *demux, vlc_tick_t *time)
411 return demux_Control(demux, DEMUX_GET_TIME, time);
412}
413
414VLC_USED static inline int vlc_demux_GetNormalTime(demux_t *demux, vlc_tick_t *normal_time)
416 return demux_Control(demux, DEMUX_GET_NORMAL_TIME, normal_time);
417}
418
419VLC_USED static inline int vlc_demux_GetFPS(demux_t *demux, double *fps)
421 return demux_Control(demux, DEMUX_GET_FPS, fps);
422}
423
424VLC_USED static inline int vlc_demux_GetAttachments(demux_t *demux, input_attachment_t ***attachments)
426 return demux_Control(demux, DEMUX_GET_ATTACHMENTS, attachments);
427}
428
429VLC_USED static inline int vlc_demux_SetPauseState(demux_t *demux, bool pause_state)
431 return demux_Control(demux, DEMUX_SET_PAUSE_STATE, pause_state);
432}
433
434VLC_USED static inline int vlc_demux_SetSeekPoint(demux_t *demux, int seekpoint)
436 return demux_Control(demux, DEMUX_SET_SEEKPOINT, seekpoint);
437}
438
439VLC_USED static inline int vlc_demux_SetTitle(demux_t *demux, int title)
441 return demux_Control(demux, DEMUX_SET_TITLE, title);
442}
443
444VLC_USED static inline int vlc_demux_SetRate(demux_t *demux, float rate)
446 return demux_Control(demux, DEMUX_SET_RATE, rate);
447}
448
449VLC_USED static inline int vlc_demux_SetRecordState(demux_t *demux, bool record_state, const char *dir_path, const char *ext)
451 return demux_Control(demux, DEMUX_SET_RECORD_STATE, record_state, dir_path, ext);
452}
453
454VLC_USED static inline int vlc_demux_NavActivate(demux_t *demux)
456 return demux_Control(demux, DEMUX_NAV_ACTIVATE);
457}
458
459VLC_USED static inline int vlc_demux_NavUp(demux_t *demux)
461 return demux_Control(demux, DEMUX_NAV_UP);
462}
463
464VLC_USED static inline int vlc_demux_NavDown(demux_t *demux)
466 return demux_Control(demux, DEMUX_NAV_DOWN);
467}
468
469VLC_USED static inline int vlc_demux_NavLeft(demux_t *demux)
471 return demux_Control(demux, DEMUX_NAV_LEFT);
472}
473
474VLC_USED static inline int vlc_demux_NavRight(demux_t *demux)
476 return demux_Control(demux, DEMUX_NAV_RIGHT);
477}
478
479VLC_USED static inline int vlc_demux_NavPopup(demux_t *demux)
481 return demux_Control(demux, DEMUX_NAV_POPUP);
482}
483
484VLC_USED static inline int vlc_demux_NavMenu(demux_t *demux)
486 return demux_Control(demux, DEMUX_NAV_MENU);
487}
488
489VLC_USED static inline int vlc_demux_FilterEnable(demux_t *demux)
491 return demux_Control(demux, DEMUX_FILTER_ENABLE);
492}
493
494VLC_USED static inline int vlc_demux_FilterDisable(demux_t *demux)
496 return demux_Control(demux, DEMUX_FILTER_DISABLE);
497}
498
499#ifndef __cplusplus
500static inline void demux_UpdateTitleFromStream( demux_t *demux,
501 int *restrict titlep, int *restrict seekpointp,
502 unsigned *restrict updatep )
503{
504 stream_t *s = demux->s;
505 unsigned title, seekpoint;
506
508 && title != (unsigned)*titlep )
509 {
510 *titlep = title;
511 *updatep |= INPUT_UPDATE_TITLE;
512 }
513
515 &seekpoint ) == VLC_SUCCESS
516 && seekpoint != (unsigned)*seekpointp )
517 {
518 *seekpointp = seekpoint;
519 *updatep |= INPUT_UPDATE_SEEKPOINT;
520 }
521}
522# define demux_UpdateTitleFromStream(demux) \
523 demux_UpdateTitleFromStream(demux, \
524 &((demux_sys_t *)((demux)->p_sys))->current_title, \
525 &((demux_sys_t *)((demux)->p_sys))->current_seekpoint, \
526 &((demux_sys_t *)((demux)->p_sys))->updates)
527#endif
528
530static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension )
532 const char *name = (p_demux->psz_filepath != NULL) ? p_demux->psz_filepath
533 : p_demux->psz_location;
534 const char *psz_ext = strrchr ( name, '.' );
535 if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
536 return false;
537 return true;
538}
539
541static inline bool demux_IsContentType(demux_t *demux, const char *type)
543 return stream_IsMimeType(demux->s, type);
544}
545
547static inline bool demux_IsForced( demux_t *p_demux, const char *psz_name )
549 if( p_demux->psz_name == NULL || strcmp( p_demux->psz_name, psz_name ) )
550 return false;
551 return true;
552}
553
554static inline int demux_SetPosition( demux_t *p_demux, double pos, bool precise )
556 if( pos < 0.f )
557 pos = 0.f;
558 else if( pos > 1.f )
559 pos = 1.f;
560 return demux_Control( p_demux, DEMUX_SET_POSITION, pos, precise );
561}
562
563static inline int demux_SetTime( demux_t *p_demux, vlc_tick_t time, bool precise )
565 if( time < 0 )
566 time = 0;
567 return demux_Control( p_demux, DEMUX_SET_TIME, time, precise );
568}
569
570/**
571 * This function will create a packetizer suitable for a demuxer that parses
572 * elementary stream.
573 *
574 * The provided es_format_t will be cleaned on error or by
575 * demux_PacketizerDestroy.
576 */
577VLC_API decoder_t * demux_PacketizerNew( vlc_object_t *p_demux, es_format_t *p_fmt, const char *psz_msg ) VLC_USED;
578
579/**
580 * This function will destroy a packetizer create by demux_PacketizerNew.
581 */
582VLC_API void demux_PacketizerDestroy( decoder_t *p_packetizer );
583
584/* */
585#define DEMUX_INIT_COMMON() do { \
586 p_demux->pf_read = NULL; \
587 p_demux->pf_block = NULL; \
588 p_demux->pf_seek = NULL; \
589 p_demux->pf_control = Control; \
590 p_demux->pf_demux = Demux; \
591 p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \
592 if( !p_demux->p_sys ) return VLC_ENOMEM;\
593 } while(0)
594
595/**
596 * \defgroup chained_demux Chained demultiplexer
597 * Demultiplexers wrapped by another demultiplexer
598 * @{
599 */
600
603/**
604 * Creates a chained demuxer.
605 *
606 * This creates a thread running a demuxer whose input stream is generated
607 * directly by the caller. This typically handles some sort of stream within a
608 * stream, e.g. MPEG-TS within something else.
609 *
610 * \note There are a number of limitations to this approach. The chained
611 * demuxer is run asynchronously in a separate thread. Most demuxer controls
612 * are synchronous and therefore unavailable in this case. Also the input
613 * stream is a simple FIFO, so the chained demuxer cannot perform seeks.
614 * Lastly, most errors cannot be detected.
615 *
616 * \param parent parent VLC object
617 * \param name chained demux module name (e.g. "ts")
618 * \param out elementary stream output for the chained demux
619 * \return a non-NULL pointer on success, NULL on failure.
620 */
622 const char *name,
623 es_out_t *out);
624
625/**
626 * Destroys a chained demuxer.
627 *
628 * Sends an end-of-stream to the chained demuxer, and releases all underlying
629 * allocated resources.
630 */
632
633/**
634 * Sends data to a chained demuxer.
635 *
636 * This queues data for a chained demuxer to consume.
637 *
638 * \param demux the chained demuxer instance to send the block to
639 * \param block data block to queue
640 */
642
643/**
644 * Controls a chained demuxer.
645 *
646 * This performs a <b>demux</b> (i.e. DEMUX_...) control request on a chained
647 * demux.
648 *
649 * \note In most cases, vlc_demux_chained_Control() should be used instead.
650 * \warning As per vlc_demux_chained_New(), most demux controls are not, and
651 * cannot be, supported; VLC_EGENERIC is returned.
652 *
653 * \param demux the chained demuxer instance to send the request to
654 * \param query demux control (see \ref demux_query_e)
655 * \param args variable arguments (depending on the query)
656 */
658 int query, va_list args);
659
660static inline int vlc_demux_chained_Control(vlc_demux_chained_t *dc, int query,
661 ...)
662{
663 va_list ap;
664 int ret;
665
666 va_start(ap, query);
667 ret = vlc_demux_chained_ControlVa(dc, query, ap);
668 va_end(ap);
669 return ret;
670}
671
672/**
673 * @}
674 */
675
676/**
677 * @}
678 */
679
680#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:661
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:425
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:440
static int vlc_demux_NavDown(demux_t *demux)
Definition vlc_demux.h:465
static int demux_SetTime(demux_t *p_demux, vlc_tick_t time, bool precise)
Definition vlc_demux.h:564
static int vlc_demux_NavUp(demux_t *demux)
Definition vlc_demux.h:460
static int vlc_demux_GetPtsDelay(demux_t *demux, vlc_tick_t *pts_delay)
Definition vlc_demux.h:365
static bool demux_IsForced(demux_t *p_demux, const char *psz_name)
Definition vlc_demux.h:548
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:395
#define demux_UpdateTitleFromStream(demux)
Definition vlc_demux.h:523
static int vlc_demux_GetType(demux_t *demux, int *type)
Definition vlc_demux.h:390
static int vlc_demux_NavRight(demux_t *demux)
Definition vlc_demux.h:475
#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:555
static int vlc_demux_GetSeekpoint(demux_t *demux, int *seekpoint)
Definition vlc_demux.h:370
static int vlc_demux_GetPosition(demux_t *demux, double *position)
Definition vlc_demux.h:400
static int vlc_demux_SetPauseState(demux_t *demux, bool pause_state)
Definition vlc_demux.h:430
static bool vlc_demux_CanPace(demux_t *demux)
Definition vlc_demux.h:337
static int vlc_demux_GetNormalTime(demux_t *demux, vlc_tick_t *normal_time)
Definition vlc_demux.h:415
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:380
static bool vlc_demux_CanSeek(demux_t *demux)
Definition vlc_demux.h:323
static int vlc_demux_GetFPS(demux_t *demux, double *fps)
Definition vlc_demux.h:420
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:435
static int vlc_demux_FilterDisable(demux_t *demux)
Definition vlc_demux.h:495
static int vlc_demux_NavActivate(demux_t *demux)
Definition vlc_demux.h:455
static bool vlc_demux_CanPause(demux_t *demux)
Definition vlc_demux.h:330
static int vlc_demux_SetRecordState(demux_t *demux, bool record_state, const char *dir_path, const char *ext)
Definition vlc_demux.h:450
static int demux_Control(demux_t *p_demux, int i_query,...)
Definition vlc_demux.h:308
static int vlc_demux_GetMeta(demux_t *demux, vlc_meta_t *meta)
Definition vlc_demux.h:385
static int vlc_demux_FilterEnable(demux_t *demux)
Definition vlc_demux.h:490
static int vlc_demux_NavMenu(demux_t *demux)
Definition vlc_demux.h:485
static bool demux_IsContentType(demux_t *demux, const char *type)
Definition vlc_demux.h:542
static void demux_Delete(demux_t *demux)
Definition vlc_demux.h:297
static int vlc_demux_GetLength(demux_t *demux, vlc_tick_t *length)
Definition vlc_demux.h:405
static bool vlc_demux_CanRecord(demux_t *demux)
Definition vlc_demux.h:351
static int vlc_demux_SetRate(demux_t *demux, float rate)
Definition vlc_demux.h:445
static int vlc_demux_GetTime(demux_t *demux, vlc_tick_t *time)
Definition vlc_demux.h:410
int demux_Demux(demux_t *p_demux)
Definition demux.c:220
static bool vlc_demux_HasUnsupportedMeta(demux_t *demux)
Definition vlc_demux.h:358
static bool vlc_demux_CanRate(demux_t *demux)
Definition vlc_demux.h:344
static int vlc_demux_NavPopup(demux_t *demux)
Definition vlc_demux.h:480
static bool demux_IsPathExtension(demux_t *p_demux, const char *psz_extension)
Definition vlc_demux.h:531
static int vlc_demux_NavLeft(demux_t *demux)
Definition vlc_demux.h:470
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:375
@ 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
Get time and live state.
Definition vlc_demux.h:196
@ 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:239
@ 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:274
@ DEMUX_NAV_MENU
Activate disc Root Menu.
Definition vlc_demux.h:280
@ 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:254
@ DEMUX_NAV_ACTIVATE
Activate the navigation item selected.
Definition vlc_demux.h:268
@ DEMUX_SET_ES
Definition vlc_demux.h:219
@ DEMUX_SET_TIME
Definition vlc_demux.h:197
@ DEMUX_NAV_DOWN
Use the down arrow to select a navigation item under.
Definition vlc_demux.h:272
@ 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:218
@ 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:244
@ DEMUX_HAS_UNSUPPORTED_META
Definition vlc_demux.h:232
@ DEMUX_SET_GROUP_ALL
Definition vlc_demux.h:217
@ DEMUX_GET_NORMAL_TIME
Definition vlc_demux.h:199
@ DEMUX_SET_GROUP_DEFAULT
Definition vlc_demux.h:216
@ 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:270
@ DEMUX_GET_FPS
Definition vlc_demux.h:229
@ DEMUX_GET_LENGTH
Definition vlc_demux.h:188
@ DEMUX_SET_ES_LIST
Definition vlc_demux.h:220
@ DEMUX_NAV_POPUP
Activate the popup Menu (for BD).
Definition vlc_demux.h:278
@ DEMUX_SET_POSITION
Definition vlc_demux.h:185
@ DEMUX_SET_RATE
Definition vlc_demux.h:264
@ DEMUX_CAN_CONTROL_RATE
Definition vlc_demux.h:261
@ DEMUX_CAN_SEEK
Checks whether the stream supports seeking.
Definition vlc_demux.h:91
@ DEMUX_FILTER_DISABLE
Definition vlc_demux.h:287
@ DEMUX_SET_NEXT_DEMUX_TIME
Definition vlc_demux.h:227
@ DEMUX_GET_SEEKPOINT
Definition vlc_demux.h:180
@ DEMUX_GET_TITLE_INFO
Definition vlc_demux.h:210
@ DEMUX_GET_META
Retrieves stream meta-data.
Definition vlc_demux.h:118
@ DEMUX_FILTER_ENABLE
Enable/Disable a demux filter.
Definition vlc_demux.h:286
@ DEMUX_NAV_RIGHT
Use the right arrow to select a navigation item on the right.
Definition vlc_demux.h:276
#define VLC_SUCCESS
No error.
Definition vlc_common.h:480
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:614
Definition vlc_es_out.h:140
Definition vlc_input.h:168
Describes an input and is used to spawn input_thread_t objects.
Definition vlc_input_item.h:98
Definition vlc_input.h:102
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:122
Definition meta.c:46
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