public void SetupMetadata(bool init) { // Setup Metadata global infos in case we want to flush it to a file (or mux). if (metadata == null || videoReader == null) { return; } if (init) { metadata.ImageSize = videoReader.Info.ReferenceSize; metadata.UserInterval = videoReader.Info.FrameIntervalMilliseconds; metadata.AverageTimeStampsPerFrame = videoReader.Info.AverageTimeStampsPerFrame; metadata.AverageTimeStampsPerSecond = videoReader.Info.AverageTimeStampsPerSeconds; metadata.CalibrationHelper.CaptureFramesPerSecond = videoReader.Info.FramesPerSeconds; metadata.FirstTimeStamp = videoReader.Info.FirstTimeStamp; } metadata.PostSetup(init); log.Debug("Setup metadata."); }