3 summary:: A view responding to Wacom tablet
5 related:: Classes/Image
9 MovieView can play movies such as .mov and mpg, and image files like jpg, png, tiff and others.
11 note:: Not available in strong::Qt GUI:: ::
13 note:: strong:: prerequisits in SwingOSC ::
15 JSCMovieView is currently based on the Java Media Framework (JMF) which is not part of the standard java environment (Java SE) but needs to be installed separately. There is a reference implementation from Sun available for Linux, Windows and Mac OS X. It can be downloaded from http://java.sun.com/products/java-media/jmf/index.jsp (note: for Mac OS X you need the generic cross-platform version).
17 The reference implementation has rather poor media support (check this page: http://java.sun.com/products/java-media/jmf/2.1.1/formats.html ), so you might need to convert your movies or look out for extra JMF plug-ins. A really good plug-in is fobs4j !(ffpmeg objects for java) -> http://fobs.sourceforge.net/ !
18 You need to install the "jmf.jar" file in your system's java extensions folder, e.g. on Mac OS X that's "/Library/Java/Extensions". For fobs, do the same with "fobs4jmf.jar" and copy "jmf.properties" into "SwingOSC/build".
20 (in the future, FMJ (freedom for media in java) might be an alternative: http://fmj-sf.net)
30 The path to the movie.
32 SUBSECTION:: Movie Control
39 METHOD:: gotoBeginning
45 The frame index; an Integer.
47 METHOD:: playSelectionOnly
66 ## 0 - Playback runs forward and backward between both endpoints.
67 ## 1 - Restarts playback at beginning when end is reached.
68 ## 2 - Playback stops when end is reached.
72 One of the above Integers.
77 An instance of Float. 1.0 is the normal rate.
80 SUBSECTION:: Movie Editing
94 Defaults to code::nil::.
97 SUBSECTION:: Appearance
99 METHOD:: showControllerAndAdjustSize
102 A Boolean. Default is code::true::.
104 A Boolean. Default is code::true::.
106 METHOD:: resizeWithMagnification
107 Resizes the whole view, adjusts its contents.
112 METHOD:: fixedAspectRatio
121 w = Window("mov").front;
122 b = Button(w, Rect(0, 0, 150, 20))
123 .states_([["pick a file"]])
124 .action_({ File.openDialog("", { |path| m.path_(path) }) });
125 m = MovieView(w, Rect(0,20,360, 260));
127 // random-pick a tiff from the Help folder
128 m.path_("Help/*/*/*.tiff".pathMatch.choose);
130 // or point it to a movie (you may have that one too):
131 m.path_("/Library/Application\ Support/iDVD/Tutorial/Movies/Our\ First\ Snowman.mov");
135 m.muted_(false); // thank god
141 m.gotoEnd.rate_(-1).start;
143 // select a range on the controller and play it
144 m.rate_(1).playSelectionOnly_(true).start;
147 m.loopMode_(1); // only one direction
148 m.loopMode_(0).start; // back and forth
158 10.do { m.stepForward; };
161 // select with shift-drag, copy paste between movieviews or quicktime player
165 m.showControllerAndAdjustSize(true, true);
166 // resize compared to image size:
167 m.resizeWithMagnification(0.25);
169 //goto time (in seconds)
172 // not there yet, but would be nice to have:
173 // startFrame, length
174 m.setSelection_(20, 15);
177 m.frame_(frame); // jump to frame
178 m.frame.postln; // poll current frame pos