get_timeline_time_from_internal_time


Description:

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

Convert the internal source time from the child to a timeline time.

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 internal_time is above the in_point of child, this will return the timeline time at which the internal content found at internal_time appears in the output of the timeline's track. For example, this would let you know where in the timeline a particular scene in a media file would appear.

This will be done assuming the clip has an indefinite end, so the timeline time may be beyond the end of the clip, or even breaking its duration_limit.

If, instead, internal_time is below the current in_point of child, this will return what you would need to set the start of this to if you set the in_point of child to internal_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 position to use in a TRIM if you wish to trim to a specific point in the internal content, such as a particular scene in a media file.

Note that whilst a clip has no time effects, this second return is equivalent to finding the timeline time at which the content of child at internal_time would be found in the timeline 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 in edit for TRIM, and similar, if you wish to use a particular internal point as a reference. For example, you could choose to end a clip at a certain internal 'out-point', similar to the in_point, by translating the desired end time into the timeline coordinates, and using this position to trim the end of a clip.

See get_internal_time_from_timeline_time , which performs the reverse, or get_timeline_time_from_source_frame which does the same conversion, but using frame numbers.

Parameters:

this

A Clip

child

An active child of this with a track

internal_time

A time in the internal time coordinates of child

Returns:

The time in the timeline coordinates corresponding to internal_time, or CLOCK_TIME_NONE if the conversion could not be performed.