Ignore:
Timestamp:
Nov 13, 2019 9:11:04 AM (5 years ago)
Author:
nanang
Message:

Close #1437: Video keyframe request/response using RTCP-FB PLI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r6098 r6106  
    22522252    { 
    22532253        pjmedia_event_rx_rtcp_fb_data *data = (pjmedia_event_rx_rtcp_fb_data*) 
    2254                                               event->data.ptr; 
     2254                                              &event->data.rx_rtcp_fb; 
    22552255 
    22562256        /* Application not configured to listen to NACK, discard this event */ 
     
    22622262 
    22632263    /* Republish events */ 
    2264     return pjmedia_event_publish(NULL, stream, event, 0); 
     2264    return pjmedia_event_publish(NULL, stream, event, 
     2265                                 PJMEDIA_EVENT_PUBLISH_POST_EVENT); 
    22652266} 
    22662267 
     
    27432744#endif 
    27442745 
    2745     /* Check if we should send RTCP-FB generic NACK for this codec */ 
     2746    /* Check if we should send RTCP-FB */ 
    27462747    if (stream->si.rem_rtcp_fb.cap_count) { 
    27472748        pjmedia_rtcp_fb_info *rfi = &stream->si.rem_rtcp_fb; 
    2748         char cid[32]; 
    27492749        unsigned i; 
    2750  
    2751         pjmedia_codec_info_to_id(&stream->si.fmt, cid, sizeof(cid)); 
    27522750 
    27532751        for (i = 0; i < rfi->cap_count; ++i) { 
    27542752            if (rfi->caps[i].type == PJMEDIA_RTCP_FB_NACK && 
    2755                 (!pj_strcmp2( &rfi->caps[i].codec_id, "*") || 
    2756                  !pj_stricmp2(&rfi->caps[i].codec_id, cid))) 
     2753                rfi->caps[i].param.slen == 0) 
    27572754            { 
    27582755                stream->send_rtcp_fb_nack = PJ_TRUE; 
     2756                PJ_LOG(4,(stream->port.info.name.ptr, 
     2757                          "Send RTCP-FB generic NACK")); 
    27592758                break; 
    27602759            } 
     
    27622761    } 
    27632762 
    2764     /* Check if we handle incoming RTCP-FB generic NACK for this codec */ 
     2763    /* Check if we should process incoming RTCP-FB */ 
    27652764    stream->rtcp_fb_nack_cap_idx = -1; 
    27662765    if (stream->si.loc_rtcp_fb.cap_count) { 
    27672766        pjmedia_rtcp_fb_info *lfi = &stream->si.loc_rtcp_fb; 
    2768         char cid[32]; 
    27692767        unsigned i; 
    2770  
    2771         pjmedia_codec_info_to_id(&stream->si.fmt, cid, sizeof(cid)); 
    27722768 
    27732769        for (i = 0; i < lfi->cap_count; ++i) { 
    27742770            if (lfi->caps[i].type == PJMEDIA_RTCP_FB_NACK && 
    2775                 (!pj_strcmp2( &lfi->caps[i].codec_id, "*") || 
    2776                  !pj_stricmp2(&lfi->caps[i].codec_id, cid))) 
     2771                lfi->caps[i].param.slen == 0) 
    27772772            { 
    27782773                stream->rtcp_fb_nack_cap_idx = i; 
     2774                PJ_LOG(4,(stream->port.info.name.ptr, 
     2775                          "Receive RTCP-FB generic NACK")); 
    27792776                break; 
    27802777            } 
Note: See TracChangeset for help on using the changeset viewer.