interfacing with gstreamer

Tim-Philipp Müller t.i.m at zen.co.uk
Thu May 26 10:23:58 PDT 2011


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




More information about the gstreamer-devel mailing list