C-API cleanup: highgui, videoio#26025
Conversation
| } | ||
|
|
||
| //! Macro to construct the fourcc code of the codec. Same as CV_FOURCC() | ||
| #define CV_FOURCC_MACRO(c1, c2, c3, c4) (((c1) & 255) + (((c2) & 255) << 8) + (((c3) & 255) << 16) + (((c4) & 255) << 24)) |
There was a problem hiding this comment.
May be move it to videoio.hpp as inline function (which could be exported to bindings)
BTW, there is VideoWriter::fourcc (it is confusing because it is used outside of that). So global function is preferable.
There was a problem hiding this comment.
There is CV_FOURCC inline function above (used in ~70 places). Do you mean move it too? It is used in imgproc for font rendering params.
Perhaps we can remove CV_FOURCC_MACRO completely, I didn't do it to reduce total changes, because it is used in ~50 places.
VideoWriter::fourcc is used in ~50 places too.
There was a problem hiding this comment.
That is a mess.
Lets revise fourcc through a separate task then.
|
Mac specific test failure: |
|
opencv/modules/videoio/src/cap_interface.hpp Lines 298 to 332 in a087a9c |
|
Mac build issue: |
2c9581f to
2f3f30a
Compare
2f3f30a to
dda16aa
Compare
dda16aa to
2d042d9
Compare
|
Wayland build: |
|
Wayland build has been fixed, but I can not test it. |
|
Wayland branch works well! |
e6b85e1 to
71c5b8a
Compare
|
iOS framework build verified. |
|
@mshabunin Please fix remaining review notes and I merge the PR. |
71c5b8a to
e011946
Compare
|
@asmorkalov , done. Please note there is potential conflict with GTK4 PR (#25958), it might be hard to merge 4.x->5.x when both PRs are integrated. We can try to backport GTK changes to 4.x from this PR or merge in the following order: GTK4, 4.x->5.x, this PR. |
|
Tested manually OpenNI2 with Orbbec Astra camera. |
❗ Potential conflicts with #25958
❗ Merge with: opencv/opencv_contrib#3780
This PR removes usage of C-API from highgui and videoio modules. Only source code is affected, tests were not using obsolete API.
It should be possible to backport these changes to 4.x branch preserving removed public headers and source files (
*_c.hand*_c.cpp).Checklist
I tried to verify as many backends as possible, though these checks were not as thorough as I'd like them to be. Below is the checklist covering all modified backends with their statuses.
highgui
videoio
Notes
cap_avfoundation*.mmto make them slightly more synchronized - it would be better to combine them into a single one in the futuretwo issues have been fixed in separate commits:imgproc: missingcv::hal::color conversion functions has been used in MediaSDK backendvideoio/V4L: wrong color conversion mode caused bad colors for NV12 camera input format (RGB instead of BGR)It would be nice to check following functionality manually: