Examples of encodeAudio()


Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

      }

      // generate audio
     
      generator.fillNextSamples(samples, sampleCount);
      writer.encodeAudio(audioStreamIndex, samples);
      totalSamples += samples.getNumSamples();
    }

    // close the writer
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    generator.prepare(channelCount, sampleRate);

    // write some data, so that the media header will be written

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex, samples);

    // re-delete the output file so no broke media files persist after
    // the test
   
    file.delete();
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    file.delete();

    // now write some data on a different index

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex+1, samples);

    // should no get here

    assert(false);
  }
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    generator.prepare(channelCount, sampleRate);

    // write some data, so that the media header will be written

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex, samples);

    // now write some data on a different index

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex+1, samples);
View Full Code Here

Examples of com.xuggle.mediatool.MediaWriter.encodeAudio()

    writer.encodeAudio(audioStreamIndex, samples);

    // now write some data on a different index

    generator.fillNextSamples(samples, sampleCount);
    writer.encodeAudio(audioStreamIndex+1, samples);

    // delete the output file so no broke media files persist after the
    // test
   
    file.delete();
View Full Code Here

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

      {
        // encode audio

        IPacket packet = IPacket.make();
        try {
          int result = coder.encodeAudio(packet, samples, consumed);
          if (result < 0)
            throw new RuntimeException("failed to encode audio");

          // update total consumed
View Full Code Here

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

      // if it's audio coder flush that

      if (CODEC_TYPE_AUDIO == coder.getCodecType())
      {
        IPacket packet = IPacket.make();
        while (coder.encodeAudio(packet, null, 0) >= 0 && packet.isComplete())
        {
          writePacket(packet);
          packet.delete();
          packet = IPacket.make();
        }
View Full Code Here

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

           * But in any case, the following loop encodes the samples we have
           * into packets.
           */
          while (numSamplesConsumed < outSamples.getNumSamples())
          {
            retval = oc.encodeAudio(oPacket, outSamples, numSamplesConsumed);
            if (retval <= 0)
              throw new RuntimeException("Could not encode any audio: "
                  + retval);
            /**
             * Increment the number of samples consumed, so that the next time
View Full Code Here

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

           * But in any case, the following loop encodes the samples we have
           * into packets.
           */
          while (numSamplesConsumed < outSamples.getNumSamples())
          {
            retval = oc.encodeAudio(oPacket, outSamples, numSamplesConsumed);
            if (retval <= 0)
              throw new RuntimeException("Could not encode any audio: "
                  + retval);
            /**
             * Increment the number of samples consumed, so that the next time
View Full Code Here

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

      // if it's audio coder flush that

      if (CODEC_TYPE_AUDIO == coder.getCodecType())
      {
        IPacket packet = IPacket.make();
        while (coder.encodeAudio(packet, null, 0) >= 0 && packet.isComplete())
        {
          writePacket(packet);
          packet.delete();
          packet = IPacket.make();
        }
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.