Tabnine Logo
NIOUtils.writeLong
Code IndexAdd Tabnine to your IDE (free)

How to use
writeLong
method
in
org.jcodec.common.NIOUtils

Best Java code snippets using org.jcodec.common.NIOUtils.writeLong (Showing top 6 results out of 315)

origin: us.ihmc/ihmc-video-codecs

public void storeHeader(MovieBox movie) throws IOException {
  long mdatSize = out.position() - mdatOffset + 8;
  MP4Util.writeMovie(out, movie);
  out.position(mdatOffset);
  NIOUtils.writeLong(out, mdatSize);
}
origin: us.ihmc/IHMCVideoCodecs

public void storeHeader(MovieBox movie) throws IOException {
  long mdatSize = out.position() - mdatOffset + 8;
  MP4Util.writeMovie(out, movie);
  out.position(mdatOffset);
  NIOUtils.writeLong(out, mdatSize);
}
origin: us.ihmc/IHMCVideoCodecs

public WebOptimizedMP4Muxer(SeekableByteChannel output, Brand brand, int headerSize) throws IOException {
  super(output, brand);
  headerPos = output.position() - 24;
  output.position(headerPos);
  header = ByteBuffer.allocate(headerSize);
  output.write(header);
  header.clear();
  new Header("wide", 8).write(output);
  new Header("mdat", 1).write(output);
  mdatOffset = output.position();
  NIOUtils.writeLong(output, 0);
}
origin: us.ihmc/ihmc-video-codecs

public WebOptimizedMP4Muxer(SeekableByteChannel output, Brand brand, int headerSize) throws IOException {
  super(output, brand);
  headerPos = output.position() - 24;
  output.position(headerPos);
  header = ByteBuffer.allocate(headerSize);
  output.write(header);
  header.clear();
  new Header("wide", 8).write(output);
  new Header("mdat", 1).write(output);
  mdatOffset = output.position();
  NIOUtils.writeLong(output, 0);
}
origin: us.ihmc/IHMCVideoCodecs

  @Override
  public void storeHeader(MovieBox movie) throws IOException {
    long mdatEnd = out.position();
    long mdatSize = mdatEnd - mdatOffset + 8;
    out.position(mdatOffset);
    NIOUtils.writeLong(out, mdatSize);

    out.position(headerPos);
    try {
      movie.write(header);
      header.flip();
      int rem = header.capacity() - header.limit();
      if (rem < 8) {
        header.duplicate().putInt(header.capacity());
      }
      out.write(header);
      if (rem >= 8)
        new Header("free", rem).write(out);
    } catch (ArrayIndexOutOfBoundsException e) {
      Logger.warn("Could not web-optimize, header is bigger then allocated space.");
      new Header("free", header.remaining()).write(out);
      out.position(mdatEnd);
      MP4Util.writeMovie(out, movie);
    }
  }
}
origin: us.ihmc/ihmc-video-codecs

  @Override
  public void storeHeader(MovieBox movie) throws IOException {
    long mdatEnd = out.position();
    long mdatSize = mdatEnd - mdatOffset + 8;
    out.position(mdatOffset);
    NIOUtils.writeLong(out, mdatSize);

    out.position(headerPos);
    try {
      movie.write(header);
      header.flip();
      int rem = header.capacity() - header.limit();
      if (rem < 8) {
        header.duplicate().putInt(header.capacity());
      }
      out.write(header);
      if (rem >= 8)
        new Header("free", rem).write(out);
    } catch (ArrayIndexOutOfBoundsException e) {
      Logger.warn("Could not web-optimize, header is bigger then allocated space.");
      new Header("free", header.remaining()).write(out);
      out.position(mdatEnd);
      MP4Util.writeMovie(out, movie);
    }
  }
}
org.jcodec.commonNIOUtilswriteLong

Popular methods of NIOUtils

  • readableFileChannel
  • closeQuietly
  • writableFileChannel
  • combine
  • copy
  • fetchFrom
  • map
  • read
  • readNullTermString
  • readPascalString
  • readString
  • skip
  • readString,
  • skip,
  • toArray,
  • write,
  • writePascalString

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • findViewById (Activity)
  • getSystemService (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JCheckBox (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now