自从我开始实施视频功能以来,我一直在这个问题上停留。我正在使用一个简单的流程。
这是我用于端点的帐户配置:
acc_cfg.vid_in_auto_show = PJ_FALSE;
acc_cfg.vid_out_auto_transmit = PJ_FALSE;
acc_cfg.vid_wnd_flags = PJMEDIA_VID_DEV_WND_BORDER | PJMEDIA_VID_DEV_WND_RESIZABLE;
acc_cfg.vid_cap_dev = PJMEDIA_VID_DEFAULT_CAPTURE_DEV;
acc_cfg.vid_rend_dev = PJMEDIA_VID_DEFAULT_RENDER_DEV;
acc_cfg.reg_retry_interval = 100;
acc_cfg.reg_first_retry_interval = 10;
而且我只在reinvite方法中设置为vid_cnt = 1。
我的通话开始,视频被传输到被叫方,我收到他们的视频。但是每次通话被确认(被叫方接听电话)时,我都会收到两条主线程检查器消息:
Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:]
PID: 29256, TID: 7292045, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 APPNAME 0x0000000101178970 darwin_init_view + 216
5 APPNAME 0x0000000101177f10 darwin_stream_set_cap + 576
6 APPNAME 0x00000001011600cc pjmedia_vid_dev_stream_set_cap + 204
7 APPNAME 0x00000001012346b0 create_vid_win + 1688
8 APPNAME 0x0000000101233e9c pjsua_vid_channel_update + 1452
9 APPNAME 0x0000000101223220 pjsua_media_channel_update + 3112
10 APPNAME 0x000000010120a420 pjsua_call_on_media_update + 372
11 APPNAME 0x00000001011f12b4 inv_negotiate_sdp + 268
12 APPNAME 0x00000001011f1018 inv_check_sdp_in_incoming_msg + 1532
13 APPNAME 0x00000001011f20fc inv_on_state_early + 704
14 APPNAME 0x00000001011f0900 mod_inv_on_tsx_state + 116
15 APPNAME 0x00000001011da8f0 pjsip_dlg_on_tsx_state + 244
16 APPNAME 0x00000001011dcc74 mod_ua_on_tsx_state + 88
17 APPNAME 0x00000001011d0f58 tsx_set_state + 664
18 APPNAME 0x00000001011d2bcc tsx_on_state_proceeding_uac + 596
19 APPNAME 0x00000001011d1748 pjsip_tsx_recv_msg + 232
20 APPNAME 0x00000001011d21a0 mod_tsx_layer_on_rx_response + 236
21 APPNAME 0x00000001011b757c pjsip_endpt_process_rx_data + 724
22 APPNAME 0x00000001011b6a90 endpt_on_rx_msg + 576
23 APPNAME 0x00000001011c1f0c pjsip_tpmgr_receive_packet + 1872
24 APPNAME 0x00000001011c4d2c udp_on_read_complete + 272
25 APPNAME 0x00000001010dbb64 ioqueue_dispatch_read_event + 976
26 APPNAME 0x00000001010de6a0 pj_ioqueue_poll + 1268
27 APPNAME 0x00000001011b7078 pjsip_endpt_handle_events2 + 360
28 APPNAME 0x000000010121824c pjsua_handle_events + 72
29 APPNAME 0x0000000101217778 worker_thread + 52
30 APPNAME 0x00000001010e0b18 thread_main + 188
31 libsystem_pthread.dylib 0x0000000181d61220 <redacted> + 272
32 libsystem_pthread.dylib 0x0000000181d61110 <redacted> + 0
33 libsystem_pthread.dylib 0x0000000181d5fb10 thread_start + 4
我正在寻找一个UIView初始化,但找不到任何。我还在主线程检查器上添加了断点,但它仅将我重定向到汇编代码。
答案 0 :(得分:0)
尝试将后台线程块更改为主线程块。 希望这会成功!让我知道它是否有效。