Refactor various components to improve code clarity and maintainability. Update ListUsersQueryHandler to utilize UserListFilter for parameter handling. Refactor BumperSpecFactory and related classes to encapsulate input parameters into dedicated records, enhancing readability. Adjust MediaAsset and Slot classes to streamline content updates with new content models. Improve BumperRenderBackgroundService and MediaProcessingBackgroundService to use MediaReadyInfo for asset readiness, ensuring consistent parameter management across the application.
This commit is contained in:
@@ -90,26 +90,17 @@ public class MediaAsset
|
||||
Touch();
|
||||
}
|
||||
|
||||
public void MarkReady(
|
||||
TimeSpan duration,
|
||||
int segmentSeconds,
|
||||
int segmentCount,
|
||||
int width,
|
||||
int height,
|
||||
string videoCodec,
|
||||
string audioCodec,
|
||||
string relativePath
|
||||
)
|
||||
public void MarkReady(MediaReadyInfo info)
|
||||
{
|
||||
Status = MediaAssetStatus.Ready;
|
||||
Duration = duration;
|
||||
SegmentSeconds = segmentSeconds;
|
||||
SegmentCount = segmentCount;
|
||||
Width = width;
|
||||
Height = height;
|
||||
VideoCodec = videoCodec;
|
||||
AudioCodec = audioCodec;
|
||||
RelativePath = relativePath;
|
||||
Duration = info.Duration;
|
||||
SegmentSeconds = info.SegmentSeconds;
|
||||
SegmentCount = info.SegmentCount;
|
||||
Width = info.Width;
|
||||
Height = info.Height;
|
||||
VideoCodec = info.VideoCodec;
|
||||
AudioCodec = info.AudioCodec;
|
||||
RelativePath = info.RelativePath;
|
||||
ErrorMessage = null;
|
||||
if (ProcessingStartedAt is { } startedAt)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace TeleWave.Domain.Media;
|
||||
|
||||
/// <summary>
|
||||
/// Результат обработки ассета: что получилось после нарезки в HLS. Домен эти значения не вычисляет —
|
||||
/// их приносит обработчик медиа (ffmpeg), а <see cref="MediaAsset.MarkReady"/> лишь фиксирует.
|
||||
/// </summary>
|
||||
public sealed record MediaReadyInfo(
|
||||
TimeSpan Duration,
|
||||
int SegmentSeconds,
|
||||
int SegmentCount,
|
||||
int Width,
|
||||
int Height,
|
||||
string VideoCodec,
|
||||
string AudioCodec,
|
||||
/// <summary>Путь к каталогу ассета относительно корня хранилища.</summary>
|
||||
string RelativePath
|
||||
);
|
||||
Reference in New Issue
Block a user