Package com.xuggle.mediatool

Examples of com.xuggle.mediatool.IMediaReader.readPacket()


            if (ADD_VIEWER)
            {
              final IMediaViewer viewer = ToolFactory.makeViewer();
              reader.addListener(viewer);
            }
            while(reader.readPacket() == null)
            {
              log.trace("read packet: {}", numPackets[index]);
              ++numPackets[index];
            }
          } catch (OutOfMemoryError e)
View Full Code Here


            reader.addListener(ToolFactory.makeWriter(
                MultiThreadedWritingExhaustiveTest.class.getName()
                + "_" + mModel.toString()
                + "_" + mTestNumber + "_" + index + ".flv", reader));
            while (reader.readPacket() == null)
              ++numPackets[index];
          }
          catch (OutOfMemoryError e)
          {
            // This test will cause this error on small JVMs, and that's OK
View Full Code Here

    // which is called when complete video pictures are extracted from
    // the media source.  Since we're reading from a web cam this
    // loop will never return, but if the window is closed, the JVM is
    // exited.

    while (reader.readPacket() == null)
      do {} while(false);

  }

}
View Full Code Here

    // read out the contents of the media file, note that nothing else
    // happens here.  action happens in the onVideoPicture() method
    // which is called when complete video pictures are extracted from
    // the media source

    while (reader.readPacket() == null)
      do {} while(false);
  }

  /**
   * Called after a video frame has been decoded from a media stream.
View Full Code Here

    reader.addListener(ToolFactory.makeViewer(IMediaViewer.Mode.AUDIO_ONLY));

    // read out the contents of the media file, and sit back and watch

    while (reader.readPacket() == null)
      do {} while(false);
  }
}
View Full Code Here

    // which is called when complete video pictures are extracted from
    // the media source.  Since we're reading from a web cam this
    // loop will never return, but if the window is closed, the JVM is
    // exited.

    while (reader.readPacket() == null)
      do {} while(false);

  }

}
View Full Code Here

        "must pass in a filename as the first argument");
   
    // create a new mr. decode an play audio and video
    IMediaReader reader = ToolFactory.makeReader(args[0]);
    reader.addListener(ToolFactory.makeViewer());
    while(reader.readPacket() == null)
      do {} while(false);
   
  }

}
View Full Code Here

    reader.addListener(ToolFactory.makeWriter(destinationUrl, reader));

    // read packets from the source file, which dispatch events to the
    // writer, this will continue until

    while (reader.readPacket() == null)
      do {} while(false);
  }
}
View Full Code Here

    //
    reader.addListener(ToolFactory.makeViewer(IMediaViewer.Mode.VIDEO_ONLY));

    // read out the contents of the media file, and sit back and watch

    while (reader.readPacket() == null)
      do {} while(false);
   
  }
}
View Full Code Here

    while (reader1.readPacket() == null)
      ;

    // read packets from the second source file until done

    while (reader2.readPacket() == null)
      ;

    // close the writer

    writer.close();
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.