foo_lirc plugin, LIRC compatibile remote control plugin! |
foo_lirc plugin, LIRC compatibile remote control plugin! |
Mar 3 2004, 13:00
Post
#1
|
|
|
Group: Members Posts: 7 Joined: 3-March 04 Member No.: 12436 |
Hello!
I want to announce foo_lirc plugin for controlling the FooBar2000 from a remote control. It is in the alpha stage of the development, but it already has the support for this features: - configurable LIRC/WinLIRC server address and port - supported player controls: play, pause, stop, prev.track, next track, track position and volume. The plugin and its source code is available at SourceForge page, you may download binaries from here: foo_lirc binary and sources I'm waiting for comments and list of missing actions Screenshot This post has been edited by levsh: Mar 3 2004, 13:01 |
|
|
|
![]() |
Aug 1 2004, 19:44
Post
#2
|
|
|
Group: Members Posts: 3 Joined: 1-August 04 Member No.: 15947 |
ding-ding, bug report here!
Well, may be I'm the last man on Earth still using eons ancient W95OSR2, but foo_lirc has problems under this OS-alike. First, if i close and restart WinLIRC while foo_lirc is enabled and then press 'Connect' - fb2k crashes badly, often with the pitiful w95 If i set `enable` off then on and press 'Connect' - it is ok. As i can see, that's because of setting a hook in StartLircClient() when StopLircClient was not called and the hook is already hooked. The simplest solution I see is to keep a flag like HookSet and act accordingly not to try set hook twice. That was simple. Now to the sad part: The plugin does nothing in my case! It configures perfectly, seeing all commands from WinLIRC and highlighting assigned actions. But besides that it does nothing. Spy++ shows those 'DEAD FEED' messages pass to fb2k main window. It is something with those hooks too, I feel it BTW, is all this hooking The Only Right Way, or it can be done more straightly? slight offtopic The only reason I keep windows on that ancient box for - fb2k. Digged the net many times, coudn't find nothing comparable to it. But don't expect me to buy a new box with bloody XP inside just to control fb2k with remote. This post has been edited by jay7: Aug 1 2004, 20:26 |
|
|
|
Aug 2 2004, 06:04
Post
#3
|
|
|
Group: Members Posts: 333 Joined: 1-February 03 Member No.: 4829 |
QUOTE (jay7 @ Aug 2 2004, 04:44 AM) ding-ding, bug report here! OH NO!S!1 I'll have a look when I get a chance. Most of my "bugfixes" have just been hacks on existing code, so I'll take the time to rewrite it in the next few days. QUOTE BTW, is all this hooking The Only Right Way, or it can be done more straightly? There are definitely better/easier ways to do it. Posting messages to the main foobar window is pretty dodgy. PS. come on, at least upgrade to an OS thats still supported by MS |
|
|
|
Aug 3 2004, 21:59
Post
#4
|
|
|
Group: Members Posts: 3 Joined: 1-August 04 Member No.: 15947 |
QUOTE (Phi @ Aug 2 2004, 08:04 AM) OH NO!S!1 I'll have a look when I get a chance. Most of my "bugfixes" have just been hacks on existing code, so I'll take the time to rewrite it in the next few days. Oh, I'm really sorry to bother you, but it's definitely unreal to run MSVC++ on my p1-166. There's no need to rewrite, just several fixes. QUOTE (Phi @ Aug 2 2004, 08:04 AM) There are definitely better/easier ways to do it. Posting messages to the main foobar window is pretty dodgy. Then let's take away all those hooks! patch can be as following, although I can't check it CODE *** foo_lirc.cpp.old Tue Jun 29 15:40:42 2004
--- foo_lirc.cpp Tue Aug 03 23:55:22 2004 *************** *** 32,38 **** bool config_mode; HWND hConfigWindow; HWND hMainWindow; - HHOOK lirc_hook; static HWND status_wnd; --- 32,37 ---- *************** *** 129,135 **** } else { ! SendMessage(hMainWindow, WM_REMOTE_KEY, 0xDEAD, 0xFEED); } } } --- 128,134 ---- } else { ! g_actions.process_keypress(lirc.key_name); } } } *************** *** 331,348 **** static cfg_action g_actions("Assigned actions"); - LRESULT CALLBACK LircHook(int nCode, WPARAM wp, LPARAM lp) - { - PCWPSTRUCT msg; - msg = (PCWPSTRUCT)lp; - - if (nCode == HC_ACTION && msg->message == WM_REMOTE_KEY && - msg->wParam == 0xDEAD && msg->lParam == 0xFEED) - { - g_actions.process_keypress(lirc.key_name); - } - return CallNextHookEx(lirc_hook, nCode, wp, lp); - } bool StartLircClient() { --- 330,335 ---- *************** *** 355,366 **** return false; } - lirc_hook = SetWindowsHookEx(WH_CALLWNDPROC, LircHook, NULL, GetCurrentThreadId()); - if(lirc_hook == NULL) { - MessageBox(hMainWindow, "Failed to set Hook", szAppName, MB_OK); - return false; - } - lirc.thread_id = _beginthread(LircClient, 0, &lirc.socket); if(lirc.thread_id == -1) { MessageBox(NULL, "Failed to create thread, foo_lirc will be disabled.", szAppName, MB_OK); --- 342,347 ---- *************** *** 371,377 **** void StopLircClient() { - UnhookWindowsHookEx(lirc_hook); lirc.client_running = false; } --- 352,357 ---- |
|
|
|
Aug 4 2004, 04:30
Post
#5
|
|
|
Group: Members Posts: 333 Joined: 1-February 03 Member No.: 4829 |
QUOTE (jay7 @ Aug 4 2004, 06:59 AM) QUOTE (Phi @ Aug 2 2004, 08:04 AM) OH NO!S!1 I'll have a look when I get a chance. Most of my "bugfixes" have just been hacks on existing code, so I'll take the time to rewrite it in the next few days. Oh, I'm really sorry to bother you, but it's definitely unreal to run MSVC++ on my p1-166. There's no need to rewrite, just several fixes. It's no bother, I've actually already done most of the work. QUOTE Then let's take away all those hooks! Well, the whole point of posting messages to the main window (and hooking it to intercept them) was to ensure that process_keypress() (and subsequently, menu_manager::run_command()) was called from the main thread. I'm not sure how mm::run_command() actually works, and whether its safe to call it from the socket thread as you have done here. Anyway, I've rewritten the code to use an asynchronous socket so this won't be an issue in the next release. |
|
|
|
levsh foo_lirc plugin Mar 3 2004, 13:00
seanyseansean Nice, i'm going to try this with my ATI AIW to... Mar 3 2004, 15:52
Johncan I use IRMan as my IR receiver with a Sony remote. ... Mar 4 2004, 03:28
levsh John, you may try to use the SlyControl (detailed ... Mar 4 2004, 08:58
Phi Thanks levsh , this should be very handy when I ge... Mar 4 2004, 11:10
dano thx levsh, it works well for me
yes, Phi's sug... Mar 4 2004, 14:17
seanyseansean QUOTE (seanyseansean @ Mar 3 2004, 02:52 PM)N... Mar 4 2004, 14:27
foosion QUOTE (Phi @ Mar 4 2004, 11:10 AM)P.S. About ... Mar 4 2004, 16:10
Phi QUOTE (foosion @ Mar 5 2004, 02:10 AM)QUOTE (... Mar 5 2004, 02:10
Linkin thanks a lot for this great plugin! it is exac... Mar 5 2004, 09:10
cryptAWD Thanks for this plugin. This is something I've... Mar 9 2004, 04:26
levsh QUOTE P.S. About the SDK, I know its possible to g... Mar 9 2004, 20:39
levsh QUOTE (Phi @ Mar 4 2004, 02:10 AM)P.S. About ... Mar 9 2004, 22:15
Phi QUOTE (levsh @ Mar 10 2004, 06:39 AM)QUOTE P.... Mar 10 2004, 01:15
foosion QUOTE (levsh @ Mar 9 2004, 10:15 PM)I haven... Mar 10 2004, 02:32
Phi I think I'm finally ready to release my versio... Mar 13 2004, 15:38
levsh QUOTE (Phi @ Mar 13 2004, 06:38 AM)Plugin: fo... Mar 14 2004, 10:34
Phi QUOTE (levsh @ Mar 14 2004, 08:34 PM)QUOTE (P... Mar 15 2004, 08:41
levsh QUOTE (Phi @ Mar 14 2004, 11:41 PM)QUOTE (lev... Mar 15 2004, 13:39
Phi QUOTE (levsh @ Mar 15 2004, 11:39 PM)Is it ok... Mar 16 2004, 00:27
Linkin Hi,
I am using the columns_ui and if I had the li... May 28 2004, 21:34
bleh No, it's a bug in foo_lirc. The way foo_lirc ... May 28 2004, 23:03
dano I have the same problem as Linkin, but what I noti... May 29 2004, 02:06
Phi QUOTE (dano @ May 29 2004, 11:06 AM)Kind of w... May 29 2004, 08:31
Linkin thanks a lot phi! May 29 2004, 09:36
seanyseansean QUOTE (Phi @ May 29 2004, 07:31 AM)but I didn... May 29 2004, 13:35
dano Thanks for recompiling Phi
But I have a problem wi... May 29 2004, 14:00
Phi QUOTE (dano @ May 29 2004, 11:00 PM)When I us... May 29 2004, 16:00
Phi QUOTE (Phi @ May 30 2004, 01:00 AM)The proble... May 29 2004, 16:15
dano That's great Phi, thanks for your extra effort... May 29 2004, 17:56
Phi foo_lirc 0.2.2allows an action to be tagged ... Jun 5 2004, 11:40
Safrax Whenever Foobar 2000 starts up, foo_lirc doesnt au... Jun 26 2004, 16:59
Phi QUOTE (Safrax @ Jun 27 2004, 01:59 AM)Wheneve... Jun 27 2004, 06:13
Phi foo_lirc 0.2.3now connects at start-up like it... Jun 29 2004, 14:02
Linkin thanks...you're the best Jun 29 2004, 14:05
Phi QUOTE (Linkin @ Jun 29 2004, 11:05 PM)thanks.... Jun 29 2004, 14:10
Phi QUOTE (Phi @ Aug 4 2004, 01:30 PM)Anyway, I... Aug 6 2004, 16:21
Linkin thx Phi
I appreciate your work Aug 7 2004, 11:57
Phi QUOTE (Linkin @ Aug 7 2004, 08:57 PM)thx Phi
... Aug 8 2004, 06:43
jay7 Hooray, it works!
grabbed 0.3.1 and now I... Aug 10 2004, 23:24
SBeaver How do I set a button to scroll around in the play... Aug 22 2004, 15:49
Phi Yeah, unfortunately there are no standard commands... Aug 23 2004, 14:18
Betse I know this is a bump from nowhere, but i really l... Feb 13 2005, 21:28
Spi wow, i didn't know of foo_lirc > 0.2 ;(
i ... Mar 20 2006, 22:53
Betse I've got to support you on that one Foobar ju... Mar 21 2006, 12:32
cirrus Yeah. I really cant live w/o my remote. Anyone kno... Apr 5 2006, 21:08
NeXT Yes, please, somebody port it.. May 6 2006, 19:39
Duble0Syx I haven't switched to 0.9.x yet since I can... May 6 2006, 19:49
neomcnasty Hi, I also haven't finally swiched to foobar20... May 8 2006, 12:35
wazoo_999 Here is the ported version.
I haven't used nei... May 10 2006, 10:01
Betse Looks good, although i can't actually test it.... May 10 2006, 17:04
SBeaver It works very well!
I got all my buttons worki... May 10 2006, 20:28
Duble0Syx Wow, thank you! Just installed this and it wo... May 10 2006, 21:08
Spi works fine for my needs .... thx very much May 11 2006, 02:53
lanosk Seems pretty good to me, so far... thanks tons... May 13 2006, 23:49
neomcnasty Hi, first thanks a lot for porting the plugin to 0... May 14 2006, 19:54
wazoo_999 Hi,
Fixed this issue in version 0.4.1, update is ... May 16 2006, 08:15
Shaun_ Does anyone know if it's possible to include k... Jun 29 2006, 12:36
radish I seem to be having trouble using this plugin.
The... Jul 14 2006, 15:22
Betse QUOTE (radish @ Jul 14 2006, 16:22) [..]
... Jul 15 2006, 09:43
Squeller Maybe some girder geek in here: I use the latest f... Oct 17 2006, 17:31
Squeller Solved it with a simple states toggle and by enabl... Oct 17 2006, 18:31
MrEnergizer Thanks a lot Phi.
Is working great with my ATI Won... Dec 25 2006, 03:42
MrEnergizer *bump*
Further to above post. Any ideas on adding ... Jan 8 2007, 15:57
wazoo_999 I''ll add the context menus to the list of... May 16 2007, 11:02
MrEnergizer [quote name='wazoo_999' date='May 16 2... May 21 2007, 11:58
MrEnergizer ~bump~
Hi Wazoo. Still waiting on the context men... Jun 5 2007, 16:11
wazoo_999 Hi All,
the update is at the usual place. I'm... Jun 28 2007, 11:27
MrEnergizer Firstly wazoo thx for the update....
Sorry to keep... Jul 13 2007, 16:14
Dave_Scream QUOTE (MrEnergizer @ Jul 13 2007, 09:14) ... Feb 22 2011, 11:04
edwardar I just got an ATI remote wonder plus - thanks for ... Jan 24 2008, 23:19
askoff Does foo_lirc work with the latest foobar 0.9.5.5 ... Aug 17 2008, 19:27
YoG It doesnt seem to work with the latest Foobar beta... Dec 22 2009, 12:36
faguriga Foo_lirc_0.5.0a_bin.zip works with foobar v1.0 . Jan 14 2010, 16:43
IRoN if someone have latest sources or can download the... Feb 1 2010, 18:28
YoG Great plugin.. the latest version seemed to work w... Jun 26 2010, 12:00
YoG Well, to be more specific: It doesnt work with som... Jun 26 2010, 12:35
fishgrit I have just upgraded to V1.1 and Foo_lirc no longe... Sep 16 2010, 22:00
YoG See the link above... 0.5 works ok.. dont touch yo... Sep 24 2010, 16:50
th0m Could someone please upload version 0.5.0 to some ... Mar 30 2012, 22:07
Jani Here's the 0.5.0a version for anyone in need: ... Mar 3 2013, 19:43![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 16:31 |