[gst-devel] HELP: how to using c to implement this ?

Freeman Zhang pcman.zhang at gmail.com
Wed Nov 4 11:02:50 CET 2009


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 <kapil.agl at gmail.com>

> You might want to try
>
> gst_element_link_filtered ()
>
>
> -kapil
>
> On Wed, Nov 4, 2009 at 2:57 PM, Freeman Zhang <pcman.zhang at gmail.com>wrote:
>
>> HI ,
>>
>> I'm using command line:
>> gst-launch filesrc location=recordSample ! audio/x-alaw, channels=1,
>> rate=8000 ! alawdec ! autoaudiosink
>> to 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
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>
>
> --
> 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
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091104/5c705768/attachment.htm>


More information about the gstreamer-devel mailing list