mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-08 07:12:56 +01:00
Added some intelligence to the video handler. try to just copy the audio stream when possible, instead of encoding.
This commit is contained in:
parent
0a310fab0e
commit
5f5f2fcdb4
@@ -212,5 +212,41 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
process.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of audio channels to specify on the command line
|
||||
/// </summary>
|
||||
protected int? GetNumAudioChannelsParam(int libraryItemChannels)
|
||||
{
|
||||
// If the user requested a max number of channels
|
||||
if (AudioChannels.HasValue)
|
||||
{
|
||||
// Only specify the param if we're going to downmix
|
||||
if (AudioChannels.Value < libraryItemChannels)
|
||||
{
|
||||
return AudioChannels.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of audio channels to specify on the command line
|
||||
/// </summary>
|
||||
protected int? GetSampleRateParam(int libraryItemSampleRate)
|
||||
{
|
||||
// If the user requested a max value
|
||||
if (AudioSampleRate.HasValue)
|
||||
{
|
||||
// Only specify the param if we're going to downmix
|
||||
if (AudioSampleRate.Value < libraryItemSampleRate)
|
||||
{
|
||||
return AudioSampleRate.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user