AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO
Open bounded TimeRange support
- Dominant language
- C++
- Stars
- 2k
- Forks
- 351
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 1
Description
When working with media times, it can often be useful to refer to ranges that are things like "all times after two seconds" or "all times until 90 minutes". With time ranges expressing this, you can do things like: `two_seconds_to_infinity_range.contains(RationalTime(36, 24))`.
This can be thought of in two ways:
1. A `TimeRange` that goes from a concrete time to infinity or from negative infinity to a concrete time
2. A `TimeRange` with open end bounds or open front bounds
Modeling this as the first described solution would mean:
1. Define `RationalTime` constants for -infinity and infinity
2. Updating `TimeRange` to be expressed in terms of `start_time` and `end_time`(exclusive?) - instead of `start_time` and `duration`
For the second described solution one implementation might be to add `TimeRange` subclasses that are `TimeRangeOpenEnd` and `TimeRangeOpenFront`.
The second described solution would imply some API footprint changes for `TimeRange`.
Contributor guide
Research direction
The issue names TimeRange and RationalTime but does not identify files, tests, or an entry point. Start by reviewing the existing TimeRange API and its contains behavior, then resolve which open-bound representation and API changes are intended. Done means supporting ranges extending to either infinity or having an open bound with corresponding containment behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100