mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
Add first draft of keyframe extraction for Matroska
This commit is contained in:
29
src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/Info.cs
Normal file
29
src/Jellyfin.MediaEncoding.Keyframes/Matroska/Models/Info.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
namespace Jellyfin.MediaEncoding.Keyframes.Matroska.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// The matroska Info segment.
|
||||
/// </summary>
|
||||
internal class Info
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Info"/> class.
|
||||
/// </summary>
|
||||
/// <param name="timestampScale">The timestamp scale in nanoseconds.</param>
|
||||
/// <param name="duration">The duration of the entire file.</param>
|
||||
public Info(long timestampScale, double? duration)
|
||||
{
|
||||
TimestampScale = timestampScale;
|
||||
Duration = duration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the timestamp scale in nanoseconds.
|
||||
/// </summary>
|
||||
public long TimestampScale { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total duration of the file.
|
||||
/// </summary>
|
||||
public double? Duration { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace Jellyfin.MediaEncoding.Keyframes.Matroska.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// The matroska SeekHead segment. All positions are relative to the Segment container.
|
||||
/// </summary>
|
||||
internal class SeekHead
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SeekHead"/> class.
|
||||
/// </summary>
|
||||
/// <param name="infoPosition">The relative file position of the info segment.</param>
|
||||
/// <param name="tracksPosition">The relative file position of the tracks segment.</param>
|
||||
/// <param name="cuesPosition">The relative file position of the cues segment.</param>
|
||||
public SeekHead(long infoPosition, long tracksPosition, long cuesPosition)
|
||||
{
|
||||
InfoPosition = infoPosition;
|
||||
TracksPosition = tracksPosition;
|
||||
CuesPosition = cuesPosition;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets relative file position of the info segment.
|
||||
/// </summary>
|
||||
public long InfoPosition { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the relative file position of the tracks segment.
|
||||
/// </summary>
|
||||
public long TracksPosition { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the relative file position of the cues segment.
|
||||
/// </summary>
|
||||
public long CuesPosition { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user