vorbis: Update for negotiation related API changes

This commit is contained in:
Sebastian Dröge 2011-05-16 15:25:34 +02:00
parent c276eec54e
commit ed89c9d38f
2 changed files with 7 additions and 3 deletions

View file

@ -269,13 +269,17 @@ gst_vorbis_enc_generate_sink_caps (void)
} }
static GstCaps * static GstCaps *
gst_vorbis_enc_sink_getcaps (GstPad * pad) gst_vorbis_enc_sink_getcaps (GstPad * pad, GstCaps * filter)
{ {
GstVorbisEnc *vorbisenc = GST_VORBISENC (GST_PAD_PARENT (pad)); GstVorbisEnc *vorbisenc = GST_VORBISENC (GST_PAD_PARENT (pad));
if (vorbisenc->sinkcaps == NULL) if (vorbisenc->sinkcaps == NULL)
vorbisenc->sinkcaps = gst_vorbis_enc_generate_sink_caps (); vorbisenc->sinkcaps = gst_vorbis_enc_generate_sink_caps ();
if (filter)
return gst_caps_intersect_full (filter, vorbisenc->sinkcaps,
GST_CAPS_INTERSECT_FIRST);
else
return gst_caps_ref (vorbisenc->sinkcaps); return gst_caps_ref (vorbisenc->sinkcaps);
} }

View file

@ -188,7 +188,7 @@ vorbis_parse_push_headers (GstVorbisParse * parse)
gsize size; gsize size;
/* get the headers into the caps, passing them to vorbis as we go */ /* get the headers into the caps, passing them to vorbis as we go */
caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad)); caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad, NULL));
vorbis_parse_set_header_on_caps (parse, caps); vorbis_parse_set_header_on_caps (parse, caps);
GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps); GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps);
gst_pad_set_caps (parse->srcpad, caps); gst_pad_set_caps (parse->srcpad, caps);