QMedia
![]() |
![]() ![]() |
QM_SetActiveSegment(movieRef; activeSegStart; activeSegDuration):error | |||
![]() |
movieRef | Longint | Movie reference |
![]() |
activeSegStart | Longint | Active segment start |
![]() |
activeSegDuration | Longint | Active segment duration |
![]() |
error | Longint | Error result |
Changes the active segment of a movie.
Parameter movieRef is the reference to the movie instance. The movie reference must have been previously obtained with a call to QM_NewMovieFromFile or QM_NewMovieFromURL.
Parameter activeSegStart specifies the starting point of the movie's active segment.
Parameter activeSegDuration specifies the duration of the movie's active segment.
Both activeSegStart and activeSegDuration must be expressed in the movie's time scale.
If activeSegStart is -1, the entire movie is made active. In that case the activeSegDuration parameter is ignored.
Example
`Set the active segment of movie $movieRef to half the movie duration C_LONGINT($duration) $error:=QM_GetDuration ($movieRef;$duration) C_LONGINT($activeStart;$activeDuration) $activeStart:=0 $activeDuration:=$duration/2 $error:=QM_SetActiveSegment ($movieRef;$activeStart;$activeDuration) |
Related commands
QM_GetActiveSegment | Returns the active segment of a movie. |