[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: [gst-devel] dynamic pipeline
From:       "Cameron Gorrie" <sastraxi () gmail ! com>
Date:       2008-11-26 3:52:29
Message-ID: 448b46400811251952m40f7392dk167e13402f50b79d () mail ! gmail ! com
[Download RAW message or body]

2008/11/25 Hayden Andrews <hayden@heydan.co.uk>:
>  Hi ya :)
>
> Sorry, probably a very 'beginner' question ...
>
> I have a filesrc and a decodebin, and am using a callback on the
> new-decoded-pad signal to create elements for the audio or/and video
> streams, should either appear.
>
>  From the video pad, I want to setup different filters depending on the
> actual caps of the data. I can get the ?template? caps of the pad, but
> when I guessed that I need to get the negotiated caps (am I correct?) it
> returns NULL as there is not yet any data.
>
> What is the best/standard way of finding the caps of the actual data
> that flows through that pad so as to add in the correct filters asap?
>
> I just tried: when the pad is created, I simply placed a callback on it
> for when data flows. And then in the callback create the required
> elements, but, the callback is never called, although the stream plays.
> I guess that the 'have-data' signal only fires if the pad is linked?
> Would I temporarily link it to a fakesink, wait for data to see what the
> actual caps are, and then rewrite the pipeline? I'm guessing wildly :)
> Any pointers would be much appreciated! I'm sure that this scenario is
> quite normal.
>
> Many thanks,
>
>
> Hayden

I had this same problem, too. I can point you to how I eventually did
it but this does
require you to put it into PLAYING mode... I do want to find a way to
do this cleaner,
as I'm thinking this might actually *decode* more data than is
necessary figure out the
"fixed raw caps".

Here is a pastebin thing with the code:
http://pastebin.ca/1267200

OH! I just remembered, I had a discussion on #gstreamer with someone
(I can't remember
whom, sorry!) that said this may be a bug in decodebin2. Right,
Hayden, that's the other
thing, you should use a decodebin2 as it is the one that is supposed
to give fixed caps
even when it's not fully hitched up in the pipeline.

I hope you can find a more ideal way, or if someone more experienced
can tell us a
better way. This code still has a problem with sometimes not issuing
the pipeline PLAYING
state change, so sometimes the code just never finishes. If anyone has
an idea how to
fix this problem, it would be very, very helpful.

So there's my rambling done; I hope it helps.
Cameron

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic