libgstapp ownership

Chris Tapp opensource at keylevel.com
Mon Oct 20 12:19:08 PDT 2014


The documentation for gst_app_src_push_buffer() says "This function takes ownership of the buffer" does that mean it adds a ref count to the buffer, or does it just mean that a ref-counted object passed in does not have to be unref'ed?

For example, is the following valid:

   GstBuffer * buffer = gst_sample_get_buffer( aSample );   // Buffer is valid as long as aSample is valid - take a reference if needed longer

   gst_app_src_push_buffer( myAppSrc, buffer );             // Does push_buffer take a reference?

or should it be:

   gst_app_src_push_buffer( myAppSrc, gst_sample_ref( buffer ) );   // Take a reference before passing in.

--

Chris Tapp
opensource at keylevel.com
www.keylevel.com

----
You can tell you're getting older when your car insurance gets real cheap!



More information about the gstreamer-devel mailing list