MediaStreamInfo.cs 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. using System.Collections.Generic;
  2. using System.Text.Json.Serialization;
  3. using MediaBrowser.Common.Json.Converters;
  4. namespace MediaBrowser.MediaEncoding.Probing
  5. {
  6. /// <summary>
  7. /// Represents a stream within the output.
  8. /// </summary>
  9. public class MediaStreamInfo
  10. {
  11. /// <summary>
  12. /// Gets or sets the index.
  13. /// </summary>
  14. /// <value>The index.</value>
  15. [JsonPropertyName("index")]
  16. public int Index { get; set; }
  17. /// <summary>
  18. /// Gets or sets the profile.
  19. /// </summary>
  20. /// <value>The profile.</value>
  21. [JsonPropertyName("profile")]
  22. public string Profile { get; set; }
  23. /// <summary>
  24. /// Gets or sets the codec_name.
  25. /// </summary>
  26. /// <value>The codec_name.</value>
  27. [JsonPropertyName("codec_name")]
  28. public string CodecName { get; set; }
  29. /// <summary>
  30. /// Gets or sets the codec_long_name.
  31. /// </summary>
  32. /// <value>The codec_long_name.</value>
  33. [JsonPropertyName("codec_long_name")]
  34. public string CodecLongName { get; set; }
  35. /// <summary>
  36. /// Gets or sets the codec_type.
  37. /// </summary>
  38. /// <value>The codec_type.</value>
  39. [JsonPropertyName("codec_type")]
  40. public string CodecType { get; set; }
  41. /// <summary>
  42. /// Gets or sets the sample_rate.
  43. /// </summary>
  44. /// <value>The sample_rate.</value>
  45. [JsonPropertyName("sample_rate")]
  46. public string SampleRate { get; set; }
  47. /// <summary>
  48. /// Gets or sets the channels.
  49. /// </summary>
  50. /// <value>The channels.</value>
  51. [JsonPropertyName("channels")]
  52. public int Channels { get; set; }
  53. /// <summary>
  54. /// Gets or sets the channel_layout.
  55. /// </summary>
  56. /// <value>The channel_layout.</value>
  57. [JsonPropertyName("channel_layout")]
  58. public string ChannelLayout { get; set; }
  59. /// <summary>
  60. /// Gets or sets the avg_frame_rate.
  61. /// </summary>
  62. /// <value>The avg_frame_rate.</value>
  63. [JsonPropertyName("avg_frame_rate")]
  64. public string AverageFrameRate { get; set; }
  65. /// <summary>
  66. /// Gets or sets the duration.
  67. /// </summary>
  68. /// <value>The duration.</value>
  69. [JsonPropertyName("duration")]
  70. public string Duration { get; set; }
  71. /// <summary>
  72. /// Gets or sets the bit_rate.
  73. /// </summary>
  74. /// <value>The bit_rate.</value>
  75. [JsonPropertyName("bit_rate")]
  76. public string BitRate { get; set; }
  77. /// <summary>
  78. /// Gets or sets the width.
  79. /// </summary>
  80. /// <value>The width.</value>
  81. [JsonPropertyName("width")]
  82. public int Width { get; set; }
  83. /// <summary>
  84. /// Gets or sets the refs.
  85. /// </summary>
  86. /// <value>The refs.</value>
  87. [JsonPropertyName("refs")]
  88. public int Refs { get; set; }
  89. /// <summary>
  90. /// Gets or sets the height.
  91. /// </summary>
  92. /// <value>The height.</value>
  93. [JsonPropertyName("height")]
  94. public int Height { get; set; }
  95. /// <summary>
  96. /// Gets or sets the display_aspect_ratio.
  97. /// </summary>
  98. /// <value>The display_aspect_ratio.</value>
  99. [JsonPropertyName("display_aspect_ratio")]
  100. public string DisplayAspectRatio { get; set; }
  101. /// <summary>
  102. /// Gets or sets the tags.
  103. /// </summary>
  104. /// <value>The tags.</value>
  105. [JsonPropertyName("tags")]
  106. public IReadOnlyDictionary<string, string> Tags { get; set; }
  107. /// <summary>
  108. /// Gets or sets the bits_per_sample.
  109. /// </summary>
  110. /// <value>The bits_per_sample.</value>
  111. [JsonPropertyName("bits_per_sample")]
  112. public int BitsPerSample { get; set; }
  113. /// <summary>
  114. /// Gets or sets the bits_per_raw_sample.
  115. /// </summary>
  116. /// <value>The bits_per_raw_sample.</value>
  117. [JsonPropertyName("bits_per_raw_sample")]
  118. [JsonConverter(typeof(JsonInt32Converter))]
  119. public int BitsPerRawSample { get; set; }
  120. /// <summary>
  121. /// Gets or sets the r_frame_rate.
  122. /// </summary>
  123. /// <value>The r_frame_rate.</value>
  124. [JsonPropertyName("r_frame_rate")]
  125. public string RFrameRate { get; set; }
  126. /// <summary>
  127. /// Gets or sets the has_b_frames.
  128. /// </summary>
  129. /// <value>The has_b_frames.</value>
  130. [JsonPropertyName("has_b_frames")]
  131. public int HasBFrames { get; set; }
  132. /// <summary>
  133. /// Gets or sets the sample_aspect_ratio.
  134. /// </summary>
  135. /// <value>The sample_aspect_ratio.</value>
  136. [JsonPropertyName("sample_aspect_ratio")]
  137. public string SampleAspectRatio { get; set; }
  138. /// <summary>
  139. /// Gets or sets the pix_fmt.
  140. /// </summary>
  141. /// <value>The pix_fmt.</value>
  142. [JsonPropertyName("pix_fmt")]
  143. public string PixelFormat { get; set; }
  144. /// <summary>
  145. /// Gets or sets the level.
  146. /// </summary>
  147. /// <value>The level.</value>
  148. [JsonPropertyName("level")]
  149. public int Level { get; set; }
  150. /// <summary>
  151. /// Gets or sets the time_base.
  152. /// </summary>
  153. /// <value>The time_base.</value>
  154. [JsonPropertyName("time_base")]
  155. public string TimeBase { get; set; }
  156. /// <summary>
  157. /// Gets or sets the start_time.
  158. /// </summary>
  159. /// <value>The start_time.</value>
  160. [JsonPropertyName("start_time")]
  161. public string StartTime { get; set; }
  162. /// <summary>
  163. /// Gets or sets the codec_time_base.
  164. /// </summary>
  165. /// <value>The codec_time_base.</value>
  166. [JsonPropertyName("codec_time_base")]
  167. public string CodecTimeBase { get; set; }
  168. /// <summary>
  169. /// Gets or sets the codec_tag.
  170. /// </summary>
  171. /// <value>The codec_tag.</value>
  172. [JsonPropertyName("codec_tag")]
  173. public string CodecTag { get; set; }
  174. /// <summary>
  175. /// Gets or sets the codec_tag_string.
  176. /// </summary>
  177. /// <value>The codec_tag_string.</value>
  178. [JsonPropertyName("codec_tag_string")]
  179. public string CodecTagString { get; set; }
  180. /// <summary>
  181. /// Gets or sets the sample_fmt.
  182. /// </summary>
  183. /// <value>The sample_fmt.</value>
  184. [JsonPropertyName("sample_fmt")]
  185. public string SampleFmt { get; set; }
  186. /// <summary>
  187. /// Gets or sets the dmix_mode.
  188. /// </summary>
  189. /// <value>The dmix_mode.</value>
  190. [JsonPropertyName("dmix_mode")]
  191. public string DmixMode { get; set; }
  192. /// <summary>
  193. /// Gets or sets the start_pts.
  194. /// </summary>
  195. /// <value>The start_pts.</value>
  196. [JsonPropertyName("start_pts")]
  197. public long StartPts { get; set; }
  198. /// <summary>
  199. /// Gets or sets the is_avc.
  200. /// </summary>
  201. /// <value>The is_avc.</value>
  202. [JsonPropertyName("is_avc")]
  203. public string IsAvc { get; set; }
  204. /// <summary>
  205. /// Gets or sets the nal_length_size.
  206. /// </summary>
  207. /// <value>The nal_length_size.</value>
  208. [JsonPropertyName("nal_length_size")]
  209. public string NalLengthSize { get; set; }
  210. /// <summary>
  211. /// Gets or sets the ltrt_cmixlev.
  212. /// </summary>
  213. /// <value>The ltrt_cmixlev.</value>
  214. [JsonPropertyName("ltrt_cmixlev")]
  215. public string LtrtCmixlev { get; set; }
  216. /// <summary>
  217. /// Gets or sets the ltrt_surmixlev.
  218. /// </summary>
  219. /// <value>The ltrt_surmixlev.</value>
  220. [JsonPropertyName("ltrt_surmixlev")]
  221. public string LtrtSurmixlev { get; set; }
  222. /// <summary>
  223. /// Gets or sets the loro_cmixlev.
  224. /// </summary>
  225. /// <value>The loro_cmixlev.</value>
  226. [JsonPropertyName("loro_cmixlev")]
  227. public string LoroCmixlev { get; set; }
  228. /// <summary>
  229. /// Gets or sets the loro_surmixlev.
  230. /// </summary>
  231. /// <value>The loro_surmixlev.</value>
  232. [JsonPropertyName("loro_surmixlev")]
  233. public string LoroSurmixlev { get; set; }
  234. [JsonPropertyName("field_order")]
  235. public string FieldOrder { get; set; }
  236. /// <summary>
  237. /// Gets or sets the disposition.
  238. /// </summary>
  239. /// <value>The disposition.</value>
  240. [JsonPropertyName("disposition")]
  241. public IReadOnlyDictionary<string, int> Disposition { get; set; }
  242. }
  243. }