[vlc-commits] mux: remove MUX_GET_ADD_STREAM_WAIT
Rémi Denis-Courmont
git at videolan.org
Tue Mar 3 18:41:35 CET 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 1 13:03:03 2020 +0200| [2a2fd11f5aaa5b80dac573a28f225874a1ad304b] | committer: Rémi Denis-Courmont
mux: remove MUX_GET_ADD_STREAM_WAIT
For now, assume that this is always true. Eventually, we probably want
to give more flexibility and responsibility to the muxer than the core,
but for now, this removes one dependency from muxer to the sout
instance.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a2fd11f5aaa5b80dac573a28f225874a1ad304b
---
include/vlc_sout.h | 1 -
modules/mux/asf.c | 8 +-------
modules/mux/dummy.c | 5 -----
modules/mux/mp4/mp4.c | 5 -----
modules/mux/mpeg/ps.c | 5 -----
modules/mux/mpeg/ts.c | 5 -----
modules/mux/mpjpeg.c | 7 +------
modules/mux/ogg.c | 5 -----
src/stream_output/stream_output.c | 21 +--------------------
9 files changed, 3 insertions(+), 59 deletions(-)
diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index 687ce5d8ea..48ef95006b 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -149,7 +149,6 @@ enum sout_mux_query_e
/* capabilities */
MUX_CAN_ADD_STREAM_WHILE_MUXING, /* arg1= bool *, res=cannot fail */
/* properties */
- MUX_GET_ADD_STREAM_WAIT, /* arg1= bool *, res=cannot fail */
MUX_GET_MIME, /* arg1= char ** res=can fail */
};
diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index 2a82cbbb59..1f287745ca 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -306,13 +306,7 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
pb_bool = va_arg( args, bool * );
- if( p_sys->b_asf_http ) *pb_bool = true;
- else *pb_bool = false;
- return VLC_SUCCESS;
-
- case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = va_arg( args, bool * );
- *pb_bool = true;
+ *pb_bool = false;
return VLC_SUCCESS;
case MUX_GET_MIME:
diff --git a/modules/mux/dummy.c b/modules/mux/dummy.c
index da33350db9..d9600f41e9 100644
--- a/modules/mux/dummy.c
+++ b/modules/mux/dummy.c
@@ -113,11 +113,6 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
*pb_bool = true;
return VLC_SUCCESS;
- case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = va_arg( args, bool * );
- *pb_bool = false;
- return VLC_SUCCESS;
-
case MUX_GET_MIME: /* Unknown */
default:
return VLC_EGENERIC;
diff --git a/modules/mux/mp4/mp4.c b/modules/mux/mp4/mp4.c
index 7e99969b6a..b58a999dbe 100644
--- a/modules/mux/mp4/mp4.c
+++ b/modules/mux/mp4/mp4.c
@@ -442,11 +442,6 @@ static int Control(sout_mux_t *p_mux, int i_query, va_list args)
switch(i_query)
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
- pb_bool = va_arg(args, bool *);
- *pb_bool = (p_mux->pf_mux == Mux);
- return VLC_SUCCESS;
-
- case MUX_GET_ADD_STREAM_WAIT:
pb_bool = va_arg(args, bool *);
*pb_bool = true;
return VLC_SUCCESS;
diff --git a/modules/mux/mpeg/ps.c b/modules/mux/mpeg/ps.c
index 1bb700a1a0..7f8f8a2c20 100644
--- a/modules/mux/mpeg/ps.c
+++ b/modules/mux/mpeg/ps.c
@@ -244,11 +244,6 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
*pb_bool = true;
return VLC_SUCCESS;
- case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = va_arg( args, bool * );
- *pb_bool = false;
- return VLC_SUCCESS;
-
case MUX_GET_MIME:
ppsz = va_arg( args, char ** );
*ppsz = strdup( "video/mpeg" );
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 042074263c..b1ebe0712f 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -850,11 +850,6 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
*pb_bool = true;
return VLC_SUCCESS;
- case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = va_arg( args, bool * );
- *pb_bool = false;
- return VLC_SUCCESS;
-
case MUX_GET_MIME:
ppsz = va_arg( args, char ** );
*ppsz = strdup( "video/mp2t" );
diff --git a/modules/mux/mpjpeg.c b/modules/mux/mpjpeg.c
index bd431cdf8d..5850d8a237 100644
--- a/modules/mux/mpjpeg.c
+++ b/modules/mux/mpjpeg.c
@@ -102,12 +102,7 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
{
case MUX_CAN_ADD_STREAM_WHILE_MUXING:
pb_bool = va_arg( args, bool * );
- *pb_bool = true;
- return VLC_SUCCESS;
-
- case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = va_arg( args, bool * );
- *pb_bool = true;
+ *pb_bool = false;
return VLC_SUCCESS;
case MUX_GET_MIME:
diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index c03e5355b7..8f8b169665 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -324,11 +324,6 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
*pb_bool = true;
return VLC_SUCCESS;
- case MUX_GET_ADD_STREAM_WAIT:
- pb_bool = va_arg( args, bool * );
- *pb_bool = true;
- return VLC_SUCCESS;
-
case MUX_GET_MIME:
ppsz = va_arg( args, char ** );
*ppsz = strdup( "application/ogg" );
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index a62a3a7054..2da38b9cde 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -442,26 +442,7 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
{
msg_Dbg( p_sout, "muxer support adding stream at any time" );
p_mux->b_add_stream_any_time = true;
- p_mux->b_waiting_stream = false;
-
- /* If we control the output pace then it's better to wait before
- * starting muxing (generates better streams/files). */
- if( !p_sout->i_out_pace_nocontrol )
- {
- b_answer = true;
- }
- else if( sout_MuxControl( p_mux, MUX_GET_ADD_STREAM_WAIT,
- &b_answer ) )
- {
- b_answer = false;
- }
-
- if( b_answer )
- {
- msg_Dbg( p_sout, "muxer prefers to wait for all ES before "
- "starting to mux" );
- p_mux->b_waiting_stream = true;
- }
+ p_mux->b_waiting_stream = true;
}
}
More information about the vlc-commits
mailing list