Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
9664cd4
Code compiles, now working on getting configure.ac fixed
gcasa May 25, 2025
31f0b8e
Update to be able to play content using NSMovie, add configure.ac cha…
gcasa May 25, 2025
472550e
Add new subclass to encapsulate the libav code
gcasa May 26, 2025
dd2ab8f
Update configure, GNUmakefile, NSMovieView
gcasa May 26, 2025
0b28f09
Add subclass
gcasa May 26, 2025
0191af1
Update NSMovieView to instantiate GSMovieView subclass
gcasa May 26, 2025
65f6ef3
Update memory management in the GSMovieView/NSMovieView classes
gcasa May 26, 2025
924bf25
Update comments
gcasa May 26, 2025
92d6782
Update comments
gcasa May 26, 2025
5cdb5ff
NSMovieView documentation
gcasa May 26, 2025
cb9838b
Initial changes to get audio working, may not compile
gcasa May 26, 2025
8ded625
Add initial changes for sound
gcasa May 26, 2025
3ba1f14
Decode audio packets
gcasa May 26, 2025
bece0a9
Add code that plays sound from the video
gcasa May 27, 2025
2cf7378
Slight improvements to sound handling
gcasa May 27, 2025
0a8e508
Move sound to a thread to stop it from being unsteady
gcasa May 27, 2025
8c595f4
Try to sync up audio output
gcasa May 27, 2025
01a68ce
Remove 2.0 conventions from code, add volume setting, initialization …
gcasa May 27, 2025
bc2d382
Fix warnings, and make audio a little smoother
gcasa May 27, 2025
b123e82
Use GNUstep define for RELEASE
gcasa May 28, 2025
672ff2a
Refactor NSMovieView to delegate certain methods to the subclass, in …
gcasa May 29, 2025
410713a
Add a delay of 1000 frames before we start the player thread.
gcasa May 29, 2025
c8ffb3c
Add audio support
gcasa May 29, 2025
5b3afb8
Rename Audio class, initialize it in the code if there is an audio st…
gcasa May 29, 2025
dd02d4f
Re-integrate audio
gcasa May 29, 2025
61bd0c8
Add logging when sound stream is found
gcasa May 29, 2025
4b9e6c3
Add other methods
gcasa May 30, 2025
a2e54de
Update actions, add implementation for some actions
gcasa May 30, 2025
ad69f77
Add proper declaration
gcasa May 30, 2025
1150ab0
Add code to return list of supported video types
gcasa May 30, 2025
8392360
Add audio buffer using NSData
gcasa May 31, 2025
9a7ac68
Add pasteboard types, clean up NSMovie
gcasa May 31, 2025
f87e261
Add ring buffer class
gcasa May 31, 2025
36b8414
Make sure swr_init is checked to see if it returns 0
gcasa Jun 3, 2025
fbf447a
Remove ring buffer
gcasa Jun 3, 2025
4de05f2
Fix memory leak
gcasa Jun 3, 2025
2f24c56
Whitespace cleanup
gcasa Jun 3, 2025
725a127
Add thread_count and thread_type
gcasa Jun 4, 2025
04414e9
Cleanup and add some missing methods
gcasa Jun 4, 2025
2e5ec16
Remove uneeded retain calls
gcasa Jun 4, 2025
a047612
Get the size on the main thread instead of getting it from prepare...
gcasa Jun 5, 2025
c8d40f5
Minor cleanup
gcasa Jun 5, 2025
708a2da
terminate the thread, cleanup
gcasa Jun 5, 2025
c775466
Add stream indexes to the object
gcasa Jun 5, 2025
39d05ce
Implement gotoEnd, gotoBeginning, etc
gcasa Jun 5, 2025
7243804
Improve methods, add debugging info
gcasa Jun 5, 2025
67f8966
Fixing stop/start/goto methods
gcasa Jun 7, 2025
60cf0fd
Add notification handler to shut down the threads
gcasa Jun 7, 2025
e467716
Add TextField so that status can be shown. This is a GS extension
gcasa Jun 7, 2025
cc24648
Add support for status field
gcasa Jun 7, 2025
dff017a
Skip any corrupt packets
gcasa Jun 7, 2025
08c88d6
Add renderFrame: method
gcasa Jun 8, 2025
e339494
Add renderFrame: method
gcasa Jun 8, 2025
03f591c
Separate concerns into different methods so that setup, loop, and clo…
gcasa Jun 8, 2025
79ba3c7
Add logic to skip forward
gcasa Jun 9, 2025
3f49929
Cleanup, and cache stream
gcasa Jun 9, 2025
c92347e
Initial changes for pause
gcasa Jun 10, 2025
cf8e6be
Add pause
gcasa Jun 10, 2025
0e6caac
Separate out audio player and utilities, update GNUmakefile
gcasa Jun 10, 2025
aa13204
Pause sound and video when movie is paused
gcasa Jun 10, 2025
61967d6
Optimize some of the code, change logging
gcasa Jun 12, 2025
e071451
Cleanup, refactor
gcasa Jun 14, 2025
ad634be
Streamline getting the movieRect so that it doesn't need to get the s…
gcasa Jun 14, 2025
c5c673a
Merge branch 'master' into NSMovie_reset_refactor
gcasa Jul 21, 2025
0af894a
Simplify some code
gcasa Jul 22, 2025
9f77476
Remove uneeded code for notifications, add status set/get methods
gcasa Jul 22, 2025
5611748
Movie startVideo/stopVideo logic into start: & stop: respectively
gcasa Jul 23, 2025
ad3a2c6
Clean up code
gcasa Jul 23, 2025
ee3ef44
Update start/stop to start and stop the feed, since setMovie: does no…
gcasa Jul 23, 2025
66ad36b
Merge branch 'master' of github.com:gnustep/libs-gui into NSMovie_branch
gcasa Jul 23, 2025
eb00005
Switch to using the audioclock as the master to smooth out playback
gcasa Jul 28, 2025
138cd88
minor corrections to status field
gcasa Jul 28, 2025
7238e95
Merge branch 'NSMovie_audioclock_branch' into NSMovie_branch
gcasa Jul 28, 2025
bf0a081
Add implementation of step methods
gcasa Jul 28, 2025
1cafa63
Merge changes
gcasa Jul 28, 2025
9b0cace
Update start: stop: methods for consistency
gcasa Jul 28, 2025
7144fe2
Update logging
gcasa Jul 28, 2025
4259949
Merge branch 'NSMovie_branch' of github.com:gnustep/libs-gui into NSM…
gcasa Jul 28, 2025
6c88e75
Minor cleanup
gcasa Jul 29, 2025
04d569f
Fix audio delay and skipping
gcasa Jul 29, 2025
a284592
Latest changes
gcasa Jul 29, 2025
369e8a1
Make frame skipping logic less agressive
gcasa Jul 29, 2025
4c27e55
cleanup whitespace and indent, finalize fixes
gcasa Jul 29, 2025
9328a60
Minor changes to prevent messy NSLog output
gcasa Jul 31, 2025
ebfe509
Don't build NSMovie/NSMovieView unless we have both avcodec/ao
gcasa Jul 31, 2025
dfeef5e
Fix configure.ac and configure
gcasa Aug 1, 2025
720d2b4
Add checks to see if video and audio components are available
gcasa Aug 1, 2025
3c3a505
Update configure, NSMovieView
gcasa Aug 1, 2025
8d6bda5
Merge branch 'master' of github.com:gnustep/libs-gui into NSMovie_branch
Aug 2, 2025
fc4fa54
Movie category smash to subclass file
gcasa Aug 2, 2025
de39322
Remove unneeded ifdef and include from NSMovieView
gcasa Aug 2, 2025
9f3bc35
Update changelog
gcasa Aug 2, 2025
e2be4f4
Merge branch 'NSMovie_branch' of github.com:gnustep/libs-gui into NSM…
gcasa Aug 2, 2025
5877693
Add keyed coding, incorporate advice by @fredkeifer
gcasa Aug 2, 2025
e1e7bad
Clean up fprintf calls, use NSLog/NSDebugLog as appropriate
gcasa Aug 2, 2025
fe6c261
Reuse audio buffer as suggested by @fredkeifer
gcasa Aug 2, 2025
fac27f8
Re-use audio buffer, clean up, minor fixes
gcasa Aug 2, 2025
6aebbbf
Avoid potential memory issues
gcasa Aug 3, 2025
d0c0120
Update to add methods to stretch out the time of the audio sample in …
gcasa Aug 4, 2025
d939b62
Add better comments to both NSMovie/NSMovieView for documentation
gcasa Aug 4, 2025
5441e1e
Add currentPosition extension to get how far we are into the movie
gcasa Aug 4, 2025
22201c8
Add reset method
gcasa Aug 16, 2025
17646bb
Fix issue with stop:
gcasa Aug 16, 2025
5c41971
Update rate: it's between 0.0-1.0 per documentation
gcasa Aug 20, 2025
9118528
Refactoring start/stop in GSAudioPlayer
gcasa Aug 23, 2025
beb08b8
Update stop/start methods
gcasa Aug 23, 2025
a419288
Do not set needsRestart
gcasa Aug 23, 2025
c67557d
Cleanup, remove rewind
gcasa Aug 24, 2025
6533067
Use _flags instead of BOOL ivars
gcasa Aug 24, 2025
6a3dd11
Code cleanup
gcasa Aug 27, 2025
1217e56
Attempt at a fix for the start/stop issue
gcasa Aug 27, 2025
2c8f118
Minor cleanup
gcasa Aug 30, 2025
ce77601
Fix issue with stop/start causing audio to rewind (confirmed fix).
gcasa Aug 30, 2025
04a09db
Fix issue with stop/start causing audio to rewind (confirmed fix).
gcasa Aug 30, 2025
7798ecb
improve gotoEnd:
gcasa Aug 31, 2025
ff48df0
Fix method stepBack:
gcasa Aug 31, 2025
8c70550
Fix goForward:
gcasa Aug 31, 2025
2dd68df
Fix goForward:, clean up commented out code
gcasa Aug 31, 2025
02a258d
Attempt to show the frame we have seeked to in goForward:
gcasa Aug 31, 2025
f2701c6
Revert "Attempt to show the frame we have seeked to in goForward:"
gcasa Aug 31, 2025
402001e
Add positionField
gcasa Sep 1, 2025
3fcd319
Remove uneeded set/get for statusField
gcasa Sep 1, 2025
c97b0aa
Remove declarations for duplicate method
gcasa Sep 1, 2025
a5c00d5
Move NSLog -> NSDebugLog calls to reduce noise in the logs
gcasa Sep 1, 2025
8f1edf4
Address issues flaged by @fredkiefer
gcasa Sep 4, 2025
89f05cf
Merge branch 'master' into NSMovie_branch
gcasa Sep 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
2025-05-29 Gregory John Casamento <[email protected]>

* config.make.in: Add HAVE_* variables.
* configure
* configure.ac: Look for relevant libraries
* Headers/Additions/GNUstepGUI/config.h.in
* Headers/AppKit/NSMovie.h
* Headers/AppKit/NSMovieView.h
* Source/GNUmakefile
* Source/GNUmakefile.preamble
* Source/GSAudioPlayer.h
* Source/GSAudioPlayer.m: Added to play audio from avcodec
* Source/GSMovieView.h
* Source/GSMovieView.m: Subclass to handle video playback
* Source/NSMovie.m
* Source/NSMovieView.m: Cleanup and add textfield.
* Source/NSSound.m: Cleanup NSSound, add support for playing
ffmpeg movies using NSMovie, NSMovieView.

2025-04-30 Gregory John Casamento <[email protected]>

* Headers/AppKit/NSColorSpace.h: Add NSColorSpaceModel* enumerated values.
* Headers/AppKit/NSColorSpace.h: Add NSColorSpaceModel*
enumerated values.

2025-02-11 Richard Frith-Macdonald <[email protected]>

Expand All @@ -9,8 +29,7 @@
* INSTALL:
* NEWS:
* Source/DocMakefile:
* Version:
Updates for 0.32.0 release
* Version: Updates for 0.32.0 release

2024-11-08 Gregory John Casamento <[email protected]>

Expand All @@ -27,7 +46,8 @@

2024-10-29 Fred Kiefer <[email protected]>

* Headers/AppKit/NSLayoutAnchor.h: Add missing include that is required after a change in base.
* Headers/AppKit/NSLayoutAnchor.h: Add missing include that is
required after a change in base.
* Source/NSTableView.m: Forward declare new methods.

2024-08-29 Gregory John Casamento <[email protected]>
Expand Down
3 changes: 3 additions & 0 deletions Headers/Additions/GNUstepGUI/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
/* MagickCore >= 7 */
#undef MAGICKCORE_7_OR_NEWER

/* avcodec */
#undef HAVE_AVCODEC

/* mntent structure member name */
#undef MNT_FSNAME

Expand Down
64 changes: 56 additions & 8 deletions Headers/AppKit/NSMovie.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/** <title>NSMovie</title>
/* <title>NSMovie</title>

<abstract>Encapsulate a Quicktime movie</abstract>

Copyright <copy>(C) 2003 Free Software Foundation, Inc.</copy>

Author: Gregory John Casamento <[email protected]>
Date: May 2025
Author: Fred Kiefer <[email protected]>
Date: March 2003

Expand All @@ -28,9 +30,25 @@

#ifndef _GNUstep_H_NSMovie
#define _GNUstep_H_NSMovie
#import <AppKit/AppKitDefines.h>

#import <Foundation/NSObject.h>
#import "AppKit/AppKitDefines.h"

/**
* NSMovie
*
* Encapsulates a QuickTime movie object, providing methods to initialize and
* retrieve movie data from various sources, such as NSData, NSURL, or NSPasteboard.
*
* Instance Variables:
* _movie:
* The raw NSData representing the contents of the QuickTime movie.
*
* _url:
* The URL from which the movie was loaded. May be nil if not URL-based.
*
* _tmp:
* A boolean indicating whether the movie data is temporary (not persisted).
*/

@class NSArray;
@class NSData;
Expand All @@ -41,19 +59,49 @@ APPKIT_EXPORT_CLASS
@interface NSMovie : NSObject <NSCopying, NSCoding>
{
@private
NSData* _movie;
NSURL* _url;
NSData* _movie;
NSURL* _url;
BOOL _tmp;
}

/**
* An array of all of the types NSMovie can support.
*/
+ (NSArray*) movieUnfilteredFileTypes;

/**
* An array of all of the pasteboard types NSMovie can support.
*/
+ (NSArray*) movieUnfilteredPasteboardTypes;

/**
* Returns YES, if the object can be initialized with the given pasteboard.
*/
+ (BOOL) canInitWithPasteboard: (NSPasteboard*)pasteboard;

- (id) initWithMovie: (void*)movie;
- (id) initWithURL: (NSURL*)url byReference: (BOOL)byRef;
- (id) initWithPasteboard: (NSPasteboard*)pasteboard;
/**
* Returns an NSMovie with the raw data pointed to by movie.
*/
- (instancetype) initWithMovie: (void*)movie;

/**
* Returns an NSMovie with the given URL. byRef should be YES if it is by reference.
*/
- (instancetype) initWithURL: (NSURL*)url byReference: (BOOL)byRef;

/**
* Returns an NSMovie initialized with the pasteboard passed in.
*/
- (instancetype) initWithPasteboard: (NSPasteboard*)pasteboard;

/**
* Returns the raw data for the movie.
*/
- (void*) QTMovie;

/**
* Returns the URL of the movie to be played.
*/
- (NSURL*) URL;

@end
Expand Down
Loading