Multiple pad src element

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

Multiple pad src element

gem-tos
Hello all,

firstly, excuse me for my poor english.

I need to write a source element with at least 2 source pads (audio and video)
I started with a customized version of videotestsrc.
I am able to get frame from my compression card and display the video in autovideosink element but now I need to add audio.

I saw that I can't have multiple src pads with BaseSrc class.

So my question is, can someone help me to start writing a new source element with 2 src pads or give me a starting point ?

Thanks

BR
Reply | Threaded
Open this post in threaded view
|

Re: Multiple pad src element

saepia
It is against the philosophy of GStreamer, I suggest rather to create two sources (audio and video) and then mux them using desired muxer, or use two sinks if you want to display them.

m.

2012/7/23 gem-tos <[hidden email]>
Hello all,

firstly, excuse me for my poor english.

I need to write a source element with at least 2 source pads (audio and
video)
I started with a customized version of videotestsrc.
I am able to get frame from my compression card and display the video in
autovideosink element but now I need to add audio.

I saw that I can't have multiple src pads with BaseSrc class.

So my question is, can someone help me to start writing a new source element
with 2 src pads or give me a starting point ?

Thanks

BR



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Multiple-pad-src-element-tp4655662.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Multiple pad src element

gem-tos
Thanks for your reply.

Even if it's against the philosophy of Gstreamer, is it possible to create a src with 2 pads ?
I know that it's possible in DirectShow.

The problem is that I can't create 2 src because my driver not allow to open several times the communication with the hardware.

That's why I need a src with 2 pads.

As anybody a solution to do this ?

Thx

BR
Reply | Threaded
Open this post in threaded view
|

Re: Multiple pad src element

Wim Taymans
On 07/26/2012 11:40 AM, gem-tos wrote:
> Thanks for your reply.
>
> Even if it's against the philosophy of Gstreamer, is it possible to create a
> src with 2 pads ?

You need to build a bin from two sources or a bin from 1 source and a
demuxer. It is always possible to construct a source like this. There
are some examples in rtspsrc (multiple sources in 1 bin) and
uridecodebin (1 source + demuxer).

> I know that it's possible in DirectShow.
>
> The problem is that I can't create 2 src because my driver not allow to open
> several times the communication with the hardware.

You need to make an object that can be shared between your two source
elements then or you can output a muxed format and demux it in another
element. You can find some examples on how to do this sharing in the
jack plugins.

Wim

>
> That's why I need a src with 2 pads.
>
> As anybody a solution to do this ?
>
> Thx
>
> BR
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Multiple-pad-src-element-tp4655662p4655703.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Multiple pad src element

gem-tos
> You need to make an object that can be shared between your two source
elements then

That's exactly what I plan to do but I don't know how.
I am sorry, I am quite new to Gstreamer framework.

Is there any example on internet ?

Thx
Reply | Threaded
Open this post in threaded view
|

Re: Multiple pad src element

Stefan Sauer
On 07/26/2012 02:29 PM, gem-tos wrote:
>> You need to make an object that can be shared between your two source
> elements then
>
> That's exactly what I plan to do but I don't know how.
> I am sorry, I am quite new to Gstreamer framework.
>
> Is there any example on internet ?
Wim pointed you to the jack plugins in gst-plugns-good for an example.

Stefan

>
> Thx
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Multiple-pad-src-element-tp4655662p4655707.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel