OpenCV can not find the element h264parse and avdec_h264

I want to open a Gstreamer pipeline with OpenCV in C++, but I have the problem that OpenCV can not find the element h264parse and avdec_h264.
I have installed all the plugins for the H264 decoder for example “gstreamer-plugin-bad”, “gstreamer-plugin-good” and gstreamer-plugin-ugly". But it still does not work. My pipeline looks like this:

cv::VideoCapture cap1(“udpsrc port= 4000 ! application/x-rtp, encoding-name=H264, payload= 96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! xvimagesink”,cv::CAP_GSTREAMER);

This is the error message:

[ WARN:0] global …/modules/videoio/src/cap_gstreamer.cpp (713) open OpenCV | GStreamer warning: Error opening bin: no element “h264parse”

Can anyone help me what could be the problem?