Skip to content

Commit

Permalink
add more methods to zigapi.Frame
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjulek committed Apr 14, 2024
1 parent e3c45f3 commit 0183588
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/zigapi.zig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ pub const Frame = struct {
};
}

pub fn copyFrame(self: Self) Self {
return .{
.frame_ctx = self.frame_ctx,
.core = self.core,
.vsapi = self.vsapi,
.frame = self.vsapi.?.copyFrame.?(self.frame, self.core),
};
}

pub fn getPropertiesRO(self: Self) ?*const vs.Map {
return self.vsapi.?.getFramePropertiesRO.?(self.frame);
}

pub fn getPropertiesRW(self: Self) ?*vs.Map {
return self.vsapi.?.getFramePropertiesRW.?(self.frame);
}

pub fn geHeight(self: Self, plane: u32) u32 {
return @bitCast(self.vsapi.?.getFrameHeight.?(self.frame, @bitCast(plane)));
}
Expand Down

0 comments on commit 0183588

Please sign in to comment.