pipewiresrc: add option to resend last buffer on EOS

Add an option to resend the last buffer on EOS with an updated
timestamp. This can be used to make sure encoders fill up the
gap between last buffer and EOS, like with sparse streams from
screen capture.
This commit is contained in:
Wim Taymans 2020-07-13 12:11:34 +02:00
parent a596cdbf2e
commit 8e9bbaf3dc
2 changed files with 82 additions and 7 deletions

View file

@ -64,10 +64,12 @@ struct _GstPipeWireSrc {
gint min_buffers;
gint max_buffers;
int fd;
gboolean resend_last;
gboolean negotiated;
gboolean flushing;
gboolean started;
gboolean eos;
gboolean is_live;
GstClockTime min_latency;
@ -85,6 +87,7 @@ struct _GstPipeWireSrc {
struct pw_stream *stream;
struct spa_hook stream_listener;
GstBuffer *last_buffer;
GstStructure *properties;
GstPipeWirePool *pool;