IPB

Welcome Guest ( Log In | Register )

4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
foo_lirc plugin, LIRC compatibile remote control plugin!
levsh
post 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 wink.gif

Screenshot

This post has been edited by levsh: Mar 3 2004, 13:01
Go to the top of the page
+Quote Post
seanyseansean
post Mar 3 2004, 15:52
Post #2





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



Nice, i'm going to try this with my ATI AIW tonight smile.gif
Go to the top of the page
+Quote Post
Johncan
post Mar 4 2004, 03:28
Post #3





Group: Members
Posts: 83
Joined: 20-January 03
From: Atlanta, GA
Member No.: 4656



I use IRMan as my IR receiver with a Sony remote. I wish the IRMan worked WinLIRC so I could try out your plugin. Maybe someday IRMan and WinLIRC will be able to "play together." Does anyone know of a plugin that will work with IRMan and Foobar 8?

John
Go to the top of the page
+Quote Post
levsh
post Mar 4 2004, 08:58
Post #4





Group: Members
Posts: 7
Joined: 3-March 04
Member No.: 12436



John, you may try to use the SlyControl (detailed description) program, it supports IRMan devices, and it can work as a WinLIRC server.
Go to the top of the page
+Quote Post
Phi
post Mar 4 2004, 11:10
Post #5





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



Thanks levsh cool.gif, this should be very handy when I get around to building my UIRT2.
QUOTE
I'm waiting for comments and list of missing actions wink.gif

What I would like to see is the ability to bind a button to any of the possible foobar actions, with an action list similar to the one in core->keyboard shortcuts. This doesn't really fit in with the code you have written already, but I think it would be a nice function to have wink.gif

P.S. About the SDK, I know its possible to get the list of available actions by using service_enum_t on the menu_item class, but I'm not sure whether this would be considered a hack. Is there a more standard way to get the available actions?
Go to the top of the page
+Quote Post
dano
post Mar 4 2004, 14:17
Post #6





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



thx levsh, it works well for me
yes, Phi's suggestion would be great
Go to the top of the page
+Quote Post
seanyseansean
post Mar 4 2004, 14:27
Post #7





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



QUOTE (seanyseansean @ Mar 3 2004, 02:52 PM)
Nice, i'm going to try this with my ATI AIW tonight smile.gif

Aha, it works fine. Marvellous job! I agree with the other comments though, it'd be nice to have all the actions available.

I might have a look at that source, too. I've been thinking of implementing a 'predictive text' style method for entering song titles in the playlist search, using the numeric keys on the AIW remote.

ta,

sean
Go to the top of the page
+Quote Post
foosion
post Mar 4 2004, 16:10
Post #8





Group: FB2K Moderator (Donating)
Posts: 4409
Joined: 24-February 03
Member No.: 5153



QUOTE (Phi @ Mar 4 2004, 11:10 AM)
P.S. About the SDK, I know its possible to get the list of available actions by using service_enum_t on the menu_item class, but I'm not sure whether this would be considered a hack. Is there a more standard way to get the available actions?

Using a service_enum for menu_items is a perfectly valid (and standard) way to get a list of the available commands.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Phi
post Mar 5 2004, 02:10
Post #9





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



QUOTE (foosion @ Mar 5 2004, 02:10 AM)
QUOTE (Phi @ Mar 4 2004, 11:10 AM)
P.S. About the SDK, I know its possible to get the list of available actions by using service_enum_t on the menu_item class, but I'm not sure whether this would be considered a hack. Is there a more standard way to get the available actions?

Using a service_enum for menu_items is a perfectly valid (and standard) way to get a list of the available commands.

Thanks for the clarification, foosion.

I have some similar code left over from a plugin I worked on for a while (macro commands for foobar) but never released, so I might try to implement this myself if I get some free time over the weekend.
Go to the top of the page
+Quote Post
Linkin
post Mar 5 2004, 09:10
Post #10





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



thanks a lot for this great plugin! it is exactly what i waited for since i got an ir-reciever. smile.gif
Go to the top of the page
+Quote Post
cryptAWD
post Mar 9 2004, 04:26
Post #11





Group: Members
Posts: 1
Joined: 15-February 04
Member No.: 12024



Thanks for this plugin. This is something I've been looking for. The only thing I'd like to see added at this point would be next/prev playlist.
Go to the top of the page
+Quote Post
levsh
post Mar 9 2004, 20:39
Post #12





Group: Members
Posts: 7
Joined: 3-March 04
Member No.: 12436



QUOTE
P.S. About the SDK, I know its possible to get the list of available actions by using service_enum_t on the menu_item class, but I'm not sure whether this would be considered a hack. Is there a more standard way to get the available actions?


It would be really helpfull if you or someone could drop me an email with a description, sample, or link to the documentation on how to do this. Right now I haven't found a good way for this.

Thanks

P.S. Really strange, I haven't received any email notifications from the forum about the messages in this thread. Any ideas? smile.gif
Go to the top of the page
+Quote Post
levsh
post Mar 9 2004, 22:15
Post #13





Group: Members
Posts: 7
Joined: 3-March 04
Member No.: 12436



QUOTE (Phi @ Mar 4 2004, 02:10 AM)
P.S. About the SDK, I know its possible to get the list of available actions by using service_enum_t on the menu_item class, but I'm not sure whether this would be considered a hack. Is there a more standard way to get the available actions?

I haven't found any clues or sources of the Keyboard Shortcuts plugin. Correct me if I'm wrong, but from the browsing through strings of the foobar2000.exe binary I came to a conclusion that "Actions" list from the "Keyboard Shortcuts" is actually hardcoded, and not generated dynamicly. It would be great if someone from the development team could tell if I'm right unsure.gif

Anyway, if this is true, the list from the "Keyboard Shorcuts" seems to be a bit too long for a remote control actions, so the list of actions to be toggled remotely is still welcome smile.gif

I'd prefere to move this discussion to the Feature Requests tracker on the sourceforge unsure.gif
Go to the top of the page
+Quote Post
Phi
post Mar 10 2004, 01:15
Post #14





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



QUOTE (levsh @ Mar 10 2004, 06:39 AM)
QUOTE
P.S. About the SDK, I know its possible to get the list of available actions by using service_enum_t on the menu_item class, but I'm not sure whether this would be considered a hack. Is there a more standard way to get the available actions?


It would be really helpfull if you or someone could drop me an email with a description, sample, or link to the documentation on how to do this. Right now I haven't found a good way for this.

Actually, I went ahead and implemented what I was suggesting a few days ago. It turned into almost a complete rewrite of your plugin. I didn't intend to hijack your plugin idea, but it turned out I had too much spare time on the weekend. unsure.gif I'll post links to what I've done as soon as I can get to my computer at home.

Regarding how to get the list of actions, this is the code I was talking about:
CODE
   service_enum_t<menu_item> e;
   menu_item * i;
   for(i=e.first();i;i = e.next())
   {
       int m,n = i->get_num_items();
       for(m=0; m<n; m++)
       {
     string8 command;
     // You may recognise this as the menu_item::enum_item(n,string_base& out)
     //virtual function you implement when you make your own menu item
     i->enum_item(m,command);
       }
       i->service_release();
   }

service_enum_t is basically a way to enumerate through each instance of a certain object registered using a service_factory_t (or in the menu_item case menu_item_factory)

Hope I made sense there! biggrin.gif
Go to the top of the page
+Quote Post
foosion
post Mar 10 2004, 02:32
Post #15





Group: FB2K Moderator (Donating)
Posts: 4409
Joined: 24-February 03
Member No.: 5153



QUOTE (levsh @ Mar 9 2004, 10:15 PM)
I haven't found any clues or sources of the Keyboard Shortcuts plugin. Correct me if I'm wrong, but from the browsing through strings of the foobar2000.exe binary I came to a conclusion that "Actions" list from the "Keyboard Shortcuts" is actually hardcoded, and not generated dynamicly. It would be great if someone from the development team could tell if I'm right  unsure.gif

The "Keyboard Shortcuts" page in preferences is implemented in the core, and the list of actions is most certainly not hardcoded. As the core also implements a whole batch of commands, the names of these commands will consequently be present in the foobar2000.exe binary.

QUOTE (Phi @ Mar 10 2004, 01:15 AM)
Regarding how to get the list of actions, this is the code I was talking about:

You may want to check the type of the menu item as well, i.e. whether it is a context or main menu command.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Phi
post Mar 13 2004, 15:38
Post #16





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



I think I'm finally ready to release my version of the plugin, so here it is...

Plugin: foo_lirc-0.2.zip
Source: foo_lirc-0.2-src.zip

Screenshot for those who are interested.

The main change is inherent support of all foobar main menu commands.
Go to the top of the page
+Quote Post
levsh
post Mar 14 2004, 10:34
Post #17





Group: Members
Posts: 7
Joined: 3-March 04
Member No.: 12436



QUOTE (Phi @ Mar 13 2004, 06:38 AM)

It would be great if you register in sourceforge, I'll give you full permissions on the foolirc project smile.gif, I think it's a good idea to keep everything in one place rolleyes.gif
Go to the top of the page
+Quote Post
Phi
post Mar 15 2004, 08:41
Post #18





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



QUOTE (levsh @ Mar 14 2004, 08:34 PM)
QUOTE (Phi @ Mar 13 2004, 06:38 AM)

It would be great if you register in sourceforge, I'll give you full permissions on the foolirc project smile.gif, I think it's a good idea to keep everything in one place rolleyes.gif

I agree its a good idea to keep everything in one place, but I'm (still) not too familiar with sourceforge, and I don't think I'll be able to continue development on this plugin now anyhow. Thanks for the offer though. smile.gif

And obviously, you are free to use the -0.2 source however you want wink.gif
Go to the top of the page
+Quote Post
levsh
post Mar 15 2004, 13:39
Post #19





Group: Members
Posts: 7
Joined: 3-March 04
Member No.: 12436



QUOTE (Phi @ Mar 14 2004, 11:41 PM)
QUOTE (levsh @ Mar 14 2004, 08:34 PM)
QUOTE (Phi @ Mar 13 2004, 06:38 AM)

It would be great if you register in sourceforge, I'll give you full permissions on the foolirc project smile.gif, I think it's a good idea to keep everything in one place rolleyes.gif

I agree its a good idea to keep everything in one place, but I'm (still) not too familiar with sourceforge, and I don't think I'll be able to continue development on this plugin now anyhow. Thanks for the offer though. smile.gif

And obviously, you are free to use the -0.2 source however you want wink.gif

Is it ok if I put your version on the Sourceforge myself then?
Go to the top of the page
+Quote Post
Phi
post Mar 16 2004, 00:27
Post #20





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



QUOTE (levsh @ Mar 15 2004, 11:39 PM)
Is it ok if I put your version on the Sourceforge myself then?

Yes certainly, that was what I was implying but forgot to mention. biggrin.gif
Go to the top of the page
+Quote Post
Linkin
post May 28 2004, 21:34
Post #21





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



Hi,

I am using the columns_ui and if I had the lirc plugin enabled and then close foobar and reopen it i always get this error message:

I have to go to preferences and re-enable lirc support to make it work again. It happens always, note that the columns_ui has to be enabled. Is there anything you can do to fix this?

thanks in advance
Go to the top of the page
+Quote Post
bleh
post May 28 2004, 23:03
Post #22





Group: Members
Posts: 273
Joined: 9-August 03
From: MI, USA
Member No.: 8257



No, it's a bug in foo_lirc. The way foo_lirc finds the main window is to do this:
CODE
#define foo_window_class TEXT("{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}")
hMainWindow = FindWindow(foo_window_class, NULL);

That was how it would work in Winamp. However, that only works with the standard user interface, since columns has a different window class. What either Phi or levsh needs to do is to change foo_lirc to use
CODE
hMainWindow = core_api::get_main_window();

They accomplish the same thing, except the bottom one works with user interfaces other than the standard one. In fact, I'm pretty sure the standard UI has a hard-to-recognize window class like that to discourage people from trying to use FindWindow on it.

(edit): Wording changed.

This post has been edited by bleh: May 28 2004, 23:17
Go to the top of the page
+Quote Post
dano
post May 29 2004, 02:06
Post #23





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



I have the same problem as Linkin, but what I noticed is that if I install another plugin, it works again. But installing another plugin again brings back the problem.
Kind of weird, maybe someone can recompile the plugin with the correct method?
Go to the top of the page
+Quote Post
Phi
post May 29 2004, 08:31
Post #24





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



QUOTE (dano @ May 29 2004, 11:06 AM)
Kind of weird, maybe someone can recompile the plugin with the correct method?

This same hack was fixed in my foo_gestures plugin a while ago (which I also haven't updated for quite some time whistling.gif), but I didn't bother recompiling foo_lirc as I figured noone was using it.

Anyhow, I've now added the change and recompiled for foo-0.8.2. I haven't tested this, but there shouldn't be any problems.

foo_lirc-0.2.1.zip
foo_lirc-0.2.1-src.zip
Go to the top of the page
+Quote Post
Linkin
post May 29 2004, 09:36
Post #25





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



thanks a lot phi! smile.gif
Go to the top of the page
+Quote Post

4 Pages V   1 2 3 > » 
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: 25th July 2014 - 18:02