Important:
This class is deprecated. Use QTMovie instead.
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in Mac OS X v10.0 and later.
|
| Companion guide | |
| Declared in | NSMovie.h |
Important: This class is deprecated. Use QTMovie instead.
The NSMovie class implements a wrapper for a QuickTime Movie object, providing a simple interface for loading a movie into memory. These wrappers are known as movies.
The movie data can come from a URL or a pasteboard, including the drag-and-drop and cut-and-paste pasteboards. The data can be of any type recognized by QuickTime, including nonvideo data such as pure audio or even still images. Once loaded, you can obtain a pointer to the movie data and use the extensive QuickTime API to manipulate the data.
You can access information about the movie data an NSMovie object encapsulates by using the QTMovie class.
+ canInitWithPasteboard:
+ movieUnfilteredFileTypes
+ movieUnfilteredPasteboardTypes
– QTMovie
– URL
Indicates whether the class can initialize an instance of itself from the data on a given pasteboard.
+ (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard
Pasteboard with which the new NSMovie instance would be initialized.
YES when the receiver’s list of supported pasteboard types includes a data type available from pasteboard; NO otherwise.
NSMovie.h
Provides an array of strings representing the file types that contain supported movie data.
+ (NSArray *)movieUnfilteredFileTypes
Array of strings identifying the file types that contain supported movie data. This array may be passed directly to the NSOpenPanelrunModalForTypes: method.
The default list contains the filename extensions .mov and .MOV, and the HFS file type 'MooV'.
NSMovie.h
Provides an array of pasteboard types from which an NSMovie instance can be created.
+ (NSArray *)movieUnfilteredPasteboardTypes
Strings identifying the pasteboard types from which an NSMovie object can be created.
Compare the elements of this array to the available data types on a pasteboard to detect the presence of movie data.
NSMovie.hInitializes the receiver with a given QuickTime movie that has already been loaded into memory.
- (id)initWithMovie:(void *)movie
Movie object with which to initialize the receiver.
Initialized NSMovie object, or nil when movie is NULL.
When movie is NULL, the receiver is released.
In programs linked to Mac OS X v10.2 or earlier, the receiver becomes an owner of movie and disposes of it with the DisposeMovie function when the receiver is destroyed.
NSMovie.hInitializes the receiver with data from a given pasteboard.
- (id)initWithPasteboard:(NSPasteboard *)pasteboard
Pasteboard with which to initialize the receiver. It must contain data either of a type returned by movieUnfilteredPasteboardTypes or of type NSFilenamesPboardType. In the latter case, the filename should be for a file of a type returned by movieUnfilteredFileTypes. If the pasteboard contains multiple filenames, only the first name is used.
Initialized NSMovie object, or nil when unsuccessful.
When archiving an NSMovie object, the movie data is encoded if the data was obtained directly from pasteboard. If instead a filename was on the pasteboard, only the file’s URL is encoded.
If this method is unable to create a movie representation, the receiver is released.
NSMovie.hInitializes the receiver with data located at a given URL.
- (id)initWithURL:(NSURL *)movieUrl byReference:(BOOL)byReference
URL identifying the location of movie data. It can use any appropriate URL protocol, including file:, http:, or rtsp:, and reference any type of data recognized by QuickTime, including video, pure audio, or still images.
YES to encode only the URL when the receiver is archived; NO to have the receiver encode the movie’s QuickTime header information.
Initialized NSMovie object, or nil when unsuccessful.
For streamed media, use the QuickTime GetMovieLoadState function to determine whether all the movie data has been received yet.
If this method is unable to create a movie representation, the receiver is released.
NSMovie.hProvides an opaque pointer to the receiver’s QuickTime movie data.
- (void *)QTMovie
Movie object containing the receiver’s movie data. You can use this value with the QuickTime framework to directly access the movie data.
NSMovie.hProvides the URL of the file used to initialize the receiver.
- (NSURL *)URL
URL of the file containing the movie data used to initialize the receiver, or nil when the receiver wasn’t initialized from a file.
NSMovie.h
Last updated: 2007-03-26