Simple

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple

Frédéric Gaudy-2
Hello,

I try to create a program that just read a audio file using [filesrc ! decodebin ! autoaudiosink] pipe.

But when playing I've got this error :
Error ! Internal data flow error.
Debug ! gstbasesrc.c(2240): gst_base_src_loop (): /convert/filesrc:
streaming task paused, reason not-linked (-1)

But I've linked filesrc to decodebin, so I don't understand the meaning of this error

I hope you could help me.

Code :
public void read() {
        File source      = File.new_for_uri(this.source);
        File destination = File.new_for_uri(this.destination);
       
        Element filesrc = ElementFactory.make("filesrc", "filesrc");
        filesrc.set("location", source..get_path() );
       
        Element decodebin = ElementFactory.make("decodebin", "decodebin");
       
        Element filesink = ElementFactory.make("autoaudiosink", "filesink");
       
        this.pipeline = new Pipeline("convert");
        pipeline.add_many(filesrc, decodebin, filesink);
        var bus = pipeline.get_bus();
        bus.add_signal_watch();
        bus.message += this.message_bus_callback;
       
        filesrc.link(decodebin);
        decodebin.link(filesink);
       
        this.pipeline.set_state( Gst.State.PLAYING );
}


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Simple

Stefan Sauer
hi,

Frédéric Gaudy schrieb:

> Hello,
>
> I try to create a program that just read a audio file using [filesrc !
> decodebin ! autoaudiosink] pipe.
>
> But when playing I've got this error :
> Error ! Internal data flow error.
> Debug ! gstbasesrc.c(2240): gst_base_src_loop (): /convert/filesrc:
> streaming task paused, reason not-linked (-1)
>
> But I've linked filesrc to decodebin, so I don't understand the meaning
> of this error

Read in the docs about sometimes pads. Decodebin will create pads when analyzing
the media and fire signal when the pads are created. Then you can link from the
callback. This is an faq and if you would have checked the return code of
element.link() you would have noticed.

Stefan

>
> I hope you could help me.
>
> Code :
> public void read() {
>         File source      = File.new_for_uri(this.source);
>         File destination = File.new_for_uri(this.destination);
>        
>         Element filesrc = ElementFactory.make("filesrc", "filesrc");
>         filesrc.set("location", source..get_path() );
>        
>         Element decodebin = ElementFactory.make("decodebin", "decodebin");
>        
>         Element filesink = ElementFactory.make("autoaudiosink", "filesink");
>        
>         this.pipeline = new Pipeline("convert");
>         pipeline.add_many(filesrc, decodebin, filesink);
>         var bus = pipeline.get_bus();
>         bus.add_signal_watch();
>         bus.message += this.message_bus_callback;
>        
>         filesrc.link(decodebin);
>         decodebin.link(filesink);
>        
>         this.pipeline.set_state( Gst.State.PLAYING );
> }
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel