-
大小: 9.11MB文件类型: .7z金币: 1下载: 0 次发布日期: 2023-11-16
- 语言: Java
- 标签: processing
资源简介
processing x86的video库,解压后,按文件夹路径替换就行。
processing\modes\java\libraries\video
代码片段和文件信息
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
Part of the Processing project - http://processing.org
Copyright (c) 2004-12 Ben Fry and Casey Reas
The previous version of this code was developed by Hernando Barragan
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License or (at your option) any later version.
This library is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not write to the
Free Software Foundation Inc. 59 Temple Place Suite 330
Boston MA 02111-1307 USA
*/
package processing.video;
import processing.core.*;
import java.nio.*;
import java.util.ArrayList;
import java.io.File;
import java.lang.reflect.*;
import org.gstreamer.*;
import org.gstreamer.Buffer;
import org.gstreamer.elements.*;
import org.gstreamer.interfaces.PropertyProbe;
import org.gstreamer.interfaces.Property;
/**
* ( begin auto-generated from Capture.xml )
*
* Datatype for storing and manipulating video frames from an attached
* capture device such as a camera. Use Capture.list() to show the
* names of any attached devices. Using the version of the constructor
* without name will attempt to use the last device used by a
* QuickTime program.
*
* ( end auto-generated )
*
* Advanced
* Class for storing and manipulating video frames from an attached capture
* device such as a camera.
* @webref video
* @usage application
*/
public class Capture extends PImage implements PConstants {
protected static String sourceElementName;
protected static String devicePropertyName;
protected static String indexPropertyName;
// Default gstreamer capture plugin for each platform and property names.
static {
if (Papplet.platform == MACOSX) {
sourceElementName = “qtkitvideosrc“;
devicePropertyName = “device-name“;
indexPropertyName = “device-index“;
} else if (Papplet.platform == WINDOWS) {
sourceElementName = “ksvideosrc“;
devicePropertyName = “device-name“;
indexPropertyName = “device-index“;
} else if (Papplet.platform == LINUX) {
sourceElementName = “v4l2src“;
// The “device“ property in v4l2src expects the device location
// (/dev/video0 etc). v4l2src has “device-name“ which requires the
// human-readable name... but how to query in linux?.
devicePropertyName = “device“;
indexPropertyName = “device-fd“;
} else {}
}
protected static boolean useResMacHack = true;
public float frameRate;
public Pipeline pipeline;
protected boole
评论
共有 条评论