[FFmpeg-devel] [PATCH] AVFoundation: Add -pixel_format option

sfan5 sfan5 at live.de
Sat May 17 18:19:07 CEST 2014


ON 11.05.2014 19:34, Carl Eugen Hoyos wrote:
> sfan5 <sfan5 <at> live.de> writes:
>
>>>> +    { AV_PIX_FMT_BGRA, kCVPixelFormatType_32BGRA },
>>> This should be AV_PIX_FMT_BGR0: The camera cannot
>>> record an alpha channel, the fourth channel is (or at
>>> least can be) 0, so it should be ignored.
>>> Same for the other 32 bit rgb formats.
>> Isn't AVFoundation a generic API for video sources?
>> (not only cameras)
>> There might be other devices that can record RGBA.
> I can't really answer this but since AVFoundation
> provides transparent images for 32 bit RGB it has
> to be mapped to RGB0 to work at all.
> (If a user ever protests that his alpha channel
> disappears, we will have to find a solution.)
I've changed the mapping as suggested.

(patch attached)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AVFoundation-Add-pixel_format-option.patch
Type: text/x-patch
Size: 6059 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140517/f5573f5c/attachment.bin>


More information about the ffmpeg-devel mailing list