Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix basic video effect #272

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Source/VideoEffectConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace FFmpegInteropX
float _Tint;
float _Sharpness;
float _SharpnessThreshold;

String^ classId = "FFmpegInteropX.BasicVideoEffect";
public:
///<summary>Adjusts the brightness of the image. Default value is 0, recommended range -1 to 1.</summary>
property float Brightness
Expand Down Expand Up @@ -111,29 +111,29 @@ namespace FFmpegInteropX
{
PropertySet^ set = ref new PropertySet();
set->Insert("config", this);
player->AddVideoEffect("FFmpegInterop.BasicVideoEffect", true, set);
player->AddVideoEffect(classId, true, set);
}

[Windows::Foundation::Metadata::DefaultOverloadAttribute]
void AddVideoEffect(MediaPlayer^ player, bool optional)
{
PropertySet^ set = ref new PropertySet();
set->Insert("config", this);
player->AddVideoEffect("FFmpegInterop.BasicVideoEffect", optional, set);
player->AddVideoEffect(classId, optional, set);
}

void AddVideoEffect(MediaElement^ player)
{
PropertySet^ set = ref new PropertySet();
set->Insert("config", this);
player->AddVideoEffect("FFmpegInterop.BasicVideoEffect", true, set);
player->AddVideoEffect(classId, true, set);
}

void AddVideoEffect(MediaElement^ player, bool optional)
{
PropertySet^ set = ref new PropertySet();
set->Insert("config", this);
player->AddVideoEffect("FFmpegInterop.BasicVideoEffect", optional, set);
player->AddVideoEffect(classId, optional, set);
}
};
}
}