Show
Ignore:
Timestamp:
08/07/08 16:29:49 (6 years ago)
Author:
soohyunc
Message:

XR header and block contents separated. this is because we want to use "chunks"
as AckVec? and the time stamp depending upon the block type (BT).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/cc/rtp/session.cpp

    r4246 r4248  
    614614        int we_sent = 0; 
    615615        rtcp_rr* rr; 
    616         rtcp_xr* xr;    // extended report 
     616        rtcp_xr_hdr* xrh;       // extended report header 
     617        rtcp_xr_blk* xrb;       // extended report block 
    617618        Tcl& tcl = Tcl::instance(); 
    618619 
     
    644645        if (is_cc_on()) { 
    645646                flags |= RTCP_PT_XR;            // setting flags to XR 
    646                 xr = (rtcp_xr*)(rh + 1);        // extended report 
    647                 xr->xr_begin_seq = lastseq_;// this will be used for ackofack 
    648                 xr->xr_end_seq = seqno_ + 1;// as defined in RFC3611 section 4.1 
    649                 xr->xr_ackvec = get_ackvec();   // ackvec 
     647                xrh = (rtcp_xr_hdr*)(rh + 1);   // XR header 
     648                int xrlen = xrh->xr_flags << 16 >> 16;  // XR length 
     649                xrb = (rtcp_xr_blk*)(xrh + xrlen + 1);  // XR block 
     650                xrb->begin_seq = lastseq_;// this will be used for ackofack 
     651                xrb->end_seq = seqno_ + 1;// as defined in RFC3611 section 4.1 
     652                xrb->chunk = get_ackvec();      // ackvec 
    650653        } 
    651654 
     
    10671070        s->layer(layer).lts_ctrl(unixtime()); 
    10681071        int cnt = flags >> 8 & 0x1f; 
    1069         parse_xr_records(ssrc, (rtcp_xr*)(rh + 1), cnt, ep, addr); 
    1070 } 
    1071  
    1072 void SessionManager::parse_xr_records(u_int32_t ssrc, rtcp_xr* r, int cnt, 
     1072        parse_xr_records(ssrc, (rtcp_xr_hdr*)(rh + 1), cnt, ep, addr); 
     1073} 
     1074 
     1075void SessionManager::parse_xr_records(u_int32_t ssrc, rtcp_xr_hdr* xrh, int cnt, 
    10731076                                      const u_char* ep, Address & addr) 
    10741077{ 
     
    10781081        UNUSED(addr); 
    10791082 
     1083        rtcp_xr_blk* xrb; 
     1084        int xrlen = xrh->xr_flags << 16 >> 16; 
     1085        xrb = (rtcp_xr_blk*)(xrh + xrlen + 1); 
    10801086        /* 
    1081          * if AoA is received, then first trim ackvec and send a new ackvec 
     1087         * if AoA is received, trim ackvec and send a new ackvec 
    10821088         * if AckVec is received, then parse it to TfwcSndr 
    10831089         */ 
    1084         ackvec_ = r->xr_ackvec; 
    1085         ackofack_ = r->xr_begin_seq; 
     1090        ackvec_ = xrb->chunk; 
     1091        ackofack_ = xrb->begin_seq; 
    10861092        tfwc_sndr_recv(ackvec_);        // parse AckVec 
    10871093}