From 6ffa9539bbfbfb1090b02cebc8a28283a8c69041 Mon Sep 17 00:00:00 2001 From: cvium Date: Tue, 11 Jan 2022 23:30:30 +0100 Subject: Refactor and add scheduled task --- .../Matroska/Models/Info.cs | 43 +++++++++-------- .../Matroska/Models/SeekHead.cs | 55 +++++++++++----------- 2 files changed, 48 insertions(+), 50 deletions(-) (limited to 'src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models') diff --git a/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/Info.cs b/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/Info.cs index 02c6741ec..415d6da00 100644 --- a/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/Info.cs +++ b/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/Info.cs @@ -1,29 +1,28 @@ -namespace Jellyfin.MediaEncoding.Keyframes.Matroska.Models +namespace Jellyfin.MediaEncoding.Keyframes.Matroska.Models; + +/// +/// The matroska Info segment. +/// +internal class Info { /// - /// The matroska Info segment. + /// Initializes a new instance of the class. /// - internal class Info + /// The timestamp scale in nanoseconds. + /// The duration of the entire file. + public Info(long timestampScale, double? duration) { - /// - /// Initializes a new instance of the class. - /// - /// The timestamp scale in nanoseconds. - /// The duration of the entire file. - public Info(long timestampScale, double? duration) - { - TimestampScale = timestampScale; - Duration = duration; - } + TimestampScale = timestampScale; + Duration = duration; + } - /// - /// Gets the timestamp scale in nanoseconds. - /// - public long TimestampScale { get; } + /// + /// Gets the timestamp scale in nanoseconds. + /// + public long TimestampScale { get; } - /// - /// Gets the total duration of the file. - /// - public double? Duration { get; } - } + /// + /// Gets the total duration of the file. + /// + public double? Duration { get; } } diff --git a/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/SeekHead.cs b/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/SeekHead.cs index d9e346c03..95e4fd882 100644 --- a/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/SeekHead.cs +++ b/src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/SeekHead.cs @@ -1,36 +1,35 @@ -namespace Jellyfin.MediaEncoding.Keyframes.Matroska.Models +namespace Jellyfin.MediaEncoding.Keyframes.Matroska.Models; + +/// +/// The matroska SeekHead segment. All positions are relative to the Segment container. +/// +internal class SeekHead { /// - /// The matroska SeekHead segment. All positions are relative to the Segment container. + /// Initializes a new instance of the class. /// - internal class SeekHead + /// The relative file position of the info segment. + /// The relative file position of the tracks segment. + /// The relative file position of the cues segment. + public SeekHead(long infoPosition, long tracksPosition, long cuesPosition) { - /// - /// Initializes a new instance of the class. - /// - /// The relative file position of the info segment. - /// The relative file position of the tracks segment. - /// The relative file position of the cues segment. - public SeekHead(long infoPosition, long tracksPosition, long cuesPosition) - { - InfoPosition = infoPosition; - TracksPosition = tracksPosition; - CuesPosition = cuesPosition; - } + InfoPosition = infoPosition; + TracksPosition = tracksPosition; + CuesPosition = cuesPosition; + } - /// - /// Gets relative file position of the info segment. - /// - public long InfoPosition { get; } + /// + /// Gets relative file position of the info segment. + /// + public long InfoPosition { get; } - /// - /// Gets the relative file position of the tracks segment. - /// - public long TracksPosition { get; } + /// + /// Gets the relative file position of the tracks segment. + /// + public long TracksPosition { get; } - /// - /// Gets the relative file position of the cues segment. - /// - public long CuesPosition { get; } - } + /// + /// Gets the relative file position of the cues segment. + /// + public long CuesPosition { get; } } -- cgit v1.2.3