Changeset 5982 for pjproject/trunk/pjmedia/src/pjmedia/vid_stream.c
- Timestamp:
- May 9, 2019 7:24:57 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/vid_stream.c
r5968 r5982 41 41 #define THIS_FILE "vid_stream.c" 42 42 #define ERRLEVEL 1 43 #define LOGERR_(expr) stream_perror expr43 #define LOGERR_(expr) PJ_PERROR(4,expr) 44 44 #define TRC_(expr) PJ_LOG(5,expr) 45 45 #define SIGNATURE PJMEDIA_SIG_PORT_VID_STREAM … … 196 196 static pj_status_t decode_frame(pjmedia_vid_stream *stream, 197 197 pjmedia_frame *frame); 198 199 /*200 * Print error.201 */202 static void stream_perror(const char *sender, const char *title,203 pj_status_t status)204 {205 char errmsg[PJ_ERR_MSG_SIZE];206 207 pj_strerror(status, errmsg, sizeof(errmsg));208 PJ_LOG(4,(sender, "%s: %s [err:%d]", title, errmsg, status));209 }210 198 211 199 … … 645 633 &hdr, &payload, &payloadlen); 646 634 if (status != PJ_SUCCESS) { 647 LOGERR_((channel->port.info.name.ptr, "RTP decode error", status));635 LOGERR_((channel->port.info.name.ptr, status, "RTP decode error")); 648 636 stream->rtcp.stat.rx.discard++; 649 637 return; … … 826 814 827 815 if (status != 0) { 828 LOGERR_((channel->port.info.name.ptr, "Jitter buffer put() error",829 status));816 LOGERR_((channel->port.info.name.ptr, status, 817 "Jitter buffer put() error")); 830 818 pkt_discarded = PJ_TRUE; 831 819 goto on_return; … … 867 855 if (bytes_read < 0) { 868 856 if (bytes_read != -PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) { 869 LOGERR_((stream->cname.ptr, "RTCP recv() error",870 (pj_status_t)-bytes_read));857 LOGERR_((stream->cname.ptr, (pj_status_t)-bytes_read, 858 "RTCP recv() error")); 871 859 } 872 860 return; … … 968 956 &has_more_data); 969 957 if (status != PJ_SUCCESS) { 970 LOGERR_((channel->port.info.name.ptr, 971 "Codec encode_begin() error" , status));958 LOGERR_((channel->port.info.name.ptr, status, 959 "Codec encode_begin() error")); 972 960 973 961 /* Update RTP timestamp */ … … 997 985 &rtphdrlen); 998 986 if (status != PJ_SUCCESS) { 999 LOGERR_((channel->port.info.name.ptr, 1000 "RTP encode_rtp() error" , status));987 LOGERR_((channel->port.info.name.ptr, status, 988 "RTP encode_rtp() error")); 1001 989 return status; 1002 990 } … … 1017 1005 enum { COUNT_TO_REPORT = 20 }; 1018 1006 if (stream->send_err_cnt++ == 0) { 1019 LOGERR_((channel->port.info.name.ptr, 1020 "Transport send_rtp() error", 1021 status)); 1007 LOGERR_((channel->port.info.name.ptr, status, 1008 "Transport send_rtp() error")); 1022 1009 } 1023 1010 if (stream->send_err_cnt > COUNT_TO_REPORT) … … 1046 1033 &has_more_data); 1047 1034 if (status != PJ_SUCCESS) { 1048 LOGERR_((channel->port.info.name.ptr, 1049 "Codec encode_more() error" , status));1035 LOGERR_((channel->port.info.name.ptr, status, 1036 "Codec encode_more() error")); 1050 1037 /* Ignore this error (?) */ 1051 1038 break; … … 1235 1222 (unsigned)frame->size, frame); 1236 1223 if (status != PJ_SUCCESS) { 1237 LOGERR_((channel->port.info.name.ptr, "codec decode() error",1238 status));1224 LOGERR_((channel->port.info.name.ptr, status, 1225 "codec decode() error")); 1239 1226 frame->type = PJMEDIA_FRAME_TYPE_NONE; 1240 1227 frame->size = 0; … … 1844 1831 if (status != PJ_SUCCESS) { 1845 1832 stream->trace_jb_fd = TRACE_JB_INVALID_FD; 1846 PJ_LOG(3,(THIS_FILE, "Failed creating RTP trace file '%s'", 1847 trace_name)); 1833 PJ_PERROR(3,(THIS_FILE, status, 1834 "Failed creating RTP trace file '%s'", 1835 trace_name)); 1848 1836 } else { 1849 1837 stream->trace_jb_buf = (char*)pj_pool_alloc(pool, PJ_LOG_MAX_SIZE);
Note: See TracChangeset
for help on using the changeset viewer.