mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 02:05:26 +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/1456>
This commit is contained in:
parent
0f1fde5d0a
commit
2d796e5108
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> {
|
||||
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())
|
||||
.filter(|framerate| framerate.denom() > 0 && framerate.numer() > 0)
|
||||
.and_then(|framerate| {
|
||||
|
|
Loading…
Reference in a new issue