自己写 的一个音乐播放器

由本社区发起的开源项目
回复
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

自己写 的一个音乐播放器

#1

帖子 windwhinny » 2009-02-12 19:04

新版本在这里http://forum.ubuntu.com.cn/viewtopic.php?f=137&t=211066&sid=eee330b15c6f8e79d5bd964bfc4b0d36
特点:
打开后播放上次关闭时的歌曲.
内置均衡器.
可以最小化到系统托盘播放.
支持播放列表,双击播放列表即可播放.
鼠标放在托盘图标上即可以显示歌曲信息,如歌手名,专辑名.
点击托盘里的图标,直接就播放下一首.
可以添加文件夹里的全部音乐文件或者单独添加音乐文件.
支持的格式有mp3,wma,flac,cda,mid,midi,mp4,ogg,wav,acc(xine必须安装相应的解码器才能播放,mp3的插件为libxine1-ffmpeg.
有迷你窗口功能,迷你窗口显示在屏幕中上方,可以移动
按照不同歌手或者专辑播放歌曲.可以简单的编辑播放列表.
可以显示千千静听网站上的歌词
占用资源小,最小化播放时,占用的内存为6MB,显示主窗口时10MB,显示播放列表时13MB.
已经解决乱码问题.可以同时显示UTF8和GBK编码.但只支持mp3的标签

欢迎大家试用改善.......
如果程序非正常退出,请把终端信息贴出来..谢谢..
另外歌词显示用的是implayer的代码.
显示歌词的BUG比较多,很麻烦的说,我有时间再修复吧...
2009.2.24更新,可以动态显示歌词了!
上次由 windwhinny 在 2009-06-18 18:24,总共编辑 54 次。
头像
linlee
帖子: 1132
注册时间: 2007-10-20 11:30

Re: 自己写 的一个音乐播放器

#2

帖子 linlee » 2009-02-12 22:35

嗯,强烈支持! :em11
头像
lerosua
论坛版主
帖子: 8455
注册时间: 2007-11-29 9:41
联系:

Re: 自己写 的一个音乐播放器

#3

帖子 lerosua » 2009-02-12 23:08

都不喜欢放源码的啊?
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器

#4

帖子 windwhinny » 2009-02-13 14:32

lerosua 写了:都不喜欢放源码的啊?
附件里不是写的有嘛 "和源代码"
头像
yingtianli
帖子: 631
注册时间: 2008-09-20 14:27

Re: 自己写 的一个音乐播放器

#5

帖子 yingtianli » 2009-02-13 15:34

支持原创,先用用看。 :em02 :em02
头像
lerosua
论坛版主
帖子: 8455
注册时间: 2007-11-29 9:41
联系:

Re: 自己写 的一个音乐播放器

#6

帖子 lerosua » 2009-02-13 16:48

windwhinny 写了:
lerosua 写了:都不喜欢放源码的啊?
附件里不是写的有嘛 "和源代码"
sorry,没看到。真诚的倒歉。
头像
追疯少年
帖子: 950
注册时间: 2008-03-13 23:37
联系:

Re: 自己写 的一个音乐播放器

#7

帖子 追疯少年 » 2009-02-13 17:52

牛X!!!
支持!!!!
头像
追疯少年
帖子: 950
注册时间: 2008-03-13 23:37
联系:

Re: 自己写 的一个音乐播放器

#8

帖子 追疯少年 » 2009-02-13 17:54

怎么安装呢?
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器

#9

帖子 windwhinny » 2009-02-13 17:55

追疯少年 写了:怎么安装呢?
在源代码目录输入"sudo sh ./install.sh"
上次由 windwhinny 在 2009-02-14 21:11,总共编辑 1 次。
头像
Lavande
论坛版主
帖子: 5352
注册时间: 2008-12-21 15:27
来自: TARDIS

Re: 自己写 的一个音乐播放器

#10

帖子 Lavande » 2009-02-13 18:06

顶! :em11
对于播放器,我最关心的两个功能就是:
1:媒体库可以按照硬盘里存放歌曲的目录结构排列显示歌曲列表
2:自动下载并显示歌词

目前还没发现有这样的播放器(foobar不算,因为还要插件才显示歌词)
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器

#11

帖子 windwhinny » 2009-02-13 18:28

techone1 写了:顶! :em11
对于播放器,我最关心的两个功能就是:
1:媒体库可以按照硬盘里存放歌曲的目录结构排列显示歌曲列表
2:自动下载并显示歌词

目前还没发现有这样的播放器(foobar不算,因为还要插件才显示歌词)
可以自己写嘛... 歌词可以从千千静听的网站下载~:em09
kevin_sky
帖子: 33
注册时间: 2009-02-03 15:16

Re: 自己写 的一个音乐播放器

#12

帖子 kevin_sky » 2009-02-13 18:33

牛年支持牛人!!! :em05
头像
Lavande
论坛版主
帖子: 5352
注册时间: 2008-12-21 15:27
来自: TARDIS

Re: 自己写 的一个音乐播放器(每日多次更新)

#13

帖子 Lavande » 2009-02-14 14:15

可以自己写嘛... 歌词可以从千千静听的网站下载~
努力学习中……其实我目前学编程纯粹是为了写一个适合自己的播放器 :em03
头像
追疯少年
帖子: 950
注册时间: 2008-03-13 23:37
联系:

Re: 自己写 的一个音乐播放器

#14

帖子 追疯少年 » 2009-02-14 19:43

windwhinny 写了:
追疯少年 写了:怎么安装呢?
在源代码目录输入"make",然后"./project"就可以运行拉
make的时候就出错了 :em20 :em20

代码: 全选

root@jia-laptop:~# cd /root/桌面/player
root@jia-laptop:~/桌面/player# make
gcc main.c -g -c `pkg-config --cflags gtk+-2.0`
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
main.c:1:20: 错误: gtk/gtk.h:没有该文件或目录
在包含自 main.c:3 的文件中:
eggtrayicon.h:24:25: 错误: gtk/gtkplug.h:没有该文件或目录
eggtrayicon.h:25:22: 错误: gdk/gdkx.h:没有该文件或目录
In file included from main.c:3:
eggtrayicon.h:36: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
eggtrayicon.h:41: 错误: expected specifier-qualifier-list before ‘GtkPlug’
eggtrayicon.h:56: 错误: expected specifier-qualifier-list before ‘GtkPlugClass’
eggtrayicon.h:59: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘egg_tray_icon_get_type’
eggtrayicon.h:61: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
eggtrayicon.h:63: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘egg_tray_icon_get_orientation’
In file included from /usr/include/stdlib.h:33,
                 from main.c:4:
/usr/lib/gcc/i486-linux-gnu/4.2.4/include/stddef.h:326: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
In file included from main.c:4:
/usr/include/stdlib.h:782: 错误: expected ‘)’ before ‘*’ token
/usr/include/stdlib.h:786: 错误: expected declaration specifiers or ‘...’ before ‘wchar_t’
/usr/include/stdlib.h:790: 错误: expected ‘)’ before ‘*’ token
/usr/include/stdlib.h:794: 错误: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
main.c:6:17: 错误: xine.h:没有该文件或目录
In file included from main.c:7:
main.h:4: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.h:5: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.h:7: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.h:10: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from main.c:8:
play.h:10: 错误: expected ‘)’ before ‘*’ token
play.h:12: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
play.h:13: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
play.h:14: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
play.h:15: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from main.c:9:
picture.h:7: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘picture’
In file included from main.c:10:
window.h:4: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
window.h:16: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
window.h:18: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
window.h:22: 错误: ‘PATH_MAX’未声明 (不在函数内)
window.h:26: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from main.c:11:
player_icon.h:7: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘player_icon’
main.c: 在函数‘quit’中:
main.c:24: 错误: ‘stream’未声明 (在此函数内第一次使用)
main.c:24: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
main.c:24: 错误: 所在的函数内也只报告一次。)
main.c:37: 警告: 内建函数 ‘sprintf’ 不兼容的隐式声明
main.c:44: 警告: 从不兼容的指针类型赋值
main.c: 在函数‘window_show’中:
main.c:50: 错误: ‘window’未声明 (在此函数内第一次使用)
main.c: 在文件层:
main.c:52: 错误: expected ‘)’ before ‘*’ token
main.c: 在函数‘creat_menu’中:
main.c:60: 错误: ‘GtkMenuItem’未声明 (在此函数内第一次使用)
main.c:60: 错误: ‘item’未声明 (在此函数内第一次使用)
main.c:61: 错误: ‘menu’未声明 (在此函数内第一次使用)
main.c:67: 错误: ‘GTK_STOCK_MEDIA_PREVIOUS’未声明 (在此函数内第一次使用)
main.c:72: 错误: ‘item_pause’未声明 (在此函数内第一次使用)
main.c:72: 错误: ‘GTK_STOCK_MEDIA_PAUSE’未声明 (在此函数内第一次使用)
main.c:76: 错误: ‘item_play’未声明 (在此函数内第一次使用)
main.c:76: 错误: ‘GTK_STOCK_MEDIA_PLAY’未声明 (在此函数内第一次使用)
main.c:80: 错误: ‘GTK_STOCK_MEDIA_NEXT’未声明 (在此函数内第一次使用)
main.c:85: 错误: ‘GTK_STOCK_QUIT’未声明 (在此函数内第一次使用)
main.c: 在函数‘main’中:
main.c:92: 错误: ‘GtkWidget’未声明 (在此函数内第一次使用)
main.c:93: 错误: ‘image’未声明 (在此函数内第一次使用)
main.c:94: 错误: ‘eventbox’未声明 (在此函数内第一次使用)
main.c:95: 错误: ‘GdkPixbuf’未声明 (在此函数内第一次使用)
main.c:95: 错误: ‘tray_icon’未声明 (在此函数内第一次使用)
main.c:97: 错误: ‘icon’未声明 (在此函数内第一次使用)
main.c:98: 错误: ‘window_icon’未声明 (在此函数内第一次使用)
main.c:98: 错误: ‘player_icon’未声明 (在此函数内第一次使用)
main.c:98: 错误: ‘FALSE’未声明 (在此函数内第一次使用)
main.c:99: 错误: ‘picture’未声明 (在此函数内第一次使用)
main.c:104: 错误: ‘show_menu’未声明 (在此函数内第一次使用)
main.c:107: 错误: ‘tips’未声明 (在此函数内第一次使用)
main.c:111: 错误: ‘GtkFunction’未声明 (在此函数内第一次使用)
main.c:111: 错误: expected ‘)’ before ‘auto_play’
make: *** [main.o] 错误 1
root@jia-laptop:~/桌面/player# 
头像
windwhinny
帖子: 618
注册时间: 2007-09-26 17:34

Re: 自己写 的一个音乐播放器(每日多次更新)

#15

帖子 windwhinny » 2009-02-14 21:10

回14楼
源代码我已经更新了,用了新的安装方法,请重新下载.......
回复