PushLiveInfoConfig.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace WingRtmpService
  5. {
  6. class PushLiveInfoConfig
  7. {
  8. /// <summary>
  9. /// 品牌
  10. /// </summary>
  11. public string Brand { get; set; }
  12. /// <summary>
  13. /// 型号集合
  14. /// </summary>
  15. public ICollection<PushLiveModelInfoConfig> PushLiveModelConfigs { get; set; }
  16. public DateTime UpdateTime { get; set; }
  17. public PushLiveInfoConfig(string brand)
  18. {
  19. Brand = brand;
  20. }
  21. }
  22. class PushLiveModelInfoConfig
  23. {
  24. public bool Lock { get; }
  25. public string Id { get; }
  26. /// <summary>
  27. /// 型号
  28. /// </summary>
  29. public string Model { get; set; }
  30. /// <summary>
  31. /// 推荐分辨率宽度
  32. /// </summary>
  33. public int RecommendWidth { get; set; }
  34. /// <summary>
  35. /// 推荐分辨率高度
  36. /// </summary>
  37. public int RecommendHeight { get; set; }
  38. public PushLiveModelInfoConfig(string id,string model,int recommendWidth,int recommendHeight, bool iLock)
  39. {
  40. Lock = iLock;
  41. Id = id;
  42. Model = model;
  43. RecommendWidth = recommendWidth;
  44. RecommendHeight = recommendHeight;
  45. }
  46. }
  47. public enum LiveProtocol
  48. {
  49. Rtmp,
  50. RTC,
  51. Rtsp
  52. }
  53. class PushLiveModel
  54. {
  55. public string TerminalId { get; }
  56. public string TerminalName { get; }
  57. public bool IsMerge { get; set; }
  58. public LiveProtocol LiveProtocol { get; set; }
  59. public DateTime UpdateTime { get; set; }
  60. public PushLiveModel(string terminalId, string terminalName, bool isMerge, LiveProtocol liveProtocol)
  61. {
  62. TerminalId = terminalId;
  63. TerminalName = terminalName;
  64. IsMerge = isMerge;
  65. LiveProtocol = liveProtocol;
  66. }
  67. }
  68. }