Closed deviator closed 7 years ago
In the addOnPadAdded callback you will need to use the decoder from the outer scope. Change the name of the element passed to the callback en it will work.
Like this:
demuxer.addOnPadAdded((pad, element)
{
stderr.writeln("Dynamic pad created, linking demuxer/decoder");
auto sink = decoder.getStaticPad("sink");
stderr.writeln("sink: ", sink); // not null
stderr.writeln(pad.link(sink)); // WAS_LINKED
});
Ohh... element
in callback is a demuxer
... Thanks!
I try rewrite gstreamers hello world to D, using gtk-d and get strange error about not linked pads.
My source code on D:
I get this output:
If I don't use dynamic linking pads all works fine (
audiotestsrc -> autoaudiosink
). If I compile C hello world all works fine (from gstreamer.freedesktop.org/documentation/).dub.sdl
build as
dub build