MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / End

Method End

src/Clip.cpp:414–433  ·  view source on GitHub ↗

Get end position of clip (trim end of video), which can be affected by the time curve.

Source from the content-addressed store, hash-verified

412
413// Get end position of clip (trim end of video), which can be affected by the time curve.
414float Clip::End() const
415{
416 // if a time curve is present, use its length
417 if (time.GetCount() > 1)
418 {
419 // Determine the FPS fo this clip
420 float fps = 24.0;
421 if (reader)
422 // file reader
423 fps = reader->info.fps.ToFloat();
424 else
425 // Throw error if reader not initialized
426 throw ReaderClosed("No Reader has been initialized for this Clip. Call Reader(*reader) before calling this method.");
427
428 return float(time.GetLength()) / fps;
429 }
430 else
431 // just use the duration (as detected by the reader)
432 return end;
433}
434
435// Override End() position
436void Clip::End(float value) {

Callers 11

detectObjectsClipMethod · 0.45
stabilizeClipMethod · 0.45
trackClipMethod · 0.45
Clip.cppFile · 0.45
Mask.cppFile · 0.45
Timeline.cppFile · 0.45
QtImageReader.cppFile · 0.45
EffectMask.cppFile · 0.45
mainFunction · 0.45
FrameMapper.cppFile · 0.45

Calls 4

ReaderClosedClass · 0.85
GetCountMethod · 0.80
ToFloatMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected