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 @@ ...@@ -34,6 +34,8 @@
#if !TARGET_IPHONE_SIMULATOR #if !TARGET_IPHONE_SIMULATOR
static AVCaptureVideoOrientation Angle2AVCaptureVideoOrientation(int deviceOrientation);
// AVCaptureVideoPreviewLayer with AVCaptureSession creation // AVCaptureVideoPreviewLayer with AVCaptureSession creation
@interface AVCaptureVideoPreviewLayerEx : AVCaptureVideoPreviewLayer @interface AVCaptureVideoPreviewLayerEx : AVCaptureVideoPreviewLayer
......
...@@ -240,7 +240,10 @@ static void configure_video_source(VideoStream *stream){ ...@@ -240,7 +240,10 @@ static void configure_video_source(VideoStream *stream){
/* transmit orientation to source filter */ /* transmit orientation to source filter */
ms_filter_call_method(stream->source,MS_VIDEO_CAPTURE_SET_DEVICE_ORIENTATION,&stream->device_orientation); 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*/ /* transmit its preview window id if any to source filter*/
if (stream->preview_window_id!=0){ if (stream->preview_window_id!=0){
video_stream_set_native_preview_window_id(stream, stream->preview_window_id); video_stream_set_native_preview_window_id(stream, stream->preview_window_id);
......
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