IPB

Welcome Guest ( Log In | Register )

4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic
foo_lirc plugin, LIRC compatibile remote control plugin!
seanyseansean
post May 29 2004, 13:35
Post #26





Group: Members (Donating)
Posts: 487
Joined: 12-August 02
From: Cheltenham, UK
Member No.: 3029



QUOTE (Phi @ May 29 2004, 07:31 AM)
but I didn't bother recompiling foo_lirc as I figured noone was using it.

Ooooh wrong, I definitely use it with my ATI Remote.

Thanks for the update smile.gif
Go to the top of the page
+Quote Post
dano
post May 29 2004, 14:00
Post #27





Group: Members (Donating)
Posts: 395
Joined: 2-March 04
Member No.: 12414



Thanks for recompiling Phi
But I have a problem with your 0.2 version:
When I use "Playback/Next" or "Playback/Previous" via my remote it will skip one track and go 2 tracks further instead of only one (happens about every second time).
This did not happen with version 0.1, or maybe it is a problem of my remote receiver, it is not working so good anymore sad.gif
Go to the top of the page
+Quote Post
Phi
post May 29 2004, 16:00
Post #28





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (dano @ May 29 2004, 11:00 PM)
When I use "Playback/Next" or "Playback/Previous" via my remote it will skip one track and go 2 tracks further instead of only one (happens about every second time).
This did not happen with version 0.1, or maybe it is a problem of my remote receiver, it is not working so good anymore sad.gif

Hi dano,

This is probably foo_lirc's fault. There is a repeat rate field that WinLirc sends to foo_lirc when you hold down a remote button, but at the moment version 0.2 is ignoring it, so you get the command executed once for each repeat. I guess this is what is happening in your case.

The problem is, since this is actually useful for certain commands (like volume or seek for instance), I can't just ignore repeated presses. Version 0.1 had only a few hardcoded commands, so levsh could specify which commands needed to allow repeats and which didn't. Now that I've added arbitrary commands it becomes a little more complicated.

I'm a little busy studying right now, but when I get time I'll work something out to fix it. I'm thinking a checkbox next to each command that you assign (along the lines of "allow repeats") would probably be the best solution.

QUOTE (seanyseansean @ May 29 2004, 10:35 PM)
Ooooh wrong, I definitely use it with my ATI Remote.

Thanks for the update smile.gif

No Problem. I'm glad people are putting it to good use smile.gif
Go to the top of the page
+Quote Post
Phi
post May 29 2004, 16:15
Post #29





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (Phi @ May 30 2004, 01:00 AM)
The problem is, since this is actually useful for certain commands (like volume or seek for instance), I can't just ignore repeated presses.

Well, I guess I can until I have a better solution...

foo_lirc-no_repeat.zip

This version ignores repeats so it should fix your problems with skipping too many tracks if you can live without sane volume/seek control for a while wink.gif
Go to the top of the page
+Quote Post
dano
post May 29 2004, 17:56
Post #30





Group: Members (Donating)
Posts: 395
Joined: 2-March 04
Member No.: 12414



That's great Phi, thanks for your extra effort. smile.gif
Go to the top of the page
+Quote Post
Phi
post Jun 5 2004, 11:40
Post #31





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



foo_lirc 0.2.2
  • allows an action to be tagged "repeatable" (holding down a remote button repeats the assigned command)
  • fixes infinite loop bug when LIRC is closed unexpectedly
foo_lirc-0.2.2.zip
foo_lirc-0.2.2-src.zip

Let me know if anything isn't working right.
Go to the top of the page
+Quote Post
Safrax
post Jun 26 2004, 16:59
Post #32





Group: Members
Posts: 4
Joined: 7-December 03
Member No.: 10264



Whenever Foobar 2000 starts up, foo_lirc doesnt automatically connect to the WinLIRC server. I must manually go into the preferences dialog and put a tick in enabled before it will start.
Go to the top of the page
+Quote Post
Phi
post Jun 27 2004, 06:13
Post #33





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (Safrax @ Jun 27 2004, 01:59 AM)
Whenever Foobar 2000 starts up, foo_lirc doesnt automatically connect to the WinLIRC server.  I must manually go into the preferences dialog and put a tick in enabled before it will start.

Thats what I get for maintaining a component that I don't actually use wink.gif

I'll release a fix in the next few days or so.
Go to the top of the page
+Quote Post
Phi
post Jun 29 2004, 14:02
Post #34





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



foo_lirc 0.2.3
  • now connects at start-up like it's supposed to
foo_lirc-0.2.3.zip
foo_lirc-0.2.3-src.zip

This post has been edited by Phi: Jun 29 2004, 14:03
Go to the top of the page
+Quote Post
Linkin
post Jun 29 2004, 14:05
Post #35





Group: Members
Posts: 257
Joined: 9-May 02
From: Germany
Member No.: 2009



thanks...you're the best biggrin.gif
Go to the top of the page
+Quote Post
Phi
post Jun 29 2004, 14:10
Post #36





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (Linkin @ Jun 29 2004, 11:05 PM)
thanks...you're the best  biggrin.gif

No problem smile.gif
Go to the top of the page
+Quote Post
jay7
post Aug 1 2004, 19:44
Post #37





Group: Members
Posts: 3
Joined: 1-August 04
Member No.: 15947



ding-ding, bug report here! sad.gif
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 huh.gif
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. rolleyes.gif
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. crying.gif
Spy++ shows those 'DEAD FEED' messages pass to fb2k main window.
It is something with those hooks too, I feel it wink.gif but the only w32 compiler i have is LCC and it knows nothing 'bout C++ so I'm just sitting aside sad.gif
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
Go to the top of the page
+Quote Post
Phi
post Aug 2 2004, 06:04
Post #38





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (jay7 @ Aug 2 2004, 04:44 AM)
ding-ding, bug report here!  sad.gif

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 tongue.gif
Go to the top of the page
+Quote Post
jay7
post Aug 3 2004, 21:59
Post #39





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! smile.gif
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 ----
Go to the top of the page
+Quote Post
Phi
post Aug 4 2004, 04:30
Post #40





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! smile.gif

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.
Go to the top of the page
+Quote Post
Phi
post Aug 6 2004, 16:21
Post #41





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (Phi @ Aug 4 2004, 01:30 PM)
Anyway, I've rewritten the code to use an asynchronous socket so this won't be an issue in the next release.

foo_lirc 0.3
  • big rewrite, should fix bugs mentioned earlier
foo_lirc-0.3.zip
foo_lirc-0.3-src.zip
Go to the top of the page
+Quote Post
Linkin
post Aug 7 2004, 11:57
Post #42





Group: Members
Posts: 257
Joined: 9-May 02
From: Germany
Member No.: 2009



thx Phi

I appreciate your work
Go to the top of the page
+Quote Post
Phi
post Aug 8 2004, 06:43
Post #43





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



QUOTE (Linkin @ Aug 7 2004, 08:57 PM)
thx Phi

I appreciate your work

No problem smile.gif

foo_lirc 0.3.1
  • added support for "context/now playing" commands
  • minor ui improvements
foo_lirc-0.3.1.zip
foo_lirc-0.3.1-src.zip
Go to the top of the page
+Quote Post
jay7
post Aug 10 2004, 23:24
Post #44





Group: Members
Posts: 3
Joined: 1-August 04
Member No.: 15947



Hooray, it works! smile.gif
grabbed 0.3.1 and now I'm totally satisfied!
skipped 0.3 because of weekend, just didn't give it a try wink.gif
Hooray to Phi! smile.gif
Thanks, really.
Go to the top of the page
+Quote Post
SBeaver
post Aug 22 2004, 15:49
Post #45





Group: Members
Posts: 29
Joined: 17-December 03
Member No.: 10499



How do I set a button to scroll around in the playlist as if I had pressed up/down arrow?

edit: now have the cursor keys of my remote tied to previous/next playlist for right/left and works great. I'll try another program to bind the remote buttons up/down to cursor keys and see if that works better

This post has been edited by SBeaver: Aug 22 2004, 16:04
Go to the top of the page
+Quote Post
Phi
post Aug 23 2004, 14:18
Post #46





Group: Members
Posts: 333
Joined: 1-February 03
Member No.: 4829



Yeah, unfortunately there are no standard commands available in foobar to scroll the playlist up and down.
Go to the top of the page
+Quote Post
Betse
post Feb 13 2005, 21:28
Post #47





Group: Members
Posts: 71
Joined: 4-January 05
From: Netherlands
Member No.: 18834



I know this is a bump from nowhere, but i really like this plugin.
Greatly appreciated here!
Keep up the good work smile.gif


--------------------
Inter Deum et Diabolum semper Musica est", Tanzwut
Go to the top of the page
+Quote Post
Spi
post Mar 20 2006, 22:53
Post #48





Group: Members
Posts: 24
Joined: 3-May 05
Member No.: 21855



wow, i didn't know of foo_lirc > 0.2 ;(
i only checked the sourceforge site.

but now im in need of a version for 0.9 wink.gif

This post has been edited by Spi: Mar 20 2006, 22:54
Go to the top of the page
+Quote Post
Betse
post Mar 21 2006, 12:32
Post #49





Group: Members
Posts: 71
Joined: 4-January 05
From: Netherlands
Member No.: 18834



I've got to support you on that one smile.gif Foobar just isn't complete without it wink.gif


--------------------
Inter Deum et Diabolum semper Musica est", Tanzwut
Go to the top of the page
+Quote Post
cirrus
post Apr 5 2006, 21:08
Post #50





Group: Members
Posts: 1
Joined: 5-April 06
Member No.: 29208



Yeah. I really cant live w/o my remote. Anyone know how to fix it / know if there is any new version out?
Go to the top of the page
+Quote Post

4 Pages V  < 1 2 3 4 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 14:14