-
Notifications
You must be signed in to change notification settings - Fork 1
video dimmer
senso edited this page Jun 22, 2026
·
2 revisions
#example #video #advanced
Video frame processing and pixel manipulation.
| Module Name | video dimmer |
| Type | mtVideo |
| Color | clVideoModuleColor |
| Source | examples/VideoDimmer/ |
A video processing module that applies a dimmer effect and an optional pixel grid pattern. Demonstrates the mtVideo module type with frame input/output and pixel-level manipulation.
| # | Name | Type | I/O | Range | Default | Callback |
|---|---|---|---|---|---|---|
| 0 | dimmer |
ptDataFader |
Input | 0–1 | 1 | None |
| 1 | pixel color |
ptColor |
Input | — | Red (0xFFFF0000) | None |
| 2 | inter space |
ptDataFader |
Input | 0–20 (integer) | 1 | None |
Processing happens in onProcessVideo (not onProcess):
- Gets input frame:
sdkGetInputFrame(0, &inputFrame) - Creates new output frame:
sdkGetNewFrame(&outputFrame, w, h, FALSE) - If
inter space == 0: copies frame directly withsdkCopyFrame - If
inter space > 0: creates a grid effect:- Every N-th pixel: copied from input
- Every (N+1)-th pixel: replaced with custom color
- Other pixels: set to black
- Applies dimmer:
sdkSetDimmerFrame(&outputFrame, dimmerValue) - Sets output:
sdkSetOutputFrame(0, &outputFrame)
-
mtVideomodule type -
NumberOfVideoInputs = 1,NumberOfVideoOutputs = 1in module info -
onProcessVideoinstead ofonProcessfor video modules -
Video frame API:
-
sdkGetInputFrame— get input frame -
sdkGetNewFrame— allocate output frame -
sdkCopyFrame— copy frame data -
sdkClearFrame— clear frame to color -
sdkGetFramePixel/sdkSetFramePixel— pixel access -
sdkSetDimmerFrame— apply brightness -
sdkSetOutputFrame— set output frame
-
-
sdkColorToPixel— convertTUsineColortoTUsinePixel
onGetModuleInfo · onInitModule · onGetParamInfo · onCallBack · onProcessVideo
This is the only video processing example in the SDK. For other module types, see:
- AudioVolume — Audio processing
- DataOscilloscope — Custom visual rendering (mtControl)