Package com.xuggle.xuggler

Examples of com.xuggle.xuggler.IStreamCoder.open()


      ICodec.Type type = coder.getCodecType();
      if (!coder.isOpen() && isSupportedCodecType(type))
      {
        // open the coder

        int rv = coder.open();
        if (rv < 0)
          throw new RuntimeException("could not open stream " + stream + ": "
              + getErrorMessage(rv));
        mOpenedStreams.add(stream);
View Full Code Here


      // NOTE: MediaReader currently supports audio & video streams

      if (!coder.isOpen()
          && (type == ICodec.Type.CODEC_TYPE_AUDIO || type == ICodec.Type.CODEC_TYPE_VIDEO))
      {
        if (coder.open() < 0)
          throw new RuntimeException("could not open coder for stream: "
              + streamIndex);
        mOpenedStreams.add(stream);
        super.onOpenCoder(new OpenCoderEvent(this, stream.getIndex()));
        stream = null;
View Full Code Here

   
    coder = IStreamCoder.make(IStreamCoder.Direction.ENCODING);
    coder.setCodec(ICodec.ID.CODEC_ID_PCM_S16LE);
    coder.setSampleRate(22050);
    coder.setChannels(1);
    assertTrue(coder.open() >= 0);
    assertEquals(coder.getAudioFrameSize(), coder.getDefaultAudioFrameSize());
    coder.setDefaultAudioFrameSize(3);
    assertEquals(coder.getAudioFrameSize(), coder.getDefaultAudioFrameSize());
   
  }
View Full Code Here

      ICodec.Type type = coder.getCodecType();
      if (!coder.isOpen() && isSupportedCodecType(type))
      {
        // open the coder

        int rv = coder.open(null, null);
        if (rv < 0)
          throw new RuntimeException("could not open stream " + stream + ": "
              + getErrorMessage(rv));
        mOpenedStreams.add(stream);
View Full Code Here

      // NOTE: MediaReader currently supports audio & video streams

      if (!coder.isOpen()
          && (type == ICodec.Type.CODEC_TYPE_AUDIO || type == ICodec.Type.CODEC_TYPE_VIDEO))
      {
        if (coder.open(null, null) < 0)
          throw new RuntimeException("could not open coder for stream: "
              + streamIndex);
        mOpenedStreams.add(stream);
        super.onOpenCoder(new OpenCoderEvent(this, stream.getIndex()));
        stream = null;
View Full Code Here

    coder = IStreamCoder.make(IStreamCoder.Direction.ENCODING, ICodec.ID.CODEC_ID_PCM_S16LE);
    assertNotNull(coder.getCodec());
    log.debug("Coder: {}", coder.getCodec());
    coder.setSampleRate(22050);
    coder.setChannels(1);
    assertTrue("could not open coder", coder.open(null, null) >= 0);
    assertEquals(coder.getAudioFrameSize(), coder.getDefaultAudioFrameSize());
    coder.setDefaultAudioFrameSize(3);
    assertEquals(coder.getAudioFrameSize(), coder.getDefaultAudioFrameSize());
   
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.