Package com.xuggle.mediatool

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


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


            reader.setAddDynamicStreams(false);
            reader.setQueryMetaData(true);
            if (ADD_VIEWER)
            {
              final IMediaViewer viewer = ToolFactory.makeViewer();
              reader.addListener(viewer);
            }

            reader.addListener(ToolFactory.makeWriter(
                MultiThreadedWritingExhaustiveTest.class.getName()
                + "_" + mModel.toString()
View Full Code Here

            {
              final IMediaViewer viewer = ToolFactory.makeViewer();
              reader.addListener(viewer);
            }

            reader.addListener(ToolFactory.makeWriter(
                MultiThreadedWritingExhaustiveTest.class.getName()
                + "_" + mModel.toString()
                + "_" + mTestNumber + "_" + index + ".flv", reader));
            while (reader.readPacket() == null)
              ++numPackets[index];
View Full Code Here

    IMediaReader reader = ToolFactory.makeReader(container);
   
    // Add a media viewer that will display the video, but that exits
    // the JVM when it is destroyed
    reader.addListener(ToolFactory.makeViewer(true, JFrame.EXIT_ON_CLOSE));

    // 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.  Since we're reading from a web cam this
View Full Code Here

    // note that DecodeAndCaptureFrames is derived from
    // MediaReader.ListenerAdapter and thus may be added as a listener
    // to the MediaReader. DecodeAndCaptureFrames implements
    // onVideoPicture().

    reader.addListener(this);

    // 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
View Full Code Here

    IMediaReader reader = ToolFactory.makeReader(args[0]);

    // Create a MediaViewer object and tell it to play audio only

    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

    IMediaReader reader = ToolFactory.makeReader(container);
   
    // Add a media viewer that will display the video, but that exits
    // the JVM when it is destroyed
    reader.addListener(ToolFactory.makeViewer(true, JFrame.EXIT_ON_CLOSE));

    // 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.  Since we're reading from a web cam this
View Full Code Here

      throw new IllegalArgumentException(
        "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

    IMediaReader reader = ToolFactory.makeReader(sourceUrl);

    // add a viewer to the reader, to see progress as the media is
    // transcoded

    reader.addListener(ToolFactory.makeViewer(true));

    // create the media writer
    reader.addListener(ToolFactory.makeWriter(destinationUrl, reader));

    // read packets from the source file, which dispatch events to the
View Full Code Here

    // transcoded

    reader.addListener(ToolFactory.makeViewer(true));

    // create the media writer
    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)
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.