Qt上的相机示例

时间:2019-05-30 20:04:16

标签: c++ qt camera

一段时间以来,我一直在努力解决这个问题,并且尝试了许多在线解决方案以尝试解决它,直到现在我遇到错误defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.camera"

我找到了一个解决方案,告诉我运行以下命令:

sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg
sudo apt-get install gstreamer0.10-plugins-ugly

这些命令的最后一个不会在终端上运行,现在当我尝试运行相机示例时出现这些错误:

(camera:25672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(camera:25672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(camera:25672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(camera:25672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(camera:25672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(camera:25672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(camera:25672): GStreamer-CRITICAL **: gst_object_ref_sink: assertion 'GST_IS_OBJECT (object)' failed

(camera:25672): GStreamer-CRITICAL **: gst_element_get_bus: assertion 'GST_IS_ELEMENT (element)' failed

(camera:25672): GStreamer-CRITICAL **: gst_bus_add_watch_full: assertion 'GST_IS_BUS (bus)' failed

(camera:25672): GStreamer-CRITICAL **: gst_bus_set_sync_handler: assertion 'GST_IS_BUS (bus)' failed

(camera:25672): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed

(camera:25672): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

(camera:25672): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

(camera:25672): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed

(camera:25672): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(camera:25672): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(camera:25672): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(camera:25672): GStreamer-CRITICAL **: gst_bus_set_sync_handler: assertion 'GST_IS_BUS (bus)' failed

(camera:25672): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed

(camera:25672): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
Debugging has finished

我在ubunto 16.04上使用Qt 5.7,将不胜感激,也请不要将其标记为重复问题,因为我已经尝试了所有关于堆栈溢出的解决方案,但是没有一个对我有用

0 个答案:

没有答案