appsrc example

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

appsrc example

Bert Douglas
Hi All,

I have question about "appsrc".
Rread the docs, and looked at examples here:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/app

I have a python application using python gstreamer.

And I have a separate C application that reads raw rgb frames from a camera.

How do i hook the two apps together so the camera can act as a video source?

Is "appsrc" suited for this job?

Is it possible to send frames to appsrc?  Examples do not show this.

Another big issue is how to attach the appsrc element to a pipeline created in another program?

Thanks,
Bert Douglas




------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: appsrc example

Sandeep Prakash
Hi,

Bert Douglas wrote
How do i hook the two apps together so the camera can act as a video source?
Not sure how to do this in separate applications. But in the same application these are the steps:
1. First of all you have to get the appsrc GstElement object.
2. Then hook your function to the "need-data" callback of the appsrc. Do a gst-inspect of appsrc
to get the function prototype.
3. When the pipeline goes to PAUSED/PLAYING the callback is called. Here you can feed your camera data thru "gst_app_src_push_buffer". The buffer size in the call back is the blocksize. Set blocksize of appsrc to
the framesize of the raw buffer from camera.
4. You have set the appropriate caps on the src pad of the appsrc. Use capsfilter for this.


Bert Douglas wrote
Is "appsrc" suited for this job?
Yes

Bert Douglas wrote
Is it possible to send frames to appsrc?  Examples do not show this.
You can push any data thru appsrc as long as the downstream elements recognizes that data.

Bert Douglas wrote
Another big issue is how to attach the appsrc element to a pipeline created in another program?
Not sure on this.

Regards,
Sandeep
http://sandeepprakash.homeip.net
Reply | Threaded
Open this post in threaded view
|

Re: appsrc example

Bert Douglas
Thanks.


On Fri, Aug 27, 2010 at 10:52 AM, Sandeep Prakash <[hidden email]> wrote:

Hi,


Bert Douglas wrote:
>
> How do i hook the two apps together so the camera can act as a video
> source?
>
Not sure how to do this in separate applications. But in the same
application these are the steps:
1. First of all you have to get the appsrc GstElement object.
2. Then hook your function to the "need-data" callback of the appsrc. Do a
gst-inspect of appsrc
to get the function prototype.
3. When the pipeline goes to PAUSED/PLAYING the callback is called. Here you
can feed your camera data thru "gst_app_src_push_buffer". The buffer size in
the call back is the blocksize. Set blocksize of appsrc to
the framesize of the raw buffer from camera.
4. You have set the appropriate caps on the src pad of the appsrc. Use
capsfilter for this.



Bert Douglas wrote:
>
> Is "appsrc" suited for this job?
>
Yes


Bert Douglas wrote:
>
> Is it possible to send frames to appsrc?  Examples do not show this.
>
You can push any data thru appsrc as long as the downstream elements
recognizes that data.


Bert Douglas wrote:
>
> Another big issue is how to attach the appsrc element to a pipeline
> created in another program?
>
Not sure on this.

Regards,
Sandeep
http://sandeepprakash.homeip.net
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/appsrc-example-tp2340623p2341303.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel