Ignore:
Timestamp:
09/02/10 22:32:44 (21 months ago)
Author:
shiretu
Message:

-- android related stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/thelib/src/protocols/rtp/connectivity/outboundconnectivity.cpp

    r113 r118  
    8080OutboundConnectivity::OutboundConnectivity() 
    8181: BaseConnectivity() { 
    82         _nextRTCPIncrement = 1000.00; 
    83  
    8482        _videoDataFd = -1; 
    8583        _videoDataPort = 0; 
     
    8987        _videoBytesCount = 0; 
    9088        _videoFirstRtp = 0; 
    91         _videoNextRTCPTs = _nextRTCPIncrement; 
     89        _videoRtpTs = 0; 
     90        _videoRtcpSent = false; 
    9291 
    9392        _audioDataFd = -1; 
     
    9897        _audioBytesCount = 0; 
    9998        _audioFirstRtp = 0; 
    100         _audioNextRTCPTs = _nextRTCPIncrement; 
     99        _videoRtpTs = 0; 
     100        _audioRtcpSent = false; 
    101101 
    102102        _pOutStream = NULL; 
     
    151151                return _pOutStream->SSRC(); 
    152152        return 0; 
     153} 
     154 
     155uint16_t OutboundConnectivity::GetLastVideoSequence() { 
     156        return _pOutStream->VideoCounter(); 
     157} 
     158 
     159uint32_t OutboundConnectivity::GetLastVideoRTPTimestamp() { 
     160        return _videoRtpTs; 
     161} 
     162 
     163uint16_t OutboundConnectivity::GetLastAudioSequence() { 
     164        return _pOutStream->AudioCounter(); 
     165} 
     166 
     167uint32_t OutboundConnectivity::GetLastAudioRTPTimestamp() { 
     168        return _audioRtpTs; 
    153169} 
    154170 
     
    231247 
    232248bool OutboundConnectivity::FeedVideoData(msghdr &message) { 
     249        _videoRtpTs = ntohlp(((uint8_t *) message.msg_iov[0].iov_base) + 4); 
    233250        if (!FeedVideoDataUDP(message)) { 
    234251                FATAL("Unable to feed video UDP clients"); 
     
    244261 
    245262bool OutboundConnectivity::FeedAudioData(msghdr &message) { 
     263        _audioRtpTs = ntohlp(((uint8_t *) message.msg_iov[0].iov_base) + 4); 
    246264        if (!FeedAudioDataUDP(message)) { 
    247265                FATAL("Unable to feed audio UDP clients"); 
     
    390408                uint32_t ssrc, uint32_t rate, uint32_t packetsCount, uint32_t bytesCount, 
    391409                bool isAudio) { 
    392          
     410 
    393411        /* 
    394412         0                   1                   2                   3 
     
    481499} 
    482500 
     501bool 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 
    483513bool OutboundConnectivity::CreateRTCPPacket_live555style(uint8_t *pDest, uint8_t *pSrc, 
    484514                uint32_t ssrc, uint32_t rate, uint32_t packetsCount, uint32_t bytesCount, 
     
    536566        return true; 
    537567} 
     568 
    538569bool 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) { 
    541572        return false; 
    542573} 
Note: See TracChangeset for help on using the changeset viewer.