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. Mat _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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. 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 [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (205 bytes) Download Attachment |
In reply to this post by mattes
2011/6/22 mattes <[hidden email]>:
> > 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. I made this example a little while ago: https://github.com/tmatth/gst-prototypes/tree/master/shm Hope it's of some use. -T > > Mat > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > -- Tristan Matthews web: http://tristanswork.blogspot.com _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by mattes
> 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). My app is an existing C application that captures and massages video frames. It is not based on gstreamer. I want to extend the functionality of the current app and import the video frames into gstreamer. I was following some hints mentioned in shmpipe.h, which leaves room for interpretation on how things and what order they need to be done. Ran into some issues. That's why I was interested in a small test app, (hopefully something not gstreamer based). Though, I think, I figured a couple of things out. At least I can feed and visualize frames now in gstreamer doing this: gst-launch shmsrc socket-path=/tmp/mxtdata ! video/x-raw-yuv,width=320,height=240,framerate=5/1,format='(fourcc)YV12' ! xvimagesink thanx for the input _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
My 2 cents:
If you want to send your images (from your existing non-GStreamer application) to GStreamer within the same application/process, use appsource as an interface to send your images to a GStreamer pipeline. If you want your application to remain a stand-alone application with no "explicit" link to GStreamer, you can use shm stuff and launch the GStreamer pipeline (using shmsrc) in a totally different process, with the caveats mentionned by Olivier. Mart On 23/06/2011 8:04 PM, mattes wrote: >> 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). > My app is an existing C application that captures and massages video frames. It is not based on > gstreamer. I want to extend the functionality of the current app and import the video frames into > gstreamer. > > I was following some hints mentioned in shmpipe.h, which leaves room for interpretation on how things > and what order they need to be done. Ran into some issues. That's why I was interested in a small test > app, (hopefully something not gstreamer based). > > Though, I think, I figured a couple of things out. > > At least I can feed and visualize frames now in gstreamer doing this: > > gst-launch shmsrc socket-path=/tmp/mxtdata ! > video/x-raw-yuv,width=320,height=240,framerate=5/1,format='(fourcc)YV12' ! xvimagesink > > thanx for the input > > > > _______________________________________________ > 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 |
Free forum by Nabble | Edit this page |