mplayer

Interaction between expressjs, socket.io and EventEmitter listeners

隐身守侯 提交于 2019-12-12 23:04:11
问题 I have a server setup using expressjs which communicates with the front end clients using socket.io. The server runs on the raspberry pi and provides a backend to control mplayer player for my music library using the mplayer nodejs module. Most of the actions to update the clients on the front end are taken based on events emitted by the mplayer EventEmitter module. For example : When a command to stop the player is issued as player.stop() the EventEmitter instance of the player emits 'stop'

Creating a Motion JPEG frame by frame with variable frame-rate

无人久伴 提交于 2019-12-07 10:21:52
问题 I'm analyzing a number of solutions to the problem that I have in hand: I'm receiving images from a device and I need to make a video file out of it. However, the images arrive with a somewhat random delay between them and I'm looking for the best way to encode this. I have to create this video frame by frame, and after each frame I must have a new video file with the new frame, replacing the old video file. I was thinking of fixating the frame-rate a little "faster" than the minimum delay

简单音乐播放实例的实现,Android Service AIDL 远程调用服务

大憨熊 提交于 2019-12-06 20:10:15
Android Service是分为两种: 本地服务(Local Service): 同一个apk内被调用 远程服务(Remote Service):被另一个apk调用 远程服务需要借助AIDL来完成。 AIDL 是什么 AIDL (Android Interface Definition Language) 是一种IDL 语言,用于生成可以在Android设备上两个进程之间进行进程间通信(interprocess communication, IPC)的代码。如果在一个进程中(例如Activity)要调用另一个进程中(例如Service)对象的操作,就可以使用AIDL生成可序列化的参数。 AIDL IPC机制是面向接口的,像COM或Corba一样,但是更加轻量级。它是使用代理类在客户端和实现端传递数据。 AIDL 的作用 由于每个应用程序都运行在自己的进程空间,并且可以从应用程序UI运行另一个服务进程,而且经常会在不同的进程间传递对象。在Android平台,一个进程通常不能访问另一个进程的内存空间,所以要想对话,需要将对象分解成操作系统可以理解的基本单元,并且有序的通过进程边界。   通过代码来实现这个数据传输过程是冗长乏味的,Android提供了AIDL工具来处理这项工作。 选择AIDL的使用场合 官方文档特别提醒我们何时使用AIDL是必要的

CentOS 7 安装Mplayer视频播放器

ⅰ亾dé卋堺 提交于 2019-12-06 16:09:32
最近想学习Linux平台下做开发,有时候对英文文档的理解还是不透彻,因此一些开的发学习还稍微依赖于视频教程,但是CentOS 7上自带的视频播放工具不是很给力,很多视频格式都没法播放,因此就Google了这么一个玩意儿,作下记录。 一、下载: 1、下载镜像地址:http://www.mplayerhq.hu/MPlayer/ 分别下载: MPlayer-1.1.tar.xz all-20110131.tar.bz2 windows-all-20071007.zip 将all-20110131.tar.bz2 解压到/usr/local/lib/codecs $ tar -zxvf all-20110131.tar.bz2 $ sudo mv all-20110131/ /usr/local/lib/codecs 将windows-all-20071007.zip 解压到 /usr/local/lib/wincodecs $ unzip windows-all-20071007.zip $ sudo mv windows-all-20071007.zip /usr/local/wincodecs 二、编译安装 $ ./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --codecsdir=

Address of a Global Variable in the Heap Address Range

旧巷老猫 提交于 2019-12-06 10:49:23
I was debugging the MPlayer-1.3.0 source code, and I saw a global variable whose address (returned by GDB or even simple printing) was in the range for the heap allocations, instead of the data section. I checked the heap range using procfs . 555555554000-555555834000 r-xp 00000000 08:12 798876 /usr/bin/mplayer 555555a33000-555555b25000 r--p 002df000 08:12 798876 /usr/bin/mplayer 555555b25000-555555b2b000 rw-p 003d1000 08:12 798876 /usr/bin/mplayer 555555b2b000-555556479000 rw-p 00000000 00:00 0 [heap] 7fffc3fff000-7fffc8000000 rw-s 00000000 00:16 1932 /dev/shm/pulse-shm-3887887751 The

Fedora 17 安装后配置

有些话、适合烂在心里 提交于 2019-12-05 23:24:19
2012-5-29 最新版本的fedora17正式版发布了,所有下载方式: http://fedoraproject.org/zh_CN/get-fedora-all 此篇文章由之前"Fedora16安装后配置"改动过来的,再配上个人的使用经历,供fedora爱好者共同参考学习, 其实安装后的配置都差不多的。 1.设置sudo (个人使用习惯, 用 su -c '命令', 也可,跳过) 使用visudo命令或 vi /etc/sudoers ## Allow root to run any commands anywhere root ALL=(ALL) ALL 添加下面内容,goface替换成你的用户名 ‘goface’ ALL=(ALL) ALL 2.更新系统和软件 #yum check-update #yum update 新安装成功后的系统,首先update一下,新安装系统马上有更新的,说明更新的内容修正了系统合成后软件出现的问题, 个人认为很重要的更新,我的电脑安装完好,发现背景亮度无法调节,更新完好修正。 3.安装系统高级配置工具 # yum install gnome-tweak-tool gnome-tweak-tool 当然要装喽 fedora gnome3默认桌面是不能点击的,可使用gnome-tweak-tool解放桌面,添加上“Computer” 等图标

centos 安装视频播放器mplayer

。_饼干妹妹 提交于 2019-12-05 22:28:16
centos 桌面安装mplayer播放器看视频 今天安装上centos 6.3 的 桌面环境来搭配 java开发环境。 完事之后,发现centos6.3 桌面程序应用中的 电视播放器 无法播放AVI 等视频(原来都是命令行) 本身centos 属于服务器系统 对于影音软件的集成 就比较 含蓄来。那我们就使用常用的mplayer 播放器来作为我们的视频播放器吧。 因为我装的系统是 64位的 所以 一下链接 都是64位的 第一: rpm -ivh [url=http://tree.repoforge.org/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm]http://tree.repoforge.org/redhat ... 2.el6.rf.x86_64.rpm[/url] 第二: rpm -Uhv [url=http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm]http://linuxdownload.adobe.com/a ... 64-1.0-1.noarch.rpm[/url] 第三: yum install libdvdcss libdvdread

Centos6.2 安装 mplayer

两盒软妹~` 提交于 2019-12-05 22:28:06
07年的文章,自行匹配最新版本。 1下载安装mplayer需要的各种软件 去这里下载http://www.mplayerhq.hu/MPlayer/ MPlayer-1.0rc1.tar.bz2 (MPlayer-1.0rc2.tar.bz2 这个版本在make的 时候会有问题。最新的rc4正常。) 下载你喜欢的skin 例如你下载 Abyss-1.6.tar.bz2 下载必需的code all-20061022.tar.bz2 windows-all-20060611.zip 2进行安装 (1)安装相信泊解压(code) mkdir /usr/lib/codecs mkdir /usr/lib/wincodecs tar jxvf all-20060611.tar.bz2 mv all-20060611/* /usr/lib/codecs unzip windows-all-20060611.zip mv windows-all-20060611/* /usr/lib/wincodecs (2安装mplayer ar jxvf MPlayer-1.0rc1.tar.bz2 cd MPlayer-1.0rc1 使用这条命令: ./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype -

Creating a Motion JPEG frame by frame with variable frame-rate

懵懂的女人 提交于 2019-12-05 12:01:19
I'm analyzing a number of solutions to the problem that I have in hand: I'm receiving images from a device and I need to make a video file out of it. However, the images arrive with a somewhat random delay between them and I'm looking for the best way to encode this. I have to create this video frame by frame, and after each frame I must have a new video file with the new frame, replacing the old video file. I was thinking of fixating the frame-rate a little "faster" than the minimum delay that I might get and just repeat the last frame until a new one arrives, but I guess that this solution

C语言控制mplayer

梦想的初衷 提交于 2019-12-05 01:37:58
最近使用树莓派的音频播放音频文件(需要外接声卡),自己在网上找一些alsa编程的代码用起来比较复杂,可以是自己设置的原因把,播放时有时会出现杂音。不过这两天看到了一个开源软件mplayer,它的slave模式,可以让你在通过FIFO文件控制它的播放停止和其他功能。这样你就可以通过程序控制mplayer了,甚至可以在它的基础上开发新的软件。这里用的是C语言。今天先立个搞,明天再更。 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include <fcntl.h> #define FIFO "/tmp/myfifo" int main() { char * path = "./test.mp3"; if(mkfifo("/tmp/myfifo",0777)) printf("fifo create error\n"); if(!fork()) { system("mplayer -slave -quiet -input file=/tmp/myfifo ./test.mp3"); exit(0); } else { sleep(10); int fd = open(FIFO, O