简体   繁体   English

如何包含PulseAudio核心接头?

[英]How to include pulseaudio core headers?

I am writing a program which should get sound from a pulseaudio source. 我正在编写一个程序,该程序应该从pulseaudio源获得声音。 I took pacat.c source file as an example. 我以pacat.c源文件为例。

Some of functions are declared in /pulsecore/*.h I include them into my source code: 一些功能在/pulsecore/*.h中声明,我将它们包含在源代码中:

#include <pulsecore/log.h>

#include <pulsecore/core-error.h>

#include <pulsecore/macro.h>

#include <pulsecore/g711.h>

#include <pulsecore/core-util.h>

But compiler can't find them. 但是编译器找不到它们。 fatal error: pulsecore/log.h: No such file or directory

I build pulseaudio 9.0 with Yocto. 我用Yocto构建Pulseaudio 9.0。

In /$BUILDSDIR/pulseaudio/9.0-r0/image there are no such headers. 在/$BUILDSDIR/pulseaudio/9.0-r0/image中,没有这样的标题。 But they exist in pulseaudio source code and also there /pulseaudio/9.0-r0/package/usr/src/debug/pulseaudio/9.0-r0/pulseaudio-9.0/src/pulsecore/ 但是它们存在于pulseaudio源代码中,也存在于/pulseaudio/9.0-r0/package/usr/src/debug/pulseaudio/9.0-r0/pulseaudio-9.0/src/pulsecore/

Is there any special option for pulseaduio to configure to copy headers into image? Pulseaduio是否有任何特殊选项可配置以将标头复制到映像中? Or I should update yocto recipe to copy desired files? 还是我应该更新yocto配方以复制所需的文件?

If you check the $WORKDIR of pulseaudio you will find the folder packages-split containing each package and its content. 如果检查pulseaudio的$ WORKDIR,将找到包含每个软件包及其内容的packages-split文件夹。

I am not sure whether what you try is possible, but the files you are trying to use are provided in the package pulseaudio-dbg . 我不确定您尝试执行的操作是否可行,但软件包pulseaudio-dbg中提供了您尝试使用的文件。 Which you could try yo install either via image recipe or in your local.conf. 您可以尝试通过图像配方或在local.conf中进行安装。 (IMAGE_INSTALL or CORE_IMAGE_EXTRA_INSTALL variables respectively) (分别为IMAGE_INSTALL或CORE_IMAGE_EXTRA_INSTALL变量)

You can find the package itself in $WORKDIR/deploy-[rpm|ipk|deb]/ 您可以在$ WORKDIR / deploy- [rpm | ipk | deb] /中找到软件包本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM