- Timestamp:
- 09/02/10 22:32:44 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/thelib/src/protocols/rtp/connectivity/outboundconnectivity.cpp
r113 r118 80 80 OutboundConnectivity::OutboundConnectivity() 81 81 : BaseConnectivity() { 82 _nextRTCPIncrement = 1000.00;83 84 82 _videoDataFd = -1; 85 83 _videoDataPort = 0; … … 89 87 _videoBytesCount = 0; 90 88 _videoFirstRtp = 0; 91 _videoNextRTCPTs = _nextRTCPIncrement; 89 _videoRtpTs = 0; 90 _videoRtcpSent = false; 92 91 93 92 _audioDataFd = -1; … … 98 97 _audioBytesCount = 0; 99 98 _audioFirstRtp = 0; 100 _audioNextRTCPTs = _nextRTCPIncrement; 99 _videoRtpTs = 0; 100 _audioRtcpSent = false; 101 101 102 102 _pOutStream = NULL; … … 151 151 return _pOutStream->SSRC(); 152 152 return 0; 153 } 154 155 uint16_t OutboundConnectivity::GetLastVideoSequence() { 156 return _pOutStream->VideoCounter(); 157 } 158 159 uint32_t OutboundConnectivity::GetLastVideoRTPTimestamp() { 160 return _videoRtpTs; 161 } 162 163 uint16_t OutboundConnectivity::GetLastAudioSequence() { 164 return _pOutStream->AudioCounter(); 165 } 166 167 uint32_t OutboundConnectivity::GetLastAudioRTPTimestamp() { 168 return _audioRtpTs; 153 169 } 154 170 … … 231 247 232 248 bool OutboundConnectivity::FeedVideoData(msghdr &message) { 249 _videoRtpTs = ntohlp(((uint8_t *) message.msg_iov[0].iov_base) + 4); 233 250 if (!FeedVideoDataUDP(message)) { 234 251 FATAL("Unable to feed video UDP clients"); … … 244 261 245 262 bool OutboundConnectivity::FeedAudioData(msghdr &message) { 263 _audioRtpTs = ntohlp(((uint8_t *) message.msg_iov[0].iov_base) + 4); 246 264 if (!FeedAudioDataUDP(message)) { 247 265 FATAL("Unable to feed audio UDP clients"); … … 390 408 uint32_t ssrc, uint32_t rate, uint32_t packetsCount, uint32_t bytesCount, 391 409 bool isAudio) { 392 410 393 411 /* 394 412 0 1 2 3 … … 481 499 } 482 500 501 bool OutboundConnectivity::CreateRTCPPacket_mystyle_only_once(uint8_t *pDest, uint8_t *pSrc, 502 uint32_t ssrc, uint32_t rate, uint32_t packetsCount, 503 uint32_t bytesCount, bool isAudio) { 504 bool &rtcpSent = isAudio ? _audioRtcpSent : _videoRtcpSent; 505 if (rtcpSent) 506 return false; 507 508 rtcpSent = CreateRTCPPacket_mystyle(pDest, pSrc, ssrc, rate, packetsCount, 509 bytesCount, isAudio); 510 return rtcpSent; 511 } 512 483 513 bool OutboundConnectivity::CreateRTCPPacket_live555style(uint8_t *pDest, uint8_t *pSrc, 484 514 uint32_t ssrc, uint32_t rate, uint32_t packetsCount, uint32_t bytesCount, … … 536 566 return true; 537 567 } 568 538 569 bool OutboundConnectivity::CreateRTCPPacket_none(uint8_t *pDest, uint8_t *pSrc, 539 uint32_t ssrc, uint32_t rate, uint32_t packetsCount,540 uint32_t bytesCount, bool isAudio){570 uint32_t ssrc, uint32_t rate, uint32_t packetsCount, 571 uint32_t bytesCount, bool isAudio) { 541 572 return false; 542 573 }
Note: See TracChangeset
for help on using the changeset viewer.
