+_outfilter_caps_set_cb (GstPad * outfilter_sinkpad,
+ GParamSpec * arg G_GNUC_UNUSED, StreamGroup * group)
+{
+ GstCaps *caps;
+
+ g_object_get (outfilter_sinkpad, "caps", &caps, NULL);
+ GST_INFO_OBJECT (group->ebin, "Forcing caps to %" GST_PTR_FORMAT, caps);
+ g_object_set (group->outfilter, "caps", caps, NULL);
+ g_signal_handler_disconnect (outfilter_sinkpad, group->outputfilter_caps_sid);
+ group->outputfilter_caps_sid = 0;
+}
+
+static void
+_set_group_caps_format (StreamGroup * sgroup, GstEncodingProfile * prof,
+ GstCaps * format)
+{
+ g_object_set (sgroup->outfilter, "caps", format, NULL);
+
+ if (!gst_encoding_profile_get_allow_dynamic_output (prof)) {
+ if (!sgroup->outputfilter_caps_sid) {
+ sgroup->outputfilter_caps_sid =
+ g_signal_connect (sgroup->outfilter->sinkpads->data,
+ "notify::caps", G_CALLBACK (_outfilter_caps_set_cb), sgroup);
+ }
+ }
+}
+
+static void