Skip to content

Commit 90d5118

Browse files
authored
Merge pull request #144 from gnustep/NSMovie_branch
Create files to support NSMovie and NSMovieView
2 parents d8549cc + 97b10fe commit 90d5118

18 files changed

+5294
-2065
lines changed

ChangeLog

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1+
2025-05-29 Gregory John Casamento <greg.casamento@gmail.com>
2+
3+
* config.make.in: Add HAVE_* variables.
4+
* configure
5+
* configure.ac: Look for relevant libraries
6+
* Headers/Additions/GNUstepGUI/config.h.in
7+
* Headers/AppKit/NSMovie.h
8+
* Headers/AppKit/NSMovieView.h
9+
* Source/GNUmakefile
10+
* Source/GNUmakefile.preamble
11+
* Source/GSAudioPlayer.h
12+
* Source/GSAudioPlayer.m: Added to play audio from avcodec
13+
* Source/GSMovieView.h
14+
* Source/GSMovieView.m: Subclass to handle video playback
15+
* Source/NSMovie.m
16+
* Source/NSMovieView.m: Cleanup and add textfield.
17+
* Source/NSSound.m: Cleanup NSSound, add support for playing
18+
ffmpeg movies using NSMovie, NSMovieView.
19+
120
2025-04-30 Gregory John Casamento <greg.casamento@gmail.com>
221

3-
* Headers/AppKit/NSColorSpace.h: Add NSColorSpaceModel* enumerated values.
22+
* Headers/AppKit/NSColorSpace.h: Add NSColorSpaceModel*
23+
enumerated values.
424

525
2025-02-11 Richard Frith-Macdonald <rfm@gnu.org>
626

@@ -9,8 +29,7 @@
929
* INSTALL:
1030
* NEWS:
1131
* Source/DocMakefile:
12-
* Version:
13-
Updates for 0.32.0 release
32+
* Version: Updates for 0.32.0 release
1433

1534
2024-11-08 Gregory John Casamento <greg.casamento@gmail.com>
1635

@@ -27,7 +46,8 @@
2746

2847
2024-10-29 Fred Kiefer <FredKiefer@gmx.de>
2948

30-
* Headers/AppKit/NSLayoutAnchor.h: Add missing include that is required after a change in base.
49+
* Headers/AppKit/NSLayoutAnchor.h: Add missing include that is
50+
required after a change in base.
3151
* Source/NSTableView.m: Forward declare new methods.
3252

3353
2024-08-29 Gregory John Casamento <greg.casamento@gmail.com>

Headers/Additions/GNUstepGUI/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@
148148
/* MagickCore >= 7 */
149149
#undef MAGICKCORE_7_OR_NEWER
150150

151+
/* avcodec */
152+
#undef HAVE_AVCODEC
153+
151154
/* mntent structure member name */
152155
#undef MNT_FSNAME
153156

Headers/AppKit/NSMovie.h

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/** <title>NSMovie</title>
1+
/* <title>NSMovie</title>
22
33
<abstract>Encapsulate a Quicktime movie</abstract>
44
55
Copyright <copy>(C) 2003 Free Software Foundation, Inc.</copy>
66
7+
Author: Gregory John Casamento <greg.casamento@gmail.com>
8+
Date: May 2025
79
Author: Fred Kiefer <FredKiefer@gmx.de>
810
Date: March 2003
911
@@ -28,9 +30,25 @@
2830

2931
#ifndef _GNUstep_H_NSMovie
3032
#define _GNUstep_H_NSMovie
31-
#import <AppKit/AppKitDefines.h>
32-
3333
#import <Foundation/NSObject.h>
34+
#import "AppKit/AppKitDefines.h"
35+
36+
/**
37+
* NSMovie
38+
*
39+
* Encapsulates a QuickTime movie object, providing methods to initialize and
40+
* retrieve movie data from various sources, such as NSData, NSURL, or NSPasteboard.
41+
*
42+
* Instance Variables:
43+
* _movie:
44+
* The raw NSData representing the contents of the QuickTime movie.
45+
*
46+
* _url:
47+
* The URL from which the movie was loaded. May be nil if not URL-based.
48+
*
49+
* _tmp:
50+
* A boolean indicating whether the movie data is temporary (not persisted).
51+
*/
3452

3553
@class NSArray;
3654
@class NSData;
@@ -41,19 +59,49 @@ APPKIT_EXPORT_CLASS
4159
@interface NSMovie : NSObject <NSCopying, NSCoding>
4260
{
4361
@private
44-
NSData* _movie;
45-
NSURL* _url;
62+
NSData* _movie;
63+
NSURL* _url;
64+
BOOL _tmp;
4665
}
4766

67+
/**
68+
* An array of all of the types NSMovie can support.
69+
*/
4870
+ (NSArray*) movieUnfilteredFileTypes;
71+
72+
/**
73+
* An array of all of the pasteboard types NSMovie can support.
74+
*/
4975
+ (NSArray*) movieUnfilteredPasteboardTypes;
76+
77+
/**
78+
* Returns YES, if the object can be initialized with the given pasteboard.
79+
*/
5080
+ (BOOL) canInitWithPasteboard: (NSPasteboard*)pasteboard;
5181

52-
- (id) initWithMovie: (void*)movie;
53-
- (id) initWithURL: (NSURL*)url byReference: (BOOL)byRef;
54-
- (id) initWithPasteboard: (NSPasteboard*)pasteboard;
82+
/**
83+
* Returns an NSMovie with the raw data pointed to by movie.
84+
*/
85+
- (instancetype) initWithMovie: (void*)movie;
5586

87+
/**
88+
* Returns an NSMovie with the given URL. byRef should be YES if it is by reference.
89+
*/
90+
- (instancetype) initWithURL: (NSURL*)url byReference: (BOOL)byRef;
91+
92+
/**
93+
* Returns an NSMovie initialized with the pasteboard passed in.
94+
*/
95+
- (instancetype) initWithPasteboard: (NSPasteboard*)pasteboard;
96+
97+
/**
98+
* Returns the raw data for the movie.
99+
*/
56100
- (void*) QTMovie;
101+
102+
/**
103+
* Returns the URL of the movie to be played.
104+
*/
57105
- (NSURL*) URL;
58106

59107
@end

0 commit comments

Comments
 (0)