@Override public void reset() { this.frameGrabber = new FFmpegFrameGrabber(filename); try { frameNumber = 0; finished = false; frameGrabber.start(); } catch (FrameGrabber.Exception e) { e.printStackTrace(); finished = true; return; } try { Frame frame = frameGrabber.grab(); next = converter.convert(frame); current = new BufferedImage(next.getWidth(),next.getHeight(),next.getType()); currentBoof = imageType.createImage(next.getWidth(),next.getHeight()); } catch (FrameGrabber.Exception e) { finished = true; } } }
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(videopath); try { grabber.start(); } catch (FrameGrabber.Exception e) { e.printStackTrace(); } double frameRate=grabber.getFrameRate();
public static void tryLoad() throws FrameGrabber.Exception { if (loadingException != null) { loadingException.printStackTrace(); throw loadingException; } else { try { if (context != null) { return; } Loader.load(org.bytedeco.javacpp.RealSense.class); // Context is shared accross cameras. context = new context(); System.out.println("RealSense devices found: " + context.get_device_count()); } catch (Throwable t) { throw loadingException = new FrameGrabber.Exception("Failed to load " + RealSenseFrameGrabber.class, t); } } }
} catch (Exception e) { System.out.println("Exception in the TryLoad !" + e); e.printStackTrace();
audioGrabber.stop(); } catch (FrameGrabber.Exception e) { e.printStackTrace(); } catch (FrameRecorder.Exception e) { e.printStackTrace();
public static void tryLoad() throws FrameGrabber.Exception { if (loadingException != null) { loadingException.printStackTrace(); throw loadingException; } else { try { if (freenect2Context != null) { return; } Loader.load(org.bytedeco.javacpp.freenect2.class); // Context is shared accross cameras. freenect2Context = new Freenect2(); } catch (Throwable t) { throw loadingException = new FrameGrabber.Exception("Failed to load " + OpenKinect2FrameGrabber.class, t); } } }
public static void tryLoad() throws FrameGrabber.Exception { if (loadingException != null) { loadingException.printStackTrace(); throw loadingException; } else { try { Loader.load(org.bytedeco.javacpp.FlyCapture2.class); } catch (Throwable t) { throw loadingException = new FrameGrabber.Exception("Failed to load " + FlyCapture2FrameGrabber.class, t); } } }