From 97c47c4e1e14582218162e7cb8ed5185bd441357 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Fri, 21 Aug 2015 06:46:32 +0000 Subject: Fixed #1880: Incorrect orientation after switching video capture or when using back camera Included in this fix: * Change the spec & doc of pjmedia_orient enumeration * Change iOS sample app to rotate all video devices upon orientation change event. * Set orientation as well when fast switching cameras (for iOS and Android) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5166 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/src/pjmedia-videodev/ios_dev.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pjmedia/src/pjmedia-videodev/ios_dev.m') diff --git a/pjmedia/src/pjmedia-videodev/ios_dev.m b/pjmedia/src/pjmedia-videodev/ios_dev.m index 4ae06e70..c9b533e9 100644 --- a/pjmedia/src/pjmedia-videodev/ios_dev.m +++ b/pjmedia/src/pjmedia-videodev/ios_dev.m @@ -962,6 +962,10 @@ static pj_status_t ios_stream_set_cap(pjmedia_vid_dev_stream *s, strm->dev_input = new_dev_input; strm->param.cap_id = p->target_id; + /* Set the orientation as well */ + ios_stream_set_cap(s, PJMEDIA_VID_DEV_CAP_ORIENTATION, + &strm->param.orient); + return PJ_SUCCESS; } -- cgit v1.2.3