mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-13 01:34:14 +01:00
change FrameRate on RawVideoPipeSource to double
This commit is contained in:
parent
f40479e697
commit
cfda317883
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using FFMpegCore.Exceptions;
|
using FFMpegCore.Exceptions;
|
||||||
|
@ -14,7 +15,7 @@ public class RawVideoPipeSource : IPipeSource
|
||||||
public string StreamFormat { get; private set; } = null!;
|
public string StreamFormat { get; private set; } = null!;
|
||||||
public int Width { get; private set; }
|
public int Width { get; private set; }
|
||||||
public int Height { get; private set; }
|
public int Height { get; private set; }
|
||||||
public int FrameRate { get; set; } = 25;
|
public double FrameRate { get; set; } = 25;
|
||||||
private bool _formatInitialized;
|
private bool _formatInitialized;
|
||||||
private readonly IEnumerator<IVideoFrame> _framesEnumerator;
|
private readonly IEnumerator<IVideoFrame> _framesEnumerator;
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ public string GetStreamArguments()
|
||||||
_formatInitialized = true;
|
_formatInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $"-f rawvideo -r {FrameRate} -pix_fmt {StreamFormat} -s {Width}x{Height}";
|
return $"-f rawvideo -r {FrameRate.ToString(CultureInfo.InvariantCulture)} -pix_fmt {StreamFormat} -s {Width}x{Height}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task WriteAsync(System.IO.Stream outputStream, CancellationToken cancellationToken)
|
public async Task WriteAsync(System.IO.Stream outputStream, CancellationToken cancellationToken)
|
||||||
|
|
Loading…
Reference in a new issue