使用gstreamer-1.0的时候没有这样的元素 "v4l2src",但在gstreamer-0.10 [UBUNTU 16.04.2 LTS]中存在。

问题描述 投票:2回答:1

我在gstreamer-1.0中遇到了v4l2src的问题,但在gstreamer-0.10中似乎有。我在网上搜索了一下,但没有一个建议能让它有什么不同。我在下面列出了一些结果。有什么其他方法可以尝试吗?


更新。@alper-kucukkomurler是正确的。我已经安装了 anaconda,并且 which gst-inspect-1.0 正在返回 ~/anaconda2/bin. 从我的路径中删除Anaconda确实解决了这个问题。但是,如果可能的话,我更希望能有一个解决方案,让Anaconda留在路径中。有什么方法可以解决这个问题吗?(我确实在 anaconda 中安装了 gstreamer 和 gst-plugins-base 包)。


更新2: 来自另一个论坛的提示https:/forum.openframeworks.ccterror-ofgstutils-error-getting-device-data-no-element-v4l2src269086。

指着这个职位GStreamer插件搜索路径?

讨论GST_PLUGIN_PATH。其实我没有这样一个env变量。但这是一个额外的信息点。


$ sudo apt-get install gstreamer1.0-plugins-good
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gstreamer1.0-plugins-good is already the newest version (1.8.3-1ubuntu0.4).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

# (I've tried --reinstall too)


$ locate libgstvideo4linux2.so
/usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so



$ gst-inspect-1.0 -b
Blacklisted files:
Total count: 0 blacklisted files

$ gst-inspect-0.10 -b
Blacklisted files:
Total count: 0 blacklisted files



$ gst-launch-1.0 v4l2src
ERROR: pipeline could not be constructed: no element "v4l2src".

$ gst-launch-0.10 v4l2src
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 2089256849 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


$ gst-inspect-1.0 v4l2src
No such element or plugin 'v4l2src'

$ gst-inspect-0.10 v4l2src
Factory Details:
  Long name:    Video (video4linux2) Source
  Class:    Source/Video
  Description:  Reads frames from a Video4Linux2 device
  Author(s):    Edgard Lima <[email protected]>, Stefan Kost <[email protected]>
  Rank:     primary (256)

Plugin Details:
  Name:         video4linux2
  Description:      elements for Video 4 Linux
  Filename:     /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstvideo4linux2.so
  Version:      0.10.31
  License:      LGPL
  Source module:    gst-plugins-good
  Source release date:  2012-02-20
  Binary package:   GStreamer Good Plugins (Ubuntu)
  Origin URL:       https://launchpad.net/distros/ubuntu/+source/gst-plugins-good0.10
 ...
 ...



$ uname -a
Linux MSA-BLADE-UBUNTU 4.11.3-041103-generic #201705251233 SMP Thu May 25 16:34:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial
ubuntu anaconda gstreamer ubuntu-16.04 v4l2
1个回答
0
投票

你可能和我有同样的问题,我少了一个。.so 文件在我的动态共享库路径外的一个文件夹里。我可以看到,通过按照描述的步骤在 此处. 为了解决这个问题,我不得不运行 export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

© www.soinside.com 2019 - 2024. All rights reserved.