ApiEntryPoint.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. using MediaBrowser.Api.Playback;
  2. using MediaBrowser.Common.Configuration;
  3. using MediaBrowser.Common.IO;
  4. using MediaBrowser.Controller.Configuration;
  5. using MediaBrowser.Controller.Plugins;
  6. using MediaBrowser.Controller.Session;
  7. using MediaBrowser.Model.Configuration;
  8. using MediaBrowser.Model.Logging;
  9. using MediaBrowser.Model.Session;
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Diagnostics;
  13. using System.IO;
  14. using System.Linq;
  15. using System.Threading;
  16. using System.Threading.Tasks;
  17. namespace MediaBrowser.Api
  18. {
  19. /// <summary>
  20. /// Class ServerEntryPoint
  21. /// </summary>
  22. public class ApiEntryPoint : IServerEntryPoint
  23. {
  24. /// <summary>
  25. /// The instance
  26. /// </summary>
  27. public static ApiEntryPoint Instance;
  28. /// <summary>
  29. /// Gets or sets the logger.
  30. /// </summary>
  31. /// <value>The logger.</value>
  32. private ILogger Logger { get; set; }
  33. /// <summary>
  34. /// The application paths
  35. /// </summary>
  36. private readonly IServerConfigurationManager _config;
  37. private readonly ISessionManager _sessionManager;
  38. private readonly IFileSystem _fileSystem;
  39. public readonly SemaphoreSlim TranscodingStartLock = new SemaphoreSlim(1, 1);
  40. /// <summary>
  41. /// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
  42. /// </summary>
  43. /// <param name="logger">The logger.</param>
  44. /// <param name="sessionManager">The session manager.</param>
  45. /// <param name="config">The configuration.</param>
  46. public ApiEntryPoint(ILogger logger, ISessionManager sessionManager, IServerConfigurationManager config, IFileSystem fileSystem)
  47. {
  48. Logger = logger;
  49. _sessionManager = sessionManager;
  50. _config = config;
  51. _fileSystem = fileSystem;
  52. Instance = this;
  53. }
  54. /// <summary>
  55. /// Runs this instance.
  56. /// </summary>
  57. public void Run()
  58. {
  59. try
  60. {
  61. DeleteEncodedMediaCache();
  62. }
  63. catch (DirectoryNotFoundException)
  64. {
  65. // Don't clutter the log
  66. }
  67. catch (IOException ex)
  68. {
  69. Logger.ErrorException("Error deleting encoded media cache", ex);
  70. }
  71. }
  72. public EncodingOptions GetEncodingOptions()
  73. {
  74. return _config.GetConfiguration<EncodingOptions>("encoding");
  75. }
  76. /// <summary>
  77. /// Deletes the encoded media cache.
  78. /// </summary>
  79. private void DeleteEncodedMediaCache()
  80. {
  81. var path = _config.ApplicationPaths.TranscodingTempPath;
  82. foreach (var file in Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories)
  83. .ToList())
  84. {
  85. _fileSystem.DeleteFile(file);
  86. }
  87. }
  88. /// <summary>
  89. /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
  90. /// </summary>
  91. public void Dispose()
  92. {
  93. Dispose(true);
  94. GC.SuppressFinalize(this);
  95. }
  96. /// <summary>
  97. /// Releases unmanaged and - optionally - managed resources.
  98. /// </summary>
  99. /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
  100. protected virtual void Dispose(bool dispose)
  101. {
  102. var jobCount = _activeTranscodingJobs.Count;
  103. Parallel.ForEach(_activeTranscodingJobs.ToList(), j => KillTranscodingJob(j, path => true));
  104. // Try to allow for some time to kill the ffmpeg processes and delete the partial stream files
  105. if (jobCount > 0)
  106. {
  107. Thread.Sleep(1000);
  108. }
  109. }
  110. /// <summary>
  111. /// The active transcoding jobs
  112. /// </summary>
  113. private readonly List<TranscodingJob> _activeTranscodingJobs = new List<TranscodingJob>();
  114. /// <summary>
  115. /// Called when [transcode beginning].
  116. /// </summary>
  117. /// <param name="path">The path.</param>
  118. /// <param name="playSessionId">The play session identifier.</param>
  119. /// <param name="transcodingJobId">The transcoding job identifier.</param>
  120. /// <param name="type">The type.</param>
  121. /// <param name="process">The process.</param>
  122. /// <param name="deviceId">The device id.</param>
  123. /// <param name="state">The state.</param>
  124. /// <param name="cancellationTokenSource">The cancellation token source.</param>
  125. /// <returns>TranscodingJob.</returns>
  126. public TranscodingJob OnTranscodeBeginning(string path,
  127. string playSessionId,
  128. string transcodingJobId,
  129. TranscodingJobType type,
  130. Process process,
  131. string deviceId,
  132. StreamState state,
  133. CancellationTokenSource cancellationTokenSource)
  134. {
  135. lock (_activeTranscodingJobs)
  136. {
  137. var job = new TranscodingJob(Logger)
  138. {
  139. Type = type,
  140. Path = path,
  141. Process = process,
  142. ActiveRequestCount = 1,
  143. DeviceId = deviceId,
  144. CancellationTokenSource = cancellationTokenSource,
  145. Id = transcodingJobId,
  146. PlaySessionId = playSessionId
  147. };
  148. _activeTranscodingJobs.Add(job);
  149. ReportTranscodingProgress(job, state, null, null, null, null);
  150. return job;
  151. }
  152. }
  153. public void ReportTranscodingProgress(TranscodingJob job, StreamState state, TimeSpan? transcodingPosition, float? framerate, double? percentComplete, long? bytesTranscoded)
  154. {
  155. var ticks = transcodingPosition.HasValue ? transcodingPosition.Value.Ticks : (long?)null;
  156. if (job != null)
  157. {
  158. job.Framerate = framerate;
  159. job.CompletionPercentage = percentComplete;
  160. job.TranscodingPositionTicks = ticks;
  161. job.BytesTranscoded = bytesTranscoded;
  162. }
  163. var deviceId = state.Request.DeviceId;
  164. if (!string.IsNullOrWhiteSpace(deviceId))
  165. {
  166. var audioCodec = state.ActualOutputAudioCodec;
  167. var videoCodec = state.ActualOutputVideoCodec;
  168. _sessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
  169. {
  170. Bitrate = state.TotalOutputBitrate,
  171. AudioCodec = audioCodec,
  172. VideoCodec = videoCodec,
  173. Container = state.OutputContainer,
  174. Framerate = framerate,
  175. CompletionPercentage = percentComplete,
  176. Width = state.OutputWidth,
  177. Height = state.OutputHeight,
  178. AudioChannels = state.OutputAudioChannels,
  179. IsAudioDirect = string.Equals(state.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase),
  180. IsVideoDirect = string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)
  181. });
  182. }
  183. }
  184. /// <summary>
  185. /// <summary>
  186. /// The progressive
  187. /// </summary>
  188. /// Called when [transcode failed to start].
  189. /// </summary>
  190. /// <param name="path">The path.</param>
  191. /// <param name="type">The type.</param>
  192. /// <param name="state">The state.</param>
  193. public void OnTranscodeFailedToStart(string path, TranscodingJobType type, StreamState state)
  194. {
  195. lock (_activeTranscodingJobs)
  196. {
  197. var job = _activeTranscodingJobs.First(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
  198. _activeTranscodingJobs.Remove(job);
  199. }
  200. if (!string.IsNullOrWhiteSpace(state.Request.DeviceId))
  201. {
  202. _sessionManager.ClearTranscodingInfo(state.Request.DeviceId);
  203. }
  204. }
  205. /// <summary>
  206. /// Determines whether [has active transcoding job] [the specified path].
  207. /// </summary>
  208. /// <param name="path">The path.</param>
  209. /// <param name="type">The type.</param>
  210. /// <returns><c>true</c> if [has active transcoding job] [the specified path]; otherwise, <c>false</c>.</returns>
  211. public bool HasActiveTranscodingJob(string path, TranscodingJobType type)
  212. {
  213. return GetTranscodingJob(path, type) != null;
  214. }
  215. public TranscodingJob GetTranscodingJob(string path, TranscodingJobType type)
  216. {
  217. lock (_activeTranscodingJobs)
  218. {
  219. return _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
  220. }
  221. }
  222. public TranscodingJob GetTranscodingJob(string id)
  223. {
  224. lock (_activeTranscodingJobs)
  225. {
  226. return _activeTranscodingJobs.FirstOrDefault(j => j.Id.Equals(id, StringComparison.OrdinalIgnoreCase));
  227. }
  228. }
  229. /// <summary>
  230. /// Called when [transcode begin request].
  231. /// </summary>
  232. /// <param name="path">The path.</param>
  233. /// <param name="type">The type.</param>
  234. public TranscodingJob OnTranscodeBeginRequest(string path, TranscodingJobType type)
  235. {
  236. lock (_activeTranscodingJobs)
  237. {
  238. var job = _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
  239. if (job == null)
  240. {
  241. return null;
  242. }
  243. OnTranscodeBeginRequest(job);
  244. return job;
  245. }
  246. }
  247. public void OnTranscodeBeginRequest(TranscodingJob job)
  248. {
  249. job.ActiveRequestCount++;
  250. if (string.IsNullOrWhiteSpace(job.PlaySessionId) || job.Type == TranscodingJobType.Progressive)
  251. {
  252. job.StopKillTimer();
  253. }
  254. }
  255. public void OnTranscodeEndRequest(TranscodingJob job)
  256. {
  257. job.ActiveRequestCount--;
  258. Logger.Debug("OnTranscodeEndRequest job.ActiveRequestCount={0}", job.ActiveRequestCount);
  259. if (job.ActiveRequestCount <= 0)
  260. {
  261. PingTimer(job, false);
  262. }
  263. }
  264. internal void PingTranscodingJob(string playSessionId)
  265. {
  266. if (string.IsNullOrEmpty(playSessionId))
  267. {
  268. throw new ArgumentNullException("playSessionId");
  269. }
  270. Logger.Debug("PingTranscodingJob PlaySessionId={0}", playSessionId);
  271. var jobs = new List<TranscodingJob>();
  272. lock (_activeTranscodingJobs)
  273. {
  274. // This is really only needed for HLS.
  275. // Progressive streams can stop on their own reliably
  276. jobs = jobs.Where(j => string.Equals(playSessionId, j.PlaySessionId, StringComparison.OrdinalIgnoreCase)).ToList();
  277. }
  278. foreach (var job in jobs)
  279. {
  280. PingTimer(job, true);
  281. }
  282. }
  283. private void PingTimer(TranscodingJob job, bool isProgressCheckIn)
  284. {
  285. if (job.HasExited)
  286. {
  287. job.StopKillTimer();
  288. return;
  289. }
  290. var timerDuration = job.Type == TranscodingJobType.Progressive ?
  291. 1000 :
  292. 1800000;
  293. // We can really reduce the timeout for apps that are using the newer api
  294. if (!string.IsNullOrWhiteSpace(job.PlaySessionId) && job.Type != TranscodingJobType.Progressive)
  295. {
  296. timerDuration = 60000;
  297. }
  298. job.PingTimeout = timerDuration;
  299. job.LastPingDate = DateTime.UtcNow;
  300. // Don't start the timer for playback checkins with progressive streaming
  301. if (job.Type != TranscodingJobType.Progressive || !isProgressCheckIn)
  302. {
  303. job.StartKillTimer(OnTranscodeKillTimerStopped);
  304. }
  305. else
  306. {
  307. job.ChangeKillTimerIfStarted();
  308. }
  309. }
  310. /// <summary>
  311. /// Called when [transcode kill timer stopped].
  312. /// </summary>
  313. /// <param name="state">The state.</param>
  314. private void OnTranscodeKillTimerStopped(object state)
  315. {
  316. var job = (TranscodingJob)state;
  317. if (!job.HasExited && job.Type != TranscodingJobType.Progressive)
  318. {
  319. if ((DateTime.UtcNow - job.LastPingDate).TotalMilliseconds < job.PingTimeout)
  320. {
  321. job.StartKillTimer(OnTranscodeKillTimerStopped);
  322. return;
  323. }
  324. }
  325. Logger.Debug("Transcoding kill timer stopped for JobId {0} PlaySessionId {1}. Killing transcoding", job.Id, job.PlaySessionId);
  326. KillTranscodingJob(job, path => true);
  327. }
  328. /// <summary>
  329. /// Kills the single transcoding job.
  330. /// </summary>
  331. /// <param name="deviceId">The device id.</param>
  332. /// <param name="playSessionId">The play session identifier.</param>
  333. /// <param name="deleteFiles">The delete files.</param>
  334. /// <returns>Task.</returns>
  335. internal void KillTranscodingJobs(string deviceId, string playSessionId, Func<string, bool> deleteFiles)
  336. {
  337. KillTranscodingJobs(j =>
  338. {
  339. if (!string.IsNullOrWhiteSpace(playSessionId))
  340. {
  341. return string.Equals(playSessionId, j.PlaySessionId, StringComparison.OrdinalIgnoreCase);
  342. }
  343. return string.Equals(deviceId, j.DeviceId, StringComparison.OrdinalIgnoreCase);
  344. }, deleteFiles);
  345. }
  346. /// <summary>
  347. /// Kills the transcoding jobs.
  348. /// </summary>
  349. /// <param name="killJob">The kill job.</param>
  350. /// <param name="deleteFiles">The delete files.</param>
  351. /// <returns>Task.</returns>
  352. private void KillTranscodingJobs(Func<TranscodingJob, bool> killJob, Func<string, bool> deleteFiles)
  353. {
  354. var jobs = new List<TranscodingJob>();
  355. lock (_activeTranscodingJobs)
  356. {
  357. // This is really only needed for HLS.
  358. // Progressive streams can stop on their own reliably
  359. jobs.AddRange(_activeTranscodingJobs.Where(killJob));
  360. }
  361. if (jobs.Count == 0)
  362. {
  363. return;
  364. }
  365. foreach (var job in jobs)
  366. {
  367. KillTranscodingJob(job, deleteFiles);
  368. }
  369. }
  370. /// <summary>
  371. /// Kills the transcoding job.
  372. /// </summary>
  373. /// <param name="job">The job.</param>
  374. /// <param name="delete">The delete.</param>
  375. private void KillTranscodingJob(TranscodingJob job, Func<string, bool> delete)
  376. {
  377. job.DisposeKillTimer();
  378. Logger.Debug("KillTranscodingJob - JobId {0} PlaySessionId {1}. Killing transcoding", job.Id, job.PlaySessionId);
  379. lock (_activeTranscodingJobs)
  380. {
  381. _activeTranscodingJobs.Remove(job);
  382. if (!job.CancellationTokenSource.IsCancellationRequested)
  383. {
  384. job.CancellationTokenSource.Cancel();
  385. }
  386. }
  387. lock (job.ProcessLock)
  388. {
  389. if (job.TranscodingThrottler != null)
  390. {
  391. job.TranscodingThrottler.Stop();
  392. }
  393. var process = job.Process;
  394. var hasExited = job.HasExited;
  395. if (!hasExited)
  396. {
  397. try
  398. {
  399. Logger.Info("Killing ffmpeg process for {0}", job.Path);
  400. //process.Kill();
  401. process.StandardInput.WriteLine("q");
  402. // Need to wait because killing is asynchronous
  403. process.WaitForExit(5000);
  404. }
  405. catch (Exception ex)
  406. {
  407. Logger.ErrorException("Error killing transcoding job for {0}", ex, job.Path);
  408. }
  409. }
  410. }
  411. if (delete(job.Path))
  412. {
  413. DeletePartialStreamFiles(job.Path, job.Type, 0, 1500);
  414. }
  415. }
  416. private async void DeletePartialStreamFiles(string path, TranscodingJobType jobType, int retryCount, int delayMs)
  417. {
  418. if (retryCount >= 10)
  419. {
  420. return;
  421. }
  422. Logger.Info("Deleting partial stream file(s) {0}", path);
  423. await Task.Delay(delayMs).ConfigureAwait(false);
  424. try
  425. {
  426. if (jobType == TranscodingJobType.Progressive)
  427. {
  428. DeleteProgressivePartialStreamFiles(path);
  429. }
  430. else
  431. {
  432. DeleteHlsPartialStreamFiles(path);
  433. }
  434. }
  435. catch (DirectoryNotFoundException)
  436. {
  437. }
  438. catch (FileNotFoundException)
  439. {
  440. }
  441. catch (IOException ex)
  442. {
  443. Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path);
  444. DeletePartialStreamFiles(path, jobType, retryCount + 1, 500);
  445. }
  446. catch (Exception ex)
  447. {
  448. Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path);
  449. }
  450. }
  451. /// <summary>
  452. /// Deletes the progressive partial stream files.
  453. /// </summary>
  454. /// <param name="outputFilePath">The output file path.</param>
  455. private void DeleteProgressivePartialStreamFiles(string outputFilePath)
  456. {
  457. _fileSystem.DeleteFile(outputFilePath);
  458. }
  459. /// <summary>
  460. /// Deletes the HLS partial stream files.
  461. /// </summary>
  462. /// <param name="outputFilePath">The output file path.</param>
  463. private void DeleteHlsPartialStreamFiles(string outputFilePath)
  464. {
  465. var directory = Path.GetDirectoryName(outputFilePath);
  466. var name = Path.GetFileNameWithoutExtension(outputFilePath);
  467. var filesToDelete = Directory.EnumerateFiles(directory)
  468. .Where(f => f.IndexOf(name, StringComparison.OrdinalIgnoreCase) != -1)
  469. .ToList();
  470. Exception e = null;
  471. foreach (var file in filesToDelete)
  472. {
  473. try
  474. {
  475. Logger.Info("Deleting HLS file {0}", file);
  476. _fileSystem.DeleteFile(file);
  477. }
  478. catch (DirectoryNotFoundException)
  479. {
  480. }
  481. catch (FileNotFoundException)
  482. {
  483. }
  484. catch (IOException ex)
  485. {
  486. e = ex;
  487. Logger.ErrorException("Error deleting HLS file {0}", ex, file);
  488. }
  489. }
  490. if (e != null)
  491. {
  492. throw e;
  493. }
  494. }
  495. }
  496. /// <summary>
  497. /// Class TranscodingJob
  498. /// </summary>
  499. public class TranscodingJob
  500. {
  501. /// <summary>
  502. /// Gets or sets the play session identifier.
  503. /// </summary>
  504. /// <value>The play session identifier.</value>
  505. public string PlaySessionId { get; set; }
  506. /// <summary>
  507. /// Gets or sets the path.
  508. /// </summary>
  509. /// <value>The path.</value>
  510. public string Path { get; set; }
  511. /// <summary>
  512. /// Gets or sets the type.
  513. /// </summary>
  514. /// <value>The type.</value>
  515. public TranscodingJobType Type { get; set; }
  516. /// <summary>
  517. /// Gets or sets the process.
  518. /// </summary>
  519. /// <value>The process.</value>
  520. public Process Process { get; set; }
  521. public ILogger Logger { get; private set; }
  522. /// <summary>
  523. /// Gets or sets the active request count.
  524. /// </summary>
  525. /// <value>The active request count.</value>
  526. public int ActiveRequestCount { get; set; }
  527. /// <summary>
  528. /// Gets or sets the kill timer.
  529. /// </summary>
  530. /// <value>The kill timer.</value>
  531. private Timer KillTimer { get; set; }
  532. public string DeviceId { get; set; }
  533. public CancellationTokenSource CancellationTokenSource { get; set; }
  534. public object ProcessLock = new object();
  535. public bool HasExited { get; set; }
  536. public string Id { get; set; }
  537. public float? Framerate { get; set; }
  538. public double? CompletionPercentage { get; set; }
  539. public long? BytesDownloaded { get; set; }
  540. public long? BytesTranscoded { get; set; }
  541. public long? TranscodingPositionTicks { get; set; }
  542. public long? DownloadPositionTicks { get; set; }
  543. public TranscodingThrottler TranscodingThrottler { get; set; }
  544. private readonly object _timerLock = new object();
  545. public DateTime LastPingDate { get; set; }
  546. public int PingTimeout { get; set; }
  547. public TranscodingJob(ILogger logger)
  548. {
  549. Logger = logger;
  550. }
  551. public void StopKillTimer()
  552. {
  553. lock (_timerLock)
  554. {
  555. if (KillTimer != null)
  556. {
  557. KillTimer.Change(Timeout.Infinite, Timeout.Infinite);
  558. }
  559. }
  560. }
  561. public void DisposeKillTimer()
  562. {
  563. lock (_timerLock)
  564. {
  565. if (KillTimer != null)
  566. {
  567. KillTimer.Dispose();
  568. KillTimer = null;
  569. }
  570. }
  571. }
  572. public void StartKillTimer(TimerCallback callback)
  573. {
  574. CheckHasExited();
  575. lock (_timerLock)
  576. {
  577. var intervalMs = PingTimeout;
  578. if (KillTimer == null)
  579. {
  580. Logger.Debug("Starting kill timer at {0}ms. JobId {1} PlaySessionId {2}", intervalMs, Id, PlaySessionId);
  581. KillTimer = new Timer(callback, this, intervalMs, Timeout.Infinite);
  582. }
  583. else
  584. {
  585. Logger.Debug("Changing kill timer to {0}ms. JobId {1} PlaySessionId {2}", intervalMs, Id, PlaySessionId);
  586. KillTimer.Change(intervalMs, Timeout.Infinite);
  587. }
  588. }
  589. }
  590. public void ChangeKillTimerIfStarted()
  591. {
  592. CheckHasExited();
  593. lock (_timerLock)
  594. {
  595. if (KillTimer != null)
  596. {
  597. var intervalMs = PingTimeout;
  598. Logger.Debug("Changing kill timer to {0}ms. JobId {1} PlaySessionId {2}", intervalMs, Id, PlaySessionId);
  599. KillTimer.Change(intervalMs, Timeout.Infinite);
  600. }
  601. }
  602. }
  603. private void CheckHasExited()
  604. {
  605. if (HasExited)
  606. {
  607. throw new ObjectDisposedException("Job");
  608. }
  609. }
  610. }
  611. /// <summary>
  612. /// Enum TranscodingJobType
  613. /// </summary>
  614. public enum TranscodingJobType
  615. {
  616. /// <summary>
  617. /// The progressive
  618. /// </summary>
  619. Progressive,
  620. /// <summary>
  621. /// The HLS
  622. /// </summary>
  623. Hls,
  624. /// <summary>
  625. /// The dash
  626. /// </summary>
  627. Dash
  628. }
  629. }