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
-
VideoOnDemand()
-
-
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.
-
GetAppletAddress()
- Name: GetAppletAddress
Purpose: Get the address of this Applet
-
getFrame()
- Name: getFrame
Purpose: Gets the parent frame of this applet.
-
GetSDP()
- Name: GetSDP
Purpose: Use describe to get a SDP file via RTSP.
-
handleEvent(Event)
- Name: handleEvent
Purpose: catches the events and passes them to the applet class.
-
init()
- Name: init
Purpose: Initializes the Graphical User Interface
-
Off()
- Name: Off
Purpose: Exits the application.
-
ParseSDP()
- Name: ParseSDP
Purpose: Traverses the sdp file one line at a time, searching for the media
type m=.
-
Pause()
- Name: Pause
Purpose: Send the Pause message to all media servers.
-
Play()
- Name: Play
Purpose: Send the Play message to all media servers.
-
Record()
- Name: Record
Purpose: Send the Record message to all media servers.
-
SelectMediaPort()
- Name: GetAppletAddress
Purpose: Gets a good media port for vat/vic by testing them
Output: a good port number that has been tested.
-
SetConfig()
- Name: SetConfig
Purpose: Show the configuration dialog.
-
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.
-
SetupMediaProcess(String, String)
- Name: SetupMediaProcess
Purpose: Starts up an audio or video process and adds it to the
media vector.
-
Stop()
- Name: Stop
Purpose: Send the Stop message to all media servers.
VideoOnDemand
public VideoOnDemand()
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.
Play
public void Play()
- Name: Play
Purpose: Send the Play message to all media servers.
Off
public void Off()
- Name: Off
Purpose: Exits the application.
Stop
public void Stop()
- Name: Stop
Purpose: Send the Stop message to all media servers.
Record
public void Record()
- Name: Record
Purpose: Send the Record message to all media servers.
Pause
public void Pause()
- Name: Pause
Purpose: Send the Pause message to all media servers.
SetConfig
public void SetConfig()
- Name: SetConfig
Purpose: Show the configuration dialog.
getFrame
public Frame getFrame()
- Name: getFrame
Purpose: Gets the parent frame of this applet.
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.
GetSDP
public void GetSDP()
- Name: GetSDP
Purpose: Use describe to get a SDP file via RTSP.
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.
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.
GetAppletAddress
public void GetAppletAddress()
- Name: GetAppletAddress
Purpose: Get the address of this Applet
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.
init
public void init()
- Name: init
Purpose: Initializes the Graphical User Interface
- Overrides:
- init in class Applet
handleEvent
public boolean handleEvent(Event event)
- Name: handleEvent
Purpose: catches the events and passes them to the applet class.
- Overrides:
- handleEvent in class Component