aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authornicknsy <20588554+nicknsy@users.noreply.github.com>2023-02-22 00:08:35 -0800
committerNick <20588554+nicknsy@users.noreply.github.com>2023-06-22 16:19:59 -0700
commitca7d1a13000ad948eebbfdeb40542312f3e37d3e (patch)
tree6ff31f7f318410c62ba3278aeac71f26e9626603 /MediaBrowser.Model
parenta1eb2f6ea8cd78d527f1ae395378419f016208ab (diff)
Trickplay generation, manager, storage
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs12
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs6
-rw-r--r--MediaBrowser.Model/Entities/TrickplayTilesInfo.cs50
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs5
4 files changed, 73 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index a53be0fee..e1d9e00b7 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -48,7 +48,9 @@ public class EncodingOptions
EnableIntelLowPowerH264HwEncoder = false;
EnableIntelLowPowerHevcHwEncoder = false;
EnableHardwareEncoding = true;
+ EnableTrickplayHwAccel = false;
AllowHevcEncoding = false;
+ AllowMjpegEncoding = false;
EnableSubtitleExtraction = true;
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
@@ -245,11 +247,21 @@ public class EncodingOptions
public bool EnableHardwareEncoding { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether hardware acceleration is enabled for trickplay generation.
+ /// </summary>
+ public bool EnableTrickplayHwAccel { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether HEVC encoding is enabled.
/// </summary>
public bool AllowHevcEncoding { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether MJPEG encoding is enabled.
+ /// </summary>
+ public bool AllowMjpegEncoding { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether subtitle extraction is enabled.
/// </summary>
public bool EnableSubtitleExtraction { get; set; }
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 8fab1ca6d..ab424c6f5 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -569,6 +569,12 @@ namespace MediaBrowser.Model.Dto
public List<ChapterInfo> Chapters { get; set; }
/// <summary>
+ /// Gets or sets the trickplay manifest.
+ /// </summary>
+ /// <value>The trickplay manifest.</value>
+ public Dictionary<Guid, Dictionary<int, TrickplayTilesInfo>> Trickplay { get; set; }
+
+ /// <summary>
/// Gets or sets the type of the location.
/// </summary>
/// <value>The type of the location.</value>
diff --git a/MediaBrowser.Model/Entities/TrickplayTilesInfo.cs b/MediaBrowser.Model/Entities/TrickplayTilesInfo.cs
new file mode 100644
index 000000000..84b6b0322
--- /dev/null
+++ b/MediaBrowser.Model/Entities/TrickplayTilesInfo.cs
@@ -0,0 +1,50 @@
+namespace MediaBrowser.Model.Entities
+{
+ /// <summary>
+ /// Class TrickplayTilesInfo.
+ /// </summary>
+ public class TrickplayTilesInfo
+ {
+ /// <summary>
+ /// Gets or sets width of an individual tile.
+ /// </summary>
+ /// <value>The width.</value>
+ public int Width { get; set; }
+
+ /// <summary>
+ /// Gets or sets height of an individual tile.
+ /// </summary>
+ /// <value>The height.</value>
+ public int Height { get; set; }
+
+ /// <summary>
+ /// Gets or sets amount of tiles per row.
+ /// </summary>
+ /// <value>The tile grid's width.</value>
+ public int TileWidth { get; set; }
+
+ /// <summary>
+ /// Gets or sets amount of tiles per column.
+ /// </summary>
+ /// <value>The tile grid's height.</value>
+ public int TileHeight { get; set; }
+
+ /// <summary>
+ /// Gets or sets total amount of non-black tiles.
+ /// </summary>
+ /// <value>The tile count.</value>
+ public int TileCount { get; set; }
+
+ /// <summary>
+ /// Gets or sets interval in milliseconds between each trickplay tile.
+ /// </summary>
+ /// <value>The interval.</value>
+ public int Interval { get; set; }
+
+ /// <summary>
+ /// Gets or sets peak bandwith usage in bits per second.
+ /// </summary>
+ /// <value>The bandwidth.</value>
+ public int Bandwidth { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index 6fa1d778a..242a1c6e9 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -34,6 +34,11 @@ namespace MediaBrowser.Model.Querying
/// </summary>
Chapters,
+ /// <summary>
+ /// The trickplay manifest.
+ /// </summary>
+ Trickplay,
+
ChildCount,
/// <summary>