Ignore:
Timestamp:
Dec 20, 2010 11:02:48 AM (12 years ago)
Author:
ming
Message:

Fixed #1184:

  • Move the AVI playback from pjmedia-test to new aviplay.c sample application
  • Take the input file from cmdline
  • Synchronize audio and video
  • Remove all codecs related hardcodes from the file

Re #1193: (no. 6: duplicate fps and frame_rate in pjmedia_format and pjmedia_vid_param)

  • Remove the frame_rate in pjmedia_vid_param
  • Use pjmedia_format's fps in videoport, sdl_dev, and colorbar_dev
  • Prevent overflow in ptime calculation from frame_rate
File:
1 edited

Legend:

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

    r3392 r3401  
    469469} 
    470470 
     471/** 
     472 * General utility routine to calculate ptime value from frame rate. 
     473 * Application should use this macro whenever possible due to possible 
     474 * overflow in the math calculation. 
     475 * 
     476 * @param frame_rate            Frame rate 
     477 * 
     478 * @return                      The ptime value (in usec). 
     479 */ 
     480PJ_INLINE(unsigned) PJMEDIA_PTIME(const pjmedia_ratio *frame_rate) 
     481{ 
     482#if PJ_HAS_INT64 
     483    return ((unsigned)((pj_uint64_t)1000000 * \ 
     484                       frame_rate->denum / frame_rate->num)); 
     485#elif PJ_HAS_FLOATING_POINT 
     486    return ((unsigned)(1000000.0 * frame_rate->denum / \ 
     487                       frame_rate->num)); 
     488#else 
     489    return ((unsigned)((1000L * frame_rate->denum / \ 
     490                       frame_rate->num) * 1000); 
     491#endif 
     492} 
    471493 
    472494/** 
Note: See TracChangeset for help on using the changeset viewer.