Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3439724
  • 博文数量: 864
  • 博客积分: 14125
  • 博客等级: 上将
  • 技术积分: 10634
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-27 16:53
个人简介

https://github.com/zytc2009/BigTeam_learning

文章分类

全部博文(864)

文章存档

2023年(1)

2021年(1)

2019年(3)

2018年(1)

2017年(10)

2015年(3)

2014年(8)

2013年(3)

2012年(69)

2011年(103)

2010年(357)

2009年(283)

2008年(22)

分类: WINDOWS

2009-10-29 08:49:34

周末在家用git下载了vlc-1.0.0-git版本,编译了一下,出现了一个小错误倒腾了半天,源码里面的一函数定义有问题,修改了下,编译成功。
 
由于Jeremiah在写这篇日志的时候官方没有发布1.0.0的源代码,git版本是很不稳定的,比如运行了一下发现界面做的就很不好,播放的画面是另外的一个窗口,而不是播放器本身的窗口。
 
闲言少叙,开始正题。
 
1. 编译环境,目前最新的Cygwin。(《windows平台下vlc编译之五:vlc-0.9.6的编译》提供下载地址)
 
2. 源码和库
由于源码官网未提供,git下载速度确实有点不敢恭维。有些朋友的公司还会用代理上网,比如我们公司就这样。git通过代理麻烦的很。所以,Jeremiah把自己下载的源码放到网盘里面了,请需要的直接点击下载。并且,由于不知道git是不是每天更新,所以不能保证用git下载的和Jeremiah编译的是一个版本
源码:
(
在我的公共邮箱提供了下载,具体下载方式为:
1). 登录

2). 用户名:jeremiah_vlc
3). 密码:发邮件给我(
),我会告知。
4). 在“我的文件夹”的“Jeremiah_VLC相关资源”有所有资料的超大附件连接。
)
库:contrib-20081021-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2
(
在我的公共邮箱提供了下载,具体下载方式为:
1). 登录

2). 用户名:jeremiah_vlc
3). 密码:发邮件给我(
),我会告知。
4). 在“我的文件夹”的“Jeremiah_VLC相关资源”有所有资料的超大附件连接。
)
 
Jeremiah提供的源码里面修改了modules\stream_out\raop.c,如果是用git得到的,make的时候可能会遇到错误:
.libs/libstream_out_raop_plugin_la-raop.o: In function `SplitHeader':
/home/wangwei1/vlc-1.0.0/modules/stream_out/raop.c:550: undefined reference to `
_vlc_strsep'
/home/wangwei1/vlc-1.0.0/modules/stream_out/raop.c:558: undefined reference to `
_vlc_strsep'
.libs/libstream_out_raop_plugin_la-raop.o: In function `ExecRequest':
/home/wangwei1/vlc-1.0.0/modules/stream_out/raop.c:593: undefined reference to `
_vlc_strsep'
/home/wangwei1/vlc-1.0.0/modules/stream_out/raop.c:646: undefined reference to `
_vlc_strsep'
/home/wangwei1/vlc-1.0.0/modules/stream_out/raop.c:602: undefined reference to `
_vlc_strsep'
Creating library file: .libs/libstream_out_raop_plugin.dll.a
collect2: ld returned 1 exit status
make[5]: *** [libstream_out_raop_plugin.la] Error 1
make[5]: Leaving directory `/home/wangwei1/vlc-1.0.0/modules/stream_out'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/wangwei1/vlc-1.0.0/modules/stream_out'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/wangwei1/vlc-1.0.0/modules/stream_out'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/wangwei1/vlc-1.0.0/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wangwei1/vlc-1.0.0'
make: *** [all] Error 2
请自己修改modules\stream_out\raop.c,在一堆宏定义下面加入:
char *vlc_strsep( char **ppsz_string, const char *psz_delimiters )

        char *psz_string = *ppsz_string; 
        if( !psz_string ) 
                return NULL; 
 
        char *p = strpbrk( psz_string, psz_delimiters ); 
        if( !p ) 
        { 
                *ppsz_string = NULL; 
                return psz_string; 
        } 
        *p++ = '\0'; 
 
        *ppsz_string = p; 
        return psz_string;
}
 
3. 执行
sed -i 's/AM_GNU_GETTEXT_VERSION(0.17)/AM_GNU_GETTEXT_VERSION(0.15)/g' configure.ac    
    
./bootstrap
 
4. copy脚本configure-vlc01.sh到源码中。脚本在附件(file.rar)里面提供了,与vlc-0.9.6的编译脚本完全相同。
 
5. 执行./configure-vlc01.sh
 
6. 执行make前改个文件
libtool第144行:    
修改        
global_symbol_pipe=""        
为        
global_symbol_pipe="sed -n -e 's/^.*[                 ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[                                                 ][                                                ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1\\2\\3 \\3/p'"
不想改就直接覆盖附件(file.rar)中提供的这个文件。
 
7. 执行make && make package-win32-base。搞定!

附件下载:
  file.rar
阅读(1249) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~