VLC  3.0.15
demux.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * demux.h: Input demux functions
3  *****************************************************************************
4  * Copyright (C) 1998-2008 VLC authors and VideoLAN
5  * Copyright (C) 2008 Laurent Aimar
6  * $Id: 00be2e9ab8f4823e2343d49132bd3cab92ae5358 $
7  *
8  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify it
11  * under the terms of the GNU Lesser General Public License as published by
12  * the Free Software Foundation; either version 2.1 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program; if not, write to the Free Software Foundation,
22  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24 
25 #ifndef LIBVLC_INPUT_DEMUX_H
26 #define LIBVLC_INPUT_DEMUX_H 1
27 
28 #include <vlc_common.h>
29 #include <vlc_demux.h>
30 
31 #include "stream.h"
32 
33 /* stream_t *s could be null and then it mean a access+demux in one */
34 demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
35  const char *psz_access, const char *psz_demux,
36  const char *psz_path, stream_t *s, es_out_t *out, bool );
37 #define demux_NewAdvanced( a, b, c, d, e, f, g, h ) demux_NewAdvanced(VLC_OBJECT(a),b,c,d,e,f,g,h)
38 
39 unsigned demux_TestAndClearFlags( demux_t *, unsigned );
40 int demux_GetTitle( demux_t * );
42 
43 /**
44  * Builds an explicit chain of demux filters.
45  *
46  * This function creates a chain of filters according to a supplied list.
47  *
48  * See also stream_FilterChainNew(). Those two functions have identical
49  * semantics and ownership rules, except for the use of demux vs stream.
50  *
51  * @param source input stream around which to build a filter chain
52  * @param list colon-separated list of stream filters (upstream first)
53  *
54  * @return The last demux (filter) in the chain.
55  * The return value is always a valid (non-NULL) demux pointer.
56  */
57 demux_t *demux_FilterChainNew( demux_t *source, const char *list ) VLC_USED;
58 
59 bool demux_FilterEnable( demux_t *p_demux_chain, const char* psz_demux );
60 bool demux_FilterDisable( demux_t *p_demux_chain, const char* psz_demux );
61 
62 #endif
DEMUX_GET_META
Retrieves stream meta-data.
Definition: vlc_demux.h:172
DEMUX_SET_PAUSE_STATE
Sets the paused or playing/resumed state.
Definition: vlc_demux.h:190
demux_t::p_input
input_thread_t * p_input
Definition: vlc_demux.h:97
DEMUX_SET_GROUP
Definition: vlc_demux.h:258
DEMUX_GET_SIGNAL
Retrieves an estimate of signal quality and strength.
Definition: vlc_demux.h:178
demux_t::pf_control
int(* pf_control)(demux_t *, int i_query, va_list args)
Definition: vlc_demux.h:82
DEMUX_NAV_UP
Use the up arrow to select a navigation item above.
Definition: vlc_demux.h:315
vlc_demux.h
vlc_stream_vaControl
int vlc_stream_vaControl(stream_t *s, int cmd, va_list args)
Use to control the "stream_t *".
Definition: stream.c:655
demux_t::p_next
demux_t * p_next
Input demuxer.
Definition: vlc_demux.h:72
demux_t::p_module
module_t * p_module
Definition: vlc_demux.h:48
demux_FilterEnable
bool demux_FilterEnable(demux_t *p_demux_chain, const char *psz_demux)
Definition: demux.c:645
demux_vaControl
int demux_vaControl(demux_t *demux, int query, va_list args)
Definition: demux.c:314
strcasecmp
int strcasecmp(const char *, const char *)
DEMUX_SET_TIME
Definition: vlc_demux.h:241
demux_GetSeekpoint
int demux_GetSeekpoint(demux_t *p_demux)
Definition: demux.c:564
vlc_module_load
#define vlc_module_load(o, c, n, s,...)
Definition: vlc_modules.h:39
demux_Control
static int demux_Control(demux_t *p_demux, int i_query,...)
Definition: vlc_demux.h:358
vlc_common.h
demux_t::pf_demux
int(* pf_demux)(demux_t *)
Definition: vlc_demux.h:81
demux_NameFromMimeType
static const char * demux_NameFromMimeType(const char *mime)
Definition: demux.c:58
DEMUX_GET_TITLE_INFO
Definition: vlc_demux.h:252
DEMUX_CAN_RECORD
Definition: vlc_demux.h:279
demux_FilterNew
static demux_t * demux_FilterNew(demux_t *p_next, const char *p_name)
Definition: demux.c:572
demux_FilterDisable
bool demux_FilterDisable(demux_t *p_demux_chain, const char *psz_demux)
Definition: demux.c:650
DemuxNameFromExtension
static const char * DemuxNameFromExtension(char const *ext, bool b_preparsing)
Definition: demux.c:76
decoder_t::pf_decode
int(* pf_decode)(decoder_t *, block_t *p_block)
Definition: vlc_codec.h:96
demux_New
demux_t * demux_New(vlc_object_t *p_obj, const char *psz_name, const char *psz_location, stream_t *s, es_out_t *out)
Definition: demux.c:144
demux_NewAdvanced
#define demux_NewAdvanced(a, b, c, d, e, f, g, h)
Definition: demux.h:36
demux_FilterChainNew
demux_t * demux_FilterChainNew(demux_t *p_demux, const char *psz_chain)
Builds an explicit chain of demux filters.
Definition: demux.c:601
DEMUX_SET_TITLE
Seeks to the beginning of a title.
Definition: vlc_demux.h:198
get_path
char * get_path(const char *location)
Definition: access.c:42
demux_filter_enable_disable
static bool demux_filter_enable_disable(demux_t *p_demux_chain, const char *psz_demux, bool b_enable)
Definition: demux.c:630
DEMUX_SET_ES
Definition: vlc_demux.h:259
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:86
es_format_Clean
void es_format_Clean(es_format_t *fmt)
This function will clean up a es_format_t and release all associated resources.
Definition: es_format.c:539
demux_t
Definition: vlc_demux.h:43
demux_t::i_title
int i_title
Definition: vlc_demux.h:91
decoder_t
Definition: vlc_codec.h:55
psz_ext
const char psz_ext[7]
Definition: image.c:581
vlc_ascii_strcasecmp
static int vlc_ascii_strcasecmp(const char *psz1, const char *psz2)
Compare two ASCII strings ignoring case.
Definition: vlc_strings.h:57
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:350
DEMUX_SET_SEEKPOINT
Seeks to the beginning of a chapter of the current title.
Definition: vlc_demux.h:206
ARRAY_SIZE
#define ARRAY_SIZE(x)
Definition: vlc_arrays.h:162
es_format_Init
void es_format_Init(es_format_t *fmt, int i_cat, vlc_fourcc_t i_codec)
This function will initialize a es_format_t structure.
Definition: es_format.c:433
entry::key
char * key
Definition: vlc_fixups.h:485
demux_t::info
struct demux_t::@150 info
demux_DestroyAccessDemux
static void demux_DestroyAccessDemux(demux_t *demux)
Definition: demux.c:165
demux_TestAndClearFlags
unsigned demux_TestAndClearFlags(demux_t *p_demux, unsigned flags)
Definition: demux.c:544
DEMUX_HAS_UNSUPPORTED_META
Definition: vlc_demux.h:271
STREAM_CAN_SEEK
arg1= bool * res=cannot fail
Definition: vlc_stream.h:140
decoder_t::pf_packetize
block_t *(* pf_packetize)(decoder_t *, block_t **pp_block)
Definition: vlc_codec.h:125
DEMUX_GET_TIME
Definition: vlc_demux.h:240
demux_priv_t::destroy
void(* destroy)(demux_t *)
Definition: demux.c:156
demux_DestroyDemuxFilter
static void demux_DestroyDemuxFilter(demux_t *demux)
Definition: demux.c:171
demux_FilterDisable
bool demux_FilterDisable(demux_t *p_demux_chain, const char *psz_demux)
Definition: demux.c:650
es_out_t
Definition: vlc_es_out.h:111
demux_mapping::name
const char name[8]
Definition: demux.c:62
decoder_t::p_module
module_t * p_module
Definition: vlc_codec.h:60
demux_mapping
Definition: demux.c:39
DEMUX_CAN_PAUSE
Checks whether (long) pause then stream resumption is supported.
Definition: vlc_demux.h:153
vlc_object_release
#define vlc_object_release(a)
Definition: vlc_objects.h:63
demux_GetTitle
int demux_GetTitle(demux_t *)
Definition: demux.c:556
DEMUX_SET_NEXT_DEMUX_TIME
Definition: vlc_demux.h:266
config_chain_t
Definition: vlc_configuration.h:155
DEMUX_GET_LENGTH
Definition: vlc_demux.h:239
es_format_t
Definition: vlc_es.h:580
demux_FilterEnable
bool demux_FilterEnable(demux_t *p_demux_chain, const char *psz_demux)
Definition: demux.c:645
demux_t::b_preparsing
bool b_preparsing
Definition: vlc_demux.h:78
DEMUX_IS_PLAYLIST
Checks whether the stream is actually a playlist, rather than a real stream.
Definition: vlc_demux.h:309
demux_t::p_sys
demux_sys_t * p_sys
Definition: vlc_demux.h:94
vlc_strings.h
demux_t::psz_location
char * psz_location
Definition: vlc_demux.h:53
es_format_t::i_cat
enum es_format_category_e i_cat
ES category.
Definition: vlc_es.h:582
demux_FilterChainNew
demux_t * demux_FilterChainNew(demux_t *source, const char *list)
Builds an explicit chain of demux filters.
Definition: demux.c:601
demux_vaControlHelper
int demux_vaControlHelper(stream_t *s, int64_t i_start, int64_t i_end, int64_t i_bitrate, int i_align, int i_query, va_list args)
Definition: demux.c:367
decoder_t::fmt_in
es_format_t fmt_in
Definition: vlc_codec.h:64
demux_priv_t
Definition: demux.c:153
vlc_meta_Delete
void vlc_meta_Delete(vlc_meta_t *m)
Definition: meta.c:110
DEMUX_SET_POSITION
Definition: vlc_demux.h:236
DEMUX_NAV_LEFT
Use the left arrow to select a navigation item on the left.
Definition: vlc_demux.h:319
demux_t::out
es_out_t * out
Definition: vlc_demux.h:76
stream.h
vlc_stream_Control
static int vlc_stream_Control(stream_t *s, int query,...)
Definition: vlc_stream.h:287
demux_t::s
stream_t * s
Input stream.
Definition: vlc_demux.h:65
psz_name
const char * psz_name
Definition: vlc_codecs.h:315
DEMUX_GET_SEEKPOINT
Definition: vlc_demux.h:231
DEMUX_NAV_POPUP
Activate the popup Menu (for BD).
Definition: vlc_demux.h:323
DEMUX_NAV_ACTIVATE
Activate the navigation item selected.
Definition: vlc_demux.h:313
DEMUX_CAN_SEEK
Checks whether the stream supports seeking.
Definition: vlc_demux.h:145
stream_t
stream_t definition
Definition: vlc_stream.h:46
vlc_stream_Seek
int vlc_stream_Seek(stream_t *s, uint64_t offset)
Sets the current stream position.
Definition: stream.c:593
DEMUX_NAV_DOWN
Use the down arrow to select a navigation item under.
Definition: vlc_demux.h:317
demux_mapping_cmp
static int demux_mapping_cmp(const void *k, const void *v)
Definition: demux.c:46
config_ChainCreate
char * config_ChainCreate(char **ppsz_name, config_chain_t **pp_cfg, const char *psz_chain)
This function will parse a configuration string (psz_string) and.
Definition: chain.c:225
DEMUX_FILTER_DISABLE
Definition: vlc_demux.h:332
demux_GetTitle
int demux_GetTitle(demux_t *p_demux)
Definition: demux.c:556
demux_t::i_seekpoint
int i_seekpoint
Definition: vlc_demux.h:92
decoder_t::fmt_out
es_format_t fmt_out
Definition: vlc_codec.h:67
demux_NewAdvanced
demux_t * demux_NewAdvanced(vlc_object_t *p_obj, input_thread_t *p_parent_input, const char *psz_access, const char *psz_demux, const char *psz_location, stream_t *s, es_out_t *out, bool b_preparsing)
Definition: demux.c:197
vlc_url.h
DEMUX_NAV_MENU
Activate disc Root Menu.
Definition: vlc_demux.h:325
demux_GetSeekpoint
int demux_GetSeekpoint(demux_t *)
Definition: demux.c:564
vlc_object_t
The main vlc_object_t structure.
Definition: vlc_objects.h:39
DEMUX_GET_FPS
Definition: vlc_demux.h:268
DEMUX_GET_PTS_DELAY
Retrieves the PTS delay (roughly the default buffer duration).
Definition: vlc_demux.h:166
demux_TestAndClearFlags
unsigned demux_TestAndClearFlags(demux_t *, unsigned)
Definition: demux.c:544
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:349
strdup
char * strdup(const char *)
module_get_name
const char * module_get_name(const module_t *m, bool long_name)
Get the human-friendly name of a module.
Definition: modules.c:77
demux_t::psz_demux
char * psz_demux
Definition: vlc_demux.h:52
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:31
demux_DestroyDemux
static void demux_DestroyDemux(demux_t *demux)
Definition: demux.c:159
vlc_custom_create
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:108
demux_PacketizerDestroy
void demux_PacketizerDestroy(decoder_t *p_packetizer)
This function will destroy a packetizer create by demux_PacketizerNew.
Definition: demux.c:533
list
module_config_t ** list
Definition: core.c:460
demux.h
name
const char name[16]
Definition: httpd.c:1249
demux_priv_t::demux
demux_t demux
Definition: demux.c:155
DEMUX_CAN_CONTROL_PACE
Whether the stream can be read at an arbitrary pace.
Definition: vlc_demux.h:159
entry
Definition: fourcc_gen.c:50
DEMUX_FILTER_ENABLE
Enable/Disable a demux filter.
Definition: vlc_demux.h:331
DEMUX_GET_TITLE
Read the title number currently playing.
Definition: vlc_demux.h:224
demux_t::i_update
unsigned int i_update
Definition: vlc_demux.h:88
stream_Size
static int64_t stream_Size(stream_t *s)
Definition: vlc_stream.h:318
DEMUX_GET_POSITION
Definition: vlc_demux.h:235
demux_t::psz_file
char * psz_file
Definition: vlc_demux.h:54
DEMUX_SET_RECORD_STATE
Definition: vlc_demux.h:289
unlikely
#define unlikely(p)
Definition: vlc_common.h:114
demux_priv_t
struct demux_priv_t demux_priv_t
libvlc.h
stream_MimeType
static char * stream_MimeType(stream_t *s)
Get the mime-type of a stream.
Definition: vlc_stream.h:357
demux_t::psz_access
char * psz_access
Definition: vlc_demux.h:51
demux_Delete
void demux_Delete(demux_t *p_demux)
Definition: demux.c:286
vlc_stream_Tell
uint64_t vlc_stream_Tell(const stream_t *s)
Tells the current stream position.
Definition: stream.c:579
vlc_codec.h
demux_Probe
static int demux_Probe(void *func, va_list ap)
Definition: demux.c:177
DEMUX_NAV_RIGHT
Use the right arrow to select a navigation item on the right.
Definition: vlc_demux.h:321
input_thread_t
Main structure representing an input thread.
Definition: vlc_input.h:221
VLC_OBJECT
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_common.h:464
DEMUX_GET_ATTACHMENTS
Definition: vlc_demux.h:274
module_unneed
#define module_unneed(a, b)
Definition: vlc_modules.h:49
vlc_meta.h
demux_lookup
static demux_mapping * demux_lookup(char const *key, demux_mapping *data, size_t size)
Definition: demux.c:52
static_control_match
#define static_control_match(foo)
Definition: demux.c:300
demux_PacketizerNew
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:503
config_ChainDestroy
void config_ChainDestroy(config_chain_t *p_cfg)
This function will release a linked list of config_chain_t (Including the head)
Definition: chain.c:253
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:82
es_format_t::b_packetized
bool b_packetized
whether the data is packetized (ie.
Definition: vlc_es.h:617
module_need
#define module_need(a, b, c, d)
Definition: vlc_modules.h:47
demux_ControlInternal
static int demux_ControlInternal(demux_t *demux, int query,...)
Definition: demux.c:303
vlc_modules.h
DEMUX_TEST_AND_CLEAR_FLAGS
Check which INPUT_UPDATE_XXX flag is set and reset the ones set.
Definition: vlc_demux.h:217
vlc_stream_Delete
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:120
decoder_t::p_description
vlc_meta_t * p_description
Definition: vlc_codec.h:141