mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
video: Rename VideoOverlayComposition iterator struct
This commit is contained in:
parent
e989899467
commit
7037f6d836
2 changed files with 12 additions and 9 deletions
|
@ -61,8 +61,11 @@ mod functions;
|
||||||
pub use crate::functions::*;
|
pub use crate::functions::*;
|
||||||
mod video_rectangle;
|
mod video_rectangle;
|
||||||
pub use crate::video_rectangle::*;
|
pub use crate::video_rectangle::*;
|
||||||
mod video_overlay_composition;
|
pub mod video_overlay_composition;
|
||||||
pub use crate::video_overlay_composition::*;
|
pub use crate::video_overlay_composition::{
|
||||||
|
VideoOverlayComposition, VideoOverlayCompositionRef, VideoOverlayRectangle,
|
||||||
|
VideoOverlayRectangleRef,
|
||||||
|
};
|
||||||
pub mod video_meta;
|
pub mod video_meta;
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||||
|
|
|
@ -288,8 +288,8 @@ impl VideoOverlayCompositionRef {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn iter(&self) -> VideoOverlayCompositionIterator {
|
pub fn iter(&self) -> Iter {
|
||||||
VideoOverlayCompositionIterator {
|
Iter {
|
||||||
composition: self,
|
composition: self,
|
||||||
idx: 0,
|
idx: 0,
|
||||||
len: self.n_rectangles(),
|
len: self.n_rectangles(),
|
||||||
|
@ -298,7 +298,7 @@ impl VideoOverlayCompositionRef {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> IntoIterator for &'a VideoOverlayComposition {
|
impl<'a> IntoIterator for &'a VideoOverlayComposition {
|
||||||
type IntoIter = VideoOverlayCompositionIterator<'a>;
|
type IntoIter = Iter<'a>;
|
||||||
type Item = VideoOverlayRectangle;
|
type Item = VideoOverlayRectangle;
|
||||||
|
|
||||||
fn into_iter(self) -> Self::IntoIter {
|
fn into_iter(self) -> Self::IntoIter {
|
||||||
|
@ -306,13 +306,13 @@ impl<'a> IntoIterator for &'a VideoOverlayComposition {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct VideoOverlayCompositionIterator<'a> {
|
pub struct Iter<'a> {
|
||||||
composition: &'a VideoOverlayCompositionRef,
|
composition: &'a VideoOverlayCompositionRef,
|
||||||
idx: u32,
|
idx: u32,
|
||||||
len: u32,
|
len: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Iterator for VideoOverlayCompositionIterator<'a> {
|
impl<'a> Iterator for Iter<'a> {
|
||||||
type Item = VideoOverlayRectangle;
|
type Item = VideoOverlayRectangle;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
|
@ -337,7 +337,7 @@ impl<'a> Iterator for VideoOverlayCompositionIterator<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> DoubleEndedIterator for VideoOverlayCompositionIterator<'a> {
|
impl<'a> DoubleEndedIterator for Iter<'a> {
|
||||||
fn next_back(&mut self) -> Option<Self::Item> {
|
fn next_back(&mut self) -> Option<Self::Item> {
|
||||||
if self.idx == self.len {
|
if self.idx == self.len {
|
||||||
return None;
|
return None;
|
||||||
|
@ -351,4 +351,4 @@ impl<'a> DoubleEndedIterator for VideoOverlayCompositionIterator<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ExactSizeIterator for VideoOverlayCompositionIterator<'a> {}
|
impl<'a> ExactSizeIterator for Iter<'a> {}
|
||||||
|
|
Loading…
Reference in a new issue