Hi expert: I try to use appsrc-->videoencode-->appsink, but got the following error. while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake: “ 0:00:00.159532875 30661 0xabcff20 FIXME default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:00.160083500 30661 0xabcff20 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support (cb_need_data, 126)####################### (readTestData, 91) (readTestData, 102)target frame num: 0, read_ret: 460800 0:00:00.161770500 30661 0xabcff20 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support 0:00:00.161995625 30661 0xabcff20 WARN basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support (free_data, 111) 0:00:00.162342000 30661 0xabcff20 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error. 0:00:00.162377125 30661 0xabcff20 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4) (bus_call, 75)Error: Internal data stream error. ” my code piece is as following, and the complete source file as attachment, " // video source g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL); GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12", "width", G_TYPE_INT, g_video_width, "height", G_TYPE_INT, g_video_height, "framerate", GST_TYPE_FRACTION, 25, 1, NULL); if (!strcmp(g_src_name, "videotestsrc")) { DEBUG("uses videotestsrc"); } else if (!strcmp(g_src_name, "appsrc")) { g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL); g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL); } else { ERROR("Not considered yet"); } ret = gst_element_link_filtered(videosrc, videoencode, capsSource); gst_caps_unref(capsSource); capsSource = NULL; if (ret != TRUE) { WARN("fail to link elements"); return -1; }" _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel codec-appsink.c (11K) Download Attachment |
Which videncoder you are using here ??
Looks like video encoder is not able to handle format=NV12. Put videoconvert before the videoencoder this might solve the problem. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |