Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class MovieCapturer

    java.lang.Object
      MovieCapturer

All Implemented Interfaces:
  VideoCapturer

    public class MovieCapturer

extends Object
implements VideoCapturer

Class that captures a movie to a series of jpg frames Copyright Georgia Institute of Technology 2007

Author:
  Barb Ericson ericson@cc.gatech.edu

Constructor Summary
`MovieCapturer(String directory)` Constructor that takes the directory to write the frames to
`MovieCapturer(String directory, String baseName)` Constructor that takes the directory to write to and the base name to use for the files

Method Summary
`void` | `captureMovie()` Method to capture a movie until the done flag is set to true
`void` | `captureMovie(int numSeconds)` Method to capture a movie for the passed number of seconds
`void` | `captureMovie(int x1, int y1, int width, int height)` Method to capture a movie until the done flag is set to true
`void` | `captureMovie(int x1, int y1, int width, int height, int numSeconds)` Method to capture a movie in a rectangular region for the passed number of seconds
`BufferedImage` | `captureRegion()` Method to capture a region of the screen
`BufferedImage` | `captureRegion(int x1, int y1, int width, int height)` Method to capture a part of the screen
`BufferedImage` | `captureScreen()` Method to capture the entire screen
`FrameSequencer` | `getFrameSequencer()` Method to get the current directory
`int` | `getFramesPerSecond()` Method to get the number of frames per second
`Rectangle` | `getRegion()` Method to get the region to capture
`static void` | `main(String[] args)`
`void` | `playMovie()` Method to play the captured movie
`void` | `run()` Method to run the captured movie
`void` | `setFramesPerSecond(int frameRate)` Method to set the number of frames per second
`void` | `setRegion(Rectangle theRegion)` Method to set the region to capture (makes sure that the width and height is a multiple of 4 for compression later
`void` | `startCapture()` Method to start capturing the movie
`void` | `startCapture(int numSeconds)` Method to start captureing the movie and continue for the passed number of seconds
`void` | `stopCapture()` Method to stop capturing the movie

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MovieCapturer

    public MovieCapturer(String directory)

  Constructor that takes the directory to write the frames to

  Parameters:
    `directory` - the directory to write to

### MovieCapturer

    public MovieCapturer(String directory,
                         String baseName)

  Constructor that takes the directory to write to and the base name to use for the files

  Parameters:
    `directory` - the directory to write to
    `baseName` - the name to use for the files

Method Detail

### getFrameSequencer

    public FrameSequencer getFrameSequencer()

  Method to get the current directory

  Specified by:
    `getFrameSequencer` in interface `VideoCapturer`
  Returns:
    the directory name

### getFramesPerSecond

    public int getFramesPerSecond()

  Method to get the number of frames per second

  Specified by:
    `getFramesPerSecond` in interface `VideoCapturer`
  Returns:
    the number of frames per second

### setFramesPerSecond

    public void setFramesPerSecond(int frameRate)

  Method to set the number of frames per second

  Specified by:
    `setFramesPerSecond` in interface `VideoCapturer`
  Parameters:
    `frameRate` - the number of frames per second

### getRegion

    public Rectangle getRegion()

  Method to get the region to capture

  Specified by:
    `getRegion` in interface `VideoCapturer`
  Returns:
    the rectangular region to capture

### captureScreen

    public BufferedImage captureScreen()
                                throws Exception

  Method to capture the entire screen

  Specified by:
    `captureScreen` in interface `VideoCapturer`
  Returns:
    the captured buffered image
  Throws:
    `Exception`

### captureRegion

    public BufferedImage captureRegion(int x1,
                                       int y1,
                                       int width,
                                       int height)
                                throws AWTException

  Method to capture a part of the screen

  Parameters:
    `x1` - the top left x
    `y1` - the top left y
    `width` - the width of the rectangle to capture
    `height` - the height of the rectangle to capture
  Returns:
    the captured buffered image
  Throws:
    `AWTException`

### captureRegion

    public BufferedImage captureRegion()
                                throws Exception

  Method to capture a region of the screen

  Returns:
    the region if there is one else the screen
  Throws:
    `Exception`

### captureMovie

    public void captureMovie()

  Method to capture a movie until the done flag is set to true

### run

    public void run()

  Method to run the captured movie

### captureMovie

    public void captureMovie(int numSeconds)

  Method to capture a movie for the passed number of seconds

  Parameters:
    `numSeconds` - the number of seconds to capture

### captureMovie

    public void captureMovie(int x1,
                             int y1,
                             int width,
                             int height)

  Method to capture a movie until the done flag is set to true

  Parameters:
    `x1` - the top left x value
    `y1` - the top left y value
    `width` - the width of the region to capture
    `height` - the height of the region to capture

### captureMovie

    public void captureMovie(int x1,
                             int y1,
                             int width,
                             int height,
                             int numSeconds)

  Method to capture a movie in a rectangular region for the passed number of seconds

  Parameters:
    `x1` - the top left x value
    `y1` - the top left y value
    `width` - the width of the region to capture
    `height` - the height of the region to capture
    `numSeconds` - the number of seconds to capture

### playMovie

    public void playMovie()

  Method to play the captured movie

  Specified by:
    `playMovie` in interface `VideoCapturer`

### setRegion

    public void setRegion(Rectangle theRegion)

  Method to set the region to capture (makes sure that the width and height is a multiple of 4 for compression later

  Specified by:
    `setRegion` in interface `VideoCapturer`
  Parameters:
    `theRegion` - a rectangle that encloses the region to capture

### startCapture

    public void startCapture()

  Method to start capturing the movie

  Specified by:
    `startCapture` in interface `VideoCapturer`

### startCapture

    public void startCapture(int numSeconds)

  Method to start captureing the movie and continue for the passed number of seconds

  Specified by:
    `startCapture` in interface `VideoCapturer`
  Parameters:
    `numSeconds` - the number of seconds to capture

### stopCapture

    public void stopCapture()

  Method to stop capturing the movie

  Specified by:
    `stopCapture` in interface `VideoCapturer`

### main

    public static void main(String[] args)

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD