Problem with using shmsink/shmsrc

mattes effemm at mykmk.com
Wed May 15 10:03:16 PDT 2013


On Tue, 14 May 2013 22:00:19 -0700 (PDT) "shiva.mudugal"
<shiva.mudugal at gmail.com> wrote

> Hi,
> 
> can you please let me know how you got this working. Am also trying to do
> something similar to what you have done.
> 
> I used "filesrc" to feed shmsink and and on the other hand I used shmsrc to
> read from shared memory. On the receiving side pipeline is not getting
> propelled it self. Below are the pipelines I used.
> 
> sending side:
> 
> gst-launch-0.10 filesrc location=~/Downloads/test_cases/output_file.ts  !
> typefind   ! shmsink socket-path=/tmp/feed-control-pipe shm-size=10000000
> wait-for-connection=1 -v
> Setting pipeline to PAUSED ...
> /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps
> = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstShmSink:shmsink0.GstPad:sink: caps = video/mpegts,
> systemstream=(boolean)true, packetsize=(int)188
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> 
> Receiving side:
> gst-launch-0.10 shmsrc socket-path=/tmp/feed-control-pipe ! video/mpegts,
> systemstream=true, packetsize=188 ! decodebin2 ! queue ! autovideosink
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> 
> Once this works I am planning to use shmpipe.c in my custom application to
> feed Gstreamer shmsrc.
> Any help?
> 
> -Shiva


Try a simple example first, before you dive into more complex setup.

Start with something you know that works and than simply
add feature by feature:

 gst-launch -v videotestsrc ! \
 'video/x-raw-yuv, width=640, height=480, framerate=30/1, format=(fourcc)I420'
! \
 shmsink socket-path=/tmp/test shm-size=10000000 wait-for-connection=0

 gst-launch -e shmsrc socket-path=/tmp/test is-live=1 ! \
 video/x-raw-yuv,format=\(fourcc\)I420,framerate=30/1,width=640,height=480 ! \
 xvimagesink

I just see shmsink/src as transparent link between the two pipe. Without shm it
boils down to something like this:

 gst-launch -v videotestsrc ! \
  'video/x-raw-yuv, width=640, height=480, framerate=30/1, 
format=(fourcc)I420' ! \
  xvimagesink

One thing I learned in the past, that it is critical for shmsrc pipeline
 to describe the content correctly on the (receiving end). If the caps
are incorrect in can lead to a pipeline not starting and/or stopping
prematurely.

Mat




More information about the gstreamer-devel mailing list