After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 349902 - [LADSPA] implement sources
[LADSPA] implement sources
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-04 09:56 UTC by Jono Bacon
Modified: 2013-08-17 20:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Jono Bacon 2006-08-04 09:56:58 UTC
Please describe the problem:
When testing LADSPA plug-ins that only have a src pad, the pipeline never gets beyong prerolling. I have tested this with two elements:

gst-launch-0.10 ladspa-logistic ! audioconvert ! alsasink

gst-launch-0.10 ladspa-Roessler ! audioconvert ! alsasink

I get:

jono@forge:/sources/gstreamer/head/gst-plugins-good/ext/ladspa$ gst-launch-0.10 ladspa-logistic ! audioconvert ! alsasink

(gst-launch-0.10:18277): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `gst_element_class_get_pad_template (klass, templ->name_template) == NULL' failed

(gst-launch-0.10:18277): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `gst_element_class_get_pad_template (klass, templ->name_template) == NULL' failed
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

and...

jono@forge:/sources/gstreamer/head/gst-plugins-good/ext/ladspa$ gst-launch-0.10 ladspa-Roessler ! audioconvert ! alsasink

(gst-launch-0.10:18328): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `gst_element_class_get_pad_template (klass, templ->name_template) == NULL' failed

(gst-launch-0.10:18328): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `gst_element_class_get_pad_template (klass, templ->name_template) == NULL' failed
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

At that point, it just hangs until I stop gst-launch with Ctrl-C.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Andy Wingo 2006-08-08 20:24:15 UTC
This is because these days, GStreamer pipelines tend to run with threads on the source elements. I'd really prefer for the ladspa elements to have nothing to do with threads, although taking input from multiple threads will probably have to happen at some point (it's currently not threadsafe).

The proper solution, IMO, is for alsasink to activate itself in pull mode, thereby driving the pipeline. However this is currently unsupported. I'd suggest waiting, if possible, until alsasink supports pull-mode operation.
Comment 2 Wim Taymans 2006-08-16 16:52:26 UTC
The source and sink ladspa plugins should extend basesrc and basesink respectively  to maximise the pain/pleasure ratio.
Comment 3 Andy Wingo 2006-08-17 08:19:36 UTC
Sink ladspa plugins aren't really useful; I wouldn't waste time on them.

Src plugins are useful tho. Perhaps the ladspa base class needs to be a helper object instead, like mixers. Blah.
Comment 4 Jon Nordby 2009-11-30 20:22:04 UTC
I just ran into this, still same behaviour. Does alsasink have the mentioned pull-mode now? Or is there another preferred solution?

PS: bug should be moved to component -bad, since
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2009-12-02 18:45:12 UTC
Jon, what pipeline did you try? There is experimental pull mode in basesinks (add can-activate-pull=TRUE).
Comment 6 Jon Nordby 2009-12-05 23:34:45 UTC
gst-launch-0.10 ladspa-logistic ! audioconvert ! alsasink
gst-launch-0.10 ladspa-analogueOsc ! audioconvert ! alsasink
gst-launch-0.10 ladspa-sinCos ! audioconvert ! alsasink

All end being stuck in PREROLLING:
[jon@jon-laptop jonnors-mypaint-clone]$ gst-launch-0.10 ladspa-analogueOsc ! audioconvert ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

I'm thought I tried adding can-activate-pull=TRUE to alsasink and it gave the same result. But now I'm getting a segfault on each invokation. Sometimes it reaches "Pipeline is PREROLLING" and sometimes it doesnt:

[jon@jon-laptop ~]$ gst-launch-0.10 ladspa-sinCos ! audioconvert ! alsasink can-activate-pull=TRUE
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

** (gst-launch-0.10:17964): CRITICAL **: gst_signal_processor_prepare: assertion `GST_SIGNAL_PROCESSOR_IS_RUNNING (self)' failed
Caught SIGSEGV accessing address 0x38
Spinning.  Please run 'gdb gst-launch 17964' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
^C
[jon@jon-laptop ~]$ gst-launch-0.10 ladspa-sinCos ! audioconvert ! alsasink can-activate-pull=TRUE
Setting pipeline to PAUSED ...

** (gst-launch-0.10:17985): CRITICAL **: gst_signal_processor_prepare: assertion `GST_SIGNAL_PROCESSOR_IS_RUNNING (self)' failed
Caught SIGSEGV accessing address 0x38

This is on current stable of gstreamer and plugins (bad+good+base).
I will try to see if the issue persists in git version and file a new bug if that is the case.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-01 22:00:25 UTC
Oh my. There is a lot of code missing in GstSignalProcessor. It basically never starts a task with a loop function. Thus sources never work. I am overhauling this currently.
Comment 8 Christian Fredrik Kalager Schaller 2011-05-20 13:57:50 UTC
Stefan did you finish that overhaul and is this bug ready to be closed now?
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2011-05-20 18:05:06 UTC
I only have a WIP patch. Main issue are sources with multiple outputs, as those won't work with basesrc/signalprocessor.
Comment 10 Edward Hervey 2013-08-13 18:45:01 UTC
This bug has an assigned developer but has not received activity in almost a year.

Is the assigned person still working on this ?
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2013-08-17 12:33:47 UTC
This is done.
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2013-08-17 19:23:51 UTC
Why obsolete? It was fixed in:
commit 70e208d08e0330112260b1ea3503f50e203977a8
Author: Juan Manuel Borges Caño <juanmabcmail@gmail.com>
Date:   Fri May 3 11:34:34 2013 +0200

    ladspa: improved port to gstreamer 1.0
    
    Fixes: #698927
Comment 13 Tim-Philipp Müller 2013-08-17 20:07:01 UTC
Fixed needs a milestone for release purposes (for our scripts), so if we don't know when/where exactly it's been fixed I mark it as obsolete so I don't have to go through it again when making releases later.

Git says it's fixed in 1.1.1 so let's milestone to that then :)