From 63a3d164072d3be5f58b4d1a44b0212c5e33d4c5 Mon Sep 17 00:00:00 2001 From: Zoff Date: Thu, 21 Sep 2017 16:09:23 +0200 Subject: [PATCH 1/2] change default video bitrate 2500 seems to make worse quality, but the video works more reliable on 3g connections --- Classes/Private/Manager/Submanagers/OCTSubmanagerCallsImpl.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Private/Manager/Submanagers/OCTSubmanagerCallsImpl.m b/Classes/Private/Manager/Submanagers/OCTSubmanagerCallsImpl.m index 6c54d2e8..1d46638a 100644 --- a/Classes/Private/Manager/Submanagers/OCTSubmanagerCallsImpl.m +++ b/Classes/Private/Manager/Submanagers/OCTSubmanagerCallsImpl.m @@ -7,7 +7,7 @@ #import "OCTTox.h" const OCTToxAVAudioBitRate kDefaultAudioBitRate = OCTToxAVAudioBitRate48; -const OCTToxAVVideoBitRate kDefaultVideoBitRate = 2000; +const OCTToxAVVideoBitRate kDefaultVideoBitRate = 2500; @interface OCTSubmanagerCallsImpl () From 6c3ea2571c3f61480d3f3f5ad0d33633b367e817 Mon Sep 17 00:00:00 2001 From: Zoff Date: Thu, 21 Sep 2017 16:34:30 +0200 Subject: [PATCH 2/2] always use resolution 640x480 this will ensure that video will work more reliable on 3g connections --- Classes/Private/Manager/Video/OCTVideoEngine.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/Private/Manager/Video/OCTVideoEngine.m b/Classes/Private/Manager/Video/OCTVideoEngine.m index 4f11f8ae..aede9d15 100644 --- a/Classes/Private/Manager/Video/OCTVideoEngine.m +++ b/Classes/Private/Manager/Video/OCTVideoEngine.m @@ -46,6 +46,11 @@ - (instancetype)init #if ! TARGET_OS_SIMULATOR _captureSession = [AVCaptureSession new]; _captureSession.sessionPreset = AVCaptureSessionPresetMedium; + + if ([_captureSession canSetSessionPreset:AVCaptureSessionPreset640x480]) + { + _captureSession.sessionPreset = AVCaptureSessionPreset640x480; + } #endif _dataOutput = [AVCaptureVideoDataOutput new];