1

我正在使用 Yocto 开发 iMX6,并且正在尝试在我的板上使用 Gstreamer 插件:gdkpixbufoverlay,但出现以下错误:

gst-launch-1.0 autovideosrc ! gdkpixbufoverlay location=image.png ! autovideosink

(gst-launch-1.0:441): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstGdkPixbufOverlay:gdkpixbufoverlay0: Could not load overlay image.
Additional debug info:
../../../gst-plugins-good-1.6.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.c(508): gst_gdk_pixbuf_overlay_start (): /GstPipeline:pipeline0/GstGdkPixbufOverlay:gdkpixbufoverlay0:
Couldn't recognize the image file format for file 'image.png'
Setting pipeline to NULL ...
Freeing pipeline ...

所以我尝试运行建议的命令,但我也没有工作。我看了一下输出:

/usr/lib/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders 
# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.32.3
#
# LoaderDir = /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders
#

输出充满了评论。我认为我的板上有问题,但我找不到哪里。

我是否需要其他一些软件包才能使 gdkpixbuf 工作?我在 Poky 发行版、krogoth 和 pyro 分支上进行了测试,结果是一样的。

4

1 回答 1

1

将必要的包和子包名称作为行添加到您的配方(image-YOUR_RECIPE_NAME.bb文件)中。在我的情况下,包被拆分了,所以为了使用 PNG 和 JPEG 图像覆盖,我的配方如下所示:

...
gdk-pixbuf \
gdk-pixbuf-loader-png \
gdk-pixbuf-loader-jpeg \
...

保存更改后,不要忘记对其进行 bitbake:

bitbake image-YOUR_RECIPE_NAME
于 2017-10-19T14:58:13.763 回答