NAME(S)

     <StreamObject> allocflag,
     <StreamObject> addclip,
     <StreamObject> addhook,
     <StreamObject> sethooklist,
     <StreamObject> gethooks,
     <StreamObject> removehook,
     <StreamObject> clearhooks,
     <StreamObject> gettype,
     <StreamObject> astext,
     <StreamObject> foreach,
     <StreamObject> getstart,
     <StreamObject> getend,
     <StreamObject> getnumclips,
     <StreamObject> deleteclip,
     <StreamObject> getclip,
     <StreamObject> clipflag,
     <StreamObject> clipprop,
     <StreamObject> snap,
     <StreamObject> find,
     <StreamObject> clear,
     <StreamObject> shift,
     <StreamObject> cliplist,
     <StreamObject> addresolvedclip,
     <StreamObject> destroy,


SYNOPSIS

     <StreamObject> allocflag

     <StreamObject> addclip <args>

     <StreamObject> addhook <hookN> <script>

     <StreamObject> sethooklist <hookN> <hookList>

     <StreamObject> gethooks <hookN>

     <StreamObject> removehook <hookN> <script>

     <StreamObject> clearhooks ?hookList?

     <StreamObject> gettype

     <StreamObject> astext

     <StreamObject> foreach <start> <end>  <streamVar>  <clipVar>
     <script>

     <StreamObject> getstart

     <StreamObject> getend

     <StreamObject> getnumclips

     <StreamObject> deleteclip <clipNum>

     <StreamObject> getclip <clipNum>

     <StreamObject> clipflag <clipNum> <flagNum> ?flagValue?

     <StreamObject> clipprop <clipNum> <propName> ?Value?

     <StreamObject> snap <time> <dist>

     <StreamObject> find <time>

     <StreamObject> clear <start> <end>

     <StreamObject> shift <start> <delta>

     <StreamObject> cliplist ?clipList?

     <StreamObject> addresolvedclip <resolvedClip>

     <StreamObject> destroy


DESCRIPTION

     Stores a clip list from a CMApp PlayList as an  otcl  object
     that  supports editing operations and provides hooks to sup-
     port the maintainance of visual displays and cm object  play
     chains for the stored data.

     Creation:

             Stream create <name> <type>

     Creates a new stream object with $name.   This  object  will
     only  allow  the  addition of clips of type $type where type
     can be any of the types stored in the Stream class  variable
     kTypes.   The stream is stored as an array of clips numbered
     0 to <numclips>-1.  Many operations take this clip index  to
     identify the clip.

     Time Values:

      All time values taken by Stream methods are floating  point
     numbers,  measuring seconds.  The keywords "start" and "end"
     may be used to indicated the start and end of the stream.

     Change Flags:

     Each clip contains an array of 32 change  flags.   Any  time
     the  clip is modified (or when created) these flags are set.
     The clipflag operation may be used to test  or  clear  these
     flags  individually.   The allocflag method returns a unused
     flag index which can then be used to detect changes since  a
     previous  event  such  as a display update (the flag user is
     responsible for clearing the flags).

     Action Hooks:

     Also usefull for maintaining displays  associated  with  the
     stream.  These function much like Tk even bindings, but sup-
     port a collection of unassociated simultaneous binds so that
     multipule view clients may work with a single stream.  Event
     hooks are tcl scripts which are executed with event informa-
     tion appended.  The supported hooks are stored in the Stream
     class variable kHooks.  They currently include  the  follow-
     ing:

             HOOK            APPENDED INFO
             addclip         <hookName> <streamName> <clipIndex>
             deleteclip      <hookName> <streamName> <clipIndex>
             destroystream   <hookName> <streamName>
             copyclip        <hookName> <streamName> <clipIndex>

     Clip Properties:

     Each clip has a list of property/value pairs associated with
     it.  These may be used to store arbitrary information with a
     clip.  These values  are  persistant,  they  appear  in  the
     astext  representation of a clip and therefore will be saved
     and restored with the stream.  Properties with names  begin-
     ning with '_' do not appear in totext outputs.

     Implementation Note:

     This Class is implemented in both otcl and C.   The  C  code
     can  be  found  in  the vw*.[ch] files within the cm library
     code.



  <StreamObject> allocflag
     Returns a previously unallocated change flag index.

  <StreamObject> addclip <args>
     Takes  either  a  fully  resolved  clip  (as   returned   by
     CMApp_ResolveMovie  or  CMApp_ResolveClip) or a clip line in
     the format taken by CMApp_ParseClipLine (at minimum  a  URL)
     and  adds  the  clip  to  the  stream.  If the clip overlaps
     existing clips, then those clips' covered regions are  first
     removed.

  <StreamObject> addhook <hookN> <script>
     Adds the given $script to the list of  hooks  that  will  be
     executed when the $hookN is executed.

  <StreamObject> sethooklist <hookN> <hookList>
     Replaces the entire hook list for the given $hookN with  the
     new  list.  This  should  not  be  used  directly  by Stream
     clients!

  <StreamObject> gethooks <hookN>
     Returns the list of all hooks for the named event.

  <StreamObject> removehook <hookN> <script>
     Removes a script matching $script from the named hook list.

  <StreamObject> clearhooks ?hookList?
     Removes all hooks from the named event(s).  Not  for  direct
     client use!

  <StreamObject> gettype
     Returns the type of the stream.

  <StreamObject> astext
     Returns a textual representation of the stream, identical to
     the stream section of a PlayList.

  <StreamObject> foreach <start> <end> <streamVar> <clipVar>
     Executes $script for each clip  in  the  given  time  range.
     Within  the  script  $streamVar  is  set  to the name of the
     stream object currently executing.  $clipVar is set  to  the
     clip index of the current clip.

  <StreamObject> getstart
     Returns the logical start time of  the  first  clip  in  the
     stream.  returns 0.0 if the stream is empty.

  <StreamObject> getend
     Returns the logical end time of the last clip in the stream.
     returns 0.0 if the stream is empty.

  <StreamObject> getnumclips
     Returns the number of clips in the stream.

  <StreamObject> deleteclip <clipNum>
     Destroys the given clip.

  <StreamObject> getclip <clipNum>
     returns a textual version of the requested clip.  This is in
     resolved clip format.

  <StreamObject> clipflag <clipNum> <flagNum> ?flagValue?
     Gets or sets the requested change flag.  A value of 1  indi-
     cates  that  the  clip  has been changed since last reset to
     zero (with this call).

  <StreamObject> clipprop <clipNum> <propName> ?Value?
     Gets or sets the given property of the given clip.

  <StreamObject> snap <time> <dist>
     Takes <time> and <dist> and returns the time of the  closest
     clip  boundy  within <dist> of time.  If there is none, then
     time is returned.  Dist is allowed to be negative (takes abs
     value).

  <StreamObject> find <time>
     returns the index of the next clip at or after  time  and  a
     boolean true if time is in a clip.

  <StreamObject> clear <start> <end>
     Deletes all clips within the given time range.  Clips  which
     are partially within the range are cropped.

  <StreamObject> shift <start> <delta>
     Moves all clips on or after $start time by $delta time units
     (e.g.  adds  delta  to the logical start and end times).  If
     delta is negative, clips in the  region  behind  $start  are
     deleted.  Clips  which span $start are split in two.  $start
     may equal "start".

  <StreamObject> cliplist ?clipList?
     Gets or sets the cliplist of the stream from/to text format.
     Each clip in the clip list is in fully resolved format.

  <StreamObject> addresolvedclip <resolvedClip>
     As addclip, but only takes the resolved format.

  <StreamObject> destroy
     Destroys the stream.


AUTHOR

     Eric Baldeschwieler, eric14@cs.berkeley.edu