Codota Logo
MjpegFileWriter$AVIStreamHeader.toBytes
Code IndexAdd Codota to your IDE (free)

How to use
toBytes
method
in
com.jme3.app.state.MjpegFileWriter$AVIStreamHeader

Best Java code snippets using com.jme3.app.state.MjpegFileWriter$AVIStreamHeader.toBytes (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: jMonkeyEngine/jmonkeyengine

public void finishAVI() throws Exception {
  logger.log(Level.INFO, "finishAVI");
  byte[] indexlistBytes = indexlist.toBytes();
  aviOutput.write(indexlistBytes);
  aviOutput.close();
  int fileSize = (int)aviFile.length();
  logger.log(Level.INFO, "fileSize: {0}", fileSize);
  int listSize = (int) (fileSize - 8 - aviMovieOffset - indexlistBytes.length);
  logger.log(Level.INFO, "listSize: {0}", listSize);
  logger.log(Level.INFO, "aviFile canWrite: {0}", aviFile.canWrite());
  logger.log(Level.INFO, "aviFile AbsolutePath: {0}", aviFile.getAbsolutePath());
  logger.log(Level.INFO, "aviFile numFrames: {0}", numFrames);
  RandomAccessFile raf = new RandomAccessFile(aviFile, "rw");
  //add header and length by writing the headers again
  //with the now available information
  raf.write(new RIFFHeader(fileSize).toBytes());
  raf.write(new AVIMainHeader().toBytes());
  raf.write(new AVIStreamList().toBytes());
  raf.write(new AVIStreamHeader().toBytes());
  raf.write(new AVIStreamFormat().toBytes());
  raf.write(new AVIJunk().toBytes());
  raf.write(new AVIMovieList(listSize).toBytes());
  raf.close();
}
origin: jMonkeyEngine/jmonkeyengine

public void finishAVI() throws Exception {
  byte[] indexlistBytes = indexlist.toBytes();
  aviOutput.write(indexlistBytes);
  aviOutput.close();
  int fileSize = (int)aviFile.length();
  int listSize = (int) (fileSize - 8 - aviMovieOffset - indexlistBytes.length);
  
  RandomAccessFile raf = new RandomAccessFile(aviFile, "rw");
  
  //add header and length by writing the headers again
  //with the now available information
  raf.write(new RIFFHeader(fileSize).toBytes());
  raf.write(new AVIMainHeader().toBytes());
  raf.write(new AVIStreamList().toBytes());
  raf.write(new AVIStreamHeader().toBytes());
  raf.write(new AVIStreamFormat().toBytes());
  raf.write(new AVIJunk().toBytes());
  raf.write(new AVIMovieList(listSize).toBytes());     
  
  raf.close();
}
origin: jMonkeyEngine/jmonkeyengine

public MjpegFileWriter(File aviFile, int width, int height, double framerate, int numFrames) throws Exception {
  this.aviFile = aviFile;
  this.width = width;
  this.height = height;
  this.framerate = framerate;
  this.numFrames = numFrames;
  aviOutput = new FileOutputStream(aviFile);
  aviChannel = aviOutput.getChannel();
  RIFFHeader rh = new RIFFHeader();
  aviOutput.write(rh.toBytes());
  aviOutput.write(new AVIMainHeader().toBytes());
  aviOutput.write(new AVIStreamList().toBytes());
  aviOutput.write(new AVIStreamHeader().toBytes());
  aviOutput.write(new AVIStreamFormat().toBytes());
  aviOutput.write(new AVIJunk().toBytes());
  aviMovieOffset = aviChannel.position();
  aviOutput.write(new AVIMovieList().toBytes());
  indexlist = new AVIIndexList();
}
origin: jMonkeyEngine/jmonkeyengine

public MjpegFileWriter(File aviFile, int width, int height, double framerate, int numFrames) throws Exception {
  this.aviFile = aviFile;
  this.width = width;
  this.height = height;
  this.framerate = framerate;
  this.numFrames = numFrames;
  aviOutput = new FileOutputStream(aviFile);
  aviChannel = aviOutput.getChannel();
  RIFFHeader rh = new RIFFHeader();
  aviOutput.write(rh.toBytes());
  aviOutput.write(new AVIMainHeader().toBytes());
  aviOutput.write(new AVIStreamList().toBytes());
  aviOutput.write(new AVIStreamHeader().toBytes());
  aviOutput.write(new AVIStreamFormat().toBytes());
  aviOutput.write(new AVIJunk().toBytes());
  aviMovieOffset = aviChannel.position();
  aviOutput.write(new AVIMovieList().toBytes());
  indexlist = new AVIIndexList();
}
origin: us.ihmc.thirdparty.jme/jme3-desktop

public void finishAVI() throws Exception {
  byte[] indexlistBytes = indexlist.toBytes();
  aviOutput.write(indexlistBytes);
  aviOutput.close();
  int fileSize = (int)aviFile.length();
  int listSize = (int) (fileSize - 8 - aviMovieOffset - indexlistBytes.length);
  
  RandomAccessFile raf = new RandomAccessFile(aviFile, "rw");
  
  //add header and length by writing the headers again
  //with the now available information
  raf.write(new RIFFHeader(fileSize).toBytes());
  raf.write(new AVIMainHeader().toBytes());
  raf.write(new AVIStreamList().toBytes());
  raf.write(new AVIStreamHeader().toBytes());
  raf.write(new AVIStreamFormat().toBytes());
  raf.write(new AVIJunk().toBytes());
  raf.write(new AVIMovieList(listSize).toBytes());     
  
  raf.close();
}
origin: us.ihmc.thirdparty.jme/jme3-desktop

public MjpegFileWriter(File aviFile, int width, int height, double framerate, int numFrames) throws Exception {
  this.aviFile = aviFile;
  this.width = width;
  this.height = height;
  this.framerate = framerate;
  this.numFrames = numFrames;
  aviOutput = new FileOutputStream(aviFile);
  aviChannel = aviOutput.getChannel();
  RIFFHeader rh = new RIFFHeader();
  aviOutput.write(rh.toBytes());
  aviOutput.write(new AVIMainHeader().toBytes());
  aviOutput.write(new AVIStreamList().toBytes());
  aviOutput.write(new AVIStreamHeader().toBytes());
  aviOutput.write(new AVIStreamFormat().toBytes());
  aviOutput.write(new AVIJunk().toBytes());
  aviMovieOffset = aviChannel.position();
  aviOutput.write(new AVIMovieList().toBytes());
  indexlist = new AVIIndexList();
}
com.jme3.app.stateMjpegFileWriter$AVIStreamHeadertoBytes

Popular methods of MjpegFileWriter$AVIStreamHeader

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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