how to set property for Appsrc?

zetlb raulcalvo at gmail.com
Fri Feb 22 05:38:24 PST 2013


Hi,
   I was googling about the use of appsrc and found that thread...
   I'm having troubles using appsrc, I'm trying to do a simple appsrc to
inject rgb raw images into the pipeline. The first thing I want to do is to
show "fake" frames into a pipeline to show into a autovideosink ( working in
windows ).
   I have created a pipeline, setup the appsrc in the way you say with this
capabilities:

m_pCaps = gst_caps_from_string( "video/x-raw-rgb,width = 320, height = 200"
);

   And then:

	g_object_set(G_OBJECT(m_pAppSrc), "caps", m_pCaps, NULL);
	g_object_set(G_OBJECT(m_pAppSrc), "is-live", TRUE, NULL);
	g_object_set(G_OBJECT(m_pAppSrc), "block", FALSE, NULL);
	g_object_set(G_OBJECT(m_pAppSrc), "do-timestamp", TRUE, NULL);

   The pipeline is:

   "appsrc ! ffmpegcolorspace ! autovideosink"

   To push buffers I do the pipeline loop into a thread and from other
thread I make a buffer ( gstbuffer ) and put it into the pipeline:

GstBuffer* pBuffer = gst_buffer_new_and_alloc( nSize );
gst_buffer_set_caps( pBuffer, m_pCaps ); // I really don't know if it is
neccessary.
// fill data into pBuffer->data
gst_app_src_push_buffer( GST_APP_SRC( m_pAppSrc ), pBuffer );

The last function returns GST_FLOW_OK but autovideosink doesn't show
anything.
( if I use a pipeline like "videotestsrc ! ffmpegcolorspace ! autovideosink"
everything works ok )

Other problem is that buffers aren't deleted, so in a short period of time
the memory ( is a 32 bits executable ) is full!!!

Can anybody help me?
   thanks in advance






--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/how-to-set-property-for-Appsrc-tp4656085p4658721.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list