From 51c34267a97f576e8a31107c172b7d41f1e80ab0 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 1 Nov 2022 22:02:37 +0200 Subject: [PATCH] video/gtk4: Restrict visibility of struct related to the Frame Part-of: --- video/gtk4/src/sink/frame.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/video/gtk4/src/sink/frame.rs b/video/gtk4/src/sink/frame.rs index d92a4a70..390cec06 100644 --- a/video/gtk4/src/sink/frame.rs +++ b/video/gtk4/src/sink/frame.rs @@ -14,23 +14,24 @@ use gtk::{gdk, glib}; use std::collections::{HashMap, HashSet}; #[derive(Debug)] -pub struct Frame { - pub frame: gst_video::VideoFrame, - pub overlays: Vec, +pub(crate) struct Frame { + frame: gst_video::VideoFrame, + overlays: Vec, } #[derive(Debug)] -pub struct Overlay { - pub frame: gst_video::VideoFrame, - pub x: i32, - pub y: i32, - pub width: u32, - pub height: u32, - pub global_alpha: f32, +struct Overlay { + frame: gst_video::VideoFrame, + x: i32, + y: i32, + width: u32, + height: u32, + global_alpha: f32, } #[derive(Debug)] -pub struct Texture { +pub(crate) struct Texture { + //FIXME: create getters instead of having the fields public pub texture: gdk::Texture, pub x: f32, pub y: f32,