Old 26th January 2005, 20:41   #1
n2jtx
Junior Member
 
Join Date: Feb 2004
Posts: 35
Send a message via AIM to n2jtx
How to detect playing file versus stream?

I have been searching for a way to determine whether or not Winamp is playing a file or a stream from a plugin. One way that had some success was checking for a track length of -1 via IPC_GETOUTPUTTIME. However, this has an occasional glitch in that -1 is returned if the IPC is called shortly after a file starts playing. Apparently Winamp takes a brief moment to determine the length of a file and will return -1 until it calculates the information.
n2jtx is offline   Reply With Quote
Old 26th January 2005, 22:37   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
try IPC_PE_GETINDEXTITLE from ipc_pe.h and make sure you have zeroed the fileinfo2 structure before calling that message and then check the length of the filelength member. if it's zero length then it's a stream (that's what i've found from making my tooltip override plugin)

-daz
DrO is offline   Reply With Quote
Old 27th January 2005, 03:20   #3
shaneh
Major Dude
 
Join Date: Jan 2004
Location: Brisbane, Australia
Posts: 1,193
A length of zero can also mean the playlist hasnt yet loaded the meta data for that file. Of course, if the file is playing this is unlikely. Im pretty sure winamp itself just checks for "http:", but obviously there are other stream types.
shaneh 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