HI , I'm using command line: gst-launch filesrc location=recordSample ! audio/x-alaw, channels=1, rate=8000 ! alawdec ! autoaudiosinkto play a raw G711 file, it works. But I don't know which GstElement shall I use with "audio/x-alaw, channels=1, rate=8000", is it "capsfiler"? Please give me a hand.
Thanks Freeman
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
You might want to try
gst_element_link_filtered ()-kapil On Wed, Nov 4, 2009 at 2:57 PM, Freeman Zhang <[hidden email]> wrote:
-- http://www.linkedin.com/in/kapilagrawal ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Is it in this way?
GstElement* filesrc = gst_element_factory_make("filesrc", "filesrc"); g_object_set(G_OBJECT(filesrc), "location", cmd->filename, NULL);
GstCaps *caps = gst_caps_from_string("audio/x-alaw, channels=1, rate=8000"); g_assert(caps != NULL);
decoder = gst_element_factory_make("alawdec", "decoder"); res = gst_element_link_filtered (filesrc, decoder, caps);
g_assert(res == TRUE); But it return: gst_element_link_pads_filtered: assertion `GST_IS_BIN (parent)' failed
Thanks
2009/11/4 Kapil Agrawal <[hidden email]> You might want to trygst_element_link_filtered ()-kapil ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Wed, 2009-11-04 at 18:02 +0800, Freeman Zhang wrote:
> decoder = gst_element_factory_make("alawdec", "decoder"); > res = gst_element_link_filtered (filesrc, decoder, caps); > g_assert(res == TRUE); > > But it return: > gst_element_link_pads_filtered: assertion > `GST_IS_BIN (parent)' failed You need to add elements to a pipeline/bin before linking them. Cheers -Tim ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Get it.
Thank you very much.
2009/11/4 Tim-Philipp Müller <[hidden email]>
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Well, for simplify my work.
I'm using gst_parse_launch to create the pipeline: gchar str[200]; sprintf(str, "filesrc location=./media/%s" \
"! audio/x-alaw, channels=1, rate=8000" \ "! alawdec ! autoaudiosink", cmd->filename);
GError* err = NULL; pipeline = gst_parse_launch(str, &err);
g_assert(pipeline != NULL); // Play
g_print("Playing."); gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (g_loop);
gst_element_set_state (pipeline, GST_STATE_NULL); g_print("Stopped\n");
But no sound output, I tried at command-line, it works. What's the problem? Thanks 2009/11/4 Freeman Zhang <[hidden email]> Get it. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |