Pipeline negotiation fails with vaapih264enc encoder
The gst pipeline fails with the following output when using encoder vaapih264enc
. @tpm suggested that capsfilter codecfilter
with caps "profile=baseline" might be problematic (defined in src/wfd/wfd-media-factory.c). Replacing with "profile=constrained-baseline" (patch below) resolves this issue.
Command producing the error
$ GST_DEBUG=2 NETWORK_DISPLAYS_H264_ENC=vaapih264enc G_MESSAGES_DEBUG=all gnome-network-displays
Debug output
...
** (gnome-network-displays:4120272): DEBUG: 19:51:54.342: WfdClient: SET_PARAMS done
** (gnome-network-displays:4120272): DEBUG: 19:51:54.346: WfdClient: Initialization done!
** (gnome-network-displays:4120272): DEBUG: 19:51:54.355: use x11: 1
0:00:10.998525290 4120272 0x558976a79b00 WARN pipeline gstpipeline.c:729:gst_pipeline_do_latency:<media-pipeline> did not really configure latency of 0:00:00.500000000
** (gnome-network-displays:4120272): DEBUG: 19:51:54.398: WfdMedia init: Got 1 streams
0:00:11.038577161 4120272 0x558976ade700 WARN basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<wfd-vaapi-convert> transform could not transform video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive in anything we support
0:00:11.038705974 4120272 0x558976ade700 WARN basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<wfd-vaapi-convert> transform could not transform video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive in anything we support
0:00:11.038715082 4120272 0x558976ade700 WARN GST_PADS gstpad.c:4303:gst_pad_peer_query:<sink:proxypad1> could not send sticky events
0:00:11.044518709 4120272 0x558976ade700 WARN basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<wfd-vaapi-convert> transform could not transform video/x-raw, format=(string)BGRx, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)30/1 in anything we support
0:00:11.044649639 4120272 0x558976ade700 WARN basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<wfd-vaapi-convert> transform could not transform video/x-raw, format=(string)BGRx, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)30/1 in anything we support
0:00:11.044755403 4120272 0x558976ade700 WARN basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<wfd-vaapi-convert> transform could not transform video/x-raw, format=(string)BGRx, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)30/1 in anything we support
0:00:11.078056513 4120272 0x558976ae1300 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<screencastsrc> error: Internal data stream error.
0:00:11.078074338 4120272 0x558976ae1300 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<screencastsrc> error: streaming stopped, reason not-negotiated (-4)
...
Proposed patch
diff --git a/wfd-media-factory.c.orig b/wfd-media-factory.c
index 874d8de..c5ef095 100644
--- a/wfd-media-factory.c.orig
+++ b/wfd-media-factory.c
@@ -645,7 +645,7 @@ wfd_configure_media_element (GstBin *bin, WfdParams *params)
if (profile == WFD_H264_PROFILE_HIGH)
caps_codecfilter = gst_caps_from_string ("video/x-h264,alignment=nal,stream-format=byte-stream,profile=high");
else
- caps_codecfilter = gst_caps_from_string ("video/x-h264,alignment=nal,stream-format=byte-stream,profile=baseline");
+ caps_codecfilter = gst_caps_from_string ("video/x-h264,alignment=nal,stream-format=byte-stream,profile=constrained-baseline");
codecfilter = gst_bin_get_by_name (bin, "wfd-codecfilter");
g_object_set (codecfilter,
Edited by Chris Durden