Simple Example of Appsrc. How to get pointer to appsrc from pipeline.

BogdanS bodyaf at gmail.com
Tue Aug 30 14:42:10 UTC 2016


Hi!
I am trying to do really simple example of using appsrc.
I have a sound card that outputs audio frame to buffer cardBuff (by
callback).
 I am building pipeline On the start of program
*/pipeline /= gst_parse_launch ("appsrc name= MySource ! audioparse
channels=1 rate=8000 ! alawenc ! rtppcmapay ! udpsink host=192.168.2.50
port=6010", NULL);*

When buffer of card receive audioframe, will call a function *SendToStream*{
Inside this function  I wrap CardBuff with *gst_buffer_new_wrapped* 

*/buffer/=gst_buffer_new_wrapped ((gpointer)CardBuff, (gsize)CardBuffSize);*

And here I want to use gst_app_src_push_buffer(GstAppSrc *appsrc, GstBuffer
*buffer);

As you see pointer to buffer I already have (*/buffer/*), But how I can get
from pipeline that I already build with gst_parse_launch */pipeline /* a
pointer to appsrc.  Maybe some function like
pipeline->GetPointerToObjectByName("MySource")?

I am started to learn gstreamer a few days ago. Please point me to my
problems/


}




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Simple-Example-of-Appsrc-How-to-get-pointer-to-appsrc-from-pipeline-tp4679294.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list