Problems on iOS, video on/off toggle and capture dev switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,
we are developing an iOS application with PJSIP (currently working on the trunk). We have 2 problems with the video call functionality and I would be very happy if someone could help me with fixing and/or confirming the problem.

1. We are experiencing crashes when toggling video on and off. After how many toggles it crashes is not deterministic, on newer iOS devices it seems to withstand more toggling. This is the stack that I see in XCode.

#0	0x0026a4e0 in tee_put_frame ()
#1	0x00267b00 in enc_clock_cb ()
#2	0x0024fe96 in clock_thread ()
#3	0x00241122 in thread_main ()
#4	0x3008de66 in _pthread_body ()
#5	0x3008ddda in _pthread_start ()

I enable the video call on one side doing this:

pjsua_call_setting settings;
pjsua_call_setting_default(&settings);
settings.req_keyframe_method = PJSUA_VID_REQ_KEYFRAME_SIP_INFO;
settings.vid_cnt = enable ? 1 : 0;
status = pjsua_call_reinvite2(callId, &settings, nil);

The other sides answer is constructed this way:

int videoCount = 0;
for(int i = 0; i < offer->media_count; i++)
{
    pjmedia_sdp_media media = *offer->media[i];
            
    size_t lenpre = strlen("video");
    size_t lenstr = strlen(media.desc.media.ptr);
    bool startsWith = lenstr < lenpre ? false : strncmp("video", media.desc.media.ptr, lenpre) == 0;
            
    if(startsWith)
    {
        videoCount++;
    }
}
opt->vid_cnt = videoCount > 0 ? 1 : 0;
code = 200;

When repeatedly executing the video toggling "enable" true/false the crash appears. At first I expected that we maybe need to wait for some resources to free up, but no matter how slowly I toggle at some point it crashes (sometimes at the first on/off/on, sometimes it takes about 5 toggles...).

2. When changing capture device, we can change from front to back camera but can not return to the front camera. When changing back to the front camera, the video playback on the other side stops. Changing to back again resumes the video from the back camera. I tried using STOP and START stream but it did not have any effect. We change capture device like so:
pjsua_call_vid_strm_op_param param;
pjsua_call_vid_strm_op_param_default(&param);
param.cap_dev = _captureDevice;
pj_status_t status = pjsua_call_set_vid_strm(callId,PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV,&param);

I'd be very happy if someone could point out mistakes that I made or confirm that this is part of some known issues which I could not find.
Please let me know if you need more information to help us!!!

Thank you very much in advance, Andi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20141128/4597a0e0/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux