StreamOptions.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. namespace MediaBrowser.Model.Dto
  2. {
  3. /// <summary>
  4. /// Class VideoStreamOptions
  5. /// </summary>
  6. public class VideoStreamOptions : StreamOptions
  7. {
  8. /// <summary>
  9. /// Gets or sets the video codec.
  10. /// Omit to copy
  11. /// </summary>
  12. /// <value>The video codec.</value>
  13. public VideoCodecs? VideoCodec { get; set; }
  14. /// <summary>
  15. /// Gets or sets the video bit rate.
  16. /// </summary>
  17. /// <value>The video bit rate.</value>
  18. public int? VideoBitRate { get; set; }
  19. /// <summary>
  20. /// Gets or sets the width.
  21. /// </summary>
  22. /// <value>The width.</value>
  23. public int? Width { get; set; }
  24. /// <summary>
  25. /// Gets or sets the height.
  26. /// </summary>
  27. /// <value>The height.</value>
  28. public int? Height { get; set; }
  29. /// <summary>
  30. /// Gets or sets the width of the max.
  31. /// </summary>
  32. /// <value>The width of the max.</value>
  33. public int? MaxWidth { get; set; }
  34. /// <summary>
  35. /// Gets or sets the height of the max.
  36. /// </summary>
  37. /// <value>The height of the max.</value>
  38. public int? MaxHeight { get; set; }
  39. /// <summary>
  40. /// Gets or sets the frame rate.
  41. /// </summary>
  42. /// <value>The frame rate.</value>
  43. public double? FrameRate { get; set; }
  44. /// <summary>
  45. /// Gets or sets the index of the audio stream.
  46. /// </summary>
  47. /// <value>The index of the audio stream.</value>
  48. public int? AudioStreamIndex { get; set; }
  49. /// <summary>
  50. /// Gets or sets the index of the video stream.
  51. /// </summary>
  52. /// <value>The index of the video stream.</value>
  53. public int? VideoStreamIndex { get; set; }
  54. /// <summary>
  55. /// Gets or sets the index of the subtitle stream.
  56. /// </summary>
  57. /// <value>The index of the subtitle stream.</value>
  58. public int? SubtitleStreamIndex { get; set; }
  59. }
  60. /// <summary>
  61. /// Class StreamOptions
  62. /// </summary>
  63. public abstract class StreamOptions
  64. {
  65. /// <summary>
  66. /// Gets or sets the audio bit rate.
  67. /// </summary>
  68. /// <value>The audio bit rate.</value>
  69. public int? AudioBitRate { get; set; }
  70. /// <summary>
  71. /// Gets or sets the audio codec.
  72. /// Omit to copy the original stream
  73. /// </summary>
  74. /// <value>The audio encoding format.</value>
  75. public AudioCodecs? AudioCodec { get; set; }
  76. /// <summary>
  77. /// Gets or sets the item id.
  78. /// </summary>
  79. /// <value>The item id.</value>
  80. public string ItemId { get; set; }
  81. /// <summary>
  82. /// Gets or sets the max audio channels.
  83. /// </summary>
  84. /// <value>The max audio channels.</value>
  85. public int? MaxAudioChannels { get; set; }
  86. /// <summary>
  87. /// Gets or sets the max audio sample rate.
  88. /// </summary>
  89. /// <value>The max audio sample rate.</value>
  90. public int? MaxAudioSampleRate { get; set; }
  91. /// <summary>
  92. /// Gets or sets the start time ticks.
  93. /// </summary>
  94. /// <value>The start time ticks.</value>
  95. public long? StartTimeTicks { get; set; }
  96. /// <summary>
  97. /// Gets or sets a value indicating whether the original media should be served statically
  98. /// Only used with progressive streaming
  99. /// </summary>
  100. /// <value><c>true</c> if static; otherwise, <c>false</c>.</value>
  101. public bool? Static { get; set; }
  102. /// <summary>
  103. /// Gets or sets the output file extension.
  104. /// </summary>
  105. /// <value>The output file extension.</value>
  106. public string OutputFileExtension { get; set; }
  107. }
  108. /// <summary>
  109. /// These are the codecs the api is capable of encoding to
  110. /// </summary>
  111. public enum AudioCodecs
  112. {
  113. /// <summary>
  114. /// The aac
  115. /// </summary>
  116. Aac,
  117. /// <summary>
  118. /// The MP3
  119. /// </summary>
  120. Mp3,
  121. /// <summary>
  122. /// The vorbis
  123. /// </summary>
  124. Vorbis,
  125. /// <summary>
  126. /// The wma
  127. /// </summary>
  128. Wma
  129. }
  130. /// <summary>
  131. /// Enum VideoCodecs
  132. /// </summary>
  133. public enum VideoCodecs
  134. {
  135. /// <summary>
  136. /// The H264
  137. /// </summary>
  138. H264,
  139. /// <summary>
  140. /// The theora
  141. /// </summary>
  142. Theora,
  143. /// <summary>
  144. /// The VPX
  145. /// </summary>
  146. Vpx,
  147. /// <summary>
  148. /// The WMV
  149. /// </summary>
  150. Wmv
  151. }
  152. }