Changeset 4537 for pjproject/trunk/pjmedia/src/pjmedia/stream.c
- Timestamp:
- Jun 19, 2013 6:47:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r4336 r4537 529 529 frame_out.size = frame->size - samples_count*2; 530 530 status = pjmedia_codec_recover(stream->codec, 531 frame_out.size,531 (unsigned)frame_out.size, 532 532 &frame_out); 533 533 … … 578 578 frame_out.size = frame->size - samples_count*2; 579 579 status = pjmedia_codec_recover(stream->codec, 580 frame_out.size,580 (unsigned)frame_out.size, 581 581 &frame_out); 582 582 if (status != PJ_SUCCESS) … … 633 633 frame_out.size = frame->size - samples_count*2; 634 634 status = pjmedia_codec_recover(stream->codec, 635 frame_out.size,635 (unsigned)frame_out.size, 636 636 &frame_out); 637 637 if (status != PJ_SUCCESS) … … 684 684 frame_out.size = frame->size - samples_count*BYTES_PER_SAMPLE; 685 685 status = pjmedia_codec_decode( stream->codec, &frame_in, 686 frame_out.size, &frame_out); 686 (unsigned)frame_out.size, 687 &frame_out); 687 688 if (status != 0) { 688 689 LOGERR_((port->info.name.ptr, "codec decode() error", … … 1126 1127 pj_bzero(stream->enc_buf + stream->enc_buf_count, frame->size); 1127 1128 } 1128 stream->enc_buf_count += ( frame->size >> 1);1129 stream->enc_buf_count += ((unsigned)frame->size >> 1); 1129 1130 } 1130 1131 … … 1193 1194 /* Number of samples in the frame */ 1194 1195 if (frame->type == PJMEDIA_FRAME_TYPE_AUDIO) 1195 ts_len = (frame->size >> 1) / stream->codec_param.info.channel_cnt; 1196 ts_len = ((unsigned)frame->size >> 1) / 1197 stream->codec_param.info.channel_cnt; 1196 1198 else if (frame->type == PJMEDIA_FRAME_TYPE_EXTENDED) 1197 1199 ts_len = PJMEDIA_PIA_SPF(&stream->port.info) / … … 1237 1239 status = pjmedia_rtp_encode_rtp( &channel->rtp, 1238 1240 stream->tx_event_pt, first, 1239 frame_out.size,1241 (int)frame_out.size, 1240 1242 (first ? rtp_ts_len : 0), 1241 1243 (const void**)&rtphdr, … … 1296 1298 status = pjmedia_rtp_encode_rtp( &channel->rtp, 1297 1299 channel->pt, 0, 1298 frame_out.size, rtp_ts_len,1300 (int)frame_out.size, rtp_ts_len, 1299 1301 (const void**)&rtphdr, 1300 1302 &rtphdrlen); … … 1320 1322 status = pjmedia_rtp_encode_rtp( &channel->rtp, 1321 1323 channel->pt, 0, 1322 frame_out.size, rtp_ts_len,1324 (int)frame_out.size, rtp_ts_len, 1323 1325 (const void**)&rtphdr, 1324 1326 &rtphdrlen); … … 1392 1394 1393 1395 /* Update stat */ 1394 pjmedia_rtcp_tx_rtp(&stream->rtcp, frame_out.size);1396 pjmedia_rtcp_tx_rtp(&stream->rtcp, (unsigned)frame_out.size); 1395 1397 stream->rtcp.stat.rtp_tx_last_ts = pj_ntohl(stream->enc->rtp.out_hdr.ts); 1396 1398 stream->rtcp.stat.rtp_tx_last_seq = pj_ntohs(stream->enc->rtp.out_hdr.seq); … … 1630 1632 /* Check for errors */ 1631 1633 if (bytes_read < 0) { 1632 LOGERR_((stream->port.info.name.ptr, "RTP recv() error", -bytes_read)); 1634 LOGERR_((stream->port.info.name.ptr, "RTP recv() error", 1635 (pj_status_t)-bytes_read)); 1633 1636 return; 1634 1637 } … … 1639 1642 1640 1643 /* Update RTP and RTCP session. */ 1641 status = pjmedia_rtp_decode_rtp(&channel->rtp, pkt, bytes_read,1644 status = pjmedia_rtp_decode_rtp(&channel->rtp, pkt, (int)bytes_read, 1642 1645 &hdr, &payload, &payloadlen); 1643 1646 if (status != PJ_SUCCESS) { … … 1888 1891 if (bytes_read < 0) { 1889 1892 LOGERR_((stream->port.info.name.ptr, "RTCP recv() error", 1890 1893 (pj_status_t)-bytes_read)); 1891 1894 return; 1892 1895 } … … 2299 2302 stream->out_rtcp_pkt_size = sizeof(pjmedia_rtcp_sr_pkt) + 2300 2303 sizeof(pjmedia_rtcp_common) + 2301 (4 + stream->cname.slen) +2304 (4 + (unsigned)stream->cname.slen) + 2302 2305 32; 2303 2306 #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) … … 2465 2468 status = pjmedia_rtp_encode_rtp( &channel->rtp, 2466 2469 stream->tx_event_pt, first, 2467 frame_out.size, 0,2470 (int)frame_out.size, 0, 2468 2471 (const void**)&rtphdr, 2469 2472 &rtphdrlen); … … 2767 2770 2768 2771 /* Increment digit count only if all digits are valid. */ 2769 stream->tx_dtmf_count += digit_char->slen;2772 stream->tx_dtmf_count += (int)digit_char->slen; 2770 2773 } 2771 2774
Note: See TracChangeset
for help on using the changeset viewer.