Changeset 6005 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- May 26, 2019 1:18:02 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r5999 r6005 905 905 } 906 906 907 static 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 907 920 /* Callback on media events */ 908 921 static void on_call_media_event(pjsua_call_id call_id, … … 915 928 pjmedia_fourcc_name(event->type, event_name))); 916 929 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 } 917 940 #if PJSUA_HAS_VIDEO 918 if (event->type == PJMEDIA_EVENT_FMT_CHANGED) {941 else if (event->type == PJMEDIA_EVENT_FMT_CHANGED) { 919 942 /* Adjust renderer window size to original video size */ 920 943 pjsua_call_info ci; … … 931 954 wid = ci.media[med_idx].stream.vid.win_in; 932 955 pjsua_vid_win_get_info(wid, &win_info); 933 956 934 957 size = event->data.fmt_changed.new_fmt.det.vid.size; 935 958 if (size.w != win_info.size.w || size.h != win_info.size.h) { … … 943 966 #else 944 967 PJ_UNUSED_ARG(call_id); 945 PJ_UNUSED_ARG(med_idx); 946 PJ_UNUSED_ARG(event); 968 PJ_UNUSED_ARG(med_idx); 947 969 #endif 948 970 }
Note: See TracChangeset
for help on using the changeset viewer.