View Single Post
Old 19th June 2011, 19:12   #10
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 2,948
Send a message via Skype™ to thinktink
I know in_mp3 is getting the data and is attempting to tell Winamp to refresh the title with the above mentioned IPC message because I've watched the messages to the main Winamp window with an external message hooker/viewer. It just seems like either Winamp isn't responding correctly or in_mp3 isn't giving the actual stream data. I still can't figure it out. I've solved it with a hack though by updating IPC_HOOK_TITLES with the input plugin's GetFileInfo() function manually. Unfortunately that means subclassing Winamp's main window which I usually try to avoid doing with any plugin.

The way I'm "hooking" the input plugins is by enumerating all DLLs in the plugins folder, loading them, getting the plugin's header, overriding the header's IsOurFile function with my own that always returns FALSE, and then returning TRUE for my IsOurFile if any of the other plugin's original function returns TRUE. I also either emulate or pass-through to the original plugin the winamp[Set|Get|Write|Add|Unified]Extended functions. When Winamp calls for a file my plugin doesn't/can't handle directly (like streaming audio or video files) I just pass through all the calls to Play/Pause/Unpause/SetVolume/SetPan/etc.. to the appropriate plugin with my plugin just acting as a middle-man. For the life of me I can't think of why the streaming metadata wasn't being displayed since I didn't override anything else but IsOurFile. All the other header functions remain unmodified. Even without overriding IsOurFile and just returning true (and passing through all the function calls) for other files the metadata wasn't displayed.

How did you hook the input plugins?

[EDIT /]
Forgot to mention, while testing I discovered that in_mp3 likes to crash (I think) on calls to winampSetExtendedFileInfo(W) if the filename is empty (allocated \0 terminated string with no characters.) No error message or anything is displayed to the user, Winamp just quits unexpectedly.
thinktink is offline   Reply With Quote