53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Futonizer.Models;
|
|
|
|
/// <summary>
|
|
/// Root object returned by `mkvmerge -J <file>`.
|
|
/// Only the fields we actually need are mapped.
|
|
/// </summary>
|
|
public class MkvIdentifyResult
|
|
{
|
|
[JsonPropertyName("file_name")]
|
|
public string? FileName { get; set; }
|
|
|
|
[JsonPropertyName("tracks")]
|
|
public List<MkvTrack> Tracks { get; set; } = new();
|
|
}
|
|
|
|
public class MkvTrack
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("type")]
|
|
public string Type { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("codec")]
|
|
public string Codec { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("properties")]
|
|
public MkvTrackProperties? Properties { get; set; }
|
|
}
|
|
|
|
public class MkvTrackProperties
|
|
{
|
|
[JsonPropertyName("language")]
|
|
public string? Language { get; set; }
|
|
|
|
[JsonPropertyName("language_ietf")]
|
|
public string? LanguageIetf { get; set; }
|
|
|
|
[JsonPropertyName("track_name")]
|
|
public string? TrackName { get; set; }
|
|
|
|
[JsonPropertyName("default_track")]
|
|
public bool DefaultTrack { get; set; }
|
|
|
|
[JsonPropertyName("forced_track")]
|
|
public bool ForcedTrack { get; set; }
|
|
|
|
[JsonPropertyName("audio_channels")]
|
|
public int? AudioChannels { get; set; }
|
|
}
|