mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
multifilesink: use new gst_buffer_list_calculate_size()
This commit is contained in:
parent
3de0244532
commit
07dd3dba6f
1 changed files with 2 additions and 15 deletions
|
@ -883,19 +883,6 @@ gst_multi_file_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
return flow;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
buffer_list_calc_size (GstBuffer ** buf, guint idx, gpointer data)
|
||||
{
|
||||
guint *p_size = data;
|
||||
gsize buf_size;
|
||||
|
||||
buf_size = gst_buffer_get_size (*buf);
|
||||
GST_TRACE ("buffer %u has size %" G_GSIZE_FORMAT, idx, buf_size);
|
||||
*p_size += buf_size;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
buffer_list_copy_data (GstBuffer ** buf, guint idx, gpointer data)
|
||||
{
|
||||
|
@ -923,9 +910,9 @@ static GstFlowReturn
|
|||
gst_multi_file_sink_render_list (GstBaseSink * sink, GstBufferList * list)
|
||||
{
|
||||
GstBuffer *buf;
|
||||
guint size = 0;
|
||||
guint size;
|
||||
|
||||
gst_buffer_list_foreach (list, buffer_list_calc_size, &size);
|
||||
size = gst_buffer_list_calculate_size (list);
|
||||
GST_LOG_OBJECT (sink, "total size of buffer list %p: %u", list, size);
|
||||
|
||||
/* copy all buffers in the list into one single buffer, so we can use
|
||||
|
|
Loading…
Reference in a new issue