question on "transform could not transform video/x-raw ..."
Halley Zhao
aihua.halley.zhao at gmail.com
Tue Apr 30 05:04:02 UTC 2019
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;
}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190430/5d404f43/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codec-appsink.c
Type: application/octet-stream
Size: 8236 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190430/5d404f43/attachment-0001.obj>
More information about the gstreamer-devel
mailing list