iOS SDK - Creating FPWCSApi2Stream

João Monte

New Member
Hello, greetings.
After calling '[session createStream: options error:&error]'
The video starts streaming for about 1 second then XCode logs fire up * while the video stream freezes for 1 second, after that it continues with no problem.
* XCode logs that are presented at the same time the video freezes (I'm not calling anything from outside the 'Main Thread'; this problem occurs in your own code samples / examples) ->
Logs:
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState] PID: 2232, TID: 563940, Thread name: (none), Queue name: EncoderQueue, QoS: 0 Backtrace: 4 TwoWayStreaming 0x0000000102e04adc RTCIsUIApplicationActive + 56 5 TwoWayStreaming 0x0000000102e0209c _ZN6webrtc23H264VideoToolboxEncoder6EncodeERKNS_10VideoFrameEPKNS_17CodecSpecificInfoEPKNSt3__16vectorINS_9FrameTypeENS7_9allocatorIS9_EEEE + 84 6 TwoWayStreaming 0x0000000102f26544 _ZN6webrtc35VideoEncoderSoftwareFallbackWrapper6EncodeERKNS_10VideoFrameEPKNS_17CodecSpecificInfoEPKNSt3__16vectorINS_9FrameTypeENS7_9allocatorIS9_EEEE + 160 7 TwoWayStreaming 0x000000010316648c _ZN6webrtc17VCMGenericEncoder6EncodeERKNS_10VideoFrameEPKNS_17CodecSpecificInfoERKNSt3__16vectorINS_9FrameTypeENS7_9allocatorIS9_EEEE + 256 8 TwoWayStreaming 0x00000001031764c8 _ZN6webrtc3vcm11VideoSender13AddVideoFrameERKNS_10VideoFrameEPKNS_17CodecSpecificInfoE + 828 9 TwoWayStreaming 0x000000010315f528 _ZN6webrtc10ViEEncoder16EncodeVideoFrameERKNS_10VideoFrameEx + 1068 10 TwoWayStreaming 0x000000010316042c _ZN6webrtc10ViEEncoder10EncodeTask3RunEv + 240 11 TwoWayStreaming 0x0000000102f98b4c _ZN3rtc9TaskQueue11TaskContext7RunTaskEPv + 60 12 libdispatch.dylib 0x0000000103d06bd8 _dispatch_client_callout + 16 13 libdispatch.dylib 0x0000000103d0db48 _dispatch_lane_serial_drain + 744 14 libdispatch.dylib 0x0000000103d0e6e4 _dispatch_lane_invoke + 448 15 libdispatch.dylib 0x0000000103d19adc _dispatch_workloop_worker_thread + 1324 16 libsystem_pthread.dylib 0x00000001a9102b88 _pthread_wqthread + 276 17 libsystem_pthread.dylib 0x00000001a9105760 start_wqthread + 8 2020-04-09 17:55:56.707415+0100 TwoWayStreaming[2232:563940] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState] PID: 2232, TID: 563940, Thread name: (none), Queue name: EncoderQueue, QoS: 0 Backtrace: 4 TwoWayStreaming 0x0000000102e04adc RTCIsUIApplicationActive + 56 5 TwoWayStreaming 0x0000000102e0209c _ZN6webrtc23H264VideoToolboxEncoder6EncodeERKNS_10VideoFrameEPKNS_17CodecSpecificInfoEPKNSt3__16vectorINS_9FrameTypeENS7_9allocatorIS9_EEEE + 84 6 TwoWayStreaming 0x0000000102f26544 _ZN6webrtc35VideoEncoderSoftwareFallbackWrapper6EncodeERKNS_10VideoFrameEPKNS_17CodecSpecificInfoEPKNSt3__16vectorINS_9FrameTypeENS7_9allocatorIS9_EEEE + 160 7 TwoWayStreaming 0x000000010316648c _ZN6webrtc17VCMGenericEncoder6EncodeERKNS_10VideoFrameEPKNS_17CodecSpecificInfoERKNSt3__16vectorINS_9FrameTypeENS7_9allocatorIS9_EEEE + 256 8 TwoWayStreaming 0x00000001031764c8 _ZN6webrtc3vcm11VideoSender13AddVideoFrameERKNS_10VideoFrameEPKNS_17CodecSpecificInfoE + 828 9 TwoWayStreaming 0x000000010315f528 _ZN6webrtc10ViEEncoder16EncodeVideoFrameERKNS_10VideoFrameEx + 1068 10 TwoWayStreaming 0x000000010316042c _ZN6webrtc10ViEEncoder10EncodeTask3RunEv + 240 11 TwoWayStreaming 0x0000000102f98b4c _ZN3rtc9TaskQueue11TaskContext7RunTaskEPv + 60 12 libdispatch.dylib 0x0000000103d06bd8 _dispatch_client_callout + 16 13 libdispatch.dylib 0x0000000103d0db48 _dispatch_lane_serial_drain + 744 14 libdispatch.dylib 0x0000000103d0e6e4 _dispatch_lane_invoke + 448 15 libdispatch.dylib 0x0000000103d19adc _dispatch_workloop_worker_thread + 1324 16 libsystem_pthread.dylib 0x00000001a9102b88 _pthread_wqthread + 276 17 libsystem_pthread.dylib 0x00000001a9105760 start_wqthread + 8
 

Max

Administrator
Staff member
Good day.
Is the stream published correctly from Two Way Streaming application?
If yes, the pause on streaming start may occur due to WebRTC connection establishing to server. This, in its turn, depends on channel to server quality. For example, the pause is not reproduced on 80 Mbit channel to server.
 

João Monte

New Member
Good day.
Is the stream published correctly from Two Way Streaming application?
If yes, the pause on streaming start may occur due to WebRTC connection establishing to server. This, in its turn, depends on channel to server quality. For example, the pause is not reproduced on 80 Mbit channel to server.
Good day,
I supposed the stream is published correctly, because the same happens when running your sample application.
And what about the xcode enormous logs that are presented at the same time the video freezes referencing 'UI API called on a background thread:'.

Thanks in advance.
 
Last edited:

Max

Administrator
Staff member
Good day.
This is probably WebRTC library issue. We raised internal ticket WCS-2641, but this is not high priority issue.
Anyway, streaming from application is working.
 
Top