summaryrefslogtreecommitdiffstats
path: root/ext/faad
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2004-03-06 00:42:20 +0000
committerDavid Schleef <ds@schleef.org>2004-03-06 00:42:20 +0000
commit86db595f563c3b5da4427055f4afc439c12036b5 (patch)
tree917f010e633963aa567f4c9dd5ba0a6c856a6455 /ext/faad
parent42547f3e85c3b208dd1ca7e06445e6e61c6d4b86 (diff)
downloadgst-plugins-bad-86db595f563c3b5da4427055f4afc439c12036b5.tar.gz
gst-plugins-bad-86db595f563c3b5da4427055f4afc439c12036b5.tar.bz2
gst-plugins-bad-86db595f563c3b5da4427055f4afc439c12036b5.zip
ext/faad/gstfaad.c: Fix negotiation.
Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_init), (gst_faad_srcgetcaps), (gst_faad_chain): Fix negotiation. * ext/librfb/gstrfbsrc.c: (gst_rfbsrc_handle_src_event): Add key and button events. * gst-libs/gst/floatcast/floatcast.h: Fix a minor bug in this dung heap of code. * gst-libs/gst/gconf/gstreamer-gconf-uninstalled.pc.in: gstgconf depends on gconf * gst-libs/gst/gconf/gstreamer-gconf.pc.in: same * gst-libs/gst/play/play.c: (gst_play_pipeline_setup), (gst_play_video_fixate), (gst_play_audio_fixate): Add a fixate function to encourage better negotiation, particularly between audioconvert and osssink. * gst/audioconvert/gstaudioconvert.c: (gst_audio_convert_chain): * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Make some debugging more important. * gst/typefind/gsttypefindfunctions.c: Fix mistake in flash typefinding. * gst/vbidec/vbiscreen.c: Add glib header * pkgconfig/gstreamer-play.pc.in: Depends on gst-interfaces.
Diffstat (limited to 'ext/faad')
-rw-r--r--ext/faad/gstfaad.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index bb804cb2..6e272974 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -148,11 +148,7 @@ gst_faad_init (GstFaad *faad)
gst_element_add_pad (GST_ELEMENT (faad), faad->srcpad);
gst_pad_set_link_function (faad->srcpad, gst_faad_srcconnect);
- /* This was originally intended as a getcaps() function, but
- * in the end, we needed a srcconnect() function, so this is
- * not really useful. However, srcconnect() uses it, so it is
- * still there... */
- /*gst_pad_set_getcaps_function (faad->srcpad, gst_faad_srcgetcaps);*/
+ gst_pad_set_getcaps_function (faad->srcpad, gst_faad_srcgetcaps);
}
static GstPadLinkReturn
@@ -244,7 +240,7 @@ gst_faad_srcgetcaps (GstPad *pad)
return caps;
}
- return GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (pad));
+ return gst_caps_copy (GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (pad)));
}
static GstPadLinkReturn
@@ -357,12 +353,16 @@ gst_faad_chain (GstPad *pad,
&samplerate, &channels);
faad->samplerate = samplerate;
faad->channels = channels;
+
+ gst_pad_renegotiate (faad->srcpad);
+#if 0
if (gst_faad_srcconnect (faad->srcpad,
gst_pad_get_allowed_caps (faad->srcpad)) <= 0) {
GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, (NULL), (NULL));
gst_buffer_unref (buf);
return;
}
+#endif
}
out = faacDecDecode (faad->handle, &info,
@@ -379,12 +379,19 @@ gst_faad_chain (GstPad *pad,
info.channels != faad->channels) {
faad->samplerate = info.samplerate;
faad->channels = info.channels;
+ gst_pad_renegotiate (faad->srcpad);
+#if 0
if (gst_faad_srcconnect (faad->srcpad,
gst_pad_get_allowed_caps (faad->srcpad)) <= 0) {
GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, (NULL), (NULL));
gst_buffer_unref (buf);
return;
}
+#endif
+ }
+
+ if (info.samples == 0) {
+ return;
}
/* FIXME: did it handle the whole buffer? */