[vlc-devel] [PATCH 15/16] stream_output: remove previous mux->pf_* functions
Alexandre Janniaux
ajanni at videolabs.io
Mon Mar 15 17:03:08 UTC 2021
---
src/stream_output/stream_output.c | 30 +++++-------------------------
1 file changed, 5 insertions(+), 25 deletions(-)
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 6eb38c0ca3..de3dc55bbc 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -370,10 +370,6 @@ sout_mux_t *sout_MuxNew( sout_access_out_t *p_access, const char *psz_mux )
free( psz_next );
p_mux->p_access = p_access;
- p_mux->pf_control = NULL;
- p_mux->pf_addstream = NULL;
- p_mux->pf_delstream = NULL;
- p_mux->pf_mux = NULL;
p_mux->i_nb_inputs = 0;
p_mux->pp_inputs = NULL;
@@ -397,7 +393,7 @@ sout_mux_t *sout_MuxNew( sout_access_out_t *p_access, const char *psz_mux )
}
/* *** probe mux capacity *** */
- if( (p_mux->ops && p_mux->ops->control) || p_mux->pf_control )
+ if( p_mux->ops && p_mux->ops->control )
{
int b_answer = false;
@@ -464,14 +460,7 @@ sout_input_t *sout_MuxAddStream( sout_mux_t *p_mux, const es_format_t *p_fmt )
TAB_APPEND( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input );
- int ret;
- if( p_mux->ops == NULL)
- ret = p_mux->pf_addstream( p_mux, p_input );
- else
- ret = p_mux->ops->add_stream( p_mux, p_input );
-
-
- if( ret < 0 )
+ if( p_mux->ops->add_stream( p_mux, p_input ) < 0 )
{
msg_Err( p_mux, "cannot add this stream" );
TAB_REMOVE( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input );
@@ -497,10 +486,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
/* We stop waiting, and call the muxer for taking care of the data
* before we remove this es */
p_mux->b_waiting_stream = false;
- if( p_mux->ops == NULL )
- p_mux->pf_mux( p_mux );
- else
- p_mux->ops->mux( p_mux );
+ p_mux->ops->mux( p_mux );
}
TAB_FIND( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input, i_index );
@@ -509,10 +495,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
/* remove the entry */
TAB_ERASE( p_mux->i_nb_inputs, p_mux->pp_inputs, i_index );
- if( p_mux->ops == NULL )
- p_mux->pf_delstream( p_mux, p_input );
- else
- p_mux->ops->del_stream( p_mux, p_input );
+ p_mux->ops->del_stream( p_mux, p_input );
if( p_mux->i_nb_inputs == 0 )
{
@@ -549,10 +532,7 @@ int sout_MuxSendBuffer( sout_mux_t *p_mux, sout_input_t *p_input,
return VLC_SUCCESS;
p_mux->b_waiting_stream = false;
}
- if( p_mux->ops == NULL )
- return p_mux->pf_mux( p_mux );
- else
- return p_mux->ops->mux( p_mux );
+ return p_mux->ops->mux( p_mux );
}
void sout_MuxFlush( sout_mux_t *p_mux, sout_input_t *p_input )
--
2.30.2
More information about the vlc-devel
mailing list