mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
livesync: add support for image formats
The livesync element is also useful for Motion JPEG streams. However, Motion JPEG uses image/ caps instead of video/ caps. The framerate is defined for image/, too. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1440>
This commit is contained in:
parent
54f24fe4b0
commit
4bb867bf52
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ fn audio_info_from_caps(
|
||||||
|
|
||||||
fn duration_from_caps(caps: &gst::CapsRef) -> Option<gst::ClockTime> {
|
fn duration_from_caps(caps: &gst::CapsRef) -> Option<gst::ClockTime> {
|
||||||
caps.structure(0)
|
caps.structure(0)
|
||||||
.filter(|s| s.name().starts_with("video/"))
|
.filter(|s| s.name().starts_with("video/") || s.name().starts_with("image/"))
|
||||||
.and_then(|s| s.get::<gst::Fraction>("framerate").ok())
|
.and_then(|s| s.get::<gst::Fraction>("framerate").ok())
|
||||||
.filter(|framerate| framerate.denom() > 0 && framerate.numer() > 0)
|
.filter(|framerate| framerate.denom() > 0 && framerate.numer() > 0)
|
||||||
.and_then(|framerate| {
|
.and_then(|framerate| {
|
||||||
|
|
Loading…
Reference in a new issue