NAME
mpegPriority - Create a new mpeg priority object.
SYNOPSIS
mpegPriority parentName ?options?
OPTIONS
-cycleTime
Indicates how often -inCmd, -outCmd, -i_outCmd, -p_outCmd,
and -b_outCmd are executed. This object does NOT need an lts
to drive it, but instead fires every cycleTime seconds if
either inCmd or any of the outCmd's are validly set. If nei-
ther inCmd or any of the outCmd's is set, the object ignores
the value of cycleTime and is strictly a passive object
(i.e. accessed through its send and accept commands). If
cycleTime is set to 0.0, and outCmd is set, the object will
send data through the outCmd whenever its accept function is
called.
-outCmd
Indicates the command to call when sending data. This com-
mand will be appended with a scatter buffer list and
evaluated. A C interface to a scatter buffer list accepting
command can be specified using the @ syntax discussed in the
application programmer's guide. If i_outCmd, p_outCmd, or
b_outCmd is set, I, P, and B frames will be sent to the type
specific command and NOT to the command set in this slot.
If any of the type specific commands are not set, then those
frame types are sent to the command specified in this slot.
The frames are prioritized for this command with I frames
first followed by P and then B frames.
-i_outCmd
Indicates the command to call when sending I frames. This
command will be appended with a scatter buffer list and
evaluated. A C interface to a scatter buffer list accepting
command can be specified using the @ syntax discussed in the
application programmer's guide. If not set, I frames will be
sent to the command specified by the general -outCmd if set.
-p_outCmd
Indicates the command to call when sending P frames. This
command will be appended with a scatter buffer list and
evaluated. A C interface to a scatter buffer list accepting
command can be specified using the @ syntax discussed in the
application programmer's guide. If not set, P frames will be
sent to the command specified by the general -outCmd if set.
-b_outCmd
Indicates the command to call when sending B frames. This
command will be appended with a scatter buffer list and
evaluated. A C interface to a scatter buffer list accepting
command can be specified using the @ syntax discussed in the
application programmer's guide. If not set, B frames will be
sent to the command specified by the general -outCmd if set.
-inCmd
Indicates the command to call to generate data. This command
should return a scatter buffer list. A C interface to a
scatter buffer list producing command can be specified using
the @ syntax discussed in the application programmer's
guide.
DESCRIPTION
The mpegPriority command creates a new mpeg priority object
which can be used to separate the mpeg stream by frame type.
The typical application would use the object to send I, P,
and B to separate packetSource objects. Data can be sent to
the object either passively (i.e. by calling the object's
accept command) or actively (i.e. by setting the object's
inCmd slot and specifying a cycleTime value). Similarly data
can be sent from the object either passively (i.e. by cal-
ling the object's various send commands) or actively (i.e.
by stting the object's various outCmd slots and specifying a
cycleTime value). In any case, the object accepts mpeg data
and buffers it until it is required to send the data on to
the next object. The object has four different outCmd slots
and four different send commands. The general outCmd slot
"-outCmd" is used whenever a frame type specific slot is not
set. The general "send" command will return a scatter buffer
list of all frame types currently buffered with I frames
preceding P frames preceding B frames. The specific send
commands "i_send", "p_send", and "b_send" will return
scatter buffer lists of all frames of that type that are
currently buffered.
MpegPriority objects can be in one of two states: ready or
unready. When first created the object is in the unready
state. The object does nothing in the unready state and all
buffers passed to it will be dropped. The object can be put
into the ready state by calling the object's ready command.
Any call to the object's configure command to set a slot
automatically puts the object in the unready state and the
ready command must be given again to put the object in
action. Calls to configure that simply query the value of a
slot will not put the object in the unready state.
WIDGET COMMANDS
The mpegClipfile command creates a new command objectName.
ObjectName is generated by concatenating the value of parent
and a unique string which is generated on the fly. The
empty string is a valid value for parent. This new command,
objectName, is used to invoke various operations on the new
object.
For more information on object names and why they are gen-
erated by the cm process and not set by the user, please
read the object management overview for the cm toolkit.
The command objectName has the following general form:
objectName option ?arg arg arg...?
Option and the args determine the exact behavior of the com-
mand. The following commands are possible:
objectName configure option ?value option value ...?
Query or modify the configuration options described
above. If the object was in the ready state (see the
ready command below), using the configure command to
set a slot value puts the object into the unready
state, requiring the the ready command be given again
for data to start flowing.
objectName destroy
Destroys the object.
objectName ready
This command readies the object. If cycleTime is non-
zero an every handler is started to initiate inCmd and
outCmd every cycleTime duration.
objectName unready
This command unreadies the object stopping data from
being sent, destroying any previously created every
handler.
objectName accept <scatter_buffer_list>
This command accepts <scatter_buffer_list> as mpeg data
to be separated by frame type. A standard scatter
buffer list accepting C interface to this command is
registered as <objectName>.accept.
objectName send
This command produces a scatter buffer list consisting
of frames of all types currently buffered. A standard
scatter buffer list producing C interface to this com-
mand is regiesterd as <objectName>.send.
objectName i_send
This command produces a scatter buffer list consisting
of I frames currently buffered. A standard scatter
buffer list producing C interface to this command is
regiesterd as <objectName>.i_send.
objectName p_send
This command produces a scatter buffer list consisting
of P frames currently buffered. A standard scatter
buffer list producing C interface to this command is
regiesterd as <objectName>.p_send.
objectName b_send
This command produces a scatter buffer list consisting
of B frames currently buffered. A standard scatter
buffer list producing C interface to this command is
regiesterd as <objectName>.b_send.
KEYWORDS
cm, mpeg, mpegPriority, priority, cm toolkit
AUTHORS
Ketan Patel (kpatel@cs.berkeley.edu)