Ignore:
Timestamp:
Apr 8, 2011 4:04:25 AM (13 years ago)
Author:
ming
Message:

Re #1213:

  • Add pjmedia_frame_copy()
  • Add converter for renderer videoport
  • Add checking in SDL device since it may receive a frame size bigger than expected
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/frame.h

    r3392 r3509  
    106106#pragma pack() 
    107107 
     108/** 
     109 * Copy one frame to another. If the destination frame's size is smaller than 
     110 * the source frame's, the destination buffer will be truncated. 
     111 * 
     112 * @param src               Source frame. 
     113 * @param dst               Destination frame. 
     114 */ 
     115PJ_INLINE(void) pjmedia_frame_copy(pjmedia_frame *dst, 
     116                                   const pjmedia_frame *src) 
     117{ 
     118    dst->type = src->type; 
     119    dst->timestamp = src->timestamp; 
     120    dst->bit_info = src->bit_info; 
     121    dst->size = (dst->size < src->size? dst->size: src->size); 
     122    pj_memcpy(dst->buf, src->buf, dst->size); 
     123} 
    108124 
    109125/** 
     
    112128 * @param frm               The #pjmedia_frame_ext. 
    113129 * @param src               Subframe data. 
    114  * @param bitlen            Lenght of subframe, in bits. 
     130 * @param bitlen            Length of subframe, in bits. 
    115131 * @param samples_cnt       Number of audio samples in subframe. 
    116132 */ 
Note: See TracChangeset for help on using the changeset viewer.