Class: MediaAgent

Superclasses:

Syntax:






 set agent [new MediaAgent <spec>]

Description:

The MediaAgent class is the core programming layer for all ``media agents'' that manipulate media over the network. These agents are relatively large and complex objects, but are used by most applications in a fairly straightforward manner. The idea is to give the Mash programmer a fairly course-grained programming object that relieves the burden of managing video capture devices, multicast sockets, audio processing code, etc. into a high-level, easy-to-use API. The effort can then be spent figuring out how to cleanly integrate video, audio, or whiteboard objects into the application under design.

MediaAgents are ``bare processing engines''. They do not create or rely upon a user-interface. Instead, the script that creates the object manipulates it directly and if a user-interface is desired, that script must create and bind the UI to the agent. The protocol for communicating between the agent and the UI follows the Mash Observer model. In fact, since the observer abstraction is completely general, any object can attach itself to a MediaAgent as an observer, not just UIs.

Note: This is an abstract base class. Do not create objects directly of this class (note either SRM or RTP might be subclasses)

Methods

install-key:





    $agent install-key $key
Instruct the media-agent to perform encryption and decryption of all data sent to or received from the network. The format of the key is as specified by the SDP specification. XXX put format here. reset:





        $agent reset $spec
Reset the address specifier of the underlying session in question. This allows the network objects to be dynamically reconfigured to facilitate higher-level control protocols that might instruct an application to switch multicast sessions or speak to a different unicast destination. shutdown:





   $agent shutdown
Gracefully tear down the underlying session. Set or query the media associated with this session. Please note that the media is automatically set by the init method of this class. Programmers should not invoke this method directly to set the media.

Returns: In syntax (1), it returns a string that represents the media associated with this session. In syntax (2), the return value is undefined. RTPAgent instproc set-bandwidth kbps { header_file:

save_in: session_id: generate_filename:

Observable events

Any observer that is attached to objects of this class should define methods corresponding to the following observable events:

new_stream:

stream_done:

Related Objects:

ArchiveSession/Record/SRM, ArchiveSession/Record/RTP, ArchiveStream, Observer, Observable

Putting it all together Observable Object

Class: Observable

Superclasses:

Syntax:






 set o [new Observable]

Description:

This is a base class that provides methods useful for objects that can be "observed" by other objects. (These other objects are typically user interface objects). Usually, you do not create objects that are directly of the Observable class. Instead, other classes (for example, ArchiveStream, ArchiveSession/Play, ArchiveSession/Record) derive from this class.

Methods

attach_observer: detach_observer: notify_observers:

Related Objects:

Observer, ArchiveStream, ArchiveSession/Play ArchiveSession/Record

Putting it all together