video/gtk4: Restrict visibility of struct related to the Frame

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
This commit is contained in:
Jordan Petridis 2022-11-01 22:02:37 +02:00
parent ea6c59e5e9
commit 51c34267a9

View file

@ -14,23 +14,24 @@ use gtk::{gdk, glib};
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
#[derive(Debug)] #[derive(Debug)]
pub struct Frame { pub(crate) struct Frame {
pub frame: gst_video::VideoFrame<gst_video::video_frame::Readable>, frame: gst_video::VideoFrame<gst_video::video_frame::Readable>,
pub overlays: Vec<Overlay>, overlays: Vec<Overlay>,
} }
#[derive(Debug)] #[derive(Debug)]
pub struct Overlay { struct Overlay {
pub frame: gst_video::VideoFrame<gst_video::video_frame::Readable>, frame: gst_video::VideoFrame<gst_video::video_frame::Readable>,
pub x: i32, x: i32,
pub y: i32, y: i32,
pub width: u32, width: u32,
pub height: u32, height: u32,
pub global_alpha: f32, global_alpha: f32,
} }
#[derive(Debug)] #[derive(Debug)]
pub struct Texture { pub(crate) struct Texture {
//FIXME: create getters instead of having the fields public
pub texture: gdk::Texture, pub texture: gdk::Texture,
pub x: f32, pub x: f32,
pub y: f32, pub y: f32,