Dear All,
I am new bie to MAC AVFoundation programming.
I am trying to capture video from camera with a specific resolution, but I am not understanding about configuring video device with specific video dimension like 320x240.
In one way, I am setting as following code snippet. But even though I am setting with 320x240, it is capturing at 320x176 resolution. I am not understanding which are the APIs to use.
Please suggest proper way to handle this Media capture. Also provide me links, if any documentation or samples.
NSDictionary* captureDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithDouble:176], (id)kCVPixelBufferWidthKey,
[NSNumber numberWithDouble:144], (id)kCVPixelBufferHeightKey,
[NSNumber numberWithUnsignedInt:kCVPixelFormatType_24RGB],
(id)kCVPixelBufferPixelFormatTypeKey, nil];
// Specify the pixel format
vid_out.videoSettings = captureDictionary;
Regards,
Anand
I am new bie to MAC AVFoundation programming.
I am trying to capture video from camera with a specific resolution, but I am not understanding about configuring video device with specific video dimension like 320x240.
In one way, I am setting as following code snippet. But even though I am setting with 320x240, it is capturing at 320x176 resolution. I am not understanding which are the APIs to use.
Please suggest proper way to handle this Media capture. Also provide me links, if any documentation or samples.
NSDictionary* captureDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithDouble:176], (id)kCVPixelBufferWidthKey,
[NSNumber numberWithDouble:144], (id)kCVPixelBufferHeightKey,
[NSNumber numberWithUnsignedInt:kCVPixelFormatType_24RGB],
(id)kCVPixelBufferPixelFormatTypeKey, nil];
// Specify the pixel format
vid_out.videoSettings = captureDictionary;
Regards,
Anand