Questions about gstreamer "hello world"

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

Questions about gstreamer "hello world"

Peter Cai
1.  In on_pad_added, the code just blinded link demuxer and decoder, what if there are more than one source sink dynamically added to dexmuxer? Does that work correctly?

static void
on_pad_added (GstElement *element,
GstPad *pad,
gpointer data)
{
GstPad *sinkpad;
GstElement *decoder = (GstElement *) data;

/* We can now link this pad with the vorbis-decoder sink pad */
g_print ("Dynamic pad created, linking demuxer/decoder\n");

sinkpad = gst_element_get_static_pad (decoder, "sink");

gst_pad_link (pad, sinkpad);

gst_object_unref (sinkpad);
}

==================

2. What dose converter do?

--
look to the things around you,the immediate world around you, if you are alive,it will mean something to you ——Paul Strand

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about gstreamer "hello world"

Stefan Sauer
Peter Cai schrieb:

> 1.  In on_pad_added, the code just blinded link demuxer and decoder,
> what if there are more than one source sink dynamically added to
> dexmuxer? Does that work correctly?
>
> static void
> on_pad_added (GstElement *element,
>
>               GstPad     *pad,
>               gpointer    data)
> {
>   GstPad *sinkpad;
>   GstElement *decoder = (GstElement *) data;
>
>   /* We can now link this pad with the vorbis-decoder sink pad */
>   g_print ("Dynamic pad created, linking demuxer/decoder\n");
>
>
>   sinkpad = gst_element_get_static_pad (decoder, "sink");
>
>   gst_pad_link (pad, sinkpad);
>
>   gst_object_unref (sinkpad);
> }
>  
>
you would check the media-type of the CAPS on the pad and link to the
appropriate decoder chain.

> ==================
>
> 2. What dose converter do?
syntax error. You did not said which. but converters usually adjust raw
data format differences (e.g. RGB <-> YUV for video or 24bit PCM <->
16bit PCM for audio).

Stefan

>
> --
> look to the things around you,the immediate world around you, if you
> are alive,it will mean something to you ——Paul Strand
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 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
>  


------------------------------------------------------------------------------
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