Ignore:
Timestamp:
Jun 19, 2013 6:47:43 AM (11 years ago)
Author:
riza
Message:

Re #1680: Add initial support for Win64

File:
1 edited

Legend:

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

    r4336 r4537  
    529529                frame_out.size = frame->size - samples_count*2; 
    530530                status = pjmedia_codec_recover(stream->codec, 
    531                                                frame_out.size, 
     531                                               (unsigned)frame_out.size, 
    532532                                               &frame_out); 
    533533 
     
    578578                        frame_out.size = frame->size - samples_count*2; 
    579579                        status = pjmedia_codec_recover(stream->codec, 
    580                                                        frame_out.size, 
     580                                                       (unsigned)frame_out.size, 
    581581                                                       &frame_out); 
    582582                        if (status != PJ_SUCCESS) 
     
    633633                    frame_out.size = frame->size - samples_count*2; 
    634634                    status = pjmedia_codec_recover(stream->codec, 
    635                                                    frame_out.size, 
     635                                                   (unsigned)frame_out.size, 
    636636                                                   &frame_out); 
    637637                    if (status != PJ_SUCCESS) 
     
    684684            frame_out.size = frame->size - samples_count*BYTES_PER_SAMPLE; 
    685685            status = pjmedia_codec_decode( stream->codec, &frame_in, 
    686                                            frame_out.size, &frame_out); 
     686                                           (unsigned)frame_out.size,  
     687                                           &frame_out); 
    687688            if (status != 0) { 
    688689                LOGERR_((port->info.name.ptr, "codec decode() error",  
     
    11261127            pj_bzero(stream->enc_buf + stream->enc_buf_count, frame->size); 
    11271128        } 
    1128         stream->enc_buf_count += (frame->size >> 1); 
     1129        stream->enc_buf_count += ((unsigned)frame->size >> 1); 
    11291130    } 
    11301131 
     
    11931194    /* Number of samples in the frame */ 
    11941195    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; 
    11961198    else if (frame->type == PJMEDIA_FRAME_TYPE_EXTENDED) 
    11971199        ts_len = PJMEDIA_PIA_SPF(&stream->port.info) / 
     
    12371239        status = pjmedia_rtp_encode_rtp( &channel->rtp,  
    12381240                                         stream->tx_event_pt, first,  
    1239                                          frame_out.size, 
     1241                                         (int)frame_out.size, 
    12401242                                         (first ? rtp_ts_len : 0),  
    12411243                                         (const void**)&rtphdr,  
     
    12961298        status = pjmedia_rtp_encode_rtp( &channel->rtp,  
    12971299                                         channel->pt, 0,  
    1298                                          frame_out.size, rtp_ts_len,  
     1300                                         (int)frame_out.size, rtp_ts_len,  
    12991301                                         (const void**)&rtphdr,  
    13001302                                         &rtphdrlen); 
     
    13201322        status = pjmedia_rtp_encode_rtp( &channel->rtp,  
    13211323                                         channel->pt, 0,  
    1322                                          frame_out.size, rtp_ts_len,  
     1324                                         (int)frame_out.size, rtp_ts_len,  
    13231325                                         (const void**)&rtphdr,  
    13241326                                         &rtphdrlen); 
     
    13921394 
    13931395    /* Update stat */ 
    1394     pjmedia_rtcp_tx_rtp(&stream->rtcp, frame_out.size); 
     1396    pjmedia_rtcp_tx_rtp(&stream->rtcp, (unsigned)frame_out.size); 
    13951397    stream->rtcp.stat.rtp_tx_last_ts = pj_ntohl(stream->enc->rtp.out_hdr.ts); 
    13961398    stream->rtcp.stat.rtp_tx_last_seq = pj_ntohs(stream->enc->rtp.out_hdr.seq); 
     
    16301632    /* Check for errors */ 
    16311633    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)); 
    16331636        return; 
    16341637    } 
     
    16391642 
    16401643    /* 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, 
    16421645                                    &hdr, &payload, &payloadlen); 
    16431646    if (status != PJ_SUCCESS) { 
     
    18881891    if (bytes_read < 0) { 
    18891892        LOGERR_((stream->port.info.name.ptr, "RTCP recv() error",  
    1890                  -bytes_read)); 
     1893                (pj_status_t)-bytes_read)); 
    18911894        return; 
    18921895    } 
     
    22992302    stream->out_rtcp_pkt_size =  sizeof(pjmedia_rtcp_sr_pkt) + 
    23002303                                 sizeof(pjmedia_rtcp_common) + 
    2301                                  (4 + stream->cname.slen) + 
     2304                                 (4 + (unsigned)stream->cname.slen) + 
    23022305                                 32; 
    23032306#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) 
     
    24652468        status = pjmedia_rtp_encode_rtp( &channel->rtp, 
    24662469                                         stream->tx_event_pt, first, 
    2467                                          frame_out.size, 0, 
     2470                                         (int)frame_out.size, 0, 
    24682471                                         (const void**)&rtphdr, 
    24692472                                         &rtphdrlen); 
     
    27672770 
    27682771        /* 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; 
    27702773    } 
    27712774 
Note: See TracChangeset for help on using the changeset viewer.