Hi there,
I’m trying to build something similar to this example:
https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/webrtc/sendonly/webrtc-unidirectional-h264.c
But I do not get it to work.
I’d build a small gstreamer webrtc client and a javascript webrtc client.
Signalling is done with a really simple websocket C++ server.
Questions:
- It seems the example is not really up to date, is that correct ? in the example, this is beeing done:
g_signal_emit_by_name (receiver_entry->webrtcbin, "get-transceivers",
&transceivers);
even before the pipeline is set to playing. For me, that never worked, transceivers is always NULL.
Somewhere on stackoverflow I found the comment that this has to be done in the “on-ice-candidate” callback function. Even so I could not find any documentation on that, this seemed to have worked. Is this now correct, or am I missing something ?
- After lots of debugging, I finnally got the erros to a minimum. but there is still no RTP stream send.
my pipeline looks like this:
pipeline = gst_parse_launch("webrtcbin name=webrtcbin stun-server=stun://stun.l.google.com:19302 "
"audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! opusenc ! rtpopuspay ! queue ! "
"application/x-rtp,media=audio,encoding-name=OPUS ! webrtcbin.",
NULL);
I created a pipeline image in this callback:
g_signal_connect(webrtcbin, "notify::ice-gathering-state",
G_CALLBACK(on_ice_gathering_state_notify), NULL);
The image is created when the state is complete:
For me it looks like that en audiotestsrc streams to the trancseiver and not any further… ?? why is that ?
-
What is the state of the webrtc implementation. This is still in the “bad” plugins directory… does this mean this should not be used in production ?.
-
I get one conserning WARN message that is:
webrtcbin gstwebrtcbin.c:4636:_create_answer_task:<webrtcbin> did not find compatible transceiver for offer caps application/x-rtp, media=(string)audio, payload=(int)109, clock-rate=(int)48000, encoding-name=(string)OPUS, encoding-params=(string)2, maxplaybackrate=(string)48000, stereo=(string)1, useinbandfec=(string)1; application/x-rtp, media=(string)audio, payload=(int)9, clock-rate=(int)8000, encoding-name=(string)G722, encoding-params=(string)1; application/x-rtp, media=(string)audio, payload=(int)0, clock-rate=(int)8000, encoding-name=(string)PCMU; application/x-rtp, media=(string)audio, payload=(int)8, clock-rate=(int)8000, encoding-name=(string)PCMA; application/x-rtp, media=(string)audio, payload=(int)101, clock-rate=(int)8000, encoding-name=(string)TELEPHONE-EVENT, encoding-params=(string)1, 0-15=(string)1, will only receive
which is a little change, because I only want to send audio from the gstreamer client to the javascript client… can I ignore this or is it essential ?
Every help is very much appreciated!!
If a code example is necessary, I will try to create a simplified version.