ChannelData.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. 
  2. namespace WingRtmpService
  3. {
  4. public enum ChannelCategory
  5. {
  6. DeskChannel,
  7. TerminalChannel,
  8. CameraChannel,
  9. TerminalTestChannel,
  10. NoneChannel
  11. }
  12. public class ChannelData
  13. {
  14. public string Id { get; }
  15. public ChannelCategory Category { get; set; }
  16. public string UpLoadUrl { get; }
  17. public string DownLoadUrl { get; }
  18. public string HttpUrl { get; }
  19. public string HlsUrl { get; }
  20. public int Height { get; set; }
  21. public int Width { get; set; }
  22. public bool IsActive { get; set; }
  23. public bool IsDisposing { get ; set ; }
  24. public string UserId { get; set; }
  25. public ChannelData()
  26. {
  27. }
  28. public ChannelData(string id, string upLoadUrl, string downLoadUrl, ChannelCategory category, string httpUrl = "", string hlsUrl = "")
  29. {
  30. Id = id;
  31. UpLoadUrl = upLoadUrl;
  32. DownLoadUrl = downLoadUrl;
  33. Category = category;
  34. HttpUrl = httpUrl;
  35. HlsUrl = hlsUrl;
  36. }
  37. public ChannelData(string id, string upLoadUrl, string downLoadUrl, string httpUrl = "", string hlsUrl = "")
  38. {
  39. Id = id;
  40. UpLoadUrl = upLoadUrl;
  41. DownLoadUrl = downLoadUrl;
  42. HttpUrl = httpUrl;
  43. HlsUrl = hlsUrl;
  44. }
  45. public string ToString()
  46. {
  47. return $"{Category} Cid:{Id} - UpLoadUrl:{UpLoadUrl} - DownLoadUrl:{DownLoadUrl} - IsActive:{IsActive}";
  48. }
  49. public void Dispose()
  50. {
  51. }
  52. }
  53. }