Package net.pms.util

Examples of net.pms.util.H264AnnexBInputStream


    aOut = params.output_pipes[1].getOutputStream();
    if (params.no_videoencode && params.forceType != null && params.forceType.equals("V_MPEG4/ISO/AVC") && params.header != null) {
      // NOT USED RIGHT NOW
      PipedOutputStream pout = new PipedOutputStream();
      Runnable r;
      try (InputStream pin = new H264AnnexBInputStream(new PipedInputStream(pout), params.header)) {
        final OutputStream out = params.output_pipes[0].getOutputStream();
        r = new Runnable() {
          @Override
          public void run() {
            try {
              byte[] b = new byte[512 * 1024];
              int n;
              while ((n = pin.read(b)) > -1) {
                out.write(b, 0, n);
              }
            } catch (Exception e) {
              LOGGER.error(null, e);
            }
View Full Code Here


    try {
      in = mkin.getInputStream();
      out = mkout.getOutputStream();

      if (modifier != null && modifier.isH264AnnexB()) {
        in = new H264AnnexBInputStream(in, modifier.getHeader());
      } else if (modifier != null && modifier.isEncodedAudioPassthrough()) {
        out = new IEC61937AudioOutputStream(new PCMAudioOutputStream(out, modifier.getNbChannels(), modifier.getSampleFrequency(), modifier.getBitsPerSample()));
      } else if (modifier != null && modifier.isDtsEmbed()) {
        out = new DTSAudioOutputStream(new PCMAudioOutputStream(out, modifier.getNbChannels(), modifier.getSampleFrequency(), modifier.getBitsPerSample()));
      } else if (modifier != null && modifier.isPcm()) {
View Full Code Here

    try {
      in = mkin.getInputStream();
      out = mkout.getOutputStream();

      if (modifier != null && modifier.isH264AnnexB()) {
        in = new H264AnnexBInputStream(in, modifier.getHeader());
      } else if (modifier != null && modifier.isDtsEmbed()) {
        out = new DTSAudioOutputStream(new PCMAudioOutputStream(out, modifier.getNbChannels(), modifier.getSampleFrequency(), modifier.getBitsPerSample()));
      } else if (modifier != null && modifier.isPcm()) {
        out = new PCMAudioOutputStream(out, modifier.getNbChannels(), modifier.getSampleFrequency(), modifier.getBitsPerSample());
      }
View Full Code Here

    aOut = params.output_pipes[1].getOutputStream();
    if (params.no_videoencode && params.forceType != null && params.forceType.equals("V_MPEG4/ISO/AVC") && params.header != null) {
      // NOT USED RIGHT NOW
      PipedOutputStream pout = new PipedOutputStream();
      final InputStream pin = new H264AnnexBInputStream(new PipedInputStream(pout), params.header);
      final OutputStream out = params.output_pipes[0].getOutputStream();
      Runnable r = new Runnable() {
        public void run() {
          try {
            byte[] b = new byte[512 * 1024];
            int n = -1;
            while ((n = pin.read(b)) > -1) {
              out.write(b, 0, n);
            }
          } catch (Exception e) {
            logger.error(null, e);
          }
        }
      };

      pin.close();
      vOut = pout;
      new Thread(r, "Avi Demuxer").start();
    } else {
      vOut = params.output_pipes[0].getOutputStream();
    }
View Full Code Here

TOP

Related Classes of net.pms.util.H264AnnexBInputStream

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.