gstreamer shmsrc interface

Olivier Crête olivier.crete at collabora.com
Wed Jun 22 12:04:19 PDT 2011


Hi,

On Wed, 2011-06-22 at 11:02 -0700, mattes wrote:
> I getting my feet wet with gstreamer. Looks pretty cool.
> 
> I have an app that already captures and overlays video frames.
> I like to import these frames into gstreamer using the shmsrc
> interface.
> 
> Is there some test code/sample available I could use as a starter kit?
> Something that outlines what needs to be done to satisfy the needs of shmsrc:
> 
>   e.g.   gst-launch shmsrc socketpath=mydata ! video/x-raw-yuv,witdh=320,height=240 ! ...
> 
> Unfortunately nothing popped up searching/googl'ing the net'z.

Basically, that's it. I should really write some doc.

Short example:

$ gst-launch -v videotestsrc ! 'video/x-raw-yuv, width=320, height=240,
framerate=15/1,  format=(fourcc)YUY2' ! shmsink socket-path=/tmp/test
shm-size=10000000 wait-for-connection=0
$ gst-launch shmsrc socket-path=/tmp/test is-live=1 ! video/x-raw-yuv,
width=320, height=240, framerate=15/1,  'format=(fourcc)YUY2' !
xvimagesink

- The default shm-size is too small for video, don't be afraid to make
it larger, maybe I should change the default..
- It seems that wait-for-connection mode is broken (oops)

That said, if both ends are inside the same program, you should be using
appsrc/appsink instead. The shm stuff is only meant for IPC, also, you
can integrate shmpipe.[ch] inside your own application if you don't want
to have GStreamer on both sides (but there is no API guarantee and no
communication compatibility guarantees for future releases).


-- 
Olivier Crête
olivier.crete at collabora.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110622/8c3cb1aa/attachment.pgp>


More information about the gstreamer-devel mailing list