| | | 1 | | using System.Collections.Generic; |
| | | 2 | | using System.Diagnostics; |
| | | 3 | | |
| | | 4 | | namespace MediaBrowser.Model.Configuration; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Class TrickplayOptions. |
| | | 8 | | /// </summary> |
| | | 9 | | public class TrickplayOptions |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Gets or sets a value indicating whether or not to use HW acceleration. |
| | | 13 | | /// </summary> |
| | | 14 | | public bool EnableHwAcceleration { get; set; } = false; |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// Gets or sets a value indicating whether or not to use HW accelerated MJPEG encoding. |
| | | 18 | | /// </summary> |
| | | 19 | | public bool EnableHwEncoding { get; set; } = false; |
| | | 20 | | |
| | | 21 | | /// <summary> |
| | | 22 | | /// Gets or sets a value indicating whether to only extract key frames. |
| | | 23 | | /// Significantly faster, but is not compatible with all decoders and/or video files. |
| | | 24 | | /// </summary> |
| | | 25 | | public bool EnableKeyFrameOnlyExtraction { get; set; } = false; |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// Gets or sets the behavior used by trickplay provider on library scan/update. |
| | | 29 | | /// </summary> |
| | | 30 | | public TrickplayScanBehavior ScanBehavior { get; set; } = TrickplayScanBehavior.NonBlocking; |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// Gets or sets the process priority for the ffmpeg process. |
| | | 34 | | /// </summary> |
| | | 35 | | public ProcessPriorityClass ProcessPriority { get; set; } = ProcessPriorityClass.BelowNormal; |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// Gets or sets the interval, in ms, between each new trickplay image. |
| | | 39 | | /// </summary> |
| | | 40 | | public int Interval { get; set; } = 10000; |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Gets or sets the target width resolutions, in px, to generates preview images for. |
| | | 44 | | /// </summary> |
| | 253 | 45 | | public int[] WidthResolutions { get; set; } = new[] { 320 }; |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// Gets or sets number of tile images to allow in X dimension. |
| | | 49 | | /// </summary> |
| | | 50 | | public int TileWidth { get; set; } = 10; |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// Gets or sets number of tile images to allow in Y dimension. |
| | | 54 | | /// </summary> |
| | | 55 | | public int TileHeight { get; set; } = 10; |
| | | 56 | | |
| | | 57 | | /// <summary> |
| | | 58 | | /// Gets or sets the ffmpeg output quality level. |
| | | 59 | | /// </summary> |
| | | 60 | | public int Qscale { get; set; } = 4; |
| | | 61 | | |
| | | 62 | | /// <summary> |
| | | 63 | | /// Gets or sets the jpeg quality to use for image tiles. |
| | | 64 | | /// </summary> |
| | | 65 | | public int JpegQuality { get; set; } = 90; |
| | | 66 | | |
| | | 67 | | /// <summary> |
| | | 68 | | /// Gets or sets the number of threads to be used by ffmpeg. |
| | | 69 | | /// </summary> |
| | | 70 | | public int ProcessThreads { get; set; } = 1; |
| | | 71 | | } |