private static Pipeline pipe;
public static void main(String[] args) {
args = Gst.init("VideoTest", args);
pipe = new Pipeline("VideoTest");
//final Element videosrc = ElementFactory.make("videotestsrc", "source");
final Element videosrc = ElementFactory.make("v4l2src", "source");
final Element videofilter = ElementFactory.make("capsfilter", "filter");
videofilter.setCaps(Caps.fromString("dv1394src ! video/x-dv ! dvdemux ! "
+ "dvdec ! ffmpegcolorspace ! video/x-raw-rgb, width=720, height=576"
+ ", bpp=32, depth=24, framerate=25/1"));
//videofilter.setCaps(Caps.fromString("dv1394src ! video/x-dv ! dvdemux ! "
// + "dvdec ! ffmpegcolorspace ! video/x-raw-rgb, width=720, height=576"
// + ", bpp=32, depth=24, framerate=25/1"));
SwingUtilities.invokeLater(new Runnable() {
public void run() {
VideoComponent videoComponent = new VideoComponent();
Element videosink = videoComponent.getElement();
pipe.addMany(videosrc, videofilter, videosink);
Element.linkMany(videosrc, videofilter, videosink);
// Now create a JFrame to display the video output
JFrame frame = new JFrame("Duo: Testando webacam com gstream");