添加的GStreamer到Eclipse [英] Adding GStreamer to Eclipse

查看:1101
本文介绍了添加的GStreamer到Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图在Eclipse中添加的GStreamer一个铝石I.mx6开发工具包的跨平台编译。对于我的Eclipse运行在Ubuntu主机GStreamer的SDK文档 - GStreamer的SDK文档 - GStreamer的-SDK是根据安装在Linux上安装。现在的问题是;根据Ubuntu的安装指导,我需要包括到GCC命令以下字符串:

I've been trying to add gstreamer in Eclipse for cross-platform compilation of an Variscite I.mx6 development kit. GStreamer-SDK is installed according to Installing on Linux - GStreamer SDK documentation - GStreamer SDK documentation for the Ubuntu Host I'm running eclipse on. Now the problem is; according to the Ubuntu installation guide, I need to include into the gcc command the following string:

pkg配置--cflags --libs的GStreamer-0.10

我在网络上找到大多数解决方案这个字符串添加到在C / C ++建设 - >设置Eclipse项目设置并配置有gcc的命令行。由于我使用的是Eclipse中的Yocto项目 - 插件yocto项目,我没有获得这些标签了,因为我使用的工具链交叉编译我的应用程序。我发现其他的解决方案,从修改make文件( http://ubuntuforums.org/showthread.php ?T = 1164725 )或添加命令行到Autotools的配置设置。我都试过,但他们没有工作。我还添加了GStreamer的SDK与以下路径下包括中:/ opt / GStreamer的-SDK /.

Most solutions i found on the web add this string to the eclipse project settings under C/C++ Build->Settings and configure there the gcc command line. Since I'm using the yocto project with the Yocto Project-plugin in Eclipse, I don't have access to those tabs anymore as I use a toolchain to cross compile my application. I've found other solutions from modifying the make file (http://ubuntuforums.org/showthread.php?t=1164725) or adding the command line to the Autotools configure settings. I've tried both, but they didn't work. I've also added the gstreamer SDK under Includes with the following path: /opt/gstreamer-sdk/.

如果有人可以帮助我,让我如何配置Eclipse或我的makefile这个问题,我会感激不尽。

If anyone could help me out with this problem on how to configure Eclipse or my makefile, I'd be most grateful.

推荐答案

请按照该指令的编译GStreamer的SDK 使用的的Eclipse IDE

注:

  编译使用的Hello World的GStreamer应用程序

follow this instruction to compile gstreamer sdk using eclipse IDE
Note:
compile using hello world gstreamer application program


    项目 - > C / C ++建设 - >工具设置 - >设置
  1. 转到性能
    gcc编译器选择包括栏目并添加以下细节

    /opt/gstreamer-sdk/include/gstreamer-0.10

    /usr/include/gstreamer-0.10

    的/ opt / GStreamer的-SDK /包含

    /opt/gstreamer-sdk/include/glib-2.0

    /opt/gstreamer-sdk/lib/glib-2.0/include

    /opt/gstreamer-sdk/include/glib-2.0/glib

    /opt/gstreamer-sdk/include/glib-2.0/gobject

    的/ opt / GStreamer的-SDK /有/的libxml2 /

    的/ opt / GStreamer的-SDK /有/ OGG

    的/ opt / GStreamer的-SDK /有/ Theora格式

    的/ opt / GStreamer的-SDK /有/ Vorbis格式

    的/ opt / GStreamer的-SDK /有/ WavPack的

    /opt/gstreamer-sdk/include/gtk-2.0/gtk

  2. 现在,转到生成步骤部分

    并添加此命令到 pre-构建步骤

    的/ opt / GStreamer的-SDK /斌/ GST-SDK壳

  3. 转到 C / C ++建设 - >环境并添加以下数据到它

    注意:这些
    信息指出但从/选择/ GStreamer的-SDK /斌/ GST-SDK-壳脚本数据

    GSTREAMER_SDK_R​​OOT的/ opt / GStreamer的-SDK

    GST_REGISTRY_1_0 $ {HOME} /。缓存/ GStreamer的-1.0 / GStreamer的-SDK-注册表

    XDG_CONFIG_DIRS /etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:${GSTREAMER_SDK_ROOT}/etc/xdg${XDG_CONFIG_DIRS:+:$XDG_CONFIG_DIRS}:/etc/xdg

    LDFLAGS $ {} GSTREAMER_SDK_R​​OOT / lib目录$ {LDFLAGS}

    XDG_DATA_DIRS /usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:${GSTREAMER_SDK_ROOT}/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}:/usr/local/share:/usr/share

    PYTHONPATH $ {} GSTREAMER_SDK_R​​OOT {/lib/python2.7/site-packages$ PYTHONPATH:+:$ PYTHONPATH}

    GIO_EXTRA_MODULES $ {} GSTREAMER_SDK_R​​OOT / lib目录/ GIO /模块

    CXXFLAGS $ {} GSTREAMER_SDK_R​​OOT /包括$ {CXXFLAGS}

    GST_PLUGIN_SCANNER $ {} GSTREAMER_SDK_R​​OOT /libexec/gstreamer-0.10/gst-plugin-scanner

    GST_PLUGIN_SCANNER_1_0 $ {} GSTREAMER_SDK_R​​OOT /libexec/gstreamer-1.0/gst-plugin-scanner

    CFLAGS $ {} GSTREAMER_SDK_R​​OOT /包括$ {CFLAGS}

    PKG_CONFIG_PATH /opt/gstreamer-sdk/lib/pkgconfig:${GSTREAMER_SDK_ROOT}/lib/pkgconfig:${GSTREAMER_SDK_ROOT}/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}

    PATH /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/sbin:/sbin:/usr/games:/usr/local/games:${GSTREAMER_SDK_ROOT}/bin${PATH:+:$PATH}:/usr/local/bin:/usr/bin:/bin

    GST_REGISTRY $ {HOME} /。的GStreamer-0.10 / GStreamer的-SDK-注册表

    LD_LIBRARY_PATH /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:${GSTREAMER_SDK_ROOT}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

  1. goto properties in your project->c/c++build->tool settings->settings
    under gcc compiler select the include section and add the following details
    /opt/gstreamer-sdk/include/gstreamer-0.10
    /usr/include/gstreamer-0.10
    /opt/gstreamer-sdk/include
    /opt/gstreamer-sdk/include/glib-2.0
    /opt/gstreamer-sdk/lib/glib-2.0/include
    /opt/gstreamer-sdk/include/glib-2.0/glib
    /opt/gstreamer-sdk/include/glib-2.0/gobject
    /opt/gstreamer-sdk/include/libxml2/
    /opt/gstreamer-sdk/include/ogg
    /opt/gstreamer-sdk/include/theora
    /opt/gstreamer-sdk/include/vorbis
    /opt/gstreamer-sdk/include/wavpack
    /opt/gstreamer-sdk/include/gtk-2.0/gtk
  2. now goto Build Steps section
    and add this command into pre-build steps
    /opt/gstreamer-sdk/bin/gst-sdk-shell
  3. goto c/c++ Build->Environment and add the following data into it
    Note:
    these information are noting but script data from "/opt/gstreamer-sdk/bin/gst-sdk-shell"
    GSTREAMER_SDK_ROOT /opt/gstreamer-sdk
    GST_REGISTRY_1_0 ${HOME}/.cache/gstreamer-1.0/gstreamer-sdk-registry
    XDG_CONFIG_DIRS /etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:${GSTREAMER_SDK_ROOT}/etc/xdg${XDG_CONFIG_DIRS:+:$XDG_CONFIG_DIRS}:/etc/xdg
    LDFLAGS ${GSTREAMER_SDK_ROOT}/lib ${LDFLAGS}
    XDG_DATA_DIRS /usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:${GSTREAMER_SDK_ROOT}/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}:/usr/local/share:/usr/share
    PYTHONPATH ${GSTREAMER_SDK_ROOT}/lib/python2.7/site-packages${PYTHONPATH:+:$PYTHONPATH}
    GIO_EXTRA_MODULES ${GSTREAMER_SDK_ROOT}/lib/gio/modules
    CXXFLAGS ${GSTREAMER_SDK_ROOT}/include ${CXXFLAGS}
    GST_PLUGIN_SCANNER ${GSTREAMER_SDK_ROOT}/libexec/gstreamer-0.10/gst-plugin-scanner
    GST_PLUGIN_SCANNER_1_0 ${GSTREAMER_SDK_ROOT}/libexec/gstreamer-1.0/gst-plugin-scanner
    CFLAGS ${GSTREAMER_SDK_ROOT}/include ${CFLAGS}
    PKG_CONFIG_PATH /opt/gstreamer-sdk/lib/pkgconfig:${GSTREAMER_SDK_ROOT}/lib/pkgconfig:${GSTREAMER_SDK_ROOT}/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
    PATH /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/sbin:/sbin:/usr/games:/usr/local/games:${GSTREAMER_SDK_ROOT}/bin${PATH:+:$PATH}:/usr/local/bin:/usr/bin:/bin
    GST_REGISTRY ${HOME}/.gstreamer-0.10/gstreamer-sdk-registry
    LD_LIBRARY_PATH /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/client:/usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386:${GSTREAMER_SDK_ROOT}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

保存项目并构建它..它应该没有错误编译

save the project and build it .. it should compile without error

现在添加参数文件到运行配置

右键单击该项目并选择 RunAs-> RunConfiguration->创建新的(如果不是创建)配置文件 - >参数(X)

这里
添加的输入文件和输出文件
例如:

test.ogg输出test.ogg

now add the argument files into the run configuration
right click the project and select RunAs->RunConfiguration->create new(if not created)config file->argument(x)
add the input files and output files here
ex:
test.ogg output-test.ogg

现在如果一切正常运行的项目。

now run the project if everything is fine.

注意:

这上面的程序是的 x86架构仅如果您使用的不是x86架构等,然后包括适当的架构库和文件进行编译,并排除一些并不需要的!!!!!

Note:
this above procedure is for x86 architecture only if you are using other than x86 arch ,then include appropriate architecture libraries and files to compile and exclude which are not needed!!!!!

这篇关于添加的GStreamer到Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆