HI
Please help me.
When I link "wavparse" to the "audioconvert" it is failed. but if I use "mad", it will success.
I have ran it from the command line:
"gst-launch filesrc location=./media/login.wav ! wavparse ! audioconvert ! audioresample ! alawenc ! rtppcmapay" it is ok.
I don't know why it failed, please help me, how can I can the error details?
Thanks in advance.
Freeman
P.S the source code:
// Source "filesrc ! wavparse ! audioconvert "
GstElement* src = gst_element_factory_make("filesrc", "src"); SET(src, "location", cmd->filename); printf("File = %s\n", cmd->filename); // Parse GstElement* parse = NULL; switch (cmd->filetype) { case EWAVE: printf("Using wav parser\n"); parse = gst_element_factory_make("wavparse", "parse"); break; case EMP3: printf("Using mp3 parser\n"); parse = gst_element_factory_make("mad", "parse"); break; default: break; } // Converter GstElement* convert = gst_element_factory_make("audioconvert", "con"); // Audio Sample ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Mon, 2009-11-02 at 18:37 +0800, Freeman Zhang wrote:
Hi, > When I link "wavparse" to the "audioconvert" it is failed. but if I > use "mad", it will success. > > I have ran it from the command line: > "gst-launch filesrc location=./media/login.wav ! wavparse ! > audioconvert ! audioresample ! alawenc ! rtppcmapay" it is ok. > > I don't know why it failed, please help me, how can I can the error > details? Because that pipeline assumes that the .wav file contains raw audio (which is the only thing audioconvert can handle). However, in the case where it fails the .wav file seems to contain mp3-encoded audio, which audioconvert can't handle (but 'mad' can). You can avoid this kind of problem if you use the 'decodebin2' element instead of wavparse. (or replace filesrc ! wavparse with 'uridecodebin'). Cheers -Tim ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Oh~~~
Get it, thanks a lot.
2009/11/2 Tim-Philipp Müller <[hidden email]> On Mon, 2009-11-02 at 18:37 +0800, Freeman Zhang wrote: ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
But, why the command line "gst-launch" can handle it?
2009/11/2 Freeman Zhang <[hidden email]>
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Mon, 2009-11-02 at 19:57 +0800, Freeman Zhang wrote:
> But, why the command line "gst-launch" can handle it? Ah, sorry, it seems I was a bit too quick and completely misunderstood your problem. The problem is that wavparse's sink pad is a sometimes pad which will be added only later when data flow starts (-> 'dynamic pads'). The reason for that is that wavparse needs to figure out the type of data first (it uses dynamic pads for historical reason related to decodebin/playbin, it doesn't strictly have to, but we can't change that now). So there will be no sink pad to link to after the element has been created, and you will need to do the linking to audioconvert or whatever in a pad-added callback later. Mad's sink pad on the other hand always exists, so you can link it right away. Still, I would recommend you just use uridecodebin/decodebin2/playbin2 if that's an option. Cheers -Tim ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks you very much, I understand.
2009/11/2 Tim-Philipp Müller <[hidden email]>
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Tim-Philipp Müller-2
On Mon, 2009-11-02 at 12:17 +0000, Tim-Philipp Müller wrote:
> The problem is that wavparse's sink pad is a sometimes pad (...) > Mad's sink pad on the other hand always exists, (...) Err, source pad not sink pad. Cheers -Tim ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |