mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
videoaggregator: update to new samples selection API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/778>
This commit is contained in:
parent
66ff1eedca
commit
1de8af6f8b
3 changed files with 12 additions and 6 deletions
|
@ -1737,7 +1737,7 @@ clean_pad (GstElement * agg, GstPad * pad, gpointer user_data)
|
|||
static GstFlowReturn
|
||||
gst_video_aggregator_do_aggregate (GstVideoAggregator * vagg,
|
||||
GstClockTime output_start_time, GstClockTime output_end_time,
|
||||
GstBuffer ** outbuf)
|
||||
GstClockTime output_start_running_time, GstBuffer ** outbuf)
|
||||
{
|
||||
GstAggregator *agg = GST_AGGREGATOR (vagg);
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
@ -1772,7 +1772,8 @@ gst_video_aggregator_do_aggregate (GstVideoAggregator * vagg,
|
|||
&out_stream_time);
|
||||
|
||||
/* Let the application know that input buffers have been staged */
|
||||
gst_aggregator_selected_samples (agg);
|
||||
gst_aggregator_selected_samples (agg, GST_BUFFER_PTS (*outbuf),
|
||||
GST_BUFFER_DTS (*outbuf), GST_BUFFER_DURATION (*outbuf));
|
||||
|
||||
/* Convert all the frames the subclass has before aggregating */
|
||||
gst_element_foreach_sink_pad (GST_ELEMENT_CAST (vagg), prepare_frames, NULL);
|
||||
|
@ -1953,7 +1954,7 @@ gst_video_aggregator_aggregate (GstAggregator * agg, gboolean timeout)
|
|||
jitter = gst_video_aggregator_do_qos (vagg, output_start_time);
|
||||
if (jitter <= 0) {
|
||||
flow_ret = gst_video_aggregator_do_aggregate (vagg, output_start_time,
|
||||
output_end_time, &outbuf);
|
||||
output_end_time, output_start_running_time, &outbuf);
|
||||
if (flow_ret != GST_FLOW_OK)
|
||||
goto done;
|
||||
vagg->priv->qos_processed++;
|
||||
|
|
|
@ -2169,7 +2169,8 @@ GST_END_TEST;
|
|||
static GstBuffer *expected_selected_buffer = NULL;
|
||||
|
||||
static void
|
||||
samples_selected_cb (GstAggregator * agg, gint * called)
|
||||
samples_selected_cb (GstAggregator * agg, GstSegment * segment,
|
||||
GstClockTime pts, GstClockTime dts, GstClockTime duration, gint * called)
|
||||
{
|
||||
GstPad *pad;
|
||||
GstSample *sample;
|
||||
|
|
|
@ -61,9 +61,13 @@ check_aggregated_buffer (GstElement * agg, GstPad * pad,
|
|||
}
|
||||
|
||||
static void
|
||||
samples_selected_cb (GstElement * agg, GHashTable * consumed_buffers)
|
||||
samples_selected_cb (GstElement * agg, GstSegment * segment, GstClockTime pts,
|
||||
GstClockTime dts, GstClockTime duration, GHashTable * consumed_buffers)
|
||||
{
|
||||
gst_printerr ("Compositor has selected the samples it will aggregate\n");
|
||||
gst_printerr
|
||||
("Compositor has selected the samples it will aggregate for output buffer with PTS %"
|
||||
GST_TIME_FORMAT " and duration %" GST_TIME_FORMAT "\n",
|
||||
GST_TIME_ARGS (pts), GST_TIME_ARGS (duration));
|
||||
gst_element_foreach_sink_pad (agg,
|
||||
(GstElementForeachPadFunc) check_aggregated_buffer, consumed_buffers);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue