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/basertspappprotocolhandler.cpp

    r113 r118  
    279279                pFrom->GetCustomParameters()["audioDataPortNumber"] = dataPortNumber; 
    280280                pFrom->GetCustomParameters()["audioRtcpPortNumber"] = rtcpPortNumber; 
     281                pFrom->GetCustomParameters()["audioTrackUri"] = requestHeaders[RTSP_FIRST_LINE][RTSP_URL]; 
    281282        } else { 
    282283                pFrom->GetCustomParameters()["videoDataPortNumber"] = dataPortNumber; 
    283284                pFrom->GetCustomParameters()["videoRtcpPortNumber"] = rtcpPortNumber; 
     285                pFrom->GetCustomParameters()["videoTrackUri"] = requestHeaders[RTSP_FIRST_LINE][RTSP_URL]; 
    284286        } 
    285287 
     
    349351        //6. prepare the response 
    350352        pFrom->PushResponseFirstLine(RTSP_VERSION_1_0, 200, "OK"); 
     353        pFrom->PushResponseHeader(RTSP_HEADERS_RANGE, "npt=0.0-"); 
     354 
     355        string rtpInfoVideo = ""; 
     356        string rtpInfoAudio = ""; 
     357        if (pFrom->GetCustomParameters().HasKey("videoTrackId")) { 
     358                rtpInfoVideo = format("url=%s;seq=%u;rtptime=%u", 
     359                                STR(pFrom->GetCustomParameters()["videoTrackUri"]), 
     360                                pOutboundConnectivity->GetLastVideoSequence(), 
     361                                0); 
     362                //pOutboundConnectivity->GetLastVideoRTPTimestamp()); 
     363        } 
     364        if (pFrom->GetCustomParameters().HasKey("audioTrackId")) { 
     365                rtpInfoAudio = format("url=%s;seq=%u;rtptime=%u", 
     366                                STR(pFrom->GetCustomParameters()["audioTrackUri"]), 
     367                                pOutboundConnectivity->GetLastAudioSequence(), 
     368                                0); 
     369                //pOutboundConnectivity->GetLastAudioRTPTimestamp()); 
     370        } 
     371        string rtpInfo = rtpInfoVideo; 
     372        if (rtpInfo != "") { 
     373                if (rtpInfoAudio != "") { 
     374                        rtpInfo += ", " + rtpInfoAudio; 
     375                } 
     376        } else { 
     377                rtpInfo = rtpInfoAudio; 
     378        } 
     379        //pFrom->PushResponseHeader(RTSP_HEADERS_RTP_INFO, rtpInfo); 
    351380 
    352381        //7. Done 
Note: See TracChangeset for help on using the changeset viewer.