mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 16:46:31 +00:00
add controller for video
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
using Azaion.Video.DTO;
|
||||
using IOPath = System.IO.Path;
|
||||
|
||||
namespace Azaion.Repository.Entities;
|
||||
|
||||
public class Media
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Path { get; set; } = null!;
|
||||
public Guid? AnnotatorId { get; set; }
|
||||
public MediaStatusEnum Status { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
public string Path { get; set; } = null!;
|
||||
public int Resolution { get; set; }
|
||||
public int Bitrate { get; set; }
|
||||
public Guid? AnnotatorId { get; set; }
|
||||
public MediaStatusEnum Status { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
|
||||
|
||||
private string MediaName => IOPath.GetFileNameWithoutExtension(Path);
|
||||
private string OutDir => Directory.CreateDirectory(IOPath.Combine(Constants.MEDIA_HLS_FOLDER, MediaName)).FullName;
|
||||
|
||||
public string M3U8File => IOPath.Combine(OutDir, $"{MediaName}.{Constants.M3_U8_EXT}");
|
||||
public string SegmentFile => IOPath.Combine(OutDir, $"{MediaName}%03d.{Constants.TS_EXT}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user