Ignore:
Timestamp:
Oct 18, 2011 1:51:01 AM (13 years ago)
Author:
nanang
Message:

Reenable ffmpeg H264 (re #1390):

  • Review H264 codec settings such as profile, level, NAL unit size, bitrate, quality, latency.
  • Added new format PJMEDIA_FORMAT_GBRP, 24 bits planar RGB, one of the formats outputted by the latest ffmpeg H264 decoder.
  • Fixed format change detection bug in ffmpeg wrapper, decoder didn't update its internal state with the new format so format change event was generated in every decoding operation.
  • Added compile time configurations for enabling/disabling ffmpeg codec H263+ & H264.
  • Updated pjsua app to adjust window size to original video size. With H264, default window size will be too big as it is init'd with default H264 video size, e.g: 720x480 for profile level 30.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r3800 r3819  
    31953195{ 
    31963196    char event_name[5]; 
    3197     PJ_UNUSED_ARG(call_id); 
    3198     PJ_UNUSED_ARG(med_idx); 
    3199     PJ_LOG(4,(THIS_FILE, "Event %s", 
     3197 
     3198    PJ_LOG(5,(THIS_FILE, "Event %s", 
    32003199              pjmedia_fourcc_name(event->type, event_name))); 
     3200 
     3201    if (event->type == PJMEDIA_EVENT_FMT_CHANGED) { 
     3202        /* Adjust renderer window size to original video size */ 
     3203        pjsua_call_info ci; 
     3204        pjsua_vid_win_id wid; 
     3205        pjmedia_rect_size size; 
     3206 
     3207        pjsua_call_get_info(call_id, &ci); 
     3208 
     3209        if ((ci.media[med_idx].type == PJMEDIA_TYPE_VIDEO) && 
     3210            (ci.media[med_idx].dir & PJMEDIA_DIR_DECODING)) 
     3211        { 
     3212            wid = ci.media[med_idx].stream.vid.win_in; 
     3213            size = event->data.fmt_changed.new_fmt.det.vid.size; 
     3214            pjsua_vid_win_set_size(wid, &size); 
     3215        } 
     3216    } 
    32013217} 
    32023218 
Note: See TracChangeset for help on using the changeset viewer.