You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2015-06-25 07:28:31: @mingteluucreated the issue on trac ticket 1861
Currently there is no mechanism to notify other party about new video orientation, so in this ticket, we implement a feature which allows the video sender to transmit video with the "proper" orientation at all time, i.e: head upside whatever the device orientation is. When a device orientation changes, the application can tell the library and the library will rotate the video, resize it accordingly, and insert blank/black in left+right sides. The receiver/decoder side will then receive the video in the correct orientation, nothing to do on the decoder side.
The feature is available on iOS and Android only.
2015-06-25 09:17:53: @mingteluucommented
In r5118:
Re #1861: Initial implementation of video orientation support
Utility to resize and rotate video frame
Support for iOS + sample
pjsua API to set video device's orientation
2015-06-25 09:37:57: @mingteluuchanged title from Support for video orientation to Support for video capture orientation
2015-07-03 07:21:32: @mingteluucommented
In r5125:
Re #1861: Changed pjsua API for setting the orientation using a more generic API, pjsua_vid_dev_set_setting() instead
#if PJSUA_HAS_VIDEO
const pjmedia_orient pj_ori[4] =
{
PJMEDIA_ORIENT_ROTATE_90DEG, /* UIDeviceOrientationPortrait /
PJMEDIA_ORIENT_ROTATE_270DEG, / UIDeviceOrientationPortraitUpsideDown /
PJMEDIA_ORIENT_ROTATE_180DEG, / UIDeviceOrientationLandscapeLeft,
home button on the right side /
PJMEDIA_ORIENT_NATURAL / UIDeviceOrientationLandscapeRight,
home button on the left side */
};
static pj_thread_desc a_thread_desc;
static pj_thread_t *a_thread;
static UIDeviceOrientation prev_ori = 0;
UIDeviceOrientation dev_ori = [[UIDevice currentDevice] orientation];
int i;
if (dev_ori == prev_ori) return;
NSLog(@"Device orientation changed: %d", (int)(prev_ori = dev_ori));
if (dev_ori >= UIDeviceOrientationPortrait &&
dev_ori <= UIDeviceOrientationLandscapeRight)
{
if (!pj_thread_is_registered()) {
pj_thread_register("ipjsua", a_thread_desc, &a_thread);
}
/* Here we set the orientation for all video devices.
* This may return failure for renderer devices or for
* capture devices which do not support orientation setting,
* we can simply ignore them.
*/
for (i = pjsua_vid_dev_count()-1; i >= 0; i--) {
pj_status_t status = pjsua_vid_dev_set_setting(i, PJMEDIA_VID_DEV_CAP_ORIENTATION,
&pj_ori[dev_ori-1], PJ_TRUE);
NSLog(@"orientation set status = %d",status);
}
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[self localPreviewWithRect:self.view.bounds];
});
2015-06-25 07:28:31: @mingteluu created the issue on trac ticket 1861
Currently there is no mechanism to notify other party about new video orientation, so in this ticket, we implement a feature which allows the video sender to transmit video with the "proper" orientation at all time, i.e: head upside whatever the device orientation is. When a device orientation changes, the application can tell the library and the library will rotate the video, resize it accordingly, and insert blank/black in left+right sides. The receiver/decoder side will then receive the video in the correct orientation, nothing to do on the decoder side.
The feature is available on iOS and Android only.
2015-06-25 09:17:53: @mingteluu commented
In r5118:
Re #1861: Initial implementation of video orientation support
2015-06-25 09:37:57: @mingteluu changed title from Support for video orientation to Support for video capture orientation
2015-07-03 07:21:32: @mingteluu commented
In r5125:
Re #1861: Changed pjsua API for setting the orientation using a more generic API, pjsua_vid_dev_set_setting() instead
2015-07-07 05:13:15: @nanangizz commented
In r5128:
Re #1861: Fixed compile error of 'undeclared identifier PJMEDIA_VID_DEV_MAX_DEVS' when video is disabled.
2015-07-30 07:23:37: @mingteluu changed status from new to closed
2015-07-30 07:23:37: @mingteluu set resolution to fixed
2015-07-30 07:23:37: @mingteluu commented
In r5138:
Fixed #1861: Add support for video capture orientation on Android
The text was updated successfully, but these errors were encountered: