[工作點滴] AirVision 2.0 preview on Win7

Before the Chinese Lunar New Year, I got the latest alpha version of the AirVision2. It does not only inherit the pros from previous version but more quick and stable also. I just have some preview here about the installation and main pages showing. After double clicking the windows installer, following the step of installation. When executing the airVision2, there is a windows security information pop up, please make sure the firewall does not block your application. ...

February 18, 2013 · 2 分鐘 · 280 字 · Fran Kuo

[工作點滴] Miracast in surveillance system

Weeks ago, the supplier demo the Miracast function to us and my colleague told me maybe we can think if there are applications for surveillance system. At first I saw nothing special for surveillance application but I may find there is now. Here is a capture picture from the whitepaper of WiFi alliance. Basically, Miracast is a protocol and this means Miracast can be over any kind of infrastructure. However, Miracast connections are expected to be predominantly established between Wi-Fi devices connected with each other directly, without an AP acting as an intermediary. According to the topology, what we can see is a source to a sink and it is a peer-to-peer connection. Go back to the topic we want to talk for surveillance. I plot a picture as follow, and this is just like a traditional surveillance system with cameras, recorder and monitor. ...

February 17, 2013 · 2 分鐘 · 220 字 · Fran Kuo

[工作點滴] pure public or hybrid cloud for surveillance system?

The pure public cloud is no doubt that we build the web services on public and the hybrid combine the private part. According to the information on wiki, the public cloud aka external cloud is related to the service is provided by third party. There is a picture on wiki can describe exactly what we talk about. Basically, there are four deployment models on wiki. The private cloud can’t satisfy the requirements of the surveillance system. We do not talk about the community cloud also because it’s not real on surveillance system. There is a famous network camera company named Dropcam that deployment as pure public cloud system. When we install the the devices, we have to create an account and register them. As I know, Dropcam use the Amazon Web Service as the infrastructure. I just plot some simple block diagrams to describe it. ...

February 16, 2013 · 2 分鐘 · 328 字 · Fran Kuo

[工作點滴] I2S bus channels setting in gstreamer alsasrc plugin

My colleague did some experiments on gstreamer alsasrc and osssrc plugins and he found that alsasrc consume lots of cpu resource(around 16% on the chip we use). He asked me why the test tool that provided from chip vendor is quite efficient(around 1~2%). It was a big gap to me and I started to find why is that. After hours checking, I found that the plugin may cause a busy wait in a while loop when the parameters set to non-blocking mode. I do a simple code modification and execute again but the cpu rate just lower to 12%. I’m a little frustrated about it but still had some enhancement. So I started to try different parameters combination because he told that he found three differences from alsasrc plugin and the test code. 1. The setting of alsasrc is non-block mode but the test code is set to block mode. 2. The channels setting of alsasrc is 1 but the test code is set to 2. 3. The buffer size is limit in test code but alsasrc do not have that limit. For 1: I thought the non-block mode should be much more efficient but the busy wait should change. For 2: This is really weird because when I set the channels to be 2 in alsasrc plugin, the cpu rate become quite low. So I start to wondering if this is the characteristics of the I2S bus. I googled on the internet but did not find any information to describe that we have to set the channels parameter to be 2 in alsasrc plugin of gstreamer when the audio data bus is I2S. So I’ll confirm it later. For 3: I think it’s reasonable to limit the buffer size.

February 8, 2013 · 2 分鐘 · 290 字 · Fran Kuo

[工作點滴] RabbitMQ setup and test

RabbitMQ setup and test Server side: My desktop PC is windows 7 and we download the rabbitmq server from http://www.rabbitmq.com/. The installation guide is here http://www.rabbitmq.com/install-windows.html. I use extra ethernet card and set the ip address to be 192.168.1.19 and make sure the firewall would not block the port 5672. Client side: we put the send and listen on same device. I use the package from https://github.com/alanxz/rabbitmq-c. We can follow the guide in the link to cross build and install on the embedded device we use. ...

February 7, 2013 · 1 分鐘 · 86 字 · Fran Kuo

[工作點滴] The realtime of transport stream on Miracast

When I google the internet with realtime and transport stream, I could not find the information I want. The word ‘realtime’ must construct on the relative thinking. For example, there is camera and screen and the camera’s video can be showed on the screen with quite small latency. We assume the latency is under 150ms or 300ms whatever and we can call this is realtime or not when we can have comparisons. The structure of the transport stream or what we call MPEG-TS is not that simple. What I say is compare with raw encoded media direct push to intermedia. Maybe the transport stream is design for broadcasting usage, so the media stream can be selected and video can be smooth played are much more important than realtime. Because people would not feel any latency happened when they just watch TV. If we want to convert raw encoded media to transport stream. First, we have to packetize the raw encoded media to packetized elementary stream(PES). Second, we handle the PES by the muxing, splitting to small slice AV data…etc to program stream or what we call transport stream. Finally, we send the transport stream to internet or satellite for people to receive and watch it on display. These steps create lots of latency and make us feel it’s not realtime enough. Let’s go back to the definition of the Miracast. It is to convert the raw encoded media stream to transport stream and then encapsulate the stream to RTP. Finally go through the wifi directly to display. I’m not sure how many latency will be created? Maybe someone can tell me.

February 6, 2013 · 2 分鐘 · 271 字 · Fran Kuo

[工作點滴] Airplay, DLNA and Miracast

Today, there is a supplier come to our company to introduce their solution with DLNA and Miracast support. I survey the internet and found three kinds of protocols are discussed on the market. The DLNA has been talked for a long time and Apple is DLNA member originally. But Apple left DLNA and create the proprietary Airplay protocol. The Miracast is created by Wifi Alliance. It seems that Android alliance choose the Miracast to fight with Apple? ...

February 5, 2013 · 1 分鐘 · 78 字 · Fran Kuo

[工作點滴] STL notes

國外工程師用boost c++ library來進行相關專案的開發, 進而看到一些相關的STL語法, 所以還是得抽空K一下相關資料, 至少要把code看懂. From wiki: http://en.wikipedia.org/wiki/Standard_Template_Library The Standard Template Library (STL) is a C++ software library that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functional, and iterators. The STL provides a ready-made set of common classes for C++, such as containers and associative arrays, that can be used with any built-in type and with any user-defined type that supports some elementary operations (such as copying and assignment). STL algorithms are independent of containers, which significantly reduces the complexity of the library. ...

February 5, 2013 · 1 分鐘 · 171 字 · Fran Kuo

[工作點滴] Linux工具小記錄

打patch的command diff -Naur [from-file] [to-file] > [YourFileName.patch] -N In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory. -a Treat all files as text and compare them line-by-line, even if they do not seem to be text. -u Use the unified output format. -r When comparing directories, recursively compare any subdirectories found. SVN版本控制下要移除所有目錄底下.svn $ rm -rf find . -type d -name .svn ...

February 4, 2013 · 1 分鐘 · 86 字 · Fran Kuo

[工作點滴] message pack rpc install on openwrt

Message pack with RPC extension required 3 packages. msgpack msgpack-rpc mpio The msgpack and mpio are required by msgpack-rpc. The following are openwrt makefiles that I use to build the packages. msgpack library include $(TOPDIR)/rules.mk PKG_NAME:=msgpack PKG_VERSION:=0.5.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://msgpack.org/releases/cpp/ PKG_MD5SUM:=705106a9378c792fe22d285dba5c142c PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/msgpack SECTION:=libs CATEGORY:=Libraries TITLE:=Message Pack library URL:=http://msgpack.org endef define Package/msgpack/description MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON but it’s faster and smaller. endef ...

February 4, 2013 · 2 分鐘 · 257 字 · Fran Kuo