Examples of encodeVideo()


Examples of com.xuggle.mediatool.IMediaWriter.encodeVideo()

                timer = new Timer();
                timer.schedule(new TestTimeoutTask(), TimeUnit.SECONDS.toMillis(configuration.getTestTimeout()));

                while (running) {
                    BufferedImage bgrScreen = convertToType(getDesktopScreenshot(), BufferedImage.TYPE_3BYTE_BGR);
                    writer.encodeVideo(0, bgrScreen, System.nanoTime() - startTime, TimeUnit.NANOSECONDS);

                    try {
                        Thread.sleep(500 / frameRate);
                    } catch (InterruptedException ex) {
                        logger.error("Exception occured during video recording", ex);
View Full Code Here

Examples of com.xuggle.mediatool.IMediaWriter.encodeVideo()

                    BufferedImage screen = getDesktopScreenshot();

                    BufferedImage bgrScreen = convertToType(screen,
                            BufferedImage.TYPE_3BYTE_BGR);

                    writer.encodeVideo(0, bgrScreen, System.nanoTime() - startTime,
                            TimeUnit.NANOSECONDS);
                    try {
                        Thread.sleep((long) (1000 / FRAME_RATE));
                    } catch (InterruptedException ex) {
                        logger.error("Exception occured during video recording", ex);
View Full Code Here

Examples of com.xuggle.mediatool.IMediaWriter.encodeVideo()

      // get and encode the next video frame

      while (clock >= nextFrameTime)
      {
        BufferedImage frame = balls.getVideoFrame(frameRate);
        writer.encodeVideo(videoStreamIndex, frame, nextFrameTime,
          DEFAULT_TIME_UNIT);
        nextFrameTime += frameRate;
      }

      // compute and encode the audio for the balls
View Full Code Here

Examples of com.xuggle.mediatool.IMediaWriter.encodeVideo()

        // convert to the right image type
        BufferedImage bgrScreen = convertToType(screen,
            BufferedImage.TYPE_3BYTE_BGR);
       
        // encode the image
        writer.encodeVideo(0,bgrScreen,
            System.nanoTime()-startTime, TimeUnit.NANOSECONDS);

        System.out.println("encoded image: " +index);
       
        // sleep for framerate milliseconds
View Full Code Here

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

      g.rotate(theta, w / 2, h / 2);
     
      g.fillRect(50, 50, 100, 100);

      picture.setPts(time);
      writer.encodeVideo(videoStreamIndex, image,
          time, Global.DEFAULT_TIME_UNIT);
     
      time += deltaTime;
    }
View Full Code Here

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

        g.rotate(theta, w / 2, h / 2);
       
        g.fillRect(50, 50, 100, 100);
       
        picture.setPts(videoTime);
        writer.encodeVideo(videoStreamIndex, image, videoTime,
            Global.DEFAULT_TIME_UNIT);
     
        videoTime += deltaTime;
      }
View Full Code Here

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

      g.rotate(theta, w / 2, h / 2);
     
      g.fillRect(50, 50, 100, 100);

      picture.setPts(time);
      writer.encodeVideo(videoStreamIndex, image,
          time, Global.DEFAULT_TIME_UNIT);
     
      time += deltaTime;
    }
View Full Code Here

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

        g.rotate(theta, w / 2, h / 2);
       
        g.fillRect(50, 50, 100, 100);
       
        picture.setPts(videoTime);
        writer.encodeVideo(videoStreamIndex, image, videoTime,
            Global.DEFAULT_TIME_UNIT);
     
        videoTime += deltaTime;
      }
View Full Code Here

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

      // else flush video coder

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

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

             */

            outFrame = alterVideoFrame(outFrame);

            outFrame.setQuality(0);
            retval = oc.encodeVideo(oPacket, outFrame, 0);
            if (retval < 0)
              throw new RuntimeException("could not encode video");
            writePacket(oPacket);
          }
        }
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.