Add an asynchronous message callback to accept socket connection status for RTSPPlayer

Add an asynchronous message handler to accept NDK library’s socket connection status callback for RTSPPlayer. I’m not so familiared with messages mechenism, I turned to the article for guidance.

Continue reading “Add an asynchronous message callback to accept socket connection status for RTSPPlayer”

April, 2013: A fresh new start


After 3 weeks so called “rest”, watching movies, picking up Catherine after her classes are over, I finally got to check in Kedacom on April 18.

A life fresh new starts, surrounding with lots of “strangers”, without any IM tools allowed in the office, doing works by a PC rather than a notebook, coding on Windows and MFC only instead of all the OSs I familiar with, and I’m no longer the one who makes call in the team and no longer need to chair the meetings now, and there will be formal/required overtime working (every Tuesday & Thursday, and two Saturdays every month),  even more I can not visit my kedacom’s mailbox when out of the office, everything is so different with what I used to be in the past decades. Simply put, in my current understanding, Kedacom is a typical Chinese company, while UniSVR seems more Western in working style.

Still working on adapting to the all new environments and the team.

However, what I dont need to change myself to be is, the works are still audio/video related. My current job responsibility is get into an existing MediaSDK for the VoIP products of Kedacom, which including  audio/video capturing, pre-processing, encoding, muxing, transmitting for the caster side, and demuxing, decoding, post-processing, render for the player side, and the first step is implement a full functioned audio processing module for the MediaSDK, including but not limitted to AEC, AGC, Noise Supression, High pass filter(which will be simply implemented by wrapping the codes from WebRTC project).

I believe what I need to care is how to adjust myself to get into the role rather than programming skills or anything programming technical related.

Wish I can pass the probation soon.


Easlier in this month, USTC posted a notice that the 5th MSE entrance exam will be held on May 26. It’s a really good news to me, after postponed for over 6 months.


Dad’s work finally got confirmed too, and he will on his way to Hangzhou days later, so I don’t have so much more oppotunities to drink with him later. Enjoy the father-son drinking time.

NullPointerException error when polling down the preset url list spinner

There was a bug in RTSPPlayer, that is when you poll down the preset RTSP stream source  list spinner, the APP will crash with an NullPointerException. Today, I finally have it fixed.

Continue reading “NullPointerException error when polling down the preset url list spinner”

First week in the new company

Phase 1:  Learn & master the existing MediaSDK & the sample programs.

1. Add audio output device enumlation and selection option for playertester
2. Add audio input device enumlation and selection option for castertester
3. Add Mute setting for castertester
4. Add Microphone boost option for castertester.
5. UI adjustment for castertester to be more easier to be understand the working flow.
Osp command: kdvmedianethelp
Phase 2: WebRTC audio engine : audio device module & audio processing module research

Current status:
1. AGC settings and proccessing should be working now.
2. Microphone volume control still not undering coding.

How does AGC works?
Step 1: Audio capture(
bool AudioDeviceWindowsWave::ThreadProcess()
Step 2: put into AudioBuffer and NewMicLevel()
WebRtc_Word32 AudioDeviceWindowsWave::RecProc(LONGLONG& consumedTime)
Step 3: Do audio processing/encoding/transmit tasks….
This is the key!!!
Step 4: Set new microphone volume thru _mixerManager(AudioMixerManager).

Issues encounterred with
There are lot’s of differences between the Kdv audio modules and the WebRTC audio modules(audio device module and

maybe some others)

About microphone volume control(not relevant, curious only):
1. Client side audio mixing?
2. AGC may bring with side-effects with audio signal(audience only)?



WebRTC: how to use audio process module?


My current job responsiblity is researching on WebRTC, and the first task is wrapping a class from WebRTC to process audio frames to implement functions of audio AEC, AGC, NS, High pass filter etc.

Information list below is from, you can also view it by visiting, or it’s code.

Continue reading “WebRTC: how to use audio process module?”


1. 下载安装svn客户端,例如TortoiseSVN。安装完后,svn执行目录自动被添加入系统环境变量PATH中。

2. 下载并安装msysgit和Tortoisegit


Tortoisegit安装时会找到git目录并自动配置好。把msysgit中bin目录手动添加到系统环境变量PATH中,比如我的目录是“D:/Program Files/Git/bin”
3. 下载并安装Python,建议安装Python2.6
4. 下载并配置depot_tools
    svn co
5. 建立WebRTC的源码目录
6. 打开cmd,进入第5步建立的源码目录
7. 执行:  gclient config
        或者 gclient.bat config
8. 执行:  gclient sync –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
        或者 gclient.bat sync –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
9. 执行:  gclient runhooks –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
        或者 gclient.bat runhooks –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
10. 源码目录下应该已经含有webrtc.sln
  • webrtc 会用到Windows SDK 7.1,如果不想安装SDK,可以从这里下所依赖的文件:svn co,然后把文件放置在这个路 径:C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses (感谢乐得思蜀的方案)我的系统为Windows 7 32bit,不知为何在第8步只能执行gclient.bat sync –force才成功,直接执行gclient sync –force无法成功。
  • 如果你只安装了Visual Studio 2010,那么在gclient sync –force执行到最后会提示”Do not know how to convert MSVS attribute UseOfMFC”,可能对2010支持还不好,因为我系统里还有Visual Sduidio 2005,所以没有碰到这个问题,但是不用担心,因为最终的webrtc.sln照样会生成的,不影响看代码。
  • 如果遇到git –version return 1错误,应该是git目录没配置到PATH环境变量中,配置好后重启机器。
  • 如果你用的是Visual C++ express,那对不起,你还需要安装一下WinDDK。
  • 如果你碰到下面这个错误,我可以很高兴的告诉你,你的问题跟我碰到的一模一样,不一样的可能是,我花了N长时间才找出原因,你只要看到我这篇文章就可以搞定了。
[code]—— Build started: Project: peerconnection_client, Configuration: Debug Win32 ——
video_render_module.lib(video_render_windows_impl.obj) : error LNK2001: unresolved external symbol _CLSID_DxDiagProvider
video_render_module.lib(video_render_windows_impl.obj) : error LNK2001: unresolved external symbol _IID_IDxDiagProvider
video_render_module.lib(video_render_direct3d9.obj) : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "private: int __thiscall webrtc::VideoRenderDirect3D9::InitializeD3D(struct HWND__ *,struct _D3DPRESENT_PARAMETERS_ *)" (?InitializeD3D@VideoRenderDirect3D9@webrtc@@AAEHPAUHWND__@@PAU_D3DPRESENT_PARAMETERS_@@@Z)
E:\workspace\webtrc\trunk\Debug\peerconnection_client.exe : fatal error LNK1120: 3 unresolved externals</div>

错误原因:安装了错误版本的DirectX SDK,去下载安装Microsoft DirectX SDK (June 2010)



Continue reading “大联网,博融合——科达图像联网解决方案在沈阳安防展大放异彩”




Continue reading “科达远程会诊系统为四川雅安灾区提供远程手术指导”







RTSPPlayer v2.0 launched with ONVIF device supports

Because most of the public online RTSP streaming source are no long availible now, so I decided to
remove most of the preset RTSP streaming sources, change to a configurable user input xml(saved
in /mnt/sdcard/RG4.NET/RTSPPlayer/RTSPPlayer.xml).
And from now on, RTSPPlayer will start to support ONVIF devices. I will also change the app name to
ONVIFPlayer later.

SVN version code: 66

由于原先在RTSP流媒体播放器中的大部分地址已经不复存在,或者无法从外网连接,所以,我把里边的大部分地址都移除掉了。同时为RTSPPlayer增加了可自行通过配置XML来显示流媒体源的功能(XML配置文件存放于sdcard的RG4.NET/RTSPPlayer/RTSPPlayer.xml,通常对应于Android OS的全地址路径为/mnt/sdcard/RG4.NET/RTSPPlayer/RTSPPlayer.xml)。




[wpdm_file id=2 template=”bluebox ” ]

VC++ 2008 Google Test:gtest 测试项目与正式项目分离方案

1、VC++ 环境下测试项目与正式项目混杂的弊端

  • 测试项目和正式项目无法共存
  • 无法独立运行测试项目或者正式项目

图 1 :测试与正式项目混杂


Visual Studio 集成环境并不像 Linux 下的构建方式那样来的方便, 可以直观的使用 Make 或 Auto Tool 构造自己需要的编译方式,让多个项目相互协作,互不干扰。但是, VS 中通过在各个配置界面中的配置,也是可以用简单且很不直观的方式实现测试项目与正式项目的分离。

初始的混杂方案如上图 1 所示,请参考:VC++ 2008 Google Test:gtest 安装与配置 进行项目的创建。接下来进行测试与正式项目的分离。

Continue reading “VC++ 2008 Google Test:gtest 测试项目与正式项目分离方案”



随着智能手机和平板电脑的流行,人们将越来越多地利用这些设备观看电视节目。视频内容提供商估计在未来几 年内高达75%的电视节目将在电视机以外的其他设备上观看。在移动设备和计算机上传输视频的最常用方法是通过互联网、利用下列某种媒体流协议: RTCP,RTMP,HTTP实时流媒体(HTTP Live Streaming),和平滑流媒体(Smooth Streaming)。

Continue reading “某公司的HTTP实时流媒体分析仪”