VideoFeedState class
The logic for updating a VideoFeed.
This widget listens to VideoModel.frameUpdater to sync its framerate with other VideoFeeds. On every update, this widget grabs the frame from VideoData.frame, decodes it, renders it, then replaces the old frame. The key is that all the image processing logic is done off-screen while the old frame remains on-screen. When the frame is processed, it quickly replaces the old frame. That way, the user sees one continuous video instead of a flickering image.
Constructors
Properties
- brightness ↔ double
-
Value for brightness
getter/setter pair
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- data ↔ VideoData
-
The data being streamed.
getter/setter pair
- errorMessage → String
-
Displays an error message describing why
image == null
.no setter - focus ↔ double
-
Value for focus
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageLoader → ImageLoader
-
A helper class responsible for managing and loading an image.
final
- isOpened ↔ bool
-
Checks if the current slider for video camera is open
getter/setter pair
- isReady → bool
-
Whether there is a frame ready to display.
no setter
- mounted → bool
-
Whether this State object is currently in a tree.
no setterinherited
- pan ↔ double
-
Value for pan
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- widget → VideoFeed
-
The current configuration.
no setterinherited
- zoom ↔ double
-
Value for zoom
getter/setter pair
Methods
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
buildChild(
BuildContext context) → Widget - Builds the inside of the video feed. Either a video frame or an error message.
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(
covariant VideoFeed oldWidget) → void -
Called whenever the widget configuration changes.
inherited
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
initState(
) → void -
Called when this object is inserted into the tree.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toggleSettings(
) → void - Opens or closes the settings panel.
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the
runtimeType
and thehashCode
.inherited -
updateImage(
) → Future< void> - Grabs the new frame, renders it, and replaces the old frame.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited