MtFootageData Manual
A MtFootageData object stores information on the video footage loaded by the parent MotionTrackerObject .
The MtFootageData object is obtained from the parent MotionTrackerObject .
// check if an object is selected and if it is a Motion Tracker object BaseObject * const obj = doc-> GetActiveObject (); if (obj == nullptr || !obj-> IsInstanceOf ( Omotiontracker )) return maxon::IllegalArgumentError( MAXON_SOURCE_LOCATION );
// do not forget to free the copy MtFootageData::Free (footage);
The MtFootageData object provides read-access to several properties of the loaded video footage.
General information on the loaded footage:
Video Resolution and Ratio of the loaded footage:
// AutoFree takes ownership AutoFree<MtFootageData> freeFootage; freeFootage. 赋值 (footage);
// access and print footage filename const Filename footageName = footage-> GetFootageName (); ApplicationOutput ( "Footage: " + footageName. GetString ());
// access footage resolution const Int32 width = footage-> GetResolutionWidthPix ( true ); const Int32 height = footage-> GetResolutionHeightPix ( true );
// print result const String widthStr = String::IntToString (width); const String heightStr = String::IntToString (height); ApplicationOutput ( "Width: " + widthStr + ", Height: " + heightStr);