<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <div class="moz-cite-prefix">What version of GStreamer are you
      using? You may need the latest master for fixes in some specific
      cases.<br>
      <br>
      There is an example of data channels within <a
        moz-do-not-send="true"
href="https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc-sendrecv.c#L303">https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc-sendrecv.c#L303</a>. 
      Search for channel.  There is also data channel usage in the unit
      tests: <a moz-do-not-send="true"
href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/blob/master/tests/check/elements/webrtcbin.c">https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/blob/master/tests/check/elements/webrtcbin.c</a>.<br>
      <br>
      Offers will only be produced if you call the 'create-offer'
      signal.  That can be in response to the 'negotiation-needed'
      signal but that is not required.<br>
      <br>
      You don't need to set webtcbin to READY to renegotiate the SDP
      (within the supported renegotiation scenarios).<br>
      <br>
      Cheers<br>
      -Matt<br>
      <br>
      On 7/6/20 3:31 am, Soebirk, Thorsten Nordholm wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:80091e1829a14c338078410df85feaf7@tpdsexm2.SOLCO.GLOBAL.NTTDATA.COM">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I am struggling to figure out how to use
          DataChannels in WebRTC using webrtcbin (using version 1.16.2),
          and I can’t find any example code to illustrate this. My
          application initiates the WebRTC connection, i.e. sends the
          offer. It also sends and receives both audio and video
          streams. Everything works fine except for DataChannels.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Here’s what I’ve tried so far:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">1. If I send the create-data-channel signal
          before sending the offer while webrtcbin is in state ready, no
          offer is ever produced. Also, no error message is given.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">2. If I wait until audio and video have
          started streaming and then set state back to ready, signal
          create-data-channel, and set state to play again, this seems
          to work in that I get a DataChannel instance back. But when I
          subsequently try to send data using this DataChannel, I get a
          “not open” error.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">3. Signaling create-data-channel when
          webrtcbin is not in ready state just gives an error.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I wonder if I am missing something simple
          or perhaps doing things in the wrong order. Any help greatly
          appreciated. A simple working example would be awesome.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#86807D;mso-fareast-language:EN-GB">Best
            regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#86807D;mso-fareast-language:EN-GB">Thorsten</span><span
            style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </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>