C# 클래스 SubLib.Core.Timing.SyncUtil

파일 보기 프로젝트 열기: GNOME/gnome-subtitles 1 사용 예제들

공개 메소드들

메소드 설명
AreSyncPointsValid ( Subtitles subtitles, SyncPoint start, SyncPoint end ) : bool
Scale ( System.TimeSpan currentTime, System.TimeSpan baseTime, double factor ) : System.TimeSpan
Scale ( double currentFrame, double baseFrame, double factor ) : double
Sync ( Subtitles subtitles, SyncPoint start, SyncPoint end, bool syncLast ) : bool
Sync ( Subtitles subtitles, int startIndex, System.TimeSpan startTime, int endIndex, System.TimeSpan endTime, bool syncLast ) : bool

Auto syncs a range of subtitles given their first and last correct times.

The subtitles are first shifted to the first subtitle's correct time, and then proportionally adjusted using the last subtitle's correct time.

Sync ( Subtitles subtitles, int startIndex, int startFrame, int endIndex, int endFrame, bool syncLast ) : bool

Auto syncs a range of subtitles given their first and last correct frames.

The subtitles are first shifted to the first subtitle's correct frame, and then proportionally adjusted using the last subtitle's correct frame.

비공개 메소드들

메소드 설명
AreSyncArgsValid ( Subtitles subtitles, int startIndex, System.TimeSpan startTime, int endIndex, System.TimeSpan endTime ) : bool
AreSyncArgsValid ( Subtitles subtitles, int startIndex, int startTime, int endIndex, int endTime ) : bool
AreSyncIndicesValid ( Subtitles subtitles, int startIndex, int endIndex ) : bool

메소드 상세

AreSyncPointsValid() 공개 정적인 메소드

public static AreSyncPointsValid ( Subtitles subtitles, SyncPoint start, SyncPoint end ) : bool
subtitles SubLib.Core.Domain.Subtitles
start SubLib.Core.Domain.SyncPoint
end SubLib.Core.Domain.SyncPoint
리턴 bool

Scale() 공개 정적인 메소드

public static Scale ( System.TimeSpan currentTime, System.TimeSpan baseTime, double factor ) : System.TimeSpan
currentTime System.TimeSpan
baseTime System.TimeSpan
factor double
리턴 System.TimeSpan

Scale() 공개 정적인 메소드

public static Scale ( double currentFrame, double baseFrame, double factor ) : double
currentFrame double
baseFrame double
factor double
리턴 double

Sync() 공개 정적인 메소드

public static Sync ( Subtitles subtitles, SyncPoint start, SyncPoint end, bool syncLast ) : bool
subtitles SubLib.Core.Domain.Subtitles
start SubLib.Core.Domain.SyncPoint
end SubLib.Core.Domain.SyncPoint
syncLast bool
리턴 bool

Sync() 공개 정적인 메소드

Auto syncs a range of subtitles given their first and last correct times.
The subtitles are first shifted to the first subtitle's correct time, and then proportionally adjusted using the last subtitle's correct time.
public static Sync ( Subtitles subtitles, int startIndex, System.TimeSpan startTime, int endIndex, System.TimeSpan endTime, bool syncLast ) : bool
subtitles SubLib.Core.Domain.Subtitles The subtitles to sync.
startIndex int The subtitle index to start the adjustment with.
startTime System.TimeSpan The correct start time for the first subtitle.
endIndex int The subtitle index to end the adjustment with.
endTime System.TimeSpan The correct start time for the last subtitle.
syncLast bool Whether to sync the last subtitle.
리턴 bool

Sync() 공개 정적인 메소드

Auto syncs a range of subtitles given their first and last correct frames.
The subtitles are first shifted to the first subtitle's correct frame, and then proportionally adjusted using the last subtitle's correct frame.
public static Sync ( Subtitles subtitles, int startIndex, int startFrame, int endIndex, int endFrame, bool syncLast ) : bool
subtitles SubLib.Core.Domain.Subtitles The subtitles to sync.
startIndex int The subtitle index to start the adjustment with.
startFrame int The correct start frame for the first subtitle.
endIndex int The subtitle index to end the adjustment with.
endFrame int The correct start frame for the last subtitle.
syncLast bool Whether to sync the last subtitle.
리턴 bool