没有合适的资源?快使用搜索试试~ 我知道了~
VLC-android编译教程(改进版)
4星 · 超过85%的资源 需积分: 49 183 下载量 183 浏览量
2012-07-17
09:23:59
上传
评论 4
收藏 137KB PDF 举报
温馨提示
试读
12页
此文档包括了完整的VLC-android项目编译过程,包含live555移植方法,对官方的方案进行了大幅修改,有效解决了官方编译过程中的错误。
资源推荐
资源详情
资源评论
VLC
VLC
VLC
VLC 编译说明文档
编译说明文档
编译说明文档
编译说明文档
东大集成电路 王功
说明
后文部分步骤后标有 【建议 】 、 【必须】 和 【官方】 三种标志,分别表示:
【建议 】 :此步骤为编译中总结的经验,不一定适用所有情况,如果不执行该步骤,有
可能会造成错误。
【必须 】 :此步骤是执行编译的必须步骤,如果不执行,将不能完成编译。
【官方 】 :此步骤为官方给出的步骤。
编译环境
linux (建议使用 ubuntu11.10 )
相关工具及版本说明
eclipse ( 需要 java 支持 , 需要安装 ADT ) , android sdk , android ndk ( 建议使用 r6 及以
下版本,最新的 r8 版不能通过编译)
编译基础环境配置
1 、 安装 vlc 相关依赖库:
apt-get build-dep vlc 【建议】
2 、 安装相关工具:
apt-get install
git
【必须】
apt-get install wget 【必须】
apt-get install autoconf 【必须】
apt-get install libtool 【必须】
apt-get install subversion 【必须】
apt-get install cmake 【必须】
apt-get install ant 【建议】
3 、 建立一个新的文件夹,进入此文件夹,然后下载 vlc-android 代码:
git
clone git://git.videolan.org/vlc/vlc-android.git 【官方】
编译前准备 【建议】
由于
git
clone 到的部分文件不是最新的 , 因此 , 需要对部分文件进行更新才能正常编译
运行。
以下是 从 vlc2.0. 2 项目中提取 的 modules/video_out/androidsurface. c 文件 , 复制以下内容
,
替换 vlc-android 中的 modules/video_out/androidsurface.c 内容即可 。 (如果不进行这一步 , 也
可以正常编译,但是最终完成的 apk 将不能正常播放视频 。 )
/*****************************************************************************
* androidsurface.c: android video output using Surface Flinger
*****************************************************************************
* Copyright © 2011 VideoLAN
*
* Authors: Ming Hu <tewilove@gmail.com>
* Ludovic Fauvet <etix@l0cal.com>
* S é bastien Toque <xilasz@gmail.com>
*
* This program is free software; you can redistribute
it
and/or modify
it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed
in
the hope that
it
will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR
A
PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program;
if
not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston
MA
02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
#include <dlfcn.h>
#ifndef ANDROID_SYM_S_LOCK
# define ANDROID_SYM_S_LOCK "_ZN7android7Surface4lockEPNS0_11SurfaceInfoEb"
#endif
#ifndef ANDROID_SYM_S_LOCK2
# define ANDROID_SYM_S_LOCK2
"_ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionE"
#endif
#ifndef ANDROID_SYM_S_UNLOCK
# define ANDROID_SYM_S_UNLOCK "_ZN7android7Surface13unlockAndPostEv"
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static
int
Open (vlc_object_t *);
static void Close(vlc_object_t *);
vlc_module_begin()
set_category(CAT_VIDEO)
set_subcategory(SUBCAT_VIDEO_VOUT)
set_shortname("AndroidSurface")
set_description(N_("Android Surface video output"))
set_capability("vout display", 155)
add_shortcut("androidsurface", "android")
set_callbacks(Open, Close)
vlc_module_end()
/*****************************************************************************
* JNI prototypes
*****************************************************************************/
extern void *jni_LockAndGetAndroidSurface();
extern void jni_UnlockAndroidSurface();
extern void jni_SetAndroidSurfaceSize(int width,
int
height);
// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEb
typedef void (*Surface_lock)(void *, void *, int);
// _ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionE
typedef void (*Surface_lock2)(void *, void *, void *);
// _ZN7android7Surface13unlockAndPostEv
typedef void (*Surface_unlockAndPost)(void *);
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static picture_pool_t *Pool (vout_display_t *, unsigned);
static void Display(vout_display_t *, picture_t *, subpicture_t *);
static
int
Control(vout_display_t *, int, va_list);
剩余11页未读,继续阅读
王彦栋
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页