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
int
clip
(,
long start
,
long stop
,
ref long clipStart
,
ref long clipStop
)

Parameters

format GstFormat

the format of the segment.

start long

the start position in the segment

stop long

the stop position in the segment

clipStart long

the clipped start position in the segment

clipStop long

the clipped stop position in the segment

Return Value

Type: int

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