mplayer 编译指南
一 安装编译环境:
$ sudo apt-get install manpages-dev
$ sudo apt-get install autoconf
$ sudo apt-get install automake
$ sudo apt-get install libtool
$ sudo apt-get install flex
$ sudo apt-get install bison
$ sudo apt-get install gcc-doc
$ sudo apt-get install g++
$ sudo apt-get install x-window-system-dev
$ sudo apt-get install libgtk1.2-dev
$ sudo apt-get install libpng-dev
二 建立安装目录:
$ mkdir /usr/local/bin/mplayer_install
$ cd /usr/local/bin/mplayer_install
三 下载最新的源代码:
$ wget http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre7try2.tar.bz2
$ wget http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20050412.tar.bz2
$ wget http://www1.mplayerhq.hu/MPlayer/Skin/Blue-1.4.tar.bz2
四 解压缩源代码,编译并安装:
$ tar -xjf essential-20050412.tar.bz2
$ sudo mkdir -p /usr/local/lib/codecs
$ sudo cp essential-20050412/* /usr/local/lib/codecs/
$ tar -xjf MPlayer-1.0pre7try2.tar.bz2
$ cd MPlayer-1.0pre7try2
$ ./configure –enable-gui
$ make
$ sudo make install
$ tar -xjf Blue-1.4.tar.bz2
$ sudo mkdir -p /usr/local/share/mplayer/Skin/default
$ sudo cp -r Blue/* /usr/local/share/mplayer/Skin/default/
$ sudo cp MPlayer-1.0pre7try2/etc/* /usr/local/etc/mplayer/
五 建立默认的配置文件:
$ vim ~/.mplayer/config
文件内容如下:
## Audio drivers
## Ubuntu uses esd by default.
## These are only mentioned for the sake of completion.
ao=esd
#ao=oss
#ao=alsa
#ao=arts
######
现在就可以使用 mplayer ime_na_file.avi -sub subtitri.srt 来播放了。
Administrator i.t.
If you are a Debian-based GNU/Linux user, then you’re probably familiar
with synaptic and apt-get to install application from software
repositories. This post focussed on how to use apt-get/synaptic behind
proxy server/firewall which under normal circumstances, you’re unable to
use apt-get.
If you’re using Synaptic
Open up your Synaptic package manager (usually as root), go to
Settings-> Preference -> Network. Enter your proxy server details
like : username:password@proxyserver.net, and put the proxy server port
(usually 8080).
If you’re using command-line apt-get
Edit your /etc/bash.bashrc file as root.
Put these line at the end of your /etc/bash.bashrc file :
export http_proxy=http://username:password@proxyserver.net:port/
export ftp_proxy=http://username:password@proxyserver.netport/
You can omit the username:password, if your proxy server has no
password. That’s all for today! Happy apt-get-ing!
Administrator i.t.
1.ArrayList有点像动态数组。
2.集合:实现System.Collections.IEnumerable。
3.IEnumerable实现一个方法GetEnumerator,返回IEnumerator。
4.Ienumerator有三个成员,current返回集合中的当前对象;MoveNext方法:移动到集合的下一元素上,如果成功下移,返回true,如果已过最后一个元素,返回false;Reset方法:移动到第一个元素前面(注意不是第一个!)。
5.如果键是字符串,可用System.Collections.Specialized.StringDictionary来代替Hashtable。
6.在字典使用内部算法时,如果容量是一个素数,它们的工作效率最高。
7.如果A.Equals(B)是True,则A.GetHashCode()和B.GetHashCode()必须返回相同的散列。
8.一般来说,做键的对象都要重写Equals()和GetHashTable(),因为System.Object.Equals()仅比较引用,GetHashTable()会根据对象的地址返回一个散列。则只有键是相同的对象时,才是相等的。
9.Microsoft已经为String类提供了一种虽然复杂、但很有效的散列算法。如果要自己设计散列算法,有一个简单方法,把对象中表示对象唯一性的成员字段们的数字乘以不同的素数再加起来。
Technorati : .NET, C#
Administrator i.t.
1.System.String类进行文字处理,效率不佳。System.Text.StringBulider更适合文字处理。
2.IFormattable接口,自定义格式化字符串。
3.正则表达式和Jscript的正则表达式类似。规则较繁,用时再查MSDN。
Technorati : .NET, C#
Administrator i.t.
1.stack存储值数据类型,heap存储引用数据类型。
2.引用分配在stack上,而引用所对应的实例分配在heap上。
3.垃圾收集器在释放了它能释放的所有对象后,就会压缩其他对象,把他们都移动回heap的端部,再次形成一个连续的块。
4.有析构函数的对象需要垃圾收集器两次处理才能删除:第一次调用析构函数时,没有删除对象,第二次调用才真正删除对象。
5.由于垃圾收集器的工作方式,无法确定C#对象的析构函数何时执行。
6.可实现IDisposable接口的Dispose()来显示释放由对象使用的所有未托管资源。
7.要用指针,请先用unsafe标记。Unsafe可以标记方法、类、结构、成员和代码块,但不能标记局部变量。
8.C#中int* pX,pY等价于C++中 int *pX,*pY。
9.不允许针对void指针执行算术运算。
10.sizeof只能用于不安全代码块,且不能对类使用。
11.不能创建指向类的指针,这是因为垃圾收集器不包含指针的任何信息,只包含引用的信息,因此创建指向类的指针会使垃圾收集器不能正常工作。
12.int* pX = &(myObject.X);这样的表达式是错误的,因为在垃圾收集的过程中,垃圾收集器会把myClass移动到内存的一个新单元,这样,pX会指向错误的存储单元。解决方法是使用fixed关键字。fixed(int* pX=&(myObject.X))(//do something}。这样,垃圾收集器知道,在执行fixed块的代码是,不能移动myObject对象。
13.创建基于stack的数组。int* pInt = stackalloc int [10];
Technorati : .NET, C#
Administrator i.t.
Recent Comments