Android的:如何建立和替换修改AOSP code [英] Android: How to build and replace modified AOSP code

查看:529
本文介绍了Android的:如何建立和替换修改AOSP code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始怯场框架的工作合作,落实在Android的果冻之前豆在我的视频会议应用的硬件去$ C $铬。结果
我已经下载并内置的Mac系统的Andr​​oid源$ C ​​$ C。我不与AOSP工作的整体思路清晰。我的问题是(相对于stagefright框架)

I am starting to work with stage fright frame work to implement hardware decoder in android prior to Jelly bean in my video conferencing application.
I have downloaded and built the android source code in Mac system. I am not clear with the whole idea of working with AOSP. And my questions are (with respect to stagefright framework)


  1. 我在哪里可以找到AOSP后libstagefright.so建立?

  1. Where can I find the libstagefright.so after AOSP build ?.

如果我使用OMX codeC在我的类去code,我应该怎么链接libstagefright.so我的应用程序的本地code?如果我通过复制libstagefright.so并通过make文件联系起来,建立我的家乡code是的方式?

If I use the OMX codec in my class for decode, how should I link the libstagefright.so to native code of my application ? If I build my native code by copying the libstagefright.so and linking it via make file is that the way ?

我如何使用它在我的应用程序?如果我通过的System.loadLibrary()加载它,将它的工作??

How can I use it in my application ? If I load it via System.loadLibrary(" "), will it work ??

更新:结果
我试图从Ganesh神的建议。但是,当我试图建立的项目,它NDK不走头列为LOCAL_C_INCLUDES。

UPDATE:
I have tried the suggestion from Ganesh. But when I tried to build the project with NDK it is not taking the headers included as LOCAL_C_INCLUDES.

下面是我的android.mk

Here is my android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_LDLIBS := -llog
LOCAL_MODULE := custom_decoder

LOCAL_C_INCLUDES := $(LOCAL_PATH)\includes \
                    frameworks/av/media/libstagefright/include \
                    frameworks/native/include/media/openmax \
                    frameworks/base/include/media/stagefright

LOCAL_SHARED_LIBRARIES := \
                    libstagefright libstagefright_omx libstagefright_foundation libutils liblog

LOCAL_SRC_FILES := custom_decoder_jni.cpp custom_decoder.cpp

include $(BUILD_SHARED_LIBRARY)

错误是由custom_de coder.h当读取包括AOSP的显示。

the error is shown from custom_decoder.h when it is reading the includes of AOSP.

 fatal error: DataSource.h: No such file or directory. 

我的天堂T包含任何AOSP。所以在我的项目(​​按Ganesh神在注释2的建议)。我应该这样做吗?

I haven"t included any AOSP .so in my project(as per Ganesh's suggestion in comment 2). Should I do that?

还有什么我应该做的就是它内置了......

What else should I do to get it built......

推荐答案

要回答你的具体问题,


  1. libstagefright.so 是建立并安装在 /系统/ lib目录

我presume你采用 libstagefright.so 在本地code。用这一假设,则不必复制。我presume您正在构建的模块可加载库即的.so 文件。因此,如果你可以通过 LOCAL_SHARED_LIBRARIES 识别 libstagefright.so 的依赖,以及包括头文件,它应该是绰绰有余了为构建模块。请参阅本<一个href=\"http://androidxref.com/4.4.3_r1.1/xref/frameworks/av/media/libstagefright/$c$ccs/flac/enc/Android.mk\"相对=nofollow>例如建筑的 FLAC 连接codeR 有类似的依赖性已处理。

I presume you are employing the libstagefright.so in native code. With this assumption, you don't have to copy. I presume you are building your module as a loadable library i.e. .so file. Hence, if you can identify the dependency on libstagefright.so through LOCAL_SHARED_LIBRARIES as well as including the header files, it should be more than sufficient for building your module. Please refer to this example of building a FLAC encoder where similar dependencies have been handled.

通过应用程序,如果你是指哪一个 JNI 层交互的的Java 应用程序,再点2应该是绰绰有余了。但是,如果你正在创建一个本地应用层的,我建议你遵循的 stagefright 命令行实用程序的生成文件

By application, if you are referring to a Java application which interacts with a JNI layer, then point 2 should be more than sufficient. However, if you are creating a native layer application, I would recommend you to follow stagefright command line utility's makefile.

这篇关于Android的:如何建立和替换修改AOSP code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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