Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
playlist fundamentals
#1
yeah, i been thinkin about doin a media player for a while... does anybody know the fundamentals of how a playlist manager would be coded....

i was thinking about making it seperate from the player, like the player has a button on it that you press.. then it brings up the playlist manager.... but there all in 1 exe

but, i dont even know where to start.. i just need some fundamentals to think about before i start coding
url=http://www.random-seed.net][Image: asylumsig.png][/url]
Reply
#2
hmm, i just been thinkin abut it

the playlist manager would basically get some type of input saying "file location" and then the playlist manager would then store the file location, and the order wich input for the specific file was received (so it plays in order)

then the actuall player would goto the pool of variables storing the file info, and look at the order they are supposed to be played.. then pick one up and play it

or there could be some sortof middleman that takes all that info, and keeps it in mind, then sends the file info to the player when the player says "i'm ready for a new task"

or i guess the playlist manager could just do the same work as the middle man, i dont know :|

i want it to use as little cpu as possilbe, and i want it to use very little memmory
url=http://www.random-seed.net][Image: asylumsig.png][/url]
Reply
#3
alright, I know this is a kind of old post and that you probably figured everything out by now, but I would like to come with a suggestion anyway.

Use forks to create multipel processes running your program, that way it's highly flexibel and takes little cpu, you might want to look into threads as well.

Then, just devide everything into smaller pieces like, the part playing the media, the playlist, the interface, etc, having the main processes (middle man) just pipe info to the others.

To organize a playlist easily, just add the filepath and other info to one big file that you read into memory at the beginning of the execution (I know a lot of people might differ on me here, since it takes some memory, but I believe that the memory taken is worth the speed increase, file I/O is slow, and tricker to code then memory). Then you just look for it when you need it, you don't have to keep track of the files. When the app quits you over-write the old file with a new one containing all the songs, with location etc...

Also, try to use a 3:rd party lib for playing the media, it's way more handy then writing your own stuff.
Reply
#4
Normally, a media player has its own playlist mechanism. WMP does, Winamp does, etc. All a playlist is is a list of files. It's not rocket science to write. I wrote a media player in VB6 a couple of years ago (I still use it for most everything) and the playlist was a simple listbox control, nothing fancy.
\__/)
(='.'=) Copy bunny into your signature to
(")_(") help him gain world domination.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)