mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 18:44:45 +01:00
add setting to control transcodng throttle
This commit is contained in:
@@ -46,8 +46,8 @@ namespace MediaBrowser.Model.Dto
|
||||
public int? Bitrate { get; set; }
|
||||
|
||||
public TransportStreamTimestamp? Timestamp { get; set; }
|
||||
public Dictionary<string, string> RequiredHttpHeaders { get; set; }
|
||||
|
||||
public Dictionary<string, string> RequiredHttpHeaders { get; set; }
|
||||
|
||||
public string TranscodingUrl { get; set; }
|
||||
public string TranscodingSubProtocol { get; set; }
|
||||
public string TranscodingContainer { get; set; }
|
||||
@@ -135,5 +135,35 @@ namespace MediaBrowser.Model.Dto
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public int? GetStreamCount(MediaStreamType type)
|
||||
{
|
||||
int numMatches = 0;
|
||||
int numStreams = 0;
|
||||
|
||||
foreach (MediaStream i in MediaStreams)
|
||||
{
|
||||
numStreams++;
|
||||
if (i.Type == type)
|
||||
{
|
||||
numMatches++;
|
||||
}
|
||||
}
|
||||
|
||||
return numStreams == 0 ? (int?)null : numMatches;
|
||||
}
|
||||
|
||||
public bool? IsSecondaryAudio(MediaStream stream)
|
||||
{
|
||||
foreach (MediaStream currentStream in MediaStreams)
|
||||
{
|
||||
if (currentStream.Type == MediaStreamType.Audio)
|
||||
{
|
||||
return currentStream.Index != stream.Index;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user