Codota Logo
MjpegFileWriter
Code IndexAdd Codota to your IDE (free)

How to use
MjpegFileWriter
in
com.jme3.app.state

Best Java code snippets using com.jme3.app.state.MjpegFileWriter (Showing top 20 results out of 315)

  • Common ways to obtain MjpegFileWriter
private void myMethod () {
MjpegFileWriter m =
  • Codota IconFile aviFile;new MjpegFileWriter(aviFile, width, height, framerate)
  • Smart code suggestions by Codota
}
origin: jMonkeyEngine/jmonkeyengine

public void preFrame(float tpf) {
  if (null == writer) {
    try {
      writer = new MjpegFileWriter(file, width, height, framerate);
    } catch (Exception ex) {
      Logger.getLogger(VideoRecorderAppState.class.getName()).log(Level.SEVERE, "Error creating file writer: {0}", ex);
    }
  }
}
origin: jMonkeyEngine/jmonkeyengine

public void addImage(Bitmap image, float quality) throws Exception {
  addImage(writeImageToBytes(image, quality));
}
origin: jMonkeyEngine/jmonkeyengine

public void cleanup() {
  try {
    while (freeItems.size() < numCpus) {
      Thread.sleep(10);
    }
    writer.finishAVI();
  } catch (Exception ex) {
    Logger.getLogger(VideoRecorderAppState.class.getName()).log(Level.SEVERE, "Error closing video: {0}", ex);
  }
  writer = null;
}
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(dwFlags)));
    baos.write(intBytes(swapInt(dwOffset)));
    baos.write(intBytes(swapInt(dwSize)));
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(cb)));
    baos.write(intBytes(swapInt(biSize)));
    baos.write(intBytes(swapInt(biWidth)));
    baos.write(intBytes(swapInt(biHeight)));
    baos.write(shortBytes(swapShort(biPlanes)));
    baos.write(shortBytes(swapShort(biBitCount)));
    baos.write(biCompression);
    baos.write(intBytes(swapInt(biSizeImage)));
    baos.write(intBytes(swapInt(biXPelsPerMeter)));
    baos.write(intBytes(swapInt(biYPelsPerMeter)));
    baos.write(intBytes(swapInt(biClrUsed)));
    baos.write(intBytes(swapInt(biClrImportant)));
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

public void addImage(Image image) throws Exception {
  addImage(image, 0.8f);
}

origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(dwFlags)));
    baos.write(intBytes(swapInt(dwOffset)));
    baos.write(intBytes(swapInt(dwSize)));
    baos.close();
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(cb)));
    baos.write(intBytes(swapInt(biSize)));
    baos.write(intBytes(swapInt(biWidth)));
    baos.write(intBytes(swapInt(biHeight)));
    baos.write(shortBytes(swapShort(biPlanes)));
    baos.write(shortBytes(swapShort(biBitCount)));
    baos.write(biCompression);
    baos.write(intBytes(swapInt(biSizeImage)));
    baos.write(intBytes(swapInt(biXPelsPerMeter)));
    baos.write(intBytes(swapInt(biYPelsPerMeter)));
    baos.write(intBytes(swapInt(biClrUsed)));
    baos.write(intBytes(swapInt(biClrImportant)));
    baos.close();
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

public void addImage(Bitmap image) throws Exception {
  addImage(image, 0.8f);
}
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(fileSize)));
    baos.write(fcc2);
    baos.write(fcc3);
    baos.write(intBytes(swapInt(listSize)));
    baos.write(fcc4);
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(cb)));
    baos.write(fccType);
    baos.write(fccHandler);
    baos.write(intBytes(swapInt(dwFlags)));
    baos.write(shortBytes(swapShort(wPriority)));
    baos.write(shortBytes(swapShort(wLanguage)));
    baos.write(intBytes(swapInt(dwInitialFrames)));
    baos.write(intBytes(swapInt(dwScale)));
    baos.write(intBytes(swapInt(dwRate)));
    baos.write(intBytes(swapInt(dwStart)));
    baos.write(intBytes(swapInt(dwLength)));
    baos.write(intBytes(swapInt(dwSuggestedBufferSize)));
    baos.write(intBytes(swapInt(dwQuality)));
    baos.write(intBytes(swapInt(dwSampleSize)));
    baos.write(intBytes(swapInt(left)));
    baos.write(intBytes(swapInt(top)));
    baos.write(intBytes(swapInt(right)));
    baos.write(intBytes(swapInt(bottom)));
    baos.close();
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

public void addImage(Image image, float quality) throws Exception {
  addImage(writeImageToBytes(image, quality));
}
origin: jMonkeyEngine/jmonkeyengine

public void preFrame(float tpf) {
  if (null == writer) {
    try {
      writer = new MjpegFileWriter(file, width, height, framerate);
    } catch (Exception ex) {
      Logger.getLogger(VideoRecorderAppState.class.getName()).log(Level.SEVERE, "Error creating file writer: {0}", ex);
    }
  }
}
origin: jMonkeyEngine/jmonkeyengine

public void cleanup() {
  logger.log(Level.INFO, "cleanup in VideoProcessor");
  logger.log(Level.INFO, "VideoProcessor numFrames: {0}", numFrames);
  try {
    while (freeItems.size() < numCpus) {
      Thread.sleep(10);
    }
    logger.log(Level.INFO, "finishAVI in VideoProcessor");
    writer.finishAVI();
  } catch (Exception ex) {
    Logger.getLogger(VideoRecorderAppState.class.getName()).log(Level.SEVERE, "Error closing video: {0}", ex);
  }
  writer = null;
}
origin: us.ihmc.thirdparty.jme/jme3-desktop

public void addImage(Image image) throws Exception {
  addImage(image, 0.8f);
}
 
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(size)));
    baos.write(fcc2);
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

  public byte[] toBytes() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    baos.write(fcc);
    baos.write(intBytes(swapInt(cb)));
    baos.write(fccType);
    baos.write(fccHandler);
    baos.write(intBytes(swapInt(dwFlags)));
    baos.write(shortBytes(swapShort(wPriority)));
    baos.write(shortBytes(swapShort(wLanguage)));
    baos.write(intBytes(swapInt(dwInitialFrames)));
    baos.write(intBytes(swapInt(dwScale)));
    baos.write(intBytes(swapInt(dwRate)));
    baos.write(intBytes(swapInt(dwStart)));
    baos.write(intBytes(swapInt(dwLength)));
    baos.write(intBytes(swapInt(dwSuggestedBufferSize)));
    baos.write(intBytes(swapInt(dwQuality)));
    baos.write(intBytes(swapInt(dwSampleSize)));
    baos.write(intBytes(swapInt(left)));
    baos.write(intBytes(swapInt(top)));
    baos.write(intBytes(swapInt(right)));
    baos.write(intBytes(swapInt(bottom)));
    return baos.toByteArray();
  }
}
origin: jMonkeyEngine/jmonkeyengine

  public Void call() throws Exception {
    Screenshots.convertScreenShot(item.buffer, item.image);
    item.data = writer.writeImageToBytes(item.image, quality);
    while (usedItems.peek() != item) {
      Thread.sleep(1);
    }
    writer.addImage(item.data);
    usedItems.poll();
    freeItems.add(item);
    return null;
  }
});
origin: us.ihmc.thirdparty.jme/jme3-desktop

public void preFrame(float tpf) {
  if (null == writer) {
    try {
      writer = new MjpegFileWriter(file, width, height, framerate);
    } catch (Exception ex) {
      Logger.getLogger(VideoRecorderAppState.class.getName()).log(Level.SEVERE, "Error creating file writer: {0}", ex);
    }
  }
}
origin: us.ihmc.thirdparty.jme/jme3-desktop

  public void cleanup() {
    try {
      while (freeItems.size() < numCpus) {
        Thread.sleep(10);
      }
      writer.finishAVI();
    } catch (Exception ex) {
      Logger.getLogger(VideoRecorderAppState.class.getName()).log(Level.SEVERE, "Error closing video: {0}", ex);
    }
    writer = null;
  }
}
com.jme3.app.stateMjpegFileWriter

Javadoc

Released under BSD License

Most used methods

  • <init>
  • addImage
  • finishAVI
  • intBytes
  • shortBytes
  • swapInt
  • swapShort
  • writeImageToBytes

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Notification (javax.management)
  • JFileChooser (javax.swing)
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now