libs-gui icon indicating copy to clipboard operation
libs-gui copied to clipboard

Create files to support NSMovie and NSMovieView

Open gcasa opened this issue 3 years ago • 6 comments

implementation for NSMovie and NSMovieView. The tests for this are here: https://github.com/gcasa/NSMovie_test https://github.com/gcasa/apps-videoplayer

gcasa avatar Mar 20 '22 23:03 gcasa

Completely revamped and simplified.

gcasa avatar May 26 '25 15:05 gcasa

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.

gcasa avatar May 29 '25 20:05 gcasa

movie_screenshot

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.

gcasa avatar May 30 '25 23:05 gcasa

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.

gcasa avatar Jun 04 '25 14:06 gcasa

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.

gcasa avatar Jun 10 '25 21:06 gcasa

Just as a note NSSound is not fast enough to handle the samples being fed, so it was necessary to create the audio player.

gcasa avatar Jun 11 '25 19:06 gcasa

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.

gcasa avatar Jul 29 '25 01:07 gcasa

screen_grab

The sound is now working and I have added a set of (default) controls.

gcasa avatar Jul 29 '25 01:07 gcasa

@fredkiefer Take a look at the updates. Thanks for reviewing the code.

gcasa avatar Aug 03 '25 03:08 gcasa

I had to revert some of the previous changes. Back to fac27f8. You'll need to do a fresh checkout.

gcasa avatar Aug 03 '25 18:08 gcasa

@fredkiefer I have addressed the issues you mentioned. :)

gcasa avatar Aug 03 '25 21:08 gcasa

@rfm Please take a look at this one as well.

gcasa avatar Sep 12 '25 17:09 gcasa

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

gcasa avatar Sep 15 '25 15:09 gcasa

I think this PR is ready as well, @fredkiefer / @rfm

gcasa avatar Sep 24 '25 21:09 gcasa

@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.

gcasa avatar Oct 02 '25 02:10 gcasa

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.

gcasa avatar Oct 04 '25 15:10 gcasa

Just give me a few more hours. I am planing of doing a final review of this code tonight.

fredkiefer avatar Oct 04 '25 18:10 fredkiefer

Okay. I didn't mean to rush you. I just wanted others to be able to take advantage of it.

gcasa avatar Oct 05 '25 03:10 gcasa

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.

gcasa avatar Oct 06 '25 02:10 gcasa