After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639420 - RTSP setup, add client_ports
RTSP setup, add client_ports
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.26
Other Linux
: Normal normal
: 1.0.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 687924 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-13 14:06 UTC by Marc Leeman
Modified: 2012-11-16 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add client_ports to RTSP SETUP; initialise with server SDP ports (1015 bytes, patch)
2011-01-13 14:06 UTC, Marc Leeman
none Details | Review
add client_ports to RTSP SETUP; initialise with server SDP ports (1.32 KB, patch)
2011-04-08 14:42 UTC, Marc Leeman
none Details | Review
udpsrc to FALSE disallows catching the same stream twice on one machine for some encoders (1.25 KB, patch)
2012-11-06 14:11 UTC, Marc Leeman
none Details | Review

Description Marc Leeman 2011-01-13 14:06:48 UTC
Created attachment 178223 [details] [review]
add client_ports to RTSP SETUP; initialise with server SDP ports

This patch is for review. We're not quite clear on how to do these fixups.



We have had a number of encoders that require the client_ports to be in the RTSP SETUP command.

This patch does this; and initialises the ports based on the port in the SDP.
Comment 1 Marc Leeman 2011-04-08 14:42:17 UTC
Created attachment 185530 [details] [review]
add client_ports to RTSP SETUP; initialise with server SDP ports

Updates client_ports check so that 3000-3001 is used instead of 3000-3002 (for RTP/RTSP).

Use the client_ports if set; ignore those from SDP (if SDP does not give the correct info; client-ports allows to override).
Comment 2 Marc Leeman 2011-04-08 14:44:04 UTC
This allows to use RTSP with and compensate for a Sony RTSP encoder bug when another decoder is already listening to the stream on a different port combination (other decoder specified the port range, RTSP server seems to have a bug that it allocates/negociates a port combination; but keeps streaming on the old ports; not on the negociated ones).

Using port-range allows to force the port combination.
Comment 3 Wim Taymans 2012-09-07 15:22:01 UTC
I would like it that the client_port_range variable is not overwritten by server contents because it is a user configurable value. Maybe make a new variable to hold the currently negotiated values.

I don't understand why the port max check was changed from <= to <, the max value should also be alowed AFAIK.
Comment 4 Marc Leeman 2012-11-05 15:57:21 UTC
OK, this is a good reminder for me to describe in detail why what change was made.

  if (src->client_port_range.max > 0 && tmp_rtcp >= src->client_port_range.max)
    goto no_ports;


If the port range is passed 3000-3001; you should only exit if the rtcp port is 3002; not if it is 3001.

At least, that was my interpretation, the range specifies the ports that can be used. The current implementation assumes that you cannot use the last port in the range.
Comment 5 Wim Taymans 2012-11-06 12:38:42 UTC
commit 7cbca3dcd12d7746e74d716c4f2dcd177317d6ed
Author: Marc Leeman <marc.leeman@gmail.com>
Date:   Tue Nov 6 13:22:58 2012 +0100

    rtsp: the RTCP port number is inclusive
    
    The configured port number pair has its upper bound set to the maximum
    allowed RTCP port, inclusive.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=639420
Comment 6 Wim Taymans 2012-11-06 12:40:15 UTC
I'm uncertain about the impact of adding the client_port properties to multicast, it is supposed to be a unicast property only.
Comment 7 Marc Leeman 2012-11-06 14:11:31 UTC
Created attachment 228248 [details] [review]
udpsrc to FALSE disallows catching the same stream twice on one machine for some encoders
Comment 8 Marc Leeman 2012-11-06 14:24:28 UTC
The previously attached patch is triggered for this encoder is but is probably wider:

Since the reuse on the udpsrc is set to false; for multicast rtsp servers that just pass the multicast-group and port; is has now become impossible to listen to the stream twice.

Setting the reuse to TRUE again (as it was before this parameter was introduced) solves this issue.
Comment 9 Marc Leeman 2012-11-06 16:53:48 UTC
Trace of rtspsrc without changes, 

0.10.30-1 GNU/Debian build with \"reuse\" set on TRUE (previous patch)

barco@mgsserver001:~$ gst-launch rtspsrc location=rtsp://172.16.68.208/media/video1/video protocols=0x2 debug=1 ! decodebin2 ! autovideosink
Setting pipeline to PAUSED ...
RTSP request message 0x7fff37c621f0
 request line:
   method: 'OPTIONS'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'User-Agent', value: 'RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)'
   key: 'ClientChallenge', value: '9e26d33f2984236010ef6253fb1887f7'
   key: 'CompanyID', value: 'KnKV4M4I/B2FjJ1TToLycw=='
   key: 'GUID', value: '00000000-0000-0000-0000-000000000000'
   key: 'RegionData', value: '0'
   key: 'PlayerStarttime', value: '[28/03/2003:22:50:23 00:00]'
   key: 'ClientID', value: 'Linux_2.4_6.0.9.1235_play32_RN01_EN_586'
 body:
RTSP response message 0x7fff37c621b0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '1'
   key: 'Public', value: 'DESCRIBE'
   key: 'Public', value: 'SETUP'
   key: 'Public', value: 'PLAY'
   key: 'Public', value: 'TEARDOWN'
   key: 'Public', value: 'GET_PARAMETER'
   key: 'Public', value: 'SET_PARAMETER'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x27fcb70): 00                                               .               
RTSP request message 0x7fff37c621f0
 request line:
   method: 'DESCRIBE'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Accept', value: 'application/sdp'
 body:
RTSP response message 0x7fff37c621b0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '2'
   key: 'Content-Base', value: 'rtsp://172.16.68.208/media/video1/'
   key: 'Content-Type', value: 'application/sdp'
   key: 'Content-Length', value: '352'
 body: length 353
00000000 (0x27fd430): 76 3d 30 0d 0a 6f 3d 2d 20 31 32 33 30 39 39 37  v=0..o=- 1230997
00000010 (0x27fd440): 30 32 32 20 31 20 49 4e 20 49 50 34 20 31 37 32  022 1 IN IP4 172
00000020 (0x27fd450): 2e 31 36 2e 36 38 2e 32 30 38 0d 0a 73 3d 53 4f  .16.68.208..s=SO
00000030 (0x27fd460): 4e 59 20 52 54 53 50 20 53 65 72 76 65 72 0d 0a  NY RTSP Server..
00000040 (0x27fd470): 63 3d 49 4e 20 49 50 34 20 30 2e 30 2e 30 2e 30  c=IN IP4 0.0.0.0
00000050 (0x27fd480): 0d 0a 74 3d 30 20 30 0d 0a 61 3d 72 61 6e 67 65  ..t=0 0..a=range
00000060 (0x27fd490): 3a 6e 70 74 3d 6e 6f 77 2d 0d 0a 6d 3d 76 69 64  :npt=now-..m=vid
00000070 (0x27fd4a0): 65 6f 20 30 20 52 54 50 2f 41 56 50 20 31 30 35  eo 0 RTP/AVP 105
00000080 (0x27fd4b0): 0d 0a 61 3d 72 74 70 6d 61 70 3a 31 30 35 20 48  ..a=rtpmap:105 H
00000090 (0x27fd4c0): 32 36 34 2f 39 30 30 30 30 0d 0a 61 3d 63 6f 6e  264/90000..a=con
000000a0 (0x27fd4d0): 74 72 6f 6c 3a 76 69 64 65 6f 0d 0a 61 3d 66 72  trol:video..a=fr
000000b0 (0x27fd4e0): 61 6d 65 72 61 74 65 3a 32 35 2e 30 0d 0a 61 3d  amerate:25.0..a=
000000c0 (0x27fd4f0): 66 6d 74 70 3a 31 30 35 20 70 61 63 6b 65 74 69  fmtp:105 packeti
000000d0 (0x27fd500): 7a 61 74 69 6f 6e 2d 6d 6f 64 65 3d 31 3b 20 70  zation-mode=1; p
000000e0 (0x27fd510): 72 6f 66 69 6c 65 2d 6c 65 76 65 6c 2d 69 64 3d  rofile-level-id=
000000f0 (0x27fd520): 34 32 38 30 31 66 3b 20 73 70 72 6f 70 2d 70 61  42801f; sprop-pa
00000100 (0x27fd530): 72 61 6d 65 74 65 72 2d 73 65 74 73 3d 5a 30 4b  rameter-sets=Z0K
00000110 (0x27fd540): 41 48 39 6f 43 30 45 6b 51 2c 61 4d 34 38 67 41  AH9oC0EkQ,aM48gA
00000120 (0x27fd550): 3d 3d 0d 0a 6d 3d 61 75 64 69 6f 20 30 20 52 54  ==..m=audio 0 RT
00000130 (0x27fd560): 50 2f 41 56 50 20 30 0d 0a 61 3d 72 74 70 6d 61  P/AVP 0..a=rtpma
00000140 (0x27fd570): 70 3a 30 20 50 43 4d 55 2f 38 30 30 30 0d 0a 61  p:0 PCMU/8000..a
00000150 (0x27fd580): 3d 63 6f 6e 74 72 6f 6c 3a 61 75 64 69 6f 0d 0a  =control:audio..
00000160 (0x27fd590): 00                                               .               
sdp packet 0x27fd680:
 version:       '0'
 origin:
  username:     '-'
  sess_id:      '1230997022'
  sess_version: '1'
  nettype:      'IN'
  addrtype:     'IP4'
  addr:         '172.16.68.208'
 session_name:  'SONY RTSP Server'
 information:   '(NULL)'
 uri:           '(NULL)'
 connection:
  nettype:      'IN'
  addrtype:     'IP4'
  address:      '0.0.0.0'
  ttl:          '0'
  addr_number:  '0'
 key:
  type:         '(NULL)'
  data:         '(NULL)'
 attributes:
  attribute 'range' : 'npt=now-'
 medias:
  media 0:
   media:       'video'
   port:        '0'
   num_ports:   '4294967295'
   proto:       'RTP/AVP'
   formats:
    format  '105'
   information: '(NULL)'
   key:
    type:       '(NULL)'
    data:       '(NULL)'
   attributes:
    attribute 'rtpmap' : '105 H264/90000'
    attribute 'control' : 'video'
    attribute 'framerate' : '25.0'
    attribute 'fmtp' : '105 packetization-mode=1; profile-level-id=42801f; sprop-parameter-sets=Z0KAH9oC0EkQ,aM48gA=='
  media 1:
   media:       'audio'
   port:        '0'
   num_ports:   '4294967295'
   proto:       'RTP/AVP'
   formats:
    format  '0'
   information: '(NULL)'
   key:
    type:       '(NULL)'
    data:       '(NULL)'
   attributes:
    attribute 'rtpmap' : '0 PCMU/8000'
    attribute 'control' : 'audio'
RTSP request message 0x7fff37c62020
 request line:
   method: 'SETUP'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Transport', value: 'RTP/AVP;multicast'
 body:
RTSP response message 0x7fff37c61fe0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '3'
   key: 'Session', value: '1230997022'
   key: 'Transport', value: 'RTP/AVP;multicast;destination=239.2.68.208;port=8888-8889'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x27fe6a0): 00                                               .               
RTSP request message 0x7fff37c62020
 request line:
   method: 'SETUP'
   uri:    'rtsp://172.16.68.208/media/video1/audio'
   version: '1.0'
 headers:
   key: 'Transport', value: 'RTP/AVP;multicast'
 body:
RTSP response message 0x7fff37c61fe0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '4'
   key: 'Session', value: '1230997022'
   key: 'Transport', value: 'RTP/AVP;multicast;destination=239.2.68.208;port=8888-8889'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x27fcbd0): 00                                               .               
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
RTSP request message 0x7fff37c62230
 request line:
   method: 'PLAY'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Range', value: 'npt=now-'
 body:
RTSP response message 0x7fff37c621f0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '5'
   key: 'Session', value: '1230997022'
   key: 'Range', value: 'npt=now-'
   key: 'Scale', value: '1.0'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x7f6548004b00): 00                                               .               
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2: Internal data flow error.
Additional debug info:
gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2:
streaming task paused, reason not-linked (-1)
Execution ended after 2062804679 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
RTSP request message 0x7fff37c62260
 request line:
   method: 'TEARDOWN'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
 body:
RTSP response message 0x7fff37c62220
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '6'
   key: 'Session', value: '1230997022'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x7f6548004fc0): 00                                               .               
Setting pipeline to NULL ...
Freeing pipeline ...


Same trace, now with port-range:
barco@mgsserver001:~$ gst-launch rtspsrc location=rtsp://172.16.68.208/media/video1/video protocols=0x2 debug=1 port-range=3000-3001! decodebin2 ! autovideosink
Setting pipeline to PAUSED ...
RTSP request message 0x7fff38d5b8d0
 request line:
   method: 'OPTIONS'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'User-Agent', value: 'RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)'
   key: 'ClientChallenge', value: '9e26d33f2984236010ef6253fb1887f7'
   key: 'CompanyID', value: 'KnKV4M4I/B2FjJ1TToLycw=='
   key: 'GUID', value: '00000000-0000-0000-0000-000000000000'
   key: 'RegionData', value: '0'
   key: 'PlayerStarttime', value: '[28/03/2003:22:50:23 00:00]'
   key: 'ClientID', value: 'Linux_2.4_6.0.9.1235_play32_RN01_EN_586'
 body:
RTSP response message 0x7fff38d5b890
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '1'
   key: 'Public', value: 'DESCRIBE'
   key: 'Public', value: 'SETUP'
   key: 'Public', value: 'PLAY'
   key: 'Public', value: 'TEARDOWN'
   key: 'Public', value: 'GET_PARAMETER'
   key: 'Public', value: 'SET_PARAMETER'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x2220ab0): 00                                               .               
RTSP request message 0x7fff38d5b8d0
 request line:
   method: 'DESCRIBE'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Accept', value: 'application/sdp'
 body:
RTSP response message 0x7fff38d5b890
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '2'
   key: 'Content-Base', value: 'rtsp://172.16.68.208/media/video1/'
   key: 'Content-Type', value: 'application/sdp'
   key: 'Content-Length', value: '352'
 body: length 353
00000000 (0x22213c0): 76 3d 30 0d 0a 6f 3d 2d 20 31 32 33 31 30 30 31  v=0..o=- 1231001
00000010 (0x22213d0): 31 38 33 20 31 20 49 4e 20 49 50 34 20 31 37 32  183 1 IN IP4 172
00000020 (0x22213e0): 2e 31 36 2e 36 38 2e 32 30 38 0d 0a 73 3d 53 4f  .16.68.208..s=SO
00000030 (0x22213f0): 4e 59 20 52 54 53 50 20 53 65 72 76 65 72 0d 0a  NY RTSP Server..
00000040 (0x2221400): 63 3d 49 4e 20 49 50 34 20 30 2e 30 2e 30 2e 30  c=IN IP4 0.0.0.0
00000050 (0x2221410): 0d 0a 74 3d 30 20 30 0d 0a 61 3d 72 61 6e 67 65  ..t=0 0..a=range
00000060 (0x2221420): 3a 6e 70 74 3d 6e 6f 77 2d 0d 0a 6d 3d 76 69 64  :npt=now-..m=vid
00000070 (0x2221430): 65 6f 20 30 20 52 54 50 2f 41 56 50 20 31 30 35  eo 0 RTP/AVP 105
00000080 (0x2221440): 0d 0a 61 3d 72 74 70 6d 61 70 3a 31 30 35 20 48  ..a=rtpmap:105 H
00000090 (0x2221450): 32 36 34 2f 39 30 30 30 30 0d 0a 61 3d 63 6f 6e  264/90000..a=con
000000a0 (0x2221460): 74 72 6f 6c 3a 76 69 64 65 6f 0d 0a 61 3d 66 72  trol:video..a=fr
000000b0 (0x2221470): 61 6d 65 72 61 74 65 3a 32 35 2e 30 0d 0a 61 3d  amerate:25.0..a=
000000c0 (0x2221480): 66 6d 74 70 3a 31 30 35 20 70 61 63 6b 65 74 69  fmtp:105 packeti
000000d0 (0x2221490): 7a 61 74 69 6f 6e 2d 6d 6f 64 65 3d 31 3b 20 70  zation-mode=1; p
000000e0 (0x22214a0): 72 6f 66 69 6c 65 2d 6c 65 76 65 6c 2d 69 64 3d  rofile-level-id=
000000f0 (0x22214b0): 34 32 38 30 31 66 3b 20 73 70 72 6f 70 2d 70 61  42801f; sprop-pa
00000100 (0x22214c0): 72 61 6d 65 74 65 72 2d 73 65 74 73 3d 5a 30 4b  rameter-sets=Z0K
00000110 (0x22214d0): 41 48 39 6f 43 30 45 6b 51 2c 61 4d 34 38 67 41  AH9oC0EkQ,aM48gA
00000120 (0x22214e0): 3d 3d 0d 0a 6d 3d 61 75 64 69 6f 20 30 20 52 54  ==..m=audio 0 RT
00000130 (0x22214f0): 50 2f 41 56 50 20 30 0d 0a 61 3d 72 74 70 6d 61  P/AVP 0..a=rtpma
00000140 (0x2221500): 70 3a 30 20 50 43 4d 55 2f 38 30 30 30 0d 0a 61  p:0 PCMU/8000..a
00000150 (0x2221510): 3d 63 6f 6e 74 72 6f 6c 3a 61 75 64 69 6f 0d 0a  =control:audio..
00000160 (0x2221520): 00                                               .               
sdp packet 0x2221610:
 version:       '0'
 origin:
  username:     '-'
  sess_id:      '1231001183'
  sess_version: '1'
  nettype:      'IN'
  addrtype:     'IP4'
  addr:         '172.16.68.208'
 session_name:  'SONY RTSP Server'
 information:   '(NULL)'
 uri:           '(NULL)'
 connection:
  nettype:      'IN'
  addrtype:     'IP4'
  address:      '0.0.0.0'
  ttl:          '0'
  addr_number:  '0'
 key:
  type:         '(NULL)'
  data:         '(NULL)'
 attributes:
  attribute 'range' : 'npt=now-'
 medias:
  media 0:
   media:       'video'
   port:        '0'
   num_ports:   '4294967295'
   proto:       'RTP/AVP'
   formats:
    format  '105'
   information: '(NULL)'
   key:
    type:       '(NULL)'
    data:       '(NULL)'
   attributes:
    attribute 'rtpmap' : '105 H264/90000'
    attribute 'control' : 'video'
    attribute 'framerate' : '25.0'
    attribute 'fmtp' : '105 packetization-mode=1; profile-level-id=42801f; sprop-parameter-sets=Z0KAH9oC0EkQ,aM48gA=='
  media 1:
   media:       'audio'
   port:        '0'
   num_ports:   '4294967295'
   proto:       'RTP/AVP'
   formats:
    format  '0'
   information: '(NULL)'
   key:
    type:       '(NULL)'
    data:       '(NULL)'
   attributes:
    attribute 'rtpmap' : '0 PCMU/8000'
    attribute 'control' : 'audio'
RTSP request message 0x7fff38d5b700
 request line:
   method: 'SETUP'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Transport', value: 'RTP/AVP;multicast'
 body:
RTSP response message 0x7fff38d5b6c0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '3'
   key: 'Session', value: '1231001183'
   key: 'Transport', value: 'RTP/AVP;multicast;destination=239.2.68.208;port=8888-8889'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x2222660): 00                                               .               
RTSP request message 0x7fff38d5b700
 request line:
   method: 'SETUP'
   uri:    'rtsp://172.16.68.208/media/video1/audio'
   version: '1.0'
 headers:
   key: 'Transport', value: 'RTP/AVP;multicast'
 body:
RTSP response message 0x7fff38d5b6c0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '4'
   key: 'Session', value: '1231001183'
   key: 'Transport', value: 'RTP/AVP;multicast;destination=239.2.68.208;port=8888-8889'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x2220860): 00                                               .               
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
RTSP request message 0x7fff38d5b910
 request line:
   method: 'PLAY'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Range', value: 'npt=now-'
 body:
RTSP response message 0x7fff38d5b8d0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '5'
   key: 'Session', value: '1231001183'
   key: 'Range', value: 'npt=now-'
   key: 'Scale', value: '1.0'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x7f99a0003f80): 00                                               .               
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 2090015131 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
RTSP request message 0x7fff38d5b940
 request line:
   method: 'TEARDOWN'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
 body:
RTSP response message 0x7fff38d5b900
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '6'
   key: 'Session', value: '1231001183'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x2260960): 00                                               .               
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 10 Marc Leeman 2012-11-06 17:01:49 UTC
Trace with the afore mentioned patch, including the \"reuse\" set to TRUE so that multiple decoders can listen to this stream.

This particular encoder seems to require the client to suggest the ports it needs to send to; otherwise it will use the same ports.

IIRC, this is indeed the behaviour of the live555 stack.

barco@mgsserver001:~$ gst-launch rtspsrc location=rtsp://172.16.68.208/media/video1 protocols=0x2 debug=1 port-range=3000-3004 ! decodebin2 ! autovideosink
Setting pipeline to PAUSED ...
RTSP request message 0x7fffddd3bd80
 request line:
   method: 'OPTIONS'
   uri:    'rtsp://172.16.68.208/media/video1'
   version: '1.0'
 headers:
   key: 'User-Agent', value: 'RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)'
   key: 'ClientChallenge', value: '9e26d33f2984236010ef6253fb1887f7'
   key: 'CompanyID', value: 'KnKV4M4I/B2FjJ1TToLycw=='
   key: 'GUID', value: '00000000-0000-0000-0000-000000000000'
   key: 'RegionData', value: '0'
   key: 'PlayerStarttime', value: '[28/03/2003:22:50:23 00:00]'
   key: 'ClientID', value: 'Linux_2.4_6.0.9.1235_play32_RN01_EN_586'
 body:
RTSP response message 0x7fffddd3bd40
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '1'
   key: 'Public', value: 'DESCRIBE'
   key: 'Public', value: 'SETUP'
   key: 'Public', value: 'PLAY'
   key: 'Public', value: 'TEARDOWN'
   key: 'Public', value: 'GET_PARAMETER'
   key: 'Public', value: 'SET_PARAMETER'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x1509690): 00                                               .               
RTSP request message 0x7fffddd3bd80
 request line:
   method: 'DESCRIBE'
   uri:    'rtsp://172.16.68.208/media/video1'
   version: '1.0'
 headers:
   key: 'Accept', value: 'application/sdp'
 body:
RTSP response message 0x7fffddd3bd40
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '2'
   key: 'Content-Base', value: 'rtsp://172.16.68.208/media/video1/'
   key: 'Content-Type', value: 'application/sdp'
   key: 'Content-Length', value: '352'
 body: length 353
00000000 (0x150b210): 76 3d 30 0d 0a 6f 3d 2d 20 31 32 33 31 30 33 38  v=0..o=- 1231038
00000010 (0x150b220): 31 37 30 20 31 20 49 4e 20 49 50 34 20 31 37 32  170 1 IN IP4 172
00000020 (0x150b230): 2e 31 36 2e 36 38 2e 32 30 38 0d 0a 73 3d 53 4f  .16.68.208..s=SO
00000030 (0x150b240): 4e 59 20 52 54 53 50 20 53 65 72 76 65 72 0d 0a  NY RTSP Server..
00000040 (0x150b250): 63 3d 49 4e 20 49 50 34 20 30 2e 30 2e 30 2e 30  c=IN IP4 0.0.0.0
00000050 (0x150b260): 0d 0a 74 3d 30 20 30 0d 0a 61 3d 72 61 6e 67 65  ..t=0 0..a=range
00000060 (0x150b270): 3a 6e 70 74 3d 6e 6f 77 2d 0d 0a 6d 3d 76 69 64  :npt=now-..m=vid
00000070 (0x150b280): 65 6f 20 30 20 52 54 50 2f 41 56 50 20 31 30 35  eo 0 RTP/AVP 105
00000080 (0x150b290): 0d 0a 61 3d 72 74 70 6d 61 70 3a 31 30 35 20 48  ..a=rtpmap:105 H
00000090 (0x150b2a0): 32 36 34 2f 39 30 30 30 30 0d 0a 61 3d 63 6f 6e  264/90000..a=con
000000a0 (0x150b2b0): 74 72 6f 6c 3a 76 69 64 65 6f 0d 0a 61 3d 66 72  trol:video..a=fr
000000b0 (0x150b2c0): 61 6d 65 72 61 74 65 3a 32 35 2e 30 0d 0a 61 3d  amerate:25.0..a=
000000c0 (0x150b2d0): 66 6d 74 70 3a 31 30 35 20 70 61 63 6b 65 74 69  fmtp:105 packeti
000000d0 (0x150b2e0): 7a 61 74 69 6f 6e 2d 6d 6f 64 65 3d 31 3b 20 70  zation-mode=1; p
000000e0 (0x150b2f0): 72 6f 66 69 6c 65 2d 6c 65 76 65 6c 2d 69 64 3d  rofile-level-id=
000000f0 (0x150b300): 34 32 38 30 31 66 3b 20 73 70 72 6f 70 2d 70 61  42801f; sprop-pa
00000100 (0x150b310): 72 61 6d 65 74 65 72 2d 73 65 74 73 3d 5a 30 4b  rameter-sets=Z0K
00000110 (0x150b320): 41 48 39 6f 43 30 45 6b 51 2c 61 4d 34 38 67 41  AH9oC0EkQ,aM48gA
00000120 (0x150b330): 3d 3d 0d 0a 6d 3d 61 75 64 69 6f 20 30 20 52 54  ==..m=audio 0 RT
00000130 (0x150b340): 50 2f 41 56 50 20 30 0d 0a 61 3d 72 74 70 6d 61  P/AVP 0..a=rtpma
00000140 (0x150b350): 70 3a 30 20 50 43 4d 55 2f 38 30 30 30 0d 0a 61  p:0 PCMU/8000..a
00000150 (0x150b360): 3d 63 6f 6e 74 72 6f 6c 3a 61 75 64 69 6f 0d 0a  =control:audio..
00000160 (0x150b370): 00                                               .               
sdp packet 0x150b460:
 version:       '0'
 origin:
  username:     '-'
  sess_id:      '1231038170'
  sess_version: '1'
  nettype:      'IN'
  addrtype:     'IP4'
  addr:         '172.16.68.208'
 session_name:  'SONY RTSP Server'
 information:   '(NULL)'
 uri:           '(NULL)'
 connection:
  nettype:      'IN'
  addrtype:     'IP4'
  address:      '0.0.0.0'
  ttl:          '0'
  addr_number:  '0'
 key:
  type:         '(NULL)'
  data:         '(NULL)'
 attributes:
  attribute 'range' : 'npt=now-'
 medias:
  media 0:
   media:       'video'
   port:        '0'
   num_ports:   '4294967295'
   proto:       'RTP/AVP'
   formats:
    format  '105'
   information: '(NULL)'
   key:
    type:       '(NULL)'
    data:       '(NULL)'
   attributes:
    attribute 'rtpmap' : '105 H264/90000'
    attribute 'control' : 'video'
    attribute 'framerate' : '25.0'
    attribute 'fmtp' : '105 packetization-mode=1; profile-level-id=42801f; sprop-parameter-sets=Z0KAH9oC0EkQ,aM48gA=='
  media 1:
   media:       'audio'
   port:        '0'
   num_ports:   '4294967295'
   proto:       'RTP/AVP'
   formats:
    format  '0'
   information: '(NULL)'
   key:
    type:       '(NULL)'
    data:       '(NULL)'
   attributes:
    attribute 'rtpmap' : '0 PCMU/8000'
    attribute 'control' : 'audio'
RTSP request message 0x7fffddd3bbb0
 request line:
   method: 'SETUP'
   uri:    'rtsp://172.16.68.208/media/video1/video'
   version: '1.0'
 headers:
   key: 'Transport', value: 'RTP/AVP;multicast;client_port=3000-3001'
 body:
RTSP response message 0x7fffddd3bb70
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '3'
   key: 'Session', value: '1231038170'
   key: 'Transport', value: 'RTP/AVP;multicast;destination=239.2.68.208;port=3000-3001'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x7f1e50000ac0): 00                                               .               
RTSP request message 0x7fffddd3bbb0
 request line:
   method: 'SETUP'
   uri:    'rtsp://172.16.68.208/media/video1/audio'
   version: '1.0'
 headers:
   key: 'Transport', value: 'RTP/AVP;multicast;client_port=3002-3003'
 body:
RTSP response message 0x7fffddd3bb70
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '4'
   key: 'Session', value: '1231038170'
   key: 'Transport', value: 'RTP/AVP;multicast;destination=239.2.68.208;port=3002-3003'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x7f1e500015a0): 00                                               .               
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
RTSP request message 0x7fffddd3bdc0
 request line:
   method: 'PLAY'
   uri:    'rtsp://172.16.68.208/media/video1'
   version: '1.0'
 headers:
   key: 'Range', value: 'npt=now-'
 body:
RTSP response message 0x7fffddd3bd80
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '5'
   key: 'Session', value: '1231038170'
   key: 'Range', value: 'npt=now-'
   key: 'Scale', value: '1.0'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x7f1e5000b700): 00                                               .               
New clock: GstSystemClock
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2866): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2866): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage:
There may be a timestamping problem, or this computer is too slow.
ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage: Output window was closed
Additional debug info:
xvimagesink.c(1311): gst_xvimagesink_handle_xevents (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage
Execution ended after 18585658872 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
RTSP request message 0x7fffddd3bdf0
 request line:
   method: 'TEARDOWN'
   uri:    'rtsp://172.16.68.208/media/video1'
   version: '1.0'
 headers:
 body:
RTSP response message 0x7fffddd3bdb0
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '6'
   key: 'Session', value: '1231038170'
   key: 'Content-Length', value: '0'
 body: length 1
00000000 (0x15b7d20): 00                                               .               
Setting pipeline to NULL ...
Freeing pipeline ...
barco@mgsserver001:~$
Comment 11 Marc Leeman 2012-11-08 13:05:49 UTC
Review of attachment 228248 [details] [review]:

obsoleted in this bugreport due to bug 687924
Comment 12 Wim Taymans 2012-11-16 11:24:41 UTC
We should not try to allocate any ports client side when requesting multicast. It is only when the server replies that we can create any port and add ourselves to the multicast address.

What we should do is suggest a port pair in multicast when the user selected one (without actually allocating and binding to the port).

Setting reuse is IMO not such a good idea as it allows multiple clients on the same machine to bind to the same port in unicast, which is only going to fail (it looks like only the last bound socket gets the data).

If I understand the problem correctly, this should fix the issue:

commit cc9cb26be16e51fe748a01b2a75be91c35bcfc1e
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri Nov 16 12:00:14 2012 +0100

    rtspsrc: propose ports in multicast
    
    When the user configured a port-range, propose ports from this range
    as the multicast ports. The server is free to ignore this request but if it
    honors it, increment our ports so that we suggest the next port pair for
    the next stream.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=639420
Comment 13 Wim Taymans 2012-11-16 11:25:54 UTC
*** Bug 687924 has been marked as a duplicate of this bug. ***