<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      On 8/6/20 11:32 pm, Soebirk, Thorsten Nordholm wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:3f1e17574a9141d58f3a74d76e6d2e55@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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
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.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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"><a name="_MailEndCompose"
            moz-do-not-send="true"><span style="color:#1F497D">Thanks
              Matt. Good resources.<o:p></o:p></span></a></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">My failure to
            find these myself seems to be because I am working with the
            Java bindings, and I was therefore searching for
            “DataChannel” (one word) rather than “data-channel” or
            “data_channel”. I’ll remember that in the future.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">The only thing
            in the examples that struck me as different from my own
            program is that the examples set the bundle-policy to
            "max-bundle". I tried this and my program now works.
          </span><span style="font-family:Wingdings;color:#1F497D">J</span><span
            style="color:#1F497D"><o:p></o:p></span></p>
      </div>
    </blockquote>
    <br>
    This is one such case that is fixed in master.  data-channel-only
    without bundle.<br>
    <br>
    <blockquote type="cite"
cite="mid:3f1e17574a9141d58f3a74d76e6d2e55@tpdsexm2.SOLCO.GLOBAL.NTTDATA.COM">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">I am now facing
            a new challenge. I am using the DataChannel implementation
            from this fork (</span><a
href="https://github.com/ai-foundation/gst1-java-core/blob/webrtc-datachannels/src/org/freedesktop/gstreamer/webrtc/WebRTCDataChannel.java"
            moz-do-not-send="true">https://github.com/ai-foundation/gst1-java-core/blob/webrtc-datachannels/src/org/freedesktop/gstreamer/webrtc/WebRTCDataChannel.java</a>)<span
            style="color:#1F497D"> of the gst1-java-core bindings. It
            only exposes the "send-string" signal, which works, but I
            need to send binary data. So I need to figure out how to
            wrap the "send-data" signal. GStreamer expects a GBytes
            pointer and I can’t seem to figure out how to provide
            something compatibly from Java. I have tried simply
            supplying a byte[] or a ByteBuffer, but in both cases it
            gives the error "Requested to send data that is too large"
            which is probably just an indication that GStreamer doesn’t
            know what to do with the data. Any idea what a correct
            binding would look like? Og should I be asking this
            elsewhere?<o:p></o:p></span></p>
      </div>
    </blockquote>
    <br>
    I'm not familiar with how the java bindings wrap something like
    GBytes.  I would look for some other API that uses GBytes and see
    how that maps.<br>
    <br>
    <blockquote type="cite"
cite="mid:3f1e17574a9141d58f3a74d76e6d2e55@tpdsexm2.SOLCO.GLOBAL.NTTDATA.COM">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Thanks!<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Verdana",sans-serif;color:#86807D;mso-fareast-language:EN-GB">Best
              regards,</span><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">Thorsten</span><o:p></o:p></p>
        </div>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="mso-fareast-language:EN-GB" lang="EN-US">From:</span></b><span
                style="mso-fareast-language:EN-GB" lang="EN-US"> Matthew
                Waters [<a class="moz-txt-link-freetext" href="mailto:ystreet00@gmail.com">mailto:ystreet00@gmail.com</a>]
                <br>
                <b>Sent:</b> 07 June 2020 03:05<br>
                <b>To:</b> Discussion of the development of and with
                GStreamer <a class="moz-txt-link-rfc2396E" href="mailto:gstreamer-devel@lists.freedesktop.org"><gstreamer-devel@lists.freedesktop.org></a>;
                Soebirk, Thorsten Nordholm
                <a class="moz-txt-link-rfc2396E" href="mailto:Thorsten.Sobirk@itelligence.dk"><Thorsten.Sobirk@itelligence.dk></a><br>
                <b>Subject:</b> Re: How to use webrtcbin DataChannel<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">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
href="https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc-sendrecv.c#L303"
              moz-do-not-send="true">
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
href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/blob/master/tests/check/elements/webrtcbin.c"
              moz-do-not-send="true">
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:<span
              style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <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,</span><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">Thorsten</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif;mso-fareast-language:EN-GB"><br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>gstreamer-devel mailing list<o:p></o:p></pre>
          <pre><a href="mailto:gstreamer-devel@lists.freedesktop.org" moz-do-not-send="true">gstreamer-devel@lists.freedesktop.org</a><o:p></o:p></pre>
          <pre><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:EN-GB"><o:p> </o:p></span></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>