public class Capture extends PImage implements PConstants
Modifier and Type | Field and Description |
---|---|
float |
frameRate |
org.gstreamer.Pipeline |
pipeline |
ALPHA_MASK, BLUE_MASK, format, GREEN_MASK, height, loaded, parent, pixelDensity, pixelHeight, pixels, pixelWidth, RED_MASK, width
ADD, 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 |
---|
Capture(PApplet parent) |
Capture(PApplet parent,
int requestWidth,
int requestHeight) |
Capture(PApplet parent,
int requestWidth,
int requestHeight,
int frameRate)
Advanced
|
Capture(PApplet parent,
int requestWidth,
int requestHeight,
String cameraName)
Advanced
|
Capture(PApplet parent,
int requestWidth,
int requestHeight,
String cameraName,
int frameRate)
Advanced
|
Capture(PApplet parent,
String requestConfig) |
Modifier and Type | Method and Description |
---|---|
boolean |
available()
( begin auto-generated from Capture_available.xml )
Returns "true" when a new video frame is available to read.
|
void |
dispose()
Disposes all the native resources associated to this capture device.
|
void |
disposeBuffer(Object buf)
NOTE: This is not official API and may/will be removed at any time.
|
int |
get(int x,
int y) |
boolean |
hasBufferSink()
NOTE: This is not official API and may/will be removed at any time.
|
static String[] |
list()
( begin auto-generated from Capture_list.xml )
Gets a list of all available capture devices such as a camera.
|
void |
loadPixels() |
void |
post() |
void |
read()
( begin auto-generated from Capture_read.xml )
Reads the current video frame.
|
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.
|
void |
start()
( begin auto-generated from Capture_start.xml )
Starts capturing frames from the selected device.
|
void |
stop()
( begin auto-generated from Capture_stop.xml )
Stops capturing frames from an attached device.
|
blend, blend, blendColor, clone, copy, copy, copy, filter, filter, get, get, getImage, getModifiedX1, getModifiedX2, getModifiedY1, getModifiedY2, getNative, init, init, isLoaded, isModified, mask, mask, resize, save, set, set, setLoaded, setLoaded, setModified, setModified, updatePixels, updatePixels
public Capture(PApplet parent)
public Capture(PApplet parent, int requestWidth, int requestHeight)
parent
- typically use "this"requestWidth
- width of the framerequestHeight
- height of the framepublic Capture(PApplet parent, int requestWidth, int requestHeight, int frameRate)
frameRate
- number of frames to read per secondpublic Capture(PApplet parent, int requestWidth, int requestHeight, String cameraName)
cameraName
- name of the camerapublic void dispose()
public boolean available()
public void start()
public void stop()
public void read()
public void loadPixels()
loadPixels
in class PImage
public static String[] list()
public void setBufferSink(Object sink)
Object
- destpublic void setBufferSink(Object sink, String mask)
Object
- destString
- maskpublic boolean hasBufferSink()
public void disposeBuffer(Object buf)
public void post()
Processing video library by The Processing Foundation. (c) 2011-14