Mac OS X 10.10 Facetime Camera sometimes reports I420 format

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

 



Hi all,

recently i upgraded to Mac OS X 10.10 and ran into problems with the QTKit video capture in our application.
If i tried to open a capture device with pjmedia_vid_port_create i got this assertion:

Assertion failed: (di.fmt_cnt != 0), function pjmedia_vid_port_create, file ../src/pjmedia/vid_port.c, line 246.

Indeed the Facetime camera had no format info. I tracked down the problem and found that Mac Os returns the I420 format under certain circumstances.
A simple fix is to add I420 to the list of formats in qt_dev.m:

static qt_fmt_info qt_fmts[] =
{
    {PJMEDIA_FORMAT_YUY2, kCVPixelFormatType_422YpCbCr8_yuvs},
    {PJMEDIA_FORMAT_UYVY, kCVPixelFormatType_422YpCbCr8},
    {PJMEDIA_FORMAT_I420, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange}
};

I run, however, a few more tests the other day and found a way to reproduce the problem:

Take a photo with the integrated PhotoBooth application, after that start a pjsip application.
Somehow the camera is put (persistently) into a different mode by this application - and maybe others. So it seems like there could be some "reset" procedure to ensure a clean state before asking for supported formats. 
The camera will no longer report I420 if i start a Jitsi Client and show it's video configuration screen and then run my pjsip application.

So the I420 line in qt_fmts is maybe a good idea but taking care about the device mode would be better. ios_dev.m already includes I420, btw.
My environment: MacBook Retina 13" Late 2013, OS X 10.10.1, pjsip 2.3


Regards, 


Thomas



[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