Clip the given start and stop values to the segment boundaries given in segment. start and stop are compared and clipped to segment start and stop values.
If the function returns FALSE, start and stop are known to fall outside of segment and clip_start and clip_stop are not updated.
When the function returns TRUE, clip_start and clip_stop will be updated. If clip_start or clip_stop are different from start or stop respectively, the region fell partially in the segment.
Note that when stop is -1, clip_stop will be set to the end of the segment. Depending on the use case, this may or may not be what you want.
the format of the segment.
the start position in the segment
the stop position in the segment
the clipped start position in the segment
the clipped stop position in the segment
TRUE if the given start and stop times fall partially or completely in segment, FALSE if the values are completely outside of the segment.