pipeline_str = g_strdup_printf(
"videotestsrc pattern=ball ! video/x-raw,width=1280,height=720 ! " //
"queue ! " //
"videoconvert ! " //
"video/x-raw,format=NV12 ! " //
"queue ! " //
"x264enc tune=zerolatency ! " //
"video/x-h264,profile=baseline ! " //
"queue ! " //
"h264parse ! " //
"rtph264pay config-interval=1 ! " //
"application/x-rtp,payload=96 ! " //
"tee name=%s allow-not-linked=true",
MY_TEE_NAME);
// No webrtc bin yet until later!
pipeline = GST_ELEMENT(gst_element_get_parent(webrtcbin));
if (pipeline == NULL) return;
tee = gst_bin_get_by_name(GST_BIN(pipeline), MY_TEE_NAME);
srcpad = gst_element_request_pad_simple(tee, "src_%u");
sinkpad = gst_element_request_pad_simple(webrtcbin, "sink_0");
ret = gst_pad_link(srcpad, sinkpad);
g_assert(ret == GST_PAD_LINK_OK);
On Linux
On Android
On Android, the transceiver is not linked somehow, which results in no video stream received on the client side.
Hi,
Do you get any error/warn messages on the Android version?
Are you changing the webrtcbin
properties from one pipeline to another?
If you could share debug logs and other details it could help with finding the cause of the issue.
The only warnings I got are
W ../ext/webrtc/gstwebrtcbin.c, sdp_media_from_transceiver: Caps application/x-rtp, payload=(int)96, encoding-name=(string)H264, clock-rate=(int)90000, media=(string)video, packetization-mode=(string)1, profile-level-id=(string)42e01f, rtcp-fb-nack-pli=(boolean)true, rtcp-fb-ccm-fir=(boolean)true, rtcp-fb-transport-cc=(boolean)true are missing ssrc
W ../gst/gstpad.c, gst_pad_peer_query: could not send sticky events
But these are also printed on Linux. The data channel can be created successfully, and exchanging messages has no problem. It’s only the streaming that is not working.
In addition, I have made the reproduction projects run on Windows. No video on Windows either.
This is the pipeline on Windows, which looks similar to the one on Android (nothing linked to the transceiver’s src pad).
After more digging, I found the line
GST_INFO_OBJECT (pad, "linking input stream %u", pad->trans->mline);
in _connect_input_stream (GstWebRTCBin * webrtc, GstWebRTCBinPad * pad)
from gstwebrtcbin.c
is not hit on Android. This very likely has something to do with the issue.
It seems there is some issue in creating the pads at least. It might be related to issues with the caps negotiation. You could try to add the ssrc
information into the caps before webrtcbin
.
Sorry, could you elaborate a bit on how to add ssrc
. I had searched and tried to do that but failed.
That is a property for the rtph264pay
element. Its a random number so you can assign any number. So for example it would just be a change to this in your pipeline:
rtph264pay config-interval=1 ssrc=123456
I had tried this before and tried again, still got
com.gst.webrtc_server D ../ext/webrtc/gstwebrtcbin.c, sdp_media_from_transceiver: Caps application/x-rtp, payload=(int)96, encoding-name=(string)H264, clock-rate=(int)90000, media=(string)video, packetization-mode=(string)1, profile-level-id=(string)42e01f, rtcp-fb-nack-pli=(boolean)true, rtcp-fb-ccm-fir=(boolean)true, rtcp-fb-transport-cc=(boolean)true are missing ssrc