forked from mirrors/gstreamer-rs
video/video_rectangle: Implement glib::translate::Uninitialized
The new Vulkan bindings require this.
This commit is contained in:
parent
c68b601c74
commit
430abb1e9d
1 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
// Take a look at the license at the top of the repository in the LICENSE file.
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
||||||
|
|
||||||
use glib::translate::IntoGlib;
|
use glib::translate::IntoGlib;
|
||||||
|
use std::mem;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
pub struct VideoRectangle {
|
pub struct VideoRectangle {
|
||||||
|
@ -46,3 +47,10 @@ pub fn center_video_rectangle(
|
||||||
}
|
}
|
||||||
VideoRectangle::new(result.x, result.y, result.w, result.h)
|
VideoRectangle::new(result.x, result.y, result.w, result.h)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
|
impl glib::translate::Uninitialized for VideoRectangle {
|
||||||
|
unsafe fn uninitialized() -> Self {
|
||||||
|
mem::zeroed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue