Skip to content

Migrate to new ClockTime design

This MR migrates the plugins to the new design for gst::ClockTime and the *FormattedValues.

See gstreamer-rs#234 (closed) and gstreamer-rs!760 (merged) for details.

The most prominent change is the explicit Option which used to be part of the inner type for gst::ClockTime. This encourages developers to consider whether the gst::ClockTime is mandatory or optional and to take action in case it is None.

Although the migration process attempts at staying as close as possible to the existing implementation, it should be noted that:

  • checked_sub was used in many places, this should make the code more robust.
  • The Some variant might probably be expected in some places, which would result in simpler code. Since the migration is a bit tedious and error prone, I thought it would be safer if the maintainers of the elements did the change should they deem it worth it.

Progress:

  • audio
  • generic
  • net
  • text
  • tutorial
  • utils
  • version-helper
  • video
Edited by François Laignel

Merge request reports