[gst-devel] appsrc example

Sandeep Prakash 123sandy at gmail.com
Fri Aug 27 17:52:30 CEST 2010


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.




More information about the gstreamer-devel mailing list