Skip to content

Instantly share code, notes, and snippets.

@melvincabatuan
Last active November 29, 2019 07:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melvincabatuan/c8a95cf4beef39614ce0 to your computer and use it in GitHub Desktop.
Save melvincabatuan/c8a95cf4beef39614ce0 to your computer and use it in GitHub Desktop.
OpenCV 3.0 Installation Gstreamer Bug
Linking CXX shared library ../../lib/libopencv_video.so
[ 33%] Built target opencv_video
[ 33%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/calibrate.cpp.o
[ 33%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap.cpp.o
Scanning dependencies of target opencv_shape
[ 33%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/emdL1.cpp.o
[ 33%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/sc_dis.cpp.o
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_images.cpp.o
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o
[ 37%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/seamless_cloning_impl.cpp.o
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o
In file included from /usr/include/gstreamer-0.10/gst/pbutils/encoding-profile.h:29:0,
from /home/cobalt/opencv/modules/videoio/src/cap_gstreamer.cpp:65:
/usr/include/gstreamer-0.10/gst/pbutils/gstdiscoverer.h:35:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstDiscovererStreamInfoClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/gstdiscoverer.h:83:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstDiscovererContainerInfoClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/gstdiscoverer.h:104:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstDiscovererAudioInfoClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/gstdiscoverer.h:129:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstDiscovererVideoInfoClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/gstdiscoverer.h:159:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstDiscovererSubtitleInfoClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/gstdiscoverer.h:202:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstDiscovererInfoClass;
^
In file included from /home/cobalt/opencv/modules/videoio/src/cap_gstreamer.cpp:65:0:
/usr/include/gstreamer-0.10/gst/pbutils/encoding-profile.h:47:9: error: ‘GstMiniObjectClass’ does not name a type
typedef GstMiniObjectClass GstEncodingProfileClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/encoding-profile.h:66:9: error: ‘GstEncodingProfileClass’ does not name a type
typedef GstEncodingProfileClass GstEncodingContainerProfileClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/encoding-profile.h:85:9: error: ‘GstEncodingProfileClass’ does not name a type
typedef GstEncodingProfileClass GstEncodingVideoProfileClass;
^
/usr/include/gstreamer-0.10/gst/pbutils/encoding-profile.h:104:9: error: ‘GstEncodingProfileClass’ does not name a type
typedef GstEncodingProfileClass GstEncodingAudioProfileClass;
^
/home/cobalt/opencv/modules/videoio/src/cap_gstreamer.cpp: In member function ‘virtual bool CvCapture_GStreamer::grabFrame()’:
/home/cobalt/opencv/modules/videoio/src/cap_gstreamer.cpp:232:57: error: ‘gst_app_sink_pull_sample’ was not declared in this scope
sample = gst_app_sink_pull_sample(GST_APP_SINK(sink));
^
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gstreamer.cpp.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 37%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/denoising.cuda.cpp.o
[ 37%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/merge.cpp.o
[ 37%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/hist_cost.cpp.o
[ 37%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/denoise_tvl1.cpp.o
[ 37%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/aff_trans.cpp.o
[ 37%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/tps_trans.cpp.o
[ 37%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/opencl_kernels_photo.cpp.o
[ 37%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/precomp.cpp.o
[ 37%] Building CXX object modules/shape/CMakeFiles/opencv_shape.dir/src/haus_dis.cpp.o
Linking CXX shared library ../../lib/libopencv_photo.so
[ 37%] Built target opencv_photo
Linking CXX shared library ../../lib/libopencv_shape.so
[ 37%] Built target opencv_shape
make: *** [all] Error 2
SOLUTION:
update Gstreamer
It seems I only have gstreamer0.10.
Reading package lists... Done
Building dependency tree
Reading state information... Done
gstreamer0.10-tools is already the newest version.
libgstreamer0.10-0 is already the newest version.
libgstreamer0.10-dev is already the newest version.
gstreamer0.10-ffmpeg is already the newest version.
gstreamer0.10-plugins-ugly is already the newest version.
gstreamer0.10-plugins-base is already the newest version.
gstreamer0.10-plugins-good is already the newest version.
libgstreamer-plugins-base0.10-dev is already the newest version.
gstreamer0.10-plugins-bad is already the newest version.
@ssshukla26
Copy link

Installing libgstreamer-plugins-base1.0-dev fixed things for me.

@pglopezamaya
Copy link

Grate same here!

@k0rean-rand0m
Copy link

Nice. It helps :)

@pengyuan-zhou
Copy link

Installing libgstreamer-plugins-base1.0-dev fixed things for me.

Thank you so much!

@tuannv-github
Copy link

Thank you so much

@kaangoksal
Copy link

ubuntu 16.04, opencv3.4.4 installation also needs this, thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment