diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2002-02-19 12:55:16 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2002-02-19 12:55:16 +0000 |
commit | 5eb303aaf66963ea629185a233865f06155f2fee (patch) | |
tree | 39ac6500e7a3ac607cdfc2166219c9504d4aef72 | |
parent | 61e050012641823352205d890d319f34245c248f (diff) | |
download | gstreamer-plugins-ugly-5eb303aaf66963ea629185a233865f06155f2fee.tar.gz |
somebody help me fix lame ;)
Original commit message from CVS:
somebody help me fix lame ;)
I commented out the state change function because it is called before lame has the right caps.
Is the state change function still necessary ?
in any case, at least now lame actually listens to osssrc re: rate and channels
-rw-r--r-- | ext/lame/gstlame.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c index a5c74795..2cd83caf 100644 --- a/ext/lame/gstlame.c +++ b/ext/lame/gstlame.c @@ -320,7 +320,7 @@ gst_lame_class_init (GstLameClass *klass) gobject_class->set_property = gst_lame_set_property; gobject_class->get_property = gst_lame_get_property; - gstelement_class->change_state = gst_lame_change_state; + //gstelement_class->change_state = gst_lame_change_state; } static GstPadConnectReturn @@ -340,8 +340,9 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps) gst_event_new_info ("channels", GST_PROPS_INT (lame->num_channels), NULL)); gst_element_send_event (GST_ELEMENT (lame), gst_event_new_info ("rate", GST_PROPS_INT (lame->samplerate), NULL)); - + GST_DEBUG (0, "rate=%d, channels=%d\n", lame->samplerate, lame->num_channels); + g_print ("rate=%d, channels=%d\n", lame->samplerate, lame->num_channels); if (gst_lame_setup (lame)) { lame->initialized = TRUE; @@ -710,8 +711,11 @@ gst_lame_setup (GstLame *lame) { GST_DEBUG_ENTER ("(\"%s\")", gst_element_get_name (GST_ELEMENT (lame))); + g_assert (!lame->initialized); + /* copy the parameters over */ lame_set_in_samplerate (lame->lgf, lame->samplerate); + /* force mono encoding if we only have one channel */ if (lame->num_channels == 1) lame->mode = 3; |