Class VideoOnDemand

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----VideoOnDemand

public class VideoOnDemand
extends Applet
implements BUTTON_CONST

Constructor Index

 o VideoOnDemand()

Method Index

 o Connect2RTSP(String, String, String, int, String)
Name: Connect2RTSP Purpose: Instantiate a RTSP server socket and send an initialization message stating the address and port of the media.
 o GetAppletAddress()
Name: GetAppletAddress Purpose: Get the address of this Applet
 o getFrame()
Name: getFrame Purpose: Gets the parent frame of this applet.
 o GetSDP()
Name: GetSDP Purpose: Use describe to get a SDP file via RTSP.
 o handleEvent(Event)
Name: handleEvent Purpose: catches the events and passes them to the applet class.
 o init()
Name: init Purpose: Initializes the Graphical User Interface
 o Off()
Name: Off Purpose: Exits the application.
 o ParseSDP()
Name: ParseSDP Purpose: Traverses the sdp file one line at a time, searching for the media type m=.
 o Pause()
Name: Pause Purpose: Send the Pause message to all media servers.
 o Play()
Name: Play Purpose: Send the Play message to all media servers.
 o Record()
Name: Record Purpose: Send the Record message to all media servers.
 o SelectMediaPort()
Name: GetAppletAddress Purpose: Gets a good media port for vat/vic by testing them Output: a good port number that has been tested.
 o SetConfig()
Name: SetConfig Purpose: Show the configuration dialog.
 o SetUp()
Name: SetUp Purpose: The Setup procedure consists of retrieving the applet address, retrieving the SDP file from SDP server, and parsing the SDP file.
 o SetupMediaProcess(String, String)
Name: SetupMediaProcess Purpose: Starts up an audio or video process and adds it to the media vector.
 o Stop()
Name: Stop Purpose: Send the Stop message to all media servers.

Constructors

 o VideoOnDemand
 public VideoOnDemand()

Methods

 o SetUp
 public void SetUp()
Name: SetUp Purpose: The Setup procedure consists of retrieving the applet address, retrieving the SDP file from SDP server, and parsing the SDP file.

 o Play
 public void Play()
Name: Play Purpose: Send the Play message to all media servers.

 o Off
 public void Off()
Name: Off Purpose: Exits the application.

 o Stop
 public void Stop()
Name: Stop Purpose: Send the Stop message to all media servers.

 o Record
 public void Record()
Name: Record Purpose: Send the Record message to all media servers.

 o Pause
 public void Pause()
Name: Pause Purpose: Send the Pause message to all media servers.

 o SetConfig
 public void SetConfig()
Name: SetConfig Purpose: Show the configuration dialog.

 o getFrame
 public Frame getFrame()
Name: getFrame Purpose: Gets the parent frame of this applet.

 o ParseSDP
 public int ParseSDP()
Name: ParseSDP Purpose: Traverses the sdp file one line at a time, searching for the media type m=. If media type is found, it searchs the next line to see if it is a control source. The media type and media server source is passed to SetupMediaThread; where a new thread is started for that particular media at that particular media source. Output: Returns back status. 1 means pass, 0 means fail from null vector.

 o GetSDP
 public void GetSDP()
Name: GetSDP Purpose: Use describe to get a SDP file via RTSP.

 o Connect2RTSP
 public void Connect2RTSP(String mediaType,
                          String mediaServer,
                          String destPort,
                          int vPort,
                          String transportProt)
Name: Connect2RTSP Purpose: Instantiate a RTSP server socket and send an initialization message stating the address and port of the media. Input: mediaType is either audio or video. mediaServer is the server internet address. destPort is the RTSP server port. vPort is the port of vat/vic media.

 o SetupMediaProcess
 public int SetupMediaProcess(String mediaType,
                              String mediaServer)
Name: SetupMediaProcess Purpose: Starts up an audio or video process and adds it to the media vector. Input: mediaType is can be either video or audio. mediaServer is the server internet address.

 o GetAppletAddress
 public void GetAppletAddress()
Name: GetAppletAddress Purpose: Get the address of this Applet

 o SelectMediaPort
 public int SelectMediaPort()
Name: GetAppletAddress Purpose: Gets a good media port for vat/vic by testing them Output: a good port number that has been tested.

 o init
 public void init()
Name: init Purpose: Initializes the Graphical User Interface

Overrides:
init in class Applet
 o handleEvent
 public boolean handleEvent(Event event)
Name: handleEvent Purpose: catches the events and passes them to the applet class.

Overrides:
handleEvent in class Component