mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-01 09:23:50 +00:00
meta: Add accessor for MetaTransformCopy
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1776>
This commit is contained in:
parent
cee8516717
commit
c16e94ebdd
1 changed files with 14 additions and 0 deletions
|
@ -1141,6 +1141,20 @@ impl MetaTransformCopy {
|
|||
size,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn range(&self) -> Option<(Bound<usize>, Bound<usize>)> {
|
||||
if self.0.region == glib::ffi::GFALSE {
|
||||
None
|
||||
} else {
|
||||
let end = if self.0.size == usize::MAX {
|
||||
Bound::Unbounded
|
||||
} else {
|
||||
Bound::Excluded(self.0.size)
|
||||
};
|
||||
|
||||
Some((Bound::Included(self.0.offset), end))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl MetaTransform for MetaTransformCopy {
|
||||
|
|
Loading…
Reference in a new issue