Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
eacbb34f
Commit
eacbb34f
authored
Sep 25, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose demux_New
parent
c24a40ba
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
44 deletions
+72
-44
include/vlc_demux.h
include/vlc_demux.h
+41
-5
src/input/demux.c
src/input/demux.c
+18
-5
src/input/demux.h
src/input/demux.h
+4
-27
src/input/input.c
src/input/input.c
+5
-5
src/input/stream_demux.c
src/input/stream_demux.c
+2
-2
src/libvlccore.sym
src/libvlccore.sym
+2
-0
No files found.
include/vlc_demux.h
View file @
eacbb34f
...
...
@@ -183,7 +183,47 @@ enum demux_query_e
DEMUX_NAV_RIGHT
,
/* res=can fail */
};
VLC_API
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
);
/*************************************************************************
* Main Demux
*************************************************************************/
/* stream_t *s could be null and then it mean a access+demux in one */
VLC_API
demux_t
*
demux_New
(
vlc_object_t
*
p_obj
,
const
char
*
psz_name
,
const
char
*
psz_path
,
stream_t
*
s
,
es_out_t
*
out
);
VLC_API
void
demux_Delete
(
demux_t
*
);
VLC_API
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
);
VLC_USED
static
inline
int
demux_Demux
(
demux_t
*
p_demux
)
{
if
(
!
p_demux
->
pf_demux
)
return
1
;
return
p_demux
->
pf_demux
(
p_demux
);
}
static
inline
int
demux_vaControl
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
)
{
return
p_demux
->
pf_control
(
p_demux
,
i_query
,
args
);
}
static
inline
int
demux_Control
(
demux_t
*
p_demux
,
int
i_query
,
...
)
{
va_list
args
;
int
i_result
;
va_start
(
args
,
i_query
);
i_result
=
demux_vaControl
(
p_demux
,
i_query
,
args
);
va_end
(
args
);
return
i_result
;
}
/*************************************************************************
* Miscellaneous helpers for demuxers
*************************************************************************/
static
inline
void
demux_UpdateTitleFromStream
(
demux_t
*
demux
)
{
...
...
@@ -205,10 +245,6 @@ static inline void demux_UpdateTitleFromStream( demux_t *demux )
}
}
/*************************************************************************
* Miscellaneous helpers for demuxers
*************************************************************************/
VLC_USED
static
inline
bool
demux_IsPathExtension
(
demux_t
*
p_demux
,
const
char
*
psz_extension
)
{
...
...
src/input/demux.c
View file @
eacbb34f
...
...
@@ -72,15 +72,28 @@ static const char *demux_FromContentType(const char *mime)
return
(
type
!=
NULL
)
?
type
->
demux
:
"any"
;
}
#undef demux_New
/*****************************************************************************
* demux_New:
* if s is NULL then load a access_demux
*****************************************************************************/
demux_t
*
demux_New
(
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_quick
)
demux_t
*
demux_New
(
vlc_object_t
*
p_obj
,
const
char
*
psz_name
,
const
char
*
psz_location
,
stream_t
*
s
,
es_out_t
*
out
)
{
return
demux_NewAdvanced
(
p_obj
,
NULL
,
(
s
==
NULL
)
?
psz_name
:
""
,
(
s
!=
NULL
)
?
psz_name
:
""
,
psz_location
,
s
,
out
,
false
);
}
/*****************************************************************************
* demux_NewAdvanced:
* if s is NULL then load a access_demux
*****************************************************************************/
#undef 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_quick
)
{
demux_t
*
p_demux
=
vlc_custom_create
(
p_obj
,
sizeof
(
*
p_demux
),
"demux"
);
if
(
unlikely
(
p_demux
==
NULL
)
)
...
...
src/input/demux.h
View file @
eacbb34f
...
...
@@ -31,31 +31,8 @@
#include "stream.h"
/* stream_t *s could be null and then it mean a access+demux in one */
demux_t
*
demux_New
(
vlc_object_t
*
p_obj
,
input_thread_t
*
p_parent_input
,
const
char
*
psz_access
,
const
char
*
psz_demux
,
const
char
*
psz_path
,
stream_t
*
s
,
es_out_t
*
out
,
bool
);
#define demux_New( a, b, c, d, e, f, g, h ) demux_New(VLC_OBJECT(a),b,c,d,e,f,g,h)
void
demux_Delete
(
demux_t
*
);
static
inline
int
demux_Demux
(
demux_t
*
p_demux
)
{
if
(
!
p_demux
->
pf_demux
)
return
1
;
return
p_demux
->
pf_demux
(
p_demux
);
}
static
inline
int
demux_vaControl
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
)
{
return
p_demux
->
pf_control
(
p_demux
,
i_query
,
args
);
}
static
inline
int
demux_Control
(
demux_t
*
p_demux
,
int
i_query
,
...
)
{
va_list
args
;
int
i_result
;
va_start
(
args
,
i_query
);
i_result
=
demux_vaControl
(
p_demux
,
i_query
,
args
);
va_end
(
args
);
return
i_result
;
}
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_path
,
stream_t
*
s
,
es_out_t
*
out
,
bool
);
#define demux_NewAdvanced( a, b, c, d, e, f, g, h ) demux_NewAdvanced(VLC_OBJECT(a),b,c,d,e,f,g,h)
#endif
src/input/input.c
View file @
eacbb34f
...
...
@@ -2169,8 +2169,8 @@ static int InputSourceInit( input_thread_t *p_input,
}
/* Try access_demux first */
in
->
p_demux
=
demux_New
(
p_input
,
p_input
,
psz_access
,
psz_demux
,
psz_path
,
NULL
,
p_input
->
p
->
p_es_out
,
false
);
in
->
p_demux
=
demux_New
Advanced
(
p_input
,
p_input
,
psz_access
,
psz_demux
,
psz_path
,
NULL
,
p_input
->
p
->
p_es_out
,
false
);
}
else
{
...
...
@@ -2341,9 +2341,9 @@ static int InputSourceInit( input_thread_t *p_input,
if
(
psz_path
==
NULL
)
psz_path
=
""
;
in
->
p_demux
=
demux_New
(
p_input
,
p_input
,
psz_access
,
psz_demux
,
psz_path
,
p_stream
,
p_input
->
p
->
p_es_out
,
p_input
->
b_preparsing
);
in
->
p_demux
=
demux_New
Advanced
(
p_input
,
p_input
,
psz_access
,
psz_demux
,
psz_path
,
p_stream
,
p_input
->
p
->
p_es_out
,
p_input
->
b_preparsing
);
if
(
in
->
p_demux
==
NULL
)
{
...
...
src/input/stream_demux.c
View file @
eacbb34f
...
...
@@ -248,8 +248,8 @@ static void* DStreamThread( void *obj )
demux_t
*
p_demux
;
/* Create the demuxer */
p_demux
=
demux_New
(
s
,
s
->
p_input
,
""
,
p_sys
->
psz_name
,
""
,
s
,
p_sys
->
out
,
false
);
p_demux
=
demux_New
Advanced
(
s
,
s
->
p_input
,
""
,
p_sys
->
psz_name
,
""
,
s
,
p_sys
->
out
,
false
);
if
(
p_demux
==
NULL
)
return
NULL
;
...
...
src/libvlccore.sym
View file @
eacbb34f
...
...
@@ -88,8 +88,10 @@ decoder_SynchroReset
decoder_SynchroTrash
decode_URI
decode_URI_duplicate
demux_Delete
demux_PacketizerDestroy
demux_PacketizerNew
demux_New
demux_vaControlHelper
dialog_ExtensionUpdate
dialog_Login
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment