[gst-devel] mime type of stream in playbin

Manish Rana manish.rana at gmail.com
Thu Jun 19 17:49:44 CEST 2008


Hi,

Using SoupHttpSrc u will get the media data.
Now u will connect decodebin next to SoupttpSrc.

SoupHttpSrc->decodebin:

Add a callback to decodebin on signal
"new-decoded-pad<http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-decodebin2.html#GstDecodeBin2-new-decoded-pad>"

You will get this callback when data will be decoded by your decodebin.
Here you will get a PAD as the pointer. You can use this pad and get the
caps :)
and from caps -> Structure and using Structure again see u have media :)
Now u can take the decision which Bin/ Element to be created next i.e.
whether u want to create the audio sink bin or video sink bin, depending on
the caps and link the PAD coming in the callback (this will be src pad of
the decodebin) to the sink pad of the Video/Audio Sink Bin.
I refered A/V Bin as u need to add Queue before A/V Sink.


If u want to handle the URI then create your source element using
gst_element_make_from_uri<http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstUriHandler.html#gst-element-make-from-uri>
This method will give u the HttpSrc plugin instance depending on the
Availability and Rank.

Please let me know if i answered your query, or u wanted something else.
Others please correct me if i am wrong( as that will help at least two of us
and may be many more).

BR
Manish



On Thu, Jun 19, 2008 at 6:44 PM, Israël Prince-Béliveau <
ipbeliveau at classeaudio.com> wrote:

>  Hi,
>
> well, the thing is I've been able to use playbin instead of decodebin for
> everything in my software, but this. If I understand, I can do the same
> thing with decodebin but I have to do things manually(create every pads).
> All of my src streams are souphttpsrc. Do I have access to similar mechanism
> for uri handling, network buffering, end of stream, volume? Sorry for all
> the questions. The most simple thing for me would be to have some kind of
> message on the bus or a callback when the stream type as been found.
>
> The instruction that you gave me, are they using decodebin? If I look at
> the example code on chapter 19, I don't see anything about buffers in there.
> I don't want to be reinveting the wheel neither.
>
> Thanks a lot.
>
> Israel
>
>  ------------------------------
> *From:* Manish Rana [mailto:manish.rana at gmail.com]
> *Sent:* Thursday, June 19, 2008 3:07 AM
> *To:* Israël Prince-Béliveau
> *Cc:* gstreamer-devel at lists.sourceforge.net
> *Subject:* Re: [gst-devel] mime type of stream in playbin
>
> Hi,
>
> Please get the Caps of the Coming Buffer using gst_buffer_get_caps
> then get the structure of the caps using gst_caps_get_structure
> and then use gst_structure_get_string(  temp, "media") to get the media
> type
>
> this might help u
> if u need more info let me know
>
> BR
> Manish
>
> On Thu, Jun 19, 2008 at 2:12 AM, Israël Prince-Béliveau <
> ipbeliveau at classeaudio.com> wrote:
>
>>  Hello,
>>
>> I'd like to get the mime type of the stream for a playbin element. The
>> thing is, I'd like to change the audio or video sink depending on the
>> mime type.
>> Can anyone help me on this?
>>
>> Thanks,
>>
>> Israel
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> 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/20080619/6f37366c/attachment.htm>


More information about the gstreamer-devel mailing list