![]() |
#1 |
Junior Member
Join Date: Apr 2010
Posts: 2
|
Input Plugin Api Information / Discussion
-------------------------------------------------------------------- Hi I just love Winamp ![]() How should I respond to "type" tag? How should I respond to "length" tag (how should numeric data be formatted, a hex string etc.)? And so on... I guess my real question is whether there is an API somewhere, which I haven't been able to find (I did manage to find an outdated version by Michael Facquet in some zip file in this forum I think, which by the way did not help me all that much). And why-oh-why is this function not a part of the Winamp SDK, this should not take long to document and make a simple test example. But until then, would anyone please be kind enough to at least give me a hint on how numeric data shoud be "encoded" into the buffer? Thank you ![]() and "Hello World" from Denmark! |
![]() |
![]() |
![]() |
#2 |
Join Date: Sep 2003
Posts: 27,873
|
as i don't have the time to properly document the exported functions i'd suggest either looking at the source code of the 64th Note plug-in or the Wavpack plug-in for how things are done. the 64th Note only has the initial ansi implementation but may be easier to follow for some of the questions you've asked whereas the Wavpack plug-in includes a few other things as well which allow for decoding of audio for the ripper component and a few other things though it's a bit more over the place (is planned to have that plug-in worked on at some point to improve it along with some localisation updates, etc).
and hopefully someone (most likely me) will get around to sorting out a properly documented example at some point (when i've finished the other projects i'm currently working on). -daz |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Apr 2010
Posts: 2
|
Thank you very much for your (very quick) reply, I'll will have a look at your suggestions.
![]() I appreciate the fact that other projects also requires time and working hours, but this is a pretty critical function, for all input plugin developers, so it is beyond me why this has not been documented a lot sooner. It has been around since version 5 I guess, which was released a long time ago (2003 or something similar?)... I'm just curious as to why it hasn't been documented, is it considered experimental (still)? I'm willing to lend a hand writing some documentation for the particular winampGet/winampSet/and so forth functions, because I believe good documentation/API allows even more developers to become involved in a product, making it even better and interesting for the community => good times for the millions of users. And again thank you. Regards Xencito... |
![]() |
![]() |
![]() |
#4 | ||
Join Date: Sep 2003
Posts: 27,873
|
Quote:
Quote:
i agree fully that it's something which should have been documented properly (hence the mass of additions made to some of the sdk files since i've had a chance to work on them) but it's like everything with Winamp, there's just not enough time/resources to do things. initial documentation of things should be done by the end of the week (i suppose an advantage of me being out of work at the moment). -daz |
||
![]() |
![]() |
![]() |
#5 |
Join Date: Sep 2003
Posts: 27,873
|
I've uploaded an initial documentation for input plug-ins at http://nunzioweb.com/daz//input_plugin_api (this is essentially a 1.0 documentation release so will be subject to change like not all being text files but i'm pushed for time at the moment). Any issues / things missing / needing more clarification then please do say and i'll answer / update things as required. -daz |
![]() |
![]() |
![]() |
#6 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
What are CreateAudioDecoder and DeleteAudioDecoder for? I found them in in_mp3.dll.
I also found burn_doBurn, GetDS, and GetWave in in_wm.dll. |
![]() |
![]() |
![]() |
#7 |
Join Date: Sep 2003
Posts: 27,873
|
they're just internally used exports for use between some aspects of the different plug-ins. not something that falls under the general input plug-in exports.
-daz |
![]() |
![]() |
![]() |
#8 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Ah, ok. Does it have anything to do with passing streaming metadata to Winamp? I'm trying to hook all the plugins and when I do it doesn't display any of the metadata for the playing stream in the playlist. I was wondering if maybe those had anything to do with it.
|
![]() |
![]() |
![]() |
#9 |
Join Date: Sep 2003
Posts: 27,873
|
not that i'm aware of though stream metadata is a bit of a quirky area and ipc_updtitle (or something like) sent by the plug-in itself is the usual trigger for streaming title updates so maybe that isn't getting actioned correctly due to how you're hooking the plug-ins? only thing i can think off as i don't remember seeing such an issue with how i've hooked the input plug-ins in the past.
-daz |
![]() |
![]() |
![]() |
#10 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
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. |
![]() |
![]() |
![]() |
#11 |
Join Date: Sep 2003
Posts: 27,873
|
pretty much the same way though often i'd replace isourfile with my own version but then make that call the original function if i didn't need to be overriden so original behaviour is observed as that function is primarily there for stream handling.
though i can't remember at what stage and if i'm doing LoadLibrary(..) or GetModuleHandle(..) to get the loaded dll instance as the second i think is more what i try to use as LoadLibrary(..) can cause a different instance to be used instead which isn't initialised quite the same i think. would be easier if i could access my source code for in_zip then i'd be able to confirm what i'm doing (just can't do that right now) as that's probably the nearest equivalent to what you're trying to do. -daz |
![]() |
![]() |
![]() |
#12 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Zomg I'm a f'ing blind boning bone-head. It said it right there in the SDK and I didn't even see it or even to think to check for it while debugging:
#define GETFILEINFO_TITLE_LENGTH 2048 void (*GetFileInfo)(const in_char *file, in_char *title, int *length_in_ms); // if file == NULL, current playing is used I never checked for NULL file parameter. GAH!!!!! I've finally got it working right without the /class hack. |
![]() |
![]() |
![]() |
#13 |
Join Date: Sep 2003
Posts: 27,873
|
heh, i think that one's caught me out a few times way way back. at least you're sorted now so that's the main thing
![]() -daz |
![]() |
![]() |
![]() |
#14 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Would it be possible to document "hi.mp3"? I think I know what it's for but I would like to be sure.
|
![]() |
![]() |
![]() |
#15 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
|
![]() |
![]() |
![]() |
#16 |
Junior Member
Join Date: May 2004
Posts: 10
|
Are there any docs explaining the more exotic functions, like Vis, DSP, etc.?
The input plugin interface is really a surprise. I expected a simple interface for decoding and metadata, and found out the whole playback plugin chain is controlled by the input plugin. Now I know why various things behave strangely depending on input plugin used. ![]() |
![]() |
![]() |
![]() |
#17 | |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Quote:
|
|
![]() |
![]() |
![]() |
#18 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
winampSetExtendedFileInfo(W)
[Quandry]
In the documentation "Reading_and_Writing_Extended_Metadata_Information.h" it defines both of the writing function winampSetExtendedFileInfo(W) as both having wchar_t * values but the value parameters for winampGetExtendedFileInfo(W) as char * and wchar_t * respectively. The following taken from "Reading_and_Writing_Extended_Metadata_Information.h": code: Is it supposed to be like that or is the documentation wrong on the value parameter for winampSetExtendedFileInfo? |
![]() |
![]() |
![]() |
#19 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
hi.mp3 (or hi.ext) is used to find the input plugin associated with the 'default extension' in the preferences.
the unicode variants of the dllexported metadata functions do in fact take the field name as a char * (ascii string) |
![]() |
![]() |
![]() |
#20 | ||
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Quote:
Quote:
![]() |
||
![]() |
![]() |
![]() |
#21 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Oops, wait a minute, you said "field name." Are you referring to the "data" parameter or the "val" parameter? I was talking about the "val" parameter, "field name" implies the "data" parameter.
| Opus Audio Codec plugins 2.0 | Embedded Album Art | DiskWrite | | Save your playlist first! | Live voice-over | X-Fade 2.5 | | AterKast (Source DSP) | More of my stuff... | Last edited by thinktink; 20th September 2015 at 00:40. |
![]() |
![]() |
![]() |
#22 |
Ben Allison
Former Winamp Developer Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
|
ohh. weird. where does it specify that? it should definitely be const char * for winampSetExtendedFileInfo
|
![]() |
![]() |
![]() |
#23 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
In the documentation "Reading_and_Writing_Extended_Metadata_Information.h", at least the copy I got from the SDK download if memory serves. I'll double check that.
|
![]() |
![]() |
![]() |
#24 | |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#25 |
Forum King
Join Date: May 2009
Location: No longer on the streets of Kings County, CA.
Posts: 3,218
|
Double whoops, I just had a look at the Wayback Machine. It was "Reading_and_Writing_Extended_Metadata_Information.txt", not "Reading_and_Writing_Extended_Metadata_Information.h", I must've renamed the file so that it would pop up and show formatted in my editor. It was also not in an archive, it was just hosted directly as a txt file on his server.
|
![]() |
![]() |
![]() |
#26 |
Banned
Join Date: Jan 2019
Posts: 9
|
look like someone is stack in the real problem.
|
![]() |
![]() |
![]() |
|
Tags |
winampgetextendedfileinfo |
Thread Tools | Search this Thread |
Display Modes | |
|
|