BililiveRecorder/BililiveRecorder.Flv/Grouping/Rules/ScriptGroupingRule.cs

15 lines
431 B
C#
Raw Normal View History

2021-02-08 16:51:19 +08:00
using System.Collections.Generic;
using BililiveRecorder.Flv.Pipeline.Actions;
2021-02-08 16:51:19 +08:00
namespace BililiveRecorder.Flv.Grouping.Rules
{
public class ScriptGroupingRule : IGroupingRule
{
public bool CanStartWith(Tag tag) => tag.IsScript();
2021-02-08 16:51:19 +08:00
public bool CanAppendWith(Tag tag, List<Tag> tags) => false;
2021-02-08 16:51:19 +08:00
public PipelineAction CreatePipelineAction(List<Tag> tags) => new PipelineScriptAction(tags[0]);
2021-02-08 16:51:19 +08:00
}
}