* upgrade sdk * fix warnings in ersatztv.ffmpeg * fix warnings in ersatztv.core * fix warnings in ersatztv.infrastructure * fix warnings in ersatztv.application * disable analysis for migrations projects * fix warnings in ersatztv.scanner * fix warnings in ersatztv * upgrade project framework * update github actions and dockerfiles
24 lines
693 B
C#
24 lines
693 B
C#
using System.Globalization;
|
|
|
|
namespace ErsatzTV.FFmpeg.OutputOption;
|
|
|
|
public class OutputTsOffsetOption : OutputOption
|
|
{
|
|
private readonly long _ptsOffset;
|
|
private readonly int _videoTrackTimeScale;
|
|
|
|
public OutputTsOffsetOption(long ptsOffset, int videoTrackTimeScale)
|
|
{
|
|
_ptsOffset = ptsOffset;
|
|
_videoTrackTimeScale = videoTrackTimeScale;
|
|
}
|
|
|
|
public override string[] OutputOptions => new[]
|
|
{
|
|
"-output_ts_offset",
|
|
$"{(_ptsOffset / (double)_videoTrackTimeScale).ToString(NumberFormatInfo.InvariantInfo)}"
|
|
};
|
|
|
|
// public override FrameState NextState(FrameState currentState) => currentState with { PtsOffset = _ptsOffset };
|
|
}
|