Create files to support NSMovie and NSMovieView
implementation for NSMovie and NSMovieView. The tests for this are here: https://github.com/gcasa/NSMovie_test https://github.com/gcasa/apps-videoplayer
Completely revamped and simplified.
For some reason the sound is a little choppy, I am trying to address this. In the meantime I am going to work on implementing the other features of this class.
Here's a sample of how it looks at the moment. Not bad. The sound is still off. It currently does NOT use NSSound, but does depend on the same backend (libao) which I SUPPOSE is okay. I am working on correcting the issue with the sound output and I have a couple of potential solutions. One of which is to compile the data for output into a large ring buffer and play it continuously instead of a piece at a time which is what I am doing.
Please feel free to download and test this. This uses ffmpeg/libavcodec, so it is compatible with a large range of formats.
Sound seems to be working now, apparently the sample rate was misconfigured. I am working on implementing the video looping settings as well as other settings. The methods for editing are going to be left unimplemented as I am not certain how to do those yet.
I am making this ready for review so that, perhaps, people who are more familiar with avcodec et. al. might be able to help me improve this.
Just as a note NSSound is not fast enough to handle the samples being fed, so it was necessary to create the audio player.
I think this is the best I can do on this. @fredkiefer could you take a look and see what else you might be able to see. This is certainly better than we have at the moment (nothing) and I think it would be useful for others to take a look and try to improve this.
The sound is now working and I have added a set of (default) controls.
@fredkiefer Take a look at the updates. Thanks for reviewing the code.
I had to revert some of the previous changes. Back to fac27f8. You'll need to do a fresh checkout.
@fredkiefer I have addressed the issues you mentioned. :)
@rfm Please take a look at this one as well.
I think this is as close to done as I can get it. It works. I would like others to have the opportunity to look at and fix the code on this. Please review and approve if you can @rfm or @fredkiefer
I think this PR is ready as well, @fredkiefer / @rfm
@fredkiefer can you take one final look at this? I really have taken this as far as I can. It's not perfect, but it works. I would like to merge this so that others can inspect and improve the code.
Unless there is an objection I am going to merge this. I have taken it as far as I can. I want more people to be able to test it and improve it.
Just give me a few more hours. I am planing of doing a final review of this code tonight.
Okay. I didn't mean to rush you. I just wanted others to be able to take advantage of it.
Merging this with fred's okay. Everyone please test this and let me know what I have done wrong with decoding, if anything or how I can improve my approach.