NAME
mjpegPriority - Create a new mjpeg priority object.
SYNOPSIS
mjpegPriority parentName ?options?
OPTIONS
-cycleTime
Indicates how often -inCmd and -outCmd are executed. This
object does NOT need an lts to drive it, but instead fires
every cycleTime seconds if either inCmd or outCmd are
validly set. If neither inCmd or outCmd 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 func-
tion 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.
-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 mjpegPriority command creates a new mjpeg priority
object which can be used to prioritize frames of a mjpeg
stream to optimize for network transmission. 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). Simi-
larly data can be sent from the object either passively
(i.e. by calling the object's send command) or actively
(i.e. by stting the object's outCmd slot and specifying a
cycleTime value). In any case, the object accepts mjpeg data
and buffers it until it is required to send the data on to
the next object. At that time, it prioritizes all the
currently buffered frames to optimize smoothness of frame
drops given limited bandwidth.
MjpegPriority 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 automatically
puts the object in the unready state and the ready command
must be given again to put the object in action.
WIDGET COMMANDS
The mjpegPriority 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), the configure command 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 mjpeg
data to be prioritzed. A standard scatter buffer list
accepting C interface to this command is registered as
<objectName>.accept.
objectName send
This command prioritizes all buffers currently held and
produces a scatter buffer list. A standard scatter
buffer list producing C interface to this command is
regiesterd as <objectName>.send.
KEYWORDS
cm, mjpeg, mjpegPriority, priority, cm toolkit
AUTHORS
Brian Smith (bsmith@cs.cornell.edu) Ketan Patel
(kpatel@cs.berkeley.edu)