mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
b5dd8600a4
commit
d7be7aa5ac
1 changed files with 17 additions and 1 deletions
|
@ -4,13 +4,22 @@
|
|||
namespace FFMpegCore.Arguments
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents scale parameter
|
||||
/// Mix channels with specific gain levels.
|
||||
/// </summary>
|
||||
public class PanArgument : IAudioFilterArgument
|
||||
{
|
||||
public readonly string ChannelLayout;
|
||||
private readonly string[] _outputDefinitions;
|
||||
|
||||
/// <summary>
|
||||
/// Mix channels with specific gain levels <see href="https://ffmpeg.org/ffmpeg-filters.html#toc-pan-1"/>
|
||||
/// </summary>
|
||||
/// <param name="channelLayout">
|
||||
/// Represent the output channel layout. Like "stereo", "mono", "2.1", "5.1"
|
||||
/// </param>
|
||||
/// <param name="outputDefinitions">
|
||||
/// Output channel specification, of the form: "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
|
||||
/// </param>
|
||||
public PanArgument(string channelLayout, params string[] outputDefinitions)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(channelLayout))
|
||||
|
@ -23,6 +32,13 @@ public PanArgument(string channelLayout, params string[] outputDefinitions)
|
|||
_outputDefinitions = outputDefinitions;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mix channels with specific gain levels <see href="https://ffmpeg.org/ffmpeg-filters.html#toc-pan-1"/>
|
||||
/// </summary>
|
||||
/// <param name="channels">Number of channels in output file</param>
|
||||
/// <param name="outputDefinitions">
|
||||
/// Output channel specification, of the form: "out_name=[gain*]in_name[(+-)[gain*]in_name...]"
|
||||
/// </param>
|
||||
public PanArgument(int channels, params string[] outputDefinitions)
|
||||
{
|
||||
if (channels <= 0) throw new ArgumentOutOfRangeException(nameof(channels));
|
||||
|
|
Loading…
Reference in a new issue