Package javax.media.format

Examples of javax.media.format.VideoFormat


        Vector images) {
      this.width = width;
      this.height = height;
      this.images = images;

      format = new VideoFormat(VideoFormat.JPEG, new Dimension(width,
          height), Format.NOT_SPECIFIED, Format.byteArray,
          (float) frameRate);
    }
View Full Code Here


    return success;
  }

  private void listDevices() {
    Vector deviceInfos = CaptureDeviceManager
        .getDeviceList(new VideoFormat("RGB"));
    if (deviceInfos.isEmpty()) {
      System.out.println("No capture devices found.");
    } else {
      for (Object o : deviceInfos) {
        CaptureDeviceInfo info = (CaptureDeviceInfo) o;
View Full Code Here

        System.out.println("can't find video track");
        return false;
    }
   
    // Read video format
    VideoFormat f = (VideoFormat)vtc.getFormat();
    width = (int)f.getSize().getWidth();
    height = (int)f.getSize().getHeight();

    // create images
    bsGraphicsRenderer.setFrontBuffer(imageFactory.createBufferedImage((int)f.getSize().getWidth(), (int)f.getSize().getHeight(), BufferTypes.RGB_3Byte));
    bsGraphicsRenderer.setBackBuffer(imageFactory.createBufferedImage((int)f.getSize().getWidth(), (int)f.getSize().getHeight(), BufferTypes.RGB_3Byte));
   
    try {
        vtc.setRenderer(bsGraphicsRenderer);
    } catch ( Exception ex) {
        ex.printStackTrace();
View Full Code Here

    if (!(in.getFormat() instanceof VideoFormat && in.getData() != null)) {
      return PlugIn.BUFFER_PROCESSED_FAILED;
    }

    byte[] bin, bout;
    VideoFormat vformat = (VideoFormat) in.getFormat();

    // get input byte array
    if (in.getData() instanceof byte[]) {
      bin = (byte[]) in.getData();
    } else if (in.getData() instanceof int[]) {
View Full Code Here

TOP

Related Classes of javax.media.format.VideoFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.