gst/wavparse/gstwavparse.c: Add the pad to the element after setting up the caps. This makes it a lot easier to autop...
Original commit message from CVS: * gst/wavparse/gstwavparse.c: (gst_wavparse_fmt), (gst_wavparse_handle_seek), (gst_wavparse_srcpad_event): Add the pad to the element after setting up the caps. This makes it a lot easier to autoplug.
This commit is contained in:
parent
9dd4541616
commit
77ec1207d3
@ -1,3 +1,10 @@
|
|||||||
|
2004-07-28 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/wavparse/gstwavparse.c: (gst_wavparse_fmt),
|
||||||
|
(gst_wavparse_handle_seek), (gst_wavparse_srcpad_event):
|
||||||
|
Add the pad to the element after setting up the caps. This
|
||||||
|
makes it a lot easier to autoplug.
|
||||||
|
|
||||||
2004-07-27 Steve Lhomme <steve.lhomme@free.fr>
|
2004-07-27 Steve Lhomme <steve.lhomme@free.fr>
|
||||||
|
|
||||||
* gst/median/gstmedian.c:
|
* gst/median/gstmedian.c:
|
||||||
|
@ -542,8 +542,6 @@ gst_wavparse_fmt (GstWavParse * wav)
|
|||||||
wav->depth = header->size;
|
wav->depth = header->size;
|
||||||
wav->bps = header->av_bps;
|
wav->bps = header->av_bps;
|
||||||
|
|
||||||
gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad);
|
|
||||||
|
|
||||||
caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL);
|
caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL);
|
||||||
|
|
||||||
if (caps) {
|
if (caps) {
|
||||||
@ -551,6 +549,8 @@ gst_wavparse_fmt (GstWavParse * wav)
|
|||||||
gst_caps_free (caps);
|
gst_caps_free (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad);
|
||||||
|
|
||||||
GST_DEBUG ("frequency %d, channels %d", wav->rate, wav->channels);
|
GST_DEBUG ("frequency %d, channels %d", wav->rate, wav->channels);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -617,7 +617,6 @@ gst_wavparse_other (GstWavParse * wav)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gst_wavparse_handle_seek (GstWavParse * wav)
|
gst_wavparse_handle_seek (GstWavParse * wav)
|
||||||
{
|
{
|
||||||
#if 1
|
|
||||||
GstRiffRead *riff = GST_RIFF_READ (wav);
|
GstRiffRead *riff = GST_RIFF_READ (wav);
|
||||||
GstEvent *event = NULL;
|
GstEvent *event = NULL;
|
||||||
guint32 remaining;
|
guint32 remaining;
|
||||||
@ -660,9 +659,6 @@ gst_wavparse_handle_seek (GstWavParse * wav)
|
|||||||
gst_pad_event_default (wav->sinkpad, event);
|
gst_pad_event_default (wav->sinkpad, event);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_BUFFER_SIZE 4096
|
#define MAX_BUFFER_SIZE 4096
|
||||||
@ -880,7 +876,6 @@ gst_wavparse_get_event_masks (GstPad * pad)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
|
gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
#if 1
|
|
||||||
GstWavParse *wavparse = GST_WAVPARSE (GST_PAD_PARENT (pad));
|
GstWavParse *wavparse = GST_WAVPARSE (GST_PAD_PARENT (pad));
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
|
|
||||||
@ -913,9 +908,6 @@ gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
|
|||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstElementStateReturn
|
static GstElementStateReturn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user