| MIL 10 Reference
| Customize Help
| Save Settings

MseqControl



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Not available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Control a sequence context or an individual source or destination setting.
Syntax
void MseqControl(
MIL_ID ContextSeqId, //in
MIL_INT SequenceIndex, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function allows you to control a sequence context or an individual source or destination setting.

You cannot modify a setting while the sequence processing session is in progress (MseqProcess()).

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextSeqId

Specifies the identifier of the sequence context to control. The sequence context must have been previously allocated using MseqAlloc().

SequenceIndex

Specifies that the sequence context, the source of an input, or a destination of an output is controlled. Set this parameter to one of the following values:

function map For specifying a context, or an individual source or destination
CollapseValue Description
Collapse M_DEFAULT

Same as M_CONTEXT.

Collapse
M_SEQ_INPUT(
MIL_INT Index
)

Specifies an input of the sequence operation, whose source must be controlled.

(summarize)
Parameters

Specifies the index of the input. The index must be 0.

Collapse
M_SEQ_OUTPUT(
MIL_INT Index
) +

Specifies an output of the sequence operation, whose destination must be controlled. An output can have multiple destinations.


You must specify a combination value from the following table:
(summarize)
Parameters

Specifies the index of the output. The index must be set to 0.

Collapse M_ALL

Controls all the sources and destinations in the sequence context.

Collapse M_CONTEXT

Controls a setting of the specified sequence context.

Combination constant for M_SEQ_OUTPUT.

You must add the following value to the above-mentioned value to specify the index of the destination of the output to control.

function map For specifying the index of the destination of the output to control
CollapseCombination value Description
Collapse
M_SEQ_DEST(
MIL_INT Index
)

Specifies the destination of the output to control.

(summarize)
Parameters

Specifies the index of the destination. The index must be between 0 and 31.

ControlType

Specifies the setting to control.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the value needed for the setting.

See the Parameter associations section for possible values that can be specified.

The table below lists possible values for the ControlType and ControlValue parameters.

The following ControlType and corresponding ControlValue parameter settings are used to control the H.264 compression operation settings for the sequence context (M_CONTEXT).

function map For specifying the H.264 compression settings
CollapseControlType Description
ControlValue
Collapse M_BUFFER_SAMPLE

Sets the size of the images contained in the elementary video stream equal to the size of a sample image buffer. INQ

(summarize)
Collapse MIL buffer identifier

Specifies the identifier of the sample image buffer.

Collapse M_SETTING_AUTO_ADJUSTMENT

Sets whether to automatically adjust incompatible operation settings.

Note that even with automatically adjusted settings, the processor might not be able to attain the specified settings, if the resoultion of the images is very large or you are feeding the images too quickly. INQ

(summarize)
Collapse M_DEFAULT

Same as M_DISABLE.

Collapse M_DISABLE

Specifies to not automatically adjust incompatible settings. An error will be generated instead.

(summarize)
Collapse M_ENABLE

Specifies to automatically adjust incompatible settings. You can inquire the values used internally, using MseqInquire() with the M_EFFECTIVE_VALUE combination constant.

(summarize)
Collapse M_STREAM_BIT_RATE

Sets the elementary video stream bit rate. The bit rate is the amount of data used to represent one second of the elementary video stream.

When used with a variable bit rate, this value sets the target average bit rate. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 5000 kbits/sec.

Collapse Value > 0

Specifies the bit rate, in Kbits/sec.

Collapse M_STREAM_BIT_RATE_MAX

Sets the maximum bit rate that the elementary video stream can have.

When used with a constant bit rate, this value is ignored. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 5000 kbits/sec.

Collapse Value > 0

Specifies the maximum bit rate, in Kbits/sec.

Collapse M_STREAM_BIT_RATE_MODE

Sets the type of bit rate the elementary video stream will have. INQ

(summarize)
Collapse M_DEFAULT

Same as M_VARIABLE.

Collapse M_CONSTANT

Specifies that the bit rate will remain constant throughout the duration of the elementary video stream. You can specify the stream's bit rate using M_STREAM_BIT_RATE.

(summarize)
Collapse M_VARIABLE

Specifies that the bit rate will fluctuate depending on how compressible sections of the elementary video stream are. You can specify a target average bit rate using M_STREAM_BIT_RATE. You can specify the maximum bit rate that the elementary video stream can have using M_STREAM_BIT_RATE_MAX.

(summarize)
Collapse M_STREAM_FRAME_RATE

Sets the elementary video stream's frame rate. Increasing the frame rate requires a higher bit rate to maintain the stream's quality since more information is being output per second. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 30.0 frames/sec.

Collapse Value > 0.0

Specifies the elementary video stream's frame rate, in frames/sec.

Collapse M_STREAM_FRAME_RATE_MODE

Sets how the decoding frame rate, written in the header of M_FILE destination types, is established. INQ

(summarize)
Collapse M_DEFAULT

Same as M_CONSTANT.

Collapse M_CONSTANT

Specifies that the decoding frame rate written in the header of M_FILE destination types is the same as the frame rate specified with M_STREAM_FRAME_RATE.

Collapse M_VARIABLE

Specifies that the decoding frame rate written in the header of M_FILE destination types is the average encoding frame rate, if the processor could not encode at the specified frame rate; otherwise, the frame rate specified with M_STREAM_FRAME_RATE will be written.

Setting this value should be done if you are uncertain if the processor can encode at the specified frame rate during a live grab. If you are grabbing at a rate of 40 frames/sec, for example, but the processor is encoding at a rate of 20 frames/sec, 20 frames will be missed per second. If you playback the compressed sequence at a rate of 40 frames/sec, the 20 frames that were encoded will be played back unnaturally fast (that is, in the first half-second). By setting this value, the playback rate would be set to 20 frames/sec so that the 20 frames would be played back at a more natural speed (even if there are frames missing).

(summarize)
Collapse M_STREAM_GROUP_OF_PICTURE_SIZE

Sets the group-of-pictures size. A group of pictures is defined as the number of P- or B-frames that follow each I-frame. I-frames contain all the data necessary to regenerate the original image that it represents. In contrast, P- and B-frames contain only the changes between consecutive images. Therefore, I-frames are more accurate, but less compressible. Reducing the group-of-pictures size reduces the time it takes to recover from a decrease in quality caused by a dropped frame, but it will also increase the required bit rate. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 5 frames per group.

Collapse Value

Specifies the group-of-pictures size, in number of frames/group.

Note that specifying a value of 0 will cause the sequence to be composed solely of I-frames (nearly lossless compression).

(summarize)
Collapse M_STREAM_LEVEL

Sets the H.264 compression level used by the compression operation. The compression level limits the number of macroblocks per second, which restricts the possible frame rates and bit rates for your elementary video stream. The compression level also limits the image resolution that you can specify. Setting the compression level prevents devices from attempting to playback streams that would require too much processing power and memory to decode. Higher compression levels increase the maximum number of macroblocks per second.

Choose the compression level by calculating the maximum number of macroblocks per second. For information regarding setting the correct compression level, see Guidelines for setting H.264 compression controls. INQ

(summarize)
Collapse M_DEFAULT

Same as M_LEVEL_4_2.

Collapse M_LEVEL_1

Specifies the 1 compression level.

Collapse M_LEVEL_1_1

Specifies the 1.1 compression level.

Collapse M_LEVEL_1_2

Specifies the 1.2 compression level.

Collapse M_LEVEL_1_3

Specifies the 1.3 compression level.

Collapse M_LEVEL_1B

Specifies the 1B compression level.

Collapse M_LEVEL_2

Specifies the 2 compression level.

Collapse M_LEVEL_2_1

Specifies the 2.1 compression level.

Collapse M_LEVEL_2_2

Specifies the 2.2 compression level.

Collapse M_LEVEL_3

Specifies the 3 compression level.

Collapse M_LEVEL_3_1

Specifies the 3.1 compression level.

Collapse M_LEVEL_3_2

Specifies the 3.2 compression level.

Collapse M_LEVEL_4

Specifies the 4 compression level.

Collapse M_LEVEL_4_1

Specifies the 4.1 compression level.

Collapse M_LEVEL_4_2

Specifies the 4.2 compression level.

Collapse M_LEVEL_5

Specifies the 5 compression level.

Collapse M_LEVEL_5_1

Specifies the 5.1 compression level.

Collapse M_STREAM_PROFILE

Sets the H.264 compression profile. The compression profile determines the allowed complexity of the compression operation. As the complexity is increased, the video quality for a given bit rate will be higher, but more processing power will be required to compress and decompress the elementary video stream. INQ

(summarize)
Collapse M_DEFAULT

Same as M_PROFILE_HIGH.

Collapse M_PROFILE_BASELINE

Specifies to use the baseline profile. The compression operation will be performed using a low level of complexity. This profile is commonly used for video conferencing and for devices with limited processing power.

(summarize)
Collapse M_PROFILE_HIGH

Specifies to use the high profile. The compression operation will be performed using a high level of complexity. This profile is commonly used in high-definition applications (such as HDTV).

(summarize)
Collapse M_PROFILE_MAIN

Specifies to use the main profile. The compression operation will be performed using a mid-level of complexity.

(summarize)
Collapse M_STREAM_QUALITY

Sets the H.264 compression operation speed/quality priority. INQ

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 100.

Collapse 0 <= Value <= 100

Specifies the speed/quality priority. 0 sets the highest priority to encoding speed and 100 sets the highest priority to quality.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT ALL CONTEXT BUFFER SAMPLE PROC SETTING AUTO ADJUSTMENT DEFAULT DISABLE ENABLE STREAM BIT RATE DEFAULT STREAM BIT RATE MAX DEFAULT STREAM BIT RATE MODE DEFAULT CONSTANT VARIABLE STREAM FRAME RATE DEFAULT STREAM FRAME RATE MODE DEFAULT CONSTANT VARIABLE STREAM GROUP OF PICTURE SIZE DEFAULT STREAM LEVEL DEFAULT LEVEL 1 LEVEL 1 1 LEVEL 1 2 LEVEL 1 3 LEVEL 1B LEVEL 2 LEVEL 2 1 LEVEL 2 2 LEVEL 3 LEVEL 3 1 LEVEL 3 2 LEVEL 4 LEVEL 4 1 LEVEL 4 2 LEVEL 5 LEVEL 5 1 STREAM PROFILE DEFAULT PROFILE BASELINE PROFILE HIGH PROFILE MAIN STREAM QUALITY DEFAULT