How to develop audacious plugin ?
Added by hysteria Wu almost 11 years ago
How to develop audacious plugin ?
Replies (15)
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
What kind of plugin? What do you want it to do?
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
the plugin that can search musics in the specific website
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
Okay, in that case I suggest you start by developing a stand-alone GTK+ program to implement the search function. Once the UI is working and the program can retrieve playable URIs from the website, post the code somewhere and I can help you turn it into a plugin.
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
Okay, I need a few days
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
Hello,I want the plug-in provide a function that can play music online and a function that can add some music in the music list. Some functions have not completed, i must complete this player after translated it to a pulg-in ,please help me to translated it to a pulg-in,thanks.
The sources code is in the https://github.com/hysteria-Wu/Baidu-Downloads
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
Does it compile correctly for you? I get these errors:
http://pastebin.com/raw.php?i=58euHDt3
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
The program haven't any wrong on my computer, I think maybe your computer haven't json library. I have added the json library to the project, tell G++ the path of the library by change the JSON_PATH variable in the makefile.
If my library can't compile on your computer, you can download it by the website http://sourceforge.net/projects/jsoncpp/ .
the new source code are in the attachment
src.tar.gz (286 KB) src.tar.gz |
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
I installed jsoncpp from the Arch Linux repository. Still no go:
http://pastebin.com/raw.php?i=nRJMfjCP
Please don't waste my time. I'm willing to help but not to do your work for you.
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
I'm sorry! The fllowing attachment have removed jsoncpp library.
If still can't compile, so thank you for your help.
I will try to compile into a plug-in, not to bothre you.
Thank you!
src.tar.gz (5.27 KB) src.tar.gz |
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
It compiles fine, but it crashes when I do a search. Take your time and get it working correctly as a standalone search program; then we'll look at converting it into a plugin. Okay?
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffeb0cc700 (LWP 4120)] 0x00007ffff7bcd080 in pthread_kill () from /usr/lib/libpthread.so.0 (gdb) bt #0 0x00007ffff7bcd080 in pthread_kill () from /usr/lib/libpthread.so.0 #1 0x000000000040d4b1 in read_http (arg=0x7d9d00) at network.cc:40 #2 0x00007ffff7bc80a2 in start_thread () from /usr/lib/libpthread.so.0 #3 0x00007ffff3ad032d in clone () from /usr/lib/libc.so.6
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
In my newly installed archLinux test and there is no problem, here is the modified
src.tar.gz (5.7 KB) src.tar.gz |
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
I noticed you are using C signals to communicate between threads. Don't. It won't work in Audacious and would be dangerous even if it did work. If you need to run something in the main thread, use g_idle_add().
RE: How to develop audacious plugin ? - Added by John Lindgren almost 11 years ago
I've added the necessary boilerplate code to make this into an Audacious plugin (and fixed the thread communication). Take a look here:
https://github.com/jlindgren90/audacious-baidu-plugin/commit/ae92642faef1fdb993191285837dd51aed58b90d
Once you have a playable URL, you can just add some code like the following to play it:
#include <audacious/drct.h> const char *url = ... aud_drct_pl_open(url);
RE: How to develop audacious plugin ? - Added by hysteria Wu almost 11 years ago
Thank you very much