Old 27th January 2005, 21:32   #1
Flippet
Junior Member
 
Join Date: Jun 2001
Location: Yeovil, Somerset, UK
Posts: 23
Custom text in the main winamp window

Hello all,

I'm in the process of making a plugin to enable Winamp to control an internet radio stream through a web service. The service offers a few methods to control what is currently playing, and a method to retrieve information about the current track and stream; it does not provide ID3 tags with the stream itself.

The plugin is able to control the stream and retrieve the stream information, but I can't find a decent way to display the information. Ideally I'd like to be able to override the text in the main winamp window, which currently just shows the URL, but I'm not sure how to do it or if it is possible at all...

The only mention of changing track text I can see in the SDK relate to tags in files; no good. I did try hijacking the WM_SETTEXT message sent repeatedly to the window, but this just changes the text in the taskbar rather than the main window.

If anyone could shed any light on how or where to show some text within winamp, I'd be most grateful indeed!

Thanks,

Phil
Flippet is offline   Reply With Quote
Old 27th January 2005, 23:03   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
winamp gets that information from the GetFileInfo(..) function in an input plugin. i guess you could find the plugin handling the stream normally, intercept the GetFileInfo(..) after loading the plugin's winampGetInModule2 and replacing the function with your own version which then allows you to change the information returned or pass it straight back to the original fucntion.

that may or may not make any sense (though i'm assuming it's a gen plugin you're doing and this method can cause issues if the function hooking isn't removed when the plugin is unload as winamp closes)

-daz
DrO is offline   Reply With Quote
Old 28th January 2005, 08:01   #3
Flippet
Junior Member
 
Join Date: Jun 2001
Location: Yeovil, Somerset, UK
Posts: 23
I had a quick look at proxying the input plugin but came to the conclusion that it looked too scary and complicated. I may give it another try tomorrow in that case.

Shortly after the first message I discovered the IPC_HOOKTITLE message; so was playing around with that in the hope that I could catch the message, change the contents and send it on. Unfortunately it appears that this message is for information only as it had no effect. Back to the drawing board...

Thanks,

Phil
Flippet is offline   Reply With Quote
Old 28th January 2005, 22:57   #4
Flippet
Junior Member
 
Join Date: Jun 2001
Location: Yeovil, Somerset, UK
Posts: 23
...Later that day...

I tried proxying the input plugin; I didn't get very far. With a plugin that simply passed everything straight through it would play music and whatnot as expected, but the window functions wouldn't work. I have absolutely no idea why. I did find the thread "Altering PE entries" which suggests I'm not the only one.

On the plus side... inspiration from the "ATF Extender" thread made me continue with IPC_HOOK_TITLES, and after a breakthrough (when it says "return 1 if you hook this", it really means it) it now works. Eeeeeeexcellent.

Thanks for the help!

Phil
Flippet is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump