set file [new ArchiveFile]
$file open <filename> <mode> <permissions>Open the file specified by
filename for reading or writing. The mode and permissions fields are identical to the Tcl open command. Both mode and permissions are optional and default to "r" and 0644 respectively.
Returns: Nothing. close:
$file closeClose the currently opened archive file. If no file is open, does nothing.
Returns: Nothing. header:
$file header hdr_varRead the header from the currently opened archive file.
hdr_var is the name of an array variable which, upon return, is filled in with fields from the file header. The following fields are defined:
hdr_var(version) |
The version of this file Currently, data files have version MDAT1.0 while index files have version MIDX1.0 |
hdr_var(protocol) |
Transport protocol used for this file. May be SRM or RTP. |
hdr_var(media) |
The media associated with this file. Currently, mediaboard, audio and video are the supported media. |
hdr_var(cname) |
A unique identifier for the stream within a session. For RTP, it is the user's e-mail address. For SRM, it is the SRM source-id. |
hdr_var(name) |
The name of the user associated with this stream |
hdr_var(start) |
A floating point number that represents the start time of the stream in seconds (as returned by gettimeofday()). |
hdr_var(end) |
A floating point number that represents the end time of the stream in seconds (as returned by gettimeofday()). |
Returns: Nothing.
set string [ArchiveFile ts2string $ts]Return a string of the form
"Tue Aug 26 11:15:20 PDT 1997 corresponding to a timestamp ts (expressed as a floating point number in seconds)
Returns: The string corrsponding to the timestamp ts.