示例#1
0
        public static bool CreateFlagCapturePatternInfo(ref udtPatternInfo pattern, ArgumentResources resources, udtCutByFlagCaptureArg rules)
        {
            var pinnedRules = new PinnedObject(rules);
            resources.PinnedObjects.Add(pinnedRules);

            pattern.Type = (UInt32)udtPatternType.FlagCaptures;
            pattern.TypeSpecificInfo = pinnedRules.Address;

            return true;
        }
示例#2
0
        public static bool CutDemosByFlagCapture(ref udtParseArg parseArg, List<string> filePaths, udtCutByFlagCaptureArg rules, CutByPatternOptions options)
        {
            var resources = new ArgumentResources();
            var patterns = new udtPatternInfo[1];
            if(!CreateFlagCapturePatternInfo(ref patterns[0], resources, rules))
            {
                return false;
            }

            return CutDemosByPattern(resources, ref parseArg, filePaths, patterns, options);
        }
示例#3
0
        public static udtCutByFlagCaptureArg CreateCutByFlagCaptureArg(UdtConfig config)
        {
            var rules = new udtCutByFlagCaptureArg();
            rules.MinCarryTimeMs = (UInt32)config.FlagCaptureMinCarryTimeMs;
            rules.MaxCarryTimeMs = (UInt32)config.FlagCaptureMaxCarryTimeMs;

            return rules;
        }