Problem with multiple tees in pipeline

yoyosuper8 yoyosuper8 at yahoo.com
Thu Jul 24 10:09:29 PDT 2014


Hey Nicolas,

I'm currently attempting to do what you suggested, but I'm running into
problems with gst_app_src_push_buffer().

Here is what I've done so far:

-created pipeline for snapshot "appsrc ! videoconvert ! jpegenc ! filesink
name=snapshot location="" "
-set pipeline to GST_STATE_PAUSED
-set main pipeline eglglessink property enable-last-sample=1
-main pipeline is running and displaying on videosink

When I press on the button to take the snapshot, here is what happens:
-get pointer to camera pipeline
-get pointer to snapshot pipeline
-get filesink element and update the location (ie:
/sdcard/DCIM/file_2014_01_01)

Here is the code which it is suppose to get the appsrc element, create a
buffer and use the buffer object to store the last sample. Call
gst_app_src_push_buffer() and pass the appsrc element and buffer:

        // Get the appsrc element from the pipeline
        gchar *gcElement_appsrc = g_strdup("snapshot_appsrc");
        GstAppSrc *appsrc_element = (GstAppSrc*)gst_bin_get_by_name (GST_BIN
(snapshot_pipeline), gcElement_appsrc);

        LOGD("%s(): Get last frame from videosink.", __func__);
        GstBuffer *buffer = gst_buffer_new();
        g_object_get (videosink_element, "last-sample", buffer, NULL);

        LOGD("%s(): Push buffer into appsrc.", __func__);
        GstFlowReturn ret = gst_app_src_push_buffer(appsrc_element, buffer);

I get a GLib error gst_app_src_push_buffer_full: assertion 'GST_IS_BUFFER
(buffer)' failed.
I'm not sure why or what I'm doing wrong.
Also, do I change the snapshot_pipeline back to GST_STATUS_PLAYING after I
execute the gst_app_src_push_buffer() function? Do I send an EOS afterwards?
Thanks.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-with-multiple-tees-in-pipeline-tp4667937p4668053.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list