From 950e5dbc32701333228ac4b98a475738cc370d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 26 Dec 2017 18:18:13 +0100 Subject: [PATCH] Run video_rectangle.rs through rustfmt --- gstreamer-video/src/video_rectangle.rs | 31 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/gstreamer-video/src/video_rectangle.rs b/gstreamer-video/src/video_rectangle.rs index d216001a6..1baf59827 100644 --- a/gstreamer-video/src/video_rectangle.rs +++ b/gstreamer-video/src/video_rectangle.rs @@ -18,16 +18,33 @@ pub struct VideoRectangle { impl VideoRectangle { pub fn new(x: i32, y: i32, w: i32, h: i32) -> Self { - VideoRectangle { - x, y, w, h - } + VideoRectangle { x, y, w, h } } } -pub fn center_video_rectangle(src: VideoRectangle, dst: VideoRectangle, scale: bool) -> VideoRectangle { - let mut result = ffi::GstVideoRectangle { x: 0, y: 0, w: 0, h: 0 }; - let src_rect = ffi::GstVideoRectangle { x: src.x, y: src.y, w: src.w, h: src.h }; - let dst_rect = ffi::GstVideoRectangle { x: dst.x, y: dst.y, w: dst.w, h: dst.h }; +pub fn center_video_rectangle( + src: VideoRectangle, + dst: VideoRectangle, + scale: bool, +) -> VideoRectangle { + let mut result = ffi::GstVideoRectangle { + x: 0, + y: 0, + w: 0, + h: 0, + }; + let src_rect = ffi::GstVideoRectangle { + x: src.x, + y: src.y, + w: src.w, + h: src.h, + }; + let dst_rect = ffi::GstVideoRectangle { + x: dst.x, + y: dst.y, + w: dst.w, + h: dst.h, + }; unsafe { ffi::gst_video_sink_center_rect(src_rect, dst_rect, &mut result, scale as i32); }