Files
Heimdall/tests/Heimdall.Agent.Tests/AgentRecordingServiceTests.cs
T

23 lines
900 B
C#

namespace Heimdall.Agent.Tests;
public sealed class AgentRecordingServiceTests
{
[Fact]
public void CreateStartInfo_UsesSegmentedMp4AndTreatsRtspAsOneArgument()
{
const string rtsp = "rtsp://user:p@ss@camera/stream?profile=1&x=2";
var info = AgentRecordingService.CreateStartInfo("ffmpeg-test", rtsp, "/tmp/segments", 45);
info.FileName.ShouldBe("ffmpeg-test");
info.ArgumentList.ShouldContain(rtsp);
info.ArgumentList.ShouldContain("-segment_time");
info.ArgumentList.ShouldContain("45");
info.ArgumentList.ShouldContain("-segment_format");
info.ArgumentList.ShouldContain("mp4");
info.ArgumentList.ShouldContain("-segment_list_type");
info.ArgumentList.ShouldContain("csv");
info.ArgumentList.ShouldContain("/tmp/segments/segment-%06d.mp4");
info.UseShellExecute.ShouldBeFalse();
}
}