GStreamer / OpenCV chicken and egg dependencies - What build scheme is recommended?

  • GStreamer has a module in plugins-bad subprojects/gst-plugins-bad/ext/opencv/libgstopencv.so that depends from OpenCV.
  • OpenCV can be built with GStreamer as videoio backend.

Looks to me like a chicken and egg question when about to build both.

I’m currently thinking to build opencv without gstreamer (or using a standard available package), then build gstreamer against this opencv version, then rebuild opencv with the previously built gstreamer version.

I suppose that people packaging these for distributions have already managed this case.

May someone advise on the best scheme, please ?

Linux distribution builds each subproject separately. OpenCV depends on gstreamer APIs in GStreamer and gst-plugins-base only, while the openvc plugins are in -bad.