aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Drawing/IImageEncoder.cs13
-rw-r--r--MediaBrowser.Controller/Persistence/IItemRepository.cs21
-rw-r--r--MediaBrowser.Controller/Trickplay/ITrickplayManager.cs30
3 files changed, 21 insertions, 43 deletions
diff --git a/MediaBrowser.Controller/Drawing/IImageEncoder.cs b/MediaBrowser.Controller/Drawing/IImageEncoder.cs
index 42c680761..c7bfbdb53 100644
--- a/MediaBrowser.Controller/Drawing/IImageEncoder.cs
+++ b/MediaBrowser.Controller/Drawing/IImageEncoder.cs
@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
-using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Drawing;
namespace MediaBrowser.Controller.Drawing
@@ -84,13 +83,13 @@ namespace MediaBrowser.Controller.Drawing
void CreateSplashscreen(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops);
/// <summary>
- /// Creates a new jpeg trickplay grid image.
+ /// Creates a new trickplay tile image.
/// </summary>
- /// <param name="options">The options to use when creating the image. Width and Height are a quantity of tiles in this case, not pixels.</param>
+ /// <param name="options">The options to use when creating the image. Width and Height are a quantity of thumbnails in this case, not pixels.</param>
/// <param name="quality">The image encode quality.</param>
- /// <param name="imgWidth">The width of a single trickplay image.</param>
- /// <param name="imgHeight">Optional height of a single trickplay image, if it is known.</param>
- /// <returns>Height of single decoded trickplay image.</returns>
- int CreateTrickplayGrid(ImageCollageOptions options, int quality, int imgWidth, int? imgHeight);
+ /// <param name="imgWidth">The width of a single trickplay thumbnail.</param>
+ /// <param name="imgHeight">Optional height of a single trickplay thumbnail, if it is known.</param>
+ /// <returns>Height of single decoded trickplay thumbnail.</returns>
+ int CreateTrickplayTile(ImageCollageOptions options, int quality, int imgWidth, int? imgHeight);
}
}
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs
index 11eb4932c..2c52b2b45 100644
--- a/MediaBrowser.Controller/Persistence/IItemRepository.cs
+++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs
@@ -62,27 +62,6 @@ namespace MediaBrowser.Controller.Persistence
void SaveChapters(Guid id, IReadOnlyList<ChapterInfo> chapters);
/// <summary>
- /// Get available trickplay resolutions and corresponding info.
- /// </summary>
- /// <param name="itemId">The item.</param>
- /// <returns>Map of width resolutions to trickplay tiles info.</returns>
- Dictionary<int, TrickplayTilesInfo> GetTilesResolutions(Guid itemId);
-
- /// <summary>
- /// Saves trickplay tiles info.
- /// </summary>
- /// <param name="itemId">The item.</param>
- /// <param name="tilesInfo">The trickplay tiles info.</param>
- void SaveTilesInfo(Guid itemId, TrickplayTilesInfo tilesInfo);
-
- /// <summary>
- /// Gets trickplay data for an item.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>A map of media source id to a map of tile width to tile info.</returns>
- Dictionary<Guid, Dictionary<int, TrickplayTilesInfo>> GetTrickplayManifest(BaseItem item);
-
- /// <summary>
/// Gets the media streams.
/// </summary>
/// <param name="query">The query.</param>
diff --git a/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs b/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs
index 8d36fc3ff..0a1e780b2 100644
--- a/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs
+++ b/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs
@@ -2,8 +2,8 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+using Jellyfin.Data.Entities;
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Trickplay;
@@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Trickplay;
public interface ITrickplayManager
{
/// <summary>
- /// Generate or replace trickplay data.
+ /// Generates new trickplay images and metadata.
/// </summary>
/// <param name="video">The video.</param>
/// <param name="replace">Whether or not existing data should be replaced.</param>
@@ -26,28 +26,28 @@ public interface ITrickplayManager
/// </summary>
/// <param name="itemId">The item.</param>
/// <returns>Map of width resolutions to trickplay tiles info.</returns>
- Dictionary<int, TrickplayTilesInfo> GetTilesResolutions(Guid itemId);
+ Task<Dictionary<int, TrickplayInfo>> GetTrickplayResolutions(Guid itemId);
/// <summary>
- /// Saves trickplay tiles info.
+ /// Saves trickplay info.
/// </summary>
- /// <param name="itemId">The item.</param>
- /// <param name="tilesInfo">The trickplay tiles info.</param>
- void SaveTilesInfo(Guid itemId, TrickplayTilesInfo tilesInfo);
+ /// <param name="info">The trickplay info.</param>
+ /// <returns>Task.</returns>
+ Task SaveTrickplayInfo(TrickplayInfo info);
/// <summary>
- /// Gets the trickplay manifest.
+ /// Gets all trickplay infos for all media streams of an item.
/// </summary>
/// <param name="item">The item.</param>
- /// <returns>A map of media source id to a map of tile width to tile info.</returns>
- Dictionary<Guid, Dictionary<int, TrickplayTilesInfo>> GetTrickplayManifest(BaseItem item);
+ /// <returns>A map of media source id to a map of tile width to trickplay info.</returns>
+ Task<Dictionary<Guid, Dictionary<int, TrickplayInfo>>> GetTrickplayManifest(BaseItem item);
/// <summary>
- /// Gets the path to a trickplay tiles image.
+ /// Gets the path to a trickplay tile image.
/// </summary>
/// <param name="item">The item.</param>
- /// <param name="width">The width of a single tile.</param>
- /// <param name="index">The tile grid's index.</param>
+ /// <param name="width">The width of a single thumbnail.</param>
+ /// <param name="index">The tile's index.</param>
/// <returns>The absolute path.</returns>
string GetTrickplayTilePath(BaseItem item, int width, int index);
@@ -55,8 +55,8 @@ public interface ITrickplayManager
/// Gets the trickplay HLS playlist.
/// </summary>
/// <param name="itemId">The item.</param>
- /// <param name="width">The width of a single tile.</param>
+ /// <param name="width">The width of a single thumbnail.</param>
/// <param name="apiKey">Optional api key of the requesting user.</param>
/// <returns>The text content of the .m3u8 playlist.</returns>
- string? GetHlsPlaylist(Guid itemId, int width, string? apiKey);
+ Task<string?> GetHlsPlaylist(Guid itemId, int width, string? apiKey);
}