flvmux: Disable aggregator's default negotiation

flvmux can't negotiate caps with upstream/downstream and always outputs
specific caps based on the input streams. This will always happen before
it produces the first buffers.

By having the default aggregator negotiation enabled the same caps
would be pushed twice in the beginning, and again every time a
reconfigure event is received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2381>
This commit is contained in:
Sebastian Dröge 2022-05-05 20:24:57 +03:00 committed by Tim-Philipp Müller
parent 9eee0dcc73
commit 8f7a2f1311

View file

@ -134,8 +134,6 @@ static GstFlowReturn gst_flv_mux_write_eos (GstFlvMux * mux);
static GstFlowReturn gst_flv_mux_write_header (GstFlvMux * mux); static GstFlowReturn gst_flv_mux_write_header (GstFlvMux * mux);
static GstFlowReturn gst_flv_mux_rewrite_header (GstFlvMux * mux); static GstFlowReturn gst_flv_mux_rewrite_header (GstFlvMux * mux);
static gboolean gst_flv_mux_are_all_pads_eos (GstFlvMux * mux); static gboolean gst_flv_mux_are_all_pads_eos (GstFlvMux * mux);
static GstFlowReturn gst_flv_mux_update_src_caps (GstAggregator * aggregator,
GstCaps * caps, GstCaps ** ret);
static GstClockTime gst_flv_mux_query_upstream_duration (GstFlvMux * mux); static GstClockTime gst_flv_mux_query_upstream_duration (GstFlvMux * mux);
static GstClockTime gst_flv_mux_segment_to_running_time (const GstSegment * static GstClockTime gst_flv_mux_segment_to_running_time (const GstSegment *
segment, GstClockTime t); segment, GstClockTime t);
@ -303,8 +301,7 @@ gst_flv_mux_class_init (GstFlvMuxClass * klass)
gstaggregator_class->flush = GST_DEBUG_FUNCPTR (gst_flv_mux_flush); gstaggregator_class->flush = GST_DEBUG_FUNCPTR (gst_flv_mux_flush);
gstaggregator_class->get_next_time = gstaggregator_class->get_next_time =
GST_DEBUG_FUNCPTR (gst_flv_mux_get_next_time); GST_DEBUG_FUNCPTR (gst_flv_mux_get_next_time);
gstaggregator_class->update_src_caps = gstaggregator_class->negotiate = NULL;
GST_DEBUG_FUNCPTR (gst_flv_mux_update_src_caps);
gst_element_class_add_static_pad_template_with_gtype (gstelement_class, gst_element_class_add_static_pad_template_with_gtype (gstelement_class,
&videosink_templ, GST_TYPE_FLV_MUX_PAD); &videosink_templ, GST_TYPE_FLV_MUX_PAD);
@ -2190,14 +2187,3 @@ wait_for_data:
GST_OBJECT_UNLOCK (aggregator); GST_OBJECT_UNLOCK (aggregator);
return GST_CLOCK_TIME_NONE; return GST_CLOCK_TIME_NONE;
} }
static GstFlowReturn
gst_flv_mux_update_src_caps (GstAggregator * aggregator,
GstCaps * caps, GstCaps ** ret)
{
GstFlvMux *mux = GST_FLV_MUX (aggregator);
*ret = gst_flv_mux_prepare_src_caps (mux, NULL, NULL, NULL, NULL);
return GST_FLOW_OK;
}