struct ViewportStructUsed as the type for the viewport [CameraAvStreamManagementTrait.Attributes.viewport]
attribute, allowing control over which part of the camera’s image is being streamed or
processed. The viewport is defined as these coordinates:
(x1,y1) (x2,y1)
(x1,y2)
(x2,y2)
-
Represents the x-coordinate of the left corners of the viewport.
Declaration
Swift
let x1: UInt16 -
Represents the y-coordinate of the top corners of the viewport.
Declaration
Swift
let y1: UInt16 -
Represents the x-coordinate of the right corners of the viewport.
Declaration
Swift
let x2: UInt16 -
Represents the y-coordinate of the bottom corners of the viewport.
Declaration
Swift
let y2: UInt16 -
Creates a new Struct instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throwsParameters
decoderThe raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder. ThrowsHomeError.parseErrorif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)?