Add json parser for video rotation side data

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka 2024-03-30 05:55:15 +08:00
parent 46d559a0a1
commit bf654bde60
3 changed files with 18 additions and 1 deletions

View File

@ -69,5 +69,12 @@ namespace MediaBrowser.MediaEncoding.Probing
/// <value>The DvBlSignalCompatibilityId.</value>
[JsonPropertyName("dv_bl_signal_compatibility_id")]
public int? DvBlSignalCompatibilityId { get; set; }
/// <summary>
/// Gets or sets the Rotation.
/// </summary>
/// <value>The Rotation.</value>
[JsonPropertyName("rotation")]
public int? Rotation { get; set; }
}
}

View File

@ -887,8 +887,12 @@ namespace MediaBrowser.MediaEncoding.Probing
stream.ElPresentFlag = data.ElPresentFlag;
stream.BlPresentFlag = data.BlPresentFlag;
stream.DvBlSignalCompatibilityId = data.DvBlSignalCompatibilityId;
}
break;
// Parse video rotation metadata from side_data
else if (string.Equals(data.SideDataType, "Display Matrix", StringComparison.OrdinalIgnoreCase))
{
stream.Rotation = data.Rotation;
}
}
}

View File

@ -122,6 +122,12 @@ namespace MediaBrowser.Model.Entities
/// <value>The Dolby Vision bl signal compatibility id.</value>
public int? DvBlSignalCompatibilityId { get; set; }
/// <summary>
/// Gets or sets the Rotation.
/// </summary>
/// <value>The video rotation.</value>
public int? Rotation { get; set; }
/// <summary>
/// Gets or sets the comment.
/// </summary>