Not negotiated error sometimes happens

Tran Tu camtubk05 at gmail.com
Mon Sep 26 07:24:10 UTC 2016


Hi Sebastian,

   /* Capture plugin */
   Camerasrc = gst_element_factory_make("imxv4l2src", "camerasource");

   /* Video1 queue for HD resolution */
    Queue1 = gst_element_factory_make("queue", "queue1");
    EncodePlugin1 = gst_element_factory_make("vpuenc", "EncodePlugin1");
    Parsing1 = gst_element_factory_make("h264parse", "Parsing1");
    MuxPlugin1 = gst_element_factory_make("matroskamux", "MuxPlugin1");
    Filesink1 = gst_element_factory_make("filesink", "filesink1");

    /* Video2 queue for WVGA resolution */
    Queue2 = gst_element_factory_make("queue", "Queue2");
    VideoResize = gst_element_factory_make("imxvideoconvert_ipu", NULL);
    EncodePlugin2 = gst_element_factory_make("imxvpuenc_h264", "encode2");
    Parsing2 = gst_element_factory_make("h264parse", "Parsing2");
    MuxPlugin2 = gst_element_factory_make("matroskamux", "mux2");
    Filesink2 = gst_element_factory_make("filesink", "filesink2");

    /* Link all elements that can be automatically linked because they have
"Always" pads */
    gst_bin_add_many(GST_BIN(RecordPipeline), Camerasrc, Filter, tee,
Queue1, EncodePlugin1,
                     Parsing1, MuxPlugin1, Filesink1, Queue2, VideoResize,
Filter2, EncodePlugin2, Parsing2,
                     MuxPlugin2, Filesink2, NULL);

    if (gst_element_link_many(Camerasrc, Filter, tee, NULL) != TRUE)
    {
        g_printerr("Elements could not be linked1.\n");
    }

    if (gst_element_link_many(Queue2, VideoResize, Filter2, EncodePlugin2,
Parsing2, MuxPlugin2, Filesink2,
                              NULL) != TRUE)
    {
        g_printerr("Elements could not be linked3.\n");
        gst_object_unref(RecordPipeline);
    }

    if (gst_element_link_many(Queue1, EncodePlugin1, Parsing1, MuxPlugin1,
Filesink1, NULL) != TRUE)
    {
        g_printerr("Elements could not be linked2.\n");
        gst_object_unref(RecordPipeline);
    }

    /* Manually link the Tee, which has "Request" pads */
    tee_src_pad_template =
gst_element_class_get_pad_template(GST_ELEMENT_GET_CLASS(tee),  "src_%u");

    tee_queue1_pad = gst_element_request_pad(tee, tee_src_pad_template,
NULL, NULL);
    queue_video1_pad = gst_element_get_static_pad(Queue1, "sink");

    tee_queue2_pad = gst_element_request_pad(tee, tee_src_pad_template,
NULL, NULL);
    queue_video2_pad = gst_element_get_static_pad(Queue2, "sink");

    if ((gst_pad_link(tee_queue2_pad, queue_video2_pad) != GST_PAD_LINK_OK)
            || (gst_pad_link(tee_queue1_pad, queue_video1_pad) !=
GST_PAD_LINK_OK))
    {
        g_printerr("Tee could not be linked.\n");
        gst_object_unref(RecordPipeline);
    }
    gst_object_unref(queue_video2_pad);
    gst_object_unref(queue_video1_pad);

    /* Start playing the pipeline */
	gst_element_set_state(RecordPipeline, GST_STATE_PLAYING);
    /* Get bus for gstreamer pipeline */
    RecordBus = gst_pipeline_get_bus(GST_PIPELINE(RecordPipeline));

    /* Callback function for bus messages */
    gst_bus_add_watch(RecordBus, RecordBusCall, RecordLoop);
    gst_object_unref(RecordBus);

   *This is the message log if I got 0 bytes recorded:*

reamer-1.4.1/gst/gstelement.c:2233:_priv_gst_element_state_changed:<imxvideoconvert_ipu5>
[00m notifying about state-changed NULL to READY (VOID_PENDING pending)
reamer-1.4.1/gst/gstbin.c:2673:gst_bin_change_state_func:<avcrecord-pipeline>
[00m child 'imxvideoconvert_ipu5' changed state to 2(READY) successfully
reamer-1.4.1/gst/gstbin.c:2230:gst_bin_element_set_state:<imxvideoconvert_ipu5>
[00m current READY pending VOID_PENDING, desired next PAUSED
reamer-1.4.1/gst/gstelement.c:2328:gst_element_continue_state:<imxvideoconvert_ipu5>
[00m completed state change to PAUSED
reamer-1.4.1/gst/gstelement.c:2233:_priv_gst_element_state_changed:<imxvideoconvert_ipu5>
[00m notifying about state-changed READY to PAUSED (VOID_PENDING pending)
reamer-1.4.1/gst/gstbin.c:2673:gst_bin_change_state_func:<avcrecord-pipeline>
[00m child 'imxvideoconvert_ipu5' changed state to 3(PAUSED) successfully
mer-1.4.1/libs/gst/base/gstbasetransform.c:2138:*gst_base_transform_handle_buffer:<imxvideoconvert_ipu5>
[00m warning: not negotiated*
mer-1.4.1/libs/gst/base/gstbasetransform.c:2138:*gst_base_transform_handle_buffer:<imxvideoconvert_ipu5>
[00m warning: not negotiated*
gstreamer-1.4.1/gst/gstelement.c:1835:*gst_element_message_full:<imxvideoconvert_ipu5>
[00m posting message: not negotiated*
gstreamer-1.4.1/gst/gstelement.c:1858:*gst_element_message_full:<imxvideoconvert_ipu5>
[00m posted warning message: not negotiated*
reamer-1.4.1/gst/gstbin.c:2230:gst_bin_element_set_state:<imxvideoconvert_ipu5>
[00m current PAUSED pending VOID_PENDING, desired next NULL
reamer-1.4.1/gst/gstelement.c:2303:gst_element_continue_state:<imxvideoconvert_ipu5>
[00m committing state from PAUSED to READY, pending NULL, next NULL
reamer-1.4.1/gst/gstelement.c:2233:_priv_gst_element_state_changed:<imxvideoconvert_ipu5>
[00m notifying about state-changed PAUSED to READY (NULL pending)
reamer-1.4.1/gst/gstelement.c:2310:gst_element_continue_state:<imxvideoconvert_ipu5>
[00m continue state change READY to NULL, final NULL

Sebastian Dröge-3 wrote
> On Sun, 2016-09-25 at 23:16 -0700, Tran Tu wrote:
>> Hi,
>> 
>> I am trying to captured from camera to 2 video files with different
>> resolution using tee plugins.
>> The pipeline can work but sometimes it record to 0 bytes video files with
>> ERROR: Internal data flow error.
>> 
>> I also enabled log to see what happen with the pipeline.
>> Not negotiated happen makes the pipeline cannot change from READY to
>> PLAYING
>> state. It change from READY->PAUSED->NULL instead.
>> 
>> Can someone show me what wrong with it because it is sometimes happened.
>> Not
>> always?
> 
> What is your exact pipeline that you're using, what are the 2 input
> video files (container, codec, ...)?
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (949 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4679777/0/signature.asc>


Sebastian Dröge-3 wrote
> On Sun, 2016-09-25 at 23:16 -0700, Tran Tu wrote:
>> Hi,
>> 
>> I am trying to captured from camera to 2 video files with different
>> resolution using tee plugins.
>> The pipeline can work but sometimes it record to 0 bytes video files with
>> ERROR: Internal data flow error.
>> 
>> I also enabled log to see what happen with the pipeline.
>> Not negotiated happen makes the pipeline cannot change from READY to
>> PLAYING
>> state. It change from READY->PAUSED->NULL instead.
>> 
>> Can someone show me what wrong with it because it is sometimes happened.
>> Not
>> always?
> 
> What is your exact pipeline that you're using, what are the 2 input
> video files (container, codec, ...)?
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (949 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4679777/0/signature.asc>


Sebastian Dröge-3 wrote
> On Sun, 2016-09-25 at 23:16 -0700, Tran Tu wrote:
>> Hi,
>> 
>> I am trying to captured from camera to 2 video files with different
>> resolution using tee plugins.
>> The pipeline can work but sometimes it record to 0 bytes video files with
>> ERROR: Internal data flow error.
>> 
>> I also enabled log to see what happen with the pipeline.
>> Not negotiated happen makes the pipeline cannot change from READY to
>> PLAYING
>> state. It change from READY->PAUSED->NULL instead.
>> 
>> Can someone show me what wrong with it because it is sometimes happened.
>> Not
>> always?
> 
> What is your exact pipeline that you're using, what are the 2 input
> video files (container, codec, ...)?
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (949 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4679777/0/signature.asc>


Sebastian Dröge-3 wrote
> On Sun, 2016-09-25 at 23:16 -0700, Tran Tu wrote:
>> Hi,
>> 
>> I am trying to captured from camera to 2 video files with different
>> resolution using tee plugins.
>> The pipeline can work but sometimes it record to 0 bytes video files with
>> ERROR: Internal data flow error.
>> 
>> I also enabled log to see what happen with the pipeline.
>> Not negotiated happen makes the pipeline cannot change from READY to
>> PLAYING
>> state. It change from READY->PAUSED->NULL instead.
>> 
>> Can someone show me what wrong with it because it is sometimes happened.
>> Not
>> always?
> 
> What is your exact pipeline that you're using, what are the 2 input
> video files (container, codec, ...)?
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (949 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4679777/0/signature.asc>





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Not-negotiated-error-sometimes-happens-tp4679771p4679783.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list