Explorar el Código

Translate extmap-allow-mixed between SDP and Jingle. (#2212)

dev1
Jonathan Lennox hace 2 años
padre
commit
f4877406d6
No account linked to committer's email address
Se han modificado 2 ficheros con 16 adiciones y 0 borrados
  1. 10
    0
      modules/sdp/SDP.js
  2. 6
    0
      modules/sdp/SDP.spec.js

+ 10
- 0
modules/sdp/SDP.js Ver fichero

353
                 // TODO: handle params
353
                 // TODO: handle params
354
                 elem.up();
354
                 elem.up();
355
             }
355
             }
356
+
357
+            if (SDPUtil.findLine(this.media[i], 'a=extmap-allow-mixed', this.session)) {
358
+                elem.c('extmap-allow-mixed', {
359
+                    xmlns: 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
360
+                });
361
+                elem.up();
362
+            }
356
             elem.up(); // end of description
363
             elem.up(); // end of description
357
         }
364
         }
358
 
365
 
726
                 += `a=extmap:${hdrExt.getAttribute('id')} ${
733
                 += `a=extmap:${hdrExt.getAttribute('id')} ${
727
                     hdrExt.getAttribute('uri')}\r\n`;
734
                     hdrExt.getAttribute('uri')}\r\n`;
728
         });
735
         });
736
+    if (desc.find('>extmap-allow-mixed[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]').length > 0) {
737
+        sdp += 'a=extmap-allow-mixed\r\n';
738
+    }
729
 
739
 
730
     // XEP-0339 handle ssrc-group attributes
740
     // XEP-0339 handle ssrc-group attributes
731
     desc
741
     desc

+ 6
- 0
modules/sdp/SDP.spec.js Ver fichero

43
             'a=ssrc:2002 cname:juejgy8a01\r\n',
43
             'a=ssrc:2002 cname:juejgy8a01\r\n',
44
             'a=ssrc:2002 name:a8f7g30-a0\r\n',
44
             'a=ssrc:2002 name:a8f7g30-a0\r\n',
45
             'a=rtcp-mux\r\n',
45
             'a=rtcp-mux\r\n',
46
+            'a=extmap-allow-mixed\r\n',
46
             'm=video 9 UDP/TLS/RTP/SAVPF 107 100 99 96\r\n',
47
             'm=video 9 UDP/TLS/RTP/SAVPF 107 100 99 96\r\n',
47
             'c=IN IP4 0.0.0.0\r\n',
48
             'c=IN IP4 0.0.0.0\r\n',
48
             'a=rtpmap:107 h264/90000\r\n',
49
             'a=rtpmap:107 h264/90000\r\n',
61
             'a=rtcp-fb:100 nack pli\r\n',
62
             'a=rtcp-fb:100 nack pli\r\n',
62
             'a=rtcp-fb:100 goog-remb\r\n',
63
             'a=rtcp-fb:100 goog-remb\r\n',
63
             'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
64
             'a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n',
65
+            'a=extmap-allow-mixed\r\n',
64
             'a=setup:active\r\n',
66
             'a=setup:active\r\n',
65
             'a=mid:video\r\n',
67
             'a=mid:video\r\n',
66
             'a=msid:7C0035E5-2DA1-4AEA-804A-9E75BF9B3768 225E9CDA-0384-4C92-92DD-E74C1153EC68\r\n',
68
             'a=msid:7C0035E5-2DA1-4AEA-804A-9E75BF9B3768 225E9CDA-0384-4C92-92DD-E74C1153EC68\r\n',
151
             </payload-type>
153
             </payload-type>
152
             <rtp-hdrext uri='urn:ietf:params:rtp-hdrext:ssrc-audio-level' id='1' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
154
             <rtp-hdrext uri='urn:ietf:params:rtp-hdrext:ssrc-audio-level' id='1' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
153
             <rtp-hdrext uri='http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' id='5' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
155
             <rtp-hdrext uri='http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' id='5' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
156
+            <extmap-allow-mixed xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
154
             <rtcp-mux/>
157
             <rtcp-mux/>
155
             <source ssrc='4039389863' xmlns='urn:xmpp:jingle:apps:rtp:ssma:0'>
158
             <source ssrc='4039389863' xmlns='urn:xmpp:jingle:apps:rtp:ssma:0'>
156
                 <parameter name='cname' value='mixed'/>
159
                 <parameter name='cname' value='mixed'/>
183
             </payload-type>
186
             </payload-type>
184
             <rtp-hdrext uri='http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time' id='3' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
187
             <rtp-hdrext uri='http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time' id='3' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
185
             <rtp-hdrext uri='http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' id='5' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
188
             <rtp-hdrext uri='http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' id='5' xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
189
+            <extmap-allow-mixed xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>
186
             <rtcp-mux/>
190
             <rtcp-mux/>
187
             <source ssrc='3758540092' xmlns='urn:xmpp:jingle:apps:rtp:ssma:0'>
191
             <source ssrc='3758540092' xmlns='urn:xmpp:jingle:apps:rtp:ssma:0'>
188
                 <parameter name='cname' value='mixed'/>
192
                 <parameter name='cname' value='mixed'/>
228
 a=fmtp:126 0-15
232
 a=fmtp:126 0-15
229
 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
233
 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
230
 a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
234
 a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
235
+a=extmap-allow-mixed
231
 a=ssrc:4039389863 cname:mixed
236
 a=ssrc:4039389863 cname:mixed
232
 a=ssrc:4039389863 label:mixedlabelaudio0
237
 a=ssrc:4039389863 label:mixedlabelaudio0
233
 a=ssrc:4039389863 msid:mixedmslabel mixedlabelaudio0
238
 a=ssrc:4039389863 msid:mixedmslabel mixedlabelaudio0
258
 a=rtcp-fb:96 nack pli
263
 a=rtcp-fb:96 nack pli
259
 a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
264
 a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
260
 a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
265
 a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
266
+a=extmap-allow-mixed
261
 a=ssrc:3758540092 cname:mixed
267
 a=ssrc:3758540092 cname:mixed
262
 a=ssrc:3758540092 label:mixedlabelvideo0
268
 a=ssrc:3758540092 label:mixedlabelvideo0
263
 a=ssrc:3758540092 msid:mixedmslabel mixedlabelvideo0
269
 a=ssrc:3758540092 msid:mixedmslabel mixedlabelvideo0

Loading…
Cancelar
Guardar