![]() |
Media Player
Hello. I was thinking of coding a media player as my first project and I would like to know some things like what processors I need and how do I go about using them. If anyone of you all know any websites that are relevant to my question, kindly post the link. Thanks in advance. :D
|
I have a few other suggestions before you go about coding a media player.. maybe do a small program to see if you can determine if a file exists? Then maybe build on that to see that if a file exists, that you can open it and read it. Then maybe expand on that to see if you can find multiple files.
Are you planning on creating a command line interface, or Console? If you want to do a console app, then maybe a small project to see if you can create yourt own simple window. Then maybe a simple window with a few buttons that print messages. And then maybe a window that accepts a filename as input and then looks for it. I think the first thing you might want to consider doing is sitting down with a pencil and paper and making a list of everything you want your media player to do. Then consider how each part has to fit together. Then work on small bits at a time. Otherwise you may find yourself a bit overwhelmed. :) |
Sounds cool. Do you know of any site that teaches these stuff? Thanks.
|
|
I made a window application that function just like media player in ruby. I basically used API such as MciSendString function from winm.dll. I believe in order to make one, you should have basic knowlegde of API calling. if you want to see the code for my audio in ruby. I could post it, it can simply be written in C++ too. Hope that helps
|
I don't know of any sites right off, but there should by any number of sites that have sample code. You should really start with a pencil and paper first though.
For example, suppose I do tech support on a forum where I gat asked the same questions over and over again. Since I want to save time, I create my own canned responses and store them in a text file, but after awhile it gets so big that it is hard to find the ones I want. I decide to create my own app that alphabetizes responses in their own little seperate file. So now I am ready to determine what I need my program to do. ****** -open files -save files -edit files -display a user interface -find files -display files Now it comes down to making a few decisions. First of all, I have two related processes -Opening files and saving files. I also have two more that are sort of related. Editing files and finding files. So maybe the first decision needs to be, what kind of format do we want to use for saving files? Text files are simple. Do we need to maybe encrypt the files so that nobody sees our canned responses? Do we want to store them as individual files? Do we want to store them in one big text file and just load the entire range of responses into memory each time we use the program? How do we want to arrange them? Alphabetically? By use? Then we need to make some decisions about the user interface. It should be quite obvious that a command line program probably won't be too efficient for this type of application. So we need to decide.. how do we want to be able to search for the responses that we want? Typing in a keyword would be nice. I would also like a drop downlist that once I choose a letter, I get another dropdown that lists the saved speeches within that category. I am also going to want a text area that displays the speech so that I can edit it. I would also like it to be able to save any changes I make. Now we need to figure out what we need to do to make all the little parts that will do what we want. So starting out simply, we need to be able to open and save files. What library functions will help us do that? What happens if we try to load a file that doesn't exist? What do we want our application to do? Once we research that, we should be able to find some examples of what we want to do, and modify the code so that it fits our exact needs. I decide that the easiest way to store all my responses is in one big text file. Since I need a way to distinguish between different responses, I decide that I will put a row of asterisks between each response. That means when I load my list of responses, somehow my application will have to sort them properly, as well as distinguish where the rows of asterisks are. Now my next test would be to see if I can read in a file of text and recognize when there is a row of asterisks. After I can do that, I would further modify it to somehow sort those responses. Finally we can consider the gui. We know we want at least one dropdown menu, a text area, and some buttons that do different things, so our next step would be to see if we can create a window and add parts little by little until we get some sort of interface we can work with. Once we get all of the seperate pieces doing what we want them to do, then we can start putting them together, little bit by little bit. That's where you need to start. Programming is more than just slapping some code together. It is almost always a series of steps, starting with defining each individual problem, and then solving each little problem. Then once your little problems are solved, they can all be put together to solve your bigger problem. In your case, your problem is "How do I create my own media player". EDIT: I didn't mean to get long winded, I just wanted to point out that in you need some sort of a game plan before you even start. It doesn't do much good to say "Use the WIN32 API" if you don't even know why you need them. Once you know what you need, then you can go about finding it, or asking questions of people so that they can help you find what you need. |
Master - Sure, I would like to see the code.
Prm753 - Thanks for the link! |
Thanks
grrovicus, thanks for the guide! I used to wonder what others meant by saying this, "You should really start with a pencil and paper first though". You explained the whole thing and much more..=) A BIG THANKS AGAIN...=) :) :)
|
:
#============================================================================== |
Quote:
|
| All times are GMT -5. The time now is 9:25 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC