mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
549 B
21 lines
549 B
using ErsatzTV.FFmpeg.State; |
|
|
|
namespace ErsatzTV.FFmpeg.Filter; |
|
|
|
public class WatermarkOpacityFilter : BaseFilter |
|
{ |
|
private readonly WatermarkState _desiredState; |
|
|
|
public WatermarkOpacityFilter(WatermarkState desiredState) => _desiredState = desiredState; |
|
|
|
public override string Filter |
|
{ |
|
get |
|
{ |
|
double opacity = _desiredState.Opacity / 100.0; |
|
return $"colorchannelmixer=aa={opacity:F2}"; |
|
} |
|
} |
|
|
|
public override FrameState NextState(FrameState currentState) => currentState; |
|
}
|
|
|