QTMovie extends NSObject { public abstract NSArray tracksOfMediaType(String mediaTypeVideo);  static QTMovie movie(); static QTMovie movieWithFile_error(File file, ObjCObjectByReference errorReference); static QTMovie movieWithFile_error(String fileName, ObjCObjectByReference errorReference); static QTMovie movieWithAttributes_error(NSDictionary attributes, ObjCObjectByReference errorReference); static QTMovie movieWithQuickTimeMovie_disposeWhenDone_error(Pointer movie, boolean b, ObjCObjectByReference errorReference); abstract QTTime duration(); abstract void gotoBeginning(); abstract void gotoEnd(); abstract void play(); abstract void stop(); abstract void stepBackward(); abstract void stepForward(); abstract void setCurrentTime(QTTime time); abstract QTTime currentTime(); abstract void setRate(float speed); abstract float rate(); abstract NSImage frameImageAtTime(QTTime time); abstract NSObject attributeForKey(NSString key); abstract NSObject attributeForKey(String key); abstract NSObject attributeForKey(ID keyId); abstract void setAttribute_forKey(NSObject attribute, NSString key); abstract void setAttribute_forKey(NSObject attribute, String key); abstract void setAttribute_forKey(NSObject attribute, ID key); abstract void insertSegmentOfMovie_timeRange_atTime(QTMovie movie, QTTimeRange range, QTTime time); abstract void insertSegmentOfMovie_fromRange_scaledToRange(QTMovie movie, QTTimeRange srcRange, QTTimeRange dstRange); abstract void insertEmptySegmentAt(QTTimeRange range); abstract NSArray tracksOfMediaType(String mediaTypeVideo); abstract NSArray tracksOfMediaType(ID mediaTypeVideo); abstract NSArray tracks(); abstract void setSelection(QTTimeRange timeRange); abstract QTTime selectionStart(); abstract QTTime selectionDuration(); abstract QTTime selectionEnd(); abstract void writeToFile_withAttributes(String filename, NSDictionary attributes); abstract Pointer quickTimeMovie(); static final String QTMovieTimeScaleAttribute; static final String QTMovieFileNameAttribute; static final String QTMovieOpenAsyncOKAttribute; static final String QTMoviePlaysSelectionOnlyAttribute; static final String QTMovieLoadStateAttribute; static final long QTMovieLoadStateError; static final long QTMovieLoadStateLoading; static final long QTMovieLoadStateComplete; static final String QTMovieFlatten; static final String QTMovieExport; static final String QTMovieExportType; static final String QTMovieEditableAttribute; }
@Test public void testGetQTMedia() throws Exception { QTMovie movie = loadMovie(testMovieFile); QTTrack track = Rococoa.cast(movie.tracksOfMediaType(QTMedia.QTMediaTypeVideo).objectAtIndex(0), QTTrack.class); QTMedia media = track.media(); if (!Platform.is64Bit()) media.quickTimeMedia(); }