import javax.media.DataSink;
import javax.media.MediaLocator;
import javax.media.Processor;
import javax.media.format.VideoFormat;
import javax.media.protocol.DataSource;

public interface IActions {

	/**
	 * Finds jpg images in a folder and stores their filenames internally.
	 * Throws an exception on error or if there are no jpg files.
	 */
	public abstract void loadImagesFromDirectory(String path)
		throws Exception;

	/**
	 * Reads the specified image and returns a byte array with image raw data.
	 * Tip - Use a RandomAccessFile for reading.
	 * Throws exception on error.
	 */
	public abstract byte[] getImageData(int imageIndex)
		throws Exception;

	/**
	 * Creates a MediaLocator for the specified file (file:...)
	 * Throws exception on error.
	 */
	public abstract MediaLocator createMediaLocator(String file)
			throws Exception;

	/**
	 * Creates a Jpeg video format with the given parameters.
	 * Throws exception on error.
	 */
	public abstract VideoFormat createVideoFormatJPEGEncoding(int width,
			int height, int maxDataLength, Class dataType, int frameRate)
			throws Exception;

	/**
	 * Creates a Processor for the given data source.
	 * Throws exception on error.
	 */
	public abstract Processor createProcessor(DataSource ds)
		throws Exception;

	/**
	 * Creates a DataSink for the specified processor and output locator.
	 * Throws exception on error.
	 */
	public abstract DataSink createDataSink(Processor p, 
			MediaLocator outputLocator)
			throws Exception;

}