get_internal_time_from_timeline_time


Description:

[ Version ( since = "1.18" ) ]
public ClockTime get_internal_time_from_timeline_time (TrackElement child, ClockTime timeline_time) throws Error

Convert the timeline time to an internal source time of the child.

This will take any time effects placed on the clip into account (see BaseEffect for what time effects are supported, and how to declare them in GES).

When timeline_time is above the start of this, this will return the internal time at which the content that appears at timeline_time in the output of the timeline is created in child. For example, if timeline_time corresponds to the current seek position, this would let you know which part of a media file is being read.

This will be done assuming the clip has an indefinite end, so the internal time may be beyond the current out-point of the child, or even its max_duration.

If, instead, timeline_time is below the current start of this, this will return what you would need to set the in_point of child to if you set the start of this to timeline_time and wanted to keep the content of child currently found at the current start of this at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what in_point would result from a TRIM to timeline_time.

Note that whilst a clip has no time effects, this second return is equivalent to finding the internal time at which the content that appears at timeline_time in the timeline can be found in child if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use for the in_point or max_duration of the child.

See get_timeline_time_from_internal_time , which performs the reverse.

Parameters:

this

A Clip

child

An active child of this with a track

timeline_time

A time in the timeline time coordinates

Returns:

The time in the internal coordinates of child corresponding to timeline_time, or CLOCK_TIME_NONE if the conversion could not be performed.