[vlc-devel] [PATCH 1/2] transcode: add support for flush operations
Alaric Senat
dev.asenat at posteo.net
Mon Feb 15 11:38:22 UTC 2021
Previously flushing the transcode stream was left unimplemented.
Flushing out the stream while transcoding makes sense especially to
support seeking operations.
While seeking in transcoding is far from being fully supported in vlc
this allows to at least change the starting time before transcoding a
media without major modifications to the input loop.
---
modules/stream_out/transcode/transcode.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index ceca2df1e5..acee6d5ec0 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -377,8 +377,19 @@ static int Control( sout_stream_t *p_stream, int i_query, va_list args )
return VLC_EGENERIC;
}
+/*****************************************************************************
+ * Flush
+ *****************************************************************************/
+static void Flush( sout_stream_t *p_stream, void *_id )
+{
+
+ const sout_stream_id_sys_t *id = (sout_stream_id_sys_t*)_id;
+ if ( id->downstream_id )
+ sout_StreamFlush( p_stream->p_next, id->downstream_id );
+}
+
static const struct sout_stream_operations ops = {
- Add, Del, Send, Control, NULL,
+ Add, Del, Send, Control, Flush,
};
/*****************************************************************************
--
2.28.0
More information about the vlc-devel
mailing list