Because the GStreamer implementation does not do adaptive streaming. In general your RTSP camera will try to use much more bandwidth than the videotestsrc (even for the same resolution).
Also I think RSTP and WebRTC are both using RTP but in slightly different ways. So you might need to add rtph264depay ! rtph264pay to make it work. You can try to dump the SDP offer in both case to compare.
webrtc-unidirectional-h264.c: In function
webrtc-unidirectional-h264.c:177:3: error: unknown
type name 'GstWebRTCRTPTransceiver'
In file included from
'GstWebRTCRTPTransceiver' undeclared (first use in
trans = g_array_index (transceivers,
GstWebRTCRTPTransceiver *, 0);
on a Ubuntu Linux x86_64 18.04 with gstreamer
1.14.5 it compiles and run without problems.
Comparing *.so, *.pc and *.h files on embedded
board and linux machine i don't see differences.
Searching on google i've found some similar
problems related to GNU Make version. I've 4.2.1 on
the board and 4.1 on the Linux PC.
I can't think of any good reason for that error. I don't know how
GNU Make could affect things, unless the compilation command-line
is different between the versions - but I'd expect you'd get a lot
more errors than just the one if so.
2) Bridging RTSP stream to webrtc web page
continuing my experiments on ubuntu x86_64 i've
tried to change the pipeline removing v4l2 source and
inserting a videotestsrc with no problems, it worked.
Now i'm trying to read a RTSP stream from an IP
camera but i doesn't work and i've no errors on
Your pipeline description is out of order here. You'll end up
connecting the rtspsrc to webrtcbin first, and then creating a 2nd
chain with queue ! .../ ! webrtcbin. that doesn't produce any data
and stops the whole pipeline from pre-rolling. Try this: