Ignore:
Timestamp:
May 26, 2019 1:18:02 PM (5 years ago)
Author:
riza
Message:

Close #2202: Limit the number of ignored error when receiving RTP/RTCP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r5999 r6005  
    905905} 
    906906 
     907static char *get_media_dir(pjmedia_dir dir) { 
     908    switch (dir) { 
     909    case PJMEDIA_DIR_ENCODING: 
     910        return "TX"; 
     911    case PJMEDIA_DIR_DECODING: 
     912        return "RX"; 
     913    case PJMEDIA_DIR_ENCODING+PJMEDIA_DIR_DECODING: 
     914        return "TX+RX"; 
     915    default: 
     916        return "unknown dir"; 
     917    }     
     918} 
     919 
    907920/* Callback on media events */ 
    908921static void on_call_media_event(pjsua_call_id call_id, 
     
    915928              pjmedia_fourcc_name(event->type, event_name))); 
    916929 
     930    if (event->type == PJMEDIA_EVENT_MEDIA_TP_ERR) { 
     931        pjmedia_event_media_tp_err_data *err_data; 
     932 
     933        err_data = &event->data.med_tp_err; 
     934        PJ_PERROR(3, (THIS_FILE, err_data->status,  
     935                  "Media transport error event (%s %s %s)", 
     936                  (err_data->type==PJMEDIA_TYPE_AUDIO)?"Audio":"Video", 
     937                  (err_data->is_rtp)?"RTP":"RTCP", 
     938                  get_media_dir(err_data->dir))); 
     939    } 
    917940#if PJSUA_HAS_VIDEO 
    918     if (event->type == PJMEDIA_EVENT_FMT_CHANGED) { 
     941    else if (event->type == PJMEDIA_EVENT_FMT_CHANGED) { 
    919942        /* Adjust renderer window size to original video size */ 
    920943        pjsua_call_info ci; 
     
    931954            wid = ci.media[med_idx].stream.vid.win_in; 
    932955            pjsua_vid_win_get_info(wid, &win_info); 
    933              
     956 
    934957            size = event->data.fmt_changed.new_fmt.det.vid.size; 
    935958            if (size.w != win_info.size.w || size.h != win_info.size.h) { 
     
    943966#else 
    944967    PJ_UNUSED_ARG(call_id); 
    945     PJ_UNUSED_ARG(med_idx); 
    946     PJ_UNUSED_ARG(event); 
     968    PJ_UNUSED_ARG(med_idx);     
    947969#endif 
    948970} 
Note: See TracChangeset for help on using the changeset viewer.