gst_tag_list_free (otags);
GST_OBJECT_UNLOCK (enc);
}
+
+/*
+ * gst_audio_encoder_set_output_format:
+ * @enc: a #GstAudioEncoder
+ * @caps: #GstCaps
+ *
+ * Configure output caps on the srcpad of @enc.
+ *
+ * Returns: %TRUE on success.
+ **/
+gboolean
+gst_audio_encoder_set_output_format (GstAudioEncoder * enc, GstCaps * caps)
+{
+ gboolean res = FALSE;
+
+ GST_DEBUG_OBJECT (enc, "Setting srcpad caps %" GST_PTR_FORMAT, caps);
+
+ if (!gst_caps_is_fixed (caps))
+ goto refuse_caps;
+
+ res = gst_pad_set_caps (enc->srcpad, caps);
+
+done:
+ return res;
+
+ /* ERRORS */
+refuse_caps:
+ {
+ GST_WARNING_OBJECT (enc, "refused caps %" GST_PTR_FORMAT, caps);
+ res = FALSE;
+ goto done;
+ }
+}
GstCaps * gst_audio_encoder_proxy_getcaps (GstAudioEncoder * enc,
GstCaps * caps);
+gboolean gst_audio_encoder_set_output_format (GstAudioEncoder * enc,
+ GstCaps * caps);
+
/* context parameters */
GstAudioInfo * gst_audio_encoder_get_audio_info (GstAudioEncoder * enc);