离写上篇快4个月了,近期整理了下,写了个Demo,过段时间补上说明,先看代码吧。
还没有搭好服务端,可以看看这篇。
2012/10/8申请的key,30天过期了自己再去申请。
操作如图 😀
继续阅读“Android通过JUV+Red5+Speex实现网络语音聊天(二)”
作者: aliang
使用Xcode4.5 编译运行 iFrameExtractor
IOS平台上使用FFmpeg解码H264的例子
https://github.com/lajos/iFrameExtractor
Xcode4.5 安装路径变了的缘故吧,修改了下build_armv6 build_armv7 build_i386 三个编译脚本
继续阅读“使用Xcode4.5 编译运行 iFrameExtractor”
使用Android NDK8 移植FFmpeg 0.11.1
之前在公司一个项目中一直使用 http://www.cnblogs.com/mcodec/articles/1780598.html 提供的H264 Android解码库
但是经常崩溃,最终定位到mc_dir_part函数中的
1 |
qpix_op[luma_xy](dest_y, src_y, s->linesize); //FIXME try variable height perhaps? |
尝试了一晚上也没修复好这个问题,于是打算自己移植FFmpeg
mcodec 兄所做的工作是将H264解码的代码从ffmpeg中提取出来做了深度优化,而本人对FFmpeg?还不甚了解,无法做到提取,而且新版本相互依赖太重,于是将整个FFmpeg?移植过来使用。
在配置时关闭了所有特性,只开启了所需的H264解码库,arm汇编特性,其余全部关闭。
以下是我的配置代码 继续阅读“使用Android NDK8 移植FFmpeg 0.11.1”
MQTT 调试工具一枚
最近项目中常用到MQTT协议,为了方便调试,将这个工具从IA92项目中的WMQTT utility编译打包成exe,并修改部分机器文字显示重叠和乱码的问题。不过仍然需要jar环境。
Android通过JUV+Red5+Speex实现网络语音聊天(一)
本例严重过期,并且使用了不开源且收费的库
请尝试最新开源版:
Android基于OpenSL ES,Speex,RTMP的Voip客户端实现
iOS版:
iOS基于Audio Queues,Speex,Rtmp的Voip客户端
—————-仅供参考请勿用于项目———————–
先说下实现原理,手机采集到语音后进过Speex编码,通过juv以直播形式发布自己的语音流到red5,也是通过juv播放对方的直播流,经过Speex解码后输出到扬声器,如下图:
Android端采集编码和解码播放Speex,参考android-recorder,至于他用的red5客户端,看了下,没看明白。。。
核心代码如下:
1 |
public class AudioCenter extends AbstractMicrophone |
安装配置Red5 Server 1.0 RC1 (二)
看这篇文章,请保证你的Red5已经成功运行,如果有问题,请看上篇。
继续回到之前的demo页,第二项有个?Admin Panel?View demo
如果你安装了AIR环境,也可以尝试后面那个版本。 继续阅读“安装配置Red5 Server 1.0 RC1 (二)”
安装配置Red5 Server 1.0 RC1 (一)
在做完一个基于RTMP的音视频通话软件后,想深入了解下RTMP协议的实现。
项目的服务器环境是FMS,这里,对另一种开源的服务端 Red5做个了解。
需要Jre环境。
下载最新版1.0 RC1?http://trac.red5.org/downloads/1_0/setup-Red5-1.0.0-RC1.exe
安装,在过程中会需要输入服务器IP和HTTP访问的端口号。
安装完毕,运行安装目录下的?red5.bat 一闪而过。OK,用cmd运行。发现报一下错误:
google一番后知道,需要删除lib目录下 继续阅读“安装配置Red5 Server 1.0 RC1 (一)”
android.git.kernel.org 无法访问后 repo失败的完美解决方法
自kernel.org遭受攻击,android.git.kernel.org梦见了电子羊,到kernel.org linux.com?linux.org 停机维护,android.git.kernel.org直接连域名解析都关了
这导致repo拼命想连接android.git.kernel.org,然后一次一次失败
但是repo还得继续用啊,默认情况下 都是从 android.git.kernel.org ?下载全套的repo工具集到.repo/repo目录下,再用这套工具集去下载git服务器上的源码库。
网上有个办法 http://carltao.blog.51cto.com/856514/667469 但我确实没找出作者修改了什么地方
于是继续google,总算被我找到完美的解决办法了 继续阅读“android.git.kernel.org 无法访问后 repo失败的完美解决方法”
ASUS S200 上安装 Android X86 经历
一台老爷机 ASUS s200 详细资料看这里
内存大点256的 硬盘40G 够老爷了吧? 装个Android发挥余热
X86 Android 项目在这里 继续阅读“ASUS S200 上安装 Android X86 经历”
编译Openfime G2D,G3D内核模块时的错误解决方法
在编译Tom3q所写s3c6410 android 图形驱动模块(g2d,g3d)时,遇到如下错误
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[aliang@Eadith g2d]$ make KDIR=~/source/Android/linux-2.6.36-android/ make --no-print-directory -C /home/aliang/source/Android/linux-2.6.36-android/ SUBDIRS=/home/aliang/source/openfimg/modules/g2d modules CC [M] /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.o In file included from /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:46:0: arch/arm/plat-samsung/include/plat/pm.h:104:39: warning: 'struct sys_device' declared inside parameter list arch/arm/plat-samsung/include/plat/pm.h:104:39: warning: its scope is only this definition or declaration, which is probably not what you want arch/arm/plat-samsung/include/plat/pm.h:105:38: warning: 'struct sys_device' declared inside parameter list /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c: In function 's3c_g2d_open': /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:783:2: <span style="color: #ff0000;">error: implicit declaration of function 'kmalloc'</span> /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:783:6: warning: assignment makes pointer from integer without a cast /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c: In function 's3c_g2d_release': /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:806:2: <span style="color: #ff0000;">error: implicit declaration of function 'kfree'</span> /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c: At top level: /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:817:2: <span style="color: #ff0000;">error: unknown field 'ioctl' specified in initializer</span> /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:817:2: warning: initialization from incompatible pointer type /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c: In function 's3c_g2d_probe': /home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.c:837:7: warning: assignment makes pointer from integer without a cast make[2]: *** [/home/aliang/source/openfimg/modules/g2d/s3c_g2d_driver.o] 错误 1 make[1]: *** [_module_/home/aliang/source/openfimg/modules/g2d] 错误 2 make: *** [all] 错误 2 |
红字部分是主要错误,“kmalloc”,“kfree”错误是由于缺少头文件引起的
#include <linux/slab.h>
添加后解决
1 |
<span style="color: #ff0000;">error: unknown field 'ioctl' specified in initializer</span> |
问题是由于2.6.36内核之后 去掉了原来的ioctl,添加两个新的成员,所以会出错
- long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
- long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
所以修改源文件中file_operations内
.ioctl 改为 .compat_ioctl 即可
OK,编译通过,警告咱就忽略了?:mrgreen: