Add avfoundation support for normal OSX build, not just iOS (Bug #4187)


Added by Dustin Spicuzza about 10 years ago. Updated over 9 years ago.


Status:New Start date:2015-02-10
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:highgui-video
Target version:3.0
Affected version:branch 'master' (3.0-dev) Operating System:Mac OSX
Difficulty:Easy HW Platform:x64
Pull request:

Description

When using QTKit, things like exposure settings and such aren't supported. AVFoundation supports doing this, however.

I hacked with the makefiles in a very minimal way, and I found the following:

  • Can't enable QTKit and AVFoundation at the same time, otherwise link errors occur
  • Have to add some frameworks in CMakeLists.txt in videoio -- here's what my line that worked was (not sure if there's too many frameworks there, I just copy/pasted settings from IOS):
list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreMedia" "-framework CoreVideo" )

Once I did this very minimal change, I compiled and was able to set the exposure on the webcam using PROP_IOS_DEVICE_EXPOSURE on my Macbook Pro. I haven't done extensive testing yet, but my understanding is that AVFoundation is mostly identical on iOS and OSX.


Associated revisions

Revision 4bf82e50
Added by Alexander Alekhin over 9 years ago

Merge pull request #4187 from SpecLad:chessboard-png

History

Updated by Vadim Pisarevsky almost 10 years ago

  • Category changed from imgproc, video to highgui-video

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4930

Also available in: Atom PDF