[Live-devel] testRTSPClient loses sink context when receiving from multiple RTSP clients
Jonathan Lucas
jonathan at five.ai
Wed Oct 26 08:19:56 PDT 2016
I'm setting up a system where I have multiple (4-6) cameras providing a
synchronised MJPEG feed via RTSP to a central PC. testRTSPClient is an
very close match to what I need to do initially (I will need to dump the
data in my own format and add camera control and synchronisation in a
separate thread, but that's for later).
However, when I use a "virgin" testRTSPClient on a simple 2-camera setup
to make sure I can talk to the cameras, it appears that it receives
correctly from both cameras, but incorrectly thinks the data comes from
only one of them. I've done some digging in the client code, and I can
see that a DummySink instance is created for each subsession (one for
each camera), but when the DummySink::afterGettingFrame method is
called, the instance provided is always from only one of the instances.
See the output from testRTSPClient below. Does anyone know what might
cause this?
./testRTSPClient rtsp://192.168.5.124 rtsp://192.168.5.209
Opening connection to 192.168.5.124, port 554...
Opening connection to 192.168.5.209, port 554...
...remote connection opened
Sending request: DESCRIBE rtsp://192.168.5.209 RTSP/1.0
CSeq: 2
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2016.02.09)
Accept: application/sdp
...remote connection opened
Sending request: DESCRIBE rtsp://192.168.5.124 RTSP/1.0
CSeq: 2
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2016.02.09)
Accept: application/sdp
Received 359 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 2
Content-Base: rtsp://192.168.5.209/
Content-type: application/sdp
Date: Sat, 01 Jan 2011 08:00:03 GMT
Content-length: 205
v=0
o=- 1234403485170696 1 IN IP4 192.168.5.209
s=PGR Zebra2
a=x-dimensions:1920,1080
i=Stream MJPEG
a=type=broadcast
a=control:*
t=0 0
m=video 5004 RTP/AVP 26
c=IN IP4 0.0.0.0
a=control:track1
============================================================
continueAfterDESCRIBE
============================================================
[URL:"rtsp://192.168.5.209/"]: Got a SDP description:
v=0
o=- 1234403485170696 1 IN IP4 192.168.5.209
s=PGR Zebra2
a=x-dimensions:1920,1080
i=Stream MJPEG
a=type=broadcast
a=control:*
t=0 0
m=video 5004 RTP/AVP 26
c=IN IP4 0.0.0.0
a=control:track1
============================================================
setupNextSubsession
============================================================
[URL:"rtsp://192.168.5.209/"]: Initiated the "video/JPEG" subsession
(client ports 5004-5005)
Sending request: SETUP rtsp://192.168.5.209/track1 RTSP/1.0
CSeq: 3
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2016.02.09)
Transport: RTP/AVP;unicast;client_port=5004-5005
Received 359 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 2
Content-Base: rtsp://192.168.5.124/
Content-type: application/sdp
Date: Sat, 01 Jan 2011 08:00:03 GMT
Content-length: 205
v=0
o=- 1234403485170696 1 IN IP4 192.168.5.124
s=PGR Zebra2
a=x-dimensions:1920,1080
i=Stream MJPEG
a=type=broadcast
a=control:*
t=0 0
m=video 5004 RTP/AVP 26
c=IN IP4 0.0.0.0
a=control:track1
============================================================
continueAfterDESCRIBE
============================================================
[URL:"rtsp://192.168.5.124/"]: Got a SDP description:
v=0
o=- 1234403485170696 1 IN IP4 192.168.5.124
s=PGR Zebra2
a=x-dimensions:1920,1080
i=Stream MJPEG
a=type=broadcast
a=control:*
t=0 0
m=video 5004 RTP/AVP 26
c=IN IP4 0.0.0.0
a=control:track1
============================================================
setupNextSubsession
============================================================
[URL:"rtsp://192.168.5.124/"]: Initiated the "video/JPEG" subsession
(client ports 5004-5005)
Sending request: SETUP rtsp://192.168.5.124/track1 RTSP/1.0
CSeq: 3
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2016.02.09)
Transport: RTP/AVP;unicast;client_port=5004-5005
Received 164 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 3
Session: 2
Transport:
RTP/AVP/UDP;unicast;destination=192.168.5.137;source=192.168.5.209;client_port=5004-5005;server_port=1063-1064;
============================================================
continueAfterSETUP
============================================================
[URL:"rtsp://192.168.5.209/"]: Set up the "video/JPEG" subsession
(client ports 5004-5005)
[URL:"rtsp://192.168.5.209/"]: Created a data sink for the "video/JPEG"
subsession
============================================================
setupNextSubsession
============================================================
Sending request: PLAY rtsp://192.168.5.209/ RTSP/1.0
CSeq: 4
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2016.02.09)
Session: 2
Range: npt=0.000-
Received 164 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
CSeq: 3
Session: 2
Transport:
RTP/AVP/UDP;unicast;destination=192.168.5.137;source=192.168.5.124;client_port=5004-5005;server_port=1062-1063;
============================================================
continueAfterSETUP
============================================================
[URL:"rtsp://192.168.5.124/"]: Set up the "video/JPEG" subsession
(client ports 5004-5005)
[URL:"rtsp://192.168.5.124/"]: Created a data sink for the "video/JPEG"
subsession
============================================================
setupNextSubsession
============================================================
Sending request: PLAY rtsp://192.168.5.124/ RTSP/1.0
CSeq: 4
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2016.02.09)
Session: 2
Range: npt=0.000-
Received 40 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 4
Session: 2
============================================================
continueAfterPLAY
============================================================
[URL:"rtsp://192.168.5.209/"]: Started playing session...
Received 40 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
CSeq: 4
Session: 2
============================================================
continueAfterPLAY
============================================================
[URL:"rtsp://192.168.5.124/"]: Started playing session...
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 305937 bytes.
Presentation time: 1477493870.763380!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85428 bytes.
Presentation time: 1477493870.763045!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85532 bytes.
Presentation time: 1477493870.815667!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 305116 bytes.
Presentation time: 1477493870.816002!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85309 bytes.
Presentation time: 1477493870.868289!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 304656 bytes.
Presentation time: 1477493870.868624!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85573 bytes.
Presentation time: 1477493870.920911!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 304587 bytes.
Presentation time: 1477493870.921246!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85595 bytes.
Presentation time: 1477493870.973533!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 305026 bytes.
Presentation time: 1477493870.973868!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85303 bytes.
Presentation time: 1477493871.026155!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 304465 bytes.
Presentation time: 1477493871.026490!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85591 bytes.
Presentation time: 1477493871.078777!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 305037 bytes.
Presentation time: 1477493871.079112!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85395 bytes.
Presentation time: 1477493871.131399!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 304391 bytes.
Presentation time: 1477493871.131734!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 85536 bytes.
Presentation time: 1477493871.184021!
Stream "rtsp://192.168.5.124/"; video/JPEG: Received 304555 bytes.
Presentation time: 1477493871.184356!
More information about the live-devel
mailing list