No More Than Nothing

Introduction of iOS and OS X Network Programming Cookbook

Recently I got a chance to work on a new project which needs utilize the network, such as HTTP protocol, socket programming, etc.

I was a newbie about this topic, so I found myself a book as the guide book for network programming. It is “iOS and OS X Network Programming Cookbook”.

book title

As the title indicated, it is a cookbook for someone like me, who has the programming basis on OSX/iOS, and wants to take a quick look at the network programming especially.

This book explained how to program in OSX/iOS at several levels, from the lowest BSD socket layer to the highest AFNetworking library.

BSD socket library provides you the lowest level and most flexibility, however this also means you have to everything yourself. If you just want to use the latest HTTP technology, such as json, plist data transferring and analysis, there are better choices on OSX/iOS, such as AFNetworking, MKNetworkKit. These libraries are purely Objective-C, modern designed, and should be much easier to use than BSD library’s C API.

There are also several sample code shown in the book, basically a web server and client implementation is demonstrated, by utilizing each level of technology. These sample code self-explained how to implement the network programming, also help the readers to understand which technology should be their best choice.

How to Turn Off Hardware Accelerated Decoder

| Comments

MPlayerX supports to decode the video with Hardware Accelerated Decoder (HAD). This feature uses your modern GPU to decode video frame, so that free your CPU for other tasks, and decrease the power consumption in the meantime, hopefully.

Currently, there is no easy way to turn on/off the HAD. And ideally, this feature should be transparent to users, and HAD should be always turned on.

However, the development on HAD is still in the preliminary stage, sometimes HAD may fail to decode the frame and even cause MPlayerX’s core crash.

If you found MPlayerX failed to play some H264, MP4, MPEG2, AVC contents, please try the following instructions to turn off HAD.

Mplayer的编译方法

| Comments

网上类似的文章数不胜数,并且有想法自己搞这些开源玩意儿的同学想必水平也应该都在我之上,我本不该多此一举。不过记得当初为了编译出一个能够完全胜任MPlayerX的核心,我还是费了相当一些周折,这些周折如果在网上仔细调查也能得到答案,不过将它们总结到一起的文章,我还没有发现。所以我就做一个搬运工,把它们放到一起供有兴趣的同学翻阅。

我会尽力在我水平之内照顾到这篇文章的通用性,但请恕我精力有限,如果有什么出错的地方请和我联系。

Hidden Settings of MPlayerX

| Comments

Some users want more settings, some users want more simplicity.

I think exposing all the settings in the software and stacking them to the GUI is a bad choice. Not only complicating the GUI is bad, making users make the unimportant choice is even worse.

Well, this is my choice of design.

For who does want some feature which is not available in GUI, you may find it here.

Call MPlayerX Thru Script

| Comments

MPlayerX supports Shell script command line and AppleScript as its integration to the OS.

  • For Shell script

Usage:

In Terminal.app, the command looks like
1
open -a /path/to/MPlayerX.app --args -name1 value1 -name2 value2 ...

About Donation to MPlayerX

| Comments

Recently, many users emailed me about their failure of donation to MPlayerX.

I have conneted to the customer support of Paypal and their answer is

In accordance with applicable laws and regulations, Japanese account user can’t use their account to send donation to any accounts, if you want to use your Japanese account to receive the donation, your account and your group certification will be checked.

Please click the link for solution.

Although I did successfully received the donation for almost 1 year, this year it got banned.

I have made a alternative solution, a BUY button, which you could see in the homepage now. But I’m not sure it is working, since I didn’t test it.