summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2011-10-18 01:51:01 +0000
committerNanang Izzuddin <nanang@teluu.com>2011-10-18 01:51:01 +0000
commit5586e0af18c3ba1ed079fae5901d0981fbbdf1a4 (patch)
tree8b80c000e2082becd8da05249062503ce503285a /pjsip-apps
parentf320d9e1d15975cc42c92e4aac50b4ba299981bb (diff)
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. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3819 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index 1ee483dd..2d802771 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -3194,10 +3194,26 @@ static void on_call_media_event(pjsua_call_id call_id,
pjmedia_event *event)
{
char event_name[5];
- PJ_UNUSED_ARG(call_id);
- PJ_UNUSED_ARG(med_idx);
- PJ_LOG(4,(THIS_FILE, "Event %s",
+
+ PJ_LOG(5,(THIS_FILE, "Event %s",
pjmedia_fourcc_name(event->type, event_name)));
+
+ if (event->type == PJMEDIA_EVENT_FMT_CHANGED) {
+ /* Adjust renderer window size to original video size */
+ pjsua_call_info ci;
+ pjsua_vid_win_id wid;
+ pjmedia_rect_size size;
+
+ pjsua_call_get_info(call_id, &ci);
+
+ if ((ci.media[med_idx].type == PJMEDIA_TYPE_VIDEO) &&
+ (ci.media[med_idx].dir & PJMEDIA_DIR_DECODING))
+ {
+ wid = ci.media[med_idx].stream.vid.win_in;
+ size = event->data.fmt_changed.new_fmt.det.vid.size;
+ pjsua_vid_win_set_size(wid, &size);
+ }
+ }
}
/*