GNOME Bugzilla – Bug 785706
vaapipostproc: upstream caps negotiation fails
Last modified: 2018-11-03 15:51:02 UTC
Created attachment 356755 [details] GST_DEBUG=5 Hi, Following pipelines are not working: gst-launch-1.0 appsrc is-live=true caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! videorate ! vaapipostproc ! video/x-raw,format=NV12,framerate=10/1 ! fakesink gst-launch-1.0 appsrc is-live=true caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! videorate ! video/x-raw,framerate=10/1 ! vaapipostproc ! video/x-raw,format=NV12 ! fakesink with warning: WARN basetransform gstbasetransform.c:1346:gst_base_transform_setcaps:<videorate0> transform could not transform video/x-raw, format=(string)BGRx, width=(int)1280, height=(int)1024, framerate=(fraction)20/1 in anything we support Pipeline with swapped vaapipostproc and videorate is working correctly: gst-launch-1.0 appsrc is-live=true caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! vaapipostproc ! videorate ! video/x-raw,format=NV12,framerate=10/1 ! fakesink
The problem is upstream caps negotiation is not fully implemented in vaapipostproc.
I've tested these pipelines on current master and 1.12 replacing appsrc with videotestsrc (In reply to Tomas Rataj from comment #0) > gst-launch-1.0 appsrc is-live=true > caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! > videorate ! vaapipostproc ! video/x-raw,format=NV12,framerate=10/1 ! fakesink This still fails. In my understanding it fails because videorate sets an already fixated caps by setting itself as passthrough. > gst-launch-1.0 appsrc is-live=true > caps="video/x-raw,format=BGRx,width=1280,height=1024,framerate=20/1" ! > videorate ! video/x-raw,framerate=10/1 ! vaapipostproc ! > video/x-raw,format=NV12 ! fakesink But this one is working as expected.
Created attachment 360596 [details] [review] vaapipostproc: use scoped variable for return value Instead of reusing a parameter variable for the return value of gst_vaapipostproc_fixate_caps(), this patch uses the function scoped pointer. Thus, the code is cleaner.
Created attachment 360597 [details] [review] vaapipostproc: removed unused parameter Removed caps parameter from gst_vaapipostproc_transform_caps_impl() helper function since the it is not used.
Created attachment 360598 [details] [review] vaapipostproc: use scoped variable for return value Instead of reusing a parameter variable for the return value of gst_vaapipostproc_transform_caps(), this patch uses the function scoped pointer. Thus, the code is cleaner.
These patches do not fix the problem. They are just a clean up of the code. But I haven't found a way to fix this issue since vaapipostproc, when doing deinterlacing, it modifies the src caps framerate, thus I cannot figure out a way to set the sink caps framerate given the vaapipostproc src caps, since the media also has to be considere.
Attachment 360596 [details] pushed as bedaa13 - vaapipostproc: use scoped variable for return value Attachment 360597 [details] pushed as d3732a7 - vaapipostproc: removed unused parameter Attachment 360598 [details] pushed as bedaa13 - vaapipostproc: use scoped variable for return value
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/64.