Commit 7d2ba108 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI
Browse files

Fix preview orientation discrepancies in iOS.

This was due to a missing filter call to setup the 
preview orientation in the stream establishment.
parent 42f415dc
......@@ -34,6 +34,8 @@
#if !TARGET_IPHONE_SIMULATOR
static AVCaptureVideoOrientation Angle2AVCaptureVideoOrientation(int deviceOrientation);
// AVCaptureVideoPreviewLayer with AVCaptureSession creation
@interface AVCaptureVideoPreviewLayerEx : AVCaptureVideoPreviewLayer
......
......@@ -240,6 +240,9 @@ static void configure_video_source(VideoStream *stream){
/* transmit orientation to source filter */
ms_filter_call_method(stream->source,MS_VIDEO_CAPTURE_SET_DEVICE_ORIENTATION,&stream->device_orientation);
/* initialize the capture device orientation for preview */
if( ms_filter_has_method(stream->source, MS_VIDEO_DISPLAY_SET_DEVICE_ORIENTATION) )
ms_filter_call_method(stream->source,MS_VIDEO_DISPLAY_SET_DEVICE_ORIENTATION,&stream->device_orientation);
/* transmit its preview window id if any to source filter*/
if (stream->preview_window_id!=0){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment