Now that I'm comfortable with the layout its time to start working on the nuts and bolts. The picture browser wasn't too hard at all to code, a couple hours and it's working like a champ. The problem comes to the Video Player. Trying to find wrappers for codecs/filters is proving impossible. It looks like I have a couple options:
1) Microsoft.DirectX.AudtioVideoPlayback. This is a managed wrapper for the payback of AVI and MP3 files. But it has it's problems. Mainly Microsoft is no longer supporting the namespace. But the largest problem with using it is I'm still trying to figure out how to draw over the top of the video, as to add controls. This may be just because of my lack of knowledge in DirextX but I've also heard complaints about this namespace altogether.
2) Using the C++ windows library AVI functions. These are great and they provide a nice easy way to decode AVI video, but as for the audio they are lacking. I can extract the AC3 audio stream from the AVI file but I can't play it, yet. The bonus to using the C++ library is that I can draw the video using the System.Drawing namespace and thus very easly draw over the top of any video output to create video controls. But as I've said there is no audio decoder that I'm aware of that I can use here to convert the AC3 data. The current working version of this is able to produce frame rates upto 60 in the mini-player and as low as 5-10 frames per second in full-screen view. Frame skipping was impliments so that when the frame rate wasn't at ideal levels (24-30 for all of the AVI files I've been testing with) it either repeats the old frame in the cases when above ideal rates, or skips missed frames when the renderer slows down.
3) This would be the most promising and ideal for the long term, but the most time consuming and research intensive... Writing my own DivX and AC3 codecs. The same would have to be done for any compression format available to all of the media types. First though would be that the en/decoders would be written into a C++ library and then a C# wrapper class would be created over the top of that.
I've already done a fair bit of research for the AC3 decoder and I believe it won't be too difficult to write it's just going to be very very time consuming. I'll explain the details in the next post.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment