de.enough.polish.video
Class VideoSource

java.lang.Object
  extended by de.enough.polish.video.VideoSource
All Implemented Interfaces:
Serializable

public class VideoSource
extends Object
implements Serializable

Used to define the source of video. Starts a thread to close the stream, connection etc. of a video

Author:
Andre Schmidt

Field Summary
static VideoSource CAPTURE
           
 
Constructor Summary
VideoSource(String id, InputStream stream, Connection connection, String mime)
          Construct a VideoSource with a stream, a connection a mimetype and a callback
VideoSource(String id, InputStream stream, String mime)
          Construct a VideoSource with a stream, a mimetype and a callback
VideoSource(String id, String file, String mime)
          Constructs a VideoSource with only a url and a callback, used for devices supporting progressive download
 
Method Summary
protected  void close()
          Closes the specified source
protected  Connection getConnection()
          Returns the connection
protected  String getFile()
          Returns the file url
protected  FramePositioningControl getFramePositioningControl()
          Returns the frame control
protected  String getId()
          Returns the id
protected  String getMime()
          Returns the mimetype
protected  Player getPlayer()
          Returns the player
protected  InputStream getStream()
          Returns the stream
protected  VideoControl getVideoControl()
          Returns the video control
protected  VolumeControl getVolumeControl()
          Returns the volume control
protected  void open()
          Opens the specified source
protected  void setParent(VideoContainer parent)
          Sets the VideoContainer parent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAPTURE

public static VideoSource CAPTURE
Constructor Detail

VideoSource

public VideoSource(String id,
                   String file,
                   String mime)
Constructs a VideoSource with only a url and a callback, used for devices supporting progressive download

Parameters:
id - the id
file - the url of the video file

VideoSource

public VideoSource(String id,
                   InputStream stream,
                   String mime)
Construct a VideoSource with a stream, a mimetype and a callback

Parameters:
id - the id
stream - the stream
mime - the mimetype

VideoSource

public VideoSource(String id,
                   InputStream stream,
                   Connection connection,
                   String mime)
Construct a VideoSource with a stream, a connection a mimetype and a callback

Parameters:
id - the id
stream - the stream
connection - the connection
mime - the mimetype
Method Detail

setParent

protected void setParent(VideoContainer parent)
Sets the VideoContainer parent

Parameters:
parent - the VideoContainer parent

open

protected void open()
             throws Exception
Opens the specified source

Throws:
Exception - if an error occurs (obviously)

close

protected void close()
Closes the specified source


getId

protected String getId()
Returns the id

Returns:
the id

getFile

protected String getFile()
Returns the file url

Returns:
the file url

getStream

protected InputStream getStream()
Returns the stream

Returns:
the stream

getConnection

protected Connection getConnection()
Returns the connection

Returns:
the connection

getMime

protected String getMime()
Returns the mimetype

Returns:
the mimetype

getPlayer

protected Player getPlayer()
Returns the player

Returns:
the player

getVideoControl

protected VideoControl getVideoControl()
Returns the video control

Returns:
the video control

getFramePositioningControl

protected FramePositioningControl getFramePositioningControl()
Returns the frame control

Returns:
the frame control

getVolumeControl

protected VolumeControl getVolumeControl()
Returns the volume control

Returns:
the volume control