Old 26th September 2013, 00:57   #1
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 2,947
Send a message via Skype™ to thinktink
Playlistwriter_wa5

So there's WA5 Playlist Handlers, WA5 Playlist Writers, and then WA3 Playlist Writers.

I was able to find headers for the WA3 Writer from the old Wasabi SDK and I have the WA5 Playlist Handler, but could not locate the header for WA5 Playlist Writers. Is it available elsewhere?

The reason why I'm asking these things is because api_playlistmanager::GetFilterList returns all of the extensions that Winamp can load AND an all supported files string at the top. What I need is only the extensions (and the corresponding description) for the Save(As) Dialog, which would only include extensions for playlist types that Winamp currently supports writing out to, and without the all supported types string. I couldn't find anything in the SDK that would give me that so I figure I need to conjure it myself by enumerating all the playlist handlers and writers and figuring out whats-what and compiling it myself based on the information available.

I figure it's something like a class called "api_playlistwriter" or "ifc_playlistwriter" or something.

tia
thinktink is offline   Reply With Quote
Old 26th September 2013, 01:13   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
it's not in the sdk as it doesn't exist (never got implemented as a an exposed service). Winamp just hard-code things to assume pls, m3u and m3u8 are the only formats able to be written when it comes to playlists.
DrO is offline   Reply With Quote
Old 26th September 2013, 01:54   #3
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 2,947
Send a message via Skype™ to thinktink
/em bangs head THROUGH desk.

Thanks.
thinktink is offline   Reply With Quote
Old 26th September 2013, 02:05   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
if wanted i can make an alteration to the IPC_GET_EXTLIST(W) responses so it can provide a playlist specific version (or even just a playlist specific version) assuming that either of it's modes are what you're wanting (and just to have a playlist specific output) - which is what should have been done anyway so if it ever gets the means to be expanded, then it doesn't need further API alterations as that would be able to do it. if not, just hard-code and assume that's it.
DrO is offline   Reply With Quote
Old 28th September 2013, 21:22   #5
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 2,947
Send a message via Skype™ to thinktink
Did you mean something like "...if 2, returns something suitable for getsavefilename"?

Personally, I'd prefer to get it from Wasabi like I do now for Open Dialogs, even if it does mean waiting a lot longer for it to come to fruition. And if I'm interpreting your meaning correctly, that would probably make implementing what you're proposing easier anyways.

At the moment, I'm just hard-coding like Winamp now.
thinktink is offline   Reply With Quote
Old 28th September 2013, 21:27   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by thinktink View Post
Did you mean something like "...if 2, returns something suitable for getsavefilename"?
yes that's what i meant.

Quote:
Originally Posted by thinktink View Post
Personally, I'd prefer to get it from Wasabi like I do now for Open Dialogs, even if it does mean waiting a lot longer for it to come to fruition.
that would be the ideal, but as it's not in there and unlikely to happen any time soon, what i'm offering to do helps with the hard-coding issue so that if / when anything changes internally, then that could be updated internally in the Winamp client and anything using the new / altered IPC API would have less to do for the display aspect (as any writer service would likely rely on the passed extension to determine what is written like how the reading service works). but then, if a writer service were provided, the plug-in(s) would need updating so maybe it's moot about easing the transition.

Quote:
Originally Posted by thinktink View Post
And if I'm interpreting your meaning correctly, that would probably make implementing what you're proposing easier anyways.
not really, is more that it makes the internal Winamp / native plug-in handling easier to update via one place than in multiple places (as was the case when i had to previously fix up the ordering of things to match in the different plug-ins).


i'll likely go ahead and make the change anyway so is fine if you want to hard code it as-is.
DrO is offline   Reply With Quote
Old 29th September 2013, 00:22   #7
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 2,947
Send a message via Skype™ to thinktink
Quote:
Originally Posted by DrO View Post
...i'll likely go ahead and make the change anyway so is fine if you want to hard code it as-is.
I won't not use it if you implement it. I'll just use the hard-coding for fall-back for earlier versions though. Never used that API before so I'll have to check it out.
thinktink is offline   Reply With Quote
Old 29th September 2013, 00:27   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
it just returns a raw list of extensions or a ofd compatible string. i'll be doing it as a different api so as not to mess with existing behaviour of the currently one i.e. people setting the wrong param i.e. > 1 which will just return the ofd compatible version.
DrO is offline   Reply With Quote
Old 29th September 2013, 16:20   #9
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
#define IPC_GET_PLAYLIST_EXTLISTW 282
/* (requires Winamp 5.66+)
** wchar_t* pl_ext_list = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)mode,IPC_GET_PLAYLIST_EXTLISTW);
** These just return playlist extensions / file types instead of all
** extensions / file types like the prior IPC_GET_EXTLIST(W) methods.
** There is no need to GlobalFree() the result unlike the IPC_GET_EXTLIST(W) behaviour.
**
** mode = 0 - returns raw extlist of loadable playlist formats
** mode = 1 - returns something suitable for getopenfilename of loadable playlist formats
** mode = 2 - returns raw extlist of writeable playlist formats
** mode = 3 - returns something suitable for getopenfilename of writeable playlist formats
*/
above will cover read and write and as it's coming from winamp.exe, it'll be localised for you (if a localisation is available with the language pack being used, etc). it follows the same format IPC_GET_EXTLIST(W) expect you don't need to free the buffer returned.
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > Winamp Development

Tags
playlist, writer

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