<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    I would very much suggest trying the latest stable release branch of
    GStreamer, 1.18.  Many issues have been fixed in webrtcbin since
    1.14.5<br>
    <br>
    Cheers<br>
    -Matt<br>
    <br>
    <div class="moz-cite-prefix">On 2/11/20 2:45 pm, Mandar Joshi wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAC9_qu1BCbJxhtRfwfr0wY=oUbEQM8gGo=4b8LuZ58U5TvAuSw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hello everyone,<br>
        </div>
        <div>I am trying to build a conference engine with WebRTC using
          GStremer 1.14.5 on Ubuntu 18.04. Been referring to the
          webrtc-sendrecv.c as an example.</div>
        Right now, I am trying to stream audio and video to and from the
        same Linux box.<br>
        <br>
        I am having trouble with set-remote-description on webrtcbin. I
        get this error after receiving a SDP Answer from the browser.<br>
        <br>
        ERROR:gstwebrtcbin.c:1152:_check_if_negotiation_is_needed:
        assertion failed: (trans->mline <
        gst_sdp_message_medias_len
        (webrtc->current_remote_description->sdp))<br>
          >Aborted (core dumped)<br>
        <br>
        A GStreamer peer to GStreamer peer works when both have equal
        number of streams (medias, is it?) i.e. Just video or just audio
        or both audio and video.<br>
        <br>
        Here is the SDP Answer received from the browser. I think I am
        messing up the negotiation somewhere. I would really appreciate
        some help understanding what’s happening.<br>
        <br>
        v=0<br>
        o=mozilla...THIS_IS_SDPARTA-82.0 810706521954309706 0 IN IP4
        0.0.0.0<br>
        s=-<br>
        t=0 0<br>
        a=fingerprint:sha-256
C6:C3:86:8E:CB:D2:14:9C:C1:4A:B8:72:8D:60:00:08:34:51:33:79:FE:2D:39:4A:7C:E6:F5:97:92:5D:97:C4<br>
        a=ice-options:trickle<br>
        a=msid-semantic:WMS *<br>
        m=video 9 UDP/TLS/RTP/SAVPF 96<br>
        c=IN IP4 0.0.0.0<br>
        a=sendrecv<br>
        a=fmtp:96 max-fs=12288;max-fr=60<br>
        a=ice-pwd:4d7d2212bcd5f1f467855683f036f700<br>
        a=ice-ufrag:0594f02a<br>
        a=mid:video0<br>
        a=msid:{1d029bf1-6123-4b39-be26-68202dad363f}
        {7c72666b-94ec-422b-8cc6-5010b8aa73ab}<br>
        a=rtcp-fb:96 nack pli<br>
        a=rtcp-mux<br>
        a=rtcp-rsize<br>
        a=rtpmap:96 VP8/90000<br>
        a=setup:active<br>
        a=ssrc:1864073429 cname:{4dad80e7-eb43-4706-8934-4a2d51202c21}<br>
        m=audio 9 UDP/TLS/RTP/SAVPF 97<br>
        c=IN IP4 0.0.0.0<br>
        a=sendrecv<br>
        a=fmtp:97 maxplaybackrate=48000;stereo=1;useinbandfec=1<br>
        a=ice-pwd:4d7d2212bcd5f1f467855683f036f700<br>
        a=ice-ufrag:0594f02a<br>
        a=mid:audio1<br>
        a=msid:{1d029bf1-6123-4b39-be26-68202dad363f}
        {4607068a-ba2b-4d70-8561-12f13013b345}<br>
        a=rtcp-mux<br>
        a=rtpmap:97 opus/48000/2<br>
        a=setup:active<br>
        a=ssrc:4273581052 cname:{4dad80e7-eb43-4706-8934-4a2d51202c21}<br>
        <br>
        Here is the C code I’m using for set-remote-description.<br>
        <br>
        static void c_peer_set_sdp_answer (CPeer *cpeer, Conference
        *conf, gchar *sdp_answer) {<br>
        {<br>
          g_message ("Setting SDP Answer: %s", sdp_answer);<br>
          int ret;<br>
          GstSDPMessage *sdp;<br>
          GstWebRTCSessionDescription *answer;<br>
          GstPromise *promise;<br>
        <br>
          ret = gst_sdp_message_new (&sdp);<br>
          g_assert_cmphex (ret, ==, GST_SDP_OK);<br>
          ret = gst_sdp_message_parse_buffer ((guint8 *) sdp_answer,
        strlen (sdp_answer), sdp);<br>
          g_assert_cmphex (ret, ==, GST_SDP_OK);<br>
        <br>
          answer = gst_webrtc_session_description_new
        (GST_WEBRTC_SDP_TYPE_ANSWER, sdp);<br>
          g_assert_nonnull (answer);<br>
        <br>
          promise = gst_promise_new ();<br>
        <br>
          //This is where things go wrong<br>
          g_signal_emit_by_name (conf->webrtcbin,
        "set-remote-description", answer, promise);<br>
        <br>
          gst_promise_interrupt (promise);<br>
          gst_promise_unref (promise);<br>
        }<br>
        <br>
        Is there something I could be missing in the process before
        set-remote-description?<br>
        May be in set-local-description?<br>
        <br>
        From the GST_DEBUG=4 level logs, is this something I need to
        look into?<br>
        0:00:41.148395569  9264 0x55dc1f3b9590 INFO              
        webrtcbin
        gstwebrtcbin.c:2795:_set_description_task:<webrtcbin>
        Attempting to set remote answer in the have-local-offer state<br>
        <br>
        <div>Here is the link to the what seems to be the relevant
          section of the logs <a href="https://pastebin.com/aiPMsZgG"
            moz-do-not-send="true">https://pastebin.com/aiPMsZgG</a></div>
        <div><br>
        </div>
        <div>Regards</div>
        <div>Mandar<br>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>