interfacing with gstreamer

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

interfacing with gstreamer

mattes
I am new to gstreamer. I did some reading and it looks really interesting.

I have a custom app, that captures and massages video frames
and already stores it in shared memory.

Ran across 'shmsrc/shmsink' interface. If my understanding is correct,
'shmsrc' would allow to feed frames directly into gstreamer.
something like:

  gst-launch shmsrc socket-path=mxapp !
    video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! xvimagesink

What do I need to do on my end to feed the 'shmsrc' interface?
I looked at sys/shm/gstshmsrc.c, though for newbies that's the tough angle
to start with.

Is there any sample code available, that shows how to feed the shmsrc
interface?

What other interfaces does gstreamer provide?

mattes









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

Re: interfacing with gstreamer

Tim-Philipp Müller-2
On Thu, 2011-05-26 at 09:55 -0700, mattes wrote:

Hi,

> I have a custom app, that captures and massages video frames
> and already stores it in shared memory.
>
> Ran across 'shmsrc/shmsink' interface. If my understanding is correct,
> 'shmsrc' would allow to feed frames directly into gstreamer.
> something like:
>
>   gst-launch shmsrc socket-path=mxapp !
>     video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! xvimagesink
>
> What do I need to do on my end to feed the 'shmsrc' interface?
> I looked at sys/shm/gstshmsrc.c, though for newbies that's the tough angle
> to start with.
>
> Is there any sample code available, that shows how to feed the shmsrc
> interface?
>
> What other interfaces does gstreamer provide?

You might find the "appsrc" element more convenient (if you're doing the
allocation yourself anyway).

You can push GstBuffers into it directly (just allocate a buffer and
then set GST_BUFFER_DATA, GST_BUFFER_MALLOCDATA, GST_BUFFER_SIZE and
GST_BUFFER_FREE_FUNC).

 Cheers
  -Tim


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