mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 13:30:11 -06:00
convert stuff, icons
This commit is contained in:
@@ -17,7 +17,7 @@ public class FFMpegEncoder
|
||||
|
||||
public delegate void TimeEvent(TimeSpan time, DateTime startedAt);
|
||||
public event TimeEvent AtTime;
|
||||
public delegate void StatChange(string name, object value, bool recordStatistic = false);
|
||||
public delegate void StatChange(string name, string value, bool recordStatistic = false);
|
||||
public event StatChange OnStatChange;
|
||||
|
||||
private Process process;
|
||||
|
||||
@@ -236,7 +236,7 @@ public class FfmpegBuilderExecutor: FfmpegBuilderNode
|
||||
GetHardwareDecodingArgs(args, localFile, FFMPEG, video?.Stream?.Codec, pxtFormat, encodingParameters: encodingParameters);
|
||||
if (decodingParameters.Any() == true)
|
||||
{
|
||||
args.StatisticRecorder("DecoderParameters", string.Join(" ", decodingParameters));
|
||||
args.StatisticRecorderRunningTotals("DecoderParameters", string.Join(" ", decodingParameters));
|
||||
startArgs.AddRange(decodingParameters);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ public class VideoFile : VideoNode
|
||||
{
|
||||
if (string.IsNullOrEmpty(stream.Codec) == false)
|
||||
{
|
||||
args.RecordStatistic("CODEC", stream.Codec);
|
||||
args.RecordStatistic("VIDEO_CODEC", stream.Codec);
|
||||
args.RecordStatisticRunningTotals("CODEC", stream.Codec);
|
||||
args.RecordStatisticRunningTotals("VIDEO_CODEC", stream.Codec);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ public class VideoFile : VideoNode
|
||||
{
|
||||
if (string.IsNullOrEmpty(stream.Codec) == false)
|
||||
{
|
||||
args.RecordStatistic("CODEC", stream.Codec);
|
||||
args.RecordStatistic("AUDIO_CODEC", stream.Codec);
|
||||
args.RecordStatisticRunningTotals("CODEC", stream.Codec);
|
||||
args.RecordStatisticRunningTotals("AUDIO_CODEC", stream.Codec);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class VideoFile : VideoNode
|
||||
if (resName != null)
|
||||
{
|
||||
args.Logger?.ILog("Video Resolution: " + resName);
|
||||
args.RecordStatistic("VIDEO_RESOLUTION", resName);
|
||||
args.RecordStatisticRunningTotals("VIDEO_RESOLUTION", resName);
|
||||
}
|
||||
|
||||
string extension = FileHelper.GetExtension(args.FileName).ToLowerInvariant().TrimStart('.');
|
||||
@@ -144,7 +144,7 @@ public class VideoFile : VideoNode
|
||||
if (string.IsNullOrEmpty(container) == false)
|
||||
{
|
||||
args.Logger?.ILog("Video Container: " + container);
|
||||
args.RecordStatistic("VIDEO_CONTAINER", container);
|
||||
args.RecordStatisticRunningTotals("VIDEO_CONTAINER", container);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,10 +5,16 @@ using FileFlows.Plugin.Attributes;
|
||||
|
||||
public class Plugin : FileFlows.Plugin.IPlugin
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Guid Uid => new Guid("881b486b-4b38-4e66-b39e-fbc0fc9deee1");
|
||||
/// <inheritdoc />
|
||||
public string Name => "Video Nodes";
|
||||
/// <inheritdoc />
|
||||
public string MinimumVersion => "1.0.4.2019";
|
||||
/// <inheritdoc />
|
||||
public string Icon => "svg:video";
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Init()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -166,11 +166,11 @@ namespace FileFlows.VideoNodes
|
||||
}
|
||||
}
|
||||
|
||||
private void EncoderOnOnStatChange(string name, object value, bool recordStatistic)
|
||||
private void EncoderOnOnStatChange(string name, string value, bool recordStatistic)
|
||||
{
|
||||
Args.AdditionalInfoRecorder?.Invoke(name, value, 1, new TimeSpan(0, 1, 0));
|
||||
if(recordStatistic)
|
||||
Args.RecordStatistic(name, value);
|
||||
Args.RecordStatisticRunningTotals(name, value);
|
||||
}
|
||||
|
||||
public string CheckVideoCodec(string ffmpeg, string vidparams)
|
||||
|
||||
Reference in New Issue
Block a user