public class Movie
extends processing.core.PImage
implements processing.core.PConstants
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
available |
protected Object |
bufferSink |
protected int |
bufHeight |
protected int |
bufWidth |
protected String |
copyMask |
protected int[] |
copyPixels |
protected Object |
eventHandler |
String |
filename |
protected boolean |
firstFrame |
float |
frameRate |
protected Method |
movieEventMethod |
protected org.gstreamer.Buffer |
natBuffer |
protected org.gstreamer.elements.BufferDataAppSink |
natSink |
protected boolean |
newFrame |
protected boolean |
outdatedPixels |
protected boolean |
paused |
org.gstreamer.elements.PlayBin2 |
playbin |
protected boolean |
playing |
protected float |
rate |
protected boolean |
repeat |
protected org.gstreamer.elements.RGBDataAppSink |
rgbSink |
protected boolean |
seeking |
protected Method |
sinkCopyMethod |
protected Method |
sinkDisposeMethod |
protected Method |
sinkGetMethod |
protected boolean |
sinkReady |
protected Method |
sinkSetMethod |
static String[] |
supportedProtocols |
protected boolean |
useBufferSink |
protected float |
volume |
ALPHA_MASK, BLUE_MASK, format, GREEN_MASK, height, loaded, modified, mx1, mx2, my1, my2, parent, pixelDensity, pixelHeight, pixels, pixelWidth, RED_MASK, saveImageFormats, widthADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z| Constructor and Description |
|---|
Movie(processing.core.PApplet parent,
String filename)
Creates an instance of GSMovie loading the movie from filename.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
available()
( begin auto-generated from Movie_available.xml )
Returns "true" when a new movie frame is available to read.
|
void |
dispose()
Disposes all the native resources associated to this movie.
|
void |
disposeBuffer(Object buf)
NOTE: This is not official API and may/will be removed at any time.
|
float |
duration()
( begin auto-generated from Movie_duration.xml )
Returns the length of the movie in seconds.
|
protected void |
eosEvent() |
protected void |
finalize()
Finalizer of the class.
|
void |
frameRate(float ifps)
( begin auto-generated from Movie_frameRate.xml )
Sets how often frames are read from the movie.
|
int |
get(int x,
int y) |
protected void |
getImpl(int sourceX,
int sourceY,
int sourceWidth,
int sourceHeight,
processing.core.PImage target,
int targetX,
int targetY) |
protected void |
getSinkMethods() |
protected float |
getSourceFrameRate()
Get the original framerate of the source video.
|
protected int |
getSourceHeight()
Get the height of the source video.
|
protected int |
getSourceWidth()
Get the width of the source video.
|
boolean |
hasBufferSink()
NOTE: This is not official API and may/will be removed at any time.
|
protected void |
initCopyMask() |
protected void |
initGStreamer(processing.core.PApplet parent,
String filename) |
protected void |
initSink() |
protected void |
invokeEvent(int w,
int h,
org.gstreamer.Buffer buffer) |
protected void |
invokeEvent(int w,
int h,
IntBuffer buffer) |
void |
jump(float where)
( begin auto-generated from Movie_jump.xml )
Jumps to a specific location within a movie.
|
void |
loadPixels() |
void |
loop()
( begin auto-generated from Movie_loop.xml )
Plays a movie continuously, restarting it when it's over.
|
void |
noLoop()
( begin auto-generated from Movie_noLoop.xml )
If a movie is looping, calling noLoop() will cause it to play until the
end and then stop on the last frame.
|
void |
pause()
( begin auto-generated from Movie_pause.xml )
Pauses a movie during playback.
|
void |
play()
( begin auto-generated from Movie_play.xml )
Plays a movie one time and stops at the last frame.
|
void |
post() |
void |
read()
( begin auto-generated from Movie_read.xml )
Reads the current frame of the movie.
|
void |
setBufferSink(Object sink)
Sets the object to use as destination for the frames read from the stream.
|
void |
setBufferSink(Object sink,
String mask)
Sets the object to use as destination for the frames read from the stream.
|
protected void |
setEventHandlerObject(Object obj)
Uses a generic object as handler of the movie.
|
void |
speed(float irate)
( begin auto-generated from Movie_speed.xml )
Sets the relative playback speed of the movie.
|
void |
stop()
( begin auto-generated from Movie_stop.xml )
Stops a movie from continuing.
|
float |
time()
( begin auto-generated from Movie_time.xml )
Returns the location of the playback head in seconds.
|
void |
volume(float v)
Change the volume.
|
blend, blend, blendColor, blurAlpha, blurARGB, blurRGB, buildBlurKernel, checkAlpha, clone, copy, copy, copy, dilate, erode, filter, filter, get, get, getImage, getModifiedX1, getModifiedX2, getModifiedY1, getModifiedY2, getNative, init, init, isLoaded, isModified, loadTIFF, mask, mask, opaque, resize, save, saveImageIO, saveTGA, saveTIFF, set, set, setImpl, setLoaded, setLoaded, setModified, setModified, updatePixels, updatePixelspublic static String[] supportedProtocols
public float frameRate
public String filename
public org.gstreamer.elements.PlayBin2 playbin
protected boolean playing
protected boolean paused
protected boolean repeat
protected float rate
protected int bufWidth
protected int bufHeight
protected float volume
protected Method movieEventMethod
protected Object eventHandler
protected boolean available
protected boolean sinkReady
protected boolean newFrame
protected org.gstreamer.elements.RGBDataAppSink rgbSink
protected int[] copyPixels
protected boolean firstFrame
protected boolean seeking
protected boolean useBufferSink
protected boolean outdatedPixels
protected Object bufferSink
protected Method sinkCopyMethod
protected Method sinkSetMethod
protected Method sinkDisposeMethod
protected Method sinkGetMethod
protected String copyMask
protected org.gstreamer.Buffer natBuffer
protected org.gstreamer.elements.BufferDataAppSink natSink
public Movie(processing.core.PApplet parent,
String filename)
parent - PAppletfilename - Stringpublic void dispose()
protected void finalize()
throws Throwable
public void frameRate(float ifps)
ifps - speed of the movie in frames per secondpublic void speed(float irate)
irate - speed multiplier for movie playbackpublic float duration()
public float time()
public void jump(float where)
where - position to jump to specified in secondspublic boolean available()
public void play()
public void loop()
public void noLoop()
public void pause()
public void stop()
public void read()
public void volume(float v)
float - vpublic void loadPixels()
loadPixels in class processing.core.PImagepublic int get(int x,
int y)
get in class processing.core.PImageprotected void getImpl(int sourceX,
int sourceY,
int sourceWidth,
int sourceHeight,
processing.core.PImage target,
int targetX,
int targetY)
getImpl in class processing.core.PImageprotected void initGStreamer(processing.core.PApplet parent,
String filename)
protected void setEventHandlerObject(Object obj)
protected void initSink()
protected void invokeEvent(int w,
int h,
IntBuffer buffer)
protected void invokeEvent(int w,
int h,
org.gstreamer.Buffer buffer)
protected void eosEvent()
protected int getSourceHeight()
protected float getSourceFrameRate()
protected int getSourceWidth()
public void setBufferSink(Object sink)
Object - destpublic void setBufferSink(Object sink, String mask)
Object - destString - maskpublic boolean hasBufferSink()
public void disposeBuffer(Object buf)
protected void getSinkMethods()
protected void initCopyMask()
public void post()
Copyright © 2001–2016 Processing Foundation. All rights reserved.