using appsink and appsrc

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

using appsink and appsrc

gerry6
Can anyone help me with this problem please??

I am trying to get appsrc and appsink to work together. The idea is to get appsink to export to some kind of data to shared memory (for instance the YUV frames generated by vdeotestsrc). And then in a client application to be able to recover the frames and use them for something else. In the present case my server is just a frame generator.

For the time being, the client would simply read these frames and display them, but in the future, I’d like to be able to access to the YUV pixel data and use them for my own app. Pipelines are as follows:

Appsink:
gst-launch -v videotestsrc ! video/x-raw-yuv, format =\(fourcc\)I420, framerate=\(fraction\)25/1, width=640, height=480 ! ffmpegcolorspace ! queue ! appsink name=video_test

Appsrc:
gst-launch -v appsrc name=video_test ! video/x-raw-yuv,format =\(fourcc\)I420, framerate=\(fraction\)25/1, width=640, height=480 ! ffmpegcolorspace ! queue ! xvimagesink
Reply | Threaded
Open this post in threaded view
|

Re: using appsink and appsrc

Kalle Vahlman
2012/3/7 gerry6 <[hidden email]>:

> Can anyone help me with this problem please??
>
> I am trying to get appsrc and appsink to work together. The idea is to get
> appsink to export to some kind of data to shared memory (for instance the
> YUV frames generated by vdeotestsrc). And then in a client application to be
> able to recover the frames and use them for something else. In the present
> case my server is just a frame generator.
>
> For the time being, the client would simply read these frames and display
> them, but in the future, I’d like to be able to access to the YUV pixel data
> and use them for my own app. Pipelines are as follows:
>
> Appsink:
> gst-launch -v videotestsrc ! video/x-raw-yuv, format =\(fourcc\)I420,
> framerate=\(fraction\)25/1, width=640, height=480 ! ffmpegcolorspace ! queue
> ! appsink name=video_test
>
> Appsrc:
> gst-launch -v appsrc name=video_test ! video/x-raw-yuv,format
> =\(fourcc\)I420, framerate=\(fraction\)25/1, width=640, height=480 !
> ffmpegcolorspace ! queue ! xvimagesink

You make a false assumption that simply giving the same name to
appsink and appsrc will somehow connect the two in completely separate
processes. This is not how the elements work.

The point of appsrc/appsink that an application can push/pull buffers
(containing raw frames or whatever) directly to/from them. gst-launch
is not going to do that, so nothing will be coming out from the appsrc
for the rest of the pipeline in your second example.

--
Kalle Vahlman, [hidden email]
Powered by http://movial.com
Interesting stuff at http://sandbox.movial.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: using appsink and appsrc

Stefan Sauer
In reply to this post by gerry6
Am 07.03.2012 09:40, schrieb gerry6:
> Can anyone help me with this problem please??
>
> I am trying to get appsrc and appsink to work together. The idea is to get
> appsink to export to some kind of data to shared memory (for instance the
> YUV frames generated by vdeotestsrc). And then in a client application to be
> able to recover the frames and use them for something else. In the present
> case my server is just a frame generator.

Also use shmsrc/sink if you need out-of-process access.

Stefan

>
> For the time being, the client would simply read these frames and display
> them, but in the future, I’d like to be able to access to the YUV pixel data
> and use them for my own app. Pipelines are as follows:
>
> Appsink:
> gst-launch -v videotestsrc ! video/x-raw-yuv, format =\(fourcc\)I420,
> framerate=\(fraction\)25/1, width=640, height=480 ! ffmpegcolorspace ! queue
> ! appsink name=video_test
>
> Appsrc:
> gst-launch -v appsrc name=video_test ! video/x-raw-yuv,format
> =\(fourcc\)I420, framerate=\(fraction\)25/1, width=640, height=480 !
> ffmpegcolorspace ! queue ! xvimagesink
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/using-appsink-and-appsrc-tp4452633p4452633.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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