Segment.clip

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.

class Segment
bool
clip
(,
ulong start
,
ulong stop
,
out ulong clipStart
,
out ulong clipStop
)

Parameters

format GstFormat

the format of the segment.

start ulong

the start position in the segment

stop ulong

the stop position in the segment

clipStart ulong

the clipped start position in the segment

clipStop ulong

the clipped stop position in the segment

Return: %TRUE if the given @start and @stop times fall partially or completely in @segment, %FALSE if the values are completely outside of the segment.

Meta