aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTask.cs
blob: 826525aef27085c2cd3ac4facdf39ac5f9f3d80f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using System.Threading;

namespace MediaBrowser.MediaEncoding.Encoder
{
    public class InternalEncodingTask
    {
        public string Id { get; set; }

        public CancellationTokenSource CancellationTokenSource { get; set; }

        public double ProgressPercentage { get; set; }

        public EncodingOptions Request { get; set; }

        public VideoEncodingOptions VideoRequest
        {
            get { return Request as VideoEncodingOptions; }
        }

        public string MediaPath { get; set; }
        public List<string> StreamFileNames { get; set; }
        public bool IsInputRemote { get; set; }

        public VideoType? InputVideoType { get; set; }
        public IsoType? IsoType { get; set; }
        public long? InputRunTimeTicks;

        public string AudioSync = "1";
        public string VideoSync = "vfr";

        public string InputAudioSync { get; set; }
        public string InputVideoSync { get; set; }

        public bool DeInterlace { get; set; }

        public bool ReadInputAtNativeFramerate { get; set; }

        public string InputFormat { get; set; }

        public string InputVideoCodec { get; set; }

        public string InputAudioCodec { get; set; }

        public string LiveTvStreamId { get; set; }

        public MediaStream AudioStream { get; set; }
        public MediaStream VideoStream { get; set; }
        public MediaStream SubtitleStream { get; set; }
        public bool HasMediaStreams { get; set; }

        public int SegmentLength = 10;
        public int HlsListSize;

        public string MimeType { get; set; }
        public string OrgPn { get; set; }
        public bool EnableMpegtsM2TsMode { get; set; }

        /// <summary>
        /// Gets or sets the user agent.
        /// </summary>
        /// <value>The user agent.</value>
        public string UserAgent { get; set; }

        public EncodingQuality QualitySetting { get; set; }

        public InternalEncodingTask()
        {
            Id = Guid.NewGuid().ToString("N");
            CancellationTokenSource = new CancellationTokenSource();
            StreamFileNames = new List<string>();
        }

        public bool EnableDebugLogging { get; set; }

        internal void OnBegin()
        {
            
        }

        internal void OnCompleted()
        {
            
        }

        internal void OnError()
        {
            
        }
    }
}