gdkpixbuff 问题

Issue with gdkpixbuff

我正在使用 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 分支上测试,结果是一样的。

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

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

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

bitbake image-YOUR_RECIPE_NAME