[vlc-commits] [Git][videolan/vlc][master] 3 commits: demux: allow passing URL to demux_New()
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Thu Oct 7 18:46:04 UTC 2021
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
5480568a by Rémi Denis-Courmont at 2021-10-07T17:57:14+00:00
demux: allow passing URL to demux_New()
- - - - -
8962f222 by Rémi Denis-Courmont at 2021-10-07T17:57:14+00:00
ytdl: set chained demux URL
- - - - -
16922daa by Rémi Denis-Courmont at 2021-10-07T17:57:14+00:00
demux: pass dummy URLs to chained demuxers
...so that demux_New() will not fail flat out.
- - - - -
6 changed files:
- include/vlc_demux.h
- modules/demux/adaptive/plumbing/Demuxer.cpp
- modules/demux/ytdl.c
- src/input/demux.c
- src/input/demux_chained.c
- test/src/input/demux-run.c
Changes:
=====================================
include/vlc_demux.h
=====================================
@@ -283,8 +283,8 @@ enum demux_query_e
* Main Demux
*************************************************************************/
-VLC_API demux_t *demux_New( vlc_object_t *p_obj, const char *psz_name,
- stream_t *s, es_out_t *out );
+VLC_API demux_t *demux_New( vlc_object_t *p_obj, const char *module_name,
+ const char *url, stream_t *s, es_out_t *out );
static inline void demux_Delete(demux_t *demux)
{
=====================================
modules/demux/adaptive/plumbing/Demuxer.cpp
=====================================
@@ -123,7 +123,7 @@ bool Demuxer::create()
if(!p_newstream)
return false;
- p_demux = demux_New( p_obj, name.c_str(),
+ p_demux = demux_New( p_obj, name.c_str(), "vlc://nop",
p_newstream, p_es_out );
if(!p_demux)
{
=====================================
modules/demux/ytdl.c
=====================================
@@ -315,7 +315,7 @@ static stream_t *vlc_demux_NewURL(vlc_object_t *obj, const char *url,
stream_t *stream = vlc_stream_NewURL(obj, url);
if (stream != NULL) {
- demux_t *demux = demux_New(obj, "any", stream, out);
+ demux_t *demux = demux_New(obj, "any", url, stream, out);
if (demux != NULL)
return demux;
=====================================
src/input/demux.c
=====================================
@@ -69,11 +69,11 @@ static const char *demux_NameFromMimeType(const char *mime)
return (type != NULL) ? type->name : "any";
}
-demux_t *demux_New( vlc_object_t *p_obj, const char *psz_name,
+demux_t *demux_New( vlc_object_t *p_obj, const char *module, const char *url,
stream_t *s, es_out_t *out )
{
assert(s != NULL );
- return demux_NewAdvanced( p_obj, NULL, psz_name, "", s, out, false );
+ return demux_NewAdvanced( p_obj, NULL, module, url, s, out, false );
}
struct vlc_demux_private
=====================================
src/input/demux_chained.c
=====================================
@@ -54,8 +54,8 @@ struct vlc_demux_chained_t
static void *vlc_demux_chained_Thread(void *data)
{
vlc_demux_chained_t *dc = data;
- demux_t *demux = demux_New(VLC_OBJECT(dc->reader), dc->name, dc->reader,
- dc->out);
+ demux_t *demux = demux_New(VLC_OBJECT(dc->reader), dc->name, "vlc://nop",
+ dc->reader, dc->out);
if (demux == NULL)
{
vlc_stream_Delete(dc->reader);
=====================================
test/src/input/demux-run.c
=====================================
@@ -294,7 +294,7 @@ static int demux_process_stream(const struct vlc_run_args *args, stream_t *s)
if (out == NULL)
return -1;
- demux_t *demux = demux_New(VLC_OBJECT(s), name, s, out);
+ demux_t *demux = demux_New(VLC_OBJECT(s), name, "vlc://nop", s, out);
if (demux == NULL)
{
es_out_Delete(out);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/831430160678f2928ffb78d0bdd4ec4e1274eef3...16922daab3bf0f78353db81a89e4565b4eb17c00
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/831430160678f2928ffb78d0bdd4ec4e1274eef3...16922daab3bf0f78353db81a89e4565b4eb17c00
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list