Comments (3)
不是啥大神啊,这部分的静音,暂停功能是@cloverstd做的;
cmd = 'mplayer -slave -input file={fifo} {song_url} >/dev/null 2>&1'
这个 cmd 就是在终端里运行的命令,调用 mplayer, 后台运行
这个 file={fifo}应当是暂停状态保存的位置,具体可以查看 mplayer 手册或者@cloverstd
歌曲信息没有传给管道,传给了self.SUFFIX_SELECTED,它主要在 cli 里负责在界面中显示歌曲信息
from douban.fm.
调用 mplayer 是通过 subprocess 开启一个子进程(我的操作系统学的不好,我是这么理解的),在子进程中执行 mplayer
不是将歌曲信息传递给 fifo,而是将对于 mplayer 的操作从程序主进程传递给子线程中,而要传递信息给子进程有很多方法,maplyer 支持通过 fifo 来传递信息给 maplyer,具体你可以看这个文档
from douban.fm.
@cloverstd @taizilongxu 我大概明白了。是mplayer是子进程,而当前进程与mplayer是通过fifo通信的,主进程将播放指令发给mplayer进程。
from douban.fm.
Related Issues (20)
- 安装报错python setup.py egg_info, Python版本是 2.7.10 HOT 3
- Add proxy server settings for Netease music HOT 3
- master 版本,网易不能播放
- 不能获取歌词... HOT 4
- python-dev和libffi-dev也算是依赖?
- 无法登录 HOT 1
- 坏掉了... HOT 2
- 安装错误 HOT 2
- 当我输入 douban.fm 并且输入 Email和Password之后,为什么跳转到 Hit any key to quit w3m:
- Does this package support Python 3?
- 歌曲没有放完就跳到下一首 HOT 1
- 运行douban.fm 报语法错误,invalid syntax (pycookiecheat.py, line 27) HOT 1
- 运行后终端卡死,无法播放音乐
- doubanfm.exceptions.APIError: list index out of range HOT 1
- No module named 'Queue' HOT 1
- pyobjc-core 安装问题
- invalid syntax HOT 1
- requirments.txt
- max 下报错并一直显示加载歌曲
- 更新出错 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from douban.fm.