webrtcbin: webrtc_sendrecv pipeline won't start on rpi3b+ when using omx264enc
I have built gstreamer/webrtcbn 1.14 on my rpi3b+. The 'sendrecv' demo from gstwebrtc-demo works just fine. When I modify it to capture video with v4l2src it also works fine. However, when I replace the encoder with the omx h264 encoder the pipeline won't start. I never get the 'on-negotiation-needed' callback.
To be specific, this pipeline works (the original code in webrtc_sendrecv.c):
pipe1 =
gst_parse_launch ("webrtcbin bundle-policy=max-bundle name=sendrecv " STUN_SERVER
"videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! "
"queue ! " RTP_CAPS_VP8 "96 ! sendrecv. "
"audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! "
"queue ! " RTP_CAPS_OPUS "97 ! sendrecv. ",
&error);
This pipeline also works (capturing with v4l2src):
pipe1 =
gst_parse_launch ("webrtcbin bundle-policy=max-bundle name=sendrecv " STUN_SERVER
"v4l2src ! video/x-raw,width=640,height=480,framerate=20/1 ! videoflip video-direction=180 ! "
"queue ! vp8enc deadline=1 ! rtpvp8pay ! queue ! " RTP_CAPS_VP8 "96 ! sendrecv. "
, &error);
However, this pipeline does not work (encoding with omxh264enc):
pipe1 =
gst_parse_launch ("webrtcbin bundle-policy=max-bundle name=sendrecv " STUN_SERVER
"v4l2src ! video/x-raw,width=640,height=480,framerate=20/1 ! videoflip video-direction=180 ! "
"queue ! omxh264enc ! "queue ! rtph264pay ! " RTP_CAPS_H264 "127 ! sendrecv. "
, &error);
STUN_SERVER, RTP_CAPS_VP8, & RTP_CAPS_H264 look like this:
#define STUN_SERVER " stun-server=stun://stun.l.google.com:19302 "
#define RTP_CAPS_OPUS "application/x-rtp,media=audio,encoding-name=OPUS,payload="
#define RTP_CAPS_VP8 "application/x-rtp,media=video,encoding-name=VP8,payload="
#define RTP_CAPS_H264 "application/x-rtp,media=video,encoding-name=H264,payload="
It seems like the SDP never gets calculated. I never get the 'on-negotiation-needed' callback. The 'start_pipeline()' function does finish successfully and the pipeline object state is set to 'PLAYING'.
Any ideas as to what could be wrong?
Oh, this pipeline does write an h264 elemental stream to a file that I can playback with vlc... so I think my omx h264 encoder is working:
gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480,framerate=20/1 ! videoflip video-direction=180 ! queue ! omxh264enc ! filesink location=test.h264