From 1e086365ca61330d540e7a70799932b8ad56a1d3 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Mon, 7 Feb 2022 12:10:00 +0100 Subject: [PATCH 001/164] locale: New Crowdin updates (#748) * New translations en-US.ini (Japanese) * New translations en-US.ini (Dutch) * New translations en-US.ini (Dutch) * New translations en-US.ini (Italian) * New translations en-US.ini (Italian) * New translations en-US.ini (Italian) * New translations en-US.ini (Polish) --- data/locale/it-IT.ini | 38 +++++++----- data/locale/ja-JP.ini | 17 ++++++ data/locale/nl-NL.ini | 138 +++++++++++++++++++++++++++++++++++++++--- data/locale/pl-PL.ini | 2 +- 4 files changed, 171 insertions(+), 24 deletions(-) diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index 2afab566a2..ae7fb4d169 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -36,7 +36,7 @@ UI.Menu.About="Informazioni su StreamFX" UI.About.Title="Informazioni su StreamFX" UI.About.Text="

StreamFX è reso possibile da tutti i sostenitori su Patreon, su Sponsors Github, e da chiunque doni tramite PayPal. Ulteriori ringraziamenti vanno a tutti i traduttori che danno una mano con la localizzazione su Crowdin. Siete tutti incredibili!

" UI.About.Role.Contributor="Collaboratore" -UI.About.Role.Translator="Traduttore/trice" +UI.About.Role.Translator="Traduttore" UI.About.Role.Supporter="Sostenitore" UI.About.Version="Versione:" @@ -48,8 +48,8 @@ UI.Updater.Dialog.Button.Ok="Apri Pagina Download" UI.Updater.Dialog.Button.Cancel="Ricordamelo in seguito" UI.Updater.GitHubPermission.Title="StreamFX richiede il tuo permesso per connetterti a GitHub!" UI.Updater.GitHubPermission.Text="Al fine di fornire un controllo manuale o automatizzato degli aggiornamenti, StreamFX si basa sull'API GitHub per recuperare le informazioni più recenti.
Si prega di leggere l' Informativa sulla privacy di Github, e clicca 'OK' se sei d'accordo, o 'Annulla' se non sei d'accordo." -UI.Updater.Menu.CheckForUpdates="Controlla aggiornamenti" -UI.Updater.Menu.CheckForUpdates.Automatically="Controlla automaticamente gli aggiornamenti" +UI.Updater.Menu.CheckForUpdates="Cerca aggiornamenti" +UI.Updater.Menu.CheckForUpdates.Automatically="Cerca automaticamente gli aggiornamenti" UI.Updater.Menu.Channel="Versione Aggiornamenti" UI.Updater.Menu.Channel.Release="Stabile" UI.Updater.Menu.Channel.Testing="Beta" @@ -129,7 +129,7 @@ Encoder.FFmpeg.AMF.Preset="Preimpostazioni" Encoder.FFmpeg.AMF.Preset.Speed="Velocità" Encoder.FFmpeg.AMF.Preset.Balanced="Bilanciato" Encoder.FFmpeg.AMF.Preset.Quality="Qualità" -Encoder.FFmpeg.AMF.RateControl="Opzioni di controllo Frequenza" +Encoder.FFmpeg.AMF.RateControl="Opzioni Frequenza" Encoder.FFmpeg.AMF.RateControl.Mode="Modalità" Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Parametro di quantizzazione costante" Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Bitrate Variabile (Picco contenuto)" @@ -140,7 +140,7 @@ Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Salta fotogrammi" Encoder.FFmpeg.AMF.RateControl.Limits="Limiti" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Dimensione Buffer" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Bitrate di destinazione" -Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Bitrate Massimo" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Bitrate massimo" Encoder.FFmpeg.AMF.RateControl.QP="Parametri di quantizzazione" Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" @@ -166,7 +166,7 @@ Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Bassa Latenza Prestazione Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Bassa Latenza Alta Qualità" Encoder.FFmpeg.NVENC.Preset.Lossless="Lossless" Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Lossless Prestazioni Elevate" -Encoder.FFmpeg.NVENC.RateControl="Opzioni di controllo Frequenza" +Encoder.FFmpeg.NVENC.RateControl="Opzioni Frequenza" Encoder.FFmpeg.NVENC.RateControl.Mode="Modalità" Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Parametro di quantizzazione costante" Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Bitrate Variabile" @@ -182,7 +182,7 @@ Encoder.FFmpeg.NVENC.RateControl.Limits="Limiti" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Dimensione Buffer" Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Qualità di destinazione" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Bitrate di destinazione" -Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Bitrate Massimo" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Bitrate massimo" Encoder.FFmpeg.NVENC.RateControl.QP="Parametri di quantizzazione" Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="QP Minimo" Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="QP Massimo" @@ -221,7 +221,7 @@ Shader.Shader.Technique="Modalità" Shader.Shader.Size="Dimensione" Shader.Shader.Size.Width="Larghezza" Shader.Shader.Size.Height="Altezza" -Shader.Shader.Seed="Seme Di Casualizzazione" +Shader.Shader.Seed="Fattore randomico" Shader.Parameters="Parametri Ombreggiatore" Shader.Parameter.Texture.Type="Tipo" Shader.Parameter.Texture.Type.File="File" @@ -257,20 +257,20 @@ Filter.Blur.Angle="Angolo (gradi)" Filter.Blur.Center.X="Centro (X) (percentuale)" Filter.Blur.Center.Y="Centro (Y) (percentuale)" Filter.Blur.StepScale="Passo di Scalatura" -Filter.Blur.StepScale.X="Scala passo X" +Filter.Blur.StepScale.X="Passo scala X" Filter.Blur.StepScale.Y="Scala passo Y" Filter.Blur.Mask="Applica una maschera" Filter.Blur.Mask.Type="Tipo maschera" Filter.Blur.Mask.Type.Region="Regione" Filter.Blur.Mask.Type.Image="Immagine" Filter.Blur.Mask.Type.Source="Sorgente" -Filter.Blur.Mask.Region.Left="Bordo sinistro" -Filter.Blur.Mask.Region.Top="Bordo superiore" -Filter.Blur.Mask.Region.Right="Bordo destro" +Filter.Blur.Mask.Region.Left="Margine sinistro" +Filter.Blur.Mask.Region.Top="Margine superiore" +Filter.Blur.Mask.Region.Right="Margine destro" Filter.Blur.Mask.Region.Bottom="Bordo inferiore" Filter.Blur.Mask.Region.Feather="Area Sfumatura" Filter.Blur.Mask.Region.Feather.Shift="Scostamento Sfumatura" -Filter.Blur.Mask.Region.Invert="Inverti regione" +Filter.Blur.Mask.Region.Invert="Regione invertita" Filter.Blur.Mask.Image="Maschera immagine" Filter.Blur.Mask.Source="Maschera di origine" Filter.Blur.Mask.Color="Filtro maschera colore" @@ -389,6 +389,9 @@ Filter.SDFEffects.SDF.Threshold="Soglia di Trasparenza SDF" Filter.Transform="Trasformazione 3D" Filter.Transform.Camera="Videocamera" Filter.Transform.Camera.Mode="Modalità" +Filter.Transform.Camera.Mode.CornerPin="Appunta angolo" +Filter.Transform.Camera.Mode.Orthographic="Ortografica" +Filter.Transform.Camera.Mode.Perspective="Prospettica" Filter.Transform.Camera.FieldOfView="Campo Visivo" Filter.Transform.Position="Posizione" Filter.Transform.Position.X="X" @@ -411,6 +414,11 @@ Filter.Transform.Rotation.Order.YXZ="Imbardata, Beccheggio, Rollio" Filter.Transform.Rotation.Order.YZX="Imbardata, Rollio, Beccheggio" Filter.Transform.Rotation.Order.ZXY="Rollio, Beccheggio, Imbardata" Filter.Transform.Rotation.Order.ZYX="Rollio, Imbardata, Beccheggio" +Filter.Transform.Corners="Angoli" +Filter.Transform.Corners.TopLeft="Alto a Sinistra" +Filter.Transform.Corners.TopRight="Alto a Destra" +Filter.Transform.Corners.BottomLeft="Basso a sinistra" +Filter.Transform.Corners.BottomRight="Basso a destra" Filter.Transform.Mipmapping="Abilita Mipmapping" Filter.Upscaling="Ampliamento" @@ -445,13 +453,13 @@ Source.Mirror.Source.Audio.Layout.FullSurround="Surround completo" Codec.AV1="AV1" Codec.AV1.Profile="Profilo" -Codec.AV1.Profile.Main="Principale" +Codec.AV1.Profile.Main="Main" Codec.AV1.Profile.High="Alta" Codec.AV1.Profile.Professional="Professionale" Codec.H264="H264" Codec.H264.Profile="Profilo" -Codec.H264.Profile.baseline="Modalità Base" +Codec.H264.Profile.baseline="Baseline" Codec.H264.Profile.main="Principale" Codec.H264.Profile.high="Alta" Codec.H264.Profile.high444p="Alta 4:4:4 Predittivo" diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index 6fa335997b..5daf2ab037 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -63,11 +63,14 @@ Encoder.AOM.AV1.Encoder.Usage.AllIntra="全イントラフレーム" Encoder.AOM.AV1.Encoder.CPUUsage="CPU利用" Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" Encoder.AOM.AV1.Encoder.CPUUsage.1="超低速" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Slower" Encoder.AOM.AV1.Encoder.CPUUsage.3="Slow" Encoder.AOM.AV1.Encoder.CPUUsage.4="Medium" Encoder.AOM.AV1.Encoder.CPUUsage.5="Fast" Encoder.AOM.AV1.Encoder.CPUUsage.6="高速" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Very Fast" Encoder.AOM.AV1.Encoder.CPUUsage.8="最速" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra Fast" Encoder.AOM.AV1.Encoder.CPUUsage.10="超々々々高速" Encoder.AOM.AV1.Encoder.Profile="プロファイル" Encoder.AOM.AV1.KeyFrames="キー フレーム" @@ -96,6 +99,20 @@ Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="最適サイズ" Encoder.AOM.AV1.Advanced="詳細" Encoder.AOM.AV1.Advanced.Threads="スレッド" Encoder.AOM.AV1.Advanced.RowMultiThreading="行毎のマルチスレッド" +Encoder.AOM.AV1.Advanced.Tile.Columns="Tile Columns" +Encoder.AOM.AV1.Advanced.Tile.Rows="Tile Rows" +Encoder.AOM.AV1.Advanced.Tune="Tune" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metric" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (事前処理付き)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (事前処理なし)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Content" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Screen" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" Encoder.FFmpeg="FFmpegオプション" Encoder.FFmpeg.Suffix=" (FFmpeg経由)" diff --git a/data/locale/nl-NL.ini b/data/locale/nl-NL.ini index ae3cc270e7..b38ab7584c 100644 --- a/data/locale/nl-NL.ini +++ b/data/locale/nl-NL.ini @@ -108,19 +108,35 @@ Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="Simkaart" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (met voorverwerking)" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (zonder voorverwerking)" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" Encoder.AOM.AV1.Advanced.Tune.Content="Inhoud" Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Scherm" Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" +Encoder.FFmpeg="FFmpeg Opties" +Encoder.FFmpeg.Suffix="(via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Eigen Opties" +Encoder.FFmpeg.Threads="Hoeveelheid Threads" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Sleutelframes" Encoder.FFmpeg.KeyFrames.IntervalType="Intervaltype" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Frames" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Seconden" Encoder.FFmpeg.KeyFrames.Interval="Interval" Encoder.FFmpeg.AMF.Preset="Preset" +Encoder.FFmpeg.AMF.Preset.Speed="Snelheid" +Encoder.FFmpeg.AMF.Preset.Balanced="Gebalanceerd" Encoder.FFmpeg.AMF.Preset.Quality="Kwaliteit" +Encoder.FFmpeg.AMF.RateControl="Opties voor snelheidsregeling" Encoder.FFmpeg.AMF.RateControl.Mode="Modus" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Constante Kwantisatie Parameter" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Variabele Bitsnelheid (Piek Beperkt)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Variabele Bitsnelheid (Latentie Beperkt)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Constante Bitrate" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Vooruitkijk" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Frames overslaan" Encoder.FFmpeg.AMF.RateControl.Limits="Limieten" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Buffergrootte" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Doelbitrate" @@ -130,23 +146,62 @@ Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.AMF.RateControl.QP.B="B-Frame QP" Encoder.FFmpeg.AMF.Other="Andere opties" +Encoder.FFmpeg.AMF.Other.BFrames="Maximale B-Frames" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-Frame Referenties" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referentie Frames" +Encoder.FFmpeg.AMF.Other.EnforceHRD="HRD afdwingen" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Toegangseenheid Scheidingsteken" Encoder.FFmpeg.NVENC.Preset="Preset" Encoder.FFmpeg.NVENC.Preset.Default="Standaard" Encoder.FFmpeg.NVENC.Preset.Slow="Traag" Encoder.FFmpeg.NVENC.Preset.Medium="Gemiddeld" Encoder.FFmpeg.NVENC.Preset.Fast="Snel" +Encoder.FFmpeg.NVENC.Preset.HighPerformance="Hoge prestaties" +Encoder.FFmpeg.NVENC.Preset.HighQuality="Hoge kwaliteit" +Encoder.FFmpeg.NVENC.Preset.BluRayDisc="BluRay Schijf" +Encoder.FFmpeg.NVENC.Preset.LowLatency="Lage Latentie" +Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Lage Latency, Hoge Prestaties" +Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Lage Latentie, Hoge Kwaliteit" +Encoder.FFmpeg.NVENC.Preset.Lossless="Verliesloos" +Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Verliesloos met Hoge Prestaties" +Encoder.FFmpeg.NVENC.RateControl="Opties voor Snelheidsregeling" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" +Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Constante Kwantisatie Parameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Variabele Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Hoge kwaliteit, Variabele Bitsnelheid" Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Constante Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Hoge kwaliteit Constante Bitsnelheid" +Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Lage Vertraging, Hoge kwaliteit, Constante Bitsnelheid" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Tweemaal" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vooruitkijk" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptieve I-Frames" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptieve B-Frames" Encoder.FFmpeg.NVENC.RateControl.Limits="Limieten" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Buffergrootte" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Doel kwaliteit" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Doelbitrate" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximale bitrate" Encoder.FFmpeg.NVENC.RateControl.QP="Kwantiseringsparameters" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimale QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maximale QP" Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.NVENC.AQ="Adaptieve Kwantificering" +Encoder.FFmpeg.NVENC.AQ.Spatial="Ruimtelijke Adaptieve kwantificering" +Encoder.FFmpeg.NVENC.AQ.Strength="Ruimtelijke Adaptieve Kwantificering Sterkte" +Encoder.FFmpeg.NVENC.AQ.Temporal="Tijdelijke Adaptieve Kwantificering" Encoder.FFmpeg.NVENC.Other="Andere opties" +Encoder.FFmpeg.NVENC.Other.BFrames="Maximale B-Frames" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Frame Referentie Modus" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Gebruik alleen middelste B-frames als referentie" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Gebruik alle B-frames als referentie" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nul Latentie" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Gewogen Voorspelling" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Niet-Referentie Frames" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referentie Frames" Blur.Type.Box="Vierkant" Blur.Type.BoxLinear="Lineair vierkant" @@ -177,8 +232,22 @@ Filter.Shader="Shader" Source.Shader="Shader" Transition.Shader="Shader" +Filter.AutoFraming="Automatische Framing" +Filter.AutoFraming.Tracking="Tracking Opties" Filter.AutoFraming.Tracking.Mode="Modus" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Groep" +Filter.AutoFraming.Tracking.Frequency="Frequentie" +Filter.AutoFraming.Motion="Beweging Opties" +Filter.AutoFraming.Motion.Smoothing="Vloeiend maken" +Filter.AutoFraming.Motion.Prediction="Voorspelling" +Filter.AutoFraming.Framing="Framing Opties" +Filter.AutoFraming.Framing.Stability="Stabiliteit" +Filter.AutoFraming.Framing.Padding="Opvulling" Filter.AutoFraming.Framing.Offset="Afwijking" +Filter.AutoFraming.Framing.AspectRatio="Beeldverhouding" +Filter.AutoFraming.Provider="Aanbieder" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, mogelijk gemaakt door NVIDIA® Broadcast" Filter.Blur="Vervagen" Filter.Blur.Type="Variant" @@ -209,16 +278,26 @@ Filter.Blur.Mask.Alpha="Masker Alpha filter" Filter.Blur.Mask.Multiplier="Masker vermenigvuldiger" Filter.ColorGrade="Kleurcorrectie" +Filter.ColorGrade.Lift="Verhoging" +Filter.ColorGrade.Lift.Red="Rode Verhoging" +Filter.ColorGrade.Lift.Green="Verhoging" +Filter.ColorGrade.Lift.Blue="Blauwe Verhoging" +Filter.ColorGrade.Lift.All="Alle Verhoging" Filter.ColorGrade.Gamma="Gamma" Filter.ColorGrade.Gamma.Red="Rode Gamma" Filter.ColorGrade.Gamma.Green="Groene Gamma" Filter.ColorGrade.Gamma.Blue="Blauwe Gamma" Filter.ColorGrade.Gamma.All="Alle Gamma" Filter.ColorGrade.Gain="Versterking" +Filter.ColorGrade.Gain.Red="Rode Versterking" +Filter.ColorGrade.Gain.Green="Groene Verhoging" +Filter.ColorGrade.Gain.Blue="Blauwe Versterking" +Filter.ColorGrade.Gain.All="Alle Versterking" Filter.ColorGrade.Offset="Afwijking" Filter.ColorGrade.Offset.Red="Rode afwijking" Filter.ColorGrade.Offset.Green="Groene afwijking" Filter.ColorGrade.Offset.Blue="Blauwe afwijking" +Filter.ColorGrade.Offset.All="Alle Afwijking" Filter.ColorGrade.Tint="Tint" Filter.ColorGrade.Tint.Detection="Tint Luma detectie methode" Filter.ColorGrade.Tint.Detection.HSV="Tint Verzadigingswaarde" @@ -228,9 +307,18 @@ Filter.ColorGrade.Tint.Mode="Verzadiging Luma methode" Filter.ColorGrade.Tint.Mode.Linear="Lineair" Filter.ColorGrade.Tint.Mode.Exp="Exp" Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Log" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Tint Luma Exponent" Filter.ColorGrade.Tint.Shadow.Red="Schaduw Rode Tint" Filter.ColorGrade.Tint.Shadow.Green="Schaduw Groene tint" Filter.ColorGrade.Tint.Shadow.Blue="Schaduw Blauwe Tint" +Filter.ColorGrade.Tint.Midtone.Red="Midtoon Rode Tint" +Filter.ColorGrade.Tint.Midtone.Green="Midtoon Groene Tint" +Filter.ColorGrade.Tint.Midtone.Blue="Midtoon Blauwe Tint" +Filter.ColorGrade.Tint.Highlight.Red="Hoge Rode Tint" +Filter.ColorGrade.Tint.Highlight.Green="Hoge Groene Tint" +Filter.ColorGrade.Tint.Highlight.Blue="Hoge Blauwe Tint" Filter.ColorGrade.Correction="Kleurcorrectie" Filter.ColorGrade.Correction.Hue="Tintverschuiving" Filter.ColorGrade.Correction.Saturation="Verzadiging" @@ -245,10 +333,14 @@ Filter.ColorGrade.RenderMode.LUT.8Bit="8-Bit Look-Up Table" Filter.ColorGrade.RenderMode.LUT.10Bit="10-Bit Look-Up Table" Filter.Denoising="Ruisonderdrukking" +Filter.Denoising.Provider="Aanbieder" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA Ruisonderdrukking, mogelijk gemaakt door NVIDIA Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA Ruisonderdrukking" Filter.Denoising.NVIDIA.Denoising.Strength="Intensiteit" Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Zwak" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Sterk" +Filter.Displacement="Verplaatsing Mapping" Filter.Displacement.File="Bestand" Filter.Displacement.Scale="Grootte" Filter.Displacement.Scale.Type="Schalings type" @@ -267,28 +359,39 @@ Filter.SDFEffects.Shadow.Inner.Range.Maximum="Binnenste schaduw Maximale afstand Filter.SDFEffects.Shadow.Inner.Offset.X="Binnenste schaduw Afwijking X-as" Filter.SDFEffects.Shadow.Inner.Offset.Y="Binnenste schaduw Afwijking Y-as" Filter.SDFEffects.Shadow.Inner.Color="Binnenste schaduwkleur" +Filter.SDFEffects.Shadow.Inner.Alpha="Binnenste Schaduw Alfa" Filter.SDFEffects.Shadow.Outer="Buitenste schaduw" Filter.SDFEffects.Shadow.Outer.Range.Minimum="Buitenste schaduw Minimale afstand" Filter.SDFEffects.Shadow.Outer.Range.Maximum="Buitenste schaduw Maximale afstand" Filter.SDFEffects.Shadow.Outer.Offset.X="Buitenste schaduw Afwijking X-as" Filter.SDFEffects.Shadow.Outer.Offset.Y="Buitenste schaduw Afwijking Y-as" Filter.SDFEffects.Shadow.Outer.Color="Buitenste schaduw kleur" +Filter.SDFEffects.Shadow.Outer.Alpha="Buitenste Schaduw Alfa" Filter.SDFEffects.Glow.Outer="Buitenste gloed" Filter.SDFEffects.Glow.Outer.Color="Buitenste gloed kleur" +Filter.SDFEffects.Glow.Outer.Alpha="Buitenste Gloei Alfa" Filter.SDFEffects.Glow.Outer.Width="Buitenste gloed Breedte" Filter.SDFEffects.Glow.Outer.Sharpness="Buitenste gloed Scherpte" Filter.SDFEffects.Glow.Inner="Binnenste gloed" Filter.SDFEffects.Glow.Inner.Color="Binnenste gloed kleur" +Filter.SDFEffects.Glow.Inner.Alpha="Binnenste Gloed Alfa" Filter.SDFEffects.Glow.Inner.Width="Binnenste gloed Breedte" -Filter.SDFEffects.Outline="Omlijning" -Filter.SDFEffects.Outline.Color="Omlijning kleur" -Filter.SDFEffects.Outline.Width="Omlijning breedte" +Filter.SDFEffects.Glow.Inner.Sharpness="Binnenste Gloed Scherpte" +Filter.SDFEffects.Outline="Contour" +Filter.SDFEffects.Outline.Color="Contourkleur" +Filter.SDFEffects.Outline.Alpha="Omlijn Alfa" +Filter.SDFEffects.Outline.Width="Omlijning Breedte" Filter.SDFEffects.Outline.Offset="Omlijning Afwijking" Filter.SDFEffects.Outline.Sharpness="Omlijning scherpte" +Filter.SDFEffects.SDF.Scale="SDF Textuur Schaal" +Filter.SDFEffects.SDF.Threshold="SDF Alpha drempelwaarde" Filter.Transform="3D Transformeren" Filter.Transform.Camera="Camera" Filter.Transform.Camera.Mode="Modus" +Filter.Transform.Camera.Mode.CornerPin="Hoekpin" +Filter.Transform.Camera.Mode.Orthographic="Orthografisch" +Filter.Transform.Camera.Mode.Perspective="Perspectief" Filter.Transform.Camera.FieldOfView="Gezichtsveld" Filter.Transform.Position="Positie" Filter.Transform.Position.X="X" @@ -297,9 +400,13 @@ Filter.Transform.Position.Z="Z" Filter.Transform.Scale="Grootte" Filter.Transform.Scale.X="X" Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Afschuiving" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" Filter.Transform.Rotation="Rotatie" +Filter.Transform.Rotation.X="Rotatie X" +Filter.Transform.Rotation.Y="Rotatie Y" +Filter.Transform.Rotation.Z="Rotatie Z" Filter.Transform.Rotation.Order="Rotatie volgorde" Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" @@ -307,17 +414,31 @@ Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" Filter.Transform.Rotation.Order.ZXY="Roll, Pitch, Yaw" Filter.Transform.Rotation.Order.ZYX="Rol, Yaw, Pitch" +Filter.Transform.Corners="Hoeken" +Filter.Transform.Corners.TopLeft="Linksboven" +Filter.Transform.Corners.TopRight="Rechtsboven" +Filter.Transform.Corners.BottomLeft="Linksonder" +Filter.Transform.Corners.BottomRight="Rechtsonder" Filter.Transform.Mipmapping="Mipmapping inschakelen" Filter.Upscaling="Opschalen" +Filter.Upscaling.Provider="Aanbieder" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolutie, mogelijk gemaakt door NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolutie" Filter.Upscaling.NVIDIA.SuperRes.Scale="Grootte" Filter.Upscaling.NVIDIA.SuperRes.Strength="Intensiteit" Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Zwak" Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Sterk" +Filter.VirtualGreenscreen="Virtueel Greenscreen" +Filter.VirtualGreenscreen.Provider="Aanbieder" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, mogelijk gemaakt door NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Modus" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Prestatie" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kwaliteit" +Source.Mirror="Bron mirror" Source.Mirror.Source="Bron" Source.Mirror.Source.Audio="Audio inschakelen" Source.Mirror.Source.Audio.Layout="Audio Layout" @@ -341,6 +462,7 @@ Codec.H264.Profile="Profiel" Codec.H264.Profile.baseline="Referentie" Codec.H264.Profile.main="Algemeen" Codec.H264.Profile.high="Hoog" +Codec.H264.Profile.high444p="Hoge 4:4:4 Voorspelling" Codec.H264.Level="Niveau" Codec.HEVC="HEVC" @@ -355,9 +477,9 @@ Codec.HEVC.Level="Niveau" Codec.ProRes.Profile="Profiel" Codec.ProRes.Profile.APCO="422 Proxy (APCO)" -Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" -Codec.ProRes.Profile.APCN="422 Standard (APCN)" -Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" -Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" -Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.ProRes.Profile.APCS="422 Licht/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standaard (APCN)" +Codec.ProRes.Profile.APCH="422 Hoge Kwaliteit/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Hoge Kwaliteit/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Kwaliteit/XQ (AP4X)" diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index 2c3a280934..88ac2eb2dd 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -47,7 +47,7 @@ UI.Updater.Dialog.Version.Latest="Najnowsza wersja:" UI.Updater.Dialog.Button.Ok="Otwórz stronę pobierania" UI.Updater.Dialog.Button.Cancel="Przypomnij później" UI.Updater.GitHubPermission.Title="StreamFX wymaga twojego pozwolenia do połączenia się z GitHub-em!" -UI.Updater.GitHubPermission.Text="Aby zapewnić manualne lub zautomatyzowane sprawdzanie aktualizacji, StreamFX polega na API GutHub-a w celu pobierania najnowszych informacji.
Przeczytaj Politykę prywatności serwisu Huthub i kliknij \"OK\" jeśli się zgadzasz lub \"Anuluj\" jeżeli nie." +UI.Updater.GitHubPermission.Text="Aby zapewnić ręczne lub automatyczne sprawdzanie aktualizacji, StreamFX korzysta z GitHub API do pobierania najnowszych informacji.
Przeczytaj Oświadczenie o prywatności na Github, i kliknij \"OK\", jeśli się zgadzasz, lub \"Anuluj\", jeśli się nie zgadzasz." UI.Updater.Menu.CheckForUpdates="Sprawdź aktualizacje" UI.Updater.Menu.CheckForUpdates.Automatically="Automatycznie sprawdzaj aktualizacje" UI.Updater.Menu.Channel="Kanał aktualizacji" From 881c7d920a1cd90df8a81979c7b5410288dbaf3f Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 9 Feb 2022 17:38:20 +0100 Subject: [PATCH 002/164] ci: Ignore specific Packages versions --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f8acb3168..8205e6d4f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -315,7 +315,8 @@ jobs: run: | curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg sudo hdiutil attach ./Packages.dmg - sudo installer -pkg /Volumes/Packages\ 1.2.9/Install\ Packages.pkg -target / + pushd /Volumes/Packages* + sudo installer -pkg ./Install\ Packages.pkg -target / - name: "Packages: Package" shell: bash run: | From 7f6047f43f4222c87cece99aeef904490d204a38 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 17 Feb 2022 01:50:46 +0100 Subject: [PATCH 003/164] ffmpeg/tools: Helpers for easily populating OBS property lists --- source/ffmpeg/tools.cpp | 77 +++++++++++++++++++++++++++++++++++++++++ source/ffmpeg/tools.hpp | 11 ++++++ 2 files changed, 88 insertions(+) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 00dfe41c0c..597222c24d 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -183,6 +183,83 @@ AVColorTransferCharacteristic streamfx::ffmpeg::tools::obs_to_av_color_transfer_ } } +const char* tools::avoption_name_from_unit_value(const void* obj, std::string_view unit, int64_t value) +{ + for (const AVOption* opt = nullptr; (opt = av_opt_next(obj, opt)) != nullptr;) { + // Skip all irrelevant options. + if (!opt->unit) + continue; + if (opt->unit != unit) + continue; + if (opt->name == unit) + continue; + + if (opt->default_val.i64 == value) + return opt->name; + } + return nullptr; +} + +bool tools::avoption_exists(const void* obj, std::string_view name) +{ + for (const AVOption* opt = nullptr; (opt = av_opt_next(obj, opt)) != nullptr;) { + if (name == opt->name) + return true; + } + return false; +} + +void tools::avoption_list_add_entries_unnamed(const void* obj, std::string_view unit, obs_property_t* prop, + std::function filter) +{ + for (const AVOption* opt = nullptr; (opt = av_opt_next(obj, opt)) != nullptr;) { + // Skip all irrelevant options. + if (!opt->unit) + continue; + if (opt->unit != unit) + continue; + if (opt->name == unit) + continue; + + // Skip any deprecated options. + if (opt->flags & AV_OPT_FLAG_DEPRECATED) + continue; + + if (filter && filter(opt)) + continue; + + // Generate name and add to list. + obs_property_list_add_int(prop, opt->name, opt->default_val.i64); + } +} + +void tools::avoption_list_add_entries(const void* obj, std::string_view unit, obs_property_t* prop, + std::string_view prefix, std::function filter) +{ + for (const AVOption* opt = nullptr; (opt = av_opt_next(obj, opt)) != nullptr;) { + // Skip all irrelevant options. + if (!opt->unit) + continue; + if (opt->unit != unit) + continue; + if (opt->name == unit) + continue; + + // Skip any deprecated options. + if (opt->flags & AV_OPT_FLAG_DEPRECATED) + continue; + + // Skip based on filter function. + if (filter && filter(opt)) + continue; + + // Generate name and add to list. + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", prefix.data(), opt->name); + obs_property_list_add_int(prop, D_TRANSLATE(buffer), opt->default_val.i64); + } +} + bool tools::can_hardware_encode(const AVCodec* codec) { AVPixelFormat hardware_formats[] = {AV_PIX_FMT_D3D11}; diff --git a/source/ffmpeg/tools.hpp b/source/ffmpeg/tools.hpp index 336c92e786..51d06e96fd 100644 --- a/source/ffmpeg/tools.hpp +++ b/source/ffmpeg/tools.hpp @@ -29,6 +29,7 @@ extern "C" { #pragma warning(disable : 4242 4244 4365) #endif #include +#include #include #ifdef _MSC_VER #pragma warning(pop) @@ -80,4 +81,14 @@ namespace streamfx::ffmpeg::tools { void print_av_option_string2(AVCodecContext* ctx_codec, void* ctx_option, std::string_view option, std::string_view text, std::function decoder); + bool avoption_exists(const void* obj, std::string_view name); + + const char* avoption_name_from_unit_value(const void* obj, std::string_view unit, int64_t value); + + void avoption_list_add_entries_unnamed(const void* obj, std::string_view unit, obs_property_t* prop, + std::function filter = nullptr); + + void avoption_list_add_entries(const void* obj, std::string_view unit, obs_property_t* prop, + std::string_view prefix, std::function filter = nullptr); + } // namespace streamfx::ffmpeg::tools From 36aec3be5441b9b6e767c59db234c938ebeb16e0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 17 Feb 2022 04:30:17 +0100 Subject: [PATCH 004/164] encoders/ffmpeg/nvenc: Ensure compatibility with more than just FFmpeg 4.2 When FFmpeg Encoders was originally written, FFmpeg 4.2 was still new and OBS Studio did not seem to want to update to anything newer for a while. This led to code being fine-tuned for FFmpeg 4.2, which stops working the moment OBS Studio upgrades FFmpeg. This removes the dependency on FFmpeg 4.2 hopefully, and allows using newer FFmpeg versions - or perhaps even older versions. Additionally the nonsensical behavior of the Target Quality slider was fixed. It is now from 0 to 51, instead of from 0 to 100, and as such matches FFmpeg exactly. --- data/locale/en-US.ini | 55 +-- .../encoders/handlers/nvenc_h264_handler.cpp | 64 ++-- .../encoders/handlers/nvenc_hevc_handler.cpp | 81 ++--- source/encoders/handlers/nvenc_shared.cpp | 331 ++++++++++-------- source/encoders/handlers/nvenc_shared.hpp | 52 +-- 5 files changed, 271 insertions(+), 312 deletions(-) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index 4e1965da6e..9b9454ce30 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -166,27 +166,40 @@ Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Access Unit Delimiter" # Encoder/FFmpeg/NVENC Encoder.FFmpeg.NVENC.Preset="Preset" -Encoder.FFmpeg.NVENC.Preset.Default="Default" -Encoder.FFmpeg.NVENC.Preset.Slow="Slow" -Encoder.FFmpeg.NVENC.Preset.Medium="Medium" -Encoder.FFmpeg.NVENC.Preset.Fast="Fast" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="High Performance" -Encoder.FFmpeg.NVENC.Preset.HighQuality="High Quality" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="BluRay Disc" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Low Latency" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Low Latency High Performance" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Low Latency High Quality" -Encoder.FFmpeg.NVENC.Preset.Lossless="Lossless" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Lossless High Performance" +Encoder.FFmpeg.NVENC.Preset.default="Default" +Encoder.FFmpeg.NVENC.Preset.slow="Slow" +Encoder.FFmpeg.NVENC.Preset.medium="Medium" +Encoder.FFmpeg.NVENC.Preset.fast="Fast" +Encoder.FFmpeg.NVENC.Preset.hp="High Performance" +Encoder.FFmpeg.NVENC.Preset.hq="High Quality" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay Disc" +Encoder.FFmpeg.NVENC.Preset.ll="Low Latency" +Encoder.FFmpeg.NVENC.Preset.llhq="Low Latency High Quality" +Encoder.FFmpeg.NVENC.Preset.llhp="Low Latency High Performance" +Encoder.FFmpeg.NVENC.Preset.lossless="Lossless" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Lossless High Performance" +Encoder.FFmpeg.NVENC.Preset.p1="Fastest (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Faster (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Fast (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Medium (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Slow (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Slower (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Slowest (P7)" +Encoder.FFmpeg.NVENC.Tune="Tune" +Encoder.FFmpeg.NVENC.Tune.hq="High Quality" +Encoder.FFmpeg.NVENC.Tune.ll="Low Latency" +Encoder.FFmpeg.NVENC.Tune.ull="Ultra Low Latency" +Encoder.FFmpeg.NVENC.Tune.lossless="Lossless" Encoder.FFmpeg.NVENC.RateControl="Rate Control Options" Encoder.FFmpeg.NVENC.RateControl.Mode="Mode" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Constant Quantization Parameter" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Variable Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="High Quality Variable Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Constant Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="High Quality Constant Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Low Delay High Quality Constant Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Constant Quantization Parameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variable Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Constant Bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Two Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Single Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Two Pass at Quarter Resolution" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Two Pass at Full Resolution" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Look Ahead" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptive I-Frames" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptive B-Frames" @@ -208,12 +221,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Temporal Adaptive Quantization" Encoder.FFmpeg.NVENC.Other="Other Options" Encoder.FFmpeg.NVENC.Other.BFrames="Maximum B-Frames" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Frame Reference Mode" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Use only middle B-Frames as reference" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Use all B-Frames as reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="No B-Frames will be used as Reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Only B-Frames/2 will be used as Reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Each B-Frame will be used as Reference" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Zero Latency" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Weighted Prediction" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Non-reference P-Frames" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Reference Frames" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Low Delay Key-Frame Scale" # Blur Blur.Type.Box="Box" diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index 24d11d5829..3eeedecd54 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -45,20 +45,6 @@ extern "C" { using namespace streamfx::encoder::ffmpeg::handler; using namespace streamfx::encoder::codec::h264; -static std::map profiles{ - {profile::BASELINE, "baseline"}, - {profile::MAIN, "main"}, - {profile::HIGH, "high"}, - {profile::HIGH444_PREDICTIVE, "high444p"}, -}; - -static std::map levels{ - {level::L1_0, "1.0"}, {level::L1_0b, "1.0b"}, {level::L1_1, "1.1"}, {level::L1_2, "1.2"}, - {level::L1_3, "1.3"}, {level::L2_0, "2.0"}, {level::L2_1, "2.1"}, {level::L2_2, "2.2"}, - {level::L3_0, "3.0"}, {level::L3_1, "3.1"}, {level::L3_2, "3.2"}, {level::L4_0, "4.0"}, - {level::L4_1, "4.1"}, {level::L4_2, "4.2"}, {level::L5_0, "5.0"}, {level::L5_1, "5.1"}, -}; - void nvenc_h264_handler::adjust_info(ffmpeg_factory* fac, const AVCodec*, std::string&, std::string& name, std::string&) { name = "NVIDIA NVENC H.264/AVC (via FFmpeg)"; @@ -108,19 +94,13 @@ void nvenc_h264_handler::update(obs_data_t* settings, const AVCodec* codec, AVCo nvenc::update(settings, codec, context); if (!context->internal) { - { - auto found = profiles.find(static_cast(obs_data_get_int(settings, ST_KEY_PROFILE))); - if (found != profiles.end()) { - av_opt_set(context->priv_data, "profile", found->second.c_str(), 0); - } + if (auto value = obs_data_get_int(settings, ST_KEY_PROFILE); value > -1) { + av_opt_set_int(context->priv_data, "profile", value, AV_OPT_SEARCH_CHILDREN); } - { - auto found = levels.find(static_cast(obs_data_get_int(settings, ST_KEY_LEVEL))); - if (found != levels.end()) { - av_opt_set(context->priv_data, "level", found->second.c_str(), 0); - } else { - av_opt_set(context->priv_data, "level", "auto", 0); - } + if (auto value = obs_data_get_int(settings, ST_KEY_LEVEL); value > -1) { + av_opt_set_int(context->priv_data, "level", value, AV_OPT_SEARCH_CHILDREN); + } else { + av_opt_set(context->priv_data, "level", "auto", AV_OPT_SEARCH_CHILDREN); } } } @@ -143,7 +123,13 @@ void nvenc_h264_handler::log_options(obs_data_t* settings, const AVCodec* codec, void nvenc_h264_handler::get_encoder_properties(obs_properties_t* props, const AVCodec* codec) { - nvenc::get_properties_pre(props, codec); + AVCodecContext* context = avcodec_alloc_context3(codec); + if (!context->priv_data) { + avcodec_free_context(&context); + return; + } + + nvenc::get_properties_pre(props, codec, context); { obs_properties_t* grp = props; @@ -155,23 +141,27 @@ void nvenc_h264_handler::get_encoder_properties(obs_properties_t* props, const A { auto p = obs_properties_add_list(grp, ST_KEY_PROFILE, D_TRANSLATE(S_CODEC_H264_PROFILE), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), static_cast(profile::UNKNOWN)); - for (auto const kv : profiles) { - std::string trans = std::string(S_CODEC_H264_PROFILE) + "." + kv.second; - obs_property_list_add_int(p, D_TRANSLATE(trans.c_str()), static_cast(kv.first)); - } + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "profile", p, S_CODEC_H264_PROFILE); } { auto p = obs_properties_add_list(grp, ST_KEY_LEVEL, D_TRANSLATE(S_CODEC_H264_LEVEL), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_AUTOMATIC), static_cast(level::UNKNOWN)); - for (auto const kv : levels) { - obs_property_list_add_int(p, kv.second.c_str(), static_cast(kv.first)); - } + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_AUTOMATIC), 0); + streamfx::ffmpeg::tools::avoption_list_add_entries_unnamed(context->priv_data, "level", p, + [](const AVOption* opt) { + if (opt->default_val.i64 == 0) + return true; + return false; + }); } } - nvenc::get_properties_post(props, codec); + nvenc::get_properties_post(props, codec, context); + + if (context) { + avcodec_free_context(&context); + } } void nvenc_h264_handler::get_runtime_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context) diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index 0b1a253c8a..5c3cb7ba88 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -42,23 +42,6 @@ extern "C" { using namespace streamfx::encoder::ffmpeg::handler; using namespace streamfx::encoder::codec::hevc; -static std::map profiles{ - {profile::MAIN, "main"}, - {profile::MAIN10, "main10"}, - {profile::RANGE_EXTENDED, "rext"}, -}; - -static std::map tiers{ - {tier::MAIN, "main"}, - {tier::HIGH, "high"}, -}; - -static std::map levels{ - {level::L1_0, "1.0"}, {level::L2_0, "2.0"}, {level::L2_1, "2.1"}, {level::L3_0, "3.0"}, {level::L3_1, "3.1"}, - {level::L4_0, "4.0"}, {level::L4_1, "4.1"}, {level::L5_0, "5.0"}, {level::L5_1, "5.1"}, {level::L5_2, "5.2"}, - {level::L6_0, "6.0"}, {level::L6_1, "6.1"}, {level::L6_2, "6.2"}, -}; - void nvenc_hevc_handler::adjust_info(ffmpeg_factory* fac, const AVCodec*, std::string&, std::string& name, std::string&) { name = "NVIDIA NVENC H.265/HEVC (via FFmpeg)"; @@ -109,25 +92,16 @@ void nvenc_hevc_handler::update(obs_data_t* settings, const AVCodec* codec, AVCo nvenc::update(settings, codec, context); if (!context->internal) { - { // HEVC Options - auto found = profiles.find(static_cast(obs_data_get_int(settings, ST_KEY_PROFILE))); - if (found != profiles.end()) { - av_opt_set(context->priv_data, "profile", found->second.c_str(), 0); - } + if (auto v = obs_data_get_int(settings, ST_KEY_PROFILE); v > -1) { + av_opt_set_int(context->priv_data, "profile", v, AV_OPT_SEARCH_CHILDREN); } - { - auto found = tiers.find(static_cast(obs_data_get_int(settings, ST_KEY_TIER))); - if (found != tiers.end()) { - av_opt_set(context->priv_data, "tier", found->second.c_str(), 0); - } + if (auto v = obs_data_get_int(settings, ST_KEY_TIER); v > -1) { + av_opt_set_int(context->priv_data, "tier", v, AV_OPT_SEARCH_CHILDREN); } - { - auto found = levels.find(static_cast(obs_data_get_int(settings, ST_KEY_LEVEL))); - if (found != levels.end()) { - av_opt_set(context->priv_data, "level", found->second.c_str(), 0); - } else { - av_opt_set(context->priv_data, "level", "auto", 0); - } + if (auto v = obs_data_get_int(settings, ST_KEY_LEVEL); v > -1) { + av_opt_set_int(context->priv_data, "level", v, AV_OPT_SEARCH_CHILDREN); + } else { + av_opt_set(context->priv_data, "level", "auto", AV_OPT_SEARCH_CHILDREN); } } } @@ -152,7 +126,13 @@ void nvenc_hevc_handler::log_options(obs_data_t* settings, const AVCodec* codec, void nvenc_hevc_handler::get_encoder_properties(obs_properties_t* props, const AVCodec* codec) { - nvenc::get_properties_pre(props, codec); + AVCodecContext* context = avcodec_alloc_context3(codec); + if (!context->priv_data) { + avcodec_free_context(&context); + return; + } + + nvenc::get_properties_pre(props, codec, context); { obs_properties_t* grp = props; @@ -164,32 +144,33 @@ void nvenc_hevc_handler::get_encoder_properties(obs_properties_t* props, const A { auto p = obs_properties_add_list(grp, ST_KEY_PROFILE, D_TRANSLATE(S_CODEC_HEVC_PROFILE), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), static_cast(profile::UNKNOWN)); - for (auto const kv : profiles) { - std::string trans = std::string(S_CODEC_HEVC_PROFILE) + "." + kv.second; - obs_property_list_add_int(p, D_TRANSLATE(trans.c_str()), static_cast(kv.first)); - } + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "profile", p, S_CODEC_HEVC_PROFILE); } { auto p = obs_properties_add_list(grp, ST_KEY_TIER, D_TRANSLATE(S_CODEC_HEVC_TIER), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), static_cast(tier::UNKNOWN)); - for (auto const kv : tiers) { - std::string trans = std::string(S_CODEC_HEVC_TIER) + "." + kv.second; - obs_property_list_add_int(p, D_TRANSLATE(trans.c_str()), static_cast(kv.first)); - } + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tier", p, S_CODEC_HEVC_TIER); } { auto p = obs_properties_add_list(grp, ST_KEY_LEVEL, D_TRANSLATE(S_CODEC_HEVC_LEVEL), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_AUTOMATIC), static_cast(level::UNKNOWN)); - for (auto const kv : levels) { - obs_property_list_add_int(p, kv.second.c_str(), static_cast(kv.first)); - } + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_AUTOMATIC), 0); + streamfx::ffmpeg::tools::avoption_list_add_entries_unnamed(context->priv_data, "level", p, + [](const AVOption* opt) { + if (opt->default_val.i64 == 0) + return true; + return false; + }); } } - nvenc::get_properties_post(props, codec); + nvenc::get_properties_post(props, codec, context); + + if (context) { + avcodec_free_context(&context); + } } void nvenc_hevc_handler::get_runtime_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context) diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index 7dcafe60ce..4426ac8f1a 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -33,12 +33,17 @@ extern "C" { #define ST_I18N_PRESET "Encoder.FFmpeg.NVENC.Preset" #define ST_I18N_PRESET_(x) ST_I18N_PRESET "." D_VSTR(x) #define ST_KEY_PRESET "Preset" +#define ST_I18N_TUNE "Encoder.FFmpeg.NVENC.Tune" +#define ST_I18N_TUNE_(x) ST_I18N_TUNE "." D_VSTR(x) +#define ST_KEY_TUNE "Tune" #define ST_I18N_RATECONTROL "Encoder.FFmpeg.NVENC.RateControl" #define ST_I18N_RATECONTROL_MODE ST_I18N_RATECONTROL ".Mode" #define ST_I18N_RATECONTROL_MODE_(x) ST_I18N_RATECONTROL_MODE "." D_VSTR(x) #define ST_KEY_RATECONTROL_MODE "RateControl.Mode" #define ST_I18N_RATECONTROL_TWOPASS ST_I18N_RATECONTROL ".TwoPass" #define ST_KEY_RATECONTROL_TWOPASS "RateControl.TwoPass" +#define ST_I18N_RATECONTROL_MULTIPASS ST_I18N_RATECONTROL ".MultiPass" +#define ST_KEY_RATECONTROL_MULTIPASS "RateControl.MultiPass" #define ST_I18N_RATECONTROL_LOOKAHEAD ST_I18N_RATECONTROL ".LookAhead" #define ST_KEY_RATECONTROL_LOOKAHEAD "RateControl.LookAhead" #define ST_I18N_RATECONTROL_ADAPTIVEI ST_I18N_RATECONTROL ".AdaptiveI" @@ -86,66 +91,25 @@ extern "C" { #define ST_KEY_OTHER_NONREFERENCEPFRAMES "Other.NonReferencePFrames" #define ST_I18N_OTHER_REFERENCEFRAMES ST_I18N_OTHER ".ReferenceFrames" #define ST_KEY_OTHER_REFERENCEFRAMES "Other.ReferenceFrames" +#define ST_I18N_OTHER_LOWDELAYKEYFRAMESCALE ST_I18N_OTHER ".LowDelayKeyFrameScale" +#define ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE "Other.LowDelayKeyFrameScale" using namespace streamfx::encoder::ffmpeg::handler; -std::map nvenc::presets{ - {nvenc::preset::DEFAULT, ST_I18N_PRESET_(Default)}, - {nvenc::preset::SLOW, ST_I18N_PRESET_(Slow)}, - {nvenc::preset::MEDIUM, ST_I18N_PRESET_(Medium)}, - {nvenc::preset::FAST, ST_I18N_PRESET_(Fast)}, - {nvenc::preset::HIGH_PERFORMANCE, ST_I18N_PRESET_(HighPerformance)}, - {nvenc::preset::HIGH_QUALITY, ST_I18N_PRESET_(HighQuality)}, - {nvenc::preset::BLURAYDISC, ST_I18N_PRESET_(BluRayDisc)}, - {nvenc::preset::LOW_LATENCY, ST_I18N_PRESET_(LowLatency)}, - {nvenc::preset::LOW_LATENCY_HIGH_PERFORMANCE, ST_I18N_PRESET_(LowLatencyHighPerformance)}, - {nvenc::preset::LOW_LATENCY_HIGH_QUALITY, ST_I18N_PRESET_(LowLatencyHighQuality)}, - {nvenc::preset::LOSSLESS, ST_I18N_PRESET_(Lossless)}, - {nvenc::preset::LOSSLESS_HIGH_PERFORMANCE, ST_I18N_PRESET_(LosslessHighPerformance)}, -}; - -std::map nvenc::preset_to_opt{ - {nvenc::preset::DEFAULT, "default"}, - {nvenc::preset::SLOW, "slow"}, - {nvenc::preset::MEDIUM, "medium"}, - {nvenc::preset::FAST, "fast"}, - {nvenc::preset::HIGH_PERFORMANCE, "hp"}, - {nvenc::preset::HIGH_QUALITY, "hq"}, - {nvenc::preset::BLURAYDISC, "bd"}, - {nvenc::preset::LOW_LATENCY, "ll"}, - {nvenc::preset::LOW_LATENCY_HIGH_PERFORMANCE, "llhp"}, - {nvenc::preset::LOW_LATENCY_HIGH_QUALITY, "llhq"}, - {nvenc::preset::LOSSLESS, "lossless"}, - {nvenc::preset::LOSSLESS_HIGH_PERFORMANCE, "losslesshp"}, -}; - -std::map nvenc::ratecontrolmodes{ - {nvenc::ratecontrolmode::CQP, ST_I18N_RATECONTROL_MODE_(CQP)}, - {nvenc::ratecontrolmode::VBR, ST_I18N_RATECONTROL_MODE_(VBR)}, - {nvenc::ratecontrolmode::VBR_HQ, ST_I18N_RATECONTROL_MODE_(VBR_HQ)}, - {nvenc::ratecontrolmode::CBR, ST_I18N_RATECONTROL_MODE_(CBR)}, - {nvenc::ratecontrolmode::CBR_HQ, ST_I18N_RATECONTROL_MODE_(CBR_HQ)}, - {nvenc::ratecontrolmode::CBR_LD_HQ, ST_I18N_RATECONTROL_MODE_(CBR_LD_HQ)}, -}; - -std::map nvenc::ratecontrolmode_to_opt{ - {nvenc::ratecontrolmode::CQP, "constqp"}, {nvenc::ratecontrolmode::VBR, "vbr"}, - {nvenc::ratecontrolmode::VBR_HQ, "vbr_hq"}, {nvenc::ratecontrolmode::CBR, "cbr"}, - {nvenc::ratecontrolmode::CBR_HQ, "cbr_hq"}, {nvenc::ratecontrolmode::CBR_LD_HQ, "cbr_ld_hq"}, -}; - -std::map nvenc::b_ref_modes{ - {nvenc::b_ref_mode::INVALID, S_STATE_DEFAULT}, - {nvenc::b_ref_mode::DISABLED, S_STATE_DISABLED}, - {nvenc::b_ref_mode::EACH, ST_I18N_OTHER_BFRAMEREFERENCEMODE ".Each"}, - {nvenc::b_ref_mode::MIDDLE, ST_I18N_OTHER_BFRAMEREFERENCEMODE ".Middle"}, -}; - -std::map nvenc::b_ref_mode_to_opt{ - {nvenc::b_ref_mode::DISABLED, "disabled"}, - {nvenc::b_ref_mode::EACH, "each"}, - {nvenc::b_ref_mode::MIDDLE, "middle"}, -}; +inline bool is_cqp(std::string_view rc) +{ + return std::string_view("constqp") == rc; +} + +inline bool is_cbr(std::string_view rc) +{ + return std::string_view("cbr") == rc; +} + +inline bool is_vbr(std::string_view rc) +{ + return std::string_view("vbr") == rc; +} bool streamfx::encoder::ffmpeg::handler::nvenc::is_available() { @@ -198,9 +162,9 @@ void nvenc::override_update(ffmpeg_instance* instance, obs_data_t*) void nvenc::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*) { - obs_data_set_default_int(settings, ST_KEY_PRESET, static_cast(nvenc::preset::DEFAULT)); + obs_data_set_default_int(settings, ST_KEY_PRESET, -1); - obs_data_set_default_int(settings, ST_KEY_RATECONTROL_MODE, static_cast(ratecontrolmode::CBR_HQ)); + obs_data_set_default_int(settings, ST_KEY_RATECONTROL_MODE, -1); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_TWOPASS, -1); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_LOOKAHEAD, -1); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_ADAPTIVEI, -1); @@ -222,11 +186,12 @@ void nvenc::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*) obs_data_set_default_int(settings, ST_KEY_AQ_TEMPORAL, -1); obs_data_set_default_int(settings, ST_KEY_OTHER_BFRAMES, -1); - obs_data_set_default_int(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE, static_cast(b_ref_mode::INVALID)); + obs_data_set_default_int(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE, -1); obs_data_set_default_int(settings, ST_KEY_OTHER_ZEROLATENCY, -1); obs_data_set_default_int(settings, ST_KEY_OTHER_WEIGHTEDPREDICTION, -1); obs_data_set_default_int(settings, ST_KEY_OTHER_NONREFERENCEPFRAMES, -1); obs_data_set_default_int(settings, ST_KEY_OTHER_REFERENCEFRAMES, -1); + obs_data_set_default_int(settings, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE, -1); // Replay Buffer obs_data_set_default_int(settings, "bitrate", 0); @@ -234,33 +199,29 @@ void nvenc::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*) static bool modified_ratecontrol(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept { + // Decode the name into useful flags. + auto value = obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE); bool have_bitrate = false; bool have_bitrate_range = false; bool have_quality = false; bool have_qp_limits = false; bool have_qp = false; - - nvenc::ratecontrolmode rc = - static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE)); - switch (rc) { - case nvenc::ratecontrolmode::CQP: + if (value == 2) { + have_bitrate = true; + } else if (value == 1) { + have_bitrate = true; + have_bitrate_range = true; + have_quality = true; + have_qp_limits = true; + have_qp = true; + } else if (value == 0) { have_qp = true; - break; - case nvenc::ratecontrolmode::INVALID: - case nvenc::ratecontrolmode::CBR: - case nvenc::ratecontrolmode::CBR_HQ: - case nvenc::ratecontrolmode::CBR_LD_HQ: - have_bitrate = true; - have_qp_limits = true; - break; - case nvenc::ratecontrolmode::VBR: - case nvenc::ratecontrolmode::VBR_HQ: + } else { have_bitrate = true; have_bitrate_range = true; have_quality = true; have_qp_limits = true; have_qp = true; - break; } obs_property_set_visible(obs_properties_get(props, ST_I18N_RATECONTROL_LIMITS), have_bitrate || have_quality); @@ -286,16 +247,22 @@ static bool modified_aq(obs_properties_t* props, obs_property_t*, obs_data_t* se return true; } -void nvenc::get_properties_pre(obs_properties_t* props, const AVCodec*) +void nvenc::get_properties_pre(obs_properties_t* props, const AVCodec*, const AVCodecContext* context) { - auto p = obs_properties_add_list(props, ST_KEY_PRESET, D_TRANSLATE(ST_I18N_PRESET), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); - for (auto kv : presets) { - obs_property_list_add_int(p, D_TRANSLATE(kv.second.c_str()), static_cast(kv.first)); + { + auto p = obs_properties_add_list(props, ST_KEY_PRESET, D_TRANSLATE(ST_I18N_PRESET), OBS_COMBO_TYPE_LIST, + OBS_COMBO_FORMAT_INT); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "preset", p, ST_I18N_PRESET); + } + + if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "tune")) { + auto p = obs_properties_add_list(props, ST_KEY_TUNE, D_TRANSLATE(ST_I18N_TUNE), OBS_COMBO_TYPE_LIST, + OBS_COMBO_FORMAT_INT); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tune", p, ST_I18N_TUNE); } } -void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec) +void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec, const AVCodecContext* context) { { // Rate Control obs_properties_t* grp = props; @@ -309,12 +276,23 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec) auto p = obs_properties_add_list(grp, ST_KEY_RATECONTROL_MODE, D_TRANSLATE(ST_I18N_RATECONTROL_MODE), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); obs_property_set_modified_callback(p, modified_ratecontrol); - for (auto kv : ratecontrolmodes) { - obs_property_list_add_int(p, D_TRANSLATE(kv.second.c_str()), static_cast(kv.first)); - } + auto filter = [](const AVOption* opt) { + if (opt->default_val.i64 & (1 << 23)) + return true; + return false; + }; + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "rc", p, ST_I18N_RATECONTROL_MODE, + filter); } - { + if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "multipass")) { + auto p = + obs_properties_add_list(grp, ST_KEY_RATECONTROL_MULTIPASS, D_TRANSLATE(ST_I18N_RATECONTROL_MULTIPASS), + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "multipass", p, + ST_I18N_RATECONTROL_MULTIPASS); + } else { auto p = streamfx::util::obs_properties_add_tristate(grp, ST_KEY_RATECONTROL_TWOPASS, D_TRANSLATE(ST_I18N_RATECONTROL_TWOPASS)); } @@ -347,7 +325,7 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec) { auto p = obs_properties_add_float_slider(grp, ST_KEY_RATECONTROL_LIMITS_QUALITY, - D_TRANSLATE(ST_I18N_RATECONTROL_LIMITS_QUALITY), 0, 100, 0.01); + D_TRANSLATE(ST_I18N_RATECONTROL_LIMITS_QUALITY), 0, 51, 0.01); } { @@ -442,13 +420,9 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec) auto p = obs_properties_add_list(grp, ST_KEY_OTHER_BFRAMEREFERENCEMODE, D_TRANSLATE(ST_I18N_OTHER_BFRAMEREFERENCEMODE), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - for (auto kv : b_ref_modes) { - if (kv.first == nvenc::b_ref_mode::EACH && (std::string_view("h264_nvenc") == codec->name)) { - // H.264 does not support using all B-Frames as reference. - continue; - } - obs_property_list_add_int(p, D_TRANSLATE(kv.second.c_str()), static_cast(kv.first)); - } + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "b_ref_mode", p, + ST_I18N_OTHER_BFRAMEREFERENCEMODE); } { @@ -472,15 +446,22 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec) (strcmp(codec->name, "h264_nvenc") == 0) ? 16 : 4, 1); obs_property_int_set_suffix(p, " frames"); } + + if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "ldkfs")) { + auto p = obs_properties_add_int_slider(grp, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE, + D_TRANSLATE(ST_I18N_OTHER_LOWDELAYKEYFRAMESCALE), -1, 255, 1); + } } } void nvenc::get_runtime_properties(obs_properties_t* props, const AVCodec*, AVCodecContext*) { obs_property_set_enabled(obs_properties_get(props, ST_KEY_PRESET), false); + obs_property_set_enabled(obs_properties_get(props, ST_KEY_TUNE), false); obs_property_set_enabled(obs_properties_get(props, ST_I18N_RATECONTROL), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_RATECONTROL_MODE), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_RATECONTROL_TWOPASS), false); + obs_property_set_enabled(obs_properties_get(props, ST_KEY_RATECONTROL_MULTIPASS), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_RATECONTROL_LOOKAHEAD), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_RATECONTROL_ADAPTIVEI), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_RATECONTROL_ADAPTIVEB), false); @@ -506,84 +487,91 @@ void nvenc::get_runtime_properties(obs_properties_t* props, const AVCodec*, AVCo obs_property_set_enabled(obs_properties_get(props, ST_KEY_OTHER_WEIGHTEDPREDICTION), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_OTHER_NONREFERENCEPFRAMES), false); obs_property_set_enabled(obs_properties_get(props, ST_KEY_OTHER_REFERENCEFRAMES), false); + obs_property_set_enabled(obs_properties_get(props, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE), false); } void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) { if (!context->internal) { - preset c_preset = static_cast(obs_data_get_int(settings, ST_KEY_PRESET)); - auto found = preset_to_opt.find(c_preset); - if (found != preset_to_opt.end()) { - av_opt_set(context->priv_data, "preset", found->second.c_str(), 0); - } else { - av_opt_set(context->priv_data, "preset", nullptr, 0); + auto value = obs_data_get_int(settings, ST_KEY_PRESET); + if (value != -1) { + auto name = streamfx::ffmpeg::tools::avoption_name_from_unit_value(context->priv_data, "preset", value); + if (name) { + av_opt_set(context->priv_data, "preset", name, AV_OPT_SEARCH_CHILDREN); + } else { + av_opt_set_int(context->priv_data, "preset", value, AV_OPT_SEARCH_CHILDREN); + } } } { // Rate Control + auto value = obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE); + auto name = streamfx::ffmpeg::tools::avoption_name_from_unit_value(context->priv_data, "rc", value); + if (value != -1) { + if (name && !context->internal) { + av_opt_set(context->priv_data, "rc", name, AV_OPT_SEARCH_CHILDREN); + } else { + av_opt_set_int(context->priv_data, "rc", value, AV_OPT_SEARCH_CHILDREN); + } + } + + // Decode the name into useful flags. bool have_bitrate = false; bool have_bitrate_range = false; bool have_quality = false; bool have_qp_limits = false; bool have_qp = false; + if (is_cbr(name)) { + have_bitrate = true; - ratecontrolmode rc = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE)); - auto rcopt = ratecontrolmode_to_opt.find(rc); - if (rcopt != ratecontrolmode_to_opt.end()) { - if (!context->internal) { - av_opt_set(context->priv_data, "rc", rcopt->second.c_str(), AV_OPT_SEARCH_CHILDREN); - } - } else { + if (!context->internal) + av_opt_set_int(context->priv_data, "cbr", 1, AV_OPT_SEARCH_CHILDREN); + + // Support for OBS Studio + obs_data_set_string(settings, "rate_control", "CBR"); + } else if (is_vbr(name)) { have_bitrate = true; have_bitrate_range = true; have_quality = true; have_qp_limits = true; have_qp = true; - } - if (!context->internal) { - av_opt_set_int(context->priv_data, "cbr", 0, AV_OPT_SEARCH_CHILDREN); - } - switch (rc) { - case ratecontrolmode::CQP: + if (!context->internal) + av_opt_set_int(context->priv_data, "cbr", 0, AV_OPT_SEARCH_CHILDREN); + + // Support for OBS Studio + obs_data_set_string(settings, "rate_control", "VBR"); + } else if (is_cqp(name)) { have_qp = true; - { // Support for OBS Studio - obs_data_set_string(settings, "rate_control", "CQP"); - } - break; - case ratecontrolmode::INVALID: - case ratecontrolmode::CBR: - case ratecontrolmode::CBR_HQ: - case ratecontrolmode::CBR_LD_HQ: - have_bitrate = true; - have_qp_limits = true; - if (!context->internal) { - av_opt_set_int(context->priv_data, "cbr", 1, AV_OPT_SEARCH_CHILDREN); - } + if (!context->internal) + av_opt_set_int(context->priv_data, "cbr", 0, AV_OPT_SEARCH_CHILDREN); - { // Support for OBS Studio - obs_data_set_string(settings, "rate_control", "CBR"); - } - break; - case ratecontrolmode::VBR: - case ratecontrolmode::VBR_HQ: - have_bitrate_range = true; + // Support for OBS Studio + obs_data_set_string(settings, "rate_control", "CQP"); + } else { have_bitrate = true; + have_bitrate_range = true; have_quality = true; - have_qp = true; have_qp_limits = true; + have_qp = true; - { // Support for OBS Studio - obs_data_set_string(settings, "rate_control", "VBR"); - } - break; + if (!context->internal) + av_opt_set_int(context->priv_data, "cbr", 0, AV_OPT_SEARCH_CHILDREN); } if (!context->internal) { - // Two Pass - if (int tp = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_TWOPASS)); tp > -1) { - av_opt_set_int(context->priv_data, "2pass", tp ? 1 : 0, AV_OPT_SEARCH_CHILDREN); + if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "multipass")) { + // Multi-Pass + if (int tp = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_MULTIPASS)); tp > -1) { + av_opt_set_int(context->priv_data, "multipass", tp, AV_OPT_SEARCH_CHILDREN); + av_opt_set_int(context->priv_data, "2pass", 0, AV_OPT_SEARCH_CHILDREN); + } + } else { + // Two-Pass + if (int tp = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_TWOPASS)); tp > -1) { + av_opt_set_int(context->priv_data, "2pass", tp ? 1 : 0, AV_OPT_SEARCH_CHILDREN); + } } // Look Ahead # of Frames @@ -600,8 +588,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c } // Adaptive B-Frames - constexpr std::string_view h264_encoder_name = "h264_nvenc"; - if (h264_encoder_name == codec->name) { + if (std::string_view("h264_nvenc") == codec->name) { if (int64_t adapt_b = obs_data_get_int(settings, ST_KEY_RATECONTROL_ADAPTIVEB); !streamfx::util::is_tristate_default(adapt_b) && (la != 0)) { av_opt_set_int(context->priv_data, "b_adapt", adapt_b, AV_OPT_SEARCH_CHILDREN); @@ -661,8 +648,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c // Quality Target if (have_quality) { - if (double_t v = obs_data_get_double(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY) / 100.0 * 51.0; - v > 0) { + if (double_t v = obs_data_get_double(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY); v > 0) { av_opt_set_double(context->priv_data, "cq", v, AV_OPT_SEARCH_CHILDREN); } } else { @@ -703,7 +689,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c if (!context->internal) { // Other if (int64_t bf = obs_data_get_int(settings, ST_KEY_OTHER_BFRAMES); bf > -1) - context->max_b_frames = static_cast(bf); + av_opt_set_int(context, "bf", bf, AV_OPT_SEARCH_CHILDREN); if (int64_t zl = obs_data_get_int(settings, ST_KEY_OTHER_ZEROLATENCY); !streamfx::util::is_tristate_default(zl)) av_opt_set_int(context->priv_data, "zerolatency", zl, AV_OPT_SEARCH_CHILDREN); @@ -711,7 +697,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c !streamfx::util::is_tristate_default(nrp)) av_opt_set_int(context->priv_data, "nonref_p", nrp, AV_OPT_SEARCH_CHILDREN); if (int64_t v = obs_data_get_int(settings, ST_KEY_OTHER_REFERENCEFRAMES); v > -1) - context->refs = v; + av_opt_set_int(context, "refs", v, AV_OPT_SEARCH_CHILDREN); int64_t wp = obs_data_get_int(settings, ST_KEY_OTHER_WEIGHTEDPREDICTION); if ((context->max_b_frames > 0) && streamfx::util::is_tristate_enabled(wp)) { @@ -721,12 +707,12 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c av_opt_set_int(context->priv_data, "weighted_pred", wp, AV_OPT_SEARCH_CHILDREN); } - { - auto found = b_ref_mode_to_opt.find( - static_cast(obs_data_get_int(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE))); - if (found != b_ref_mode_to_opt.end()) { - av_opt_set(context->priv_data, "b_ref_mode", found->second.c_str(), AV_OPT_SEARCH_CHILDREN); - } + if (auto v = obs_data_get_int(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE); v > -1) { + av_opt_set_int(context->priv_data, "b_ref_mode", v, AV_OPT_SEARCH_CHILDREN); + } + + if (auto v = obs_data_get_int(settings, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE); v > -1) { + av_opt_set_int(context->priv_data, "ldkfs", v, AV_OPT_SEARCH_CHILDREN); } } } @@ -741,6 +727,8 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte tools::print_av_option_string2(context, "rc", " Rate Control", [](int64_t v, std::string_view o) { return std::string(o); }); tools::print_av_option_bool(context, "2pass", " Two Pass"); + tools::print_av_option_string2(context, "multipass", " Multi-Pass", + [](int64_t v, std::string_view o) { return std::string(o); }); tools::print_av_option_int(context, "rc-lookahead", " Look-Ahead", "Frames"); tools::print_av_option_bool(context, "no-scenecut", " Adaptive I-Frames", true); if (strcmp(codec->name, "h264_nvenc") == 0) @@ -759,6 +747,8 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte tools::print_av_option_int(context, "init_qpI", " I-Frame", ""); tools::print_av_option_int(context, "init_qpP", " P-Frame", ""); tools::print_av_option_int(context, "init_qpB", " B-Frame", ""); + tools::print_av_option_int(context, "qp_cb_offset", " CB Offset", ""); + tools::print_av_option_int(context, "qp_cr_offset", " CR Offset", ""); tools::print_av_option_int(context, "bf", " B-Frames", "Frames"); tools::print_av_option_string2(context, "b_ref_mode", " Reference Mode", @@ -783,9 +773,14 @@ void nvenc::log_options(obs_data_t*, const AVCodec* codec, AVCodecContext* conte tools::print_av_option_bool(context, "strict_gop", " Strict GOP"); tools::print_av_option_bool(context, "aud", " Access Unit Delimiters"); tools::print_av_option_bool(context, "bluray-compat", " Bluray Compatibility"); - if (strcmp(codec->name, "h264_nvenc") == 0) - tools::print_av_option_bool(context, "a53cc", " A53 Closed Captions"); + tools::print_av_option_bool(context, "a53cc", " A53 Closed Captions"); tools::print_av_option_int(context, "dpb_size", " DPB Size", "Frames"); + tools::print_av_option_int(context, "ldkfs", " DPB Size", "Frames"); + tools::print_av_option_bool(context, "extra_sei", " Extra SEI Data"); + tools::print_av_option_bool(context, "udu_sei", " User SEI Data"); + tools::print_av_option_bool(context, "intra-refresh", " Intra-Refresh"); + tools::print_av_option_bool(context, "single-slice-intra-refresh", " Single Slice Intra-Refresh"); + tools::print_av_option_bool(context, "constrained-encoding", " Constrained Encoding"); } void streamfx::encoder::ffmpeg::handler::nvenc::migrate(obs_data_t* settings, uint64_t version, const AVCodec* codec, @@ -814,5 +809,31 @@ void streamfx::encoder::ffmpeg::handler::nvenc::migrate(obs_data_t* settings, ui obs_data_unset_user_value(settings, "Other.DecodedPictureBufferSize"); } + if (version < STREAMFX_MAKE_VERSION(0, 11, 1, 0)) { + if (auto v = obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE); v != -1) { + switch (v) { + case 0: // CQP + break; + case 2: // VBR_HQ + obs_data_set_int(settings, ST_KEY_RATECONTROL_MODE, 1); + obs_data_set_int(settings, ST_KEY_RATECONTROL_TWOPASS, 1); + obs_data_set_int(settings, ST_KEY_RATECONTROL_MULTIPASS, 1); + case 1: // VBR + break; + case 5: // CBR_LD_HQ + obs_data_set_int(settings, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE, 1); + case 4: // CBR_HQ + obs_data_set_int(settings, ST_KEY_RATECONTROL_MODE, 2); + obs_data_set_int(settings, ST_KEY_RATECONTROL_TWOPASS, 1); + obs_data_set_int(settings, ST_KEY_RATECONTROL_MULTIPASS, 1); + case 3: // CBR + break; + } + } + if (auto v = obs_data_get_double(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY); v > 0) { + obs_data_set_double(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY, (v / 100.) * 51.); + } + } + #undef COPY_UNSET } diff --git a/source/encoders/handlers/nvenc_shared.hpp b/source/encoders/handlers/nvenc_shared.hpp index cea4d38510..08288b27cc 100644 --- a/source/encoders/handlers/nvenc_shared.hpp +++ b/source/encoders/handlers/nvenc_shared.hpp @@ -42,63 +42,15 @@ extern "C" { */ namespace streamfx::encoder::ffmpeg::handler::nvenc { - enum class preset : int64_t { - DEFAULT, - SLOW, - MEDIUM, - FAST, - HIGH_PERFORMANCE, - HIGH_QUALITY, - BLURAYDISC, - LOW_LATENCY, - LOW_LATENCY_HIGH_PERFORMANCE, - LOW_LATENCY_HIGH_QUALITY, - LOSSLESS, - LOSSLESS_HIGH_PERFORMANCE, - // Append things before this. - INVALID = -1, - }; - - enum class ratecontrolmode : int64_t { - CQP, - VBR, - VBR_HQ, - CBR, - CBR_HQ, - CBR_LD_HQ, - // Append things before this. - INVALID = -1, - }; - - enum class b_ref_mode : int64_t { - DISABLED, - EACH, - MIDDLE, - // Append things before this. - INVALID = -1, - }; - - extern std::map presets; - - extern std::map preset_to_opt; - - extern std::map ratecontrolmodes; - - extern std::map ratecontrolmode_to_opt; - - extern std::map b_ref_modes; - - extern std::map b_ref_mode_to_opt; - bool is_available(); void override_update(ffmpeg_instance* instance, obs_data_t* settings); void get_defaults(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context); - void get_properties_pre(obs_properties_t* props, const AVCodec* codec); + void get_properties_pre(obs_properties_t* props, const AVCodec* codec, const AVCodecContext* context); - void get_properties_post(obs_properties_t* props, const AVCodec* codec); + void get_properties_post(obs_properties_t* props, const AVCodec* codec, const AVCodecContext* context); void get_runtime_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context); From 0da1e77b22da9d372e1409c921a80ec396a518b2 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Fri, 18 Feb 2022 05:19:42 +0100 Subject: [PATCH 005/164] locale: New Crowdin updates (#772) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Japanese) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Thai) * New translations en-US.ini (Turkish) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Chinese Traditional) * New translations en-US.ini (Russian) * New translations en-US.ini (English, United Kingdom) * New translations en-US.ini (Portuguese) * New translations en-US.ini (Japanese) * New translations en-US.ini (Romanian) * New translations en-US.ini (French) * New translations en-US.ini (Spanish) * New translations en-US.ini (Arabic) * New translations en-US.ini (Czech) * New translations en-US.ini (German) * New translations en-US.ini (Finnish) * New translations en-US.ini (Polish) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Italian) * New translations en-US.ini (Korean) * New translations en-US.ini (Dutch) * New translations en-US.ini (Norwegian) * New translations en-US.ini (Romanian) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Romanian) * New translations en-US.ini (Italian) * New translations en-US.ini (Russian) * New translations en-US.ini (Italian) * New translations en-US.ini (Russian) * New translations en-US.ini (Russian) * New translations en-US.ini (Russian) --- data/locale/ar-SA.ini | 2 +- data/locale/cs-CZ.ini | 2 +- data/locale/de-DE.ini | 27 +++-------- data/locale/en-GB.ini | 12 ++--- data/locale/es-ES.ini | 27 +++-------- data/locale/fi-FI.ini | 2 +- data/locale/fr-FR.ini | 27 +++-------- data/locale/hu-HU.ini | 108 ++++++++++++++++++++++++++++++++++++++++-- data/locale/it-IT.ini | 55 +++++++++++++-------- data/locale/ja-JP.ini | 29 ++++-------- data/locale/ko-KR.ini | 2 +- data/locale/nl-NL.ini | 27 +++-------- data/locale/no-NO.ini | 12 ++--- data/locale/pl-PL.ini | 27 +++-------- data/locale/pt-BR.ini | 48 ++++++++++++++++--- data/locale/pt-PT.ini | 8 ++-- data/locale/ro-RO.ini | 33 ++++++++++--- data/locale/ru-RU.ini | 55 +++++++++++++-------- data/locale/th-TH.ini | 6 +-- data/locale/tr-TR.ini | 14 ++---- data/locale/zh-CN.ini | 27 +++-------- data/locale/zh-TW.ini | 2 +- 22 files changed, 322 insertions(+), 230 deletions(-) diff --git a/data/locale/ar-SA.ini b/data/locale/ar-SA.ini index de2b5b8539..d02fff4231 100644 --- a/data/locale/ar-SA.ini +++ b/data/locale/ar-SA.ini @@ -52,7 +52,7 @@ Encoder.AOM.AV1.RateControl.Buffer.Size="الحجم" -Encoder.FFmpeg.NVENC.Preset.Default="افتراضي" +Encoder.FFmpeg.NVENC.Preset.default="افتراضي" Blur.Type.Box="صندوق" Blur.Type.BoxLinear="صندوق خطي" diff --git a/data/locale/cs-CZ.ini b/data/locale/cs-CZ.ini index 4c86d837d5..db006016b4 100644 --- a/data/locale/cs-CZ.ini +++ b/data/locale/cs-CZ.ini @@ -70,7 +70,7 @@ Encoder.FFmpeg.AMF.RateControl.QP.B="QP B-snímků" Encoder.FFmpeg.AMF.Other="Ostatní možnosti" Encoder.FFmpeg.NVENC.Preset="Profil" -Encoder.FFmpeg.NVENC.Preset.Default="Výchozí" +Encoder.FFmpeg.NVENC.Preset.default="Výchozí" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Cílový bitrate" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximální bitrate" diff --git a/data/locale/de-DE.ini b/data/locale/de-DE.ini index 9de7cd6709..b72fd4f560 100644 --- a/data/locale/de-DE.ini +++ b/data/locale/de-DE.ini @@ -154,26 +154,15 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Zugriffseinheitabgrenzer" Encoder.FFmpeg.NVENC.Preset="Voreinstellung" -Encoder.FFmpeg.NVENC.Preset.Default="Standard" -Encoder.FFmpeg.NVENC.Preset.Slow="Langsam" -Encoder.FFmpeg.NVENC.Preset.Medium="Mittel" -Encoder.FFmpeg.NVENC.Preset.Fast="Schnell" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Hohe Leistung" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Hohe Qualität" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="BluRay Disc" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Niedrige Latenz" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Niedrige Latenz, Hohe Leistung" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Niedrige Latenz, Hohe Qualität" -Encoder.FFmpeg.NVENC.Preset.Lossless="Verlustfrei" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Verlusfrei, Hohe Leistung" +Encoder.FFmpeg.NVENC.Preset.default="Standard" +Encoder.FFmpeg.NVENC.Preset.slow="Langsam" +Encoder.FFmpeg.NVENC.Preset.medium="Mittel" +Encoder.FFmpeg.NVENC.Preset.fast="Schnell" +Encoder.FFmpeg.NVENC.Tune="Justierung" Encoder.FFmpeg.NVENC.RateControl="Ratenkontrollmethode" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Parameter für Konstante Quantisierung" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Variable Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Hohe Qualität, Variable Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Konstante Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Hohe Qualität, Konstante Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Niedrige Latenz, Hohe Qualität, Konstante Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parameter für Konstante Quantisierung" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstante Bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Zwei Durchläufe" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vorausschauen" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptive I-Frames" @@ -196,8 +185,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Zeitlich-adaptive Quantisierung" Encoder.FFmpeg.NVENC.Other="Weitere Optionen" Encoder.FFmpeg.NVENC.Other.BFrames="Maximale B‐Bilder" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Bild Referenzmodus" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Benutze nur mittlere B-Bilder als Referenz" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Benutze alle B-Bilder als Referenz" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Null Latenz" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Gewichtete Vorhersage" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Nicht-referenzierte P-Bilder" diff --git a/data/locale/en-GB.ini b/data/locale/en-GB.ini index 27682c9aec..d70412f10e 100644 --- a/data/locale/en-GB.ini +++ b/data/locale/en-GB.ini @@ -86,14 +86,14 @@ Encoder.FFmpeg.AMF.Other.BFrames="Maximum B-Frames" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Reference Frames" Encoder.FFmpeg.NVENC.Preset="Preset" -Encoder.FFmpeg.NVENC.Preset.Default="Default" -Encoder.FFmpeg.NVENC.Preset.Slow="Slow" -Encoder.FFmpeg.NVENC.Preset.Medium="Medium" -Encoder.FFmpeg.NVENC.Preset.Fast="Fast" +Encoder.FFmpeg.NVENC.Preset.default="Default" +Encoder.FFmpeg.NVENC.Preset.slow="Slow" +Encoder.FFmpeg.NVENC.Preset.medium="Medium" +Encoder.FFmpeg.NVENC.Preset.fast="Fast" Encoder.FFmpeg.NVENC.RateControl="Rate Control Options" Encoder.FFmpeg.NVENC.RateControl.Mode="Mode" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Constant Quantisation Parameter" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Constant Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Constant Quantisation Parameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Constant Bitrate" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Look Ahead" Encoder.FFmpeg.NVENC.RateControl.Limits="Limits" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Buffer Size" diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index dde1cf53d0..a5bd1b2433 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -154,26 +154,15 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Delimitador de Unidad de Acceso" Encoder.FFmpeg.NVENC.Preset="Preajuste" -Encoder.FFmpeg.NVENC.Preset.Default="Por defecto" -Encoder.FFmpeg.NVENC.Preset.Slow="Lento" -Encoder.FFmpeg.NVENC.Preset.Medium="Medio" -Encoder.FFmpeg.NVENC.Preset.Fast="Rápido" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Alto rendimiento" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Alta calidad" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="Disco BluRay" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Baja latencia" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Baja latencia alto rendimiento" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Baja latencia alta calidad" -Encoder.FFmpeg.NVENC.Preset.Lossless="Sin pérdidas" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Sin pérdida alto rendimiento" +Encoder.FFmpeg.NVENC.Preset.default="Por defecto" +Encoder.FFmpeg.NVENC.Preset.slow="Lento" +Encoder.FFmpeg.NVENC.Preset.medium="Medio" +Encoder.FFmpeg.NVENC.Preset.fast="Rápido" +Encoder.FFmpeg.NVENC.Tune="Sintonizar" Encoder.FFmpeg.NVENC.RateControl="Opciones de control de flujo" Encoder.FFmpeg.NVENC.RateControl.Mode="Modo" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Parámetro de Cuantización Constante" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Bitrate variable" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Bitrate Variable de alta calidad" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Bitrate constante" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Bitrate constante de alta calidad" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Bitrate constante de alta calidad con bajo retardo" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parámetro de Cuantización Constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Bitrate constante" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dos pasos" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Look Ahead" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames adaptativos" @@ -196,8 +185,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Cuantización adaptativa temporal" Encoder.FFmpeg.NVENC.Other="Otras opciones" Encoder.FFmpeg.NVENC.Other.BFrames="B-Frames máximos" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Modo de referencia de B-Frame" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Usar solo B-Frames medios como referencia" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Usar todos los B-Frames como referencia" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latencia cero" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predicción ponderada" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="P-Frames sin referencia" diff --git a/data/locale/fi-FI.ini b/data/locale/fi-FI.ini index f946159af4..1a77b3b60b 100644 --- a/data/locale/fi-FI.ini +++ b/data/locale/fi-FI.ini @@ -49,7 +49,7 @@ UI.Updater.Menu.Channel.Testing="Testaus" -Encoder.FFmpeg.NVENC.Preset.Default="Oletus" +Encoder.FFmpeg.NVENC.Preset.default="Oletus" Blur.Type.Box="Kuutiollinen" Blur.Type.BoxLinear="Kuutio lineaarinen" diff --git a/data/locale/fr-FR.ini b/data/locale/fr-FR.ini index fa8ba1c2a6..e0d373e232 100644 --- a/data/locale/fr-FR.ini +++ b/data/locale/fr-FR.ini @@ -153,26 +153,15 @@ Encoder.FFmpeg.AMF.Other.EnforceHRD="Forcer le HRD" Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.NVENC.Preset="Préréglage" -Encoder.FFmpeg.NVENC.Preset.Default="Par défaut" -Encoder.FFmpeg.NVENC.Preset.Slow="Lent" -Encoder.FFmpeg.NVENC.Preset.Medium="Moyen" -Encoder.FFmpeg.NVENC.Preset.Fast="Rapide" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Haute Performance" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Haute Qualité" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="Disque BluRay" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Latence faible" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Latence faible haute performance" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Latence faible haute qualité" -Encoder.FFmpeg.NVENC.Preset.Lossless="Sans pertes" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Sans pertes haute performance" +Encoder.FFmpeg.NVENC.Preset.default="Par défaut" +Encoder.FFmpeg.NVENC.Preset.slow="Lent" +Encoder.FFmpeg.NVENC.Preset.medium="Moyen" +Encoder.FFmpeg.NVENC.Preset.fast="Rapide" +Encoder.FFmpeg.NVENC.Tune="Ajustement" Encoder.FFmpeg.NVENC.RateControl="Options de contrôle du débit" Encoder.FFmpeg.NVENC.RateControl.Mode="Mode" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Paramètre de quantification constante" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Débit variable" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Débit variable haute qualité" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Débit constant" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Débit constant haute qualité" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Débit constant haute qualité à faible délai" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Paramètre de quantification constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Débit constant" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Deux passes" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prédiction (Look-ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames adaptatives" @@ -195,8 +184,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Quantification adaptative temporelle" Encoder.FFmpeg.NVENC.Other="Autres Options" Encoder.FFmpeg.NVENC.Other.BFrames="B-Frames maximum" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Mode de référence B-Frame" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Utiliser uniquement les B-Frames du milieu comme référence" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Utiliser toutes les B-Frames comme référence" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Zéro Latence" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Prédiction pondérée" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Cadres de référence" diff --git a/data/locale/hu-HU.ini b/data/locale/hu-HU.ini index 00ae033aa6..60a4ba06f7 100644 --- a/data/locale/hu-HU.ini +++ b/data/locale/hu-HU.ini @@ -1,4 +1,5 @@ Advanced="Haladó beállítások" +Manual.Open="Kézikönyv megnyitása" Channel.Red="Piros" Channel.Green="Zöld" @@ -24,29 +25,124 @@ State.Automatic="Automatikus" State.Default="Alapértelmezett" UI.Menu="StreamFX" +UI.Menu.Wiki="Olvasd el a Wikin" +UI.Menu.Support="Súgó és támogatás" +UI.Menu.Website="Tovább a StreamFX weboldalra" +UI.Menu.Discord="Csatlakozz a StreamFX-hez Discordon" +UI.Menu.Twitter="Kövesd a StreamFX-et Twitteren" +UI.Menu.YouTube="Iratkozz fel a StreamFX YouTube-jára" UI.Menu.About="StreamFX névjegye" UI.About.Title="StreamFX névjegye" +UI.About.Text="

A StreamFX elkészülését a támogatások teszik lehetővé. Adakozz Patreonon, GitHub Sponzor, vagy PayPalon. Külön köszönet a fordítóknak, akik a Crowdinen segítik a fordításokat! Mind különlegesek vagytok!

" UI.About.Role.Contributor="Közreműködő" UI.About.Role.Translator="Fordító" UI.About.Role.Supporter="Támogató" UI.About.Version="Verzió:" UI.Updater.Dialog.Title="StreamFX verzió %s már elérhető!" +UI.Updater.Dialog.Text="A StreamFX új verziója elérhető." UI.Updater.Dialog.Version.Current="Jelenlegi verzió:" UI.Updater.Dialog.Version.Latest="Legújabb verzió:" UI.Updater.Dialog.Button.Ok="Letöltési oldal megnyitása" UI.Updater.Dialog.Button.Cancel="Emlékeztess később" +UI.Updater.GitHubPermission.Title="A StreamFX-nek szüksége van a hozzájárulásodhoz, hogy a GitHubhoz csatlakozzon!" +UI.Updater.GitHubPermission.Text="A StreamFX a GitHub API-t használja az új kiadások manuális és automatikus letöltséhez.
Kérlek olvasd el a Github Privacy Statement-et, és kattints az 'OK' gombra, ha egyetérteszz, vagy a 'Mégse' gombra, ha nem." UI.Updater.Menu.CheckForUpdates="Frissítések ellenőrzése" UI.Updater.Menu.CheckForUpdates.Automatically="Automatikusan ellenőrizze a frissítéseket" UI.Updater.Menu.Channel="Frissítési csatorna" - +UI.Updater.Menu.Channel.Release="Stabil kiadás" +UI.Updater.Menu.Channel.Testing="Tesztelendő kiadás" + +Encoder.AOM.AV1="AOM AV1 (direkt)" +Encoder.AOM.AV1.Encoder="Kódoló" +Encoder.AOM.AV1.Encoder.Usage="Használat" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Jó minőség" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Valós idejű" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Minden köztes-kocka" +Encoder.AOM.AV1.Encoder.CPUUsage="Processzorhasználat" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Nagyon lassú" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Lassabb" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Lassú" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Közepes" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Gyors" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Gyorsabb" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Nagyon gyors" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Szupergyors" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultragyors" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Borzasztó Gyors" Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Kulcs-kocka" +Encoder.AOM.AV1.KeyFrames.IntervalType="Időtartam egysége" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Képkocka" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Másodperc" +Encoder.AOM.AV1.KeyFrames.Interval="Időköz" +Encoder.AOM.AV1.RateControl="Sebesség vezérlés" +Encoder.AOM.AV1.RateControl.Mode="Mód" +Encoder.AOM.AV1.RateControl.Mode.CBR="Konstans bitsebesség (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Változó bitsebesség (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Korlátozott Minőség (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Állandó Minőség (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Előretekintés" +Encoder.AOM.AV1.RateControl.Limits="Korlátok" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitsebesség" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Bitsebesség alsó korlát" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Bitsebesség felső korlát" +Encoder.AOM.AV1.RateControl.Limits.Quality="Minőség" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimum kvantálás" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maximum kvantálás" Encoder.AOM.AV1.RateControl.Buffer.Size="Méret" - - -Encoder.FFmpeg.NVENC.Preset.Default="Alapértelmezett" +Encoder.FFmpeg.KeyFrames.IntervalType="Időtartam egysége" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Képkocka" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Másodperc" +Encoder.FFmpeg.KeyFrames.Interval="Időköz" + +Encoder.FFmpeg.AMF.Preset="Alapbeállítások" +Encoder.FFmpeg.AMF.Preset.Quality="Minőség" +Encoder.FFmpeg.AMF.RateControl="Sebesség vezérlés beállítások" +Encoder.FFmpeg.AMF.RateControl.Mode="Mód" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Előretekintés" +Encoder.FFmpeg.AMF.RateControl.Limits="Korlátok" + +Encoder.FFmpeg.NVENC.Preset="Alapbeállítások" +Encoder.FFmpeg.NVENC.Preset.default="Alapértelmezett" +Encoder.FFmpeg.NVENC.Preset.slow="Lassú" +Encoder.FFmpeg.NVENC.Preset.medium="Közepes" +Encoder.FFmpeg.NVENC.Preset.fast="Gyors" +Encoder.FFmpeg.NVENC.Preset.hp="Nagy teljesítmény" +Encoder.FFmpeg.NVENC.Preset.hq="Magas minőség" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay Lemez" +Encoder.FFmpeg.NVENC.Preset.ll="Alacsony-késleltetés" +Encoder.FFmpeg.NVENC.Preset.llhq="Alacsony-késleltetés magas minőséggel" +Encoder.FFmpeg.NVENC.Preset.llhp="Alacsony-késleltetés nagy teljesítmény" +Encoder.FFmpeg.NVENC.Preset.lossless="Veszteségmentes" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Veszteségmentes nagy teljesítmény" +Encoder.FFmpeg.NVENC.Preset.p1="Leggyorsabb (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Gyorsabb (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Gyors (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Közepes (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lassú (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Lassabb (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Leglassabb (P7)" +Encoder.FFmpeg.NVENC.Tune="Hangolás" +Encoder.FFmpeg.NVENC.Tune.hq="Magas minőség" +Encoder.FFmpeg.NVENC.Tune.ll="Alacsony-késleltetés" +Encoder.FFmpeg.NVENC.Tune.ull="Nagyon alacsony késleltetés" +Encoder.FFmpeg.NVENC.Tune.lossless="Veszteségmentes" +Encoder.FFmpeg.NVENC.RateControl="Sebesség vezérlés beállítások" +Encoder.FFmpeg.NVENC.RateControl.Mode="Mód" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Változó bitsebesség" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Állandó bitsebesség" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Két fázisú" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Több fázisú" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Egy fázisú" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Két fázisú - negyed felbontáson" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Két fázisú - teljes felbontáson" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Előretekintés" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptív közteskockák" +Encoder.FFmpeg.NVENC.RateControl.Limits="Korlátok" Shader.Shader.File="Fájl" @@ -59,6 +155,7 @@ Shader.Parameter.Texture.Type.Source="Forrás" Shader.Parameter.Texture.File="Fájl" Shader.Parameter.Texture.Source="Forrás" +Filter.AutoFraming.Tracking.Mode="Mód" Filter.Blur.Type="Típus" Filter.Blur.Size="Méret" @@ -75,6 +172,7 @@ Filter.Displacement.File="Fájl" Filter.Transform.Camera="Kamera" +Filter.Transform.Camera.Mode="Mód" Filter.Transform.Position="Pozíció" Filter.Transform.Position.X="X" Filter.Transform.Position.Y="Y" @@ -85,6 +183,8 @@ Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Mód" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Minőség" Source.Mirror.Source="Forrás" diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index ae7fb4d169..72cea44bfc 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -154,27 +154,40 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Delimitatore Unità Di Accesso" Encoder.FFmpeg.NVENC.Preset="Preimpostazioni" -Encoder.FFmpeg.NVENC.Preset.Default="Predefinito" -Encoder.FFmpeg.NVENC.Preset.Slow="Lento" -Encoder.FFmpeg.NVENC.Preset.Medium="Medio" -Encoder.FFmpeg.NVENC.Preset.Fast="Veloce" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Prestazioni Elevate" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Alta Qualità" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="Disco BluRay" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Bassa Latenza" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Bassa Latenza Prestazione Elevata" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Bassa Latenza Alta Qualità" -Encoder.FFmpeg.NVENC.Preset.Lossless="Lossless" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Lossless Prestazioni Elevate" +Encoder.FFmpeg.NVENC.Preset.default="Predefinito" +Encoder.FFmpeg.NVENC.Preset.slow="Lento" +Encoder.FFmpeg.NVENC.Preset.medium="Medio" +Encoder.FFmpeg.NVENC.Preset.fast="Veloce" +Encoder.FFmpeg.NVENC.Preset.hp="Prestazioni Elevate" +Encoder.FFmpeg.NVENC.Preset.hq="Qualità Elevata" +Encoder.FFmpeg.NVENC.Preset.bd="Disco BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Bassa Latenza" +Encoder.FFmpeg.NVENC.Preset.llhq="Bassa Latenza Alta Qualità" +Encoder.FFmpeg.NVENC.Preset.llhp="Bassa Latenza Alte Prestazioni" +Encoder.FFmpeg.NVENC.Preset.lossless="Senza perdita di dati" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Prestazioni Elevate Senza Perdita di Dati" +Encoder.FFmpeg.NVENC.Preset.p1="Più Veloce (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Più Veloce (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Veloce (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Medio (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lento (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Più Lento (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Ancora Più Lento (P7)" +Encoder.FFmpeg.NVENC.Tune="Regolazione" +Encoder.FFmpeg.NVENC.Tune.hq="Qualità Elevata" +Encoder.FFmpeg.NVENC.Tune.ll="Bassa Latenza" +Encoder.FFmpeg.NVENC.Tune.ull="Latenza Ultra Bassa" +Encoder.FFmpeg.NVENC.Tune.lossless="Senza perdita di dati" Encoder.FFmpeg.NVENC.RateControl="Opzioni Frequenza" Encoder.FFmpeg.NVENC.RateControl.Mode="Modalità" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Parametro di quantizzazione costante" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Bitrate Variabile" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Bitrate Variabile Alta Qualità" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Bitrate costante" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Bitrate Costante Alta Qualità" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Bitrate Costante Alta Qualità Basso Ritardo" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parametro di quantizzazione costante" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Bitrate variabile" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Bitrate costante" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Due Passaggi" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Pass Multiplo" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Passo Singolo" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Due passaggi alla risoluzione del trimestre" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Due passaggi a risoluzione completa" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Previsione" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frame Adattivo" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="B-Frames Adattivo" @@ -196,12 +209,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Quantizzazione Adattiva Temporale" Encoder.FFmpeg.NVENC.Other="Altre Opzioni" Encoder.FFmpeg.NVENC.Other.BFrames="B-Frame massimi" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Modalità Di Riferimento B-Frame" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Usa solo B-Frame centrali come riferimento" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Usa tutti i B-Frames come riferimento" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Nessun B-Frames sarà usato come Riferimento" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Solo B-Frames/2 sarà utilizzato come riferimento" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Ogni B-Frame verrà utilizzato come riferimento" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latenza Zero" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Previsione Ponderata" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="P-Frames di non riferimento" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Fotogrammi di riferimento" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Scala di Key-Frame a Basso Ritardo" Blur.Type.Box="Riquadro" Blur.Type.BoxLinear="Riquadro lineare" diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index 5daf2ab037..e1fadb3384 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -47,7 +47,7 @@ UI.Updater.Dialog.Version.Latest="最新バージョン:" UI.Updater.Dialog.Button.Ok="ダウンロードページへ移動" UI.Updater.Dialog.Button.Cancel="後で再通知する" UI.Updater.GitHubPermission.Title="GitHub に接続するため、あなたの承認が必要です!" -UI.Updater.GitHubPermission.Text="手動または自動で最新情報を確認するために、StreamFX は GitHub API を利用します。
Github Privacy Statementをお読みください。 同意しない場合は「OK」を、同意しない場合は「キャンセル」をクリックします。" +UI.Updater.GitHubPermission.Text="手動または自動で最新情報を確認するために、StreamFX は GitHub API を利用します。
Github Privacy Statementをお読みください。 同意する場合は「OK」を、同意しない場合は「キャンセル」をクリックします。" UI.Updater.Menu.CheckForUpdates="アップデートを確認" UI.Updater.Menu.CheckForUpdates.Automatically="アップデートを自動で確認" UI.Updater.Menu.Channel="アップデートチャンネル" @@ -154,26 +154,15 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="アクセスユニットデリミター" Encoder.FFmpeg.NVENC.Preset="プリセット" -Encoder.FFmpeg.NVENC.Preset.Default="デフォルト" -Encoder.FFmpeg.NVENC.Preset.Slow="Slow" -Encoder.FFmpeg.NVENC.Preset.Medium="Medium" -Encoder.FFmpeg.NVENC.Preset.Fast="Fast" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="ハイパフォーマンス" -Encoder.FFmpeg.NVENC.Preset.HighQuality="高品質" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="ブルーレイディスク" -Encoder.FFmpeg.NVENC.Preset.LowLatency="低遅延" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="低遅延ハイパフォーマンス" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="低遅延高品質" -Encoder.FFmpeg.NVENC.Preset.Lossless="ロスレス" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="ロスレス ハイパフォーマンス" +Encoder.FFmpeg.NVENC.Preset.default="デフォルト" +Encoder.FFmpeg.NVENC.Preset.slow="Slow" +Encoder.FFmpeg.NVENC.Preset.medium="Medium" +Encoder.FFmpeg.NVENC.Preset.fast="Fast" +Encoder.FFmpeg.NVENC.Tune="Tune" Encoder.FFmpeg.NVENC.RateControl="レートコントロールオプション" Encoder.FFmpeg.NVENC.RateControl.Mode="モード" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="固定量子化パラメータ" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="可変ビットレート" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="高品質可変ビットレート" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="固定ビットレート" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="高品質固定ビットレート" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="低遅延高品質固定ビットレート" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="固定量子化パラメータ" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="固定ビットレート" Encoder.FFmpeg.NVENC.RateControl.TwoPass="2パス" Encoder.FFmpeg.NVENC.RateControl.LookAhead="先読み" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="適応I-フレーム" @@ -196,8 +185,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="時間適応量子化" Encoder.FFmpeg.NVENC.Other="その他のオプション" Encoder.FFmpeg.NVENC.Other.BFrames="最大B-フレーム" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-フレーム参照モード" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="中央B-フレームのみを参照として使用" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="すべてのBフレームを参照として使用" Encoder.FFmpeg.NVENC.Other.ZeroLatency="遅延なし" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="加重予測" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="非参照P-フレーム" diff --git a/data/locale/ko-KR.ini b/data/locale/ko-KR.ini index 6d954890ed..0b9663ded3 100644 --- a/data/locale/ko-KR.ini +++ b/data/locale/ko-KR.ini @@ -51,7 +51,7 @@ Encoder.AOM.AV1.RateControl.Buffer.Size="크기" -Encoder.FFmpeg.NVENC.Preset.Default="기본값" +Encoder.FFmpeg.NVENC.Preset.default="기본값" Blur.Type.Box="박스" Blur.Type.BoxLinear="박스 선형" diff --git a/data/locale/nl-NL.ini b/data/locale/nl-NL.ini index b38ab7584c..847815af58 100644 --- a/data/locale/nl-NL.ini +++ b/data/locale/nl-NL.ini @@ -154,26 +154,15 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Toegangseenheid Scheidingsteken" Encoder.FFmpeg.NVENC.Preset="Preset" -Encoder.FFmpeg.NVENC.Preset.Default="Standaard" -Encoder.FFmpeg.NVENC.Preset.Slow="Traag" -Encoder.FFmpeg.NVENC.Preset.Medium="Gemiddeld" -Encoder.FFmpeg.NVENC.Preset.Fast="Snel" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Hoge prestaties" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Hoge kwaliteit" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="BluRay Schijf" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Lage Latentie" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Lage Latency, Hoge Prestaties" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Lage Latentie, Hoge Kwaliteit" -Encoder.FFmpeg.NVENC.Preset.Lossless="Verliesloos" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Verliesloos met Hoge Prestaties" +Encoder.FFmpeg.NVENC.Preset.default="Standaard" +Encoder.FFmpeg.NVENC.Preset.slow="Traag" +Encoder.FFmpeg.NVENC.Preset.medium="Gemiddeld" +Encoder.FFmpeg.NVENC.Preset.fast="Snel" +Encoder.FFmpeg.NVENC.Tune="Afstemmen" Encoder.FFmpeg.NVENC.RateControl="Opties voor Snelheidsregeling" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Constante Kwantisatie Parameter" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Variabele Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Hoge kwaliteit, Variabele Bitsnelheid" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Constante Bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Hoge kwaliteit Constante Bitsnelheid" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Lage Vertraging, Hoge kwaliteit, Constante Bitsnelheid" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Constante Kwantisatie Parameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Constante Bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Tweemaal" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vooruitkijk" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptieve I-Frames" @@ -196,8 +185,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Tijdelijke Adaptieve Kwantificering" Encoder.FFmpeg.NVENC.Other="Andere opties" Encoder.FFmpeg.NVENC.Other.BFrames="Maximale B-Frames" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Frame Referentie Modus" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Gebruik alleen middelste B-frames als referentie" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Gebruik alle B-frames als referentie" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nul Latentie" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Gewogen Voorspelling" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Niet-Referentie Frames" diff --git a/data/locale/no-NO.ini b/data/locale/no-NO.ini index 839cc68ba1..50cf4f8ed8 100644 --- a/data/locale/no-NO.ini +++ b/data/locale/no-NO.ini @@ -68,14 +68,14 @@ Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Konstant bitrate" Encoder.FFmpeg.AMF.RateControl.LookAhead="Look ahead" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Bufferstørrelse" -Encoder.FFmpeg.NVENC.Preset.Default="Standard" -Encoder.FFmpeg.NVENC.Preset.Slow="Treg" -Encoder.FFmpeg.NVENC.Preset.Medium="Medium" -Encoder.FFmpeg.NVENC.Preset.Fast="Rask" +Encoder.FFmpeg.NVENC.Preset.default="Standard" +Encoder.FFmpeg.NVENC.Preset.slow="Treg" +Encoder.FFmpeg.NVENC.Preset.medium="Medium" +Encoder.FFmpeg.NVENC.Preset.fast="Rask" Encoder.FFmpeg.NVENC.RateControl="Alternativer for Bitrate" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Konstant Kvantisjonsparameter" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Konstant bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Konstant Kvantisjonsparameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstant bitrate" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Look ahead" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Bufferstørrelse" diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index 88ac2eb2dd..1c61ed5aac 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -153,26 +153,15 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Ogranicznik jednostki dostępu" Encoder.FFmpeg.NVENC.Preset="Preset" -Encoder.FFmpeg.NVENC.Preset.Default="Domyślne" -Encoder.FFmpeg.NVENC.Preset.Slow="Wolne" -Encoder.FFmpeg.NVENC.Preset.Medium="Średnie" -Encoder.FFmpeg.NVENC.Preset.Fast="Szybkie" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Wysoka wydajność" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Wysoka jakość" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="Dysk BluRay" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Niskie opóźnienie" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Niskie opóźnienie - wysoka wydajność" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Niskie opóźnienie - wysoka jakość" -Encoder.FFmpeg.NVENC.Preset.Lossless="Bezstratny" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Bezstratny - wysoka wydajność" +Encoder.FFmpeg.NVENC.Preset.default="Domyślne" +Encoder.FFmpeg.NVENC.Preset.slow="Wolne" +Encoder.FFmpeg.NVENC.Preset.medium="Średnie" +Encoder.FFmpeg.NVENC.Preset.fast="Szybkie" +Encoder.FFmpeg.NVENC.Tune="Dostrajanie" Encoder.FFmpeg.NVENC.RateControl="Opcje kontroli szybkości" Encoder.FFmpeg.NVENC.RateControl.Mode="Tryb pracy" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Stały parametr kwantyzacji" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Zmienny bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Wysoka jakość - zmienny bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Stały bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Wysoka jakość - stały bitrate" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Małe opóźnienie - wysoka jakość - stały bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Stały parametr kwantyzacji" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Stały bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dwa przejścia" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prognozowany (Look Ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptacyjne klatki I-Frame" @@ -195,8 +184,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Czasowa kwantyzacja adaptacyjna" Encoder.FFmpeg.NVENC.Other="Inne opcje" Encoder.FFmpeg.NVENC.Other.BFrames="Maksymalna liczba klatek B-Frame" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Tryb odniesień do B-Frame" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Użyj tylko środkowych klatek B-Frame jako odniesienia" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Użyj wszystkich klatek B-Frame jako odniesienia" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Brak opóźnień" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predykcja ważona" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Niereferencyjne klatki P-Frame" diff --git a/data/locale/pt-BR.ini b/data/locale/pt-BR.ini index 16edb07fb9..a9ce0672da 100644 --- a/data/locale/pt-BR.ini +++ b/data/locale/pt-BR.ini @@ -25,7 +25,12 @@ State.Automatic="Automático" State.Default="Padrão" UI.Menu="StreamFX" +UI.Menu.Wiki="Leia a Wiki" +UI.Menu.Support="Ajuda & Suporte" +UI.Menu.Website="Visite o site StreamFX" UI.Menu.Discord="Junte-se ao Discord do StreamFX" +UI.Menu.Twitter="Siga o StreamFX no Twitter" +UI.Menu.YouTube="Assine o StreamFX no YouTube" UI.Menu.About="Sobre o StreamFX" UI.About.Title="Sobre o StreamFX" @@ -49,9 +54,22 @@ UI.Updater.Menu.Channel="Atualizar Canal" UI.Updater.Menu.Channel.Release="Estável" UI.Updater.Menu.Channel.Testing="Testes" +Encoder.AOM.AV1="AOM AV1 (direto)" +Encoder.AOM.AV1.Encoder="Codificador" +Encoder.AOM.AV1.Encoder.Usage="Utilização" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Tempo real" +Encoder.AOM.AV1.Encoder.CPUUsage="Uso da CPU" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Muito Lento" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Mais Lento" Encoder.AOM.AV1.Encoder.CPUUsage.3="Lento" Encoder.AOM.AV1.Encoder.CPUUsage.4="Médio" Encoder.AOM.AV1.Encoder.CPUUsage.5="Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Mais rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Muito Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Insanamente Rápido" Encoder.AOM.AV1.Encoder.Profile="Perfil" Encoder.AOM.AV1.KeyFrames.IntervalType="Tipo de Intervalo" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Quadros" @@ -61,17 +79,26 @@ Encoder.AOM.AV1.RateControl.Mode="Modo" Encoder.AOM.AV1.RateControl.Limits="Limites" Encoder.AOM.AV1.RateControl.Limits.Quality="Qualidade" Encoder.AOM.AV1.RateControl.Buffer.Size="Tamanho" +Encoder.AOM.AV1.Advanced="Avançado" +Encoder.AOM.AV1.Advanced.Tune.Content="Conteúdo" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Configurações Personalizadas" +Encoder.FFmpeg.GPU="GPU" Encoder.FFmpeg.KeyFrames.IntervalType="Tipo de Intervalo" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Quadros" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Segundos" Encoder.FFmpeg.KeyFrames.Interval="Intervalo" Encoder.FFmpeg.AMF.Preset="Modelo" +Encoder.FFmpeg.AMF.Preset.Speed="Velocidade" +Encoder.FFmpeg.AMF.Preset.Balanced="Balanceado" Encoder.FFmpeg.AMF.Preset.Quality="Qualidade" Encoder.FFmpeg.AMF.RateControl="Opções do Controle de Taxa" Encoder.FFmpeg.AMF.RateControl.Mode="Modo" Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Parâmetro de Quantização Constante" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Taxa de Bits Variável (Pico Restringido)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Taxa de Bits Variável (Latência Restringida)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Taxa de Bits Constante" Encoder.FFmpeg.AMF.RateControl.LookAhead="Olhar a Frente" Encoder.FFmpeg.AMF.RateControl.Limits="Limites" @@ -87,14 +114,14 @@ Encoder.FFmpeg.AMF.Other.BFrames="Máximo de B-Frames" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Quadros de Referência" Encoder.FFmpeg.NVENC.Preset="Modelo" -Encoder.FFmpeg.NVENC.Preset.Default="Padrão" -Encoder.FFmpeg.NVENC.Preset.Slow="Lento" -Encoder.FFmpeg.NVENC.Preset.Medium="Médio" -Encoder.FFmpeg.NVENC.Preset.Fast="Rápido" +Encoder.FFmpeg.NVENC.Preset.default="Padrão" +Encoder.FFmpeg.NVENC.Preset.slow="Lento" +Encoder.FFmpeg.NVENC.Preset.medium="Médio" +Encoder.FFmpeg.NVENC.Preset.fast="Rápido" Encoder.FFmpeg.NVENC.RateControl="Opções do Controle de Taxa" Encoder.FFmpeg.NVENC.RateControl.Mode="Modo" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Parâmetro de Quantização Constante" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Taxa de Bits Constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parâmetro de Quantização Constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Taxa de Bits Constante" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Olhar a Frente" Encoder.FFmpeg.NVENC.RateControl.Limits="Limites" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Tamanho do Buffer" @@ -106,6 +133,7 @@ Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Frame QP" Encoder.FFmpeg.NVENC.Other="Outras Opções" Encoder.FFmpeg.NVENC.Other.BFrames="Máximo de B-Frames" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latência zero" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Quadros de Referência" Blur.Type.Box="Caixa" @@ -139,6 +167,7 @@ Transition.Shader="Shader" Filter.AutoFraming.Tracking.Mode="Modo" Filter.AutoFraming.Framing.Offset="Deslocamento" +Filter.AutoFraming.Framing.AspectRatio="Proporção de tela" Filter.Blur="Desfoque" Filter.Blur.Type="Tipo" @@ -295,11 +324,16 @@ Filter.Transform.Rotation.Order.YXZ="Largura, Altura, Profundidade" Filter.Transform.Rotation.Order.YZX="Largura, Profundidade, Altura" Filter.Transform.Rotation.Order.ZXY="Profundidade, Altura, Largura" Filter.Transform.Rotation.Order.ZYX="Profundidade, Largura, Altura" +Filter.Transform.Corners.TopLeft="Superior Esquerdo" +Filter.Transform.Corners.TopRight="Superior Direito" +Filter.Transform.Corners.BottomLeft="Inferior Esquerdo" +Filter.Transform.Corners.BottomRight="Inferior Direito" Filter.Transform.Mipmapping="Habilitar Mip-Maps" Filter.Upscaling.NVIDIA.SuperRes.Scale="Escala" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Modo" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Performance" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Qualidade" Source.Mirror="Espelhamento de Fonte" @@ -315,9 +349,11 @@ Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Quadrafônico com LFE" Source.Mirror.Source.Audio.Layout.Surround="Surround" Source.Mirror.Source.Audio.Layout.FullSurround="Surround Completo" +Codec.AV1="AV1" Codec.AV1.Profile="Perfil" Codec.AV1.Profile.Main="Principal" Codec.AV1.Profile.High="Alto" +Codec.AV1.Profile.Professional="Profissional" Codec.H264="H264" Codec.H264.Profile="Perfil" diff --git a/data/locale/pt-PT.ini b/data/locale/pt-PT.ini index 1720ed2cfa..143ffb8dae 100644 --- a/data/locale/pt-PT.ini +++ b/data/locale/pt-PT.ini @@ -47,10 +47,10 @@ Encoder.FFmpeg.KeyFrames.Interval="Intervalo" Encoder.FFmpeg.AMF.RateControl.Mode="Modo" -Encoder.FFmpeg.NVENC.Preset.Default="Padrão" -Encoder.FFmpeg.NVENC.Preset.Slow="Lento" -Encoder.FFmpeg.NVENC.Preset.Medium="Médio" -Encoder.FFmpeg.NVENC.Preset.Fast="Rápido" +Encoder.FFmpeg.NVENC.Preset.default="Padrão" +Encoder.FFmpeg.NVENC.Preset.slow="Lento" +Encoder.FFmpeg.NVENC.Preset.medium="Médio" +Encoder.FFmpeg.NVENC.Preset.fast="Rápido" Encoder.FFmpeg.NVENC.RateControl.Mode="Modo" Blur.Type.Box="Região" diff --git a/data/locale/ro-RO.ini b/data/locale/ro-RO.ini index 91bdcee49a..da6ae89cea 100644 --- a/data/locale/ro-RO.ini +++ b/data/locale/ro-RO.ini @@ -84,14 +84,35 @@ Encoder.FFmpeg.AMF.Other="Alte opțiuni" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Cadre de referință" Encoder.FFmpeg.NVENC.Preset="Presetare" -Encoder.FFmpeg.NVENC.Preset.Default="Prestabilit" -Encoder.FFmpeg.NVENC.Preset.Slow="Încet" -Encoder.FFmpeg.NVENC.Preset.Medium="Mediu" -Encoder.FFmpeg.NVENC.Preset.Fast="Rapid" +Encoder.FFmpeg.NVENC.Preset.default="Prestabilit" +Encoder.FFmpeg.NVENC.Preset.slow="Încet" +Encoder.FFmpeg.NVENC.Preset.medium="Mediu" +Encoder.FFmpeg.NVENC.Preset.fast="Rapid" +Encoder.FFmpeg.NVENC.Preset.hp="Performanță sporită" +Encoder.FFmpeg.NVENC.Preset.hq="Calitate Înaltă" +Encoder.FFmpeg.NVENC.Preset.bd="Disc BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Latență redusă" +Encoder.FFmpeg.NVENC.Preset.llhq="Latență redusă Calitate Înaltă" +Encoder.FFmpeg.NVENC.Preset.llhp="Performanță înaltă Latență scăzută" +Encoder.FFmpeg.NVENC.Preset.lossless="Fără pierderi" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Performanță înaltă fără pierderi" +Encoder.FFmpeg.NVENC.Preset.p1="Cel mai rapid (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Mai rapid (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Rapid (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Mediu (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lent (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Mai lent (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Cel mai lent (P7)" +Encoder.FFmpeg.NVENC.Tune="Reglaj" +Encoder.FFmpeg.NVENC.Tune.hq="Calitate Înaltă" +Encoder.FFmpeg.NVENC.Tune.ll="Latență redusă" +Encoder.FFmpeg.NVENC.Tune.ull="Latență Ultra scăzută" +Encoder.FFmpeg.NVENC.Tune.lossless="Fără pierderi" Encoder.FFmpeg.NVENC.RateControl="Opţiuni de control al ratei" Encoder.FFmpeg.NVENC.RateControl.Mode="Mod" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Parametru de cuantizare constantă" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Debit binar constant" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parametru de cuantizare constantă" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="VBR (Rată de biți variabilă)" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Debit binar constant" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prognozeaza" Encoder.FFmpeg.NVENC.RateControl.Limits="Limite" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Dimensiune tampon" diff --git a/data/locale/ru-RU.ini b/data/locale/ru-RU.ini index 2d51f94df1..0962e1c682 100644 --- a/data/locale/ru-RU.ini +++ b/data/locale/ru-RU.ini @@ -154,27 +154,40 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Разделитель единиц доступа" Encoder.FFmpeg.NVENC.Preset="Пресет" -Encoder.FFmpeg.NVENC.Preset.Default="По умолчанию" -Encoder.FFmpeg.NVENC.Preset.Slow="Медленно" -Encoder.FFmpeg.NVENC.Preset.Medium="Средне" -Encoder.FFmpeg.NVENC.Preset.Fast="Быстро" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="Высокая производительность" -Encoder.FFmpeg.NVENC.Preset.HighQuality="Высокое качество" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="Диск Blu-Ray" -Encoder.FFmpeg.NVENC.Preset.LowLatency="Низкая задержка" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="Низкая задержка с приоритетом производительности" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Низкая задержка с приоритетом качества" -Encoder.FFmpeg.NVENC.Preset.Lossless="Без потерь" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="Без потерь с приоритетом производительности" +Encoder.FFmpeg.NVENC.Preset.default="По умолчанию" +Encoder.FFmpeg.NVENC.Preset.slow="Медленно" +Encoder.FFmpeg.NVENC.Preset.medium="Средне" +Encoder.FFmpeg.NVENC.Preset.fast="Быстро" +Encoder.FFmpeg.NVENC.Preset.hp="Высокая производительность" +Encoder.FFmpeg.NVENC.Preset.hq="Высокое качество" +Encoder.FFmpeg.NVENC.Preset.bd="Диск Blu-Ray" +Encoder.FFmpeg.NVENC.Preset.ll="Низкая задержка" +Encoder.FFmpeg.NVENC.Preset.llhq="Низкая задержка с приоритетом качества" +Encoder.FFmpeg.NVENC.Preset.llhp="Низкая задержка с приоритетом производительности" +Encoder.FFmpeg.NVENC.Preset.lossless="Без потерь" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Без потерь с приоритетом производительности" +Encoder.FFmpeg.NVENC.Preset.p1="Самый быстрый (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Быстрее (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Быстрый (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Средний (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Медленный (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Медленнее (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Очень медленно (P7)" +Encoder.FFmpeg.NVENC.Tune="Настройка" +Encoder.FFmpeg.NVENC.Tune.hq="Высокое качество" +Encoder.FFmpeg.NVENC.Tune.ll="Низкая задержка" +Encoder.FFmpeg.NVENC.Tune.ull="Наименьшая задержка" +Encoder.FFmpeg.NVENC.Tune.lossless="Без потерь" Encoder.FFmpeg.NVENC.RateControl="Параметры управления битрейтом" Encoder.FFmpeg.NVENC.RateControl.Mode="Режим" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="Постоянный параметр квантования" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="Переменный битрейт" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Переменный битрейт с приоритетом качества" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Постоянный битрейт" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Постоянный битрейт с приоритетом качества" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Постоянный битрейт с низкой задержкой с приоритетом качества" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Постоянный параметр квантования" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Переменный битрейт" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Постоянный битрейт" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Двухпроходное кодирование" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Многопроходное кодирование" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Один проход" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Два прохода при четверти разрешения" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Два прохода в полном разрешенит" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Предугадывание" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Адаптивные I-кадры" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Адаптивные B-кадры" @@ -196,12 +209,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Временнóе адаптивное ква Encoder.FFmpeg.NVENC.Other="Другие настройки" Encoder.FFmpeg.NVENC.Other.BFrames="Максимальное количество B-кадров" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Режим Опорных B-кадров" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="Использовать только средние B-кадры как опорные" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="Использовать все B-кадры как опорные" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Не использовать B-кадры в качестве опорных" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Только половина B-кадров будет использована в качестве опорных" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Каждый B-кадр будет использоваться как опорный" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Нулевая задержка" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Взвешенное прогнозирование" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Неопорные P-Кадры" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Опорные кадры" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Масштабирование ключевых кадров с низкой задержкой" Blur.Type.Box="Бокс" Blur.Type.BoxLinear="Линейное боксовое" diff --git a/data/locale/th-TH.ini b/data/locale/th-TH.ini index 28adcdbdb1..c75aeadc52 100644 --- a/data/locale/th-TH.ini +++ b/data/locale/th-TH.ini @@ -47,9 +47,9 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="วินาที" Encoder.FFmpeg.AMF.Preset.Quality="คุณภาพ" Encoder.FFmpeg.AMF.RateControl.Mode="รูปแบบ" -Encoder.FFmpeg.NVENC.Preset.Default="ค่าเริ่มต้น" -Encoder.FFmpeg.NVENC.Preset.Slow="ช้า" -Encoder.FFmpeg.NVENC.Preset.Fast="รวดเร็ว" +Encoder.FFmpeg.NVENC.Preset.default="ค่าเริ่มต้น" +Encoder.FFmpeg.NVENC.Preset.slow="ช้า" +Encoder.FFmpeg.NVENC.Preset.fast="รวดเร็ว" Encoder.FFmpeg.NVENC.RateControl.Mode="รูปแบบ" Blur.Type.Box="กล่อง" diff --git a/data/locale/tr-TR.ini b/data/locale/tr-TR.ini index d2024a1791..a9e6f8b9bc 100644 --- a/data/locale/tr-TR.ini +++ b/data/locale/tr-TR.ini @@ -118,17 +118,13 @@ Encoder.FFmpeg.AMF.Other.BFrames="Maksimum B-Kareler" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referans Kareler" Encoder.FFmpeg.NVENC.Preset="Hazır Ayar" -Encoder.FFmpeg.NVENC.Preset.Default="Varsayılan" -Encoder.FFmpeg.NVENC.Preset.Slow="Yavaş" -Encoder.FFmpeg.NVENC.Preset.Medium="Orta" -Encoder.FFmpeg.NVENC.Preset.Fast="Hızlı" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="Düşük Gecikme Yüksek Kalite" +Encoder.FFmpeg.NVENC.Preset.default="Varsayılan" +Encoder.FFmpeg.NVENC.Preset.slow="Yavaş" +Encoder.FFmpeg.NVENC.Preset.medium="Orta" +Encoder.FFmpeg.NVENC.Preset.fast="Hızlı" Encoder.FFmpeg.NVENC.RateControl="Oran Kontrol Seçenekleri" Encoder.FFmpeg.NVENC.RateControl.Mode="Mod" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="Yüksek Kalite Değişken Bit Hızı" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="Sabit Bit Hızı (CBR)" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="Yüksek Kalite Sabit Bit Hızı" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="Düşük Gecikmeli Yüksek Kalite Sabit Bit Hızı" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Sabit Bit Hızı (CBR)" Encoder.FFmpeg.NVENC.RateControl.Limits="Sınırlar" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Ara Bellek Boyutu" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Hedef Bit Hızı" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index c8ce665253..b67633560c 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -154,26 +154,15 @@ Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="访问单元分隔符" Encoder.FFmpeg.NVENC.Preset="预设" -Encoder.FFmpeg.NVENC.Preset.Default="默认" -Encoder.FFmpeg.NVENC.Preset.Slow="慢速" -Encoder.FFmpeg.NVENC.Preset.Medium="中等" -Encoder.FFmpeg.NVENC.Preset.Fast="快速" -Encoder.FFmpeg.NVENC.Preset.HighPerformance="高性能" -Encoder.FFmpeg.NVENC.Preset.HighQuality="高质量" -Encoder.FFmpeg.NVENC.Preset.BluRayDisc="蓝光光盘" -Encoder.FFmpeg.NVENC.Preset.LowLatency="低延迟" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighPerformance="低延迟高性能" -Encoder.FFmpeg.NVENC.Preset.LowLatencyHighQuality="低延迟高质量" -Encoder.FFmpeg.NVENC.Preset.Lossless="无损" -Encoder.FFmpeg.NVENC.Preset.LosslessHighPerformance="无损高性能" +Encoder.FFmpeg.NVENC.Preset.default="默认" +Encoder.FFmpeg.NVENC.Preset.slow="慢速" +Encoder.FFmpeg.NVENC.Preset.medium="中等" +Encoder.FFmpeg.NVENC.Preset.fast="快速" +Encoder.FFmpeg.NVENC.Tune="微调(Tune)" Encoder.FFmpeg.NVENC.RateControl="速率控制选项" Encoder.FFmpeg.NVENC.RateControl.Mode="模式" -Encoder.FFmpeg.NVENC.RateControl.Mode.CQP="恒量化参数" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR="可变比特率" -Encoder.FFmpeg.NVENC.RateControl.Mode.VBR_HQ="高质量可变比特率" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR="恒定比特率" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_HQ="高质量恒定比特率" -Encoder.FFmpeg.NVENC.RateControl.Mode.CBR_LD_HQ="低延迟高质量恒定比特率" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="恒量化参数" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="恒定比特率" Encoder.FFmpeg.NVENC.RateControl.TwoPass="双通道" Encoder.FFmpeg.NVENC.RateControl.LookAhead="预测(Look Ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="自适应 I 帧" @@ -196,8 +185,6 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="时间自适应量化" Encoder.FFmpeg.NVENC.Other="其它选项" Encoder.FFmpeg.NVENC.Other.BFrames="最大 B 帧" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B 帧参考模式" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Middle="仅使用中位 B 帧作为参考" -Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.Each="使用所有 B 帧作为参考" Encoder.FFmpeg.NVENC.Other.ZeroLatency="零延迟" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="加权预测" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="非参考 P 帧" diff --git a/data/locale/zh-TW.ini b/data/locale/zh-TW.ini index 267824d813..95e8158497 100644 --- a/data/locale/zh-TW.ini +++ b/data/locale/zh-TW.ini @@ -56,7 +56,7 @@ UI.Updater.Menu.Channel.Testing="測試版" -Encoder.FFmpeg.NVENC.Preset.Default="預設" +Encoder.FFmpeg.NVENC.Preset.default="預設" Blur.Type.Box="均值模糊" Blur.Type.BoxLinear="線性均值模糊" From 378f2b3f0e1b73efc9b105d83b92ec7a7e0294bf Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 20 Feb 2022 19:41:55 +0100 Subject: [PATCH 006/164] ffmpeg/tools: Improve helper functions for AVOption lists --- source/ffmpeg/tools.cpp | 41 +++++++---------------------------------- source/ffmpeg/tools.hpp | 7 ++----- 2 files changed, 9 insertions(+), 39 deletions(-) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 597222c24d..4e454177f7 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -209,8 +209,8 @@ bool tools::avoption_exists(const void* obj, std::string_view name) return false; } -void tools::avoption_list_add_entries_unnamed(const void* obj, std::string_view unit, obs_property_t* prop, - std::function filter) +void tools::avoption_list_add_entries(const void* obj, std::string_view unit, + std::function inserter) { for (const AVOption* opt = nullptr; (opt = av_opt_next(obj, opt)) != nullptr;) { // Skip all irrelevant options. @@ -225,38 +225,11 @@ void tools::avoption_list_add_entries_unnamed(const void* obj, std::string_view if (opt->flags & AV_OPT_FLAG_DEPRECATED) continue; - if (filter && filter(opt)) - continue; - - // Generate name and add to list. - obs_property_list_add_int(prop, opt->name, opt->default_val.i64); - } -} - -void tools::avoption_list_add_entries(const void* obj, std::string_view unit, obs_property_t* prop, - std::string_view prefix, std::function filter) -{ - for (const AVOption* opt = nullptr; (opt = av_opt_next(obj, opt)) != nullptr;) { - // Skip all irrelevant options. - if (!opt->unit) - continue; - if (opt->unit != unit) - continue; - if (opt->name == unit) - continue; - - // Skip any deprecated options. - if (opt->flags & AV_OPT_FLAG_DEPRECATED) - continue; - - // Skip based on filter function. - if (filter && filter(opt)) - continue; - - // Generate name and add to list. - char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", prefix.data(), opt->name); - obs_property_list_add_int(prop, D_TRANSLATE(buffer), opt->default_val.i64); + if (inserter) { + inserter(opt); + } else { + break; + } } } diff --git a/source/ffmpeg/tools.hpp b/source/ffmpeg/tools.hpp index 51d06e96fd..584dc7a13e 100644 --- a/source/ffmpeg/tools.hpp +++ b/source/ffmpeg/tools.hpp @@ -85,10 +85,7 @@ namespace streamfx::ffmpeg::tools { const char* avoption_name_from_unit_value(const void* obj, std::string_view unit, int64_t value); - void avoption_list_add_entries_unnamed(const void* obj, std::string_view unit, obs_property_t* prop, - std::function filter = nullptr); - - void avoption_list_add_entries(const void* obj, std::string_view unit, obs_property_t* prop, - std::string_view prefix, std::function filter = nullptr); + void avoption_list_add_entries(const void* obj, std::string_view unit, + std::function inserter = nullptr); } // namespace streamfx::ffmpeg::tools From 03b16786e7450e61549e3a53c043ac2ff461c9e3 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 20 Feb 2022 19:45:41 +0100 Subject: [PATCH 007/164] encoders/ffmpeg/nvenc: Improve compatibility with FFmpeg Replaces some very specific code with generic support for FFmpeg, which should last us much longer than the old way. Also improves the migration of settings, which wasn't quite working with the previous way. --- .../encoders/handlers/nvenc_h264_handler.cpp | 60 ++++--- .../encoders/handlers/nvenc_hevc_handler.cpp | 88 ++++++++--- source/encoders/handlers/nvenc_shared.cpp | 149 +++++++++++------- 3 files changed, 201 insertions(+), 96 deletions(-) diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index 3eeedecd54..d395c418b2 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -56,8 +56,8 @@ void nvenc_h264_handler::get_defaults(obs_data_t* settings, const AVCodec* codec { nvenc::get_defaults(settings, codec, context); - obs_data_set_default_int(settings, ST_KEY_PROFILE, static_cast(profile::HIGH)); - obs_data_set_default_int(settings, ST_KEY_LEVEL, static_cast(level::UNKNOWN)); + obs_data_set_default_string(settings, ST_KEY_PROFILE, ""); + obs_data_set_default_string(settings, ST_KEY_LEVEL, "auto"); } bool nvenc_h264_handler::has_keyframe_support(ffmpeg_factory*) @@ -94,13 +94,11 @@ void nvenc_h264_handler::update(obs_data_t* settings, const AVCodec* codec, AVCo nvenc::update(settings, codec, context); if (!context->internal) { - if (auto value = obs_data_get_int(settings, ST_KEY_PROFILE); value > -1) { - av_opt_set_int(context->priv_data, "profile", value, AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_PROFILE); v && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "profile", v, AV_OPT_SEARCH_CHILDREN); } - if (auto value = obs_data_get_int(settings, ST_KEY_LEVEL); value > -1) { - av_opt_set_int(context->priv_data, "level", value, AV_OPT_SEARCH_CHILDREN); - } else { - av_opt_set(context->priv_data, "level", "auto", AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_LEVEL); v && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "level", v, AV_OPT_SEARCH_CHILDREN); } } } @@ -140,20 +138,26 @@ void nvenc_h264_handler::get_encoder_properties(obs_properties_t* props, const A { auto p = obs_properties_add_list(grp, ST_KEY_PROFILE, D_TRANSLATE(S_CODEC_H264_PROFILE), - OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "profile", p, S_CODEC_H264_PROFILE); + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING); + obs_property_list_add_string(p, D_TRANSLATE(S_STATE_DEFAULT), ""); + streamfx::ffmpeg::tools::avoption_list_add_entries( + context->priv_data, "profile", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_H264_PROFILE, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } { auto p = obs_properties_add_list(grp, ST_KEY_LEVEL, D_TRANSLATE(S_CODEC_H264_LEVEL), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_AUTOMATIC), 0); - streamfx::ffmpeg::tools::avoption_list_add_entries_unnamed(context->priv_data, "level", p, - [](const AVOption* opt) { - if (opt->default_val.i64 == 0) - return true; - return false; - }); + OBS_COMBO_FORMAT_STRING); + + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "level", [&p](const AVOption* opt) { + if (opt->default_val.i64 == 0) { + obs_property_list_add_string(p, D_TRANSLATE(S_STATE_AUTOMATIC), "auto"); + } else { + obs_property_list_add_string(p, opt->name, opt->name); + } + }); } } @@ -173,6 +177,24 @@ void streamfx::encoder::ffmpeg::handler::nvenc_h264_handler::migrate(obs_data_t* const AVCodec* codec, AVCodecContext* context) { nvenc::migrate(settings, version, codec, context); + + if (version < STREAMFX_MAKE_VERSION(0, 11, 1, 0)) { + // Profile + if (auto v = obs_data_get_int(settings, ST_KEY_PROFILE); v != -1) { + if (!obs_data_has_user_value(settings, ST_KEY_PROFILE)) + v = 3; + + std::map preset{ + {0, "baseline"}, {1, "baseline"}, {2, "main"}, {3, "high"}, {4, "high444p"}, + }; + if (auto k = preset.find(v); k != preset.end()) { + obs_data_set_string(settings, ST_KEY_PROFILE, k->second.data()); + } + } + + // Level + obs_data_set_string(settings, ST_KEY_LEVEL, "auto"); + } } bool nvenc_h264_handler::supports_reconfigure(ffmpeg_factory* instance, bool& threads, bool& gpu, bool& keyframes) diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index 5c3cb7ba88..7c8915cdbe 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -53,9 +53,9 @@ void nvenc_hevc_handler::get_defaults(obs_data_t* settings, const AVCodec* codec { nvenc::get_defaults(settings, codec, context); - obs_data_set_default_int(settings, ST_KEY_PROFILE, static_cast(profile::MAIN)); - obs_data_set_default_int(settings, ST_KEY_TIER, static_cast(profile::MAIN)); - obs_data_set_default_int(settings, ST_KEY_LEVEL, static_cast(level::UNKNOWN)); + obs_data_set_default_string(settings, ST_KEY_PROFILE, ""); + obs_data_set_default_string(settings, ST_KEY_TIER, ""); + obs_data_set_default_string(settings, ST_KEY_LEVEL, "auto"); } bool nvenc_hevc_handler::has_keyframe_support(ffmpeg_factory*) @@ -92,16 +92,14 @@ void nvenc_hevc_handler::update(obs_data_t* settings, const AVCodec* codec, AVCo nvenc::update(settings, codec, context); if (!context->internal) { - if (auto v = obs_data_get_int(settings, ST_KEY_PROFILE); v > -1) { - av_opt_set_int(context->priv_data, "profile", v, AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_PROFILE); v && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "profile", v, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_int(settings, ST_KEY_TIER); v > -1) { - av_opt_set_int(context->priv_data, "tier", v, AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_TIER); v && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "tier", v, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_int(settings, ST_KEY_LEVEL); v > -1) { - av_opt_set_int(context->priv_data, "level", v, AV_OPT_SEARCH_CHILDREN); - } else { - av_opt_set(context->priv_data, "level", "auto", AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_LEVEL); v && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "level", v, AV_OPT_SEARCH_CHILDREN); } } } @@ -143,26 +141,36 @@ void nvenc_hevc_handler::get_encoder_properties(obs_properties_t* props, const A { auto p = obs_properties_add_list(grp, ST_KEY_PROFILE, D_TRANSLATE(S_CODEC_HEVC_PROFILE), - OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING); obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "profile", p, S_CODEC_HEVC_PROFILE); + streamfx::ffmpeg::tools::avoption_list_add_entries( + context->priv_data, "profile", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_HEVC_PROFILE, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } { auto p = obs_properties_add_list(grp, ST_KEY_TIER, D_TRANSLATE(S_CODEC_HEVC_TIER), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); + OBS_COMBO_FORMAT_STRING); obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tier", p, S_CODEC_HEVC_TIER); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tier", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_HEVC_TIER, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } { auto p = obs_properties_add_list(grp, ST_KEY_LEVEL, D_TRANSLATE(S_CODEC_HEVC_LEVEL), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_AUTOMATIC), 0); - streamfx::ffmpeg::tools::avoption_list_add_entries_unnamed(context->priv_data, "level", p, - [](const AVOption* opt) { - if (opt->default_val.i64 == 0) - return true; - return false; - }); + OBS_COMBO_FORMAT_STRING); + + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "level", [&p](const AVOption* opt) { + if (opt->default_val.i64 == 0) { + obs_property_list_add_string(p, D_TRANSLATE(S_STATE_AUTOMATIC), "auto"); + } else { + obs_property_list_add_string(p, opt->name, opt->name); + } + }); } } @@ -182,6 +190,40 @@ void streamfx::encoder::ffmpeg::handler::nvenc_hevc_handler::migrate(obs_data_t* const AVCodec* codec, AVCodecContext* context) { nvenc::migrate(settings, version, codec, context); + + if (version < STREAMFX_MAKE_VERSION(0, 11, 1, 0)) { + // Profile + if (auto v = obs_data_get_int(settings, ST_KEY_PROFILE); v != -1) { + if (!obs_data_has_user_value(settings, ST_KEY_PROFILE)) + v = 0; + + std::map preset{ + {0, "main"}, + {1, "main10"}, + {2, "rext"}, + }; + if (auto k = preset.find(v); k != preset.end()) { + obs_data_set_string(settings, ST_KEY_PROFILE, k->second.data()); + } + } + + // Tier + if (auto v = obs_data_get_int(settings, ST_KEY_TIER); v != -1) { + if (!obs_data_has_user_value(settings, ST_KEY_TIER)) + v = 0; + + std::map preset{ + {0, "main"}, + {1, "high"}, + }; + if (auto k = preset.find(v); k != preset.end()) { + obs_data_set_string(settings, ST_KEY_TIER, k->second.data()); + } + } + + // Level + obs_data_set_string(settings, ST_KEY_LEVEL, "auto"); + } } bool nvenc_hevc_handler::supports_reconfigure(ffmpeg_factory* instance, bool& threads, bool& gpu, bool& keyframes) diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index 4426ac8f1a..2f6de97bf7 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -162,10 +162,12 @@ void nvenc::override_update(ffmpeg_instance* instance, obs_data_t*) void nvenc::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*) { - obs_data_set_default_int(settings, ST_KEY_PRESET, -1); + obs_data_set_default_string(settings, ST_KEY_PRESET, "default"); + obs_data_set_default_string(settings, ST_I18N_TUNE, "hq"); - obs_data_set_default_int(settings, ST_KEY_RATECONTROL_MODE, -1); + obs_data_set_default_string(settings, ST_KEY_RATECONTROL_MODE, "cbr"); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_TWOPASS, -1); + obs_data_set_default_int(settings, ST_KEY_RATECONTROL_MULTIPASS, -1); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_LOOKAHEAD, -1); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_ADAPTIVEI, -1); obs_data_set_default_int(settings, ST_KEY_RATECONTROL_ADAPTIVEB, -1); @@ -200,21 +202,21 @@ void nvenc::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*) static bool modified_ratecontrol(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept { // Decode the name into useful flags. - auto value = obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE); + auto value = obs_data_get_string(settings, ST_KEY_RATECONTROL_MODE); bool have_bitrate = false; bool have_bitrate_range = false; bool have_quality = false; bool have_qp_limits = false; bool have_qp = false; - if (value == 2) { + if (value == std::string_view("cbr")) { have_bitrate = true; - } else if (value == 1) { + } else if (value == std::string_view("vbr")) { have_bitrate = true; have_bitrate_range = true; have_quality = true; have_qp_limits = true; have_qp = true; - } else if (value == 0) { + } else if (value == std::string_view("constqp")) { have_qp = true; } else { have_bitrate = true; @@ -251,14 +253,22 @@ void nvenc::get_properties_pre(obs_properties_t* props, const AVCodec*, const AV { { auto p = obs_properties_add_list(props, ST_KEY_PRESET, D_TRANSLATE(ST_I18N_PRESET), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "preset", p, ST_I18N_PRESET); + OBS_COMBO_FORMAT_STRING); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "preset", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_PRESET, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "tune")) { auto p = obs_properties_add_list(props, ST_KEY_TUNE, D_TRANSLATE(ST_I18N_TUNE), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tune", p, ST_I18N_TUNE); + OBS_COMBO_FORMAT_STRING); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tune", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_TUNE, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } } @@ -274,24 +284,31 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec, c { auto p = obs_properties_add_list(grp, ST_KEY_RATECONTROL_MODE, D_TRANSLATE(ST_I18N_RATECONTROL_MODE), - OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING); obs_property_set_modified_callback(p, modified_ratecontrol); - auto filter = [](const AVOption* opt) { + obs_property_list_add_string(p, D_TRANSLATE(S_STATE_DEFAULT), ""); + streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "rc", [&p](const AVOption* opt) { + // Ignore options that are "deprecated" but not flagged as such. if (opt->default_val.i64 & (1 << 23)) - return true; - return false; - }; - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "rc", p, ST_I18N_RATECONTROL_MODE, - filter); + return; + + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_RATECONTROL_MODE, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "multipass")) { auto p = obs_properties_add_list(grp, ST_KEY_RATECONTROL_MULTIPASS, D_TRANSLATE(ST_I18N_RATECONTROL_MULTIPASS), - OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "multipass", p, - ST_I18N_RATECONTROL_MULTIPASS); + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING); + obs_property_list_add_string(p, D_TRANSLATE(S_STATE_DEFAULT), ""); + streamfx::ffmpeg::tools::avoption_list_add_entries( + context->priv_data, "multipass", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_RATECONTROL_MULTIPASS, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } else { auto p = streamfx::util::obs_properties_add_tristate(grp, ST_KEY_RATECONTROL_TWOPASS, D_TRANSLATE(ST_I18N_RATECONTROL_TWOPASS)); @@ -419,10 +436,14 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec, c { auto p = obs_properties_add_list(grp, ST_KEY_OTHER_BFRAMEREFERENCEMODE, D_TRANSLATE(ST_I18N_OTHER_BFRAMEREFERENCEMODE), OBS_COMBO_TYPE_LIST, - OBS_COMBO_FORMAT_INT); - obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); - streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "b_ref_mode", p, - ST_I18N_OTHER_BFRAMEREFERENCEMODE); + OBS_COMBO_FORMAT_STRING); + obs_property_list_add_string(p, D_TRANSLATE(S_STATE_DEFAULT), ""); + streamfx::ffmpeg::tools::avoption_list_add_entries( + context->priv_data, "b_ref_mode", [&p](const AVOption* opt) { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_OTHER_BFRAMEREFERENCEMODE, opt->name); + obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); + }); } { @@ -492,27 +513,15 @@ void nvenc::get_runtime_properties(obs_properties_t* props, const AVCodec*, AVCo void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) { - if (!context->internal) { - auto value = obs_data_get_int(settings, ST_KEY_PRESET); - if (value != -1) { - auto name = streamfx::ffmpeg::tools::avoption_name_from_unit_value(context->priv_data, "preset", value); - if (name) { - av_opt_set(context->priv_data, "preset", name, AV_OPT_SEARCH_CHILDREN); - } else { - av_opt_set_int(context->priv_data, "preset", value, AV_OPT_SEARCH_CHILDREN); - } - } + if (auto v = obs_data_get_string(settings, ST_KEY_PRESET); + !context->internal && (v != nullptr) && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "preset", v, AV_OPT_SEARCH_CHILDREN); } { // Rate Control - auto value = obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE); - auto name = streamfx::ffmpeg::tools::avoption_name_from_unit_value(context->priv_data, "rc", value); - if (value != -1) { - if (name && !context->internal) { - av_opt_set(context->priv_data, "rc", name, AV_OPT_SEARCH_CHILDREN); - } else { - av_opt_set_int(context->priv_data, "rc", value, AV_OPT_SEARCH_CHILDREN); - } + auto v = obs_data_get_string(settings, ST_KEY_RATECONTROL_MODE); + if (!context->internal && (v != nullptr) && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "rc", v, AV_OPT_SEARCH_CHILDREN); } // Decode the name into useful flags. @@ -521,7 +530,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c bool have_quality = false; bool have_qp_limits = false; bool have_qp = false; - if (is_cbr(name)) { + if (v && is_cbr(v)) { have_bitrate = true; if (!context->internal) @@ -529,7 +538,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c // Support for OBS Studio obs_data_set_string(settings, "rate_control", "CBR"); - } else if (is_vbr(name)) { + } else if (v && is_vbr(v)) { have_bitrate = true; have_bitrate_range = true; have_quality = true; @@ -541,7 +550,7 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c // Support for OBS Studio obs_data_set_string(settings, "rate_control", "VBR"); - } else if (is_cqp(name)) { + } else if (v && is_cqp(v)) { have_qp = true; if (!context->internal) @@ -563,8 +572,9 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c if (!context->internal) { if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "multipass")) { // Multi-Pass - if (int tp = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_MULTIPASS)); tp > -1) { - av_opt_set_int(context->priv_data, "multipass", tp, AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_RATECONTROL_MULTIPASS); + (v != nullptr) && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "multipass", v, AV_OPT_SEARCH_CHILDREN); av_opt_set_int(context->priv_data, "2pass", 0, AV_OPT_SEARCH_CHILDREN); } } else { @@ -707,8 +717,9 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c av_opt_set_int(context->priv_data, "weighted_pred", wp, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_int(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE); v > -1) { - av_opt_set_int(context->priv_data, "b_ref_mode", v, AV_OPT_SEARCH_CHILDREN); + if (auto v = obs_data_get_string(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE); + (v != nullptr) && (strlen(v) > 0)) { + av_opt_set(context->priv_data, "b_ref_mode", v, AV_OPT_SEARCH_CHILDREN); } if (auto v = obs_data_get_int(settings, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE); v > -1) { @@ -810,29 +821,59 @@ void streamfx::encoder::ffmpeg::handler::nvenc::migrate(obs_data_t* settings, ui } if (version < STREAMFX_MAKE_VERSION(0, 11, 1, 0)) { + // Preset + if (auto v = obs_data_get_int(settings, ST_KEY_PRESET); v != -1) { + std::map preset{ + {0, "default"}, {1, "slow"}, {2, "medium"}, {3, "fast"}, {4, "hp"}, {5, "hq"}, + {6, "bd"}, {7, "ll"}, {8, "llhq"}, {9, "llhp"}, {10, "lossless"}, {11, "losslesshp"}, + }; + if (auto k = preset.find(v); k != preset.end()) { + obs_data_set_string(settings, ST_KEY_PRESET, k->second.data()); + } + } + + // Rate Control Mode if (auto v = obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE); v != -1) { + if (!obs_data_has_user_value(settings, ST_KEY_RATECONTROL_MODE)) + v = 4; + switch (v) { case 0: // CQP + obs_data_set_string(settings, ST_KEY_RATECONTROL_MODE, "constqp"); break; case 2: // VBR_HQ - obs_data_set_int(settings, ST_KEY_RATECONTROL_MODE, 1); obs_data_set_int(settings, ST_KEY_RATECONTROL_TWOPASS, 1); - obs_data_set_int(settings, ST_KEY_RATECONTROL_MULTIPASS, 1); + obs_data_set_string(settings, ST_KEY_RATECONTROL_MULTIPASS, "qres"); case 1: // VBR + obs_data_set_string(settings, ST_KEY_RATECONTROL_MODE, "vbr"); break; case 5: // CBR_LD_HQ obs_data_set_int(settings, ST_KEY_OTHER_LOWDELAYKEYFRAMESCALE, 1); case 4: // CBR_HQ - obs_data_set_int(settings, ST_KEY_RATECONTROL_MODE, 2); obs_data_set_int(settings, ST_KEY_RATECONTROL_TWOPASS, 1); - obs_data_set_int(settings, ST_KEY_RATECONTROL_MULTIPASS, 1); + obs_data_set_string(settings, ST_KEY_RATECONTROL_MULTIPASS, "qres"); case 3: // CBR + obs_data_set_string(settings, ST_KEY_RATECONTROL_MODE, "cbr"); break; } } + + // Target Quality if (auto v = obs_data_get_double(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY); v > 0) { obs_data_set_double(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY, (v / 100.) * 51.); } + + // B-Frame Reference Modes + if (auto v = obs_data_get_int(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE); v != -1) { + std::map preset{ + {0, "default"}, + {1, "each"}, + {2, "middle"}, + }; + if (auto k = preset.find(v); k != preset.end()) { + obs_data_set_string(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE, k->second.data()); + } + } } #undef COPY_UNSET From f93d5c2202d624846dc8095ca3dad87d469a9a21 Mon Sep 17 00:00:00 2001 From: Chris Pence <6cpence@gmail.com> Date: Thu, 24 Feb 2022 12:12:37 -0800 Subject: [PATCH 008/164] encoder/ffmpeg: Remove legacy API usage (#783) The build breaks if compiling against a newer version of ffmpeg which does not define the FF_API_NEXT macro and has fully removed the av_codec_next() API. --- source/encoders/encoder-ffmpeg.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index a913cb0ac0..737ff96569 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -1180,7 +1180,6 @@ ffmpeg_manager::~ffmpeg_manager() void ffmpeg_manager::register_encoders() { // Encoders -#if FF_API_NEXT void* iterator = nullptr; for (const AVCodec* codec = av_codec_iterate(&iterator); codec != nullptr; codec = av_codec_iterate(&iterator)) { // Only register encoders. @@ -1195,22 +1194,6 @@ void ffmpeg_manager::register_encoders() } } } -#else - AVCodec* codec = nullptr; - for (codec = av_codec_next(codec); codec != nullptr; codec = av_codec_next(codec)) { - // Only register encoders. - if (!av_codec_is_encoder(codec)) - continue; - - if ((codec->type == AVMediaType::AVMEDIA_TYPE_AUDIO) || (codec->type == AVMediaType::AVMEDIA_TYPE_VIDEO)) { - try { - _factories.emplace(codec, std::make_shared(codec)); - } catch (const std::exception& ex) { - DLOG_ERROR("Failed to register encoder '%s': %s", codec->name, ex.what()); - } - } - } -#endif } void ffmpeg_manager::register_handler(std::string codec, std::shared_ptr handler) From a6b11f68d38d8dae433337c1ad6ba338190e10c4 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Sat, 26 Feb 2022 20:29:49 +0100 Subject: [PATCH 009/164] locale: New Crowdin updates (#778) * New translations en-US.ini (Finnish) * New translations en-US.ini (Finnish) * New translations en-US.ini (German) * New translations en-US.ini (Chinese Simplified) --- data/locale/de-DE.ini | 21 +++++++++++++++++++++ data/locale/fi-FI.ini | 41 ++++++++++++++++++++++++++++++++++++++++- data/locale/zh-CN.ini | 26 ++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) diff --git a/data/locale/de-DE.ini b/data/locale/de-DE.ini index b72fd4f560..056b4beb2a 100644 --- a/data/locale/de-DE.ini +++ b/data/locale/de-DE.ini @@ -158,10 +158,30 @@ Encoder.FFmpeg.NVENC.Preset.default="Standard" Encoder.FFmpeg.NVENC.Preset.slow="Langsam" Encoder.FFmpeg.NVENC.Preset.medium="Mittel" Encoder.FFmpeg.NVENC.Preset.fast="Schnell" +Encoder.FFmpeg.NVENC.Preset.hp="Hohe Leistung" +Encoder.FFmpeg.NVENC.Preset.hq="Hohe Qualität" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay Disc" +Encoder.FFmpeg.NVENC.Preset.ll="Niedrige Latenz" +Encoder.FFmpeg.NVENC.Preset.llhq="Niedrige Latenz, Hohe Qualität" +Encoder.FFmpeg.NVENC.Preset.llhp="Niedrige Latenz, Hohe Leistung" +Encoder.FFmpeg.NVENC.Preset.lossless="Verlustfrei" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Verlusfrei, Hohe Leistung" +Encoder.FFmpeg.NVENC.Preset.p1="Am Schnellsten (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Schneller (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Schnell (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Mittel (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Langsam (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Langsamer (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Am Langsamsten (P7)" Encoder.FFmpeg.NVENC.Tune="Justierung" +Encoder.FFmpeg.NVENC.Tune.hq="Hohe Qualität" +Encoder.FFmpeg.NVENC.Tune.ll="Niedrige Latenz" +Encoder.FFmpeg.NVENC.Tune.ull="Sehr Niedrige Latenz" +Encoder.FFmpeg.NVENC.Tune.lossless="Verlustfrei" Encoder.FFmpeg.NVENC.RateControl="Ratenkontrollmethode" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parameter für Konstante Quantisierung" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variable Bitrate" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstante Bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Zwei Durchläufe" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vorausschauen" @@ -189,6 +209,7 @@ Encoder.FFmpeg.NVENC.Other.ZeroLatency="Null Latenz" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Gewichtete Vorhersage" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Nicht-referenzierte P-Bilder" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referenzbilder" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Key-Frame Skala mit geringer Verzögerung" Blur.Type.Box="Box" Blur.Type.BoxLinear="Box Linear" diff --git a/data/locale/fi-FI.ini b/data/locale/fi-FI.ini index 1a77b3b60b..fff7bc0ec7 100644 --- a/data/locale/fi-FI.ini +++ b/data/locale/fi-FI.ini @@ -1,4 +1,5 @@ Advanced="Lisävalinnat" +Manual.Open="Avaa käyttöopas" Channel.Red="Punainen" Channel.Green="Vihreä" @@ -24,12 +25,19 @@ State.Automatic="Automaattinen" State.Default="Oletus" UI.Menu="StreamFX" +UI.Menu.Wiki="Lue Wikiä" +UI.Menu.Support="Apu && Tuki" +UI.Menu.Website="Käy StreamFXn nettisivulla" +UI.Menu.Discord="Liity StreamFX Discordiin" +UI.Menu.Twitter="Seuraa StreamFXää Twitterissä" +UI.Menu.YouTube="Tilaa StreamFX YouTubessa" UI.Menu.About="Tietoja StreamFX:stä" UI.About.Title="Tietoja StreamFX:stä" UI.About.Text="

StremFX on tehty mahdolliseksi tukijoiden puolesta Patreon ja Github Sponsorssivustoilta, myös kaikkineen lahjoituksineen PayPal puolelta. Lisäkiitokset myös kaikille kääntäjille, jotka auttavat tekstien lokalisaatioinnissa Crowdin palvelussa. Olette kaikki mahtavia!

" UI.About.Role.Contributor="Avustaja" UI.About.Role.Translator="Kääntäjä" +UI.About.Role.Supporter="Tukija" UI.About.Version="Versio:" UI.Updater.Dialog.Title="StreamFX versio %s on nyt saatavilla!" @@ -46,10 +54,41 @@ UI.Updater.Menu.Channel="Päivityskanava" UI.Updater.Menu.Channel.Release="Julkaisu" UI.Updater.Menu.Channel.Testing="Testaus" - +Encoder.AOM.AV1="AOM AV1 (suora)" +Encoder.AOM.AV1.Encoder="Enkooderi" +Encoder.AOM.AV1.Encoder.Usage="Käyttö" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Hyvä Laatu" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Reaaliaikainen" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Kaikki Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="CPU-käyttö" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Erittäin hidas" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Hitaampi" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Hidas" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Keskinopea" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Nopea" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Nopeampi" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Erittäin nopea" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super Nopea" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra nopea" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Mielettömän nopea" +Encoder.AOM.AV1.Encoder.Profile="Profiili" +Encoder.AOM.AV1.KeyFrames.IntervalType="Aikaväli Tyyppi" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Framet" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekunnit" +Encoder.AOM.AV1.KeyFrames.Interval="Aikaväli" +Encoder.AOM.AV1.RateControl="Rate Control -tila" + +Encoder.FFmpeg.KeyFrames.IntervalType="Aikaväli Tyyppi" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Framet" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunnit" +Encoder.FFmpeg.KeyFrames.Interval="Aikaväli" Encoder.FFmpeg.NVENC.Preset.default="Oletus" +Encoder.FFmpeg.NVENC.Preset.slow="Hidas" +Encoder.FFmpeg.NVENC.Preset.medium="Keskinopea" +Encoder.FFmpeg.NVENC.Preset.fast="Nopea" Blur.Type.Box="Kuutiollinen" Blur.Type.BoxLinear="Kuutio lineaarinen" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index b67633560c..4b8ba116e9 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -158,12 +158,34 @@ Encoder.FFmpeg.NVENC.Preset.default="默认" Encoder.FFmpeg.NVENC.Preset.slow="慢速" Encoder.FFmpeg.NVENC.Preset.medium="中等" Encoder.FFmpeg.NVENC.Preset.fast="快速" +Encoder.FFmpeg.NVENC.Preset.hp="高性能" +Encoder.FFmpeg.NVENC.Preset.hq="高质量" +Encoder.FFmpeg.NVENC.Preset.bd="蓝光光盘" +Encoder.FFmpeg.NVENC.Preset.ll="低延迟" +Encoder.FFmpeg.NVENC.Preset.llhq="低延迟高质量" +Encoder.FFmpeg.NVENC.Preset.llhp="低延迟高性能" +Encoder.FFmpeg.NVENC.Preset.lossless="无损" +Encoder.FFmpeg.NVENC.Preset.losslesshp="无损高性能" +Encoder.FFmpeg.NVENC.Preset.p1="最快的 (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="更快(P2)" +Encoder.FFmpeg.NVENC.Preset.p3="快 (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="中等(P4)" +Encoder.FFmpeg.NVENC.Preset.p5="慢(P5)" +Encoder.FFmpeg.NVENC.Preset.p6="更慢(P6)" +Encoder.FFmpeg.NVENC.Preset.p7="最慢(P7)" Encoder.FFmpeg.NVENC.Tune="微调(Tune)" +Encoder.FFmpeg.NVENC.Tune.hq="高质量" +Encoder.FFmpeg.NVENC.Tune.ll="低延迟" +Encoder.FFmpeg.NVENC.Tune.ull="超低延迟" +Encoder.FFmpeg.NVENC.Tune.lossless="无损" Encoder.FFmpeg.NVENC.RateControl="速率控制选项" Encoder.FFmpeg.NVENC.RateControl.Mode="模式" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="恒量化参数" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="可变比特率" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="恒定比特率" Encoder.FFmpeg.NVENC.RateControl.TwoPass="双通道" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="多路径" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="单次通过" Encoder.FFmpeg.NVENC.RateControl.LookAhead="预测(Look Ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="自适应 I 帧" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="自适应 B 帧" @@ -185,10 +207,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="时间自适应量化" Encoder.FFmpeg.NVENC.Other="其它选项" Encoder.FFmpeg.NVENC.Other.BFrames="最大 B 帧" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B 帧参考模式" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="没有 B 帧将被用作参考" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="仅使用 B-Frames/2 作为参考" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="每个 B 帧将用于参考" Encoder.FFmpeg.NVENC.Other.ZeroLatency="零延迟" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="加权预测" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="非参考 P 帧" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="参考帧" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="低延迟键帧比例" Blur.Type.Box="Box(快速均值)" Blur.Type.BoxLinear="Box Linear(均值线性)" From 0540a18f27a7969c07eb150668033155626949f8 Mon Sep 17 00:00:00 2001 From: "carsten.braun" Date: Thu, 24 Feb 2022 23:04:32 +0100 Subject: [PATCH 010/164] encoders/ffmpeg/dnxhr: Add Avid DNxHR Encoder based on FFmpeg --- CMakeLists.txt | 18 ++++ data/locale/en-US.ini | 9 ++ source/encoders/codecs/dnxhr.cpp | 1 + source/encoders/codecs/dnxhr.hpp | 29 ++++++ source/encoders/encoder-ffmpeg.cpp | 7 ++ source/encoders/handlers/dnxhd_handler.cpp | 108 +++++++++++++++++++++ source/encoders/handlers/dnxhd_handler.hpp | 68 +++++++++++++ 7 files changed, 240 insertions(+) create mode 100644 source/encoders/codecs/dnxhr.cpp create mode 100644 source/encoders/codecs/dnxhr.hpp create mode 100644 source/encoders/handlers/dnxhd_handler.cpp create mode 100644 source/encoders/handlers/dnxhd_handler.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index ae46d31fcb..acaa87c67a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -293,6 +293,7 @@ set(${PREFIX}ENABLE_ENCODER_FFMPEG ON CACHE BOOL "Enable FFmpeg Encoder integrat set(${PREFIX}ENABLE_ENCODER_FFMPEG_AMF ON CACHE BOOL "Enable AMF Encoder in FFmpeg.") set(${PREFIX}ENABLE_ENCODER_FFMPEG_NVENC ON CACHE BOOL "Enable NVENC Encoder in FFmpeg.") set(${PREFIX}ENABLE_ENCODER_FFMPEG_PRORES ON CACHE BOOL "Enable ProRes Encoder in FFmpeg.") +set(${PREFIX}ENABLE_ENCODER_FFMPEG_DNXHR ON CACHE BOOL "Enable DNXHR Encoder in FFmpeg.") set(${PREFIX}ENABLE_ENCODER_AOM_AV1 ON CACHE BOOL "Enable AOM AV1 Encoder.") ## Filters @@ -665,6 +666,9 @@ function(feature_encoder_ffmpeg RESOLVE) # ProRes is_feature_enabled(ENCODER_FFMPEG_PRORES T_CHECK) + + # DNxHR + is_feature_enabled(ENCODER_FFMPEG_DNXHR T_CHECK) endif() elseif(T_CHECK) set(REQUIRE_FFMPEG ON PARENT_SCOPE) @@ -1315,6 +1319,8 @@ if(T_CHECK) "source/encoders/codecs/h264.cpp" "source/encoders/codecs/prores.hpp" "source/encoders/codecs/prores.cpp" + "source/encoders/codecs/dnxhr.hpp" + "source/encoders/codecs/dnxhr.cpp" # Encoders/Handlers "source/encoders/handlers/handler.hpp" @@ -1368,6 +1374,18 @@ if(T_CHECK) list(APPEND PROJECT_DEFINITIONS ENABLE_ENCODER_FFMPEG_PRORES ) + endif() + + # DNxHR + is_feature_enabled(ENCODER_FFMPEG_DNXHR T_CHECK) + if(T_CHECK) + list(APPEND PROJECT_PRIVATE_SOURCE + "source/encoders/handlers/dnxhd_handler.hpp" + "source/encoders/handlers/dnxhd_handler.cpp" + ) + list(APPEND PROJECT_DEFINITIONS + ENABLE_ENCODER_FFMPEG_DNXHR + ) endif() endif() diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index 9b9454ce30..aaa7b062dd 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -526,3 +526,12 @@ Codec.ProRes.Profile.APCN="422 Standard (APCN)" Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" + +# Codec: Avid DNxHR +Codec.DNxHR.Profile="Profile" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/source/encoders/codecs/dnxhr.cpp b/source/encoders/codecs/dnxhr.cpp new file mode 100644 index 0000000000..0a33512866 --- /dev/null +++ b/source/encoders/codecs/dnxhr.cpp @@ -0,0 +1 @@ +#include "dnxhr.hpp" diff --git a/source/encoders/codecs/dnxhr.hpp b/source/encoders/codecs/dnxhr.hpp new file mode 100644 index 0000000000..dbfd08bd83 --- /dev/null +++ b/source/encoders/codecs/dnxhr.hpp @@ -0,0 +1,29 @@ +// FFMPEG based DNxHR Video Encoder Integration for OBS Studio +// Copyright (c) 2022 Carsten Braun +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once +#include "common.hpp" + +// Codec: DNxHR +#define S_CODEC_DNXHR "Codec.DNxHR" +#define S_CODEC_DNXHR_PROFILE "Codec.DNxHR.Profile" + +namespace streamfx::encoder::codec::dnxhr {} // namespace streamfx::encoder::codec::dnxhr diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 737ff96569..465fcdc7e4 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -42,6 +42,10 @@ #include "handlers/prores_aw_handler.hpp" #endif +#ifdef ENABLE_ENCODER_FFMPEG_DNXHR +#include "handlers/dnxhd_handler.hpp" +#endif + extern "C" { #pragma warning(push) #pragma warning(disable : 4244) @@ -1170,6 +1174,9 @@ ffmpeg_manager::ffmpeg_manager() : _factories(), _handlers(), _debug_handler() #ifdef ENABLE_ENCODER_FFMPEG_PRORES register_handler("prores_aw", ::std::make_shared()); #endif +#ifdef ENABLE_ENCODER_FFMPEG_DNXHR + register_handler("dnxhd", ::std::make_shared()); +#endif } ffmpeg_manager::~ffmpeg_manager() diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp new file mode 100644 index 0000000000..b7d550889e --- /dev/null +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -0,0 +1,108 @@ +#include "dnxhd_handler.hpp" +#include +#include "../codecs/dnxhr.hpp" +#include "ffmpeg/tools.hpp" +#include "plugin.hpp" + +extern "C" { +#include +} + +using namespace streamfx::encoder::ffmpeg::handler; +using namespace streamfx::encoder::codec::dnxhr; + +void dnxhd_handler::adjust_info(ffmpeg_factory* fac, const AVCodec*, std::string&, std::string& name, std::string&) +{ + //Most people don't know what VC3 is and only know it as DNx. + //Change name to make it easier to find. + name = "Avid DNxHR (via FFmpeg)"; +} + +void dnxhd_handler::override_colorformat(AVPixelFormat& target_format, obs_data_t* settings, const AVCodec* codec, + AVCodecContext*) +{ + static const std::array, static_cast(5)> profile_to_format_map{ + std::pair{"dnxhr_lb", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_sq", AV_PIX_FMT_YUV422P}, + std::pair{"dnxhr_hq", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_hqx", AV_PIX_FMT_YUV422P10LE}, + std::pair{"dnxhr_444", AV_PIX_FMT_YUV444P10LE}}; + + const char* selected_profile = obs_data_get_string(settings, S_CODEC_DNXHR_PROFILE); + for (auto kv : profile_to_format_map) { + if (strcmp(kv.first, selected_profile) == 0) { + target_format = kv.second; + return; + } + } + + //Fallback for (yet) unknown formats + target_format = AV_PIX_FMT_YUV422P; +} + +void dnxhd_handler::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*, bool) +{ + obs_data_set_default_string(settings, S_CODEC_DNXHR_PROFILE, "dnxhr_sq"); +} + +bool dnxhd_handler::has_keyframe_support(ffmpeg_factory* instance) +{ + return false; +} + +bool dnxhd_handler::has_pixel_format_support(ffmpeg_factory* instance) +{ + return false; +} + +inline const char* dnx_profile_to_display_name(const char* profile) +{ + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_DNXHR_PROFILE, profile); + return D_TRANSLATE(buffer); +} + +void dnxhd_handler::get_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context, bool) +{ + AVCodecContext* ctx = context; + + //Create dummy context if null was passed to the function + if (!ctx) { + ctx = avcodec_alloc_context3(codec); + if (!ctx->priv_data) { + avcodec_free_context(&ctx); + return; + } + } + auto p = obs_properties_add_list(props, S_CODEC_DNXHR_PROFILE, D_TRANSLATE(S_CODEC_DNXHR_PROFILE), + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING); + + streamfx::ffmpeg::tools::avoption_list_add_entries(ctx->priv_data, "profile", [&p](const AVOption* opt) { + if (strcmp(opt->name, "dnxhd") == 0) { + //Do not show DNxHD profile as it is outdated and should not be used. + //It's also very picky about framerate and framesize combos, which makes it even less useful + return; + } + + //ffmpeg returns the profiles for DNxHR from highest to lowest. + //Lowest to highest is what people usually expect. + //Therefore, new entries will always be inserted at the top, effectively reversing the list + obs_property_list_insert_string(p, 0, dnx_profile_to_display_name(opt->name), opt->name); + }); + + //Free context if we created it here + if (ctx && ctx != context) { + avcodec_free_context(&ctx); + } +} + +void dnxhd_handler::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) +{ + const char* profile = obs_data_get_string(settings, S_CODEC_DNXHR_PROFILE); + av_opt_set(context, "profile", profile, AV_OPT_SEARCH_CHILDREN); +} + +void dnxhd_handler::log_options(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) +{ + DLOG_INFO("[%s] Avid DNxHR:", codec->name); + streamfx::ffmpeg::tools::print_av_option_string2(context, "profile", " Profile", + [](int64_t v, std::string_view o) { return std::string(o); }); +} diff --git a/source/encoders/handlers/dnxhd_handler.hpp b/source/encoders/handlers/dnxhd_handler.hpp new file mode 100644 index 0000000000..590bf11ed7 --- /dev/null +++ b/source/encoders/handlers/dnxhd_handler.hpp @@ -0,0 +1,68 @@ +// FFMPEG based DNxHR Video Encoder Integration for OBS Studio +// Copyright (c) 2022 Carsten Braun +// Copyright (c) 2019 Michael Fabian Dirks +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once +#include "handler.hpp" + +extern "C" { +#pragma warning(push) +#pragma warning(disable : 4244) +#include +#pragma warning(pop) +} + +namespace streamfx::encoder::ffmpeg::handler { + class dnxhd_handler : public handler { + public: + virtual ~dnxhd_handler(){}; + + public /*factory*/: + virtual void adjust_info(ffmpeg_factory* factory, const AVCodec* codec, std::string& id, std::string& name, + std::string& codec_id); + + public /*factory*/: + void get_defaults(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context, bool hw_encode) override; + + virtual std::string_view get_help_url(const AVCodec* codec) override + { + return "https://github.com/Xaymar/obs-StreamFX/wiki/Encoder-FFmpeg-Avid-DNxHR"; + }; + + public /*support tests*/: + virtual bool has_keyframe_support(ffmpeg_factory* instance) override; + + public /*support tests*/: + bool has_pixel_format_support(ffmpeg_factory* instance) override; + + public /*settings*/: + void get_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context, + bool hw_encode) override; + + void update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) override; + + void log_options(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) override; + + public /*instance*/: + void override_colorformat(AVPixelFormat& target_format, obs_data_t* settings, const AVCodec* codec, + AVCodecContext* context) override; + }; +} // namespace streamfx::encoder::ffmpeg::handler From 56f2ae4290863bec84d7670d8b8a1c884a74b11f Mon Sep 17 00:00:00 2001 From: Xaymar Date: Thu, 26 May 2022 23:03:58 +0200 Subject: [PATCH 011/164] locale: New Crowdin updates (#786) * New translations en-US.ini (Arabic) * New translations en-US.ini (Bosnian) * New translations en-US.ini (Bulgarian) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Chinese Traditional, Hong Kong) * New translations en-US.ini (Chinese Traditional) * New translations en-US.ini (Croatian) * New translations en-US.ini (Czech) * New translations en-US.ini (Danish) * New translations en-US.ini (Dutch) * New translations en-US.ini (English, Australia) * New translations en-US.ini (English, Canada) * New translations en-US.ini (English, United Kingdom) * New translations en-US.ini (Estonian) * New translations en-US.ini (Faroese) * New translations en-US.ini (Finnish) * New translations en-US.ini (French) * New translations en-US.ini (German) * New translations en-US.ini (Greek) * New translations en-US.ini (Hebrew) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Icelandic) * New translations en-US.ini (Indonesian) * New translations en-US.ini (Irish) * New translations en-US.ini (Italian) * New translations en-US.ini (Japanese) * New translations en-US.ini (Korean) * New translations en-US.ini (Mongolian) * New translations en-US.ini (Norwegian) * New translations en-US.ini (Persian) * New translations en-US.ini (Polish) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Portuguese) * New translations en-US.ini (Romanian) * New translations en-US.ini (Russian) * New translations en-US.ini (Serbo-Croatian) * New translations en-US.ini (Sinhala) * New translations en-US.ini (Spanish) * New translations en-US.ini (Swedish) * New translations en-US.ini (Thai) * New translations en-US.ini (Turkish) * New translations en-US.ini (Ukrainian) * New translations en-US.ini (Vietnamese) --- data/locale/ar-SA.ini | 8 ++ data/locale/bg-BG.ini | 1 + data/locale/bs-BA.ini | 1 + data/locale/cs-CZ.ini | 48 +++++++++ data/locale/da-DK.ini | 1 + data/locale/de-DE.ini | 15 +++ data/locale/el-GR.ini | 1 + data/locale/en-AU.ini | 1 + data/locale/en-CA.ini | 1 + data/locale/en-GB.ini | 5 + data/locale/es-ES.ini | 36 +++++++ data/locale/et-EE.ini | 1 + data/locale/fa-IR.ini | 1 + data/locale/fi-FI.ini | 226 +++++++++++++++++++++++++++++++++++++++++- data/locale/fo-FO.ini | 1 + data/locale/fr-FR.ini | 25 +++++ data/locale/ga-IE.ini | 1 + data/locale/he-IL.ini | 1 + data/locale/hr-HR.ini | 1 + data/locale/hu-HU.ini | 53 +++++++++- data/locale/id-ID.ini | 1 + data/locale/is-IS.ini | 1 + data/locale/it-IT.ini | 8 ++ data/locale/ja-JP.ini | 2 + data/locale/ko-KR.ini | 1 + data/locale/mn-MN.ini | 1 + data/locale/nl-NL.ini | 12 +++ data/locale/no-NO.ini | 2 + data/locale/pl-PL.ini | 8 ++ data/locale/pt-BR.ini | 2 + data/locale/pt-PT.ini | 1 + data/locale/ro-RO.ini | 8 ++ data/locale/ru-RU.ini | 8 ++ data/locale/sh-HR.ini | 1 + data/locale/si-LK.ini | 1 + data/locale/sv-SE.ini | 1 + data/locale/th-TH.ini | 2 + data/locale/tr-TR.ini | 2 + data/locale/uk-UA.ini | 1 + data/locale/vi-VN.ini | 1 + data/locale/zh-CN.ini | 2 + data/locale/zh-HK.ini | 1 + data/locale/zh-TW.ini | 1 + 43 files changed, 494 insertions(+), 2 deletions(-) diff --git a/data/locale/ar-SA.ini b/data/locale/ar-SA.ini index d02fff4231..9fa8a9edd8 100644 --- a/data/locale/ar-SA.ini +++ b/data/locale/ar-SA.ini @@ -25,6 +25,12 @@ State.Automatic="ذاتي" State.Default="افتراضي" UI.Menu="ستريم إف إكس (StreamFX)" +UI.Menu.Wiki="قراءة الويكي" +UI.Menu.Support="الدعم والمساعدة" +UI.Menu.Website="زيارة موقع البث FX" +UI.Menu.Discord="الانضمام إلى ديسكورد البث" +UI.Menu.Twitter="تابعنا على تويتر" +UI.Menu.YouTube="اشترك فىLast Empire - War Zعلى يوتيوب" UI.Menu.About="حول StreamFX" UI.About.Title="حول StreamFX" @@ -48,6 +54,7 @@ UI.Updater.Menu.Channel="قناة التحديث" UI.Updater.Menu.Channel.Release="النسخة الثابتة " UI.Updater.Menu.Channel.Testing="النسخة التجريبية" +Encoder.AOM.AV1="AOM AV1 (مباشر)" Encoder.AOM.AV1.RateControl.Buffer.Size="الحجم" @@ -149,3 +156,4 @@ Source.Mirror.Source="المصدر" + diff --git a/data/locale/bg-BG.ini b/data/locale/bg-BG.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/bg-BG.ini +++ b/data/locale/bg-BG.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/bs-BA.ini b/data/locale/bs-BA.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/bs-BA.ini +++ b/data/locale/bs-BA.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/cs-CZ.ini b/data/locale/cs-CZ.ini index db006016b4..59eb9ca43d 100644 --- a/data/locale/cs-CZ.ini +++ b/data/locale/cs-CZ.ini @@ -25,6 +25,11 @@ State.Automatic="Automatický" State.Default="Výchozí" UI.Menu="StreamFX" +UI.Menu.Support="Nápověda && Podpora" +UI.Menu.Website="Navštívit web StreamFX" +UI.Menu.Discord="Připojit se na StreamFX Discord server" +UI.Menu.Twitter="Sledovat StreamFX na Twitteru" +UI.Menu.YouTube="Odebírat StreamFX YouTube kanál" UI.Menu.About="O StreamFX" UI.About.Title="O StreamFX" @@ -48,11 +53,21 @@ UI.Updater.Menu.Channel="Kanál pro Aktualizace" UI.Updater.Menu.Channel.Release="Stabilní" UI.Updater.Menu.Channel.Testing="Testovací" +Encoder.AOM.AV1="AOM AV1 (přímo)" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Klíčový snímek" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Snímky" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.AOM.AV1.KeyFrames.Interval="Interval" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Přenosová rychlost" Encoder.AOM.AV1.RateControl.Limits.Quality="Kvalitní" +Encoder.AOM.AV1.RateControl.Buffer="Zásobník" Encoder.AOM.AV1.RateControl.Buffer.Size="Rozměr" +Encoder.AOM.AV1.Advanced.Threads="Vlákna" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (s předzpracováním)" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Snímky" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundy" @@ -110,6 +125,8 @@ Source.Shader="Shader" Transition.Shader="Shader" Filter.AutoFraming.Framing.Offset="Kompenzace" +Filter.AutoFraming.Framing.AspectRatio="Poměr stran" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, využívá NVIDIA® Broadcast" Filter.Blur="Rozostření" Filter.Blur.Type="Druh" @@ -188,6 +205,8 @@ Filter.ColorGrade.RenderMode.LUT.6Bit="6-bitová vyhledávací tabulka" Filter.ColorGrade.RenderMode.LUT.8Bit="8-bitová vyhledávací tabulka" Filter.ColorGrade.RenderMode.LUT.10Bit="10-bitová vyhledávací tabulka" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, využívá NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" Filter.Displacement="Displacement Mapping" Filter.Displacement.File="Soubor" @@ -235,10 +254,19 @@ Filter.Transform.Rotation.Order.YXZ="Natočení, náklon, valení" Filter.Transform.Rotation.Order.YZX="Natočení, valení, náklon" Filter.Transform.Rotation.Order.ZXY="Valení, náklon, natočení" Filter.Transform.Rotation.Order.ZYX="Valení, natočení, náklon" +Filter.Transform.Corners="Rohy" +Filter.Transform.Corners.TopLeft="Levý horní" +Filter.Transform.Corners.TopRight="Pravý horní" +Filter.Transform.Corners.BottomLeft="Levý spodní" +Filter.Transform.Corners.BottomRight="Pravý spodní" Filter.Transform.Mipmapping="Zapnout mipmapping" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, využívá NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" Filter.Upscaling.NVIDIA.SuperRes.Scale="Měřítko" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, využívá NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kvalitní" Source.Mirror="Kopie zdroje" @@ -254,9 +282,29 @@ Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Kvadrofonní 4.1 LFE" Source.Mirror.Source.Audio.Layout.Surround="Prostorový zvuk" Source.Mirror.Source.Audio.Layout.FullSurround="Plný prostorový zvuk" +Codec.AV1="AV1" +Codec.AV1.Profile="Profil" Codec.H264="H264" +Codec.H264.Level="Úroveň" Codec.HEVC="HEVC" +Codec.HEVC.Profile="Profil" +Codec.HEVC.Level="Úroveň" +Codec.ProRes.Profile="Profil" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standard (APCN)" +Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" + +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/da-DK.ini b/data/locale/da-DK.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/da-DK.ini +++ b/data/locale/da-DK.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/de-DE.ini b/data/locale/de-DE.ini index 056b4beb2a..b2adccbd0d 100644 --- a/data/locale/de-DE.ini +++ b/data/locale/de-DE.ini @@ -184,6 +184,10 @@ Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parameter für Konstante Quantisi Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variable Bitrate" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstante Bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Zwei Durchläufe" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Mehrfachdurchlauf" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Einzelner Durchlauf" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Zweifacher Durchlauf bei einem Viertel der Auflösung" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Zweifacher Durchlauf bei voller Auflösung" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vorausschauen" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptive I-Frames" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptive B-Frames" @@ -205,6 +209,9 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Zeitlich-adaptive Quantisierung" Encoder.FFmpeg.NVENC.Other="Weitere Optionen" Encoder.FFmpeg.NVENC.Other.BFrames="Maximale B‐Bilder" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Bild Referenzmodus" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Keine B-Bilder werden als Referenz genutzt" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Nur B-Bilder/2 werden als Referenz genutzt" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Jedes B-Bild wird als Referenz genutzt" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Null Latenz" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Gewichtete Vorhersage" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Nicht-referenzierte P-Bilder" @@ -491,3 +498,11 @@ Codec.ProRes.Profile.APCH="422 Hohe Qualität/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Hohe Qualität/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Qualität/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/el-GR.ini b/data/locale/el-GR.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/el-GR.ini +++ b/data/locale/el-GR.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/en-AU.ini b/data/locale/en-AU.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/en-AU.ini +++ b/data/locale/en-AU.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/en-CA.ini b/data/locale/en-CA.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/en-CA.ini +++ b/data/locale/en-CA.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/en-GB.ini b/data/locale/en-GB.ini index d70412f10e..d75e11cb6a 100644 --- a/data/locale/en-GB.ini +++ b/data/locale/en-GB.ini @@ -25,6 +25,9 @@ State.Automatic="Automatic" State.Default="Default" UI.Menu="StreamFX" +UI.Menu.Wiki="Read the Wiki" +UI.Menu.Support="Help && Support" +UI.Menu.Website="Visit the StreamFX Website" UI.Menu.About="About StreamFX" UI.About.Title="About StreamFX" @@ -344,3 +347,5 @@ Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.DNxHR.Profile="Profile" + diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index a5bd1b2433..6945cf8c1d 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -158,12 +158,36 @@ Encoder.FFmpeg.NVENC.Preset.default="Por defecto" Encoder.FFmpeg.NVENC.Preset.slow="Lento" Encoder.FFmpeg.NVENC.Preset.medium="Medio" Encoder.FFmpeg.NVENC.Preset.fast="Rápido" +Encoder.FFmpeg.NVENC.Preset.hp="Alto rendimiento" +Encoder.FFmpeg.NVENC.Preset.hq="Alta calidad" +Encoder.FFmpeg.NVENC.Preset.bd="Disco BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Baja latencia" +Encoder.FFmpeg.NVENC.Preset.llhq="Baja latencia a alta calidad" +Encoder.FFmpeg.NVENC.Preset.llhp="Baja latencia a alto rendimiento" +Encoder.FFmpeg.NVENC.Preset.lossless="Sin pérdidas" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Sin pérdidas a alto rendimiento" +Encoder.FFmpeg.NVENC.Preset.p1="Más rápido (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Más rápido (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Rápido (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Medio (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lento (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Más lento (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Muy lento (P7)" Encoder.FFmpeg.NVENC.Tune="Sintonizar" +Encoder.FFmpeg.NVENC.Tune.hq="Alta calidad" +Encoder.FFmpeg.NVENC.Tune.ll="Baja latencia" +Encoder.FFmpeg.NVENC.Tune.ull="Latencia ultra baja" +Encoder.FFmpeg.NVENC.Tune.lossless="Sin pérdidas" Encoder.FFmpeg.NVENC.RateControl="Opciones de control de flujo" Encoder.FFmpeg.NVENC.RateControl.Mode="Modo" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parámetro de Cuantización Constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Tasa de bits variable" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Bitrate constante" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dos pasos" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Pasada múltiple" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Pasada única" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Dos pasadas a un cuarto de resolución" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Dos pasadas a resolución completa" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Look Ahead" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames adaptativos" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="B-Frames adaptativos" @@ -185,10 +209,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Cuantización adaptativa temporal" Encoder.FFmpeg.NVENC.Other="Otras opciones" Encoder.FFmpeg.NVENC.Other.BFrames="B-Frames máximos" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Modo de referencia de B-Frame" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Ningún B-Frame será usado como referencia" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Solo B-Frames/2 serán usados como referencia" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Cada B-Frame se usará como referencia" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latencia cero" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predicción ponderada" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="P-Frames sin referencia" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Fotogramas de referencia" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Escala de fotogramas clave de bajo retardo" Blur.Type.Box="Caja" Blur.Type.BoxLinear="Caja Lineal" @@ -470,3 +498,11 @@ Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Alta Calidad/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Calidad extrema/XQ (AP4X)" +Codec.DNxHR.Profile="Perfil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="Cuartel general DNxHR (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/et-EE.ini b/data/locale/et-EE.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/et-EE.ini +++ b/data/locale/et-EE.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/fa-IR.ini b/data/locale/fa-IR.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/fa-IR.ini +++ b/data/locale/fa-IR.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/fi-FI.ini b/data/locale/fi-FI.ini index fff7bc0ec7..b9de650084 100644 --- a/data/locale/fi-FI.ini +++ b/data/locale/fi-FI.ini @@ -1,4 +1,4 @@ -Advanced="Lisävalinnat" +Advanced="Edistyneet vaihtoehdot" Manual.Open="Avaa käyttöopas" Channel.Red="Punainen" @@ -73,22 +73,130 @@ Encoder.AOM.AV1.Encoder.CPUUsage.8="Super Nopea" Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra nopea" Encoder.AOM.AV1.Encoder.CPUUsage.10="Mielettömän nopea" Encoder.AOM.AV1.Encoder.Profile="Profiili" +Encoder.AOM.AV1.KeyFrames="Avainrruutu" Encoder.AOM.AV1.KeyFrames.IntervalType="Aikaväli Tyyppi" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Framet" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekunnit" Encoder.AOM.AV1.KeyFrames.Interval="Aikaväli" Encoder.AOM.AV1.RateControl="Rate Control -tila" +Encoder.AOM.AV1.RateControl.Mode="Tila" +Encoder.AOM.AV1.RateControl.Mode.CBR="Vakiobittinopeus (Constant Bitrate (CBR))" +Encoder.AOM.AV1.RateControl.Mode.VBR="Muuttuva bittinopeus (Variable Bitrate (VBR))" +Encoder.AOM.AV1.RateControl.Mode.CQ="Rajoitettu laatu (Constrained Quality (CQ))" +Encoder.AOM.AV1.RateControl.Mode.Q="Vakaa laatu (Constant Quality (Q))" +Encoder.AOM.AV1.RateControl.LookAhead="Eteenpäin katsova" +Encoder.AOM.AV1.RateControl.Limits="Raja-arvot" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bittivirran nopeus" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Tuottamattomana jäänyt bittivirrannopeus" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Hyödyttömänä jäänyt bittivirrannopeus" +Encoder.AOM.AV1.RateControl.Limits.Quality="Laatu" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Vähimmäiskvantisoija" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Enimmäiskvantisoija" +Encoder.AOM.AV1.RateControl.Buffer="Puskuri" +Encoder.AOM.AV1.RateControl.Buffer.Size="Koko" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Alkuperäinen koko" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimaalinen koko" +Encoder.AOM.AV1.Advanced="Edistynyt" +Encoder.AOM.AV1.Advanced.Threads="Säikeet" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Per-rivi monisäikeinen" +Encoder.AOM.AV1.Advanced.Tile.Columns="Laatta-sarakkeet" +Encoder.AOM.AV1.Advanced.Tile.Rows="Laatta-rivit" +Encoder.AOM.AV1.Advanced.Tune="Hienosäätö" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metrijärjestelmä" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="Huippusignaali-kohinasuhde (PSNR (peak signal-to-noise ratio))" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="Rakenteellinen samankaltaisuusindeksi (SSIM (structural similarity index))" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (esikäsittelyllä)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (ilman esikäsittelyä)" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Näyttö" +Encoder.FFmpeg.Suffix=" (FFmpegin välityksellä)" Encoder.FFmpeg.KeyFrames.IntervalType="Aikaväli Tyyppi" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Framet" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunnit" Encoder.FFmpeg.KeyFrames.Interval="Aikaväli" +Encoder.FFmpeg.AMF.Preset="Esiasetus" +Encoder.FFmpeg.AMF.Preset.Speed="Nopeus" +Encoder.FFmpeg.AMF.Preset.Balanced="Tasapainotettu" +Encoder.FFmpeg.AMF.Preset.Quality="Laatu" +Encoder.FFmpeg.AMF.RateControl="Virrannopeuden hallinnan asetukset" +Encoder.FFmpeg.AMF.RateControl.Mode="Tila" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Vaihteleva bittivirrannopeus (viive rajattu)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Vakaa bittivirrannopeus" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Eteenpäin katsova" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Ruudun ohitus" +Encoder.FFmpeg.AMF.RateControl.Limits="Raja-arvot" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Puskurin koko" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Bittivirrannopeustavoite" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Enimmäisbittivirrannopeus" +Encoder.FFmpeg.AMF.RateControl.QP="Kvantifiointiparametrit" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-kehyksen kvantifiointiparametrit" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-kehyksen kvantifiointiparametrit" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-kehyksen kvantifiointiparametrit" +Encoder.FFmpeg.AMF.Other="Muut valinnat" +Encoder.FFmpeg.AMF.Other.BFrames="B-kehysten enimmäismäärä" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-kehyksen viitetilat" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Viitekehykset" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Pakota HRD" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Käyttöoikeusyksikön Erotin" +Encoder.FFmpeg.NVENC.Preset="Esiasetus" Encoder.FFmpeg.NVENC.Preset.default="Oletus" Encoder.FFmpeg.NVENC.Preset.slow="Hidas" Encoder.FFmpeg.NVENC.Preset.medium="Keskinopea" Encoder.FFmpeg.NVENC.Preset.fast="Nopea" +Encoder.FFmpeg.NVENC.Preset.hp="Korkea suorituskyky" +Encoder.FFmpeg.NVENC.Preset.hq="Korkea laatu" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay-levy" +Encoder.FFmpeg.NVENC.Preset.ll="Alhainen viive" +Encoder.FFmpeg.NVENC.Preset.llhq="Alhainen viive, korkea laatu" +Encoder.FFmpeg.NVENC.Preset.llhp="Alhainen viive, korkea suorituskyky" +Encoder.FFmpeg.NVENC.Preset.lossless="Häviötön" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Häviötön korkea suorituskyky" +Encoder.FFmpeg.NVENC.Preset.p1="Nopein (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Nopeampi (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Nopea (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Keskinopea (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Hidas (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Hitaampi (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Hitain (P7)" +Encoder.FFmpeg.NVENC.Tune="Hienosäätö" +Encoder.FFmpeg.NVENC.Tune.hq="Korkea laatu" +Encoder.FFmpeg.NVENC.Tune.ll="Alhainen viive" +Encoder.FFmpeg.NVENC.Tune.ull="Erittäin alhainen viive" +Encoder.FFmpeg.NVENC.Tune.lossless="Häviötön" +Encoder.FFmpeg.NVENC.RateControl="Virrannopeuden hallinnan asetukset" +Encoder.FFmpeg.NVENC.RateControl.Mode="Tila" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Vakaa kvantitaatioparametri" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Vaihteleva bittivirta" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Vakaa bittivirta" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Eteenpäin katsova" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Mukautuvat I-kehykset" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Mukautuvat B-kehykset" +Encoder.FFmpeg.NVENC.RateControl.Limits="Raja-arvot" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Puskurin koko" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Kohteen laatu" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Bittivirrannopeustavoite" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Enimmäisbittivirrannopeus" +Encoder.FFmpeg.NVENC.RateControl.QP="Kvantifiointiparametrit" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Vähimmäiskvantifiointiparametrit" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Enimmäiskvantifiointiparametrit" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-kehyksen kvantifiointiparametrit" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-kehyksen kvantifiointiparametrit" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-kehyksen kvantifiointiparametrit" +Encoder.FFmpeg.NVENC.AQ="Mukautuva Kvantifiointi" +Encoder.FFmpeg.NVENC.AQ.Spatial="Spatiaalinen mukautuva kvantitaatio" +Encoder.FFmpeg.NVENC.AQ.Strength="Spatiaalisen mukautuvan kvantitaation voima" +Encoder.FFmpeg.NVENC.Other="Muut valinnat" +Encoder.FFmpeg.NVENC.Other.BFrames="B-kehysten enimmäismäärä" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-kehyksen viitetila" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Viitteenä ei käytetä B-kehyksiä" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Ainoastaan B-kehykset/2 käytetään viitteenä" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Jokainen B-kehys käytetään viitteenä" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Ei-viitetilan P-kehykset" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Viitetilan kehykset" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Alhaisen viiveen avainkehyksen mittakaava" Blur.Type.Box="Kuutiollinen" Blur.Type.BoxLinear="Kuutio lineaarinen" @@ -104,12 +212,45 @@ Shader="Shaderit" Shader.Refresh="Päivitä asetukset ja parametrit" Shader.Shader="Varjostimen Asetukset" Shader.Shader.File="Tiedosto" +Shader.Shader.Technique="Tekniikka" +Shader.Shader.Size="Koko" +Shader.Shader.Size.Width="Leveys" +Shader.Shader.Size.Height="Korkeus" +Shader.Parameters="Varjostimen parametrit" +Shader.Parameter.Texture.Type="Tyyppi" +Shader.Parameter.Texture.Type.File="Tiedosto" +Shader.Parameter.Texture.Type.Source="Lähde" +Shader.Parameter.Texture.File="Tiedosto" +Shader.Parameter.Texture.Source="Lähde" Filter.Shader="Shaderit" Source.Shader="Shaderit" Transition.Shader="Shaderit" +Filter.AutoFraming.Tracking="Seurantavalinnat" +Filter.AutoFraming.Tracking.Mode="Tila" +Filter.AutoFraming.Motion="Liikevalinnat" +Filter.AutoFraming.Framing="Ruutuvalinnat" +Filter.AutoFraming.Framing.Stability="Vakaus" Filter.AutoFraming.Framing.Offset="Siirtymä" +Filter.AutoFraming.Framing.AspectRatio="Kuvasuhde" +Filter.AutoFraming.Provider="Tarjoaja" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection:n kasvontunnistus, NVIDIA® Broadcast:n toimittamana" +Filter.Blur.Subtype="Alityyppi" +Filter.Blur.Size="Koko" +Filter.Blur.Angle="Kulma (asteet)" +Filter.Blur.Mask="Käytä peitettä" +Filter.Blur.Mask.Type="Peitteen tyyppi" +Filter.Blur.Mask.Type.Region="Alue" +Filter.Blur.Mask.Type.Image="Kuva" +Filter.Blur.Mask.Type.Source="Lähde" +Filter.Blur.Mask.Region.Left="Vasen reuna" +Filter.Blur.Mask.Region.Top="Yläreuna" +Filter.Blur.Mask.Region.Right="Oikea reuna" +Filter.Blur.Mask.Region.Bottom="Alareuna" +Filter.Blur.Mask.Region.Feather="Sulan alue" +Filter.Blur.Mask.Region.Invert="Käänteinen alue" +Filter.Blur.Mask.Image="Kuvan peite" Filter.Blur.Mask.Source="Lähteen Maski" Filter.Blur.Mask.Color="Värisuodin" Filter.Blur.Mask.Alpha="Maskin läpinäkyvyys" @@ -157,10 +298,40 @@ Filter.ColorGrade.Tint.Midtone.Blue="Sinisen Keskisävy" Filter.ColorGrade.Tint.Highlight.Red="Punaisen Korostus Sävy" Filter.ColorGrade.Tint.Highlight.Green="Vihreän Korostus Sävy" Filter.ColorGrade.Tint.Highlight.Blue="Sinisen Korostus Sävy" +Filter.ColorGrade.Correction="Värinkorjaus" +Filter.ColorGrade.Correction.Hue="Värisävy" +Filter.ColorGrade.Correction.Saturation="Kylläisyys" +Filter.ColorGrade.Correction.Lightness="Vaaleus" +Filter.ColorGrade.Correction.Contrast="Kontrasti" +Filter.ColorGrade.RenderMode="Renderöintitila" +Filter.ColorGrade.RenderMode.Direct="Suora renderöinti" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-Bittinen Look-Up -taulukko" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-Bittinen Look-Up -taulukko" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-Bittinen Look-Up -taulukko" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-Bittinen Look-Up -taulukko" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-Bittinen Look-Up -taulukko" +Filter.Denoising="Kohinan poisto" +Filter.Denoising.Provider="Tarjoaja" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising:n kohinanpoisto, NVIDIA® Broadcast:n toimittamana" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising:n kohinanpoisto" +Filter.Denoising.NVIDIA.Denoising.Strength="Voima" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Heikko" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Vahva" +Filter.Displacement.File="Tiedosto" +Filter.DynamicMask.Channel.Multiplier="Kerroin" +Filter.SDFEffects="SDF-tehosteet" +Filter.SDFEffects.Shadow.Inner="Sisäinen varjo" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Sisäisen varjon vähimmäisetäisyys" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Sisäisen varjon enimmäisetäisyys" +Filter.SDFEffects.Shadow.Inner.Offset.X="Sisäisen varjon siirtymä X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Sisäisen varjon siirtymä Y" +Filter.SDFEffects.Shadow.Inner.Color="Sisäisen varjon väri" +Filter.SDFEffects.Shadow.Inner.Alpha="Sisäisen varjon Alpha" +Filter.SDFEffects.Glow.Outer="Ulkoinen hehku" Filter.SDFEffects.Glow.Outer.Color="Ulomman Hehkun Väri" Filter.SDFEffects.Glow.Outer.Alpha="Ulomman Hehkun Läpinäkyvyys" Filter.SDFEffects.Glow.Outer.Width="Ulomman Hehkun Paksuus" @@ -181,6 +352,8 @@ Filter.SDFEffects.SDF.Threshold="Sdf Alpha -kynnysarvo" Filter.Transform="3D muunnin" Filter.Transform.Camera="Kamera" +Filter.Transform.Camera.Mode="Tila" +Filter.Transform.Camera.Mode.Orthographic="Ortografinen" Filter.Transform.Camera.FieldOfView="Näkökenttä" Filter.Transform.Position="Sijainti" Filter.Transform.Position.X="X" @@ -191,11 +364,62 @@ Filter.Transform.Scale.X="X" Filter.Transform.Scale.Y="Y" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Kierto" +Filter.Transform.Rotation.Z="Rullaa (Z)" +Filter.Transform.Rotation.Order="Kierron järjestys" +Filter.Transform.Corners.TopLeft="Ylävasen" +Filter.Transform.Corners.TopRight="Yläoikea" +Filter.Transform.Corners.BottomLeft="Alavasen" +Filter.Transform.Corners.BottomRight="Alaoikea" +Filter.Upscaling.Provider="Tarjoaja" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Voima" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Heikko" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Vahva" +Filter.VirtualGreenscreen.Provider="Tarjoaja" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Tila" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Suorituskyky" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Laatu" +Source.Mirror.Source="Lähde" +Source.Mirror.Source.Audio="Ota ääni käyttöön" +Source.Mirror.Source.Audio.Layout="Äänen asettelu" +Source.Mirror.Source.Audio.Layout.Unknown="Tuntematon" +Source.Mirror.Source.Audio.Layout.Mono="Yksikanavainen (mono)" +Source.Mirror.Source.Audio.Layout.Quadraphonic="3D-äänen simulointi neljällä kaiuttimella" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="3D-äänen simulointi neljällä kaiuttimella LFE:neen" +Codec.AV1.Profile="Profiili" +Codec.AV1.Profile.Main="Ensisijainen" +Codec.AV1.Profile.High="Korkea" +Codec.H264="H264" +Codec.H264.Profile="Profiili" +Codec.HEVC="HEVC (High Efficiency Video Coding)" +Codec.HEVC.Profile="Profiili" +Codec.HEVC.Profile.main="Ensisijainen" +Codec.HEVC.Profile.main10="Ensisijainen 10-bittinen" +Codec.HEVC.Profile.rext="Alue laajennettu" +Codec.HEVC.Tier="Kolmas osapuoli" +Codec.HEVC.Tier.main="Ensisijainen" +Codec.HEVC.Tier.high="Korkea" +Codec.HEVC.Level="Taso" +Codec.ProRes.Profile="Profiili" +Codec.ProRes.Profile.APCO="422 Välityspalvelin (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Vakio (APCN)" +Codec.ProRes.Profile.APCH="422 Korkealaatuinen/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Korkealaatuinen/HQ (APCH)" +Codec.ProRes.Profile.AP4X="4444 Äärimmäisen korkealaatuinen/XQ (AP4X)" + +Codec.DNxHR.Profile="Profiili" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR LB (444:4:4)" diff --git a/data/locale/fo-FO.ini b/data/locale/fo-FO.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/fo-FO.ini +++ b/data/locale/fo-FO.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/fr-FR.ini b/data/locale/fr-FR.ini index e0d373e232..abc1efc49d 100644 --- a/data/locale/fr-FR.ini +++ b/data/locale/fr-FR.ini @@ -151,18 +151,41 @@ Encoder.FFmpeg.AMF.Other.BFrameReferences="Références B-Frame" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Cadres de référence" Encoder.FFmpeg.AMF.Other.EnforceHRD="Forcer le HRD" Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Délimiteur d'unité d'accès" Encoder.FFmpeg.NVENC.Preset="Préréglage" Encoder.FFmpeg.NVENC.Preset.default="Par défaut" Encoder.FFmpeg.NVENC.Preset.slow="Lent" Encoder.FFmpeg.NVENC.Preset.medium="Moyen" Encoder.FFmpeg.NVENC.Preset.fast="Rapide" +Encoder.FFmpeg.NVENC.Preset.hp="Haute Performance" +Encoder.FFmpeg.NVENC.Preset.hq="Haute Qualité" +Encoder.FFmpeg.NVENC.Preset.bd="Disque Blu-Ray" +Encoder.FFmpeg.NVENC.Preset.ll="Latence faible" +Encoder.FFmpeg.NVENC.Preset.llhq="Latence faible, haut qualité" +Encoder.FFmpeg.NVENC.Preset.llhp="Latence faible, haute performance" +Encoder.FFmpeg.NVENC.Preset.lossless="Sans pertes (Lossless)" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Sans perte (Lossless), Haute Performance" +Encoder.FFmpeg.NVENC.Preset.p1="Le plus rapide (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Plus rapide (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Rapide (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Medium (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lent (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Plus lent (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Le plus lent (P7)" Encoder.FFmpeg.NVENC.Tune="Ajustement" +Encoder.FFmpeg.NVENC.Tune.hq="Haute Qualité" +Encoder.FFmpeg.NVENC.Tune.ll="Latence faible" +Encoder.FFmpeg.NVENC.Tune.ull="Latence ultra faible" +Encoder.FFmpeg.NVENC.Tune.lossless="Sans pertes (Lossless)" Encoder.FFmpeg.NVENC.RateControl="Options de contrôle du débit" Encoder.FFmpeg.NVENC.RateControl.Mode="Mode" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Paramètre de quantification constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Débit variable" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Débit constant" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Deux passes" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Single Pass" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prédiction (Look-ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames adaptatives" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="B-Frames adaptatives" @@ -467,3 +490,5 @@ Codec.ProRes.Profile.APCH="422 Haute Qualité/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Haute Qualité/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Qualité Extrême/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" + diff --git a/data/locale/ga-IE.ini b/data/locale/ga-IE.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/ga-IE.ini +++ b/data/locale/ga-IE.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/he-IL.ini b/data/locale/he-IL.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/he-IL.ini +++ b/data/locale/he-IL.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/hr-HR.ini b/data/locale/hr-HR.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/hr-HR.ini +++ b/data/locale/hr-HR.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/hu-HU.ini b/data/locale/hu-HU.ini index 60a4ba06f7..27937792ac 100644 --- a/data/locale/hu-HU.ini +++ b/data/locale/hu-HU.ini @@ -92,19 +92,40 @@ Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Bitsebesség felső korlá Encoder.AOM.AV1.RateControl.Limits.Quality="Minőség" Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimum kvantálás" Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maximum kvantálás" +Encoder.AOM.AV1.RateControl.Buffer="Puffer" Encoder.AOM.AV1.RateControl.Buffer.Size="Méret" - +Encoder.AOM.AV1.Advanced="Haladó" +Encoder.AOM.AV1.Advanced.Tune="Hangolás" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Képernyő" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" + +Encoder.FFmpeg="FFmpeg beállítások" +Encoder.FFmpeg.CustomSettings="Egyéni beállítások" +Encoder.FFmpeg.GPU="GPU" Encoder.FFmpeg.KeyFrames.IntervalType="Időtartam egysége" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Képkocka" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Másodperc" Encoder.FFmpeg.KeyFrames.Interval="Időköz" Encoder.FFmpeg.AMF.Preset="Alapbeállítások" +Encoder.FFmpeg.AMF.Preset.Speed="Sebesség" +Encoder.FFmpeg.AMF.Preset.Balanced="Kiegyensúlyozott" Encoder.FFmpeg.AMF.Preset.Quality="Minőség" Encoder.FFmpeg.AMF.RateControl="Sebesség vezérlés beállítások" Encoder.FFmpeg.AMF.RateControl.Mode="Mód" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Állandó bitsebesség" Encoder.FFmpeg.AMF.RateControl.LookAhead="Előretekintés" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Képkocka kihagyás" Encoder.FFmpeg.AMF.RateControl.Limits="Korlátok" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Pufferméret" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Célbitsebesség" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maximális bitsebesség" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Képkocka QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-Képkocka QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-Képkocka QP" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" Encoder.FFmpeg.NVENC.Preset="Alapbeállítások" Encoder.FFmpeg.NVENC.Preset.default="Alapértelmezett" @@ -143,6 +164,14 @@ Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Két fázisú - teljes felbo Encoder.FFmpeg.NVENC.RateControl.LookAhead="Előretekintés" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptív közteskockák" Encoder.FFmpeg.NVENC.RateControl.Limits="Korlátok" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Pufferméret" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Célbitsebesség" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximális bitsebesség" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimális QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maximális QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Képkocka QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Képkocka QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Képkocka QP" Shader.Shader.File="Fájl" @@ -156,20 +185,27 @@ Shader.Parameter.Texture.File="Fájl" Shader.Parameter.Texture.Source="Forrás" Filter.AutoFraming.Tracking.Mode="Mód" +Filter.AutoFraming.Tracking.Mode.Group="Csoport" +Filter.AutoFraming.Provider="Szolgáltató" Filter.Blur.Type="Típus" Filter.Blur.Size="Méret" Filter.Blur.Mask.Type.Image="Kép" Filter.Blur.Mask.Type.Source="Forrás" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" Filter.ColorGrade.Tint.Mode.Linear="Lineáris" Filter.ColorGrade.Correction.Saturation="Telítettség" Filter.ColorGrade.Correction.Contrast="Kontraszt" +Filter.Denoising.Provider="Szolgáltató" Filter.Displacement.File="Fájl" +Filter.DynamicMask.Channel="%s csatorna" +Filter.SDFEffects.Outline="Körvonal" +Filter.SDFEffects.Outline.Color="Körvonal színe" Filter.Transform.Camera="Kamera" Filter.Transform.Camera.Mode="Mód" @@ -182,12 +218,19 @@ Filter.Transform.Scale.Y="Y" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" +Filter.Upscaling.Provider="Szolgáltató" +Filter.VirtualGreenscreen.Provider="Szolgáltató" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Mód" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Minőség" Source.Mirror.Source="Forrás" +Source.Mirror.Source.Audio="Hang engedélyezése" +Source.Mirror.Source.Audio.Layout.Unknown="Ismeretlen" +Source.Mirror.Source.Audio.Layout.Mono="Monó" +Source.Mirror.Source.Audio.Layout.Stereo="Sztereó" +Codec.AV1="AV1" Codec.AV1.Profile="Profil" Codec.H264="H264" @@ -198,3 +241,11 @@ Codec.HEVC.Profile="Profil" Codec.ProRes.Profile="Profil" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/id-ID.ini b/data/locale/id-ID.ini index 82b490d768..bb910483f0 100644 --- a/data/locale/id-ID.ini +++ b/data/locale/id-ID.ini @@ -35,5 +35,6 @@ UI.Updater.Dialog.Version.Latest="Versi Terkini:" + diff --git a/data/locale/is-IS.ini b/data/locale/is-IS.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/is-IS.ini +++ b/data/locale/is-IS.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index 72cea44bfc..3d13ad3ff5 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -498,3 +498,11 @@ Codec.ProRes.Profile.APCH="422 Alta Qualità/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Alta Qualità/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Qualità estrema/XQ (AP4X)" +Codec.DNxHR.Profile="Profilo" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index e1fadb3384..711df7a2b8 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -470,3 +470,5 @@ Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.DNxHR.Profile="プロファイル" + diff --git a/data/locale/ko-KR.ini b/data/locale/ko-KR.ini index 0b9663ded3..a33f3db733 100644 --- a/data/locale/ko-KR.ini +++ b/data/locale/ko-KR.ini @@ -130,3 +130,4 @@ Source.Mirror.Source="소스" + diff --git a/data/locale/mn-MN.ini b/data/locale/mn-MN.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/mn-MN.ini +++ b/data/locale/mn-MN.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/nl-NL.ini b/data/locale/nl-NL.ini index 847815af58..b616837c1b 100644 --- a/data/locale/nl-NL.ini +++ b/data/locale/nl-NL.ini @@ -158,7 +158,17 @@ Encoder.FFmpeg.NVENC.Preset.default="Standaard" Encoder.FFmpeg.NVENC.Preset.slow="Traag" Encoder.FFmpeg.NVENC.Preset.medium="Gemiddeld" Encoder.FFmpeg.NVENC.Preset.fast="Snel" +Encoder.FFmpeg.NVENC.Preset.hp="Hoge prestaties" +Encoder.FFmpeg.NVENC.Preset.hq="Hoge Kwaliteit" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay Schijf" +Encoder.FFmpeg.NVENC.Preset.ll="Lage Latentie" +Encoder.FFmpeg.NVENC.Preset.llhq="Lage Latentie, Hoge Kwaliteit" +Encoder.FFmpeg.NVENC.Preset.llhp="Lage Latency, Hoge Prestaties" +Encoder.FFmpeg.NVENC.Preset.lossless="Lossless" Encoder.FFmpeg.NVENC.Tune="Afstemmen" +Encoder.FFmpeg.NVENC.Tune.hq="Hoge Kwaliteit" +Encoder.FFmpeg.NVENC.Tune.ll="Lage Latentie" +Encoder.FFmpeg.NVENC.Tune.lossless="Lossless" Encoder.FFmpeg.NVENC.RateControl="Opties voor Snelheidsregeling" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Constante Kwantisatie Parameter" @@ -470,3 +480,5 @@ Codec.ProRes.Profile.APCH="422 Hoge Kwaliteit/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Hoge Kwaliteit/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Kwaliteit/XQ (AP4X)" +Codec.DNxHR.Profile="Profiel" + diff --git a/data/locale/no-NO.ini b/data/locale/no-NO.ini index 50cf4f8ed8..05fc4c9921 100644 --- a/data/locale/no-NO.ini +++ b/data/locale/no-NO.ini @@ -238,3 +238,5 @@ Codec.HEVC.Tier.main="Main" Codec.ProRes.Profile="Profil" +Codec.DNxHR.Profile="Profil" + diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index 1c61ed5aac..5b02db84c7 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -469,3 +469,11 @@ Codec.ProRes.Profile.APCH="422 Wysoka jakość/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Wysoka jakość/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Ekstremalna jakość/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/pt-BR.ini b/data/locale/pt-BR.ini index a9ce0672da..4f8f77c88e 100644 --- a/data/locale/pt-BR.ini +++ b/data/locale/pt-BR.ini @@ -381,3 +381,5 @@ Codec.ProRes.Profile.APCH="422 Alta Qualidade/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Alta Qualidade/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Qualidade Extrema/XQ (AP4X)" +Codec.DNxHR.Profile="Perfil" + diff --git a/data/locale/pt-PT.ini b/data/locale/pt-PT.ini index 143ffb8dae..60fd315158 100644 --- a/data/locale/pt-PT.ini +++ b/data/locale/pt-PT.ini @@ -136,3 +136,4 @@ Source.Mirror.Source="Fonte" + diff --git a/data/locale/ro-RO.ini b/data/locale/ro-RO.ini index da6ae89cea..d6cbba34ae 100644 --- a/data/locale/ro-RO.ini +++ b/data/locale/ro-RO.ini @@ -269,3 +269,11 @@ Source.Mirror.Source="Sursă" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/ru-RU.ini b/data/locale/ru-RU.ini index 0962e1c682..6c4553e785 100644 --- a/data/locale/ru-RU.ini +++ b/data/locale/ru-RU.ini @@ -498,3 +498,11 @@ Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.DNxHR.Profile="Профиль" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" + diff --git a/data/locale/sh-HR.ini b/data/locale/sh-HR.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/sh-HR.ini +++ b/data/locale/sh-HR.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/si-LK.ini b/data/locale/si-LK.ini index cddd4c23fe..8071b227a6 100644 --- a/data/locale/si-LK.ini +++ b/data/locale/si-LK.ini @@ -43,3 +43,4 @@ Source.Mirror.Source="මූලාශ්‍රය" + diff --git a/data/locale/sv-SE.ini b/data/locale/sv-SE.ini index 5243aaa089..2260529019 100644 --- a/data/locale/sv-SE.ini +++ b/data/locale/sv-SE.ini @@ -47,3 +47,4 @@ Source.Mirror.Source="Källa" + diff --git a/data/locale/th-TH.ini b/data/locale/th-TH.ini index c75aeadc52..16238833d2 100644 --- a/data/locale/th-TH.ini +++ b/data/locale/th-TH.ini @@ -126,3 +126,5 @@ Codec.HEVC.Tier.high="สูง" Codec.ProRes.Profile="โปรไฟล์" +Codec.DNxHR.Profile="โปรไฟล์" + diff --git a/data/locale/tr-TR.ini b/data/locale/tr-TR.ini index a9e6f8b9bc..bae4b469b0 100644 --- a/data/locale/tr-TR.ini +++ b/data/locale/tr-TR.ini @@ -281,3 +281,5 @@ Codec.ProRes.Profile.APCH="422 Yüksek Kalite/HQ (APCH)" Codec.ProRes.Profile.AP4H="4444 Yüksek Kalite/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Ekstrem Kalite/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" + diff --git a/data/locale/uk-UA.ini b/data/locale/uk-UA.ini index b5f01429e6..005bf0eed3 100644 --- a/data/locale/uk-UA.ini +++ b/data/locale/uk-UA.ini @@ -47,5 +47,6 @@ UI.Updater.Dialog.Button.Cancel="Нагадайте мені пізніше" + diff --git a/data/locale/vi-VN.ini b/data/locale/vi-VN.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/vi-VN.ini +++ b/data/locale/vi-VN.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index 4b8ba116e9..007c3d73b5 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -496,3 +496,5 @@ Codec.ProRes.Profile.APCH="422 高品质/高清(APCH)" Codec.ProRes.Profile.AP4H="4444 高品质/高清(AP4H)" Codec.ProRes.Profile.AP4X="444 超高品质/XQ (AP4X)" +Codec.DNxHR.Profile="配置" + diff --git a/data/locale/zh-HK.ini b/data/locale/zh-HK.ini index 9776ccf076..975a9c217f 100644 --- a/data/locale/zh-HK.ini +++ b/data/locale/zh-HK.ini @@ -25,5 +25,6 @@ + diff --git a/data/locale/zh-TW.ini b/data/locale/zh-TW.ini index 95e8158497..d85898ccc7 100644 --- a/data/locale/zh-TW.ini +++ b/data/locale/zh-TW.ini @@ -85,3 +85,4 @@ Filter.ColorGrade.Tint.Mode.Linear="線性" + From f1605807948f1c871a0bf8133e7f0ac16305bb0c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 10 May 2022 19:29:58 +0200 Subject: [PATCH 012/164] cmake: Improve build system with additional features and options - Moved all auto-dependencies to a uniform subdirectory for easier caching and cleanup. - Add an option to download or specify a path for libOBS+obs-frontend-api. - Remove the dependency on the non-standard obs-frontend-apiConfig.cmake file. - Add an option to download or specify a path for OBS Dependencies. - Add an option to download or specify a path for Qt. - Add an option to download or specify a path for AOM. - Fix and improve architecture and platform detection. - Fix some messages having two :, or no prefix at all. - Fix detection of obs-frontend-api. - Fix applying custom compiler and linker flags for MSVC and GNU-style builds. - Use target_compile_options over add_compile_options for compatibility. --- .github/workflows/codeql-analysis.yml | 36 +- .github/workflows/main.yml | 129 ++--- .github/workflows/validate.yml | 42 +- CMakeLists.txt | 666 +++++++++++++++----------- cmake/modules/Architecture.cmake | 41 -- 5 files changed, 456 insertions(+), 458 deletions(-) delete mode 100644 cmake/modules/Architecture.cmake diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7297e69872..b6d3568e3a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,27 +1,14 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# name: "CodeQL" on: push: branches: + - 'master' + tags: - '*' - - '!i18n_master' - - '!l10n_master' pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '37 20 * * 4' + branches: + - '*' env: OBS_VERSION: "27.0.0-ci" @@ -88,20 +75,18 @@ jobs: cmake \ ninja-build \ git \ - gcc-9 g++9 \ qt5-default libqwt-qt5-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9 - - name: "libobs: Cache" + - name: "Dependencies: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | - build/temp/libobs-download - build/temp/libobs-build - build/temp/libobs-src - key: libobs-codeql-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }} + build/temp/autodeps + key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} - name: "StreamFX: Configure" shell: bash @@ -110,11 +95,8 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE \ -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DPACKAGE_PREFIX="build/package" \ - -DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-ubuntu-x86-64.7z" \ - -DDOWNLOAD_OBS_HASH="SHA256=0AF6C7262C37D80C24CB18523A851FD765C04E766D8EB0F4AC0F6E75D13A035F" + -DPACKAGE_PREFIX="build/package" - name: "StreamFX: Build" shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8205e6d4f3..39f69276ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,9 +11,7 @@ on: - '*' env: - QT_VERSION: "5.15.2" - OBS_VERSION: "27.0.0-ci" - OBSDEPS_VERSION: "27.0.0" + CACHE_VERSION: 1 LIBAOM_VERSION: "3.2.0.0" jobs: @@ -41,48 +39,15 @@ jobs: with: submodules: recursive fetch-depth: 0 - - name: "libobs: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/libobs-download - build/temp/libobs-build - build/temp/libobs-src - key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }} - - name: "obsdeps: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/obsdeps-download - build/temp/obsdeps-build - build/temp/obsdeps-src - key: obsdeps-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }} - - name: "qt: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/qt-download - build/temp/qt-build - build/temp/qt-src - key: qt-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }} - - name: "libaom: Cache" + + - name: "Dependencies: Cache" if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 - id: libaom-cache with: path: | - build/libaom - key: libaom-${{ matrix.id }}-${{ env.LIBAOM_VERSION }}-${{ secrets.CACHE_VERSION }} - - name: "libaom: Install" - if: ${{ steps.libaom-cache.outputs.cache-hit != 'true' }} - id: libaom-install - shell: bash - run: | - curl -L -o "aom.7z" "https://github.com/Xaymar/aom/releases/download/v${{ env.LIBAOM_VERSION }}/aom-windows-64-shared.7z" - 7z x -y -o"build/libaom/" "aom.7z" + build/temp/autodeps + key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} + - name: "Code Signing" if: ${{ github.event_name != 'pull_request' }} id: codesign @@ -91,6 +56,7 @@ jobs: # Restore the Certificate back into a file. echo "${{ secrets.CODESIGN_CERT_WIN }}" | base64 --decode > "${{ github.workspace }}/cert.pfx" echo "::set-output name=cmake_args::-DENABLE_CODESIGN=ON -DCODESIGN_TIMESTAMPS=ON" + - name: "StreamFX: Configure" shell: bash env: @@ -103,28 +69,25 @@ jobs: -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ -DPACKAGE_PREFIX="build/package" \ - -DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-windows-x86-64.7z" \ - -DDOWNLOAD_OBS_HASH="SHA256=EBF9853C8A553E16ECBCA22523F401E6CF1EB2E8DA93F1493FEF41D65BD06633" \ - -DDOWNLOAD_OBSDEPS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBSDEPS_VERSION }}/deps-windows-x86.7z" \ - -DDOWNLOAD_OBSDEPS_HASH="SHA256=B4AED165016F0B64A7E8B256CCC12EAF8AF087F61B0B239B9D3D00277485B5B5" \ - -DDOWNLOAD_QT=ON \ - -DDOWNLOAD_QT_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBSDEPS_VERSION }}/qt-${{ env.QT_VERSION }}-windows-x86-64.7z" \ - -DDOWNLOAD_QT_HASH="SHA256=109B9C21EF165B0C46DFAA9AD23124F2070ED4D74207C4AFB308183CB8D43BDD" \ -DAOM_PATH="build/libaom/" + - name: "StreamFX: Build" shell: bash run: | cmake --build "build/temp" --config RelWithDebInfo --target INSTALL + - name: "StreamFX: Package (Install Prerequisites)" run: | curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.1.2.exe" "-f" "--retry" "5" "-o" "inno.exe" .\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART + - name: "StreamFX: Package" shell: bash run: | mkdir build/package cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP + - name: "StreamFX: Signed Installer Preparation" if: ${{ github.event_name != 'pull_request' }} id: codesign_install @@ -134,11 +97,13 @@ jobs: signtool=$(awk 'match($0, /^;signtool=(.+)$/, ary) {print ary[1]}' "${{ github.workspace }}/build/temp/installer.iss") echo "::set-output name=iscc_signtool::${signtool}" fi + - name: "StreamFX: Package Installer" shell: cmd run: | echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss"' "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss" + - name: "Artifacts" uses: actions/upload-artifact@v1 with: @@ -178,6 +143,7 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: "Prerequisites: Apt-Get" shell: bash run: | @@ -195,36 +161,36 @@ jobs: libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev ${{ matrix.extra_command }} - - name: "libobs: Cache" + + - name: "Dependencies: Cache" if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | - build/temp/libobs-download - build/temp/libobs-build - build/temp/libobs-src - key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }} + build/temp/autodeps + key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} + - name: "StreamFX: Configure" shell: bash run: | cmake -H. -B"build/temp" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE \ -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DPACKAGE_PREFIX="build/package" \ - -DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-ubuntu-x86-64.7z" \ - -DDOWNLOAD_OBS_HASH="SHA256=0AF6C7262C37D80C24CB18523A851FD765C04E766D8EB0F4AC0F6E75D13A035F" + -DPACKAGE_PREFIX="build/package" + - name: "StreamFX: Build" shell: bash run: | cmake --build "build/temp" --config RelWithDebInfo --target install + - name: "StreamFX: Package" shell: bash run: | mkdir build/package cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP + - name: "Artifacts" uses: actions/upload-artifact@v1 with: @@ -251,42 +217,15 @@ jobs: with: submodules: recursive fetch-depth: 0 - - name: "libobs: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/libobs-download - build/temp/libobs-build - build/temp/libobs-src - key: libobs-${{ matrix.id }}-${{ env.OBS_VERSION }}-${{ env.DOWNLOAD_OBS_HASH }}-${{ secrets.CACHE_VERSION }} - - name: "obsdeps: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/obsdeps-download - build/temp/obsdeps-build - build/temp/obsdeps-src - key: obsdeps-${{ matrix.id }}-${{ env.OBSDEPS_VERSION }}-${{ env.DOWNLOAD_OBSDEPS_HASH }}-${{ secrets.CACHE_VERSION }} - - name: "qt: Cache" + + - name: "Dependencies: Cache" if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 - id: qt-cache with: path: | - /usr/local/Cellar/qt@5 - key: qt-${{ matrix.id }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }} - - name: "qt: Install" - if: ${{ (github.event_name == 'pull_request') || (steps.qt-cache.outputs.cache-hit != 'true') }} - shell: bash - run: | - brew install qt@5 - - name: "qt: Link" - if: ${{ (github.event_name != 'pull_request') && (steps.qt-cache.outputs.cache-hit != 'false') }} - shell: bash - run: | - brew link qt@5 + build/temp/autodeps + key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} + - name: "StreamFX: Configure" shell: bash run: | @@ -294,22 +233,20 @@ jobs: -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DPACKAGE_PREFIX="build/package" \ - -DQt5_DIR="/usr/local/opt/qt@5/lib/cmake/Qt5/" \ - -DDOWNLOAD_OBS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBS_VERSION }}/obs-studio-x64-0.0.0.0-macos-x86-64.7z" \ - -DDOWNLOAD_OBS_HASH="SHA256=F15BC4CA8EB3F581A94372759CFE554E30D202B604B541445A5756B878E4E799" \ - -DDOWNLOAD_OBSDEPS_URL="https://github.com/Xaymar/obs-studio/releases/download/${{ env.OBSDEPS_VERSION }}/deps-macos-x86_64-2021-03-25.tar.gz" \ - -DDOWNLOAD_OBSDEPS_HASH="SHA256=1C409374BCAB9D5CEEAFC121AA327E13AB222096718AF62F2648302DF62898D6" + -DPACKAGE_PREFIX="build/package" + - name: "StreamFX: Build" shell: bash run: | cmake --build "build/temp" --config RelWithDebInfo --target install + - name: "StreamFX: Package" shell: bash run: | mkdir build/package cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP + - name: 'Packages: Install' shell: bash run: | @@ -317,10 +254,12 @@ jobs: sudo hdiutil attach ./Packages.dmg pushd /Volumes/Packages* sudo installer -pkg ./Install\ Packages.pkg -target / + - name: "Packages: Package" shell: bash run: | packagesbuild ./build/temp/installer.pkgproj + - name: "Artifacts" uses: actions/upload-artifact@v1 with: diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index c48f14dc30..4edce583f3 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,6 +8,9 @@ on: tags: - '*' +env: + CACHE_VERSION: 1 + jobs: clang-format: name: "clang-format" @@ -17,38 +20,53 @@ jobs: CXX: clang++ CMAKE_GENERATOR: "Ninja" steps: - - name: "Clone Repository" - uses: actions/checkout@v1 - - name: "Submodules & Packages" + - name: "Clone" + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + - name: "Prerequisites: Apt-Get" shell: bash run: | - git submodule update --init --recursive sudo apt-get -qq update sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64 sudo apt-get install \ build-essential \ + checkinstall \ + pkg-config \ cmake \ ninja-build \ git \ + ${{ matrix.packages }} \ qt5-default libqwt-qt5-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ - libcurl4-openssl-dev \ - checkinstall pkg-config + libcurl4-openssl-dev sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" - - name: "Cache: Prerequisites" + + - name: "Dependencies: Cache" + if: ${{ github.event_name != 'pull_request' }} uses: actions/cache@v2 with: path: | - build/temp/libobs-download/libobs-download-prefix/src/libobs.7z - key: ubuntu-20.04 - - name: "Configure & Format Project" + build/temp/autodeps + key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} + + - name: "StreamFX: Configure" shell: bash run: | cmake -H. -B"build/temp" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" -DCMAKE_PACKAGE_PREFIX="build/package" \ - -DENABLE_CLANG=TRUE -DENABLE_FILTER_NVIDIA_FACE_TRACKING=FALSE + -DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" \ + -DCMAKE_PACKAGE_PREFIX="build/package" \ + -DENABLE_CLANG=TRUE + + - name: "StreamFX: Format" + shell: bash + run: | cmake --build "build/temp" --config RelWithDebInfo --target StreamFX_CLANG-FORMAT + - name: "Validate Formatting" shell: bash run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index acaa87c67a..fb65093814 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,7 +176,6 @@ set(CMAKE_MODULE_PATH ) # Include -include("Architecture") # Architecture Detection include("util") # CacheClear, CacheSet include("DownloadProject") # DownloadProject @@ -201,72 +200,57 @@ else() endif() # Architecture -set(D_PLATFORM_INSTR ${ARCH_INST}) -if(ARCH_INST STREQUAL "x86") - set(D_PLATFORM_INSTR_X86 ON) - set(D_PLATFORM_ARCH_X86 ON) -elseif(ARCH_INST STREQUAL "ARM") - set(D_PLATFORM_INSTR_ARM ON) - set(D_PLATFORM_ARCH_ARM ON) -elseif(ARCH_INST STREQUAL "IA64") - set(D_PLATFORM_INSTR_ITANIUM ON) - set(D_PLATFORM_ARCH_ITANIUM ON) +set(ARCH_INSTR_32 "i386;i686;x86;arm;ARM") +set(ARCH_INSTR_64 "x86_64;AMD64;IA64;arm64;ARM64") +set(ARCH_INSTR_X86 "i386;i686;x86;x86_64;AMD64") +set(ARCH_INSTR_ARM "arm;ARM;arm64;ARM64") +set(ARCH_INSTR_ITANIUM "IA64") +set(ARCH_BITS 0) +set(ARCH_BITS_POINTER 0) +set(ARCH_INST "") + +# - Bitness +list(FIND ARCH_INSTR_32 "${CMAKE_SYSTEM_PROCESSOR}" FOUND) +if(FOUND GREATER -1) + set(ARCH_BITS 32) endif() -set(D_PLATFORM_ARCH ${ARCH_INST}) -# Bitness +list(FIND ARCH_INSTR_64 "${CMAKE_SYSTEM_PROCESSOR}" FOUND) +if(FOUND GREATER -1) + set(ARCH_BITS 64) +endif() set(D_PLATFORM_BITS ${ARCH_BITS}) -set(D_PLATFORM_BITS_PTR ${ARCH_BITS_POINTER}) - -################################################################################ -# C/C++ Compiler Adjustments -################################################################################ -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) - message(STATUS "Applying custom flags for MSVC style build.") - - # MSVC/ClangCL - # - Dynamically link Microsoft C/C++ Redistributable. - # - Enable /W3 and disable useless warnings. - # - Enable C++ exceptions with SEH exceptions. - # - Enable multi-processor compiling. - - # Build with dynamic MSVC linkage. - add_compile_options( - $<$:/MD> - $<$:/MDd> - $<$:/MD> - $<$:/MD> - $<$:/MD> - ) - - # Enable most useful warnings. - set(DISABLED_WARNINGS - "/wd4061" "/wd4100" "/wd4180" "/wd4201" "/wd4464" "/wd4505" "/wd4514" - "/wd4571" "/wd4623" "/wd4625" "/wd4626" "/wd4668" "/wd4710" "/wd4774" - "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd26812" - ) - add_compile_options("/W3") - foreach(WARN ${DISABLED_WARNINGS}) - add_compile_options("${WARN}") - endforeach() - # C++ Exceptions & SEH - add_compile_options("/EHa") +# - Pointer Size (bits) +math(EXPR ARCH_BITS_POINTER "8*${CMAKE_SIZEOF_VOID_P}") +set(D_PLATFORM_BITS_PTR ${ARCH_BITS_POINTER}) - # Multiprocessor compiling - add_compile_options("/MP") -elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - message(STATUS "Applying custom flags for GNU style build.") +# - Basic Instruction Set +list(FIND ARCH_INSTR_X86 "${CMAKE_SYSTEM_PROCESSOR}" FOUND) +if(FOUND GREATER -1) + list(APPEND ARCH_INST "x86") + set(D_PLATFORM_INSTR_X86 ON) + set(D_PLATFORM_ARCH_X86 ON) +endif() - # Clang/AppleClang/GNU - # - Don't export by default. (Temporarily disabled) - # - Enable all and extra warnings. +list(FIND ARCH_INSTR_ARM "${CMAKE_SYSTEM_PROCESSOR}" FOUND) +if(FOUND GREATER -1) + list(APPEND ARCH_INST "ARM") + set(D_PLATFORM_INSTR_ARM ON) + set(D_PLATFORM_ARCH_ARM ON) +endif() - add_compile_options("-Wall") - add_compile_options("-Wextra") - # add_compile_options("-fvisibility=hidden") +list(FIND ARCH_INSTR_ITANIUM "${CMAKE_SYSTEM_PROCESSOR}" FOUND) +if(FOUND GREATER -1) + list(APPEND ARCH_INST "Itanium") + set(D_PLATFORM_INSTR_ITANIUM ON) + set(D_PLATFORM_ARCH_ITANIUM ON) endif() +set(D_PLATFORM_INSTR ${ARCH_INST}) +set(D_PLATFORM_ARCH ${ARCH_INST}) +message(STATUS "${LOGPREFIX} Taget is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") + ################################################################################ # Detect if we are building with OBS Studio (different from Grouped builds) ################################################################################ @@ -380,241 +364,342 @@ if(${PREFIX}ENABLE_CODESIGN AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/codes endif() ################################################################################ -# Standalone Build: OBS Studio +# Auto-Dependency: libOBS + obs-frontend-api ################################################################################ -if(NOT ${PREFIX}OBS_NATIVE) +if(STANDALONE) # Options - set(${PREFIX}DOWNLOAD_OBS_URL "" CACHE STRING "(Optional) URL of prebuilt libOBS archive to download.") - set(${PREFIX}DOWNLOAD_OBS_HASH "" CACHE STRING "(Optional) The hash for the libOBS archive.") + set(${PREFIX}OBS_DOWNLOAD TRUE CACHE BOOL "Automatically download libOBS and obs-frontend-api?") + set(${PREFIX}OBS_PATH "" CACHE PATH "Path to libOBS, if ${PREFIX}OBS_DOWNLOAD is not set.") + set(${PREFIX}OBS_DOWNLOAD_URL "" CACHE STRING "The URL from which to download libOBS and obs-frontend-api, if autodetection fails. (Optional)") + set(${PREFIX}OBS_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") mark_as_advanced( - ${PREFIX}DOWNLOAD_OBS_URL - ${PREFIX}DOWNLOAD_OBS_HASH + ${PREFIX}OBS_PATH + ${PREFIX}OBS_DOWNLOAD_URL + ${PREFIX}OBS_DOWNLOAD_HASH ) - # Allow overriding what version we build against. - if(${PREFIX}DOWNLOAD_OBS_URL) - set(_DOWNLOAD_OBS_URL "${${PREFIX}DOWNLOAD_OBS_URL}") - set(_DOWNLOAD_OBS_HASH "${${PREFIX}DOWNLOAD_OBS_HASH}") - else() - set(_DOWNLOAD_OBS_VERSION "27.0.0-ci") - if (D_PLATFORM_WINDOWS) - if (D_PLATFORM_ARCH_X86) - set(_DOWNLOAD_OBS_URL "https://github.com/Xaymar/obs-studio/releases/download/${_DOWNLOAD_OBS_VERSION}/obs-studio-x64-0.0.0.0-windows-${D_PLATFORM_ARCH}-${D_PLATFORM_BITS}.7z") - if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_OBS_HASH "SHA256=EBF9853C8A553E16ECBCA22523F401E6CF1EB2E8DA93F1493FEF41D65BD06633") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + if(${PREFIX}OBS_DOWNLOAD) + if(${PREFIX}OBS_DOWNLOAD_URL STREQUAL "") + # Figure out download URLs and hashes. + if (D_PLATFORM_WINDOWS) + if (D_PLATFORM_ARCH_X86) + if (D_PLATFORM_BITS EQUAL 64) + set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/windows-x86_64.tar.gz") + set(OBS_DOWNLOAD_HASH "DD931BBB2E0720F1D7573C65D8CC9D638F1EE2AC99F7173BF8935CD3A3BCE3F4") + endif() endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - elseif(D_PLATFORM_LINUX) - if (D_PLATFORM_ARCH_X86) - set(_DOWNLOAD_OBS_URL "https://github.com/Xaymar/obs-studio/releases/download/${_DOWNLOAD_OBS_VERSION}/obs-studio-x64-0.0.0.0-ubuntu-${D_PLATFORM_ARCH}-${D_PLATFORM_BITS}.7z") - if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_OBS_HASH "SHA256=0AF6C7262C37D80C24CB18523A851FD765C04E766D8EB0F4AC0F6E75D13A035F") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + elseif(D_PLATFORM_LINUX) + if (D_PLATFORM_ARCH_X86) + if (D_PLATFORM_BITS EQUAL 64) + set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/linux-x86_64.tar.gz") + set(OBS_DOWNLOAD_HASH "CA19E8260E1A556E6231D75064837C61C6D480BD90C97A0B930005AE527BF625") + endif() endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - elseif(D_PLATFORM_MAC) - if (D_PLATFORM_ARCH_X86) - set(_DOWNLOAD_OBS_URL "https://github.com/Xaymar/obs-studio/releases/download/${_DOWNLOAD_OBS_VERSION}/obs-studio-x64-0.0.0.0-macos-${D_PLATFORM_ARCH}-${D_PLATFORM_BITS}.7z") - if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_OBS_HASH "SHA256=F15BC4CA8EB3F581A94372759CFE554E30D202B604B541445A5756B878E4E799") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + elseif(D_PLATFORM_MAC) + if (D_PLATFORM_ARCH_X86) + if (D_PLATFORM_BITS EQUAL 64) + set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/macos-x86_64.tar.gz") + set(OBS_DOWNLOAD_HASH "0DD5A57DD537B97CAA8470212F8F6B637F47D4742A5D1F17787F4FE9DBC70B33") + endif() endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + endif() + + # Verify that the platform, architecture and bitness is supported. + if(OBS_DOWNLOAD_URL STREQUAL "") + message(FATAL_ERROR "${LOGPREFIX} Download for libOBS failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + set(OBS_DOWNLOAD_URL "${${PREFIX}OBS_DOWNLOAD_URL}") + set(OBS_DOWNLOAD_HASH "${${PREFIX}OBS_DOWNLOAD_HASH}") endif() - endif() - # Download libOBS - download_project( - PROJ libobs - URL "${_DOWNLOAD_OBS_URL}" - URL_HASH "${_DOWNLOAD_OBS_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) + if(OBS_DOWNLOAD_HASH STREQUAL "") + download_project( + PROJ libobs + PREFIX "autodeps" + URL "${OBS_DOWNLOAD_URL}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + else() + download_project( + PROJ libobs + PREFIX "autodeps" + URL "${OBS_DOWNLOAD_URL}" + URL_HASH "SHA256=${OBS_DOWNLOAD_HASH}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + endif() + CacheSet(${PREFIX}OBS_PATH "${libobs_SOURCE_DIR}") + endif() + + if(NOT EXISTS "${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") + message(FATAL_ERROR "${LOGPREFIX} The provided path for libOBS is invalid as it did not contain '/cmake/LibObs/LibObsConfig.cmake'.") + return() + else() + include("${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") + endif() - include("${libobs_SOURCE_DIR}/cmake/LibObs/LibObsConfig.cmake") + if (NOT TARGET obs-frontend-api) + if(EXISTS "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") + include("${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") + elseif((EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib") AND (EXISTS "${${PREFIX}OBS_PATH}/include/obs-frontend-api.h")) + add_library(obs-frontend-api SHARED IMPORTED) + set_target_properties(obs-frontend-api PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}OBS_PATH}/include" + INTERFACE_LINK_LIBRARIES "libobs" + IMPORTED_CONFIGURATIONS RELWITHDEBINFO + IMPORTED_IMPLIB_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib" + IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.dll" + ) + else() + message(WARNING "${LOGPREFIX} The provided path for libOBS did not contain obs-frontend-api.") + endif() + endif() endif() ################################################################################ -# Standalone Build: OBS Studio Dependencies +# Auto-Dependency: OBS Studio Dependencies ################################################################################ if(STANDALONE AND NOT D_PLATFORM_LINUX) # Options - set(${PREFIX}DOWNLOAD_OBSDEPS_URL "" CACHE STRING "(Optional) URL of prebuilt libOBS archive to download.") - set(${PREFIX}DOWNLOAD_OBSDEPS_HASH "" CACHE STRING "(Optional) The hash for the libOBS archive.") + set(${PREFIX}OBSDEPS_DOWNLOAD TRUE CACHE BOOL "Automatically download pre-built libOBS dependencies?") + set(${PREFIX}OBSDEPS_PATH "" CACHE PATH "Path to pre-build libOBS dependencies, if ${PREFIX}OBSDEPS_DOWNLOAD is not set.") + set(${PREFIX}OBSDEPS_DOWNLOAD_URL "" CACHE STRING "The URL from which to download pre-built libOBS dependencies, if autodetection fails. (Optional)") + set(${PREFIX}OBSDEPS_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") mark_as_advanced( - ${PREFIX}DOWNLOAD_OBSDEPS_URL - ${PREFIX}DOWNLOAD_OBSDEPS_HASH + ${PREFIX}OBSDEPS_PATH + ${PREFIX}OBSDEPS_DOWNLOAD_URL + ${PREFIX}OBSDEPS_DOWNLOAD_HASH ) - # Allow overriding what version we build against. - if(${PREFIX}DOWNLOAD_OBSDEPS_URL) - set(_DOWNLOAD_OBSDEPS_URL "${${PREFIX}DOWNLOAD_OBSDEPS_URL}") - set(_DOWNLOAD_OBSDEPS_HASH "${${PREFIX}DOWNLOAD_OBSDEPS_HASH}") - else() - if (D_PLATFORM_WINDOWS) - if (D_PLATFORM_ARCH_X86) - set(_DOWNLOAD_OBSDEPS_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/deps-windows-x86.7z") - if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_OBSDEPS_HASH "SHA256=B4AED165016F0B64A7E8B256CCC12EAF8AF087F61B0B239B9D3D00277485B5B5") - elseif (D_PLATFORM_BITS EQUAL 32) - set(_DOWNLOAD_OBSDEPS_HASH "SHA256=B4AED165016F0B64A7E8B256CCC12EAF8AF087F61B0B239B9D3D00277485B5B5") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - elseif(D_PLATFORM_MAC) - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_OBSDEPS_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/deps-macos-x86_64-2021-03-25.tar.gz") - set(_DOWNLOAD_OBSDEPS_HASH "SHA256=1C409374BCAB9D5CEEAFC121AA327E13AB222096718AF62F2648302DF62898D6") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + if(${PREFIX}OBSDEPS_DOWNLOAD) + if(${PREFIX}OBSDEPS_DOWNLOAD_URL STREQUAL "") + # Figure out download URLs and hashes. + if (D_PLATFORM_WINDOWS) + set(DEPS_VERSION "2022-01-31") + if (D_PLATFORM_ARCH_X86) + if (D_PLATFORM_BITS EQUAL 64) + set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/win-${DEPS_VERSION}/windows-deps-${DEPS_VERSION}.zip") + set(OBSDEPS_DOWNLOAD_HASH "66E55FE35A507C902C036EB11E691D0257FECA545A8EE57324B69427717026DD") + endif() endif() - elseif(D_PLATFORM_ARCH_ARM) - if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_OBSDEPS_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/deps-macos-arm64-2021-03-25.tar.gz") - set(_DOWNLOAD_OBSDEPS_HASH "SHA256=C0EC57D360AF190E372D6BB883134FA26B1A7E49840DD146B172B48D548B55BC") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + elseif(D_PLATFORM_MAC) + set(DEPS_VERSION "2022-02-13") + if (D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) + if (D_PLATFORM_BITS EQUAL 64) + set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-universal.tar.xz") + set(OBSDEPS_DOWNLOAD_HASH "77471B1D345A768E8EFEC3F6AD9DC79F3C7CD34840B66F721B80025D29713F5D") + endif() + elseif (D_PLATFORM_ARCH_X86) + if (D_PLATFORM_BITS EQUAL 64) + set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-x86_64.tar.xz") + set(OBSDEPS_DOWNLOAD_HASH "1A8715D66E664B857942DEADED0DC46C4F6CD22E88F01ED1188F3BD3FCF632C4") + endif() + elseif (D_PLATFORM_ARCH_ARM) + if (D_PLATFORM_BITS EQUAL 64) + set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-arm64.tar.xz") + set(OBSDEPS_DOWNLOAD_HASH "2CFCAF05765400C696908F242AEA87B6E1848E1A48CD3EDC2EB7F8CB249C9D48") + endif() endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + endif() + + # Verify that the platform, architecture and bitness is supported. + if(OBSDEPS_DOWNLOAD_URL STREQUAL "") + message(FATAL_ERROR "${LOGPREFIX} Download for pre-built OBS dependencies failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + set(OBSDEPS_DOWNLOAD_URL "${${PREFIX}OBSDEPS_DOWNLOAD_URL}") + set(OBSDEPS_DOWNLOAD_HASH "${${PREFIX}OBSDEPS_DOWNLOAD_HASH}") endif() - endif() - - # Download libOBS - download_project( - PROJ obsdeps - URL "${_DOWNLOAD_OBSDEPS_URL}" - URL_HASH "${_DOWNLOAD_OBSDEPS_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) + if(OBSDEPS_DOWNLOAD_HASH STREQUAL "") + download_project( + PROJ obsdeps + PREFIX "autodeps" + URL "${OBSDEPS_DOWNLOAD_URL}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + else() + download_project( + PROJ obsdeps + PREFIX "autodeps" + URL "${OBSDEPS_DOWNLOAD_URL}" + URL_HASH "SHA256=${OBSDEPS_DOWNLOAD_HASH}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + endif() + CacheSet(${PREFIX}OBSDEPS_PATH "${obsdeps_SOURCE_DIR}") + endif() + if (D_PLATFORM_WINDOWS) - set(_OBSDEPS_PATH "${obsdeps_SOURCE_DIR}/win${D_PLATFORM_BITS}") + set(_OBSDEPS_PATH "${${PREFIX}OBSDEPS_PATH}/win${D_PLATFORM_BITS}") + set(FFmpegPath "${${PREFIX}OBSDEPS_PATH}/win${D_PLATFORM_BITS}") elseif(D_PLATFORM_MAC) - set(_OBSDEPS_PATH "${obsdeps_SOURCE_DIR}/obsdeps") + set(_OBSDEPS_PATH "${${PREFIX}OBSDEPS_PATH}/obsdeps") + set(FFmpegPath "${${PREFIX}OBSDEPS_PATH}/obsdeps") endif() endif() ################################################################################ -# Standalone Build: Qt v5.x +# Auto-Dependency: Qt v5.x ################################################################################ if(STANDALONE AND NOT D_PLATFORM_LINUX) - set(${PREFIX}DOWNLOAD_QT OFF CACHE BOOL "Download Qt?") - - if(${PREFIX}DOWNLOAD_QT) - set(${PREFIX}DOWNLOAD_QT_URL "" CACHE STRING "") - set(${PREFIX}DOWNLOAD_QT_HASH "" CACHE STRING "") - mark_as_advanced( - ${PREFIX}DOWNLOAD_QT_URL - ${PREFIX}DOWNLOAD_QT_HASH - ) + # Options + set(${PREFIX}QT_DOWNLOAD TRUE CACHE BOOL "Automatically download Qt?") + set(${PREFIX}QT_PATH "" CACHE PATH "Path to Qt, if ${PREFIX}QT_DOWNLOAD is not set.") + set(${PREFIX}QT_DOWNLOAD_URL "" CACHE STRING "The URL from which to download Qt, if autodetection fails. (Optional)") + set(${PREFIX}QT_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") + mark_as_advanced( + ${PREFIX}QT_PATH + ${PREFIX}QT_DOWNLOAD_URL + ${PREFIX}QT_DOWNLOAD_HASH + ) - # Allow overriding what version we build against. - if(${PREFIX}DOWNLOAD_QT_URL) - set(_DOWNLOAD_QT_URL "${${PREFIX}DOWNLOAD_QT_URL}") - set(_DOWNLOAD_QT_HASH "${${PREFIX}DOWNLOAD_QT_HASH}") - else() + if(${PREFIX}QT_DOWNLOAD) + if(${PREFIX}QT_DOWNLOAD_URL STREQUAL "") + # Figure out download URLs and hashes. if (D_PLATFORM_WINDOWS) + set(DEPS_VERSION "5.15.2") if (D_PLATFORM_ARCH_X86) if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_QT_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/qt-5.15.2-windows-x86-64.7z") - set(_DOWNLOAD_QT_HASH "SHA256=109B9C21EF165B0C46DFAA9AD23124F2070ED4D74207C4AFB308183CB8D43BDD") - elseif (D_PLATFORM_BITS EQUAL 32) - set(_DOWNLOAD_QT_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/qt-5.15.2-windows-x86-32.7z") - set(_DOWNLOAD_QT_HASH "SHA256=372E4FBF2A15DD4FDA955A07334D8B8AC6802990148C9CB4E766C90205F8F570") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + set(QT_DOWNLOAD_URL "https://cdn-fastly.obsproject.com/downloads/Qt_${DEPS_VERSION}.7z") + set(QT_DOWNLOAD_HASH "9EF1DFEEBE6AB7FFC55FD285667CC5D9CB2D298646C107C2295D13F14708E64E") endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() endif() elseif(D_PLATFORM_MAC) - if (D_PLATFORM_ARCH_X86) + set(DEPS_VERSION "2022-02-13") + if (D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) + if (D_PLATFORM_BITS EQUAL 64) + set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-universal.tar.xz") + set(QT_DOWNLOAD_HASH "13FBCC45FD9D08B30E702D481FE4D58B23F93AA06848CEDE4EBE0956C79A5E8A") + endif() + elseif (D_PLATFORM_ARCH_X86) if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_QT_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/qt-5.15.2-macos-x86_64-2021-03-25.tar.gz") - set(_DOWNLOAD_QT_HASH "SHA256=FFABB54624B931EA3FCC06BED244895F50CEFC95DE09D792D280C46D4F91D4C5") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-x86_64.tar.xz") + set(QT_DOWNLOAD_HASH "35A58FEE8DFD70D3D2DCC0AE0B77132C04A451C6F041A02DC41B207B375FC74B") endif() - elseif(D_PLATFORM_ARCH_ARM) + elseif (D_PLATFORM_ARCH_ARM) if (D_PLATFORM_BITS EQUAL 64) - set(_DOWNLOAD_QT_URL "https://github.com/Xaymar/obs-studio/releases/download/27.0.0/qt-5.15.2-macos-arm64-2021-03-25.tar.gz") - set(_DOWNLOAD_QT_HASH "SHA256=366BA8AC0FA0CAC440AFB9ED1C2EF5932E50091DC43BDE8B5C4B490082B6F19F") - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() + set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-arm64.tar.xz") + set(QT_DOWNLOAD_HASH "E99146B9C7775C245A2D22F2EF24FC111FCCD71BAD0F03B64DB707124FFB8707") endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() endif() - else() - message(FATAL_ERROR "${LOGPREFIX} Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + endif() + + # Verify that the platform, architecture and bitness is supported. + if(QT_DOWNLOAD_URL STREQUAL "") + message(FATAL_ERROR "${LOGPREFIX} Download for Qt failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() + else() + set(QT_DOWNLOAD_URL "${${PREFIX}QT_DOWNLOAD_URL}") + set(QT_DOWNLOAD_HASH "${${PREFIX}QT_DOWNLOAD_HASH}") endif() - download_project( - PROJ qt - URL "${_DOWNLOAD_QT_URL}" - URL_HASH "${_DOWNLOAD_QT_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) + if(QT_DOWNLOAD_HASH STREQUAL "") + download_project( + PROJ qt + PREFIX "autodeps" + URL "${QT_DOWNLOAD_URL}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + else() + download_project( + PROJ qt + PREFIX "autodeps" + URL "${QT_DOWNLOAD_URL}" + URL_HASH "SHA256=${QT_DOWNLOAD_HASH}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + endif() + execute_process(COMMAND "xattr" "-r" "-d" "com.apple.quarantine" "${qt_SOURCE_DIR}") - set(Qt5_DIR "${qt_SOURCE_DIR}" CACHE STRING "Path to Qt5") - if (D_PLATFORM_WINDOWS) - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) - CacheSet(Qt5_DIR "${qt_SOURCE_DIR}/lib/cmake/Qt5") - elseif (D_PLATFORM_BITS EQUAL 32) - CacheSet(Qt5_DIR "${qt_SOURCE_DIR}/lib/cmake/Qt5") + if(D_PLATFORM_WINDOWS) + CacheSet(${PREFIX}QT_PATH "${qt_SOURCE_DIR}/msvc2019_64") + else() + CacheSet(${PREFIX}QT_PATH "${qt_SOURCE_DIR}") + endif() + endif() + + set(Qt5_DIR "${${PREFIX}QT_PATH}/lib/cmake/Qt5" CACHE STRING "Path to Qt") + CacheSet(Qt5_DIR "${${PREFIX}QT_PATH}/lib/cmake/Qt5") +endif() + +################################################################################ +# Auto-Dependency: libAOM +################################################################################ + +if(D_PLATFORM_WINDOWS) + # Options + set(${PREFIX}AOM_DOWNLOAD TRUE CACHE BOOL "Automatically download AOM?") + set(${PREFIX}AOM_PATH "" CACHE PATH "Path to AOM, if ${PREFIX}AOM_DOWNLOAD is not set.") + set(${PREFIX}AOM_DOWNLOAD_URL "" CACHE STRING "The URL from which to download AOM, if autodetection fails. (Optional)") + set(${PREFIX}AOM_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") + mark_as_advanced( + ${PREFIX}AOM_PATH + ${PREFIX}AOM_DOWNLOAD_URL + ${PREFIX}AOM_DOWNLOAD_HASH + ) + + if(${PREFIX}AOM_DOWNLOAD) + if(${PREFIX}AOM_DOWNLOAD_URL STREQUAL "") + set(AOM_VERSION "v3.2.0.1") + # Figure out download URLs and hashes. + if (D_PLATFORM_WINDOWS) + if (D_PLATFORM_ARCH_X86) + set(AOM_DOWNLOAD_URL "https://github.com/Xaymar/aom/releases/download/${AOM_VERSION}/aom-windows-${D_PLATFORM_BITS}-shared.7z") + set(AOM_DOWNLOAD_HASH "2DE0C215C5B00D6761AD2D1FEAFB545C04249B2CBD542F9F7D423E1A26BA59BD") endif() endif() - elseif(D_PLATFORM_MAC) - CacheSet(Qt5_DIR "${qt_SOURCE_DIR}/lib/cmake/Qt5") + + # Verify that the platform, architecture and bitness is supported. + if(AOM_DOWNLOAD_URL STREQUAL "") + message(FATAL_ERROR "${LOGPREFIX} Download for AOM failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + return() + endif() + else() + set(AOM_DOWNLOAD_URL "${${PREFIX}AOM_DOWNLOAD_URL}") + set(AOM_DOWNLOAD_HASH "${${PREFIX}AOM_DOWNLOAD_HASH}") + endif() + + if(AOM_DOWNLOAD_HASH STREQUAL "") + download_project( + PROJ AOM + PREFIX "autodeps" + URL "${AOM_DOWNLOAD_URL}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + else() + download_project( + PROJ AOM + PREFIX "autodeps" + URL "${AOM_DOWNLOAD_URL}" + URL_HASH "SHA256=${AOM_DOWNLOAD_HASH}" + DOWNLOAD_NO_PROGRESS OFF + UPDATE_DISCONNECTED OFF + ) + endif() + + if(D_PLATFORM_WINDOWS) + CacheSet(${PREFIX}AOM_PATH "${AOM_SOURCE_DIR}/msvc2019_64") + else() + CacheSet(${PREFIX}AOM_PATH "${AOM_SOURCE_DIR}") endif() endif() + + set(AOM_PATH "${${PREFIX}AOM_PATH}" CACHE STRING "Path to AOM") endif() ################################################################################ @@ -647,20 +732,20 @@ function(feature_encoder_ffmpeg RESOLVE) is_feature_enabled(ENCODER_FFMPEG T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_FFMPEG) - message(WARNING "${LOGPREFIX}: FFmpeg Encoder requires FFmpeg. Disabling...") + message(WARNING "${LOGPREFIX} FFmpeg Encoder requires FFmpeg. Disabling...") set_feature_disabled(ENCODER_FFMPEG ON) else() # AMF is_feature_enabled(ENCODER_FFMPEG_AMF T_CHECK) if(T_CHECK AND D_PLATFORM_MAC) - message(WARNING "${LOGPREFIX}: FFmpeg Encoder 'AMF' requires Windows or Linux. Disabling...") + message(WARNING "${LOGPREFIX} FFmpeg Encoder 'AMF' requires Windows or Linux. Disabling...") set_feature_disabled(ENCODER_FFMPEG_AMF ON) endif() # NVENC is_feature_enabled(ENCODER_FFMPEG_NVENC T_CHECK) if(T_CHECK AND D_PLATFORM_MAC) - message(WARNING "${LOGPREFIX}: FFmpeg Encoder 'NVENC' requires Windows or Linux. Disabling...") + message(WARNING "${LOGPREFIX} FFmpeg Encoder 'NVENC' requires Windows or Linux. Disabling...") set_feature_disabled(ENCODER_FFMPEG_NVENC ON) endif() @@ -679,7 +764,7 @@ function(feature_encoder_aom_av1 RESOLVE) is_feature_enabled(ENCODER_AOM_AV1 T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_AOM) - message(WARNING "${LOGPREFIX}: AOM AV1 encoder missing AOM library. Disabling...") + message(WARNING "${LOGPREFIX} AOM AV1 encoder missing AOM library. Disabling...") set_feature_disabled(ENCODER_AOM_AV1 ON) endif() elseif(T_CHECK) @@ -692,14 +777,14 @@ function(feature_filter_autoframing RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_AR_SDK) - message(WARNING "${LOGPREFIX}: 'NVIDIA Augmented Reality SDK' is missing. Disabling NVIDIA provider...") + message(WARNING "${LOGPREFIX} 'NVIDIA Augmented Reality SDK' is missing. Disabling NVIDIA provider...") set_feature_disabled(FILTER_AUTOFRAMING_NVIDIA ON) endif() # Verify that we have at least one provider for Auto-Framing. is_feature_enabled(FILTER_AUTOFRAMING_NVIDIA T_CHECK_NVIDIA) if (NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX}: Auto-Framing has no available providers. Disabling...") + message(WARNING "${LOGPREFIX} Auto-Framing has no available providers. Disabling...") set_feature_disabled(FILTER_AUTOFRAMING ON) endif() elseif(T_CHECK) @@ -721,14 +806,14 @@ function(feature_filter_denoising RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_VFX_SDK) - message(WARNING "${LOGPREFIX}: 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider...") + message(WARNING "${LOGPREFIX} 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider...") set_feature_disabled(FILTER_DENOISING_NVIDIA ON) endif() # Verify that we have at least one provider for Video Denoising. is_feature_enabled(FILTER_DENOISING_NVIDIA T_CHECK_NVIDIA) if (NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX}: Denoising has no available providers. Disabling...") + message(WARNING "${LOGPREFIX} Denoising has no available providers. Disabling...") set_feature_disabled(FILTER_DENOISING ON) endif() elseif(T_CHECK) @@ -761,14 +846,14 @@ function(feature_filter_upscaling RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_VFX_SDK) - message(WARNING "${LOGPREFIX}: 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") + message(WARNING "${LOGPREFIX} 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") set_feature_disabled(FILTER_UPSCALING_NVIDIA ON) endif() # Verify that we have at least one provider for Video Super-Resolution. is_feature_enabled(FILTER_UPSCALING_NVIDIA T_CHECK_NVIDIA) if (NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX}: Upscaling has no available providers. Disabling...") + message(WARNING "${LOGPREFIX} Upscaling has no available providers. Disabling...") set_feature_disabled(FILTER_UPSCALING ON) endif() elseif(T_CHECK) @@ -781,14 +866,14 @@ function(feature_filter_virtual_greenscreen RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_VFX_SDK) - message(WARNING "${LOGPREFIX}: 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") + message(WARNING "${LOGPREFIX} 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") set_feature_disabled(FILTER_VIRTUAL_GREENSCREEN_NVIDIA ON) endif() # Verify that we have at least one provider for Video Super-Resolution. is_feature_enabled(FILTER_VIRTUAL_GREENSCREEN_NVIDIA T_CHECK_NVIDIA) if (NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX}: Virtual Greenscreen has no available providers. Disabling...") + message(WARNING "${LOGPREFIX} Virtual Greenscreen has no available providers. Disabling...") set_feature_disabled(FILTER_VIRTUAL_GREENSCREEN ON) endif() elseif(T_CHECK) @@ -812,10 +897,10 @@ function(feature_frontend RESOLVE) is_feature_enabled(FRONTEND T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_QT) - message(WARNING "${LOGPREFIX}: Front-End requires Qt. Disabling...") + message(WARNING "${LOGPREFIX} Front-End requires Qt. Disabling...") set_feature_disabled(FRONTEND ON) elseif(NOT HAVE_OBSFE) - message(WARNING "${LOGPREFIX}: Front-End requires OBS FrontEnd API. Disabling...") + message(WARNING "${LOGPREFIX} Front-End requires OBS FrontEnd API. Disabling...") set_feature_disabled(FRONTEND ON) endif() elseif(T_CHECK) @@ -828,10 +913,10 @@ function(feature_updater RESOLVE) is_feature_enabled(UPDATER T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_CURL) - message(WARNING "${LOGPREFIX}: Updater requires CURL. Disabling...") + message(WARNING "${LOGPREFIX} Updater requires CURL. Disabling...") set_feature_disabled(UPDATER ON) elseif(NOT HAVE_JSON) - message(WARNING "${LOGPREFIX}: Updater requires nlohmann::json. Disabling...") + message(WARNING "${LOGPREFIX} Updater requires nlohmann::json. Disabling...") set_feature_disabled(UPDATER ON) endif() elseif(T_CHECK) @@ -886,33 +971,6 @@ endif() #- FFmpeg set(HAVE_FFMPEG OFF) if(REQUIRE_FFMPEG) - if(D_PLATFORM_WINDOWS AND NOT ${PREFIX}OBS_NATIVE) - find_path( - FFmpegPath "libavcodec/avcodec.h" - HINTS - ${OBS_DEPENDENCIES_DIR} - ${_OBSDEPS_PATH} - ${DepsPath} - ${DepsPath32} - ${DepsPath64} - - PATHS - /usr/include - /usr/local/include - /opt/local/include - /sw/include - PATH_SUFFIXES - win${D_PLATFORM_BITS} - win${D_PLATFORM_BITS}/bin - win${D_PLATFORM_BITS}/include - win${D_PLATFORM_INSTR} - win${D_PLATFORM_INSTR}/bin - win${D_PLATFORM_INSTR}/include - bin - include - ) - endif() - find_package(FFmpeg COMPONENTS avutil avcodec swscale) set(HAVE_FFMPEG ${FFmpeg_FOUND}) endif() @@ -983,15 +1041,8 @@ endif() #- OBS Front-End API set(HAVE_OBSFE OFF) if(REQUIRE_OBSFE) - if(${PREFIX}OBS_NATIVE) - if(TARGET obs-frontend-api) - set(HAVE_OBSFE ON) - endif() - else() - if (EXISTS "${libobs_SOURCE_DIR}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") - include("${libobs_SOURCE_DIR}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") - set(HAVE_OBSFE ON) - endif() + if(TARGET obs-frontend-api) + set(HAVE_OBSFE ON) endif() endif() @@ -1857,6 +1908,55 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS OFF ) +# C/C++ Compiler Adjustments +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) + # MSVC/ClangCL + # - Dynamically link Microsoft C/C++ Redistributable. + # - Enable /W3 and disable useless warnings. + # - Enable C++ exceptions with SEH exceptions. + # - Enable multi-processor compiling. + # - Enable updated __cplusplus macro + message(STATUS "${LOGPREFIX} Applying custom flags for MSVC style build.") + + # Build with dynamic MSVC linkage. + target_compile_options(${PROJECT_NAME} PUBLIC + $<$:/MD> + $<$:/MDd> + $<$:/MD> + $<$:/MD> + $<$:/MD> + ) + + # Enable most useful warnings. + set(DISABLED_WARNINGS + "/wd4061" "/wd4100" "/wd4180" "/wd4201" "/wd4464" "/wd4505" "/wd4514" + "/wd4571" "/wd4623" "/wd4625" "/wd4626" "/wd4668" "/wd4710" "/wd4774" + "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd26812" + ) + target_compile_options(${PROJECT_NAME} PUBLIC "/W3") + foreach(WARN ${DISABLED_WARNINGS}) + target_compile_options(${PROJECT_NAME} PUBLIC "${WARN}") + endforeach() + + # C++ Exceptions & SEH + target_compile_options(${PROJECT_NAME} PUBLIC "/EHa") + + # Multiprocessor compiling + target_compile_options(${PROJECT_NAME} PUBLIC "/MP") + + # Updated __cplusplus + target_compile_options(${PROJECT_NAME} PUBLIC "/Zc:__cplusplus") +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # Clang/AppleClang/GNU + # - Don't export by default. (Temporarily disabled) + # - Enable all and extra warnings. + message(STATUS "${LOGPREFIX} Applying custom flags for GNU style build.") + + target_compile_options(${PROJECT_NAME} PUBLIC "-Wall") + target_compile_options(${PROJECT_NAME} PUBLIC "-Wextra") + # add_compile_options("-fvisibility=hidden") +endif() + # Remove prefix on other platforms. set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" diff --git a/cmake/modules/Architecture.cmake b/cmake/modules/Architecture.cmake deleted file mode 100644 index 0383d81a02..0000000000 --- a/cmake/modules/Architecture.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# Setup -set(ARCH_INSTR_32 "i386;i686;x86;arm;ARM") -set(ARCH_INSTR_64 "x86_64;AMD64;IA64;arm64;ARM64") -set(ARCH_INSTR_X86 "i386;i686;x86;x86_64;AMD64") -set(ARCH_INSTR_ARM "arm;ARM;arm64;ARM64") -set(ARCH_INSTR_ITANIUM "IA64") -set(ARCH_BITS 0) -set(ARCH_BITS_POINTER 0) -set(ARCH_INST "") - -# Bitness -list(FIND ARCH_INSTR_32 "${CMAKE_SYSTEM_PROCESSOR}" FOUND) -if(FOUND GREATER -1) - set(ARCH_BITS 32) -endif() - -list(FIND ARCH_INSTR_64 "${CMAKE_SYSTEM_PROCESSOR}" FOUND) -if(FOUND GREATER -1) - set(ARCH_BITS 64) -endif() - -# Pointer Size (bits) -math(EXPR ARCH_BITS_POINTER "8*${CMAKE_SIZEOF_VOID_P}") - -# Basic Instruction Set -list(FIND ARCH_INSTR_X86 "${CMAKE_SYSTEM_PROCESSOR}" FOUND) -if(FOUND GREATER -1) - set(ARCH_INST "x86") -endif() - -list(FIND ARCH_INSTR_ARM "${CMAKE_SYSTEM_PROCESSOR}" FOUND) -if(FOUND GREATER -1) - set(ARCH_INST "ARM") -endif() - -list(FIND ARCH_INSTR_ITANIUM "${CMAKE_SYSTEM_PROCESSOR}" FOUND) -if(FOUND GREATER -1) - set(ARCH_INST "Itanium") -endif() - -message(STATUS "Targetting ${ARCH_INST} with ${ARCH_BITS}bits and a pointer size of ${ARCH_BITS_POINTER}bit.") From 98e2447ec8e607eb5e5c505817a770b74914dd59 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 26 May 2022 02:58:26 +0200 Subject: [PATCH 013/164] common: Add macro to force inlining --- source/common.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/common.hpp b/source/common.hpp index 2ab5ec6a72..3942405cd6 100644 --- a/source/common.hpp +++ b/source/common.hpp @@ -109,3 +109,13 @@ extern "C" { #define __FUNCTION_SIG__ __func__ #define __FUNCTION_NAME__ __func__ #endif +/// Forceful inlining +#ifndef FORCE_INLINE +#ifdef _MSC_VER +#define FORCE_INLINE __force_inline +#elif defined(__GNUC__) || defined(__MINGW32__) +#define FORCE_INLINE __attribute__((always_inline)) +#else +#define FORCE_INLINE inline +#endif +#endif From 06276288845cf498adcac5da604388e424055495 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 10 May 2022 18:40:47 +0200 Subject: [PATCH 014/164] obs/tools: Remove work-around for obs_properties_remove_by_name The bug fix to this was applied upstream, so we no longer need to support the broken behavior --- source/gfx/shader/gfx-shader.cpp | 4 +- source/obs/obs-tools.cpp | 88 -------------------------------- source/obs/obs-tools.hpp | 2 - 3 files changed, 2 insertions(+), 92 deletions(-) diff --git a/source/gfx/shader/gfx-shader.cpp b/source/gfx/shader/gfx-shader.cpp index 2447f91c30..eb079149bd 100644 --- a/source/gfx/shader/gfx-shader.cpp +++ b/source/gfx/shader/gfx-shader.cpp @@ -261,7 +261,7 @@ bool streamfx::gfx::shader::shader::on_refresh_properties(obs_properties_t* prop { // Clear parameter options. auto grp = obs_property_group_content(obs_properties_get(props, ST_KEY_PARAMETERS)); for (auto p = obs_properties_first(grp); p != nullptr; p = obs_properties_first(grp)) { - streamfx::obs::tools::obs_properties_remove_by_name(grp, obs_property_name(p)); + obs_properties_remove_by_name(grp, obs_property_name(p)); } // Rebuild new parameters. @@ -302,7 +302,7 @@ bool streamfx::gfx::shader::shader::on_shader_or_technique_modified(obs_properti // Clear parameter options. auto grp = obs_property_group_content(obs_properties_get(props, ST_KEY_PARAMETERS)); for (auto p = obs_properties_first(grp); p != nullptr; p = obs_properties_first(grp)) { - streamfx::obs::tools::obs_properties_remove_by_name(grp, obs_property_name(p)); + obs_properties_remove_by_name(grp, obs_property_name(p)); } // Rebuild new parameters. diff --git a/source/obs/obs-tools.cpp b/source/obs/obs-tools.cpp index 0b4ff37df3..11ae4a2de9 100644 --- a/source/obs/obs-tools.cpp +++ b/source/obs/obs-tools.cpp @@ -82,94 +82,6 @@ bool streamfx::obs::tools::scene_contains_source(obs_scene_t* scene, obs_source_ return sd.found; } -extern "C" { -struct _hack_obs_properties; - -struct _hack_obs_property { - char* name; - char* desc; - char* long_desc; - void* priv; - enum obs_property_type type; - bool visible; - bool enabled; - - struct _hack_obs_properties* parent; - - obs_property_modified_t modified; - obs_property_modified2_t modified2; - - struct _hack_obs_property* next; -}; - -struct _hack_obs_properties { - void* param; - void (*destroy)(void* param); - uint32_t flags; - - struct _hack_obs_property* first_property; - struct _hack_obs_property** last; - struct _hack_obs_property* parent; -}; -} - -bool streamfx::obs::tools::obs_properties_remove_by_name(obs_properties_t* props, const char* name) -{ - // Due to a bug in obs_properties_remove_by_name, calling it on the first or last element of a group corrupts the - // obs_properties_t's first and last pointers, which now point at nonsense. - // - // There are two ways to work around this issue for now: - // 1. Add some invisible properties to the beginning and end of the list, ensuring that you never hit the first or - // last element with a obs_properties_remove_by_name. - // 2. Manually adjust the pointers using a dirty hack like in gs::mipmapper. - // I've opted for the 2nd way, at it is way simpler to implement. - - // Assume that this is fixed in libobs 24.0.7 or newer. - if (obs_get_version() >= MAKE_SEMANTIC_VERSION(24, 0, 7)) { - ::obs_properties_remove_by_name(props, name); - return true; - } - - auto rprops = reinterpret_cast<_hack_obs_properties*>(props); - - for (_hack_obs_property *el_prev = rprops->first_property, *el_cur = el_prev; el_cur != nullptr; - el_prev = el_cur, el_cur = el_cur->next) { - if (strcmp(el_cur->name, name) == 0) { - // Store some information. - _hack_obs_property* next = el_cur->next; - bool is_first = (rprops->first_property == el_cur); - bool is_last = (rprops->last == &el_cur->next); - bool is_solo = (el_cur == el_prev); - - // Call the real one which fixes the element pointer and deallocates the element. - ::obs_properties_remove_by_name(props, name); - - // Fix up the memory pointers after the element was deleted. - if (is_last) { - if (is_solo) { - rprops->last = &rprops->first_property; - } else { - rprops->last = &el_prev->next; - } - } - if (is_first) { - rprops->first_property = next; - } - - // Finally break out as we no longer have to process the properties list. - return true; - } - - if (el_cur->type == OBS_PROPERTY_GROUP) { - if (streamfx::obs::tools::obs_properties_remove_by_name( - obs_property_group_content(reinterpret_cast(el_cur)), name)) - return true; - } - } - - return false; -} - streamfx::obs::tools::child_source::child_source(obs_source_t* parent, std::shared_ptr child) : _parent(parent), _child(child) { diff --git a/source/obs/obs-tools.hpp b/source/obs/obs-tools.hpp index 739176171d..f1aba6bd3d 100644 --- a/source/obs/obs-tools.hpp +++ b/source/obs/obs-tools.hpp @@ -24,8 +24,6 @@ namespace streamfx::obs { namespace tools { bool scene_contains_source(obs_scene_t* scene, obs_source_t* source); - bool obs_properties_remove_by_name(obs_properties_t* props, const char* name); - class child_source { obs_source_t* _parent; std::shared_ptr _child; From 6dd661a41c251450d78bff190bb5c866d8a7f5cf Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 10 May 2022 22:52:35 +0200 Subject: [PATCH 015/164] obs/source-tracker: Fix missing sources and modernize singleton design In some rare cases, a bug is observed where some sources end up missing despite being visible in the OBS Studio UI. This is most likely related to us actually missing the events due to plugin load order. We can fix this by explicitly enumerating sources in the constructor. Additionally in order to reduce the human error factor, we should avoid explicit initialize() and finalize() calls for our singleton. Instead the get() function should do all of the heavy lifting, including thread safety, so that the human writing the code will have next to no chances to break it. --- source/obs/obs-source-tracker.cpp | 219 +++++++++++++++++++----------- source/obs/obs-source-tracker.hpp | 23 ++-- source/plugin.cpp | 5 +- 3 files changed, 154 insertions(+), 93 deletions(-) diff --git a/source/obs/obs-source-tracker.cpp b/source/obs/obs-source-tracker.cpp index 6236cc617a..aba02a92d5 100644 --- a/source/obs/obs-source-tracker.cpp +++ b/source/obs/obs-source-tracker.cpp @@ -18,127 +18,167 @@ */ #include "obs-source-tracker.hpp" +#include #include #include "obs/obs-tools.hpp" -#include "plugin.hpp" - -static std::shared_ptr source_tracker_instance; +#include "util/util-logging.hpp" + +#ifdef _DEBUG +#define ST_PREFIX "<%s> " +#define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#define D_LOG_WARNING(x, ...) P_LOG_WARN(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#define D_LOG_INFO(x, ...) P_LOG_INFO(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#define D_LOG_DEBUG(x, ...) P_LOG_DEBUG(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#else +#define ST_PREFIX " " +#define D_LOG_ERROR(...) P_LOG_ERROR(ST_PREFIX __VA_ARGS__) +#define D_LOG_WARNING(...) P_LOG_WARN(ST_PREFIX __VA_ARGS__) +#define D_LOG_INFO(...) P_LOG_INFO(ST_PREFIX __VA_ARGS__) +#define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) +#endif void streamfx::obs::source_tracker::source_create_handler(void* ptr, calldata_t* data) noexcept -try { - streamfx::obs::source_tracker* self = reinterpret_cast(ptr); +{ + auto* self = reinterpret_cast(ptr); + try { + obs_source_t* source = nullptr; + if (calldata_get_ptr(data, "source", &source); !source) { + throw std::runtime_error("Missing 'source' parameter."); + } - obs_source_t* target = nullptr; - calldata_get_ptr(data, "source", &target); + self->insert_source(source); + } catch (const std::exception& ex) { + DLOG_ERROR("Event 'source_create' caused exception: %s", ex.what()); + } catch (...) { + DLOG_ERROR("Event 'source_create' caused unknown exception.", nullptr); + } +} - if (!target) { - return; +void streamfx::obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept +{ + auto* self = reinterpret_cast(ptr); + try { + obs_source_t* source = nullptr; + if (calldata_get_ptr(data, "source", &source); !source) { + throw std::runtime_error("Missing 'source' parameter."); + } + + } catch (const std::exception& ex) { + DLOG_ERROR("Event 'source_destroy' caused exception: %s", ex.what()); + } catch (...) { + DLOG_ERROR("Event 'source_destroy' caused unknown exception.", nullptr); + } +} + +void streamfx::obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept +{ + auto* self = reinterpret_cast(ptr); + try { + obs_source_t* source = nullptr; + if (calldata_get_ptr(data, "source", &source); !source) { + throw std::runtime_error("Missing 'source' parameter."); + } + + const char* old_name = nullptr; + if (calldata_get_string(data, "prev_name", &old_name); !old_name) { + throw std::runtime_error("Missing 'prev_name' parameter."); + } + + const char* new_name = nullptr; + if (calldata_get_string(data, "new_name", &new_name); !new_name) { + throw std::runtime_error("Missing 'new_name' parameter."); + } + + self->rename_source(old_name, new_name, source); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); } +} - const char* name = obs_source_get_name(target); +void streamfx::obs::source_tracker::insert_source(obs_source_t* source) +{ + const auto* name = obs_source_get_name(source); if (!name) { // Do not track unnamed sources. return; } - obs_weak_source_t* weak = obs_source_get_weak_source(target); + std::shared_ptr weak{obs_source_get_weak_source(source), streamfx::obs::obs_weak_source_deleter}; if (!weak) { // This source has already been deleted, do not track. return; } - { - std::unique_lock ul(self->_lock); - self->_sources.insert({std::string(name), {weak, streamfx::obs::obs_weak_source_deleter}}); - } -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + std::unique_lock lock(_mutex); + _sources.insert({ + std::string(name), + weak, + }); } -void streamfx::obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept -try { - streamfx::obs::source_tracker* self = reinterpret_cast(ptr); - - obs_source_t* target = nullptr; - calldata_get_ptr(data, "source", &target); - - if (!target) { - return; - } +void streamfx::obs::source_tracker::remove_source(obs_source_t* source) +{ + const char* name = obs_source_get_name(source); - const char* name = obs_source_get_name(target); - if (!name) { // Not tracking unnamed sources. - return; - } + // Lock read & write access to the map. + std::unique_lock ul(_mutex); - { - std::unique_lock ul(self->_lock); - auto found = self->_sources.find(std::string(name)); - if (found == self->_sources.end()) { + // Try and remove the source by name. + if (name != nullptr) { + auto found = _sources.find(std::string(name)); + if (found != _sources.end()) { + _sources.erase(found); return; } - self->_sources.erase(found); - } -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept -try { - streamfx::obs::source_tracker* self = reinterpret_cast(ptr); - - obs_source_t* target = nullptr; - const char* prev_name = nullptr; - const char* new_name = nullptr; - calldata_get_ptr(data, "source", &target); - calldata_get_string(data, "prev_name", &prev_name); - calldata_get_string(data, "new_name", &new_name); - - if (strcmp(prev_name, new_name) == 0) { - // They weren't renamed at all, invalid event. - return; } - { - std::unique_lock ul(self->_lock); - auto found = self->_sources.find(std::string(prev_name)); - if (found == self->_sources.end()) { - // Untracked source, insert. - obs_weak_source_t* weak = obs_source_get_weak_source(target); - if (!weak) { - return; - } - self->_sources.insert({new_name, {weak, streamfx::obs::obs_weak_source_deleter}}); + // If that didn't work, try and remove it by handle. + for (auto iter = _sources.begin(); iter != _sources.end(); iter++) { + if (obs_weak_source_get_source(iter->second.get()) == source) { + _sources.erase(iter); return; } + } - // Insert at new key, remove old pair. - self->_sources.insert({new_name, found->second}); - self->_sources.erase(found); + // If that all failed, and the source is named, throw and report an error. + if (name) { + D_LOG_WARNING("Source '%s' was not tracked.", name); + throw std::runtime_error("Failed to find given source."); } -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); } -void streamfx::obs::source_tracker::initialize() +void streamfx::obs::source_tracker::rename_source(std::string_view old_name, std::string_view new_name, + obs_source_t* source) { - source_tracker_instance = std::make_shared(); -} + if (old_name == new_name) { + throw std::runtime_error("New and old name are identical."); + } -void streamfx::obs::source_tracker::finalize() -{ - source_tracker_instance.reset(); -} + std::unique_lock ul(_mutex); + auto found = _sources.find(std::string(old_name)); + if (found == _sources.end()) { + insert_source(source); + return; + } -std::shared_ptr streamfx::obs::source_tracker::get() -{ - return source_tracker_instance; + // Insert at new key, remove old pair. + _sources.insert({new_name.data(), found->second}); + _sources.erase(found); } -streamfx::obs::source_tracker::source_tracker() +streamfx::obs::source_tracker::source_tracker() : _sources(), _mutex() { auto osi = obs_get_signal_handler(); signal_handler_connect(osi, "source_create", &source_create_handler, this); signal_handler_connect(osi, "source_destroy", &source_destroy_handler, this); signal_handler_connect(osi, "source_rename", &source_rename_handler, this); + + // Enumerate all current sources and filters. + obs_enum_all_sources( + [](void* param, obs_source_t* source) { + auto* self = reinterpret_cast<::streamfx::obs::source_tracker*>(param); + self->insert_source(source); + return true; + }, + this); } streamfx::obs::source_tracker::~source_tracker() @@ -158,7 +198,7 @@ void streamfx::obs::source_tracker::enumerate(enumerate_cb_t ecb, filter_cb_t fc // Need func-local copy, otherwise we risk corruption if a new source is created or destroyed. decltype(_sources) _clone; { - std::unique_lock ul(_lock); + std::unique_lock ul(_mutex); _clone = _sources; } @@ -209,3 +249,18 @@ bool streamfx::obs::source_tracker::filter_scenes(std::string, obs_source_t* sou { return (obs_source_get_type(source) != OBS_SOURCE_TYPE_SCENE); } + +std::shared_ptr streamfx::obs::source_tracker::get() +{ + static std::mutex inst_mtx; + static std::weak_ptr inst_weak; + + std::unique_lock lock(inst_mtx); + if (inst_weak.expired()) { + auto instance = std::shared_ptr(new streamfx::obs::source_tracker()); + inst_weak = instance; + return instance; + } else { + return inst_weak.lock(); + } +} diff --git a/source/obs/obs-source-tracker.hpp b/source/obs/obs-source-tracker.hpp index bff87c33ad..a8303a70f6 100644 --- a/source/obs/obs-source-tracker.hpp +++ b/source/obs/obs-source-tracker.hpp @@ -26,20 +26,16 @@ namespace streamfx::obs { class source_tracker { std::map> _sources; - std::mutex _lock; + std::mutex _mutex; static void source_create_handler(void* ptr, calldata_t* data) noexcept; static void source_destroy_handler(void* ptr, calldata_t* data) noexcept; static void source_rename_handler(void* ptr, calldata_t* data) noexcept; - public: // Singleton - static void initialize(); - static void finalize(); - static std::shared_ptr get(); - - public: - source_tracker(); - ~source_tracker(); + protected: + void insert_source(obs_source_t* source); + void remove_source(obs_source_t* source); + void rename_source(std::string_view old_name, std::string_view new_name, obs_source_t* source); public: // Callback function for enumerating sources. @@ -56,6 +52,12 @@ namespace streamfx::obs { // @return true to skip, false to pass along. typedef std::function filter_cb_t; + protected: + source_tracker(); + + public: + ~source_tracker(); + //! Enumerate all tracked sources // // @param enumerate_cb The function called for each tracked source. @@ -68,5 +70,8 @@ namespace streamfx::obs { static bool filter_video_sources(std::string name, obs_source_t* source); static bool filter_transitions(std::string name, obs_source_t* source); static bool filter_scenes(std::string name, obs_source_t* source); + + public: // Singleton + static std::shared_ptr get(); }; } // namespace streamfx::obs diff --git a/source/plugin.cpp b/source/plugin.cpp index 3882120bdc..3701394e63 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -94,6 +94,7 @@ static std::shared_ptr _threadpool; static std::shared_ptr _gs_fstri_vb; static std::shared_ptr _streamfx_gfx_opengl; +static std::shared_ptr _source_tracker; MODULE_EXPORT bool obs_module_load(void) try { @@ -106,7 +107,7 @@ try { _threadpool = std::make_shared(); // Initialize Source Tracker - streamfx::obs::source_tracker::initialize(); + _source_tracker = streamfx::obs::source_tracker::get(); // Initialize GLAD (OpenGL) { @@ -310,7 +311,7 @@ try { } // Finalize Source Tracker - streamfx::obs::source_tracker::finalize(); + _source_tracker.reset(); // // Auto-Updater //#ifdef ENABLE_UPDATER From 9bbc35b29355999f33bf559876a4e8aeeb052674 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 14 May 2022 06:29:41 +0200 Subject: [PATCH 016/164] obs/source: Refactor old deprecated classes --- CMakeLists.txt | 26 +- source/obs/obs-source-active-child.cpp | 19 + source/obs/obs-source-active-child.hpp | 49 ++ source/obs/obs-source-active-reference.cpp | 19 + source/obs/obs-source-active-reference.hpp | 48 ++ source/obs/obs-source-info.cpp | 0 source/obs/obs-source-info.hpp | 0 source/obs/obs-source-showing-reference.cpp | 19 + source/obs/obs-source-showing-reference.hpp | 49 ++ source/obs/obs-source.cpp | 813 -------------------- source/obs/obs-source.hpp | 736 +++++++++++++++--- source/obs/obs-weak-source.cpp | 19 + source/obs/obs-weak-source.hpp | 191 +++++ 13 files changed, 1066 insertions(+), 922 deletions(-) create mode 100644 source/obs/obs-source-active-child.cpp create mode 100644 source/obs/obs-source-active-child.hpp create mode 100644 source/obs/obs-source-active-reference.cpp create mode 100644 source/obs/obs-source-active-reference.hpp create mode 100644 source/obs/obs-source-info.cpp create mode 100644 source/obs/obs-source-info.hpp create mode 100644 source/obs/obs-source-showing-reference.cpp create mode 100644 source/obs/obs-source-showing-reference.hpp create mode 100644 source/obs/obs-weak-source.cpp create mode 100644 source/obs/obs-weak-source.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index fb65093814..ac7852a33f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1313,18 +1313,32 @@ list(APPEND PROJECT_PRIVATE_SOURCE "source/obs/gs/gs-vertex.cpp" "source/obs/gs/gs-vertexbuffer.hpp" "source/obs/gs/gs-vertexbuffer.cpp" - "source/obs/obs-encoder-factory.hpp" - "source/obs/obs-encoder-factory.cpp" "source/obs/obs-signal-handler.hpp" "source/obs/obs-signal-handler.cpp" - "source/obs/obs-source.hpp" - "source/obs/obs-source.cpp" - "source/obs/obs-source-factory.hpp" - "source/obs/obs-source-factory.cpp" "source/obs/obs-source-tracker.hpp" "source/obs/obs-source-tracker.cpp" "source/obs/obs-tools.hpp" "source/obs/obs-tools.cpp" + + # obs_encoder_info_t, obs_encoder_t, obs_weak_encoder_t + "source/obs/obs-encoder-factory.hpp" + "source/obs/obs-encoder-factory.cpp" + + # obs_source_info_t, obs_source_t, obs_weak_source_t + "source/obs/obs-source-factory.hpp" + "source/obs/obs-source-factory.cpp" + "source/obs/obs-source-info.hpp" + "source/obs/obs-source-info.cpp" + "source/obs/obs-source.hpp" + "source/obs/obs-source.cpp" + "source/obs/obs-source-active-child.hpp" + "source/obs/obs-source-active-child.cpp" + "source/obs/obs-source-active-reference.hpp" + "source/obs/obs-source-active-reference.cpp" + "source/obs/obs-source-showing-reference.hpp" + "source/obs/obs-source-showing-reference.cpp" + "source/obs/obs-weak-source.hpp" + "source/obs/obs-weak-source.cpp" ) list(APPEND PROJECT_DATA "data/effects/color_conversion_rgb_hsl.effect" diff --git a/source/obs/obs-source-active-child.cpp b/source/obs/obs-source-active-child.cpp new file mode 100644 index 0000000000..c876eb10ca --- /dev/null +++ b/source/obs/obs-source-active-child.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "obs-source-active-child.hpp" diff --git a/source/obs/obs-source-active-child.hpp b/source/obs/obs-source-active-child.hpp new file mode 100644 index 0000000000..736f1dfc8f --- /dev/null +++ b/source/obs/obs-source-active-child.hpp @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma once +#include "common.hpp" +#include "obs-source.hpp" +#include "obs-tools.hpp" +#include "obs-weak-source.hpp" + +namespace streamfx::obs { + class source_active_child { + ::streamfx::obs::weak_source _parent; + ::streamfx::obs::weak_source _child; + + public: + ~source_active_child() + { + auto parent = _parent.lock(); + auto child = _child.lock(); + if (parent && child) { + obs_source_remove_active_child(parent, child); + } + } + source_active_child(::streamfx::obs::source const& parent, ::streamfx::obs::source const& child) + : _parent(parent), _child(child) + { + if (::streamfx::obs::tools::source_find_source(child, parent)) { + throw std::runtime_error("Child contains Parent"); + } else if (!obs_source_add_active_child(parent, child)) { + throw std::runtime_error("Child contains Parent"); + } + } + }; +} // namespace streamfx::obs diff --git a/source/obs/obs-source-active-reference.cpp b/source/obs/obs-source-active-reference.cpp new file mode 100644 index 0000000000..394c19974d --- /dev/null +++ b/source/obs/obs-source-active-reference.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "obs-source-active-reference.hpp" diff --git a/source/obs/obs-source-active-reference.hpp b/source/obs/obs-source-active-reference.hpp new file mode 100644 index 0000000000..c5233d48eb --- /dev/null +++ b/source/obs/obs-source-active-reference.hpp @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma once +#include "common.hpp" +#include "obs-source.hpp" +#include "obs-weak-source.hpp" + +namespace streamfx::obs { + class source_active_reference { + ::streamfx::obs::weak_source _target; + + public: + ~source_active_reference() + { + auto v = _target.lock(); + if (v) { + v.decrement_active(); + } + } + source_active_reference(::streamfx::obs::source& source) : _target(source) + { + source.increment_active(); + } + + public: + static FORCE_INLINE std::shared_ptr + add_active_reference(::streamfx::obs::source& source) + { + return std::make_shared(source); + } + }; +} // namespace streamfx::obs diff --git a/source/obs/obs-source-info.cpp b/source/obs/obs-source-info.cpp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/source/obs/obs-source-info.hpp b/source/obs/obs-source-info.hpp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/source/obs/obs-source-showing-reference.cpp b/source/obs/obs-source-showing-reference.cpp new file mode 100644 index 0000000000..2f71f103d0 --- /dev/null +++ b/source/obs/obs-source-showing-reference.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "obs-source-showing-reference.hpp" diff --git a/source/obs/obs-source-showing-reference.hpp b/source/obs/obs-source-showing-reference.hpp new file mode 100644 index 0000000000..b14b78bce8 --- /dev/null +++ b/source/obs/obs-source-showing-reference.hpp @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma once +#include "common.hpp" +#include "obs-source.hpp" +#include "obs-tools.hpp" +#include "obs-weak-source.hpp" + +namespace streamfx::obs { + class source_showing_reference { + ::streamfx::obs::weak_source _target; + + public: + ~source_showing_reference() + { + auto v = _target.lock(); + if (v) { + v.decrement_showing(); + } + } + source_showing_reference(::streamfx::obs::source& source) : _target(source) + { + source.increment_showing(); + } + + public: + static FORCE_INLINE std::shared_ptr + add_showing_reference(::streamfx::obs::source& source) + { + return std::make_shared(source); + } + }; +} // namespace streamfx::obs diff --git a/source/obs/obs-source.cpp b/source/obs/obs-source.cpp index f578f5855f..385120e062 100644 --- a/source/obs/obs-source.cpp +++ b/source/obs/obs-source.cpp @@ -18,816 +18,3 @@ */ #include "obs-source.hpp" -#include -#include "plugin.hpp" - -void streamfx::obs::deprecated_source::handle_destroy(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - - obs_source_t* source; - if (!calldata_get_ptr(calldata, "source", &source)) { - return; - } - - if (self->_self == source) { - self->_self = nullptr; - } - - if (self->events.destroy) { - return; - } - self->events.destroy(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_remove(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.remove) { - return; - } - self->events.remove(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_save(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.save) { - return; - } - self->events.save(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_load(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.load) { - return; - } - self->events.load(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_activate(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.activate) { - return; - } - self->events.activate(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_deactivate(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.deactivate) { - return; - } - self->events.deactivate(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_show(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.show) { - return; - } - self->events.show(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_hide(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.hide) { - return; - } - self->events.hide(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_enable(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.enable) { - return; - } - - bool enabled = false; - if (!calldata_get_bool(calldata, "enabled", &enabled)) { - return; - } - - self->events.enable(self, enabled); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_push_to_mute_changed(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.push_to_mute_changed) { - return; - } - - bool enabled = false; - if (!calldata_get_bool(calldata, "enabled", &enabled)) { - return; - } - - self->events.push_to_mute_changed(self, enabled); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_push_to_mute_delay(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.push_to_mute_delay) { - return; - } - - long long delay; - if (!calldata_get_int(calldata, "delay", &delay)) { - return; - } - - self->events.push_to_mute_delay(self, delay); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_push_to_talk_changed(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.push_to_talk_changed) { - return; - } - - bool enabled = false; - if (!calldata_get_bool(calldata, "enabled", &enabled)) { - return; - } - - self->events.push_to_talk_changed(self, enabled); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_push_to_talk_delay(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.push_to_talk_delay) { - return; - } - - long long delay; - if (!calldata_get_int(calldata, "delay", &delay)) { - return; - } - - self->events.push_to_talk_delay(self, delay); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_rename(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.enable) { - return; - } - - const char* new_name; - if (!calldata_get_string(calldata, "new_name", &new_name)) { - return; - } - - const char* prev_name; - if (!calldata_get_string(calldata, "prev_name", &prev_name)) { - return; - } - - self->events.rename(self, std::string(new_name ? new_name : ""), std::string(prev_name ? prev_name : "")); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_update_properties(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.update_properties) { - return; - } - self->events.update_properties(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_update_flags(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.update_flags) { - return; - } - - long long flags; - if (!calldata_get_int(calldata, "flags", &flags)) { - return; - } - - self->events.update_flags(self, flags); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_mute(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.mute) { - return; - } - - bool muted; - if (!calldata_get_bool(calldata, "muted", &muted)) { - return; - } - - self->events.mute(self, muted); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_volume(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.volume) { - return; - } - - double volume; - if (!calldata_get_float(calldata, "volume", &volume)) { - return; - } - - self->events.volume(self, volume); - - calldata_set_float(calldata, "volume", volume); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_audio_sync(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.audio_sync) { - return; - } - - long long mixers; - if (!calldata_get_int(calldata, "offset", &mixers)) { - return; - } - - self->events.audio_sync(self, mixers); - - calldata_set_int(calldata, "offset", mixers); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_audio_mixers(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.audio_mixers) { - return; - } - - long long mixers; - if (!calldata_get_int(calldata, "mixers", &mixers)) { - return; - } - - self->events.audio_mixers(self, mixers); - - calldata_set_int(calldata, "mixers", mixers); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_audio_data(void* p, obs_source_t*, const audio_data* audio, - bool muted) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.audio) { - return; - } - - self->events.audio(self, audio, muted); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_filter_add(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.filter_add) { - return; - } - - obs_source_t* filter; - if (!calldata_get_ptr(calldata, "filter", &filter)) { - return; - } - - self->events.filter_add(self, filter); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_filter_remove(void* p, calldata_t* calldata) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.filter_remove) { - return; - } - - obs_source_t* filter; - if (!calldata_get_ptr(calldata, "filter", &filter)) { - return; - } - - self->events.filter_remove(self, filter); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_reorder_filters(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.reorder_filters) { - return; - } - self->events.reorder_filters(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_transition_start(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.transition_start) { - return; - } - self->events.transition_start(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_transition_video_stop(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.transition_video_stop) { - return; - } - self->events.transition_video_stop(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -void streamfx::obs::deprecated_source::handle_transition_stop(void* p, calldata_t*) noexcept -try { - streamfx::obs::deprecated_source* self = reinterpret_cast(p); - if (!self->events.transition_stop) { - return; - } - self->events.transition_stop(self); -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} - -streamfx::obs::deprecated_source::~deprecated_source() -{ -#ifdef auto_signal_d -#undef auto_signal_d -#endif -#define auto_signal_d(SIGNAL) this->events.SIGNAL.clear() - auto_signal_d(destroy); - auto_signal_d(remove); - auto_signal_d(save); - auto_signal_d(load); - auto_signal_d(activate); - auto_signal_d(deactivate); - auto_signal_d(show); - auto_signal_d(hide); - auto_signal_d(mute); - auto_signal_d(push_to_mute_changed); - auto_signal_d(push_to_mute_delay); - auto_signal_d(push_to_talk_changed); - auto_signal_d(push_to_talk_delay); - auto_signal_d(enable); - auto_signal_d(rename); - auto_signal_d(volume); - auto_signal_d(update_properties); - auto_signal_d(update_flags); - auto_signal_d(audio_sync); - auto_signal_d(audio_mixers); - auto_signal_d(audio); - auto_signal_d(filter_add); - auto_signal_d(filter_remove); - auto_signal_d(reorder_filters); - auto_signal_d(transition_start); - auto_signal_d(transition_video_stop); - auto_signal_d(transition_stop); -#undef auto_signal_d - - if (this->_track_ownership && this->_self) { - obs_source_release(this->_self); - } - this->_self = nullptr; -} - -streamfx::obs::deprecated_source::deprecated_source() -{ -#ifdef auto_signal_c -#undef auto_signal_c -#endif -#define auto_signal_c(SIGNAL) \ - { \ - this->events.SIGNAL.set_listen_callback([this]() noexcept { \ - if (!this->_self) \ - return; \ - auto sh = obs_source_get_signal_handler(this->_self); \ - if (sh) { \ - signal_handler_connect(sh, "" #SIGNAL, obs::deprecated_source::handle_##SIGNAL, this); \ - } \ - }); \ - this->events.SIGNAL.set_silence_callback([this]() noexcept { \ - if (!this->_self) \ - return; \ - auto sh = obs_source_get_signal_handler(this->_self); \ - if (sh) { \ - signal_handler_disconnect(sh, "" #SIGNAL, obs::deprecated_source::handle_##SIGNAL, this); \ - } \ - }); \ - } - auto_signal_c(destroy) auto_signal_c(remove) auto_signal_c(save) auto_signal_c(load) auto_signal_c(activate) - auto_signal_c(deactivate) auto_signal_c(show) auto_signal_c(hide) auto_signal_c(mute) - auto_signal_c(push_to_mute_changed) auto_signal_c(push_to_mute_delay) auto_signal_c(push_to_talk_changed) - auto_signal_c(push_to_talk_delay) auto_signal_c(enable) auto_signal_c(rename) auto_signal_c(volume) - auto_signal_c(update_properties) auto_signal_c(update_flags) auto_signal_c(audio_sync) - auto_signal_c(audio_mixers) auto_signal_c(filter_add) auto_signal_c(filter_remove) - auto_signal_c(reorder_filters) auto_signal_c(transition_start) - auto_signal_c(transition_video_stop) auto_signal_c(transition_stop) -#undef auto_signal_c - - // libOBS unfortunately does not use the event system for audio data callbacks, which is kind of odd as most other - // things do. So instead we'll have to manually deal with it for now. - { - this->events.audio.set_listen_callback([this]() noexcept { - if (!this->_self) - return; - obs_source_add_audio_capture_callback(this->_self, streamfx::obs::deprecated_source::handle_audio_data, - this); - }); - this->events.audio.set_silence_callback([this]() noexcept { - if (!this->_self) - return; - obs_source_remove_audio_capture_callback(this->_self, streamfx::obs::deprecated_source::handle_audio_data, - this); - }); - } -} - -streamfx::obs::deprecated_source::deprecated_source(std::string name, bool ptrack_ownership, bool add_reference) - : ::streamfx::obs::deprecated_source::deprecated_source() -{ - this->_self = obs_get_source_by_name(name.c_str()); - if (!this->_self) { - throw std::runtime_error("source with name not found"); - } - - this->_track_ownership = ptrack_ownership; - if (!add_reference) { - obs_source_release(this->_self); - } -} - -streamfx::obs::deprecated_source::deprecated_source(obs_source_t* source, bool ptrack_ownership, bool add_reference) - : ::streamfx::obs::deprecated_source::deprecated_source() -{ - this->_self = source; - if (!this->_self) { - throw std::invalid_argument("source must not be null"); - } - - this->_track_ownership = ptrack_ownership; - if (add_reference) { - obs_source_addref(this->_self); - } -} -/* -obs::deprecated_source::deprecated_source(deprecated_source const& other) -{ - this->_self = other._self; - this->_track_ownership = other._track_ownership; - - if (this->_track_ownership) { - obs_source_addref(this->_self); - } - -#ifdef auto_signal_c -#undef auto_signal_c -#endif -#define auto_signal_c(SIGNAL) this->events.SIGNAL = other.events.SIGNAL - auto_signal_c(destroy); - auto_signal_c(remove); - auto_signal_c(save); - auto_signal_c(load); - auto_signal_c(activate); - auto_signal_c(deactivate); - auto_signal_c(show); - auto_signal_c(hide); - auto_signal_c(mute); - auto_signal_c(push_to_mute_changed); - auto_signal_c(push_to_mute_delay); - auto_signal_c(push_to_talk_changed); - auto_signal_c(push_to_talk_delay); - auto_signal_c(enable); - auto_signal_c(rename); - auto_signal_c(volume); - auto_signal_c(update_properties); - auto_signal_c(update_flags); - auto_signal_c(audio_sync); - auto_signal_c(audio_mixers); - auto_signal_c(audio); - auto_signal_c(filter_add); - auto_signal_c(filter_remove); - auto_signal_c(reorder_filters); - auto_signal_c(transition_start); - auto_signal_c(transition_video_stop); - auto_signal_c(transition_stop); -#undef auto_signal_c -} - -obs::deprecated_source& obs::deprecated_source::operator=(deprecated_source const& other) -{ - if (this == &other) { - return *this; - } - - // Release previous source. - if (this->_self && this->_track_ownership) { - obs_source_release(this->_self); - } - - this->_self = other._self; - this->_track_ownership = other._track_ownership; - - if (this->_track_ownership) { - obs_source_addref(this->_self); - } - -#ifdef auto_signal_c -#undef auto_signal_c -#endif -#define auto_signal_c(SIGNAL) this->events.SIGNAL = other.events.SIGNAL - auto_signal_c(destroy); - auto_signal_c(remove); - auto_signal_c(save); - auto_signal_c(load); - auto_signal_c(activate); - auto_signal_c(deactivate); - auto_signal_c(show); - auto_signal_c(hide); - auto_signal_c(mute); - auto_signal_c(push_to_mute_changed); - auto_signal_c(push_to_mute_delay); - auto_signal_c(push_to_talk_changed); - auto_signal_c(push_to_talk_delay); - auto_signal_c(enable); - auto_signal_c(rename); - auto_signal_c(volume); - auto_signal_c(update_properties); - auto_signal_c(update_flags); - auto_signal_c(audio_sync); - auto_signal_c(audio_mixers); - auto_signal_c(audio); - auto_signal_c(filter_add); - auto_signal_c(filter_remove); - auto_signal_c(reorder_filters); - auto_signal_c(transition_start); - auto_signal_c(transition_video_stop); - auto_signal_c(transition_stop); -#undef auto_signal_c - - return *this; -} -*/ - -streamfx::obs::deprecated_source::deprecated_source(deprecated_source&& other) - : _self(std::move(other._self)), _track_ownership(std::move(other._track_ownership)) -{ - // Clean out other source - other._self = nullptr; - other._track_ownership = false; - -#ifdef auto_signal_c -#undef auto_signal_c -#endif -#define auto_signal_c(SIGNAL) this->events.SIGNAL = std::move(other.events.SIGNAL) - auto_signal_c(destroy); - auto_signal_c(remove); - auto_signal_c(save); - auto_signal_c(load); - auto_signal_c(activate); - auto_signal_c(deactivate); - auto_signal_c(show); - auto_signal_c(hide); - auto_signal_c(mute); - auto_signal_c(push_to_mute_changed); - auto_signal_c(push_to_mute_delay); - auto_signal_c(push_to_talk_changed); - auto_signal_c(push_to_talk_delay); - auto_signal_c(enable); - auto_signal_c(rename); - auto_signal_c(volume); - auto_signal_c(update_properties); - auto_signal_c(update_flags); - auto_signal_c(audio_sync); - auto_signal_c(audio_mixers); - auto_signal_c(audio); - auto_signal_c(filter_add); - auto_signal_c(filter_remove); - auto_signal_c(reorder_filters); - auto_signal_c(transition_start); - auto_signal_c(transition_video_stop); - auto_signal_c(transition_stop); -#undef auto_signal_c -} - -streamfx::obs::deprecated_source& streamfx::obs::deprecated_source::operator=(deprecated_source&& other) -{ - if (this != &other) { - return *this; - } - - // Release previous source. - if (this->_self && this->_track_ownership) { - obs_source_release(this->_self); - } - - this->_self = std::move(other._self); - this->_track_ownership = std::move(other._track_ownership); - other._self = nullptr; - other._track_ownership = false; - -#ifdef auto_signal_c -#undef auto_signal_c -#endif -#define auto_signal_c(SIGNAL) this->events.SIGNAL = std::move(other.events.SIGNAL) - auto_signal_c(destroy); - auto_signal_c(remove); - auto_signal_c(save); - auto_signal_c(load); - auto_signal_c(activate); - auto_signal_c(deactivate); - auto_signal_c(show); - auto_signal_c(hide); - auto_signal_c(mute); - auto_signal_c(push_to_mute_changed); - auto_signal_c(push_to_mute_delay); - auto_signal_c(push_to_talk_changed); - auto_signal_c(push_to_talk_delay); - auto_signal_c(enable); - auto_signal_c(rename); - auto_signal_c(volume); - auto_signal_c(update_properties); - auto_signal_c(update_flags); - auto_signal_c(audio_sync); - auto_signal_c(audio_mixers); - auto_signal_c(audio); - auto_signal_c(filter_add); - auto_signal_c(filter_remove); - auto_signal_c(reorder_filters); - auto_signal_c(transition_start); - auto_signal_c(transition_video_stop); - auto_signal_c(transition_stop); -#undef auto_signal_c - - return *this; -} - -obs_source_type streamfx::obs::deprecated_source::type() -{ - if (!_self) { - return static_cast(-1); - } - return obs_source_get_type(_self); -} - -void* streamfx::obs::deprecated_source::type_data() -{ - if (!_self) { - return nullptr; - } - return obs_source_get_type_data(_self); -} - -uint32_t streamfx::obs::deprecated_source::width() -{ - if (!_self) { - return 0; - } - return obs_source_get_width(_self); -} - -uint32_t streamfx::obs::deprecated_source::height() -{ - if (!_self) { - return 0; - } - return obs_source_get_height(_self); -} - -bool streamfx::obs::deprecated_source::destroyed() -{ - return _self == nullptr; -} - -void streamfx::obs::deprecated_source::clear() -{ - _self = nullptr; -} - -obs_source_t* streamfx::obs::deprecated_source::get() -{ - return _self; -} diff --git a/source/obs/obs-source.hpp b/source/obs/obs-source.hpp index 4e461eb5b2..e291689407 100644 --- a/source/obs/obs-source.hpp +++ b/source/obs/obs-source.hpp @@ -19,119 +19,649 @@ #pragma once #include "common.hpp" -#include "util/util-event.hpp" namespace streamfx::obs { - class deprecated_source { - obs_source_t* _self; - bool _track_ownership = false; - - static void handle_destroy(void* p, calldata_t* calldata) noexcept; - static void handle_remove(void* p, calldata_t* calldata) noexcept; - static void handle_save(void* p, calldata_t* calldata) noexcept; - static void handle_load(void* p, calldata_t* calldata) noexcept; - static void handle_activate(void* p, calldata_t* calldata) noexcept; - static void handle_deactivate(void* p, calldata_t* calldata) noexcept; - static void handle_show(void* p, calldata_t* calldata) noexcept; - static void handle_hide(void* p, calldata_t* calldata) noexcept; - static void handle_enable(void* p, calldata_t* calldata) noexcept; - static void handle_push_to_mute_changed(void* p, calldata_t* calldata) noexcept; - static void handle_push_to_mute_delay(void* p, calldata_t* calldata) noexcept; - static void handle_push_to_talk_changed(void* p, calldata_t* calldata) noexcept; - static void handle_push_to_talk_delay(void* p, calldata_t* calldata) noexcept; - static void handle_rename(void* p, calldata_t* calldata) noexcept; - static void handle_update_properties(void* p, calldata_t* calldata) noexcept; - static void handle_update_flags(void* p, calldata_t* calldata) noexcept; - static void handle_mute(void* p, calldata_t* calldata) noexcept; - static void handle_volume(void* p, calldata_t* calldata) noexcept; - static void handle_audio_sync(void* p, calldata_t* calldata) noexcept; - static void handle_audio_mixers(void* p, calldata_t* calldata) noexcept; - static void handle_audio_data(void* p, obs_source_t* source, const audio_data* audio, bool muted) noexcept; - static void handle_filter_add(void* p, calldata_t* calldata) noexcept; - static void handle_filter_remove(void* p, calldata_t* calldata) noexcept; - static void handle_reorder_filters(void* p, calldata_t* calldata) noexcept; - static void handle_transition_start(void* p, calldata_t* calldata) noexcept; - static void handle_transition_video_stop(void* p, calldata_t* calldata) noexcept; - static void handle_transition_stop(void* p, calldata_t* calldata) noexcept; + class source { + obs_source_t* _ref; + bool _is_owner; public: - virtual ~deprecated_source(); + FORCE_INLINE ~source() + { + release(); + }; - deprecated_source(); + /** Empty/Invalid hard reference. + * + */ + FORCE_INLINE source() : _ref(nullptr), _is_owner(false){}; - deprecated_source(std::string name, bool track_ownership = true, bool add_reference = true); + /** Create a new hard reference from an existing pointer. + * + * @param source The source object to reference. + * @param add_reference Should we increment the reference counter (duplicate ownership) or leave as it is (transfer ownership)? + */ + FORCE_INLINE source(obs_source_t* source, bool duplicate_reference = false, bool take_ownership = true) + : _is_owner(take_ownership) + { + if (duplicate_reference) { + _ref = obs_source_get_ref(source); + } else { + _ref = source; + } + }; - deprecated_source(obs_source_t* source, bool track_ownership = true, bool add_reference = false); + /** Create a new hard reference for a given source by name. + * + * Attention: May fail if the name does not exactly match. + */ + FORCE_INLINE source(std::string_view name) : _is_owner(true) + { + _ref = obs_get_source_by_name(name.data()); + }; - public /*copy*/: - deprecated_source(deprecated_source const& other) = delete; - deprecated_source& operator=(deprecated_source const& other) = delete; + /** Create a new hard reference for a new source. + * + * Attention: May fail. + */ + FORCE_INLINE source(std::string_view id, std::string_view name, obs_data_t* settings, obs_data_t* hotkeys) + : _is_owner(true) + { + _ref = obs_source_create(id.data(), name.data(), settings, hotkeys); + if (!_ref) { + throw std::runtime_error("Failed to create source with given parameters."); + } + }; - public /*move*/: - deprecated_source(deprecated_source&& other); - deprecated_source& operator=(deprecated_source&& other); + /** Create a new hard reference for a new private source. + * + * Attention: May fail. + */ + FORCE_INLINE source(std::string_view id, std::string_view name, obs_data_t* settings) : _is_owner(true) + { + _ref = obs_source_create_private(id.data(), name.data(), settings); + if (!_ref) { + throw std::runtime_error("Failed to create source with given parameters."); + } + }; + + FORCE_INLINE source(source&& move) noexcept + { + _ref = move._ref; + _is_owner = move._is_owner; + move._ref = nullptr; + }; + + FORCE_INLINE ::streamfx::obs::source& operator=(source&& move) noexcept + { + release(); + _ref = move._ref; + _is_owner = move._is_owner; + move._ref = nullptr; + return *this; + }; + + FORCE_INLINE source(const source& copy) + { + if (copy._is_owner) { + _ref = obs_source_get_ref(copy._ref); + } else { + _ref = copy._ref; + } + _is_owner = copy._is_owner; + }; + + FORCE_INLINE ::streamfx::obs::source& operator=(const source& copy) + { + release(); + if (copy._is_owner) { + _ref = obs_source_get_ref(copy._ref); + } else { + _ref = copy._ref; + } + _is_owner = copy._is_owner; + return *this; + }; + + public: + /** Retrieve the underlying pointer for manual manipulation. + * + * Attention: Ownership remains with the class instance. + */ + FORCE_INLINE obs_source_t* get() const + { + return _ref; + }; + + /** Release the underlying pointer. + * + * Useful if you need to respond to the "source_remove" or "remove" signals. + * + * EXPORT void obs_source_release(obs_source_t *source); + */ + FORCE_INLINE void release() + { + if (_ref && _is_owner) { + obs_source_release(_ref); + _ref = nullptr; + _is_owner = false; + } + }; + + /** Duplicate the source if possible. + * + * Will create a duplicate the source entirely unless forbidden. If forbidden, will instead just return a reference. + * + * EXPORT obs_source_t *obs_source_duplicate(obs_source_t *source, const char *desired_name, bool create_private); + */ + FORCE_INLINE ::streamfx::obs::source duplicate(std::string_view name, bool is_private) + { + return obs_source_duplicate(_ref, name.data(), is_private); + }; + + public: + /** Get the source info identifier for this reference. + * + * May have a version appended to the end. + * + * EXPORT const char *obs_source_get_id(const obs_source_t *source); + */ + FORCE_INLINE std::string_view id() const + { + return obs_source_get_id(_ref); + }; + + /** Get the source info identifier for this reference. + * + * EXPORT const char *obs_source_get_unversioned_id(const obs_source_t *source); + */ + FORCE_INLINE std::string_view unversioned_id() const + { + return obs_source_get_unversioned_id(_ref); + }; + + /** What type is this source? + * + */ + FORCE_INLINE obs_source_type type() const + { + return obs_source_get_type(_ref); + }; + + /** Get the output flags. + * + * EXPORT uint32_t obs_source_get_output_flags(const obs_source_t *source); + */ + FORCE_INLINE uint32_t output_flags() const + { + return obs_source_get_output_flags(_ref); + }; + + /** Get the flags + * + * EXPORT uint32_t obs_source_get_flags(const obs_source_t *source); + */ + FORCE_INLINE uint32_t flags() const + { + return obs_source_get_flags(_ref); + }; + + /** Set the flags + * + * EXPORT void obs_source_set_default_flags(obs_source_t* source, uint32_t flags); + */ + FORCE_INLINE void default_flags(uint32_t flags) + { + obs_source_set_default_flags(_ref, flags); + }; + + /** Set the flags + * + * EXPORT void obs_source_set_flags(obs_source_t *source, uint32_t flags); + */ + FORCE_INLINE void flags(uint32_t flags) + { + obs_source_set_flags(_ref, flags); + }; + + /** What is the source type called? + * + * EXPORT const char *obs_source_get_display_name(const char *id); + */ + FORCE_INLINE std::string_view display_name() const + { + return obs_source_get_display_name(id().data()); + }; + + /** What is this source called? + * + * EXPORT const char *obs_source_get_name(const obs_source_t *source); + */ + FORCE_INLINE std::string_view name() const + { + return obs_source_get_name(_ref); + }; + + /** Change the name of the source. + * + * Triggers 'rename' on the source itself, as well as 'source_rename' globally if not private. + * + * EXPORT void obs_source_set_name(obs_source_t *source, const char *name); + */ + FORCE_INLINE void name(std::string_view new_name) + { + obs_source_set_name(_ref, new_name.data()); + }; + + /** + * + * EXPORT bool obs_source_enabled(const obs_source_t *source); + */ + FORCE_INLINE bool enabled() const + { + return obs_source_enabled(_ref); + }; + + /** + * + * EXPORT void obs_source_set_enabled(obs_source_t *source, bool enabled); + */ + FORCE_INLINE void enabled(bool enabled) + { + obs_source_set_enabled(_ref, enabled); + }; + + /** + * + * EXPORT bool obs_source_is_hidden(obs_source_t *source); + */ + FORCE_INLINE bool hidden() const + { + return obs_source_is_hidden(_ref); + }; + + /** + * + * EXPORT void obs_source_set_hidden(obs_source_t *source, bool hidden); + */ + FORCE_INLINE void hidden(bool v) + { + obs_source_set_hidden(_ref, v); + }; + + public /* Size */: + /** Get the base width of the source, if supported. + * + * This will be the size without any other scaling factors applied. + * + * EXPORT uint32_t obs_source_get_base_width(obs_source_t *source); + */ + FORCE_INLINE uint32_t base_width() const + { + return obs_source_get_base_width(_ref); + }; + + /** Get the base height of the source, if supported. + * + * This will be the size without any other scaling factors applied. + * + * EXPORT uint32_t obs_source_get_base_height(obs_source_t *source); + */ + FORCE_INLINE uint32_t base_height() const + { + return obs_source_get_base_height(_ref); + }; + + /** Get the reported width of the source, if supported. + * + * EXPORT uint32_t obs_source_get_width(obs_source_t *source); + */ + FORCE_INLINE uint32_t width() const + { + return obs_source_get_width(_ref); + }; + + /** Get the reported height of the source, if supported. + * + * EXPORT uint32_t obs_source_get_height(obs_source_t *source); + */ + FORCE_INLINE uint32_t height() const + { + return obs_source_get_height(_ref); + }; + + /** Get the reported size of the source, if supported. + * + * EXPORT uint32_t obs_source_get_width(obs_source_t *source); + * EXPORT uint32_t obs_source_get_height(obs_source_t *source); + */ + FORCE_INLINE std::pair size() const + { + return {width(), height()}; + }; + + public /* Configuration */: + /** Is the source configurable? + * + * EXPORT bool obs_source_configurable(const obs_source_t *source); + */ + FORCE_INLINE bool configurable() + { + return obs_source_configurable(_ref); + }; + + /** Retrieve the properties for the source. + * + * EXPORT obs_properties_t *obs_get_source_properties(const char *id); + */ + FORCE_INLINE obs_properties_t* properties() + { + return obs_source_properties(_ref); + }; + + /** Signal for properties to be updated. + * + * EXPORT void obs_source_update_properties(obs_source_t *source); + */ + FORCE_INLINE void update_properties() + { + obs_source_update_properties(_ref); + }; + + /** Retrieve the default values for the settings. + * + * EXPORT obs_data_t *obs_get_source_defaults(const char *id); + */ + FORCE_INLINE obs_data_t* defaults() + { + return obs_get_source_defaults(id().data()); + }; + + /** Retrieve the private settings. + * + * EXPORT obs_data_t *obs_source_get_private_settings(obs_source_t *item); + */ + FORCE_INLINE obs_data_t* private_settings() + { + return obs_source_get_private_settings(_ref); + }; + + /** Retrieve the current settings. + * + * EXPORT obs_data_t *obs_source_get_settings(const obs_source_t *source); + */ + FORCE_INLINE obs_data_t* settings() + { + return obs_source_get_settings(_ref); + }; + + /** Update the settings with new ones. + * + * Does not remove previously existing entries. + * + * EXPORT void obs_source_update(obs_source_t *source, obs_data_t *settings); + */ + FORCE_INLINE void update(obs_data_t* settings) + { + obs_source_update(_ref, settings); + }; + + /** Reset the settings, then update with new settings. + * + * EXPORT void obs_source_reset_settings(obs_source_t *source, obs_data_t *settings); + */ + FORCE_INLINE void reset_settings(obs_data_t* settings = nullptr) + { + obs_source_reset_settings(_ref, settings); + }; + + /** Signal the source to load. + * + * EXPORT void obs_source_load(obs_source_t *source); + */ + FORCE_INLINE void load() + { + obs_source_load(_ref); + }; + + /** Signal the source and all its filters to load. + * + * EXPORT void obs_source_load2(obs_source_t *source); + */ + FORCE_INLINE void load2() + { + obs_source_load2(_ref); + }; + + /** Signal the source to save. + * + * EXPORT void obs_source_save(obs_source_t *source); + */ + FORCE_INLINE void save() + { + obs_source_save(_ref); + }; + + public /* Interaction */: + /** + * + * EXPORT void obs_source_send_mouse_click(obs_source_t *source, const struct obs_mouse_event *event, int32_t type, bool mouse_up, uint32_t click_count); + */ + FORCE_INLINE void send_mouse_press(const obs_mouse_event* event, int32_t type, bool released, uint32_t count) + { + return obs_source_send_mouse_click(_ref, event, type, released, count); + }; + + /** + * + * EXPORT void obs_source_send_mouse_move(obs_source_t *source, const struct obs_mouse_event *event, bool mouse_leave); + */ + FORCE_INLINE void send_mouse_move(const obs_mouse_event* event, bool leave) + { + return obs_source_send_mouse_move(_ref, event, leave); + }; + + /** + * + * EXPORT void obs_source_send_mouse_wheel(obs_source_t *source, const struct obs_mouse_event *event, int x_delta, int y_delta); + */ + FORCE_INLINE void send_mouse_wheel(const obs_mouse_event* event, int32_t x_delta, int32_t y_delta) + { + return obs_source_send_mouse_wheel(_ref, event, x_delta, y_delta); + }; + + /** + * + * EXPORT void obs_source_send_key_click(obs_source_t *source, const struct obs_key_event *event, bool key_up); + */ + FORCE_INLINE void send_key_press(const obs_key_event* event, bool released) + { + return obs_source_send_key_click(_ref, event, released); + }; + + /** + * + * EXPORT void obs_source_send_focus(obs_source_t *source, bool focus); + */ + FORCE_INLINE void send_focus(bool in_focus) + { + return obs_source_send_focus(_ref, in_focus); + }; + + public /* Filters */: + /** + * + * EXPORT void obs_source_filter_add(obs_source_t *source, obs_source_t *filter); + */ + FORCE_INLINE void add_filter(::streamfx::obs::source& filter) + { + return obs_source_filter_add(_ref, filter.get()); + }; + + /** + * + * EXPORT void obs_source_filter_remove(obs_source_t *source, obs_source_t *filter); + */ + FORCE_INLINE void remove_filter(::streamfx::obs::source& filter) + { + return obs_source_filter_remove(_ref, filter.get()); + }; + + /** + * + * EXPORT obs_source_t *obs_filter_get_parent(const obs_source_t *filter); + */ + FORCE_INLINE ::streamfx::obs::source get_filter_parent() + { + return obs_filter_get_parent(_ref); + }; + + /** + * + * EXPORT obs_source_t *obs_filter_get_target(const obs_source_t *filter); + */ + FORCE_INLINE ::streamfx::obs::source get_filter_target() + { + return obs_filter_get_target(_ref); + }; + + /** + * + * EXPORT void obs_source_skip_video_filter(obs_source_t *filter); + */ + FORCE_INLINE void skip_video_filter() + { + return obs_source_skip_video_filter(_ref); + }; + + /** + * + * EXPORT bool obs_source_process_filter_begin(obs_source_t *filter, enum gs_color_format format, enum obs_allow_direct_render allow_direct); + */ + FORCE_INLINE bool process_filter_begin(gs_color_format format, obs_allow_direct_render allow_direct) + { + return obs_source_process_filter_begin(_ref, format, allow_direct); + }; + + /** + * + * EXPORT void obs_source_process_filter_end(obs_source_t *filter, gs_effect_t *effect, uint32_t width, uint32_t height); + */ + FORCE_INLINE void process_filter_end(gs_effect_t* effect, uint32_t width, uint32_t height) + { + obs_source_process_filter_end(_ref, effect, width, height); + }; + + /** + * + * EXPORT void obs_source_process_filter_tech_end(obs_source_t *filter, gs_effect_t *effect, uint32_t width, uint32_t height, const char *tech_name); + */ + FORCE_INLINE void process_filter_tech_end(gs_effect_t* effect, uint32_t width, uint32_t height, + std::string_view tech_name) + { + obs_source_process_filter_tech_end(_ref, effect, width, height, tech_name.data()); + }; + + public /* Active/Showing References */: + /** Is the source visible in main view? + * + * EXPORT bool obs_source_active(const obs_source_t *source); + */ + FORCE_INLINE bool active() const + { + return obs_source_active(_ref); + } + + /** Add a active reference (visible in main view). + * + * EXPORT void obs_source_inc_active(obs_source_t *source); + */ + FORCE_INLINE void increment_active() + { + obs_source_inc_active(_ref); + } + + /** Remove a active reference (visible in main view). + * + * EXPORT void obs_source_dec_active(obs_source_t *source); + */ + FORCE_INLINE void decrement_active() + { + obs_source_dec_active(_ref); + } + + /** Is the source visible in auxiliary views? + * + * EXPORT bool obs_source_showing(const obs_source_t *source); + */ + FORCE_INLINE bool showing() const + { + return obs_source_showing(_ref); + } + + /** Add a showing reference (visible in auxiliary view). + * + * EXPORT void obs_source_inc_showing(obs_source_t *source); + * EXPORT void obs_source_dec_showing(obs_source_t *source); + */ + FORCE_INLINE void increment_showing() + { + obs_source_inc_showing(_ref); + } + + /** Add a showing reference (visible in auxiliary view). + * + * EXPORT void obs_source_inc_showing(obs_source_t *source); + * EXPORT void obs_source_dec_showing(obs_source_t *source); + */ + FORCE_INLINE void decrement_showing() + { + obs_source_dec_showing(_ref); + } + + public /* ToDo */: + + /** + * + * EXPORT obs_missing_files_t* obs_source_get_missing_files(const obs_source_t *source); + */ + obs_missing_files_t* get_missing_files(); + + /** + * + * EXPORT void obs_source_replace_missing_file(obs_missing_file_cb cb, obs_source_t *source, const char *new_path, void *data); + */ + void replace_missing_file(obs_missing_file_cb cb, std::string_view path, void* data); public: - obs_source_type type(); - - void* type_data(); - - uint32_t width(); - uint32_t height(); - - bool destroyed(); - - public: // Unsafe Methods - void clear(); - - obs_source_t* get(); - - public: // Events - struct { - // Destroy and Remove - streamfx::util::event destroy; - streamfx::util::event remove; - - // Saving, Loading and Update - streamfx::util::event save; - streamfx::util::event load; - streamfx::util::event update_properties; - - // Activate, Deactivate - streamfx::util::event activate; - streamfx::util::event deactivate; - - // Show Hide - streamfx::util::event show; - streamfx::util::event hide; - - // Other - streamfx::util::event enable; - streamfx::util::event rename; - streamfx::util::event update_flags; - - // Hotkeys (PtM, PtT) - streamfx::util::event push_to_mute_changed; - streamfx::util::event push_to_mute_delay; - streamfx::util::event push_to_talk_changed; - streamfx::util::event push_to_talk_delay; - - // Audio - streamfx::util::event mute; - streamfx::util::event volume; - streamfx::util::event audio_sync; - streamfx::util::event audio_mixers; - streamfx::util::event audio; - - // Filters - streamfx::util::event filter_add; - streamfx::util::event filter_remove; - streamfx::util::event reorder_filters; - - // Transition - streamfx::util::event transition_start; - streamfx::util::event transition_video_stop; - streamfx::util::event transition_stop; - } events; + FORCE_INLINE operator obs_source_t*() const + { + return _ref; + } + + FORCE_INLINE obs_source_t* operator*() const + { + return _ref; + } + + FORCE_INLINE operator bool() const + { + return _ref != nullptr; + }; + + FORCE_INLINE bool operator==(source const& rhs) const + { + return _ref == rhs._ref; + }; + + FORCE_INLINE bool operator<(source const& rhs) const + { + return _ref < rhs._ref; + }; + + FORCE_INLINE bool operator==(obs_source_t* const& rhs) const + { + return _ref == rhs; + }; }; } // namespace streamfx::obs diff --git a/source/obs/obs-weak-source.cpp b/source/obs/obs-weak-source.cpp new file mode 100644 index 0000000000..1d6301ef83 --- /dev/null +++ b/source/obs/obs-weak-source.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "obs-weak-source.hpp" diff --git a/source/obs/obs-weak-source.hpp b/source/obs/obs-weak-source.hpp new file mode 100644 index 0000000000..da34790f0b --- /dev/null +++ b/source/obs/obs-weak-source.hpp @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2022 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma once +#include "common.hpp" +#include "obs-source.hpp" + +namespace streamfx::obs { + class source; + + class weak_source { + obs_weak_source_t* _ref; + + public: + ~weak_source() + { + if (_ref) { + obs_weak_source_release(_ref); + } + }; + + /** Empty/Invalid weak reference. + * + */ + weak_source() : _ref(nullptr){}; + + /** Create a new weak reference from an existing pointer. + * + * Attention: Ownership of obs_weak_source_t is transferred to the class itself, and should not be released. + */ + weak_source(obs_weak_source_t* source) : _ref(source) + { + if (!_ref) + throw std::invalid_argument("Parameter 'source' does not define a valid source."); + }; + + /** Create a new weak reference from an existing hard reference. + */ + weak_source(obs_source_t* source) + { + _ref = obs_source_get_weak_source(source); + if (!_ref) + throw std::invalid_argument("Parameter 'source' does not define a valid source."); + }; + + /** Create a new weak reference from an existing hard reference. + */ + weak_source(::streamfx::obs::source& source) + { + _ref = obs_source_get_weak_source(source.get()); + if (!_ref) + throw std::invalid_argument("Parameter 'source' does not define a valid source."); + }; + + /** Create a new weak reference for a given source by name. + * + * Attention: May fail if the name does not exactly match. + */ + weak_source(std::string_view name) + { + std::shared_ptr ref{obs_get_source_by_name(name.data()), + [](obs_source_t* v) { obs_source_release(v); }}; + if (!ref) { + throw std::invalid_argument("Parameter 'name' does not define an valid source."); + } + _ref = obs_source_get_weak_source(ref.get()); + }; + + weak_source(weak_source&& move) noexcept + { + _ref = move._ref; + move._ref = nullptr; + }; + + FORCE_INLINE ::streamfx::obs::weak_source& operator=(weak_source&& move) noexcept + { + if (_ref) { + obs_weak_source_release(_ref); + _ref = nullptr; + } + if (move._ref) { + _ref = move._ref; + move._ref = nullptr; + } + return *this; + }; + + weak_source(const weak_source& copy) + { + _ref = copy._ref; + obs_weak_source_addref(_ref); + }; + + FORCE_INLINE ::streamfx::obs::weak_source& operator=(const weak_source& copy) + { + if (_ref) { + obs_weak_source_release(_ref); + _ref = nullptr; + } + if (copy._ref) { + _ref = copy._ref; + obs_weak_source_addref(_ref); + } + + return *this; + }; + + /** Retrieve the underlying pointer for manual manipulation. + * + * Attention: Ownership remains with the class instance. + */ + FORCE_INLINE obs_weak_source_t* get() const + { + return _ref; + }; + + /** Is the weak reference expired? + * + * A weak reference is expired when the original object it is pointing at no longer exists. + */ + FORCE_INLINE bool expired() const + { + return (!_ref) || (obs_weak_source_expired(_ref)); + }; + + /** Try and acquire a hard reference to the source. + * + * May fail if the reference expired before we successfully acquire it. + */ + FORCE_INLINE ::streamfx::obs::source lock() const + { + return {obs_weak_source_get_source(_ref)}; + }; + + public: + FORCE_INLINE operator obs_weak_source_t*() const + { + return _ref; + } + + FORCE_INLINE obs_weak_source_t* operator*() const + { + return _ref; + } + + FORCE_INLINE operator bool() const + { + return !expired(); + }; + + FORCE_INLINE bool operator==(weak_source const& rhs) const + { + return _ref == rhs._ref; + }; + + FORCE_INLINE bool operator<(weak_source const& rhs) const + { + return _ref < rhs._ref; + }; + + FORCE_INLINE bool operator==(obs_weak_source_t* const& rhs) const + { + return _ref == rhs; + }; + + FORCE_INLINE bool operator==(source const& rhs) const + { + return obs_weak_source_references_source(_ref, rhs.get()); + }; + + FORCE_INLINE bool operator==(obs_source_t* const& rhs) const + { + return obs_weak_source_references_source(_ref, rhs); + }; + }; +} // namespace streamfx::obs From e3c7b13d6fdb0be43c5a729bfed88ff09549b298 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 11 May 2022 05:33:38 +0200 Subject: [PATCH 017/164] obs/source-factory: Add support for OBS Studio 27.x Also improves the functionality logic slightly to be more in line with real behavior. --- source/filters/filter-autoframing.cpp | 2 +- source/filters/filter-blur.cpp | 2 +- source/filters/filter-color-grade.cpp | 2 +- source/filters/filter-denoising.cpp | 2 +- source/filters/filter-displacement.cpp | 2 +- source/filters/filter-dynamic-mask.cpp | 10 +- source/filters/filter-sdf-effects.cpp | 2 +- source/filters/filter-shader.cpp | 4 +- source/filters/filter-transform.cpp | 2 +- source/filters/filter-upscaling.cpp | 2 +- source/filters/filter-virtual-greenscreen.cpp | 2 +- source/obs/obs-source-factory.hpp | 1146 +++++++++++------ source/sources/source-mirror.cpp | 4 +- source/sources/source-shader.cpp | 4 +- source/transitions/transition-shader.cpp | 2 +- 15 files changed, 750 insertions(+), 438 deletions(-) diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index c86e1d1465..5150c454d8 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -1086,7 +1086,7 @@ autoframing_factory::autoframing_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO; - set_resolution_enabled(true); + support_size(true); finish_setup(); // Register proxy identifiers. diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 253ae683b2..b4f249c1f7 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -604,7 +604,7 @@ blur_factory::blur_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO; - set_resolution_enabled(false); + support_size(false); finish_setup(); register_proxy("obs-stream-effects-filter-blur"); } diff --git a/source/filters/filter-color-grade.cpp b/source/filters/filter-color-grade.cpp index d11093b396..dacb778c53 100644 --- a/source/filters/filter-color-grade.cpp +++ b/source/filters/filter-color-grade.cpp @@ -584,7 +584,7 @@ color_grade_factory::color_grade_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO; - set_resolution_enabled(false); + support_size(false); finish_setup(); register_proxy("obs-stream-effects-filter-color-grade"); } diff --git a/source/filters/filter-denoising.cpp b/source/filters/filter-denoising.cpp index 670ffe0649..3ff8c14220 100644 --- a/source/filters/filter-denoising.cpp +++ b/source/filters/filter-denoising.cpp @@ -550,7 +550,7 @@ denoising_factory::denoising_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; - set_resolution_enabled(true); + support_size(true); finish_setup(); // Proxies diff --git a/source/filters/filter-displacement.cpp b/source/filters/filter-displacement.cpp index 063130e0f6..64a28f8680 100644 --- a/source/filters/filter-displacement.cpp +++ b/source/filters/filter-displacement.cpp @@ -150,7 +150,7 @@ displacement_factory::displacement_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW | OBS_SOURCE_DEPRECATED | OBS_SOURCE_CAP_DISABLED; - set_resolution_enabled(false); + support_size(false); finish_setup(); register_proxy("obs-stream-effects-filter-displacement"); } diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index fbc0956b22..ca1b79ecf4 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -455,11 +455,11 @@ dynamic_mask_factory::dynamic_mask_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; - set_have_active_child_sources(true); - set_have_child_sources(true); - set_resolution_enabled(false); - set_activity_tracking_enabled(true); - set_visibility_tracking_enabled(true); + support_active_child_sources(true); + support_child_sources(true); + support_size(false); + support_activity_tracking(true); + support_visibility_tracking(true); finish_setup(); register_proxy("obs-stream-effects-filter-dynamic-mask"); } diff --git a/source/filters/filter-sdf-effects.cpp b/source/filters/filter-sdf-effects.cpp index 8bfe146754..9d7877fa34 100644 --- a/source/filters/filter-sdf-effects.cpp +++ b/source/filters/filter-sdf-effects.cpp @@ -570,7 +570,7 @@ sdf_effects_factory::sdf_effects_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO; - set_resolution_enabled(false); + support_size(false); finish_setup(); register_proxy("obs-stream-effects-filter-sdf-effects"); } diff --git a/source/filters/filter-shader.cpp b/source/filters/filter-shader.cpp index 7a191e5d4c..d47a85874c 100644 --- a/source/filters/filter-shader.cpp +++ b/source/filters/filter-shader.cpp @@ -179,8 +179,8 @@ shader_factory::shader_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO; - set_activity_tracking_enabled(true); - set_visibility_tracking_enabled(true); + support_activity_tracking(true); + support_visibility_tracking(true); finish_setup(); register_proxy("obs-stream-effects-filter-shader"); } diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index 1ea1ea99d3..d06f655bf8 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -597,7 +597,7 @@ transform_factory::transform_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO; - set_resolution_enabled(false); + support_size(false); finish_setup(); register_proxy("obs-stream-effects-filter-transform"); } diff --git a/source/filters/filter-upscaling.cpp b/source/filters/filter-upscaling.cpp index 7829654fa4..d9ba6290af 100644 --- a/source/filters/filter-upscaling.cpp +++ b/source/filters/filter-upscaling.cpp @@ -550,7 +550,7 @@ upscaling_factory::upscaling_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW /*| OBS_SOURCE_SRGB*/; - set_resolution_enabled(true); + support_size(true); finish_setup(); // Proxies diff --git a/source/filters/filter-virtual-greenscreen.cpp b/source/filters/filter-virtual-greenscreen.cpp index cf9640b936..b46b810885 100644 --- a/source/filters/filter-virtual-greenscreen.cpp +++ b/source/filters/filter-virtual-greenscreen.cpp @@ -554,7 +554,7 @@ virtual_greenscreen_factory::virtual_greenscreen_factory() _info.type = OBS_SOURCE_TYPE_FILTER; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW /*| OBS_SOURCE_SRGB*/; - set_resolution_enabled(true); + support_size(true); finish_setup(); } diff --git a/source/obs/obs-source-factory.hpp b/source/obs/obs-source-factory.hpp index 474b36b62f..736d761a5e 100644 --- a/source/obs/obs-source-factory.hpp +++ b/source/obs/obs-source-factory.hpp @@ -19,7 +19,7 @@ #pragma once #include "common.hpp" -#include "plugin.hpp" +#include "obs-source.hpp" namespace streamfx::obs { template @@ -30,9 +30,10 @@ namespace streamfx::obs { std::set _proxy_names; public: - source_factory() + source_factory(obs_source_type type = OBS_SOURCE_TYPE_INPUT) { _info.type_data = this; + _info.type = type; _info.get_name = _get_name; _info.create = _create; @@ -43,126 +44,84 @@ namespace streamfx::obs { _info.update = _update; _info.save = _save; _info.filter_remove = _filter_remove; - - set_resolution_enabled(true); - set_activity_tracking_enabled(false); - set_visibility_tracking_enabled(false); - set_input_enabled(false); - set_have_child_sources(false); } virtual ~source_factory() {} protected: - void set_resolution_enabled(bool v) - { - if (v) { - _info.get_width = _get_width; - _info.get_height = _get_height; - } else { - _info.get_width = nullptr; - _info.get_height = nullptr; - } - } - - void set_activity_tracking_enabled(bool v) - { - if (v) { - _info.activate = _activate; - _info.deactivate = _deactivate; - } else { - _info.activate = nullptr; - _info.deactivate = nullptr; - } - } - - void set_visibility_tracking_enabled(bool v) - { - if (v) { - _info.show = _show; - _info.hide = _hide; - } else { - _info.show = nullptr; - _info.hide = nullptr; - } - } - - void set_input_enabled(bool v) + void finish_setup() { - if (v) { - _info.mouse_click = _mouse_click; - _info.mouse_move = _mouse_move; - _info.mouse_wheel = _mouse_wheel; - _info.focus = _focus; - _info.key_click = _key_click; - } else { - _info.mouse_click = nullptr; - _info.mouse_move = nullptr; - _info.mouse_wheel = nullptr; - _info.focus = nullptr; - _info.key_click = nullptr; - } - } + // Adjust options by type: + // - Transitions + if (_info.type == OBS_SOURCE_TYPE_TRANSITION) { + // Transitions don't have size. + support_size(false); - void set_have_child_sources(bool v) - { - if (v) { - _info.enum_all_sources = _enum_all_sources; - } else { - _info.enum_all_sources = nullptr; - } - } + // Transitions are also composite, video and custom draw, but never async. + _info.output_flags |= OBS_SOURCE_COMPOSITE | OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; + _info.output_flags &= ~(OBS_SOURCE_ASYNC); - void set_have_active_child_sources(bool v) - { - if (v) { - _info.enum_active_sources = _enum_active_sources; - } else { - _info.enum_active_sources = nullptr; - } - } + // Transition controls. + _info.transition_start = _transition_start; + _info.transition_stop = _transition_stop; - void finish_setup() - { - if (_info.output_flags & OBS_SOURCE_INTERACTION) { - set_input_enabled(true); - } else { - set_input_enabled(false); + // Transitions are always synchronous video. + _info.video_tick = _video_tick; + _info.video_render = _video_render; } + // - Filter + if (_info.type == OBS_SOURCE_TYPE_FILTER) { + support_interaction(false); - if (_info.type == OBS_SOURCE_TYPE_TRANSITION) { - set_resolution_enabled(false); - _info.transition_start = _transition_start; - _info.transition_stop = _transition_stop; - _info.audio_render = _audio_render; - _info.video_tick = _video_tick; - _info.video_render = _video_render; - } else if (_info.type == OBS_SOURCE_TYPE_FILTER) { - switch (_info.output_flags & OBS_SOURCE_ASYNC_VIDEO) { - case OBS_SOURCE_ASYNC_VIDEO: - _info.filter_video = _filter_video; - break; - case OBS_SOURCE_VIDEO: + // If this is a video filter, require one of two code paths. + uint32_t av = (_info.output_flags & OBS_SOURCE_ASYNC_VIDEO); + if (av == OBS_SOURCE_VIDEO) { _info.video_tick = _video_tick; _info.video_render = _video_render_filter; - break; + } else if (av == OBS_SOURCE_ASYNC_VIDEO) { + _info.video_tick = _video_tick; + _info.filter_video = _filter_video; } - if ((_info.output_flags & OBS_SOURCE_AUDIO) != 0) { + + // If this is an audio filter + if ((_info.output_flags & OBS_SOURCE_AUDIO) == OBS_SOURCE_AUDIO) { _info.filter_audio = _filter_audio; - if ((_info.output_flags & OBS_SOURCE_COMPOSITE) != 0) { - _info.audio_render = _audio_render; - } } - } else { - if ((_info.output_flags & OBS_SOURCE_ASYNC_VIDEO) != 0) { - if ((_info.output_flags & OBS_SOURCE_ASYNC) == 0) { - set_resolution_enabled(true); - } + } + // - Input + if (_info.type == OBS_SOURCE_TYPE_INPUT) { + uint32_t av = (_info.output_flags & OBS_SOURCE_ASYNC_VIDEO); + if (av == OBS_SOURCE_VIDEO) { _info.video_tick = _video_tick; _info.video_render = _video_render; + support_size(true); + } else if (av == OBS_SOURCE_ASYNC_VIDEO) { + _info.video_tick = _video_tick; + support_size(false); } - if ((_info.output_flags & OBS_SOURCE_COMPOSITE) != 0) { - _info.audio_render = _audio_render; + } + + // Does the source have the composite audio flag? + if ((_info.output_flags & OBS_SOURCE_COMPOSITE) == OBS_SOURCE_COMPOSITE) { + // Does it also have some invalid flags? + if ((_info.output_flags & OBS_SOURCE_AUDIO) == OBS_SOURCE_AUDIO) { + throw std::runtime_error("Composite sources may not be audio sources."); + } + if ((_info.output_flags & OBS_SOURCE_ASYNC) == OBS_SOURCE_ASYNC) { + throw std::runtime_error("Composite sources may not be asynchronous."); + } + // If not allow the assignment of audio_render. + _info.audio_render = _audio_render; + } + + // Does the source have the submix audio flag? (Internal to libOBS?) + if ((_info.output_flags & OBS_SOURCE_SUBMIX) == OBS_SOURCE_SUBMIX) { + if ((_info.output_flags & OBS_SOURCE_AUDIO) == OBS_SOURCE_AUDIO) { + throw std::runtime_error("Composite sources may not be audio sources."); + } + if ((_info.output_flags & OBS_SOURCE_COMPOSITE) == OBS_SOURCE_COMPOSITE) { + throw std::runtime_error("Submix sources may not be composite."); } + _info.audio_mix = _audio_mix; } obs_register_source(&_info); @@ -184,354 +143,665 @@ namespace streamfx::obs { private /* Factory */: static const char* _get_name(void* type_data) noexcept - try { - if (type_data) - return reinterpret_cast<_factory*>(type_data)->get_name(); - return nullptr; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; + { + try { + if (type_data) + return reinterpret_cast<_factory*>(type_data)->get_name(); + return nullptr; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; + } } static void* _create(obs_data_t* settings, obs_source_t* source) noexcept - try { - return reinterpret_cast<_factory*>(obs_source_get_type_data(source))->create(settings, source); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; + { + try { + return reinterpret_cast<_factory*>(obs_source_get_type_data(source))->create(settings, source); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; + } } static void _get_defaults2(void* type_data, obs_data_t* settings) noexcept - try { - if (type_data) - reinterpret_cast<_factory*>(type_data)->get_defaults2(settings); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (type_data) + reinterpret_cast<_factory*>(type_data)->get_defaults2(settings); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } static obs_properties_t* _get_properties2(void* data, void* type_data) noexcept - try { - if (type_data) - return reinterpret_cast<_factory*>(type_data)->get_properties2(reinterpret_cast<_instance*>(data)); - return nullptr; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; + { + try { + if (type_data) + return reinterpret_cast<_factory*>(type_data)->get_properties2(reinterpret_cast<_instance*>(data)); + return nullptr; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; + } } private /* Instance */: static void _destroy(void* data) noexcept - try { - if (data) - delete reinterpret_cast<_instance*>(data); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + delete reinterpret_cast<_instance*>(data); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static uint32_t _get_width(void* data) noexcept - try { - if (data) - return reinterpret_cast<_instance*>(data)->get_width(); - return 0; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return 0; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return 0; + static void _filter_remove(void* data, obs_source_t* source) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->filter_remove(source); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static uint32_t _get_height(void* data) noexcept - try { - if (data) - return reinterpret_cast<_instance*>(data)->get_height(); - return 0; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return 0; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return 0; + public /* Instance > Video */: + static void _video_tick(void* data, float seconds) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->video_tick(seconds); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _activate(void* data) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->activate(); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static void _video_render(void* data, gs_effect_t* effect) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->video_render(effect); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _deactivate(void* data) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->deactivate(); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static void _video_render_filter(void* data, gs_effect_t* effect) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->video_render(effect); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + obs_source_skip_video_filter(reinterpret_cast<_instance*>(data)->get()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + obs_source_skip_video_filter(reinterpret_cast<_instance*>(data)->get()); + } } - static void _show(void* data) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->show(); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static struct obs_source_frame* _filter_video(void* data, struct obs_source_frame* frame) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->filter_video(frame); + return frame; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return frame; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return frame; + } } - static void _hide(void* data) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->hide(); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + public /* Instance > Audio */: + static struct obs_audio_data* _filter_audio(void* data, struct obs_audio_data* frame) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->filter_audio(frame); + return frame; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return frame; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return frame; + } } - static void _video_tick(void* data, float seconds) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->video_tick(seconds); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static bool _audio_render(void* data, uint64_t* ts_out, struct obs_source_audio_mix* audio_output, + uint32_t mixers, std::size_t channels, std::size_t sample_rate) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->audio_render(ts_out, audio_output, mixers, channels, + sample_rate); + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } - static void _video_render(void* data, gs_effect_t* effect) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->video_render(effect); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static bool _audio_mix(void* data, uint64_t* ts_out, struct audio_output_data* audio_output, + std::size_t channels, std::size_t sample_rate) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->audio_mix(ts_out, audio_output, channels, sample_rate); + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } - static void _video_render_filter(void* data, gs_effect_t* effect) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->video_render(effect); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - obs_source_skip_video_filter(reinterpret_cast<_instance*>(data)->get()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - obs_source_skip_video_filter(reinterpret_cast<_instance*>(data)->get()); + public /* Instance > Transition */: + static void _transition_start(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->transition_start(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static struct obs_source_frame* _filter_video(void* data, struct obs_source_frame* frame) noexcept - try { - if (data) - return reinterpret_cast<_instance*>(data)->filter_video(frame); - return frame; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return frame; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return frame; + static void _transition_stop(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->transition_stop(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static struct obs_audio_data* _filter_audio(void* data, struct obs_audio_data* frame) noexcept - try { - if (data) - return reinterpret_cast<_instance*>(data)->filter_audio(frame); - return frame; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return frame; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return frame; + public /* Instance > Resolution */: + void support_size(bool v) + { + if (v) { + _info.get_width = _get_width; + _info.get_height = _get_height; + } else { + _info.get_width = nullptr; + _info.get_height = nullptr; + } + } + + static uint32_t _get_width(void* data) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->get_width(); + return 0; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return 0; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return 0; + } + } + + static uint32_t _get_height(void* data) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->get_height(); + return 0; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return 0; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return 0; + } + } + + public /* Instance > Children */: + void support_active_child_sources(bool v) + { + if (v) { + _info.enum_active_sources = _enum_active_sources; + } else { + _info.enum_active_sources = nullptr; + } } static void _enum_active_sources(void* data, obs_source_enum_proc_t enum_callback, void* param) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->enum_active_sources(enum_callback, param); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + reinterpret_cast<_instance*>(data)->enum_active_sources(enum_callback, param); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } + void support_child_sources(bool v) + { + if (v) { + _info.enum_all_sources = _enum_all_sources; + } else { + _info.enum_all_sources = nullptr; + } + } + + static void _enum_all_sources(void* data, obs_source_enum_proc_t enum_callback, void* param) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->enum_all_sources(enum_callback, param); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + public /* Instance > Configuration */: static void _load(void* data, obs_data_t* settings) noexcept - try { - auto priv = reinterpret_cast<_instance*>(data); - if (priv) { - uint64_t version = static_cast(obs_data_get_int(settings, S_VERSION)); - priv->migrate(settings, version); - obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); - obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); - priv->load(settings); + { + try { + auto priv = reinterpret_cast<_instance*>(data); + if (priv) { + uint64_t version = static_cast(obs_data_get_int(settings, S_VERSION)); + priv->migrate(settings, version); + obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); + obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); + priv->load(settings); + } + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); } - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); } static void _update(void* data, obs_data_t* settings) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->update(settings); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + reinterpret_cast<_instance*>(data)->update(settings); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } static void _save(void* data, obs_data_t* settings) noexcept - try { - if (data) { - reinterpret_cast<_instance*>(data)->save(settings); - obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); - obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); + { + try { + if (data) { + reinterpret_cast<_instance*>(data)->save(settings); + obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); + obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); + } + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + public /* Instance > Activity Tracking */: + void support_activity_tracking(bool v) + { + if (v) { + _info.activate = _activate; + _info.deactivate = _deactivate; + } else { + _info.activate = nullptr; + _info.deactivate = nullptr; + } + } + + static void _activate(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->activate(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + static void _deactivate(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->deactivate(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + public /* Instance > Visibility Tracking */: + void support_visibility_tracking(bool v) + { + if (v) { + _info.show = _show; + _info.hide = _hide; + } else { + _info.show = nullptr; + _info.hide = nullptr; + } + } + + static void _show(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->show(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + static void _hide(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->hide(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + public /* Instance > Interaction */: + void support_interaction(bool v) + { + if (v) { + _info.output_flags |= (OBS_SOURCE_INTERACTION); + _info.mouse_click = _mouse_click; + _info.mouse_move = _mouse_move; + _info.mouse_wheel = _mouse_wheel; + _info.focus = _focus; + _info.key_click = _key_click; + } else { + _info.output_flags &= ~(OBS_SOURCE_INTERACTION); + _info.mouse_click = nullptr; + _info.mouse_move = nullptr; + _info.mouse_wheel = nullptr; + _info.focus = nullptr; + _info.key_click = nullptr; } - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); } - static void _mouse_click(void* data, const struct obs_mouse_event* event, int32_t type, bool mouse_up, + static void _mouse_click(void* data, const obs_mouse_event* event, int32_t type, bool mouse_up, uint32_t click_count) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->mouse_click(event, type, mouse_up, click_count); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - } - - static void _mouse_move(void* data, const struct obs_mouse_event* event, bool mouse_leave) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->mouse_move(event, mouse_leave); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - } - - static void _mouse_wheel(void* data, const struct obs_mouse_event* event, int x_delta, int y_delta) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->mouse_wheel(event, x_delta, y_delta); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + reinterpret_cast<_instance*>(data)->mouse_click(event, type, mouse_up, click_count); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + static void _mouse_move(void* data, const obs_mouse_event* event, bool mouse_leave) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->mouse_move(event, mouse_leave); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + static void _mouse_wheel(void* data, const obs_mouse_event* event, int x_delta, int y_delta) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->mouse_wheel(event, x_delta, y_delta); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } static void _focus(void* data, bool focus) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->focus(focus); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + reinterpret_cast<_instance*>(data)->focus(focus); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _key_click(void* data, const struct obs_key_event* event, bool key_up) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->key_click(event, key_up); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static void _key_click(void* data, const obs_key_event* event, bool key_up) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->key_click(event, key_up); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _filter_remove(void* data, obs_source_t* source) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->filter_remove(source); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + public /* Instance > Media Controls */: + void support_media_controls(bool v) + { + if (v) { + _info.output_flags |= (OBS_SOURCE_CONTROLLABLE_MEDIA); + _info.media_play_pause = _media_play_pause; + _info.media_restart = _media_restart; + _info.media_stop = _media_stop; + _info.media_next = _media_next; + _info.media_previous = _media_previous; + _info.media_get_duration = _media_get_duration; + _info.media_get_time = _media_get_time; + _info.media_set_time = _media_set_time; + _info.media_get_state = _media_get_state; + } else { + _info.output_flags &= ~(OBS_SOURCE_CONTROLLABLE_MEDIA); + _info.media_play_pause = nullptr; + _info.media_restart = nullptr; + _info.media_stop = nullptr; + _info.media_next = nullptr; + _info.media_previous = nullptr; + _info.media_get_duration = nullptr; + _info.media_get_time = nullptr; + _info.media_set_time = nullptr; + _info.media_get_state = nullptr; + } } - static bool _audio_render(void* data, uint64_t* ts_out, struct obs_source_audio_mix* audio_output, - uint32_t mixers, std::size_t channels, std::size_t sample_rate) noexcept - try { - if (data) - return reinterpret_cast<_instance*>(data)->audio_render(ts_out, audio_output, mixers, channels, - sample_rate); - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + static void _media_play_pause(void* data, bool pause) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->media_play_pause(pause); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _enum_all_sources(void* data, obs_source_enum_proc_t enum_callback, void* param) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->enum_all_sources(enum_callback, param); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static void _media_restart(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->media_restart(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _transition_start(void* data) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->transition_start(); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static void _media_stop(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->media_stop(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static void _transition_stop(void* data) noexcept - try { - if (data) - reinterpret_cast<_instance*>(data)->transition_stop(); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + static void _media_next(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->media_next(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } - static bool _audio_mix(void* data, uint64_t* ts_out, struct audio_output_data* audio_output, - std::size_t channels, std::size_t sample_rate) noexcept - try { - if (data) - return reinterpret_cast<_instance*>(data)->audio_mix(ts_out, audio_output, channels, sample_rate); - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + static void _media_previous(void* data) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->media_previous(); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + static int64_t _media_get_duration(void* data) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->media_get_duration(); + return 0; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return 0; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return 0; + } + } + + static int64_t _media_get_time(void* data) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->media_get_time(); + return 0; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return 0; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return 0; + } + } + + static void _media_set_time(void* data, int64_t milliseconds) noexcept + { + try { + if (data) + reinterpret_cast<_instance*>(data)->media_set_time(milliseconds); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } + } + + static obs_media_state _media_get_state(void* data) noexcept + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->media_get_state(); + return OBS_MEDIA_STATE_NONE; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return OBS_MEDIA_STATE_NONE; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return OBS_MEDIA_STATE_NONE; + } + } + + public /* Instance > Missing Files */: + void support_missing_files(bool v) + { + if (v) { + _info.missing_files = _missing_files; + } else { + _info.missing_files = nullptr; + } + } + + static obs_missing_files_t* _missing_files(void* data) + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->missing_files(); + return nullptr; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; + } } public: @@ -555,51 +825,69 @@ namespace streamfx::obs { class source_instance { protected: - obs_source_t* _self; + ::streamfx::obs::source _self; public: - source_instance(obs_data_t* settings, obs_source_t* source) : _self(source) {} + source_instance(obs_data_t* settings, obs_source_t* source) : _self(source, false, false) {} virtual ~source_instance(){}; - virtual obs_source_t* get() + virtual ::streamfx::obs::source get() { return _self; } - virtual uint32_t get_width() + virtual void filter_remove(obs_source_t* source) {} + + public /* Instance > Video */: + virtual void video_tick(float_t seconds) {} + + virtual void video_render(gs_effect_t* effect) {} + + virtual struct obs_source_frame* filter_video(struct obs_source_frame* frame) { - return 0; + return frame; } - virtual uint32_t get_height() + public /* Instance > Audio */: + virtual struct obs_audio_data* filter_audio(struct obs_audio_data* audio) { - return 0; + return audio; } - virtual void activate() {} - - virtual void deactivate() {} - - virtual void show() {} + virtual bool audio_render(uint64_t* ts_out, struct obs_source_audio_mix* audio_output, uint32_t mixers, + std::size_t channels, std::size_t sample_rate) + { + return false; + } - virtual void hide() {} + virtual bool audio_mix(uint64_t* ts_out, struct audio_output_data* audio_output, std::size_t channels, + std::size_t sample_rate) + { + return false; + } - virtual void video_tick(float_t seconds) {} + public /* Instance > Transition */: + virtual void transition_start() {} - virtual void video_render(gs_effect_t* effect) {} + virtual void transition_stop() {} - virtual struct obs_source_frame* filter_video(struct obs_source_frame* frame) + public /* Instance > Resolution */: + virtual uint32_t get_width() { - return frame; + return 0; } - virtual struct obs_audio_data* filter_audio(struct obs_audio_data* audio) + virtual uint32_t get_height() { - return audio; + return 0; } + public /* Instance > Children */: virtual void enum_active_sources(obs_source_enum_proc_t enum_callback, void* param) {} + virtual void enum_all_sources(obs_source_enum_proc_t enum_callback, void* param) {} + + public /* Instance > Configuration */: virtual void load(obs_data_t* settings) {} virtual void migrate(obs_data_t* settings, uint64_t version) {} @@ -608,36 +896,60 @@ namespace streamfx::obs { virtual void save(obs_data_t* settings) {} - virtual void mouse_click(const struct obs_mouse_event* event, int32_t type, bool mouse_up, uint32_t click_count) - {} + public /* Instance > Activity Tracking */: + virtual void activate() {} + + virtual void deactivate() {} + + public /* Instance > Visibility Tracking */: + virtual void show() {} + + virtual void hide() {} + + public /* Instance > Interaction */: + virtual void mouse_click(const obs_mouse_event* event, int32_t type, bool mouse_up, uint32_t click_count) {} - virtual void mouse_move(const struct obs_mouse_event* event, bool mouse_leave) {} + virtual void mouse_move(const obs_mouse_event* event, bool mouse_leave) {} - virtual void mouse_wheel(const struct obs_mouse_event* event, int32_t x_delta, int32_t y_delta) {} + virtual void mouse_wheel(const obs_mouse_event* event, int32_t x_delta, int32_t y_delta) {} virtual void focus(bool focus) {} - virtual void key_click(const struct obs_key_event* event, bool key_up) {} + virtual void key_click(const obs_key_event* event, bool key_up) {} - virtual void filter_remove(obs_source_t* source) {} + public /* Media Controls */: + virtual void media_play_pause(bool pause){}; - virtual bool audio_render(uint64_t* ts_out, struct obs_source_audio_mix* audio_output, uint32_t mixers, - std::size_t channels, std::size_t sample_rate) + virtual void media_restart(){}; + + virtual void media_stop(){}; + + virtual void media_next(){}; + + virtual void media_previous(){}; + + virtual int64_t media_get_duration() { - return false; + return 0; } - virtual void enum_all_sources(obs_source_enum_proc_t enum_callback, void* param) {} - - virtual void transition_start() {} + virtual int64_t media_get_time() + { + return 0; + } - virtual void transition_stop() {} + virtual void media_set_time(int64_t milliseconds) {} - virtual bool audio_mix(uint64_t* ts_out, struct audio_output_data* audio_output, std::size_t channels, - std::size_t sample_rate) + virtual obs_media_state media_get_state() { - return false; + return OBS_MEDIA_STATE_NONE; } + + public /* Missing Files */: + virtual obs_missing_files_t* missing_files() + { + return nullptr; + }; }; } // namespace streamfx::obs diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 8a4e2fe3a2..86b452cd5a 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -296,8 +296,8 @@ mirror_factory::mirror_factory() _info.type = OBS_SOURCE_TYPE_INPUT; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW | OBS_SOURCE_AUDIO; - set_have_active_child_sources(true); - set_have_child_sources(true); + support_active_child_sources(true); + support_child_sources(true); finish_setup(); register_proxy("obs-stream-effects-source-mirror"); } diff --git a/source/sources/source-shader.cpp b/source/sources/source-shader.cpp index d0bd5b3cf2..c8098e3775 100644 --- a/source/sources/source-shader.cpp +++ b/source/sources/source-shader.cpp @@ -132,8 +132,8 @@ shader_factory::shader_factory() _info.type = OBS_SOURCE_TYPE_INPUT; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; - set_activity_tracking_enabled(true); - set_visibility_tracking_enabled(true); + support_activity_tracking(true); + support_visibility_tracking(true); finish_setup(); register_proxy("obs-stream-effects-source-shader"); } diff --git a/source/transitions/transition-shader.cpp b/source/transitions/transition-shader.cpp index 49c2cf4545..0dad6de860 100644 --- a/source/transitions/transition-shader.cpp +++ b/source/transitions/transition-shader.cpp @@ -145,7 +145,7 @@ shader_factory::shader_factory() _info.type = OBS_SOURCE_TYPE_TRANSITION; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; - //set_activity_tracking_enabled(true); // Handled via transition start/stop + //support_activity_tracking(true); // Handled via transition start/stop finish_setup(); register_proxy("obs-stream-effects-transition-shader"); } From 39548e760dd4d1f4229ad61d5585abd69b5f197d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 10 May 2022 20:51:59 +0200 Subject: [PATCH 018/164] obs/tools: Replace scene_contains_source As the recursion checking code is somewhat broken in libOBS, we need something to prevent accidental recursion from occurring. While the alternative fix is to simply make all of libOBS support recursion, unfortunately that endeavor would be too large for a single person to take on. --- source/obs/obs-tools.cpp | 121 ++++++++++++++++++++++++--------------- source/obs/obs-tools.hpp | 3 +- 2 files changed, 77 insertions(+), 47 deletions(-) diff --git a/source/obs/obs-tools.cpp b/source/obs/obs-tools.cpp index 11ae4a2de9..6099a735c3 100644 --- a/source/obs/obs-tools.cpp +++ b/source/obs/obs-tools.cpp @@ -19,67 +19,96 @@ #include "obs-tools.hpp" #include +#include #include +#include "obs-source.hpp" +#include "obs-weak-source.hpp" #include "plugin.hpp" -struct scs_searchdata { - obs_source_t* source; - bool found = false; - std::map visited; +struct __sfs_data { + std::set<::streamfx::obs::weak_source> sources; }; -static bool scs_contains(scs_searchdata& sd, obs_source_t* source); +void __source_find_source_enumerate(obs_source_t* haystack, __sfs_data* cbd) +{ + auto tp = obs_source_get_type(haystack); -static void scs_enum_active_cb(obs_source_t*, obs_source_t* child, void* searchdata) noexcept -try { - scs_searchdata& sd = reinterpret_cast(*reinterpret_cast(searchdata)); - scs_contains(sd, child); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); -} + // Check if this source is already present in the set. + ::streamfx::obs::weak_source weak_child{haystack}; + if (!weak_child || (cbd->sources.find(weak_child) != cbd->sources.end())) { + return; + } -static bool scs_enum_items_cb(obs_scene_t*, obs_sceneitem_t* item, void* searchdata) noexcept -try { - scs_searchdata& sd = reinterpret_cast(*reinterpret_cast(searchdata)); - obs_source_t* source = obs_sceneitem_get_source(item); - return scs_contains(sd, source); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + // If it was not in the list, add it now. + cbd->sources.insert(weak_child); + + // Enumerate direct reference tree. + obs_source_enum_full_tree( + haystack, + [](obs_source_t* parent, obs_source_t* child, void* param) { + try { + __source_find_source_enumerate(child, reinterpret_cast<__sfs_data*>(param)); + } catch (...) { + } + }, + cbd); + + switch (tp) { + case OBS_SOURCE_TYPE_SCENE: { + obs_scene_enum_items( + obs_scene_from_source(haystack), + [](obs_scene_t* scene, obs_sceneitem_t* item, void* param) { + try { + __sfs_data* cbd = reinterpret_cast<__sfs_data*>(param); + __source_find_source_enumerate(obs_sceneitem_get_source(item), cbd); + return true; + } catch (...) { + return true; + } + }, + cbd); + } +#if __cplusplus >= 201700L + [[fallthrough]]; +#endif + case OBS_SOURCE_TYPE_INPUT: { + // Enumerate filter tree. + obs_source_enum_filters( + haystack, + [](obs_source_t* parent, obs_source_t* child, void* param) { + try { + __sfs_data* cbd = reinterpret_cast<__sfs_data*>(param); + __source_find_source_enumerate(child, cbd); + } catch (...) { + } + }, + cbd); + } +#if __cplusplus >= 201700L + [[fallthrough]]; +#endif + default: + break; + } } -static bool scs_contains(scs_searchdata& sd, obs_source_t* source) +bool streamfx::obs::tools::source_find_source(::streamfx::obs::source haystack, ::streamfx::obs::source needle) { - if (sd.visited.find(source) != sd.visited.end()) { - return false; - } else { - sd.visited.insert({source, true}); + __sfs_data cbd = {}; + try { + __source_find_source_enumerate(haystack.get(), &cbd); + } catch (...) { } - if (source == sd.source) { - sd.found = true; - return true; - } else { - if (strcmp(obs_source_get_id(source), "scene")) { - obs_scene_t* nscene = obs_scene_from_source(source); - obs_scene_enum_items(nscene, scs_enum_items_cb, &sd); - } else { - obs_source_enum_active_sources(source, scs_enum_active_cb, &sd); - } - } + for (auto weak_source : cbd.sources) { + if (!weak_source) + continue; - if (sd.found) { - return false; + if (weak_source == needle) + return true; } - return true; -} -bool streamfx::obs::tools::scene_contains_source(obs_scene_t* scene, obs_source_t* source) -{ - scs_searchdata sd; - sd.source = source; - obs_scene_enum_items(scene, scs_enum_items_cb, &sd); - return sd.found; + return false; } streamfx::obs::tools::child_source::child_source(obs_source_t* parent, std::shared_ptr child) diff --git a/source/obs/obs-tools.hpp b/source/obs/obs-tools.hpp index f1aba6bd3d..7253210052 100644 --- a/source/obs/obs-tools.hpp +++ b/source/obs/obs-tools.hpp @@ -19,10 +19,11 @@ #pragma once #include "common.hpp" +#include "obs-source.hpp" namespace streamfx::obs { namespace tools { - bool scene_contains_source(obs_scene_t* scene, obs_source_t* source); + bool source_find_source(::streamfx::obs::source haystack, ::streamfx::obs::source needle); class child_source { obs_source_t* _parent; From fc693e02108bc2d388b59c21aa319a574ef0c6b3 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 28 May 2022 19:40:31 +0200 Subject: [PATCH 019/164] obs/tools: Remove more legacy tools --- source/obs/obs-tools.cpp | 18 ------------------ source/obs/obs-tools.hpp | 40 ---------------------------------------- 2 files changed, 58 deletions(-) diff --git a/source/obs/obs-tools.cpp b/source/obs/obs-tools.cpp index 6099a735c3..c15068203c 100644 --- a/source/obs/obs-tools.cpp +++ b/source/obs/obs-tools.cpp @@ -110,21 +110,3 @@ bool streamfx::obs::tools::source_find_source(::streamfx::obs::source haystack, return false; } - -streamfx::obs::tools::child_source::child_source(obs_source_t* parent, std::shared_ptr child) - : _parent(parent), _child(child) -{ - if (!obs_source_add_active_child(_parent, _child.get())) { - throw std::runtime_error("recursion detected"); - } -} - -streamfx::obs::tools::child_source::~child_source() -{ - obs_source_remove_active_child(_parent, _child.get()); -} - -std::shared_ptr streamfx::obs::tools::child_source::get() -{ - return _child; -} diff --git a/source/obs/obs-tools.hpp b/source/obs/obs-tools.hpp index 7253210052..51800fbd99 100644 --- a/source/obs/obs-tools.hpp +++ b/source/obs/obs-tools.hpp @@ -24,46 +24,6 @@ namespace streamfx::obs { namespace tools { bool source_find_source(::streamfx::obs::source haystack, ::streamfx::obs::source needle); - - class child_source { - obs_source_t* _parent; - std::shared_ptr _child; - - public: - child_source(obs_source_t* parent, std::shared_ptr child); - virtual ~child_source(); - - std::shared_ptr get(); - }; - - // Class to manage - class active_source { - obs_source_t* _child; - - public: - active_source(obs_source_t* child) : _child(child) - { - obs_source_inc_active(_child); - } - virtual ~active_source() - { - obs_source_dec_active(_child); - } - }; - - class visible_source { - obs_source_t* _child; - - public: - visible_source(obs_source_t* child) : _child(child) - { - obs_source_inc_showing(_child); - } - virtual ~visible_source() - { - obs_source_dec_showing(_child); - } - }; } // namespace tools inline void obs_source_deleter(obs_source_t* v) From b108362ee105c1a6d69b194b7ac1e9167ae309cd Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 26 May 2022 02:58:55 +0200 Subject: [PATCH 020/164] gfx/source-texture: Update to new classes --- source/filters/filter-blur.cpp | 3 +- source/filters/filter-dynamic-mask.cpp | 30 ++++------ source/filters/filter-dynamic-mask.hpp | 4 +- source/gfx/gfx-source-texture.cpp | 80 ++++++-------------------- source/gfx/gfx-source-texture.hpp | 50 ++-------------- 5 files changed, 36 insertions(+), 131 deletions(-) diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index b4f249c1f7..728273f8e8 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -377,7 +377,8 @@ void blur_instance::video_tick(float) } else if (_mask.type == mask_type::Source) { if (_mask.source.name_old != _mask.source.name) { try { - _mask.source.source_texture = std::make_shared(_mask.source.name, _self); + _mask.source.source_texture = std::make_shared( + ::streamfx::obs::weak_source(_mask.source.name), ::streamfx::obs::weak_source(_self)); _mask.source.is_scene = (obs_scene_from_source(_mask.source.source_texture->get_object()) != nullptr); _mask.source.name_old = _mask.source.name; } catch (...) { diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index ca1b79ecf4..5797a15967 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -169,7 +169,7 @@ void dynamic_mask_instance::update(obs_data_t* settings) void dynamic_mask_instance::save(obs_data_t* settings) { if (_input) { - obs_data_set_string(settings, ST_KEY_INPUT, obs_source_get_name(_input->get())); + obs_data_set_string(settings, ST_KEY_INPUT, _input.lock().name().data()); } for (auto kv1 : channel_translations) { @@ -197,13 +197,6 @@ void dynamic_mask_instance::save(obs_data_t* settings) } } -void dynamic_mask_instance::input_renamed(obs::deprecated_source*, std::string old_name, std::string new_name) -{ - obs_data_t* settings = obs_source_get_settings(_self); - obs_data_set_string(settings, ST_KEY_INPUT, new_name.c_str()); - obs_source_update(_self, settings); -} - void dynamic_mask_instance::video_tick(float) { _have_input_texture = false; @@ -217,11 +210,12 @@ void dynamic_mask_instance::video_render(gs_effect_t* in_effect) obs_source_t* target = obs_filter_get_target(_self); uint32_t width = obs_source_get_base_width(target); uint32_t height = obs_source_get_base_height(target); + auto input = _input.lock(); if (!_self || !parent || !target || !width || !height || !_input || !_input_capture || !_effect) { obs_source_skip_video_filter(_self); return; - } else if (!_input->width() || !_input->height()) { + } else if (!input.width() || !input.height()) { obs_source_skip_video_filter(_self); return; } @@ -276,7 +270,7 @@ void dynamic_mask_instance::video_render(gs_effect_t* in_effect) obs_source_get_name(_input_capture->get_object())}; #endif - _input_texture = _input_capture->render(_input->width(), _input->height()); + _input_texture = _input_capture->render(input.width(), input.height()); _have_input_texture = true; } @@ -371,13 +365,13 @@ void dynamic_mask_instance::video_render(gs_effect_t* in_effect) void dynamic_mask_instance::enum_active_sources(obs_source_enum_proc_t enum_callback, void* param) { if (_input) - enum_callback(_self, _input->get(), param); + enum_callback(_self, _input.lock().get(), param); } void dynamic_mask_instance::enum_all_sources(obs_source_enum_proc_t enum_callback, void* param) { if (_input) - enum_callback(_self, _input->get(), param); + enum_callback(_self, _input.lock().get(), param); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::show() @@ -385,7 +379,7 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::show() if (!_input || !obs_source_showing(obs_filter_get_parent(_self))) return; - _input_vs = std::make_shared(_input->get()); + _input_vs = std::make_shared(_input.lock().get()); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::hide() @@ -398,7 +392,7 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::activate() if (!_input || !obs_source_active(obs_filter_get_parent(_self))) return; - _input_ac = std::make_shared(_input->get()); + _input_ac = std::make_shared(_input.lock().get()); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::deactivate() @@ -414,15 +408,11 @@ try { } // Acquire a reference to the actual source. - auto input = std::make_shared(std::string(name), true, true); + ::streamfx::obs::source input = name; // Acquire a texture renderer for the source, with the parent source as the parent. auto capture = std::make_shared(input, obs_filter_get_parent(_self)); - // Listed to the rename event. - input->events.rename += std::bind(&dynamic_mask_instance::input_renamed, this, std::placeholders::_1, - std::placeholders::_2, std::placeholders::_3); - // Update our local storage. _input = input; _input_capture = capture; @@ -442,7 +432,7 @@ try { void dynamic_mask_instance::release() { - _input.reset(); + _input = {}; _input_capture.reset(); deactivate(); diff --git a/source/filters/filter-dynamic-mask.hpp b/source/filters/filter-dynamic-mask.hpp index da1eb3120c..fb152d72d5 100644 --- a/source/filters/filter-dynamic-mask.hpp +++ b/source/filters/filter-dynamic-mask.hpp @@ -41,7 +41,7 @@ namespace streamfx::filter::dynamic_mask { std::shared_ptr _filter_texture; bool _have_input_texture; - std::shared_ptr _input; + ::streamfx::obs::weak_source _input; std::shared_ptr _input_capture; std::shared_ptr _input_texture; std::shared_ptr _input_vs; @@ -73,8 +73,6 @@ namespace streamfx::filter::dynamic_mask { virtual void update(obs_data_t* settings) override; virtual void save(obs_data_t* settings) override; - void input_renamed(obs::deprecated_source* src, std::string old_name, std::string new_name); - virtual void video_tick(float_t _time) override; virtual void video_render(gs_effect_t* effect) override; diff --git a/source/gfx/gfx-source-texture.cpp b/source/gfx/gfx-source-texture.cpp index ab12632e1c..733b7e6b1f 100644 --- a/source/gfx/gfx-source-texture.cpp +++ b/source/gfx/gfx-source-texture.cpp @@ -18,94 +18,52 @@ #include "gfx-source-texture.hpp" #include #include "obs/gs/gs-helper.hpp" +#include "obs/obs-tools.hpp" streamfx::gfx::source_texture::~source_texture() { if (_child && _parent) { - obs_source_remove_active_child(_parent->get(), _child->get()); + obs_source_remove_active_child(_parent.get(), _child.get()); } - - _parent.reset(); - _child.reset(); -} - -streamfx::gfx::source_texture::source_texture(obs_source_t* parent) -{ - if (!parent) { - throw std::invalid_argument("_parent must not be null"); - } - _parent = std::make_shared(parent, false, false); - _rt = std::make_shared(GS_RGBA, GS_ZS_NONE); } -streamfx::gfx::source_texture::source_texture(obs_source_t* _source, obs_source_t* _parent) : source_texture(_parent) +streamfx::gfx::source_texture::source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent) + : _child(child.lock()), _parent(parent.lock()) { - if (!_source) { - throw std::invalid_argument("source must not be null"); - } - if (!obs_source_add_active_child(_parent, _source)) { - throw std::runtime_error("_parent is contained in _child"); + // Verify that 'child' and 'parent' exist. + if (!_child || !_parent) { + throw std::invalid_argument("Child or Parent does not exist."); } - _child = std::make_shared(_source, true, true); -} -streamfx::gfx::source_texture::source_texture(const char* _name, obs_source_t* _parent) : source_texture(_parent) -{ - if (!_name) { - throw std::invalid_argument("name must not be null"); + // Verify that 'child' does not contain 'parent'. + if (::streamfx::obs::tools::source_find_source(_child, _parent)) { + throw std::runtime_error("Child contains Parent"); + } else if (!obs_source_add_active_child(_parent.get(), _child.get())) { + throw std::runtime_error("Child contains Parent"); } - _child = std::make_shared(_name, true, true); - if (!obs_source_add_active_child(_parent, _child->get())) { - throw std::runtime_error("_parent is contained in _child"); - } -} -streamfx::gfx::source_texture::source_texture(std::string _name, obs_source_t* _parent) - : source_texture(_name.c_str(), _parent) -{} - -streamfx::gfx::source_texture::source_texture(std::shared_ptr pchild, - std::shared_ptr pparent) -{ - if (!pchild) { - throw std::invalid_argument("_child must not be null"); - } - if (!pparent) { - throw std::invalid_argument("_parent must not be null"); - } - if (!obs_source_add_active_child(pparent->get(), pchild->get())) { - throw std::runtime_error("_parent is contained in _child"); - } - this->_child = pchild; - this->_parent = pparent; - this->_rt = std::make_shared(GS_RGBA, GS_ZS_NONE); + _rt = std::make_shared(GS_RGBA, GS_ZS_NONE); } -streamfx::gfx::source_texture::source_texture(std::shared_ptr _child, - obs_source_t* _parent) - : source_texture(_child, std::make_shared(_parent, false, false)) -{} - obs_source_t* streamfx::gfx::source_texture::get_object() { if (_child) { - return _child->get(); + return _child.get(); } return nullptr; } obs_source_t* streamfx::gfx::source_texture::get_parent() { - return _parent->get(); + return _parent.get(); } void streamfx::gfx::source_texture::clear() { if (_child && _parent) { - obs_source_remove_active_child(_parent->get(), _child->get()); + obs_source_remove_active_child(_parent.get(), _child.get()); } - _child->clear(); - _child.reset(); + _child = {}; } std::shared_ptr streamfx::gfx::source_texture::render(std::size_t width, std::size_t height) @@ -116,7 +74,7 @@ std::shared_ptr streamfx::gfx::source_texture::rende if ((height == 0) || (height >= 16384)) { throw std::runtime_error("Height too large or too small."); } - if (_child->destroyed() || _parent->destroyed()) { + if (!_child || !_parent) { return nullptr; } @@ -130,7 +88,7 @@ std::shared_ptr streamfx::gfx::source_texture::rende vec4_zero(&black); gs_ortho(0, static_cast(width), 0, static_cast(height), 0, 1); gs_clear(GS_CLEAR_COLOR, &black, 0, 0); - obs_source_video_render(_child->get()); + obs_source_video_render(_child.get()); } std::shared_ptr tex; diff --git a/source/gfx/gfx-source-texture.hpp b/source/gfx/gfx-source-texture.hpp index 0b00349dc6..c460b7a671 100644 --- a/source/gfx/gfx-source-texture.hpp +++ b/source/gfx/gfx-source-texture.hpp @@ -20,26 +20,18 @@ #include #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" -#include "obs/obs-source.hpp" +#include "obs/obs-weak-source.hpp" namespace streamfx::gfx { class source_texture { - std::shared_ptr _parent; - std::shared_ptr _child; + streamfx::obs::source _parent; + streamfx::obs::source _child; std::shared_ptr _rt; - source_texture(obs_source_t* parent); - public: ~source_texture(); - source_texture(obs_source_t* src, obs_source_t* parent); - source_texture(const char* name, obs_source_t* parent); - source_texture(std::string name, obs_source_t* parent); - - source_texture(std::shared_ptr child, - std::shared_ptr parent); - source_texture(std::shared_ptr child, obs_source_t* parent); + source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent); public /*copy*/: source_texture(source_texture const& other) = delete; @@ -58,38 +50,4 @@ namespace streamfx::gfx { obs_source_t* get_object(); obs_source_t* get_parent(); }; - - class source_texture_factory { - friend class source_texture; - - std::map, std::weak_ptr> _cache; - - public: - source_texture_factory(); - ~source_texture_factory(); - - std::shared_ptr get_source_texture(std::shared_ptr source); - - protected: - void free_source_texture(std::shared_ptr source); - - private: // Singleton - static std::shared_ptr factory_instance; - - public: // Singleton - static void initialize() - { - factory_instance = std::make_shared(); - } - - static void finalize() - { - factory_instance.reset(); - } - - static std::shared_ptr get() - { - return factory_instance; - } - }; } // namespace streamfx::gfx From 3667426f49add338a4756abf08c9fca3a2271329 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 28 May 2022 20:01:12 +0200 Subject: [PATCH 021/164] obs/signal-handler: Update to new classes --- source/obs/obs-signal-handler.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/obs/obs-signal-handler.hpp b/source/obs/obs-signal-handler.hpp index 1dd290dea5..47f466ef7c 100644 --- a/source/obs/obs-signal-handler.hpp +++ b/source/obs/obs-signal-handler.hpp @@ -19,6 +19,7 @@ #pragma once #include "common.hpp" +#include "obs/obs-source.hpp" #include "util/util-event.hpp" namespace streamfx::obs { @@ -68,7 +69,7 @@ namespace streamfx::obs { // Audio Capture is also here, as it could be considered a signal. class audio_signal_handler { - std::shared_ptr _keepalive; + ::streamfx::obs::source _keepalive; static void handle_audio(void* ptr, obs_source_t*, const struct audio_data* audio_data, bool muted) noexcept try { @@ -78,17 +79,17 @@ namespace streamfx::obs { } public: - audio_signal_handler(std::shared_ptr keepalive) : _keepalive(keepalive), event() + audio_signal_handler(::streamfx::obs::source const& keepalive) : _keepalive(keepalive), event() { - obs_source_add_audio_capture_callback(_keepalive.get(), handle_audio, this); + obs_source_add_audio_capture_callback(_keepalive, handle_audio, this); } virtual ~audio_signal_handler() { event.clear(); - obs_source_remove_audio_capture_callback(_keepalive.get(), handle_audio, this); + obs_source_remove_audio_capture_callback(_keepalive, handle_audio, this); } - streamfx::util::event, const struct audio_data*, bool> event; + streamfx::util::event<::streamfx::obs::source, const struct audio_data*, bool> event; }; } // namespace streamfx::obs From 8a31b986ab460f5ec2ee21067abc582784fa7a1c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 28 May 2022 20:17:04 +0200 Subject: [PATCH 022/164] project: Update to new classes --- source/filters/filter-dynamic-mask.cpp | 10 +++++--- source/filters/filter-dynamic-mask.hpp | 14 ++++++----- .../gfx/shader/gfx-shader-param-texture.cpp | 19 +++++++------- .../gfx/shader/gfx-shader-param-texture.hpp | 16 +++++++----- source/sources/source-mirror.cpp | 25 ++++++------------- source/sources/source-mirror.hpp | 14 +++++------ 6 files changed, 47 insertions(+), 51 deletions(-) diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 5797a15967..7bad5bfb24 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -376,10 +376,11 @@ void dynamic_mask_instance::enum_all_sources(obs_source_enum_proc_t enum_callbac void streamfx::filter::dynamic_mask::dynamic_mask_instance::show() { - if (!_input || !obs_source_showing(obs_filter_get_parent(_self))) + if (!_input || !_self.showing() || !(_self.get_filter_parent().showing())) return; - _input_vs = std::make_shared(_input.lock().get()); + auto input = _input.lock(); + _input_vs = ::streamfx::obs::source_showing_reference::add_showing_reference(input); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::hide() @@ -389,10 +390,11 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::hide() void streamfx::filter::dynamic_mask::dynamic_mask_instance::activate() { - if (!_input || !obs_source_active(obs_filter_get_parent(_self))) + if (!_input || !_self.active() || !(_self.get_filter_parent().active())) return; - _input_ac = std::make_shared(_input.lock().get()); + auto input = _input.lock(); + _input_ac = ::streamfx::obs::source_active_reference::add_active_reference(input); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::deactivate() diff --git a/source/filters/filter-dynamic-mask.hpp b/source/filters/filter-dynamic-mask.hpp index fb152d72d5..3b936aeced 100644 --- a/source/filters/filter-dynamic-mask.hpp +++ b/source/filters/filter-dynamic-mask.hpp @@ -23,7 +23,9 @@ #include #include "gfx/gfx-source-texture.hpp" #include "obs/gs/gs-effect.hpp" +#include "obs/obs-source-active-reference.hpp" #include "obs/obs-source-factory.hpp" +#include "obs/obs-source-showing-reference.hpp" #include "obs/obs-source-tracker.hpp" #include "obs/obs-source.hpp" #include "obs/obs-tools.hpp" @@ -40,12 +42,12 @@ namespace streamfx::filter::dynamic_mask { std::shared_ptr _filter_rt; std::shared_ptr _filter_texture; - bool _have_input_texture; - ::streamfx::obs::weak_source _input; - std::shared_ptr _input_capture; - std::shared_ptr _input_texture; - std::shared_ptr _input_vs; - std::shared_ptr _input_ac; + bool _have_input_texture; + ::streamfx::obs::weak_source _input; + std::shared_ptr _input_capture; + std::shared_ptr _input_texture; + std::shared_ptr<::streamfx::obs::source_showing_reference> _input_vs; + std::shared_ptr<::streamfx::obs::source_active_reference> _input_ac; bool _have_final_texture; std::shared_ptr _final_rt; diff --git a/source/gfx/shader/gfx-shader-param-texture.cpp b/source/gfx/shader/gfx-shader-param-texture.cpp index ffdb2892fa..e52b169def 100644 --- a/source/gfx/shader/gfx-shader-param-texture.cpp +++ b/source/gfx/shader/gfx-shader-param-texture.cpp @@ -283,7 +283,7 @@ void streamfx::gfx::shader::texture_parameter::assign() // Reload or Reacquire everything necessary. try { // Remove now unused references. - _source.reset(); + _source.release(); _source_child.reset(); _source_active.reset(); _source_visible.reset(); @@ -298,23 +298,22 @@ void streamfx::gfx::shader::texture_parameter::assign() } } else if ((field_type() == texture_field_type::Input) && (_type == texture_type::Source)) { // Try and grab the source itself. - auto source = std::shared_ptr(obs_get_source_by_name(_source_name.c_str()), - [](obs_source_t* v) { obs_source_release(v); }); + auto source = ::streamfx::obs::source(_source_name); if (!source) { throw std::runtime_error("Specified Source does not exist."); } // Attach the child to our parent. - auto child = std::make_shared(get_parent()->get(), source); + auto child = std::make_shared<::streamfx::obs::source_active_child>(source, get_parent()->get()); // Create necessary visible and active objects. - std::shared_ptr active; - std::shared_ptr visible; + decltype(_source_active) active; + decltype(_source_visible) visible; if (_active) { - active = std::make_shared(source.get()); + active = ::streamfx::obs::source_active_reference::add_active_reference(source); } if (_visible) { - visible = std::make_shared(source.get()); + visible = ::streamfx::obs::source_showing_reference::add_showing_reference(source); } // Create the necessary render target to capture the source. @@ -391,7 +390,7 @@ void streamfx::gfx::shader::texture_parameter::visible(bool visible) _visible = visible; if (visible) { if (_source) { - _source_visible = std::make_shared(_source.get()); + _source_visible = ::streamfx::obs::source_showing_reference::add_showing_reference(_source); } } else { _source_visible.reset(); @@ -403,7 +402,7 @@ void streamfx::gfx::shader::texture_parameter::active(bool active) _active = active; if (active) { if (_source) { - _source_active = std::make_shared(_source.get()); + _source_active = ::streamfx::obs::source_active_reference::add_active_reference(_source); } } else { _source_active.reset(); diff --git a/source/gfx/shader/gfx-shader-param-texture.hpp b/source/gfx/shader/gfx-shader-param-texture.hpp index 189102a27b..7491efb1a3 100644 --- a/source/gfx/shader/gfx-shader-param-texture.hpp +++ b/source/gfx/shader/gfx-shader-param-texture.hpp @@ -6,6 +6,10 @@ #include "gfx-shader-param.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "obs/obs-source-active-child.hpp" +#include "obs/obs-source-active-reference.hpp" +#include "obs/obs-source-showing-reference.hpp" +#include "obs/obs-source.hpp" #include "obs/obs-tools.hpp" namespace streamfx::gfx { @@ -54,12 +58,12 @@ namespace streamfx::gfx { std::shared_ptr _file_texture; // Data: Source - std::string _source_name; - std::shared_ptr _source; - std::shared_ptr _source_child; - std::shared_ptr _source_active; - std::shared_ptr _source_visible; - std::shared_ptr _source_rendertarget; + std::string _source_name; + ::streamfx::obs::source _source; + std::shared_ptr _source_child; + std::shared_ptr _source_active; + std::shared_ptr _source_visible; + std::shared_ptr _source_rendertarget; public: texture_parameter(streamfx::gfx::shader::shader* parent, streamfx::obs::gs::effect_parameter param, diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 86b452cd5a..7c70649f14 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -188,22 +188,16 @@ try { release(); // Find source by name if possible. - std::shared_ptr source = - std::shared_ptr{obs_get_source_by_name(source_name.c_str()), obs::obs_source_deleter}; - if ((!source) || (source.get() == _self)) { // If we failed, just exit early. + decltype(_source) source{source_name}; + if ((!source) || (source == _self)) { // If we failed, just exit early. return; } // Everything went well, store. - _source_child = std::make_shared(_self, source); + _source_child = std::make_shared<::streamfx::obs::source_active_child>(_self, source); _source = source; - _source_size.first = obs_source_get_width(_source.get()); - _source_size.second = obs_source_get_height(_source.get()); - - // Listen to the rename event to update our own settings. - _signal_rename = std::make_shared("rename", _source); - _signal_rename->event.add( - std::bind(&mirror_instance::on_rename, this, std::placeholders::_1, std::placeholders::_2)); + _source_size.first = obs_source_get_width(_source); + _source_size.second = obs_source_get_height(_source); // Listen to any audio the source spews out. if (_audio_enabled) { @@ -220,15 +214,10 @@ void mirror_instance::release() _signal_audio.reset(); _signal_rename.reset(); _source_child.reset(); - _source.reset(); -} - -void mirror_instance::on_rename(std::shared_ptr, calldata*) -{ - obs_source_save(_self); + _source.release(); } -void mirror_instance::on_audio(std::shared_ptr, const audio_data* audio, bool) +void mirror_instance::on_audio(::streamfx::obs::source, const audio_data* audio, bool) { // Immediately quit if there isn't any actual audio to send out. if (!_audio_enabled) { diff --git a/source/sources/source-mirror.hpp b/source/sources/source-mirror.hpp index 5ecb96dd34..d0f7da0d01 100644 --- a/source/sources/source-mirror.hpp +++ b/source/sources/source-mirror.hpp @@ -28,6 +28,7 @@ #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-sampler.hpp" #include "obs/obs-signal-handler.hpp" +#include "obs/obs-source-active-child.hpp" #include "obs/obs-source-factory.hpp" #include "obs/obs-source.hpp" #include "obs/obs-tools.hpp" @@ -42,11 +43,11 @@ namespace streamfx::source::mirror { class mirror_instance : public obs::source_instance { // Source - std::shared_ptr _source; - std::shared_ptr _source_child; - std::shared_ptr _signal_rename; - std::shared_ptr _signal_audio; - std::pair _source_size; + ::streamfx::obs::source _source; + std::shared_ptr<::streamfx::obs::source_active_child> _source_child; + std::shared_ptr _signal_rename; + std::shared_ptr _signal_audio; + std::pair _source_size; // Audio bool _audio_enabled; @@ -76,8 +77,7 @@ namespace streamfx::source::mirror { void acquire(std::string source_name); void release(); - void on_rename(std::shared_ptr, calldata*); - void on_audio(std::shared_ptr, const struct audio_data*, bool); + void on_audio(::streamfx::obs::source, const struct audio_data*, bool); void audio_output(std::shared_ptr data); }; From 6852a2468b42432687455ad3d50962a62af7aedb Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 28 May 2022 20:47:01 +0200 Subject: [PATCH 023/164] project: Version 0.12.0a1 --- .github/ISSUE_TEMPLATE/issue.yml | 5 +++++ CMakeLists.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue.yml b/.github/ISSUE_TEMPLATE/issue.yml index 8ed3520c7e..85a6d18ab8 100644 --- a/.github/ISSUE_TEMPLATE/issue.yml +++ b/.github/ISSUE_TEMPLATE/issue.yml @@ -34,6 +34,11 @@ body: label: "StreamFX Version" description: "On which StreamFX version did you first encounter this issue?" options: + - "0.12.0a1" + - "0.11.1" + - "0.11.1b1" + - "0.11.1a1" + - "0.11.0" - "0.11.0c1" - "0.11.0b3" - "0.11.0b2" diff --git a/CMakeLists.txt b/CMakeLists.txt index ac7852a33f..f0d1abab04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,10 +37,10 @@ set(LOGPREFIX "StreamFX:") ################################################################################ set(VERSION_MAJOR 0) -set(VERSION_MINOR 11) +set(VERSION_MINOR 12) set(VERSION_PATCH 0) set(VERSION_TWEAK 0) -set(VERSION_SUFFIX "") +set(VERSION_SUFFIX "a1") set(VERSION_COMMIT "00000000") # Check if we are in a git repository. From 56f50fcc548b354985266781449e5a23ceb7abd8 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 2 Jun 2022 06:40:10 +0200 Subject: [PATCH 024/164] cmake: Require version 3.13 or newer --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0d1abab04..9af97d0be9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ -# StreamFX - The premier VFX plugin for OBS Studio. -# Copyright (C) 2017 - 2020 Michael Fabian Dirks +# Copyright (C) 2017 Michael Fabian Dirks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +15,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # CMake Setup -cmake_minimum_required(VERSION 3.8...4.0) +cmake_minimum_required(VERSION 3.13...4.0) ################################################################################ # Configure Type From 65afefd0ba74fa38e9d6dc9db9473d9ba96dad54 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 025/164] cmake: Use CMAKE_MESSAGE_INDENT if available --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9af97d0be9..7198984ff1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,13 @@ # CMake Setup cmake_minimum_required(VERSION 3.13...4.0) +if(${CMAKE_VERSION} VERSION_LESS 3.19) + set(LOGPREFIX "[StreamFX]") +else() + list(APPEND CMAKE_MESSAGE_INDENT "[StreamFX]") + set(LOGPREFIX "") +endif() + ################################################################################ # Configure Type ################################################################################ @@ -29,7 +36,6 @@ else() set(GROUPED ON) set(PREFIX "StreamFX_") endif() -set(LOGPREFIX "StreamFX:") ################################################################################ # Versioning From 583ba282f8ac46b02caeabfacc387c9cf07fbdb8 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 026/164] cmake: Merge standalone detection into single conditional --- CMakeLists.txt | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7198984ff1..8ca50526f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,16 +25,25 @@ else() endif() ################################################################################ -# Configure Type +# Detect if we are building with OBS Studio (different from Grouped builds) ################################################################################ -# Detect if we are building by ourselves or as part of something else. +set(STANDALONE ON) if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}") set(GROUPED OFF) set(PREFIX "") else() set(GROUPED ON) - set(PREFIX "StreamFX_") + set(PREFIX "StreamFX_") + if(GROUPED AND (TARGET libobs)) + set(STANDALONE OFF) + endif() +endif() + +if(STANDALONE) + message(STATUS "${LOGPREFIX} This is a standalone build, please make sure you've followed the instructions.") +else() + message(STATUS "${LOGPREFIX} This is a combined build.") endif() ################################################################################ @@ -256,22 +265,6 @@ set(D_PLATFORM_INSTR ${ARCH_INST}) set(D_PLATFORM_ARCH ${ARCH_INST}) message(STATUS "${LOGPREFIX} Taget is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") -################################################################################ -# Detect if we are building with OBS Studio (different from Grouped builds) -################################################################################ - -set(STANDALONE ON) -if(GROUPED AND (TARGET libobs)) - set(STANDALONE OFF) -endif() -if(STANDALONE) - message(STATUS "${LOGPREFIX} This is a standalone build, please make sure you've followed the instructions.") - set(${PREFIX}OBS_NATIVE OFF) -else() - message(STATUS "${LOGPREFIX} This is a combined build.") - set(${PREFIX}OBS_NATIVE ON) -endif() - ################################################################################ # Options ################################################################################ @@ -955,7 +948,7 @@ feature_updater(OFF) set(HAVE_CURL OFF) if(REQUIRE_CURL) if(D_PLATFORM_WINDOWS) - if(${PREFIX}OBS_NATIVE) # Already defined by OBS + if(NOT STANDALONE) # Already defined by OBS set(CURL_LIBRARIES "${CURL_LIB}") set(CURL_INCLUDE_DIRS "${CURL_INCLUDE_DIR}") else() @@ -2104,7 +2097,7 @@ endif() # Installation ################################################################################ -if(${PREFIX}OBS_NATIVE) +if(NOT STANDALONE) # Grouped builds don't offer standalone services. install_obs_plugin_with_data(${PROJECT_NAME} data) @@ -2250,7 +2243,7 @@ endif() # Packaging ################################################################################ -if(NOT ${PREFIX}OBS_NATIVE) +if(STANDALONE) # Packaging if(NOT PACKAGE_SUFFIX) set(_PACKAGE_SUFFIX_OVERRIDE "${VERSION_STRING}") From a5de2117688460e0be461d94793b2634d34aeeec Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 027/164] cmake: Add Link-Time Optimization option if supported --- CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ca50526f4..947601ada8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,6 +192,7 @@ set(CMAKE_MODULE_PATH # Include include("util") # CacheClear, CacheSet include("DownloadProject") # DownloadProject +include("CheckIPOSupported") # check_ipo_supported ################################################################################ # Platform Setup @@ -261,6 +262,8 @@ if(FOUND GREATER -1) set(D_PLATFORM_ARCH_ITANIUM ON) endif() +check_ipo_supported(RESULT D_HAS_IPO) + set(D_PLATFORM_INSTR ${ARCH_INST}) set(D_PLATFORM_ARCH ${ARCH_INST}) message(STATUS "${LOGPREFIX} Taget is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") @@ -311,6 +314,9 @@ set(${PREFIX}ENABLE_CLANG ON CACHE BOOL "Enable Clang integration for supported set(${PREFIX}ENABLE_CODESIGN OFF CACHE BOOL "Enable Code Signing integration for supported environments.") set(${PREFIX}ENABLE_PROFILING OFF CACHE BOOL "Enable CPU and GPU performance tracking, which has a non-zero overhead at all times. Do not enable this for release builds.") +## Compile/Link Related +set(${PREFIX}ENABLE_LTO ${D_HAS_IPO} CACHE BOOL "Enable Link Time Optimization for faster and smaller binaries.") + # Installation / Packaging if(STANDALONE) set(STRUCTURE_UNIFIED CACHE BOOL "Install for use in a Plugin Manager") @@ -1913,6 +1919,11 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE_DIRS}) target_compile_definitions(${PROJECT_NAME} PRIVATE ${PROJECT_DEFINITIONS}) target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBRARIES}) +# Always generate position independent code. +set_target_properties(${PROJECT_NAME} PROPERTIES + POSITION_INDEPENDENT_CODE ON +) + # Set C++ Standard and Extensions set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17 @@ -1920,6 +1931,13 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS OFF ) +# Link-Time/Interprocedural Optimization +if(${PREFIX}ENABLE_LTO) + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION ON + ) +endif() + # C/C++ Compiler Adjustments if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) # MSVC/ClangCL From 59411d42d5da89806961981c714e6312102713d9 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 028/164] cmake: Don't enable clang integration by default Affects #799 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 947601ada8..af365f2c16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,7 +310,7 @@ set(${PREFIX}ENABLE_FRONTEND ON CACHE BOOL "Enable Frontend code.") set(${PREFIX}ENABLE_UPDATER ON CACHE BOOL "Enable automatic update checks.") ## Code Related -set(${PREFIX}ENABLE_CLANG ON CACHE BOOL "Enable Clang integration for supported compilers.") +set(${PREFIX}ENABLE_CLANG OFF CACHE BOOL "Enable Clang integration for supported compilers.") set(${PREFIX}ENABLE_CODESIGN OFF CACHE BOOL "Enable Code Signing integration for supported environments.") set(${PREFIX}ENABLE_PROFILING OFF CACHE BOOL "Enable CPU and GPU performance tracking, which has a non-zero overhead at all times. Do not enable this for release builds.") From ad48e7441028e9bc1c7fba5fcb5dc81d0243ac3e Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 029/164] cmake: Fix formatting --- CMakeLists.txt | 98 +++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af365f2c16..5bda9901af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,12 +122,12 @@ if(NOT (${PREFIX}VERSION STREQUAL "")) list(GET T_VERSION 0 VERSION_MAJOR) list(GET T_VERSION 1 VERSION_MINOR) list(GET T_VERSION 2 VERSION_PATCH) - if (T_VERSIONLEN GREATER_EQUAL 3) + if(T_VERSIONLEN GREATER_EQUAL 3) list(GET T_VERSION 3 VERSION_TWEAK) else() set(VERSION_BUILD 0) endif() - if (T_VERSIONLEN GREATER_EQUAL 4) + if(T_VERSIONLEN GREATER_EQUAL 4) list(GET T_VERSION 4 VERSION_COMMIT) else() set(VERSION_COMMIT "") @@ -266,7 +266,7 @@ check_ipo_supported(RESULT D_HAS_IPO) set(D_PLATFORM_INSTR ${ARCH_INST}) set(D_PLATFORM_ARCH ${ARCH_INST}) -message(STATUS "${LOGPREFIX} Taget is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") +message(STATUS "${LOGPREFIX} Target is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") ################################################################################ # Options @@ -386,23 +386,23 @@ if(STANDALONE) if(${PREFIX}OBS_DOWNLOAD) if(${PREFIX}OBS_DOWNLOAD_URL STREQUAL "") # Figure out download URLs and hashes. - if (D_PLATFORM_WINDOWS) - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_WINDOWS) + if(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/windows-x86_64.tar.gz") set(OBS_DOWNLOAD_HASH "DD931BBB2E0720F1D7573C65D8CC9D638F1EE2AC99F7173BF8935CD3A3BCE3F4") endif() endif() elseif(D_PLATFORM_LINUX) - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/linux-x86_64.tar.gz") set(OBS_DOWNLOAD_HASH "CA19E8260E1A556E6231D75064837C61C6D480BD90C97A0B930005AE527BF625") endif() endif() elseif(D_PLATFORM_MAC) - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/macos-x86_64.tar.gz") set(OBS_DOWNLOAD_HASH "0DD5A57DD537B97CAA8470212F8F6B637F47D4742A5D1F17787F4FE9DBC70B33") endif() @@ -447,7 +447,7 @@ if(STANDALONE) include("${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") endif() - if (NOT TARGET obs-frontend-api) + if(NOT TARGET obs-frontend-api) if(EXISTS "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") include("${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") elseif((EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib") AND (EXISTS "${${PREFIX}OBS_PATH}/include/obs-frontend-api.h")) @@ -484,28 +484,28 @@ if(STANDALONE AND NOT D_PLATFORM_LINUX) if(${PREFIX}OBSDEPS_DOWNLOAD) if(${PREFIX}OBSDEPS_DOWNLOAD_URL STREQUAL "") # Figure out download URLs and hashes. - if (D_PLATFORM_WINDOWS) + if(D_PLATFORM_WINDOWS) set(DEPS_VERSION "2022-01-31") - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/win-${DEPS_VERSION}/windows-deps-${DEPS_VERSION}.zip") set(OBSDEPS_DOWNLOAD_HASH "66E55FE35A507C902C036EB11E691D0257FECA545A8EE57324B69427717026DD") endif() endif() elseif(D_PLATFORM_MAC) set(DEPS_VERSION "2022-02-13") - if (D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) + if(D_PLATFORM_BITS EQUAL 64) set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-universal.tar.xz") set(OBSDEPS_DOWNLOAD_HASH "77471B1D345A768E8EFEC3F6AD9DC79F3C7CD34840B66F721B80025D29713F5D") endif() - elseif (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + elseif(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-x86_64.tar.xz") set(OBSDEPS_DOWNLOAD_HASH "1A8715D66E664B857942DEADED0DC46C4F6CD22E88F01ED1188F3BD3FCF632C4") endif() - elseif (D_PLATFORM_ARCH_ARM) - if (D_PLATFORM_BITS EQUAL 64) + elseif(D_PLATFORM_ARCH_ARM) + if(D_PLATFORM_BITS EQUAL 64) set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-arm64.tar.xz") set(OBSDEPS_DOWNLOAD_HASH "2CFCAF05765400C696908F242AEA87B6E1848E1A48CD3EDC2EB7F8CB249C9D48") endif() @@ -542,8 +542,8 @@ if(STANDALONE AND NOT D_PLATFORM_LINUX) endif() CacheSet(${PREFIX}OBSDEPS_PATH "${obsdeps_SOURCE_DIR}") endif() - - if (D_PLATFORM_WINDOWS) + + if(D_PLATFORM_WINDOWS) set(_OBSDEPS_PATH "${${PREFIX}OBSDEPS_PATH}/win${D_PLATFORM_BITS}") set(FFmpegPath "${${PREFIX}OBSDEPS_PATH}/win${D_PLATFORM_BITS}") elseif(D_PLATFORM_MAC) @@ -571,28 +571,28 @@ if(STANDALONE AND NOT D_PLATFORM_LINUX) if(${PREFIX}QT_DOWNLOAD) if(${PREFIX}QT_DOWNLOAD_URL STREQUAL "") # Figure out download URLs and hashes. - if (D_PLATFORM_WINDOWS) + if(D_PLATFORM_WINDOWS) set(DEPS_VERSION "5.15.2") - if (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(QT_DOWNLOAD_URL "https://cdn-fastly.obsproject.com/downloads/Qt_${DEPS_VERSION}.7z") set(QT_DOWNLOAD_HASH "9EF1DFEEBE6AB7FFC55FD285667CC5D9CB2D298646C107C2295D13F14708E64E") endif() endif() elseif(D_PLATFORM_MAC) set(DEPS_VERSION "2022-02-13") - if (D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) - if (D_PLATFORM_BITS EQUAL 64) + if(D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) + if(D_PLATFORM_BITS EQUAL 64) set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-universal.tar.xz") set(QT_DOWNLOAD_HASH "13FBCC45FD9D08B30E702D481FE4D58B23F93AA06848CEDE4EBE0956C79A5E8A") endif() - elseif (D_PLATFORM_ARCH_X86) - if (D_PLATFORM_BITS EQUAL 64) + elseif(D_PLATFORM_ARCH_X86) + if(D_PLATFORM_BITS EQUAL 64) set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-x86_64.tar.xz") set(QT_DOWNLOAD_HASH "35A58FEE8DFD70D3D2DCC0AE0B77132C04A451C6F041A02DC41B207B375FC74B") endif() - elseif (D_PLATFORM_ARCH_ARM) - if (D_PLATFORM_BITS EQUAL 64) + elseif(D_PLATFORM_ARCH_ARM) + if(D_PLATFORM_BITS EQUAL 64) set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-arm64.tar.xz") set(QT_DOWNLOAD_HASH "E99146B9C7775C245A2D22F2EF24FC111FCCD71BAD0F03B64DB707124FFB8707") endif() @@ -635,7 +635,7 @@ if(STANDALONE AND NOT D_PLATFORM_LINUX) CacheSet(${PREFIX}QT_PATH "${qt_SOURCE_DIR}") endif() endif() - + set(Qt5_DIR "${${PREFIX}QT_PATH}/lib/cmake/Qt5" CACHE STRING "Path to Qt") CacheSet(Qt5_DIR "${${PREFIX}QT_PATH}/lib/cmake/Qt5") endif() @@ -660,8 +660,8 @@ if(D_PLATFORM_WINDOWS) if(${PREFIX}AOM_DOWNLOAD_URL STREQUAL "") set(AOM_VERSION "v3.2.0.1") # Figure out download URLs and hashes. - if (D_PLATFORM_WINDOWS) - if (D_PLATFORM_ARCH_X86) + if(D_PLATFORM_WINDOWS) + if(D_PLATFORM_ARCH_X86) set(AOM_DOWNLOAD_URL "https://github.com/Xaymar/aom/releases/download/${AOM_VERSION}/aom-windows-${D_PLATFORM_BITS}-shared.7z") set(AOM_DOWNLOAD_HASH "2DE0C215C5B00D6761AD2D1FEAFB545C04249B2CBD542F9F7D423E1A26BA59BD") endif() @@ -702,7 +702,7 @@ if(D_PLATFORM_WINDOWS) CacheSet(${PREFIX}AOM_PATH "${AOM_SOURCE_DIR}") endif() endif() - + set(AOM_PATH "${${PREFIX}AOM_PATH}" CACHE STRING "Path to AOM") endif() @@ -787,7 +787,7 @@ function(feature_filter_autoframing RESOLVE) # Verify that we have at least one provider for Auto-Framing. is_feature_enabled(FILTER_AUTOFRAMING_NVIDIA T_CHECK_NVIDIA) - if (NOT T_CHECK_NVIDIA) + if(NOT T_CHECK_NVIDIA) message(WARNING "${LOGPREFIX} Auto-Framing has no available providers. Disabling...") set_feature_disabled(FILTER_AUTOFRAMING ON) endif() @@ -816,7 +816,7 @@ function(feature_filter_denoising RESOLVE) # Verify that we have at least one provider for Video Denoising. is_feature_enabled(FILTER_DENOISING_NVIDIA T_CHECK_NVIDIA) - if (NOT T_CHECK_NVIDIA) + if(NOT T_CHECK_NVIDIA) message(WARNING "${LOGPREFIX} Denoising has no available providers. Disabling...") set_feature_disabled(FILTER_DENOISING ON) endif() @@ -856,7 +856,7 @@ function(feature_filter_upscaling RESOLVE) # Verify that we have at least one provider for Video Super-Resolution. is_feature_enabled(FILTER_UPSCALING_NVIDIA T_CHECK_NVIDIA) - if (NOT T_CHECK_NVIDIA) + if(NOT T_CHECK_NVIDIA) message(WARNING "${LOGPREFIX} Upscaling has no available providers. Disabling...") set_feature_disabled(FILTER_UPSCALING ON) endif() @@ -876,7 +876,7 @@ function(feature_filter_virtual_greenscreen RESOLVE) # Verify that we have at least one provider for Video Super-Resolution. is_feature_enabled(FILTER_VIRTUAL_GREENSCREEN_NVIDIA T_CHECK_NVIDIA) - if (NOT T_CHECK_NVIDIA) + if(NOT T_CHECK_NVIDIA) message(WARNING "${LOGPREFIX} Virtual Greenscreen has no available providers. Disabling...") set_feature_disabled(FILTER_VIRTUAL_GREENSCREEN ON) endif() @@ -1461,13 +1461,13 @@ endif() # Encoder/AOM-AV1 is_feature_enabled(ENCODER_AOM_AV1 T_CHECK) if(T_CHECK) - list (APPEND PROJECT_PRIVATE_SOURCE + list(APPEND PROJECT_PRIVATE_SOURCE "source/encoders/codecs/av1.hpp" "source/encoders/codecs/av1.cpp" "source/encoders/encoder-aom-av1.hpp" "source/encoders/encoder-aom-av1.cpp" ) - list (APPEND PROJECT_INCLUDE_DIRS + list(APPEND PROJECT_INCLUDE_DIRS ${AOM_INCLUDE_DIR} ) list(APPEND PROJECT_DEFINITIONS @@ -1486,7 +1486,7 @@ if(T_CHECK) ENABLE_FILTER_AUTOFRAMING ) is_feature_enabled(FILTER_AUTOFRAMING_NVIDIA T_CHECK) - if (T_CHECK) + if(T_CHECK) list(APPEND PROJECT_DEFINITIONS ENABLE_FILTER_AUTOFRAMING_NVIDIA ) @@ -1505,7 +1505,7 @@ if(T_CHECK) "data/effects/blur/gaussian.effect" "data/effects/blur/gaussian-linear.effect" ) - list (APPEND PROJECT_PRIVATE_SOURCE + list(APPEND PROJECT_PRIVATE_SOURCE "source/gfx/blur/gfx-blur-base.hpp" "source/gfx/blur/gfx-blur-base.cpp" "source/gfx/blur/gfx-blur-box.hpp" @@ -1532,7 +1532,7 @@ if(T_CHECK) list(APPEND PROJECT_DATA "data/effects/color-grade.effect" ) - list (APPEND PROJECT_PRIVATE_SOURCE + list(APPEND PROJECT_PRIVATE_SOURCE "source/filters/filter-color-grade.hpp" "source/filters/filter-color-grade.cpp" ) @@ -1548,7 +1548,7 @@ if(T_CHECK) list(APPEND PROJECT_DATA "data/effects/displace.effect" ) - list (APPEND PROJECT_PRIVATE_SOURCE + list(APPEND PROJECT_PRIVATE_SOURCE "source/filters/filter-displacement.hpp" "source/filters/filter-displacement.cpp" ) @@ -1624,7 +1624,7 @@ if(T_CHECK) ENABLE_FILTER_DENOISING ) is_feature_enabled(FILTER_DENOISING_NVIDIA T_CHECK) - if (T_CHECK) + if(T_CHECK) list(APPEND PROJECT_DEFINITIONS ENABLE_FILTER_DENOISING_NVIDIA ) @@ -1642,7 +1642,7 @@ if(T_CHECK) ENABLE_FILTER_UPSCALING ) is_feature_enabled(FILTER_UPSCALING_NVIDIA T_CHECK) - if (T_CHECK) + if(T_CHECK) list(APPEND PROJECT_DEFINITIONS ENABLE_FILTER_UPSCALING_NVIDIA ) @@ -1660,7 +1660,7 @@ if(T_CHECK) ENABLE_FILTER_VIRTUAL_GREENSCREEN ) is_feature_enabled(FILTER_VIRTUAL_GREENSCREEN_NVIDIA T_CHECK) - if (T_CHECK) + if(T_CHECK) list(APPEND PROJECT_DEFINITIONS ENABLE_FILTER_VIRTUAL_GREENSCREEN_NVIDIA ) @@ -2005,7 +2005,7 @@ endif() if(D_PLATFORM_WINDOWS) foreach(DELAYLOAD ${PROJECT_LIBRARIES_DELAYED}) get_target_property(_lf ${PROJECT_NAME} LINK_FLAGS) - if (NOT _lf) + if(NOT _lf) set(_lf "") endif() set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "${_lf} /DELAYLOAD:${DELAYLOAD}") From 5f050515bac803ebae854da14d0cb2850a8c7c70 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 030/164] cmake: Further improve libOBS and obs-frontend-api detection --- CMakeLists.txt | 94 +++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bda9901af..886c18ceb5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -439,30 +439,6 @@ if(STANDALONE) endif() CacheSet(${PREFIX}OBS_PATH "${libobs_SOURCE_DIR}") endif() - - if(NOT EXISTS "${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") - message(FATAL_ERROR "${LOGPREFIX} The provided path for libOBS is invalid as it did not contain '/cmake/LibObs/LibObsConfig.cmake'.") - return() - else() - include("${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") - endif() - - if(NOT TARGET obs-frontend-api) - if(EXISTS "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") - include("${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") - elseif((EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib") AND (EXISTS "${${PREFIX}OBS_PATH}/include/obs-frontend-api.h")) - add_library(obs-frontend-api SHARED IMPORTED) - set_target_properties(obs-frontend-api PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}OBS_PATH}/include" - INTERFACE_LINK_LIBRARIES "libobs" - IMPORTED_CONFIGURATIONS RELWITHDEBINFO - IMPORTED_IMPLIB_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib" - IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.dll" - ) - else() - message(WARNING "${LOGPREFIX} The provided path for libOBS did not contain obs-frontend-api.") - endif() - endif() endif() ################################################################################ @@ -903,13 +879,13 @@ function(feature_frontend RESOLVE) if(NOT HAVE_QT) message(WARNING "${LOGPREFIX} Front-End requires Qt. Disabling...") set_feature_disabled(FRONTEND ON) - elseif(NOT HAVE_OBSFE) + elseif(NOT HAVE_OBS_FRONTEND_API) message(WARNING "${LOGPREFIX} Front-End requires OBS FrontEnd API. Disabling...") set_feature_disabled(FRONTEND ON) endif() elseif(T_CHECK) set(REQUIRE_QT ON PARENT_SCOPE) - set(REQUIRE_OBSFE ON PARENT_SCOPE) + set(REQUIRE_OBS_FRONTEND_API ON PARENT_SCOPE) endif() endfunction() @@ -950,16 +926,62 @@ feature_frontend(OFF) feature_updater(OFF) # Fulfill Requirements +#- OBS: Library +if(STANDALONE) + find_package(libobs REQUIRED NO_MODULE + PATHS + "${${PREFIX}OBS_PATH}/cmake/libobs" + "${${PREFIX}OBS_PATH}/cmake/LibObs" + ) +endif() + +#- OBS: Front-End API +set(HAVE_OBS_FRONTEND_API OFF) +if(REQUIRE_OBS_FRONTEND_API) + if(STANDALONE) + if(EXISTS "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") + find_package("obs-frontend-api" NO_MODULE + PATHS + "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api" + ) + elseif((EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.dll") AND (EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib")) + add_library(obs-frontend-api SHARED IMPORTED) + set_target_properties(obs-frontend-api PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}OBS_PATH}/include" + INTERFACE_LINK_LIBRARIES "libobs" + IMPORTED_CONFIGURATIONS RELWITHDEBINFO + IMPORTED_IMPLIB_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib" + IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.dll" + ) + elseif(EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/libobs-frontend-api.so") + add_library(obs-frontend-api SHARED IMPORTED) + set_target_properties(obs-frontend-api PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}OBS_PATH}/include" + INTERFACE_LINK_LIBRARIES "libobs" + IMPORTED_CONFIGURATIONS RELWITHDEBINFO + IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/libobs-frontend-api.so" + ) + else() + message(WARNING "${LOGPREFIX} The provided path for libOBS did not contain obs-frontend-api.") + endif() + endif() + + if(TARGET obs-frontend-api) + set(HAVE_OBS_FRONTEND_API ON) + endif() +endif() + #- CURL set(HAVE_CURL OFF) if(REQUIRE_CURL) if(D_PLATFORM_WINDOWS) - if(NOT STANDALONE) # Already defined by OBS - set(CURL_LIBRARIES "${CURL_LIB}") - set(CURL_INCLUDE_DIRS "${CURL_INCLUDE_DIR}") - else() + if(STANDALONE) set(CURL_LIBRARIES "${_OBSDEPS_PATH}/bin/libcurl.lib") set(CURL_INCLUDE_DIRS "${_OBSDEPS_PATH}/include") + else() + # Already defined by OBS + set(CURL_LIBRARIES "${CURL_LIB}") + set(CURL_INCLUDE_DIRS "${CURL_INCLUDE_DIR}") endif() set(CURL_LIBRARY_DEBUG ${CURL_LIBRARIES}) set(CURL_LIBRARY_RELEASE ${CURL_LIBRARIES}) @@ -1042,14 +1064,6 @@ if(REQUIRE_NVIDIA_CUDA AND D_PLATFORM_WINDOWS) set(HAVE_NVIDIA_CUDA ON) endif() -#- OBS Front-End API -set(HAVE_OBSFE OFF) -if(REQUIRE_OBSFE) - if(TARGET obs-frontend-api) - set(HAVE_OBSFE ON) - endif() -endif() - #- Qt5 set(HAVE_QT OFF) if(REQUIRE_QT) @@ -1254,7 +1268,7 @@ if(HAVE_NVIDIA_CUDA) ) endif() -if(REQUIRE_OBSFE AND HAVE_OBSFE) +if(REQUIRE_OBS_FRONTEND_API AND HAVE_OBS_FRONTEND_API) list(APPEND PROJECT_LIBRARIES obs-frontend-api) endif() @@ -2063,7 +2077,7 @@ if(D_PLATFORM_MAC) message(STATUS "${LOGPREFIX} Added post-build step for adjusting libobs linking path.") # OBS Front-End API - if(REQUIRE_OBSFE AND HAVE_OBSFE) + if(REQUIRE_OBS_FRONTEND_API AND HAVE_OBS_FRONTEND_API) mac_get_linker_id(TARGET obs-frontend-api OUTPUT T_OBSFE_LINK) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND install_name_tool ARGS -change "${T_OBSFE_LINK}" "@executable_path/../Frameworks/libobs-frontend-api.dylib" $ From 7e41414f57579383524a1829a206bb703e867c8d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 031/164] cmake: Allow targeting a specific architecture level --- CMakeLists.txt | 133 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 113 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 886c18ceb5..0422995616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -316,6 +316,16 @@ set(${PREFIX}ENABLE_PROFILING OFF CACHE BOOL "Enable CPU and GPU performance tra ## Compile/Link Related set(${PREFIX}ENABLE_LTO ${D_HAS_IPO} CACHE BOOL "Enable Link Time Optimization for faster and smaller binaries.") +if(D_PLATFORM_ARCH_X86) + set(${PREFIX}TARGET_X86_64_V4 OFF CACHE BOOL "Target x86-64-v4 (x86-64-v3, AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL).") + set(${PREFIX}TARGET_X86_64_V3 OFF CACHE BOOL "Target x86-64-v3 (x86-64-v2, AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE).") + set(${PREFIX}TARGET_X86_64_V2_EX ON CACHE BOOL "Target extended x86-64-v2 (x86-64-v2, AVX, BMI1, BMI2, F16C, FMA, MOVBE).") + set(${PREFIX}TARGET_X86_64_V2 ON CACHE BOOL "Target x86-64-v2 (x86-64, CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3).") + set(${PREFIX}TARGET_X86_64 ON CACHE BOOL "Target x86-64 (CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SCE, SSE, SSE2).") +endif() +if(NOT MSVC) + set(${PREFIX}TARGET_NATIVE OFF CACHE BOOL "Target the native CPU architecture. Enable it for development or personal builds, but disable it for distribution.") +endif() # Installation / Packaging if(STANDALONE) @@ -1955,15 +1965,10 @@ endif() # C/C++ Compiler Adjustments if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) # MSVC/ClangCL - # - Dynamically link Microsoft C/C++ Redistributable. - # - Enable /W3 and disable useless warnings. - # - Enable C++ exceptions with SEH exceptions. - # - Enable multi-processor compiling. - # - Enable updated __cplusplus macro message(STATUS "${LOGPREFIX} Applying custom flags for MSVC style build.") - # Build with dynamic MSVC linkage. - target_compile_options(${PROJECT_NAME} PUBLIC + # - Dynamically link Microsoft C/C++ Redistributable. + target_compile_options(${PROJECT_NAME} PRIVATE $<$:/MD> $<$:/MDd> $<$:/MD> @@ -1971,33 +1976,121 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STR $<$:/MD> ) - # Enable most useful warnings. + # - Enable most useful warnings. set(DISABLED_WARNINGS "/wd4061" "/wd4100" "/wd4180" "/wd4201" "/wd4464" "/wd4505" "/wd4514" "/wd4571" "/wd4623" "/wd4625" "/wd4626" "/wd4668" "/wd4710" "/wd4774" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd26812" ) - target_compile_options(${PROJECT_NAME} PUBLIC "/W3") + target_compile_options(${PROJECT_NAME} PRIVATE "/W3") foreach(WARN ${DISABLED_WARNINGS}) - target_compile_options(${PROJECT_NAME} PUBLIC "${WARN}") + target_compile_options(${PROJECT_NAME} PRIVATE "${WARN}") endforeach() + + # - Require enabled instruction sets. + if(D_PLATFORM_ARCH_X86) + if(${PREFIX}TARGET_X86_64_V4) + target_compile_options(${PROJECT_NAME} PRIVATE "/arch:AVX512") + message(STATUS "${LOGPREFIX} Targeting x86-64-v4.") + elseif(${PREFIX}TARGET_X86_64_V3) + target_compile_options(${PROJECT_NAME} PRIVATE "/arch:AVX2") + message(STATUS "${LOGPREFIX} Targeting x86-64-v3.") + elseif(${PREFIX}TARGET_X86_64_V2_EX) + target_compile_options(${PROJECT_NAME} PRIVATE "/arch:AVX") + message(STATUS "${LOGPREFIX} Targeting extended x86-64-v2.") + elseif(${PREFIX}TARGET_X86_64_V2) + target_compile_options(${PROJECT_NAME} PRIVATE "/d2archSSE42") + message(STATUS "${LOGPREFIX} Targeting x86-64-v2.") + elseif(${PREFIX}TARGET_X86_64) + #target_compile_options(${PROJECT_NAME} PRIVATE "/arch:SSE2") + message(STATUS "${LOGPREFIX} Targeting x86-64.") + endif() + endif() + + # - Disable incremental builds + target_compile_options(${PROJECT_NAME} PRIVATE "/INCREMENTAL:NO") - # C++ Exceptions & SEH - target_compile_options(${PROJECT_NAME} PUBLIC "/EHa") + # - Enable C++ exceptions with SEH exceptions. + target_compile_options(${PROJECT_NAME} PRIVATE "/EHa") - # Multiprocessor compiling - target_compile_options(${PROJECT_NAME} PUBLIC "/MP") + # - Enable multi-processor compiling. + target_compile_options(${PROJECT_NAME} PRIVATE "/MP") - # Updated __cplusplus - target_compile_options(${PROJECT_NAME} PUBLIC "/Zc:__cplusplus") + # - Enable updated __cplusplus macro + target_compile_options(${PROJECT_NAME} PRIVATE "/Zc:__cplusplus") + + # - Generic Optimizations for Release/RelWithDebInfo/MinSizeRel + set(FLAGS + "/fp:fast" + "/OPT:REF" + "/OPT:ICF=3" + "/GL" + "/Gy" + "/GF" + "/Ox" + "/Ob3" + ) + foreach(FLAG ${FLAGS}) + target_compile_options(${PROJECT_NAME} PRIVATE "$<$:${FLAG}>") + endforeach() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # Clang/AppleClang/GNU - # - Don't export by default. (Temporarily disabled) - # - Enable all and extra warnings. message(STATUS "${LOGPREFIX} Applying custom flags for GNU style build.") - target_compile_options(${PROJECT_NAME} PUBLIC "-Wall") - target_compile_options(${PROJECT_NAME} PUBLIC "-Wextra") + # - Enable most useful warnings. + target_compile_options(${PROJECT_NAME} PRIVATE "-Wall") + target_compile_options(${PROJECT_NAME} PRIVATE "-Wextra") + + # - Require enabled instruction sets. + if(${PREFIX}TARGET_NATIVE) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=native" + "-mtune=native" + ) + message(WARNING "${LOGPREFIX} Targeting native architecture. Binaries will not be distributable to other systems!") + elseif(D_PLATFORM_ARCH_X86) + if(${PREFIX}TARGET_X86_64_V4) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=x86-64-v4" + "-mtune=generic" + ) + message(STATUS "${LOGPREFIX} Targeting x86-64-v4.") + elseif(${PREFIX}TARGET_X86_64_V3) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=x86-64-v3" + "-mtune=generic" + ) + message(STATUS "${LOGPREFIX} Targeting x86-64-v3.") + elseif(${PREFIX}TARGET_X86_64_V2_EX) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=x86-64-v2" + "-mtune=generic" + "-mavx" + "-mbmi2" + "-mbmi" + "-mfma" + "-mf16c" + "-mmovbe" + "-mpclmul" + "-mpopcnt" + ) + message(STATUS "${LOGPREFIX} Targeting extended x86-64-v2.") + elseif(${PREFIX}TARGET_X86_64_V2) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=x86-64-v2" + "-mtune=generic" + ) + message(STATUS "${LOGPREFIX} Targeting x86-64-v2.") + elseif(${PREFIX}TARGET_X86_64) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=x86-64" + "-mtune=generic" + ) + message(STATUS "${LOGPREFIX} Targeting x86-64.") + endif() + endif() + + # - Don't export by default, require attributes. # add_compile_options("-fvisibility=hidden") endif() From 9fbbcdf89dfdb6db7445ac901d7ce31f7caa5ba0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 31 May 2022 22:33:34 +0200 Subject: [PATCH 032/164] cmake: Adjust install and package logic for libOBS 27.2 Also add basic support for libOBS 28.0 --- CMakeLists.txt | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0422995616..253d6648a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2222,19 +2222,7 @@ endif() # Installation ################################################################################ -if(NOT STANDALONE) - # Grouped builds don't offer standalone services. - install_obs_plugin_with_data(${PROJECT_NAME} data) - - # Dependency: AOM - if(HAVE_AOM AND AOM_BINARY AND D_PLATFORM_WINDOWS) - add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy - "${AOM_BINARY}" - "${CMAKE_BINARY_DIR}/rundir/$/data/obs-plugins/${PROJECT_NAME}" - VERBATIM) - endif() -else() +if(STANDALONE) if(STRUCTURE_UNIFIED) install( DIRECTORY "data/" @@ -2311,9 +2299,9 @@ else() endif() # Dependency: AOM - if(HAVE_AOM AND AOM_BINARY AND D_PLATFORM_WINDOWS) + if(HAVE_AOM AND AOM_BINARY) install( - FILES ${AOM_BINARY} + FILES "${AOM_BINARY}" DESTINATION "data/obs-plugins/${PROJECT_NAME}/" COMPONENT StreamFX ) endif() @@ -2362,6 +2350,29 @@ else() DIRECTORY_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE ) endif() +else() + if(COMMAND setup_plugin_target) + setup_plugin_target(${PROJECT_NAME}) + # Seems like we lost the ability to customize which directoy resources are in, and instead are forced to use '/data'. + + if(HAVE_AOM AND AOM_BINARY) # Dependency: AOM + add_target_resource(${PROJECT_NAME} "${AOM_BINARY}" "obs-plugins/${PROJECT_NAME}") + endif() + elseif(COMMAND install_obs_plugin_with_data) + install_obs_plugin_with_data(${PROJECT_NAME} data) + + if(HAVE_AOM AND AOM_BINARY) # Dependency: AOM + install( + FILES "${AOM_BINARY}" + DESTINATION "${OBS_DATA_DESTINATION}/obs-plugins/${PROJECT_NAME}" + ) + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy + "${AOM_BINARY}" + "${OBS_DATA_DESTINATION}/obs-plugins/${PROJECT_NAME}" + VERBATIM) + endif() + endif() endif() ################################################################################ From a5b20c85b0c8588c7d6b112d5f4d371c75cc15c5 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 2 Jun 2022 07:59:00 +0200 Subject: [PATCH 033/164] cmake: Add support for older libOBS versions This is necessary for libOBS 27.2 and earlier, as the file name is LibObsConfig.cmake, not libobsConfig.cmake. --- CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 253d6648a7..c72f4624a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -938,11 +938,19 @@ feature_updater(OFF) # Fulfill Requirements #- OBS: Library if(STANDALONE) - find_package(libobs REQUIRED NO_MODULE - PATHS - "${${PREFIX}OBS_PATH}/cmake/libobs" - "${${PREFIX}OBS_PATH}/cmake/LibObs" - ) + if(EXISTS "${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") + find_package(LibObs REQUIRED NO_MODULE + PATHS + "${${PREFIX}OBS_PATH}/cmake/libobs" + "${${PREFIX}OBS_PATH}/cmake/LibObs" + ) + else() + find_package(libobs REQUIRED NO_MODULE + PATHS + "${${PREFIX}OBS_PATH}/cmake/libobs" + "${${PREFIX}OBS_PATH}/cmake/LibObs" + ) + endif() endif() #- OBS: Front-End API From afdddd93812b532350e9e3d433823c06e0d9dbab Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 2 Jun 2022 08:55:40 +0200 Subject: [PATCH 034/164] cmake: Split optimizations by platform and compiler Also make fast math optional on all platforms and compilers. --- CMakeLists.txt | 96 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c72f4624a4..121502ab0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}") set(PREFIX "") else() set(GROUPED ON) - set(PREFIX "StreamFX_") + set(PREFIX "StreamFX_") if(GROUPED AND (TARGET libobs)) set(STANDALONE OFF) endif() @@ -316,6 +316,7 @@ set(${PREFIX}ENABLE_PROFILING OFF CACHE BOOL "Enable CPU and GPU performance tra ## Compile/Link Related set(${PREFIX}ENABLE_LTO ${D_HAS_IPO} CACHE BOOL "Enable Link Time Optimization for faster and smaller binaries.") +set(${PREFIX}ENABLE_FASTMATH ON CACHE BOOL "Enable fast math optimizations, which sacrifice precision and stability.") if(D_PLATFORM_ARCH_X86) set(${PREFIX}TARGET_X86_64_V4 OFF CACHE BOOL "Target x86-64-v4 (x86-64-v3, AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL).") set(${PREFIX}TARGET_X86_64_V3 OFF CACHE BOOL "Target x86-64-v3 (x86-64-v2, AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE).") @@ -1971,7 +1972,7 @@ if(${PREFIX}ENABLE_LTO) endif() # C/C++ Compiler Adjustments -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) +if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))) # MSVC/ClangCL message(STATUS "${LOGPREFIX} Applying custom flags for MSVC style build.") @@ -1994,7 +1995,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STR foreach(WARN ${DISABLED_WARNINGS}) target_compile_options(${PROJECT_NAME} PRIVATE "${WARN}") endforeach() - + # - Require enabled instruction sets. if(D_PLATFORM_ARCH_X86) if(${PREFIX}TARGET_X86_64_V4) @@ -2014,7 +2015,18 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STR message(STATUS "${LOGPREFIX} Targeting x86-64.") endif() endif() - + + # - Use fast unordered math if possible. + if(${PREFIX}ENABLE_FASTMATH) + target_compile_options(${PROJECT_NAME} PRIVATE "/fp:fast") + else() + target_compile_options(${PROJECT_NAME} PRIVATE "/fp:precise") + if(MSVC_VERSION GREATER 1930) + # Keep original behavior in VS2022 and up. + target_compile_options(${PROJECT_NAME} PRIVATE "/fp:contract") + endif() + endif() + # - Disable incremental builds target_compile_options(${PROJECT_NAME} PRIVATE "/INCREMENTAL:NO") @@ -2026,10 +2038,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STR # - Enable updated __cplusplus macro target_compile_options(${PROJECT_NAME} PRIVATE "/Zc:__cplusplus") - + # - Generic Optimizations for Release/RelWithDebInfo/MinSizeRel set(FLAGS - "/fp:fast" "/OPT:REF" "/OPT:ICF=3" "/GL" @@ -2041,38 +2052,34 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (WIN32 AND CMAKE_CXX_COMPILER_ID STR foreach(FLAG ${FLAGS}) target_compile_options(${PROJECT_NAME} PRIVATE "$<$:${FLAG}>") endforeach() -elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # Clang/AppleClang/GNU - message(STATUS "${LOGPREFIX} Applying custom flags for GNU style build.") +elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))) + # GCC/Clang + message(STATUS "${LOGPREFIX} Applying custom flags for GCC/Clang style build.") # - Enable most useful warnings. target_compile_options(${PROJECT_NAME} PRIVATE "-Wall") target_compile_options(${PROJECT_NAME} PRIVATE "-Wextra") - + # - Require enabled instruction sets. if(${PREFIX}TARGET_NATIVE) - target_compile_options(${PROJECT_NAME} PRIVATE + target_compile_options(${PROJECT_NAME} PRIVATE "-march=native" - "-mtune=native" ) message(WARNING "${LOGPREFIX} Targeting native architecture. Binaries will not be distributable to other systems!") elseif(D_PLATFORM_ARCH_X86) if(${PREFIX}TARGET_X86_64_V4) - target_compile_options(${PROJECT_NAME} PRIVATE + target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v4" - "-mtune=generic" ) message(STATUS "${LOGPREFIX} Targeting x86-64-v4.") elseif(${PREFIX}TARGET_X86_64_V3) - target_compile_options(${PROJECT_NAME} PRIVATE + target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v3" - "-mtune=generic" ) message(STATUS "${LOGPREFIX} Targeting x86-64-v3.") elseif(${PREFIX}TARGET_X86_64_V2_EX) - target_compile_options(${PROJECT_NAME} PRIVATE + target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v2" - "-mtune=generic" "-mavx" "-mbmi2" "-mbmi" @@ -2086,18 +2093,65 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL elseif(${PREFIX}TARGET_X86_64_V2) target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v2" - "-mtune=generic" ) message(STATUS "${LOGPREFIX} Targeting x86-64-v2.") elseif(${PREFIX}TARGET_X86_64) - target_compile_options(${PROJECT_NAME} PRIVATE + target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64" - "-mtune=generic" ) message(STATUS "${LOGPREFIX} Targeting x86-64.") endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + "-mtune=generic" + ) + else() + target_compile_options(${PROJECT_NAME} PRIVATE + "-mtune=x86-64" + ) + endif() + endif() + + # - Use fast unordered math if possible. + if(${PREFIX}ENABLE_FASTMATH) + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + "-ffast-math" + ) + else() + target_compile_options(${PROJECT_NAME} PRIVATE + "-ffp-model=fast" + "-ffp-contract=on" + ) + endif() + else() + target_compile_options(${PROJECT_NAME} PRIVATE + "-ffp-model=precise" + "-ffp-contract=on" + ) + endif() + + # - Don't export by default, require attributes. + # add_compile_options("-fvisibility=hidden") +elseif(D_PLATFORM_MAC AND (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) + # AppleClang + message(STATUS "${LOGPREFIX} Applying custom flags for AppleClang style build.") + + # - Enable most useful warnings. + target_compile_options(${PROJECT_NAME} PRIVATE "-Wall") + target_compile_options(${PROJECT_NAME} PRIVATE "-Wextra") + + # - Require enabled instruction sets. + if(${PREFIX}TARGET_NATIVE) + target_compile_options(${PROJECT_NAME} PRIVATE + "-march=native" + ) + message(WARNING "${LOGPREFIX} Targeting native architecture. Binaries will not be distributable to other systems!") endif() + # - Use fast unordered math if possible. + # FIXME: Appears to not be supported. + # - Don't export by default, require attributes. # add_compile_options("-fvisibility=hidden") endif() From 0ea796de94d4a1edb2f45ac47583b5b1ce75a7cd Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 10 Jun 2022 19:52:52 +0200 Subject: [PATCH 035/164] cmake: Fix some poorly formatted messages --- CMakeLists.txt | 102 ++++++++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 121502ab0e..3005df1dd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,9 @@ cmake_minimum_required(VERSION 3.13...4.0) if(${CMAKE_VERSION} VERSION_LESS 3.19) - set(LOGPREFIX "[StreamFX]") + set(LOGPREFIX "[StreamFX] ") else() - list(APPEND CMAKE_MESSAGE_INDENT "[StreamFX]") + list(APPEND CMAKE_MESSAGE_INDENT "[StreamFX] ") set(LOGPREFIX "") endif() @@ -41,9 +41,9 @@ else() endif() if(STANDALONE) - message(STATUS "${LOGPREFIX} This is a standalone build, please make sure you've followed the instructions.") + message(STATUS "${LOGPREFIX}This is a standalone build, please make sure you've followed the instructions.") else() - message(STATUS "${LOGPREFIX} This is a combined build.") + message(STATUS "${LOGPREFIX}This is a combined build.") endif() ################################################################################ @@ -105,11 +105,11 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") set(VERSION_SUFFIX "") endif() else() - message(WARNING "${LOGPREFIX} Failed to detect version, using default instead.") + message(WARNING "${LOGPREFIX}Failed to detect version, using default instead.") endif() endif() else() - message(STATUS "${LOGPREFIX} Not a git repository, automatic version detection disabled.") + message(STATUS "${LOGPREFIX}Not a git repository, automatic version detection disabled.") endif() # Allow manual overrides of the detected version. @@ -152,7 +152,7 @@ else() endif() # Log the detected version. -message(STATUS "${LOGPREFIX} Version ${VERSION_STRING}") +message(STATUS "${LOGPREFIX}Version ${VERSION_STRING}") ################################################################################ # Project @@ -211,7 +211,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") else() set(D_PLATFORM_OS "unknown") set(D_PLATFORM_UNKNOWN 1) - message(WARNING "${LOGPREFIX} The operating system '${CMAKE_SYSTEM_NAME}' is unknown to to this script, continue at your own risk.") + message(WARNING "${LOGPREFIX}The operating system '${CMAKE_SYSTEM_NAME}' is unknown to to this script, continue at your own risk.") endif() # Architecture @@ -266,7 +266,7 @@ check_ipo_supported(RESULT D_HAS_IPO) set(D_PLATFORM_INSTR ${ARCH_INST}) set(D_PLATFORM_ARCH ${ARCH_INST}) -message(STATUS "${LOGPREFIX} Target is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") +message(STATUS "${LOGPREFIX}Target is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a pointer size of ${D_PLATFORM_BITS_PTR}bit.") ################################################################################ # Options @@ -422,7 +422,7 @@ if(STANDALONE) # Verify that the platform, architecture and bitness is supported. if(OBS_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX} Download for libOBS failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + message(FATAL_ERROR "${LOGPREFIX}Download for libOBS failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() else() @@ -501,7 +501,7 @@ if(STANDALONE AND NOT D_PLATFORM_LINUX) # Verify that the platform, architecture and bitness is supported. if(OBSDEPS_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX} Download for pre-built OBS dependencies failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + message(FATAL_ERROR "${LOGPREFIX}Download for pre-built OBS dependencies failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() else() @@ -588,7 +588,7 @@ if(STANDALONE AND NOT D_PLATFORM_LINUX) # Verify that the platform, architecture and bitness is supported. if(QT_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX} Download for Qt failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + message(FATAL_ERROR "${LOGPREFIX}Download for Qt failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() else() @@ -656,7 +656,7 @@ if(D_PLATFORM_WINDOWS) # Verify that the platform, architecture and bitness is supported. if(AOM_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX} Download for AOM failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") + message(FATAL_ERROR "${LOGPREFIX}Download for AOM failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") return() endif() else() @@ -723,20 +723,20 @@ function(feature_encoder_ffmpeg RESOLVE) is_feature_enabled(ENCODER_FFMPEG T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_FFMPEG) - message(WARNING "${LOGPREFIX} FFmpeg Encoder requires FFmpeg. Disabling...") + message(WARNING "${LOGPREFIX}FFmpeg Encoder requires FFmpeg. Disabling...") set_feature_disabled(ENCODER_FFMPEG ON) else() # AMF is_feature_enabled(ENCODER_FFMPEG_AMF T_CHECK) if(T_CHECK AND D_PLATFORM_MAC) - message(WARNING "${LOGPREFIX} FFmpeg Encoder 'AMF' requires Windows or Linux. Disabling...") + message(WARNING "${LOGPREFIX}FFmpeg Encoder 'AMF' requires Windows or Linux. Disabling...") set_feature_disabled(ENCODER_FFMPEG_AMF ON) endif() # NVENC is_feature_enabled(ENCODER_FFMPEG_NVENC T_CHECK) if(T_CHECK AND D_PLATFORM_MAC) - message(WARNING "${LOGPREFIX} FFmpeg Encoder 'NVENC' requires Windows or Linux. Disabling...") + message(WARNING "${LOGPREFIX}FFmpeg Encoder 'NVENC' requires Windows or Linux. Disabling...") set_feature_disabled(ENCODER_FFMPEG_NVENC ON) endif() @@ -755,7 +755,7 @@ function(feature_encoder_aom_av1 RESOLVE) is_feature_enabled(ENCODER_AOM_AV1 T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_AOM) - message(WARNING "${LOGPREFIX} AOM AV1 encoder missing AOM library. Disabling...") + message(WARNING "${LOGPREFIX}AOM AV1 encoder missing AOM library. Disabling...") set_feature_disabled(ENCODER_AOM_AV1 ON) endif() elseif(T_CHECK) @@ -768,14 +768,14 @@ function(feature_filter_autoframing RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_AR_SDK) - message(WARNING "${LOGPREFIX} 'NVIDIA Augmented Reality SDK' is missing. Disabling NVIDIA provider...") + message(WARNING "${LOGPREFIX}'NVIDIA Augmented Reality SDK' is missing. Disabling NVIDIA provider...") set_feature_disabled(FILTER_AUTOFRAMING_NVIDIA ON) endif() # Verify that we have at least one provider for Auto-Framing. is_feature_enabled(FILTER_AUTOFRAMING_NVIDIA T_CHECK_NVIDIA) if(NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX} Auto-Framing has no available providers. Disabling...") + message(WARNING "${LOGPREFIX}Auto-Framing has no available providers. Disabling...") set_feature_disabled(FILTER_AUTOFRAMING ON) endif() elseif(T_CHECK) @@ -797,14 +797,14 @@ function(feature_filter_denoising RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_VFX_SDK) - message(WARNING "${LOGPREFIX} 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider...") + message(WARNING "${LOGPREFIX}'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider...") set_feature_disabled(FILTER_DENOISING_NVIDIA ON) endif() # Verify that we have at least one provider for Video Denoising. is_feature_enabled(FILTER_DENOISING_NVIDIA T_CHECK_NVIDIA) if(NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX} Denoising has no available providers. Disabling...") + message(WARNING "${LOGPREFIX}Denoising has no available providers. Disabling...") set_feature_disabled(FILTER_DENOISING ON) endif() elseif(T_CHECK) @@ -837,14 +837,14 @@ function(feature_filter_upscaling RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_VFX_SDK) - message(WARNING "${LOGPREFIX} 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") + message(WARNING "${LOGPREFIX}'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") set_feature_disabled(FILTER_UPSCALING_NVIDIA ON) endif() # Verify that we have at least one provider for Video Super-Resolution. is_feature_enabled(FILTER_UPSCALING_NVIDIA T_CHECK_NVIDIA) if(NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX} Upscaling has no available providers. Disabling...") + message(WARNING "${LOGPREFIX}Upscaling has no available providers. Disabling...") set_feature_disabled(FILTER_UPSCALING ON) endif() elseif(T_CHECK) @@ -857,14 +857,14 @@ function(feature_filter_virtual_greenscreen RESOLVE) if(RESOLVE AND T_CHECK) # Verify that the requirements for the providers are available if(NOT HAVE_NVIDIA_VFX_SDK) - message(WARNING "${LOGPREFIX} 'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") + message(WARNING "${LOGPREFIX}'NVIDIA Video Effects SDK' is missing. Disabling NVIDIA provider(s)...") set_feature_disabled(FILTER_VIRTUAL_GREENSCREEN_NVIDIA ON) endif() # Verify that we have at least one provider for Video Super-Resolution. is_feature_enabled(FILTER_VIRTUAL_GREENSCREEN_NVIDIA T_CHECK_NVIDIA) if(NOT T_CHECK_NVIDIA) - message(WARNING "${LOGPREFIX} Virtual Greenscreen has no available providers. Disabling...") + message(WARNING "${LOGPREFIX}Virtual Greenscreen has no available providers. Disabling...") set_feature_disabled(FILTER_VIRTUAL_GREENSCREEN ON) endif() elseif(T_CHECK) @@ -888,10 +888,10 @@ function(feature_frontend RESOLVE) is_feature_enabled(FRONTEND T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_QT) - message(WARNING "${LOGPREFIX} Front-End requires Qt. Disabling...") + message(WARNING "${LOGPREFIX}Front-End requires Qt. Disabling...") set_feature_disabled(FRONTEND ON) elseif(NOT HAVE_OBS_FRONTEND_API) - message(WARNING "${LOGPREFIX} Front-End requires OBS FrontEnd API. Disabling...") + message(WARNING "${LOGPREFIX}Front-End requires OBS FrontEnd API. Disabling...") set_feature_disabled(FRONTEND ON) endif() elseif(T_CHECK) @@ -904,10 +904,10 @@ function(feature_updater RESOLVE) is_feature_enabled(UPDATER T_CHECK) if(RESOLVE AND T_CHECK) if(NOT HAVE_CURL) - message(WARNING "${LOGPREFIX} Updater requires CURL. Disabling...") + message(WARNING "${LOGPREFIX}Updater requires CURL. Disabling...") set_feature_disabled(UPDATER ON) elseif(NOT HAVE_JSON) - message(WARNING "${LOGPREFIX} Updater requires nlohmann::json. Disabling...") + message(WARNING "${LOGPREFIX}Updater requires nlohmann::json. Disabling...") set_feature_disabled(UPDATER ON) endif() elseif(T_CHECK) @@ -981,7 +981,7 @@ if(REQUIRE_OBS_FRONTEND_API) IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/libobs-frontend-api.so" ) else() - message(WARNING "${LOGPREFIX} The provided path for libOBS did not contain obs-frontend-api.") + message(WARNING "${LOGPREFIX}The provided path for libOBS did not contain obs-frontend-api.") endif() endif() @@ -1033,7 +1033,7 @@ endif() set(HAVE_JSON OFF) if(REQUIRE_JSON) if(NOT EXISTS "${PROJECT_SOURCE_DIR}/third-party/nlohmann-json/single_include") - message(FATAL_ERROR "${LOGPREFIX} Please make sure to update git submodules to their latest supported version.") + message(FATAL_ERROR "${LOGPREFIX}Please make sure to update git submodules to their latest supported version.") return() else() set(JSON_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/third-party/nlohmann-json/single_include") @@ -1974,7 +1974,7 @@ endif() # C/C++ Compiler Adjustments if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))) # MSVC/ClangCL - message(STATUS "${LOGPREFIX} Applying custom flags for MSVC style build.") + message(STATUS "${LOGPREFIX}Applying custom flags for MSVC style build.") # - Dynamically link Microsoft C/C++ Redistributable. target_compile_options(${PROJECT_NAME} PRIVATE @@ -2000,19 +2000,19 @@ if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX if(D_PLATFORM_ARCH_X86) if(${PREFIX}TARGET_X86_64_V4) target_compile_options(${PROJECT_NAME} PRIVATE "/arch:AVX512") - message(STATUS "${LOGPREFIX} Targeting x86-64-v4.") + message(STATUS "${LOGPREFIX}Targeting x86-64-v4.") elseif(${PREFIX}TARGET_X86_64_V3) target_compile_options(${PROJECT_NAME} PRIVATE "/arch:AVX2") - message(STATUS "${LOGPREFIX} Targeting x86-64-v3.") + message(STATUS "${LOGPREFIX}Targeting x86-64-v3.") elseif(${PREFIX}TARGET_X86_64_V2_EX) target_compile_options(${PROJECT_NAME} PRIVATE "/arch:AVX") - message(STATUS "${LOGPREFIX} Targeting extended x86-64-v2.") + message(STATUS "${LOGPREFIX}Targeting extended x86-64-v2.") elseif(${PREFIX}TARGET_X86_64_V2) target_compile_options(${PROJECT_NAME} PRIVATE "/d2archSSE42") - message(STATUS "${LOGPREFIX} Targeting x86-64-v2.") + message(STATUS "${LOGPREFIX}Targeting x86-64-v2.") elseif(${PREFIX}TARGET_X86_64) #target_compile_options(${PROJECT_NAME} PRIVATE "/arch:SSE2") - message(STATUS "${LOGPREFIX} Targeting x86-64.") + message(STATUS "${LOGPREFIX}Targeting x86-64.") endif() endif() @@ -2054,7 +2054,7 @@ if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX endforeach() elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))) # GCC/Clang - message(STATUS "${LOGPREFIX} Applying custom flags for GCC/Clang style build.") + message(STATUS "${LOGPREFIX}Applying custom flags for GCC/Clang style build.") # - Enable most useful warnings. target_compile_options(${PROJECT_NAME} PRIVATE "-Wall") @@ -2065,18 +2065,18 @@ elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_ target_compile_options(${PROJECT_NAME} PRIVATE "-march=native" ) - message(WARNING "${LOGPREFIX} Targeting native architecture. Binaries will not be distributable to other systems!") + message(WARNING "${LOGPREFIX}Targeting native architecture. Binaries will not be distributable to other systems!") elseif(D_PLATFORM_ARCH_X86) if(${PREFIX}TARGET_X86_64_V4) target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v4" ) - message(STATUS "${LOGPREFIX} Targeting x86-64-v4.") + message(STATUS "${LOGPREFIX}Targeting x86-64-v4.") elseif(${PREFIX}TARGET_X86_64_V3) target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v3" ) - message(STATUS "${LOGPREFIX} Targeting x86-64-v3.") + message(STATUS "${LOGPREFIX}Targeting x86-64-v3.") elseif(${PREFIX}TARGET_X86_64_V2_EX) target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v2" @@ -2089,17 +2089,17 @@ elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_ "-mpclmul" "-mpopcnt" ) - message(STATUS "${LOGPREFIX} Targeting extended x86-64-v2.") + message(STATUS "${LOGPREFIX}Targeting extended x86-64-v2.") elseif(${PREFIX}TARGET_X86_64_V2) target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64-v2" ) - message(STATUS "${LOGPREFIX} Targeting x86-64-v2.") + message(STATUS "${LOGPREFIX}Targeting x86-64-v2.") elseif(${PREFIX}TARGET_X86_64) target_compile_options(${PROJECT_NAME} PRIVATE "-march=x86-64" ) - message(STATUS "${LOGPREFIX} Targeting x86-64.") + message(STATUS "${LOGPREFIX}Targeting x86-64.") endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") target_compile_options(${PROJECT_NAME} PRIVATE @@ -2135,7 +2135,7 @@ elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_ # add_compile_options("-fvisibility=hidden") elseif(D_PLATFORM_MAC AND (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) # AppleClang - message(STATUS "${LOGPREFIX} Applying custom flags for AppleClang style build.") + message(STATUS "${LOGPREFIX}Applying custom flags for AppleClang style build.") # - Enable most useful warnings. target_compile_options(${PROJECT_NAME} PRIVATE "-Wall") @@ -2146,7 +2146,7 @@ elseif(D_PLATFORM_MAC AND (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) target_compile_options(${PROJECT_NAME} PRIVATE "-march=native" ) - message(WARNING "${LOGPREFIX} Targeting native architecture. Binaries will not be distributable to other systems!") + message(WARNING "${LOGPREFIX}Targeting native architecture. Binaries will not be distributable to other systems!") endif() # - Use fast unordered math if possible. @@ -2229,7 +2229,7 @@ if(D_PLATFORM_MAC) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND install_name_tool ARGS -change "${T_OBS_LINK}" "@executable_path/../Frameworks/libobs.0.dylib" $ ) - message(STATUS "${LOGPREFIX} Added post-build step for adjusting libobs linking path.") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting libobs linking path.") # OBS Front-End API if(REQUIRE_OBS_FRONTEND_API AND HAVE_OBS_FRONTEND_API) @@ -2237,7 +2237,7 @@ if(D_PLATFORM_MAC) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND install_name_tool ARGS -change "${T_OBSFE_LINK}" "@executable_path/../Frameworks/libobs-frontend-api.dylib" $ ) - message(STATUS "${LOGPREFIX} Added post-build step for adjusting libobs-frontend-api linking path.") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting libobs-frontend-api linking path.") endif() # Qt5 @@ -2259,9 +2259,9 @@ if(D_PLATFORM_MAC) # - QtWidgets COMMAND install_name_tool ARGS -change "${T_QT5WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" $ ) - message(STATUS "${LOGPREFIX} Added post-build step for adjusting Qt5::Core linking path (Found: ${Qt5_DIR} resolved to ${T_QT5CORE_LINK}).") - message(STATUS "${LOGPREFIX} Added post-build step for adjusting Qt5::Gui linking path (Found: ${Qt5_DIR} resolved to ${T_QT5GUI_LINK}).") - message(STATUS "${LOGPREFIX} Added post-build step for adjusting Qt5::Widgets linking path (Found: ${Qt5_DIR} resolved to ${T_QT5WIDGETS_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Core linking path (Found: ${Qt5_DIR} resolved to ${T_QT5CORE_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Gui linking path (Found: ${Qt5_DIR} resolved to ${T_QT5GUI_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Widgets linking path (Found: ${Qt5_DIR} resolved to ${T_QT5WIDGETS_LINK}).") endif() endif() From d7dc5804d4b1689e93df0f37421b6a7a8f07b959 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 10 Jun 2022 20:14:03 +0200 Subject: [PATCH 036/164] cmake: Update clang submodule Fixes #799 --- CMakeLists.txt | 2 +- cmake/clang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3005df1dd6..d67eceae2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -984,7 +984,7 @@ if(REQUIRE_OBS_FRONTEND_API) message(WARNING "${LOGPREFIX}The provided path for libOBS did not contain obs-frontend-api.") endif() endif() - + if(TARGET obs-frontend-api) set(HAVE_OBS_FRONTEND_API ON) endif() diff --git a/cmake/clang b/cmake/clang index b2a06d8af0..f249747ff0 160000 --- a/cmake/clang +++ b/cmake/clang @@ -1 +1 @@ -Subproject commit b2a06d8af031297e36c6516a652ce2e97e20a79b +Subproject commit f249747ff0a460b3e564801079445a2216b7c068 From f34a4e7c95f036e2a0e846b0b3de15cf293e05ee Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 2 Jun 2022 07:42:04 +0200 Subject: [PATCH 037/164] ci: Update and merge scripts into one file - Updates all workflow actions to the latest major version where possible. - Updated GCC to version 10 on Ubuntu. - Update Clang to version 14 on Ubuntu. - Removed CodeQL as it turned out to be completely useless. - Updated validation script. - Updated build script --- .github/workflows/authors.yml | 2 +- .github/workflows/codeql-analysis.yml | 107 --------- .github/workflows/main.yml | 334 ++++++++++++-------------- .github/workflows/validate.yml | 68 ++++-- 4 files changed, 204 insertions(+), 307 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/authors.yml b/.github/workflows/authors.yml index 3a9cb289a7..401e9d309c 100644 --- a/.github/workflows/authors.yml +++ b/.github/workflows/authors.yml @@ -7,7 +7,7 @@ jobs: name: "Update Authors" steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: "Configure" shell: bash run: | diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index b6d3568e3a..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: - - 'master' - tags: - - '*' - pull_request: - branches: - - '*' - -env: - OBS_VERSION: "27.0.0-ci" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: "Clone" - uses: actions/checkout@v2 - with: - submodules: recursive - fetch-depth: 0 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - #- name: Autobuild - # uses: github/codeql-action/autobuild@v1 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: "Prerequisites: Apt-Get" - shell: bash - run: | - sudo apt-get -qq update - sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64 - sudo apt-get install \ - build-essential \ - checkinstall \ - pkg-config \ - cmake \ - ninja-build \ - git \ - qt5-default libqwt-qt5-dev libqt5svg5-dev \ - libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ - libcurl4-openssl-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9 - - - name: "Dependencies: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/autodeps - key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} - - - name: "StreamFX: Configure" - shell: bash - run: | - cmake -H. -B"build/temp" \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DPACKAGE_PREFIX="build/package" - - - name: "StreamFX: Build" - shell: bash - run: | - cmake --build "build/temp" --config RelWithDebInfo --target install - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39f69276ae..6e977739f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,141 +10,100 @@ on: branches: - '*' +concurrency: + group: build-${{ github.ref }} + cancel-in-progress: true + env: - CACHE_VERSION: 1 + CACHE_VERSION: 2 LIBAOM_VERSION: "3.2.0.0" jobs: - windows: - name: "Windows 64-bit" + build: strategy: fail-fast: true matrix: - runner: [ windows-2019 ] + runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ] + CMAKE_BUILD_TYPE: [ Debug, RelWithDebInfo ] include: + - runner: windows-2022 + generator: MSVC + platform: "Windows 11" + PACKAGE_NAME: "windows-11" + CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR_PLATFORM: "x64" - runner: windows-2019 - id: windows-2019 - windows_sdk: "10.0.18362.0" - cmake_generator: "Visual Studio 16 2019" - cmake_generator_platform: "x64" - runs-on: ${{ matrix.runner }} - env: - CMAKE_GENERATOR: ${{ matrix.cmake_generator }} - CMAKE_GENERATOR_PLATFORM: ${{ matrix.cmake_generator_platform }} - CMAKE_GENERATOR_TOOLSET: "host=x64" - CMAKE_SYSTEM_VERSION: ${{ matrix.windows_sdk }} - steps: - - name: "Clone" - uses: actions/checkout@v2 - with: - submodules: recursive - fetch-depth: 0 - - - name: "Dependencies: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/autodeps - key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} - - - name: "Code Signing" - if: ${{ github.event_name != 'pull_request' }} - id: codesign - shell: bash - run: | - # Restore the Certificate back into a file. - echo "${{ secrets.CODESIGN_CERT_WIN }}" | base64 --decode > "${{ github.workspace }}/cert.pfx" - echo "::set-output name=cmake_args::-DENABLE_CODESIGN=ON -DCODESIGN_TIMESTAMPS=ON" - - - name: "StreamFX: Configure" - shell: bash - env: - CODESIGN_FILE: ${{ github.workspace }}/cert.pfx - CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }} - run: | - cmake -H. -B"build/temp" \ - ${{ steps.codesign.outputs.cmake_args }} \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DPACKAGE_PREFIX="build/package" \ - -DAOM_PATH="build/libaom/" - - - name: "StreamFX: Build" - shell: bash - run: | - cmake --build "build/temp" --config RelWithDebInfo --target INSTALL - - - name: "StreamFX: Package (Install Prerequisites)" - run: | - curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.1.2.exe" "-f" "--retry" "5" "-o" "inno.exe" - .\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART - - - name: "StreamFX: Package" - shell: bash - run: | - mkdir build/package - cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z - cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP - - - name: "StreamFX: Signed Installer Preparation" - if: ${{ github.event_name != 'pull_request' }} - id: codesign_install - shell: bash - run: | - if [[ -f "${{ github.workspace }}/cert.pfx" ]]; then - signtool=$(awk 'match($0, /^;signtool=(.+)$/, ary) {print ary[1]}' "${{ github.workspace }}/build/temp/installer.iss") - echo "::set-output name=iscc_signtool::${signtool}" - fi - - - name: "StreamFX: Package Installer" - shell: cmd - run: | - echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss"' - "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss" - - - name: "Artifacts" - uses: actions/upload-artifact@v1 - with: - name: ${{ matrix.id }} - path: build/package - - ubuntu: - name: "Ubuntu 64-bit" - strategy: - fail-fast: true - matrix: - ubuntu: [ focal ] - compiler: [ gcc, clang ] - include: - - ubuntu: focal - compiler: gcc - compiler-cxx: g++ - runner: ubuntu-20.04 - packages: gcc-9 g++9 - extra_command: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9 - id: ubuntu-20.04 - - ubuntu: focal - compiler: clang - compiler-cxx: clang++ - runner: ubuntu-20.04 - packages: "" - extra_command: 'sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"' - id: ubuntu-20.04-clang + generator: MSVC + platform: "Windows 10" + PACKAGE_NAME: "windows-10" + CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_GENERATOR: "Visual Studio 16 2019" + CMAKE_GENERATOR_PLATFORM: "x64" + - runner: ubuntu-22.04 + generator: GCC + platform: "Ubuntu 22" + compiler_c: gcc + compiler_cxx: g++ + PACKAGE_NAME: "ubuntu-22-gcc" + CMAKE_GENERATOR: "Ninja" + - runner: ubuntu-20.04 + generator: GCC + platform: "Ubuntu 20" + compiler_c: gcc + compiler_cxx: g++ + PACKAGE_NAME: "ubuntu-20-gcc" + CMAKE_GENERATOR: "Ninja" + - runner: ubuntu-22.04 + generator: Clang + platform: "Ubuntu 22" + compiler_c: clang + compiler_cxx: clang++ + PACKAGE_NAME: "ubuntu-22-clang" + CMAKE_GENERATOR: "Ninja" + - runner: ubuntu-20.04 + generator: Clang + platform: "Ubuntu 20" + compiler_c: clang + compiler_cxx: clang++ + PACKAGE_NAME: "ubuntu-20-clang" + CMAKE_GENERATOR: "Ninja" + - runner: macos-12 + generator: Clang + platform: "MacOS 12" + PACKAGE_NAME: "macos-12" + CMAKE_GENERATOR: "Xcode" + CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" + - runner: macos-11 + generator: Clang + platform: "MacOS 11" + PACKAGE_NAME: "macos-11" + CMAKE_GENERATOR: "Xcode" + CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" + - runner: macos-10.15 + generator: Clang + platform: "MacOS 10.15" + PACKAGE_NAME: "macos-10.15" + CMAKE_GENERATOR: "Xcode" + CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" + name: "${{ matrix.platform }} (${{ matrix.generator }}, ${{ matrix.CMAKE_BUILD_TYPE }})" runs-on: ${{ matrix.runner }} env: - CC: ${{ matrix.compiler }} - CXX: ${{ matrix.compiler-cxx }} - CMAKE_GENERATOR: "Ninja" + CC: ${{ matrix.compiler_c }} + CXX: ${{ matrix.compiler_cxx }} + CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }} + CMAKE_GENERATOR_PLATFORM: ${{ matrix.CMAKE_GENERATOR_PLATFORM }} + CMAKE_SYSTEM_VERSION: ${{ matrix.CMAKE_SYSTEM_VERSION }} + CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" steps: - name: "Clone" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 - - name: "Prerequisites: Apt-Get" + - name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)" + if: startsWith( matrix.runner, 'ubuntu' ) shell: bash run: | sudo apt-get -qq update @@ -156,106 +115,115 @@ jobs: cmake \ ninja-build \ git \ - ${{ matrix.packages }} \ - qt5-default libqwt-qt5-dev libqt5svg5-dev \ + qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev - ${{ matrix.extra_command }} - - name: "Dependencies: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 - with: - path: | - build/temp/autodeps - key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} - - - name: "StreamFX: Configure" + - name: "Dependency: GCC (Linux, GCC)" + if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'GCC' ) shell: bash run: | - cmake -H. -B"build/temp" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DPACKAGE_PREFIX="build/package" + sudo apt-get install gcc-10 g++10 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10 - - name: "StreamFX: Build" + - name: "Dependency: Clang (Linux, Clang)" + if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'Clang' ) shell: bash run: | - cmake --build "build/temp" --config RelWithDebInfo --target install + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 - - name: "StreamFX: Package" + - name: 'Dependency: Packages (Linux)' + if: startsWith( matrix.runner, 'macos' ) shell: bash run: | - mkdir build/package - cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z - cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP - - - name: "Artifacts" - uses: actions/upload-artifact@v1 - with: - name: ${{ matrix.id }} - path: build/package + curl -kL http://cdn.xaymar.com/ci/Packages-1.2.10.dmg -f --retry 5 -o "Packages.dmg" + sudo hdiutil attach ./Packages.dmg + pushd /Volumes/Packages* + sudo installer -pkg ./Install\ Packages.pkg -target / - macos: - strategy: - fail-fast: true - matrix: - runner: [ macos-latest ] - include: - - runner: macos-latest - id: macos-10.15 - target-version: "10.15" - name: "MacOS (${{ matrix.target-version }})" - runs-on: ${{ matrix.runner }} - env: - CMAKE_GENERATOR: "Xcode" - CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.target-version }}" - steps: - - name: "Clone" - uses: actions/checkout@v2 - with: - submodules: recursive - fetch-depth: 0 + - name: "Dependency: InnoSetup (Windows)" + if: startsWith( matrix.runner, 'windows' ) + run: | + curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe" + .\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART - - name: "Dependencies: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 + - name: "Auto-Dependency Cache" + if: github.event_name != 'pull_request' + uses: actions/cache@v3 with: path: | build/temp/autodeps - key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} + key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.CACHE_VERSION }} - - name: "StreamFX: Configure" + - name: "Code Signing (Windows)" +# Do not run this on pull requests, ever! + if: (github.event_name != 'pull_request') && startsWith( matrix.runner, 'windows' ) + id: codesign + shell: bash + run: | + # Restore the Certificate back into a file. + echo "${{ secrets.CODESIGN_CERT_WIN }}" | base64 --decode > "${{ github.workspace }}/cert.pfx" + echo "::set-output name=cmake_args::-DENABLE_CODESIGN=ON -DCODESIGN_TIMESTAMPS=ON" + + - name: "Configure" shell: bash + env: + CODESIGN_FILE: ${{ github.workspace }}/cert.pfx + CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }} run: | cmake -H. -B"build/temp" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + ${{ steps.codesign.outputs.cmake_args }} \ + -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DPACKAGE_NAME="streamfx-${{ matrix.id }}" \ + -DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \ -DPACKAGE_PREFIX="build/package" - - name: "StreamFX: Build" + - name: "Build (Windows)" + if: startsWith( matrix.runner, 'windows' ) + shell: bash + run: | + cmake --build "build/temp" --config RelWithDebInfo --target INSTALL + + - name: "Build (Linux)" + if: startsWith( matrix.runner, 'ubuntu' ) + shell: bash + run: | + cmake --build "build/temp" --config RelWithDebInfo --target install/strip + + - name: "Build (MacOS)" + if: startsWith( matrix.runner, 'macos' ) shell: bash run: | cmake --build "build/temp" --config RelWithDebInfo --target install - - name: "StreamFX: Package" + - name: "Package: Archives" shell: bash run: | mkdir build/package cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP - - name: 'Packages: Install' + - name: "Package: Installer Code Signing (Windows)" + if: (github.event_name != 'pull_request') && startsWith( matrix.runner, 'windows' ) + id: codesign_install shell: bash run: | - curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg - sudo hdiutil attach ./Packages.dmg - pushd /Volumes/Packages* - sudo installer -pkg ./Install\ Packages.pkg -target / + if [[ -f "${{ github.workspace }}/cert.pfx" ]]; then + signtool=$(awk 'match($0, /^;signtool=(.+)$/, ary) {print ary[1]}' "${{ github.workspace }}/build/temp/installer.iss") + echo "::set-output name=iscc_signtool::${signtool}" + fi + + - name: "Package: Installer (Windows)" + if: startsWith( matrix.runner, 'windows' ) + shell: cmd + run: | + echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss"' + "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss" - - name: "Packages: Package" + - name: "Package: Installer (MacOS)" + if: startsWith( matrix.runner, 'macos' ) shell: bash run: | packagesbuild ./build/temp/installer.pkgproj @@ -263,5 +231,5 @@ jobs: - name: "Artifacts" uses: actions/upload-artifact@v1 with: - name: ${{ matrix.id }} + name: ${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }} path: build/package diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4edce583f3..41e5970ce0 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,25 +8,59 @@ on: tags: - '*' +concurrency: + group: validate-${{ github.ref }} + cancel-in-progress: true + env: - CACHE_VERSION: 1 + CACHE_VERSION: 2 jobs: - clang-format: - name: "clang-format" - runs-on: ubuntu-20.04 + validation: + strategy: + fail-fast: true + matrix: + runner: [ "windows-2022", "windows-2019", "ubuntu-22.04", "ubuntu-20.04" ] + CMAKE_BUILD_TYPE: [ "Debug", "Release" ] + include: + - runner: "windows-2022" + id: "windows-2022-validate" + name: "Windows 11" + CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR_PLATFORM: "x64" + - runner: "windows-2019" + id: "windows-2019-validate" + name: "Windows 10" + CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_GENERATOR: "Visual Studio 16 2019" + CMAKE_GENERATOR_PLATFORM: "x64" + - runner: "ubuntu-22.04" + id: "linux-22.04-validate" + name: "Ubuntu 22.04" + CMAKE_GENERATOR: "Ninja" + - runner: "ubuntu-20.04" + id: "linux-20.04-validate" + name: "Ubuntu 20.04" + CMAKE_GENERATOR: "Ninja" + name: "${{ matrix.name }} (${{ matrix.CMAKE_BUILD_TYPE }})" + runs-on: ${{ matrix.runner }} env: CC: clang CXX: clang++ - CMAKE_GENERATOR: "Ninja" + CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }} + CMAKE_SYSTEM_VERSION: ${{ matrix.CMAKE_SYSTEM_VERSION }} + CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }} + CMAKE_GENERATOR_PLATFORM: ${{ matrix.CMAKE_GENERATOR_PLATFORM }} steps: - name: "Clone" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 - name: "Prerequisites: Apt-Get" + if: startsWith( matrix.id, 'linux' ) shell: bash run: | sudo apt-get -qq update @@ -38,15 +72,14 @@ jobs: cmake \ ninja-build \ git \ - ${{ matrix.packages }} \ - qt5-default libqwt-qt5-dev libqt5svg5-dev \ + qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" - name: "Dependencies: Cache" - if: ${{ github.event_name != 'pull_request' }} - uses: actions/cache@v2 + if: github.event_name != 'pull_request' + uses: actions/cache@v3 with: path: | build/temp/autodeps @@ -56,16 +89,19 @@ jobs: shell: bash run: | cmake -H. -B"build/temp" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DCMAKE_PACKAGE_NAME="streamfx-${{ matrix.id }}" \ - -DCMAKE_PACKAGE_PREFIX="build/package" \ + -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ -DENABLE_CLANG=TRUE - - name: "StreamFX: Format" + - name: "StreamFX: clang-tidy" + continue-on-error: true + shell: bash + run: | + cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy + + - name: "StreamFX: clang-format" shell: bash run: | - cmake --build "build/temp" --config RelWithDebInfo --target StreamFX_CLANG-FORMAT + cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format - name: "Validate Formatting" shell: bash From 35baf7e3c54ea46636eee49d4913780bf44f8195 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 11 Jun 2022 04:46:34 +0200 Subject: [PATCH 038/164] ci: Correctly remove builds from the matrix Re-enables GCC, which is still very much in use. --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e977739f5..e6633a0767 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,33 @@ jobs: fail-fast: true matrix: runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ] + generator: [ MSVC, GCC, Clang ] CMAKE_BUILD_TYPE: [ Debug, RelWithDebInfo ] + exclude: + - runner: windows-2022 + generator: GCC + - runner: windows-2019 + generator: GCC + - runner: windows-2022 + generator: Clang + - runner: windows-2019 + generator: Clang + - runner: ubuntu-22.04 + generator: MSVC + - runner: ubuntu-20.04 + generator: MSVC + - runner: macos-12 + generator: MSVC + - runner: macos-12 + generator: GCC + - runner: macos-11 + generator: MSVC + - runner: macos-11 + generator: GCC + - runner: macos-10.15 + generator: MSVC + - runner: macos-10.15 + generator: GCC include: - runner: windows-2022 generator: MSVC From b3efea50ef3450c35e267649c05d403680dba6ea Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 11 Jun 2022 04:46:34 +0200 Subject: [PATCH 039/164] ci: Add ClangCL to MSVC/Windows --- .github/workflows/main.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6633a0767..8e65dbb3b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,10 +31,6 @@ jobs: generator: GCC - runner: windows-2019 generator: GCC - - runner: windows-2022 - generator: Clang - - runner: windows-2019 - generator: Clang - runner: ubuntu-22.04 generator: MSVC - runner: ubuntu-20.04 @@ -66,6 +62,22 @@ jobs: CMAKE_SYSTEM_VERSION: "10.0.18362.0" CMAKE_GENERATOR: "Visual Studio 16 2019" CMAKE_GENERATOR_PLATFORM: "x64" + - runner: windows-2022 + generator: Clang + platform: "Windows 11" + PACKAGE_NAME: "windows-11-clang" + CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR_PLATFORM: "x64" + CMAKE_GENERATOR_TOOLSET: "ClangCL" + - runner: windows-2019 + generator: Clang + platform: "Windows 10" + PACKAGE_NAME: "windows-10-clang" + CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_GENERATOR: "Visual Studio 16 2019" + CMAKE_GENERATOR_PLATFORM: "x64" + CMAKE_GENERATOR_TOOLSET: "ClangCL" - runner: ubuntu-22.04 generator: GCC platform: "Ubuntu 22" @@ -119,6 +131,7 @@ jobs: CXX: ${{ matrix.compiler_cxx }} CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }} CMAKE_GENERATOR_PLATFORM: ${{ matrix.CMAKE_GENERATOR_PLATFORM }} + CMAKE_GENERATOR_TOOLSET: ${{ matrix.CMAKE_GENERATOR_TOOLSET }} CMAKE_SYSTEM_VERSION: ${{ matrix.CMAKE_SYSTEM_VERSION }} CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" steps: From 36482ac020fe0ae9e4edd6d9503a10241622c127 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 11 Jun 2022 05:17:14 +0200 Subject: [PATCH 040/164] ci: Update CMAKE_SYSTEM_VERSION to System Requirements The updated SDK fixes critical crashes. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e65dbb3b0..ba5961b0c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,21 +52,21 @@ jobs: generator: MSVC platform: "Windows 11" PACKAGE_NAME: "windows-11" - CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_SYSTEM_VERSION: "10.0.22000.0" CMAKE_GENERATOR: "Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM: "x64" - runner: windows-2019 generator: MSVC platform: "Windows 10" PACKAGE_NAME: "windows-10" - CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_SYSTEM_VERSION: "10.0.19041.0" CMAKE_GENERATOR: "Visual Studio 16 2019" CMAKE_GENERATOR_PLATFORM: "x64" - runner: windows-2022 generator: Clang platform: "Windows 11" PACKAGE_NAME: "windows-11-clang" - CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_SYSTEM_VERSION: "10.0.22000.0" CMAKE_GENERATOR: "Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM: "x64" CMAKE_GENERATOR_TOOLSET: "ClangCL" @@ -74,7 +74,7 @@ jobs: generator: Clang platform: "Windows 10" PACKAGE_NAME: "windows-10-clang" - CMAKE_SYSTEM_VERSION: "10.0.18362.0" + CMAKE_SYSTEM_VERSION: "10.0.19041.0" CMAKE_GENERATOR: "Visual Studio 16 2019" CMAKE_GENERATOR_PLATFORM: "x64" CMAKE_GENERATOR_TOOLSET: "ClangCL" From ba436e406a72bdcb3c7b541a9a9ad24ede271c4c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 11 Jun 2022 05:25:29 +0200 Subject: [PATCH 041/164] ci: Don't fast-fail as some failures are okay --- .github/workflows/main.yml | 2 +- .github/workflows/validate.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba5961b0c2..3030b1e2b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ env: jobs: build: strategy: - fail-fast: true + fail-fast: false matrix: runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ] generator: [ MSVC, GCC, Clang ] diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 41e5970ce0..6f6f6a2a07 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -18,7 +18,7 @@ env: jobs: validation: strategy: - fail-fast: true + fail-fast: false matrix: runner: [ "windows-2022", "windows-2019", "ubuntu-22.04", "ubuntu-20.04" ] CMAKE_BUILD_TYPE: [ "Debug", "Release" ] From 8241a7eb977dafce15399a697eca62133cec3ede Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 13 Jun 2022 03:59:03 +0200 Subject: [PATCH 042/164] ci: Allow failures for experimental CI tests --- .github/workflows/main.yml | 12 ++++++++++++ .github/workflows/validate.yml | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3030b1e2b2..8e747dd0a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,6 +50,7 @@ jobs: include: - runner: windows-2022 generator: MSVC + experimental: true platform: "Windows 11" PACKAGE_NAME: "windows-11" CMAKE_SYSTEM_VERSION: "10.0.22000.0" @@ -57,6 +58,7 @@ jobs: CMAKE_GENERATOR_PLATFORM: "x64" - runner: windows-2019 generator: MSVC + experimental: false platform: "Windows 10" PACKAGE_NAME: "windows-10" CMAKE_SYSTEM_VERSION: "10.0.19041.0" @@ -64,6 +66,7 @@ jobs: CMAKE_GENERATOR_PLATFORM: "x64" - runner: windows-2022 generator: Clang + experimental: true platform: "Windows 11" PACKAGE_NAME: "windows-11-clang" CMAKE_SYSTEM_VERSION: "10.0.22000.0" @@ -72,6 +75,7 @@ jobs: CMAKE_GENERATOR_TOOLSET: "ClangCL" - runner: windows-2019 generator: Clang + experimental: true platform: "Windows 10" PACKAGE_NAME: "windows-10-clang" CMAKE_SYSTEM_VERSION: "10.0.19041.0" @@ -80,6 +84,7 @@ jobs: CMAKE_GENERATOR_TOOLSET: "ClangCL" - runner: ubuntu-22.04 generator: GCC + experimental: false platform: "Ubuntu 22" compiler_c: gcc compiler_cxx: g++ @@ -87,6 +92,7 @@ jobs: CMAKE_GENERATOR: "Ninja" - runner: ubuntu-20.04 generator: GCC + experimental: false platform: "Ubuntu 20" compiler_c: gcc compiler_cxx: g++ @@ -94,6 +100,7 @@ jobs: CMAKE_GENERATOR: "Ninja" - runner: ubuntu-22.04 generator: Clang + experimental: false platform: "Ubuntu 22" compiler_c: clang compiler_cxx: clang++ @@ -101,6 +108,7 @@ jobs: CMAKE_GENERATOR: "Ninja" - runner: ubuntu-20.04 generator: Clang + experimental: false platform: "Ubuntu 20" compiler_c: clang compiler_cxx: clang++ @@ -108,24 +116,28 @@ jobs: CMAKE_GENERATOR: "Ninja" - runner: macos-12 generator: Clang + experimental: true platform: "MacOS 12" PACKAGE_NAME: "macos-12" CMAKE_GENERATOR: "Xcode" CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" - runner: macos-11 generator: Clang + experimental: false platform: "MacOS 11" PACKAGE_NAME: "macos-11" CMAKE_GENERATOR: "Xcode" CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" - runner: macos-10.15 generator: Clang + experimental: true platform: "MacOS 10.15" PACKAGE_NAME: "macos-10.15" CMAKE_GENERATOR: "Xcode" CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" name: "${{ matrix.platform }} (${{ matrix.generator }}, ${{ matrix.CMAKE_BUILD_TYPE }})" runs-on: ${{ matrix.runner }} + continue-on-error: ${{ matrix.experimental }} env: CC: ${{ matrix.compiler_c }} CXX: ${{ matrix.compiler_cxx }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 6f6f6a2a07..1c3ce71eaa 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -24,27 +24,32 @@ jobs: CMAKE_BUILD_TYPE: [ "Debug", "Release" ] include: - runner: "windows-2022" + experimental: true id: "windows-2022-validate" name: "Windows 11" CMAKE_SYSTEM_VERSION: "10.0.18362.0" CMAKE_GENERATOR: "Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM: "x64" - runner: "windows-2019" + experimental: true id: "windows-2019-validate" name: "Windows 10" CMAKE_SYSTEM_VERSION: "10.0.18362.0" CMAKE_GENERATOR: "Visual Studio 16 2019" CMAKE_GENERATOR_PLATFORM: "x64" - runner: "ubuntu-22.04" + experimental: false id: "linux-22.04-validate" name: "Ubuntu 22.04" CMAKE_GENERATOR: "Ninja" - runner: "ubuntu-20.04" + experimental: false id: "linux-20.04-validate" name: "Ubuntu 20.04" CMAKE_GENERATOR: "Ninja" name: "${{ matrix.name }} (${{ matrix.CMAKE_BUILD_TYPE }})" runs-on: ${{ matrix.runner }} + continue-on-error: ${{ matrix.experimental }} env: CC: clang CXX: clang++ @@ -75,7 +80,9 @@ jobs: qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 - name: "Dependencies: Cache" if: github.event_name != 'pull_request' From 9e6171ab0655e4e13bf4500c2233063ff4332cca Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 13 Jun 2022 05:23:15 +0200 Subject: [PATCH 043/164] ci: Upgrade to LLVM/Clang 14.x --- .github/workflows/main.yml | 11 +++++++++-- .github/workflows/validate.yml | 27 ++++++++++++++++++++++----- CMakeLists.txt | 4 ++-- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e747dd0a2..f2cca51cf1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -181,9 +181,14 @@ jobs: if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'Clang' ) shell: bash run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 + sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 - name: 'Dependency: Packages (Linux)' if: startsWith( matrix.runner, 'macos' ) @@ -229,7 +234,9 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \ - -DPACKAGE_PREFIX="build/package" + -DPACKAGE_PREFIX="build/package" \ + -DENABLE_CLANG=FALSE \ + -DENABLE_PROFILING=FALSE - name: "Build (Windows)" if: startsWith( matrix.runner, 'windows' ) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1c3ce71eaa..7d11e3578e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,7 +8,7 @@ on: tags: - '*' -concurrency: +concurrency: group: validate-${{ github.ref }} cancel-in-progress: true @@ -64,8 +64,8 @@ jobs: submodules: recursive fetch-depth: 0 - - name: "Prerequisites: Apt-Get" - if: startsWith( matrix.id, 'linux' ) + - name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)" + if: startsWith( matrix.runner, 'ubuntu' ) shell: bash run: | sudo apt-get -qq update @@ -80,9 +80,25 @@ jobs: qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 + + - name: "Dependency: Clang (Windows)" + if: startsWith( matrix.runner, 'windows' ) + run: | + curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe" + 7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe" + + - name: "Dependency: Clang (Linux)" + if: startsWith( matrix.runner, 'ubuntu' ) + shell: bash + run: | + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 + sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 - name: "Dependencies: Cache" if: github.event_name != 'pull_request' @@ -97,7 +113,8 @@ jobs: run: | cmake -H. -B"build/temp" \ -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ - -DENABLE_CLANG=TRUE + -DENABLE_CLANG=TRUE \ + -DENABLE_PROFILING=TRUE - name: "StreamFX: clang-tidy" continue-on-error: true diff --git a/CMakeLists.txt b/CMakeLists.txt index d67eceae2d..e0c74041f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2213,12 +2213,12 @@ if(T_CHECK AND HAVE_CLANG) ) clang_tidy( TARGETS ${PROJECT_NAME} - VERSION 9.0.0 + VERSION 14.0.0 ) clang_format( TARGETS ${PROJECT_NAME} DEPENDENCY - VERSION 9.0.0 + VERSION 14.0.0 ) endif() From ba15203c67d6b90d7b190876271d11019bfa0ca5 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 13 Jun 2022 06:13:13 +0200 Subject: [PATCH 044/164] gfx/source-texture: Apply formatting as required by clang-format 14 --- source/gfx/gfx-source-texture.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gfx/gfx-source-texture.hpp b/source/gfx/gfx-source-texture.hpp index c460b7a671..e930aff140 100644 --- a/source/gfx/gfx-source-texture.hpp +++ b/source/gfx/gfx-source-texture.hpp @@ -34,11 +34,11 @@ namespace streamfx::gfx { source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent); public /*copy*/: - source_texture(source_texture const& other) = delete; + source_texture(source_texture const& other) = delete; source_texture& operator=(source_texture const& other) = delete; public /*move*/: - source_texture(source_texture&& other) = delete; + source_texture(source_texture&& other) = delete; source_texture& operator=(source_texture&& other) = delete; public: From e9283aec37396bc6105e32d249db357bad7bff24 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 11 Jun 2022 08:02:41 +0200 Subject: [PATCH 045/164] project: Add support for multi stage release cycles To ensure better stability of future releases, we need to adopt multiple stages in the release cycle. As we already label Alpha, Beta, Candidate and Stable differently, simply adopting this classification system already does everything for us. This also allows us to maintain compatibility with the existing system, while offering something new entirely. --- CMakeLists.txt | 204 ++++++++++----- data/locale/en-US.ini | 6 +- source/ui/ui-updater.cpp | 130 +++++----- source/ui/ui-updater.hpp | 14 +- source/updater.cpp | 517 +++++++++++++++++++++------------------ source/updater.hpp | 87 ++++--- templates/version.hpp.in | 3 +- 7 files changed, 549 insertions(+), 412 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0c74041f0..25ae4ece97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,15 +50,88 @@ endif() # Versioning ################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 12) -set(VERSION_PATCH 0) -set(VERSION_TWEAK 0) -set(VERSION_SUFFIX "a1") +# Variables for Versioning +set(VERSION_MAJOR 0) # Major +set(VERSION_MINOR 0) # Minor +set(VERSION_PATCH 0) # Patch +set(VERSION_STAGE "") # Prefix for Tweak, if left empty will assume '.'. +set(VERSION_TWEAK 0) # Tweak set(VERSION_COMMIT "00000000") +# Final format will be [MAJOR].[MINOR].[PATCH]([TYPE][TWEAK])(-[COMMIT]) + +function(parse_version_string) + # Parses a version in the format A.B.C[.|a|b|rc]D-E + cmake_parse_arguments( + PARSE_ARGV 0 + _ARGS + "" + "INPUT;OUTPUT" + "" + ) + + set(_tmp_MAJOR 0) + set(_tmp_MINOR 0) + set(_tmp_PATCH 0) + set(_tmp_STAGE "") + set(_tmp_TWEAK "") + set(_tmp_COMMIT "") + + # Replace separators with list separators + string(REPLACE "-" "." _tmp "${_ARGS_INPUT}") + string(REPLACE "." ";" _tmp "${_tmp}") + + # Parse version differently depending on total string length. + list(LENGTH _tmp _tmp_len) + if(_tmp_len GREATER_EQUAL 1) # A[...] + list(GET _tmp 0 _tmp_MAJOR) + endif() + if(_tmp_len GREATER_EQUAL 2) # A.B[...] + list(GET _tmp 1 _tmp_MINOR) + endif() + if(_tmp_len GREATER_EQUAL 3) # A.B.C[...] + list(GET _tmp 2 _tmp_PATCH) + endif() + if(_tmp_len EQUAL 4) # A.B.C.D or A.B.C-gEEEEEEEE + list(GET _tmp 3 _tmp2) + # No support for '{N,M}' in CMake-Regex! + if(_tmp2 MATCHES "^g[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]") + # A.B.C-gEEEEEEEE + set(_tmp_COMMIT "${_tmp2}") + else() + # It is A.B.C.D + set(_tmp_TWEAK "${_tmp2}") + set(_tmp_STAGE "a") + endif() + elseif(_tmp_len EQUAL 5) # A.B.C.D-gEEEEEEEE + set(_tmp_STAGE "a") + list(GET _tmp 3 _tmp_TWEAK) + list(GET _tmp 4 _tmp_COMMIT) + endif() + if(_tmp_TWEAK STREQUAL "") # Is A.B.C-gEEEEEEEE actually A.B.CxD-gEEEEEEEE? + string(REGEX MATCHALL "^([0-9]+)([_a-c]+)([0-9]+)" T_MATCHES "${_tmp_PATCH}") + if(T_MATCHES) + set(_tmp_PATCH ${CMAKE_MATCH_1}) + set(_tmp_STAGE ${CMAKE_MATCH_2}) + set(_tmp_TWEAK ${CMAKE_MATCH_3}) + endif() + endif() + + set(${_ARGS_OUTPUT}_MAJOR ${_tmp_MAJOR} PARENT_SCOPE) + set(${_ARGS_OUTPUT}_MINOR ${_tmp_MINOR} PARENT_SCOPE) + set(${_ARGS_OUTPUT}_PATCH ${_tmp_PATCH} PARENT_SCOPE) + set(${_ARGS_OUTPUT}_STAGE ${_tmp_STAGE} PARENT_SCOPE) + set(${_ARGS_OUTPUT}_TWEAK ${_tmp_TWEAK} PARENT_SCOPE) + set(${_ARGS_OUTPUT}_COMMIT ${_tmp_COMMIT} PARENT_SCOPE) +endfunction() # Check if we are in a git repository. if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") + set(VERSION_BASE "0.11.0") # Automatic versioning base + set(VERSION_TARGET "0.12.0") # Automatic versioning target + + # Parse target version as it is for output. + parse_version_string(OUTPUT "VERSION" INPUT "${VERSION_TARGET}") + # Try and figure out where git is. find_program(GIT git PATHS @@ -69,12 +142,9 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") ) if(GIT) - set(GIT_RESULT) - set(GIT_OUTPUT) - set(GIT_ERROR) - + # Tweak execute_process( - COMMAND "${GIT}" describe --tags --long --match "[0-9]*.[0-9]*.[0-9]*" --abbrev=8 HEAD + COMMAND "${GIT}" describe --tags --long --match "${VERSION_BASE}" --abbrev=8 HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} RESULT_VARIABLE GIT_RESULT OUTPUT_VARIABLE GIT_OUTPUT @@ -83,29 +153,34 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) - - if(GIT_RESULT EQUAL 0) - string(REPLACE "-" "." GIT_OUTPUT "${GIT_OUTPUT}") - string(REPLACE "." ";" GIT_OUTPUT "${GIT_OUTPUT}") - - # Parse Version - list(GET GIT_OUTPUT 0 VERSION_MAJOR) - list(GET GIT_OUTPUT 1 VERSION_MINOR) - list(GET GIT_OUTPUT 2 VERSION_PATCH) - list(GET GIT_OUTPUT 3 VERSION_TWEAK) - list(GET GIT_OUTPUT 4 VERSION_COMMIT) - - # Patch needs additional parsing. - # This may be a [0-9]*[a-z]*[0-9]+ string. - string(REGEX MATCHALL "^([0-9]+)([a-z]+[0-9]+)?" T_MATCHES "${VERSION_PATCH}") - set(VERSION_PATCH "${CMAKE_MATCH_1}") - if(CMAKE_MATCH_2) - set(VERSION_SUFFIX "${CMAKE_MATCH_2}") - else() - set(VERSION_SUFFIX "") - endif() - else() + if(NOT GIT_RESULT EQUAL 0) message(WARNING "${LOGPREFIX}Failed to detect version, using default instead.") + else() + parse_version_string(OUTPUT "GIT_VERSION" INPUT "${GIT_OUTPUT}") + set(VERSION_STAGE ${GIT_VERSION_STAGE}) + set(VERSION_TWEAK ${GIT_VERSION_TWEAK}) + set(VERSION_COMMIT ${GIT_VERSION_COMMIT}) + endif() + + # Is there a tag on the current commit? + execute_process( + COMMAND "${GIT}" tag "--sort=-v:refname" "--points-at" HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + RESULT_VARIABLE GIT_RESULT + OUTPUT_VARIABLE TAG_OUTPUT + ERROR_VARIABLE GIT_ERROR + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + if((GIT_RESULT EQUAL 0) AND (NOT "${TAG_OUTPUT}" STREQUAL "")) + string(REGEX REPLACE "[\r\n]+.*" "" T_MATCHES "${TAG_OUTPUT}") + parse_version_string(OUTPUT "TAG_VERSION" INPUT "${T_MATCHES}") + set(VERSION_MAJOR "${TAG_VERSION_MAJOR}") + set(VERSION_MINOR "${TAG_VERSION_MINOR}") + set(VERSION_PATCH "${TAG_VERSION_PATCH}") + set(VERSION_STAGE "${TAG_VERSION_STAGE}") + set(VERSION_TWEAK "${TAG_VERSION_TWEAK}") endif() endif() else() @@ -113,42 +188,16 @@ else() endif() # Allow manual overrides of the detected version. -set(${PREFIX}VERSION "" CACHE STRING "Override StreamFX version with this string. Format: Major.Minor.Patch[Suffix][-Tweak[-Commit8c]]") +set(${PREFIX}VERSION "" CACHE STRING "Override StreamFX version with this string. Format: Major.Minor.Patch[Stage][Tweak[-Commit8c]]") if(NOT (${PREFIX}VERSION STREQUAL "")) - string(REPLACE "-" "." T_VERSION "${${PREFIX}VERSION}") - string(REPLACE "." ";" T_VERSION "${${PREFIX}VERSION}") - - list(LENGTH T_VERSION T_VERSIONLEN) - list(GET T_VERSION 0 VERSION_MAJOR) - list(GET T_VERSION 1 VERSION_MINOR) - list(GET T_VERSION 2 VERSION_PATCH) - if(T_VERSIONLEN GREATER_EQUAL 3) - list(GET T_VERSION 3 VERSION_TWEAK) - else() - set(VERSION_BUILD 0) - endif() - if(T_VERSIONLEN GREATER_EQUAL 4) - list(GET T_VERSION 4 VERSION_COMMIT) - else() - set(VERSION_COMMIT "") - endif() - - # Patch needs additional parsing. - # This may be a [0-9]*[a-z]*[0-9]+ string. - string(REGEX MATCHALL "^([0-9]+)([a-z]+[0-9]+)?" T_MATCHES "${VERSION_PATCH}") - set(VERSION_PATCH "${CMAKE_MATCH_1}") - if(CMAKE_MATCH_2) - set(VERSION_SUFFIX "${CMAKE_MATCH_2}") - else() - set(VERSION_SUFFIX "") - endif() + parse_version_string(OUTPUT "VERSION" INPUT "${${PREFIX}VERSION}") endif() # Generate Version String -if(NOT (VERSION_COMMIT STREQUAL "")) - set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}${VERSION_SUFFIX}-${VERSION_COMMIT}") +if(VERSION_COMMIT) + set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_STAGE}${VERSION_TWEAK}-${VERSION_COMMIT}") else() - set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}${VERSION_SUFFIX}") + set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_STAGE}${VERSION_TWEAK}") endif() # Log the detected version. @@ -157,13 +206,40 @@ message(STATUS "${LOGPREFIX}Version ${VERSION_STRING}") ################################################################################ # Project ################################################################################ +set(_VERSION_TWEAK "0${VERSION_TWEAK}") project( StreamFX - VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK} + VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${_VERSION_TWEAK} DESCRIPTION "Additional sources, filters, transitions and encoders for OBS Studio." HOMEPAGE_URL "https://streamfx.xaymar.com/" ) +# Helpers for CI +if(VERSION_STAGE STREQUAL "") + file( + GENERATE + OUTPUT "$/tag_name" + CONTENT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" + TARGET ${PROJECT_NAME} + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE + ) +else() + file( + GENERATE + OUTPUT "$/tag_name" + CONTENT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_STAGE}${VERSION_TWEAK}" + TARGET ${PROJECT_NAME} + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE + ) +endif() +file( + GENERATE + OUTPUT "$/version" + CONTENT "${VERSION_STRING}" + TARGET ${PROJECT_NAME} + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE +) + # Full Project Name set(PROJECT_FULL_NAME "StreamFX (for OBS Studio)") diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index aaa7b062dd..9cb5a8f007 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -59,8 +59,10 @@ UI.Updater.GitHubPermission.Text="In order to provide manual or automated update UI.Updater.Menu.CheckForUpdates="Check for Updates" UI.Updater.Menu.CheckForUpdates.Automatically="Automatically check for Updates" UI.Updater.Menu.Channel="Update Channel" -UI.Updater.Menu.Channel.Release="Release" -UI.Updater.Menu.Channel.Testing="Testing" +UI.Updater.Menu.Channel.Stable="Stable" +UI.Updater.Menu.Channel.Candidate="Candidate" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Alpha" # Encoder/AOM-AV1 Encoder.AOM.AV1="AOM AV1 (direct)" diff --git a/source/ui/ui-updater.cpp b/source/ui/ui-updater.cpp index 1d9499d339..11c2ccf8b1 100644 --- a/source/ui/ui-updater.cpp +++ b/source/ui/ui-updater.cpp @@ -39,8 +39,10 @@ #define D_I18N_MENU_CHECKFORUPDATES "UI.Updater.Menu.CheckForUpdates" #define D_I18N_MENU_CHECKFORUPDATES_AUTOMATICALLY "UI.Updater.Menu.CheckForUpdates.Automatically" #define D_I18N_MENU_CHANNEL "UI.Updater.Menu.Channel" -#define D_I18N_MENU_CHANNEL_RELEASE "UI.Updater.Menu.Channel.Release" -#define D_I18N_MENU_CHANNEL_TESTING "UI.Updater.Menu.Channel.Testing" +#define D_I18N_MENU_CHANNEL_STABLE "UI.Updater.Menu.Channel.Stable" +#define D_I18N_MENU_CHANNEL_CANDIDATE "UI.Updater.Menu.Channel.Candidate" +#define D_I18N_MENU_CHANNEL_BETA "UI.Updater.Menu.Channel.Beta" +#define D_I18N_MENU_CHANNEL_ALPHA "UI.Updater.Menu.Channel.Alpha" #define D_I18N_DIALOG_TITLE "UI.Updater.Dialog.Title" #define D_I18N_GITHUBPERMISSION_TITLE "UI.Updater.GitHubPermission.Title" #define D_I18N_GITHUBPERMISSION_TEXT "UI.Updater.GitHubPermission.Text" @@ -51,6 +53,7 @@ streamfx::ui::updater_dialog::updater_dialog() : QDialog(reinterpret_cast buf; - if (current.version_type) { - buf.resize(static_cast(snprintf(nullptr, 0, "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, - current.version_major, current.version_minor, current.version_patch, - ¤t.version_type, current.version_index)) - + 1); - snprintf(buf.data(), buf.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, current.version_major, - current.version_minor, current.version_patch, ¤t.version_type, current.version_index); - } else { - buf.resize( - static_cast(snprintf(nullptr, 0, "%" PRIu16 ".%" PRIu16 ".%" PRIu16, current.version_major, - current.version_minor, current.version_patch)) - + 1); - snprintf(buf.data(), buf.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16, current.version_major, - current.version_minor, current.version_patch); - } - currentVersion->setText(QString::fromUtf8(buf.data())); - } + currentVersion->setText(QString::fromStdString(static_cast(current))); + latestVersion->setText(QString::fromStdString(static_cast(update))); { - std::vector buf; - if (update.version_type) { - buf.resize(static_cast(snprintf(nullptr, 0, "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, - update.version_major, update.version_minor, update.version_patch, - &update.version_type, update.version_index)) - + 1); - snprintf(buf.data(), buf.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, update.version_major, - update.version_minor, update.version_patch, &update.version_type, update.version_index); - } else { - buf.resize(static_cast(snprintf(nullptr, 0, "%" PRIu16 ".%" PRIu16 ".%" PRIu16, - update.version_major, update.version_minor, update.version_patch)) - + 1); - snprintf(buf.data(), buf.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16, update.version_major, - update.version_minor, update.version_patch); - } - latestVersion->setText(QString::fromUtf8(buf.data())); - - { - std::vector buf2; - buf2.resize(static_cast(snprintf(nullptr, 0, D_TRANSLATE(D_I18N_DIALOG_TITLE), buf.data())) + 1); - snprintf(buf2.data(), buf2.size(), D_TRANSLATE(D_I18N_DIALOG_TITLE), buf.data()); - setWindowTitle(QString::fromUtf8(buf2.data())); - } + std::string buf = latestVersion->text().toStdString(); + std::vector buf2; + buf2.resize(static_cast(snprintf(nullptr, 0, D_TRANSLATE(D_I18N_DIALOG_TITLE), buf.data())) + 1); + snprintf(buf2.data(), buf2.size(), D_TRANSLATE(D_I18N_DIALOG_TITLE), buf.data()); + setWindowTitle(QString::fromUtf8(buf2.data())); } _update_url = QUrl(QString::fromStdString(update.url)); @@ -122,16 +90,19 @@ void streamfx::ui::updater_dialog::on_ok() { QDesktopServices::openUrl(_update_url); hide(); + accept(); } void streamfx::ui::updater_dialog::on_cancel() { hide(); + reject(); } streamfx::ui::updater::updater(QMenu* menu) : _updater(), _dialog(nullptr), _gdpr(nullptr), _cfu(nullptr), _cfu_auto(nullptr), _channel(nullptr), - _channel_menu(nullptr), _channel_stable(nullptr), _channel_preview(nullptr), _channel_group(nullptr) + _channel_menu(nullptr), _channel_stable(nullptr), _channel_candidate(nullptr), _channel_beta(nullptr), + _channel_alpha(nullptr), _channel_group(nullptr) { // Create dialog. _dialog = new updater_dialog(); @@ -154,17 +125,27 @@ streamfx::ui::updater::updater(QMenu* menu) _channel_menu = menu->addMenu(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL))); _channel_menu->menuAction()->setMenuRole(QAction::NoRole); - _channel_stable = _channel_menu->addAction(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL_RELEASE))); + _channel_stable = _channel_menu->addAction(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL_STABLE))); _channel_stable->setMenuRole(QAction::NoRole); _channel_stable->setCheckable(true); - _channel_preview = _channel_menu->addAction(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL_TESTING))); - _channel_preview->setMenuRole(QAction::NoRole); - _channel_preview->setCheckable(true); + _channel_candidate = _channel_menu->addAction(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL_CANDIDATE))); + _channel_candidate->setMenuRole(QAction::NoRole); + _channel_candidate->setCheckable(true); + + _channel_beta = _channel_menu->addAction(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL_BETA))); + _channel_beta->setMenuRole(QAction::NoRole); + _channel_beta->setCheckable(true); + + _channel_alpha = _channel_menu->addAction(QString::fromUtf8(D_TRANSLATE(D_I18N_MENU_CHANNEL_ALPHA))); + _channel_alpha->setMenuRole(QAction::NoRole); + _channel_alpha->setCheckable(true); _channel_group = new QActionGroup(_channel_menu); _channel_group->addAction(_channel_stable); - _channel_group->addAction(_channel_preview); + _channel_group->addAction(_channel_candidate); + _channel_group->addAction(_channel_beta); + _channel_group->addAction(_channel_alpha); connect(_channel_group, &QActionGroup::triggered, this, &streamfx::ui::updater::on_channel_group_triggered); } @@ -188,8 +169,8 @@ streamfx::ui::updater::updater(QMenu* menu) std::bind(&streamfx::ui::updater::on_updater_refreshed, this, std::placeholders::_1)); // Sync with updater information. - emit autoupdate_changed(_updater->automation()); - emit channel_changed(_updater->channel()); + emit autoupdate_changed(_updater->is_automated()); + emit channel_changed(_updater->get_channel()); } } @@ -200,7 +181,7 @@ void streamfx::ui::updater::on_updater_automation_changed(streamfx::updater&, bo emit autoupdate_changed(value); } -void streamfx::ui::updater::on_updater_channel_changed(streamfx::updater&, streamfx::update_channel channel) +void streamfx::ui::updater::on_updater_channel_changed(streamfx::updater&, streamfx::version_stage channel) { emit channel_changed(channel); } @@ -209,7 +190,7 @@ void streamfx::ui::updater::on_updater_refreshed(streamfx::updater&) { emit check_active(false); - if (!_updater->have_update()) + if (!_updater->is_update_available()) return; emit update_detected(); @@ -217,8 +198,8 @@ void streamfx::ui::updater::on_updater_refreshed(streamfx::updater&) void streamfx::ui::updater::obs_ready() { - if (_updater->automation()) { - if (_updater->gdpr()) { + if (_updater->is_automated()) { + if (_updater->is_data_sharing_allowed()) { _updater->refresh(); } else { create_gdpr_box(); @@ -227,11 +208,17 @@ void streamfx::ui::updater::obs_ready() } } -void streamfx::ui::updater::on_channel_changed(streamfx::update_channel channel) +void streamfx::ui::updater::on_channel_changed(streamfx::version_stage ch) { - bool is_stable = channel == streamfx::update_channel::RELEASE; - _channel_stable->setChecked(is_stable); - _channel_preview->setChecked(!is_stable); + QSignalBlocker bgroup(_channel_group); + QSignalBlocker bs(_channel_stable); + QSignalBlocker bc(_channel_candidate); + QSignalBlocker bb(_channel_beta); + QSignalBlocker ba(_channel_alpha); + _channel_stable->setChecked(ch == streamfx::version_stage::STABLE); + _channel_candidate->setChecked(ch == streamfx::version_stage::CANDIDATE); + _channel_beta->setChecked(ch == streamfx::version_stage::BETA); + _channel_alpha->setChecked(ch == streamfx::version_stage::ALPHA); } void streamfx::ui::updater::on_update_detected() @@ -241,24 +228,25 @@ void streamfx::ui::updater::on_update_detected() void streamfx::ui::updater::on_autoupdate_changed(bool enabled) { + QSignalBlocker blocker(_cfu_auto); _cfu_auto->setChecked(enabled); } void streamfx::ui::updater::on_gdpr_button(QAbstractButton* btn) { if (_gdpr->standardButton(btn) == QMessageBox::Ok) { - _updater->set_gdpr(true); + _updater->set_data_sharing_allowed(true); emit check_active(true); _updater->refresh(); } else { - _updater->set_gdpr(false); + _updater->set_data_sharing_allowed(false); _updater->set_automation(false); } } void streamfx::ui::updater::on_cfu_triggered(bool) { - if (!_updater->gdpr()) { + if (!_updater->is_data_sharing_allowed()) { create_gdpr_box(); _gdpr->exec(); } else { @@ -274,10 +262,14 @@ void streamfx::ui::updater::on_cfu_auto_toggled(bool flag) void streamfx::ui::updater::on_channel_group_triggered(QAction* action) { - if (action == _channel_stable) { - _updater->set_channel(update_channel::RELEASE); + if (action == _channel_alpha) { + _updater->set_channel(streamfx::version_stage::ALPHA); + } else if (action == _channel_beta) { + _updater->set_channel(streamfx::version_stage::BETA); + } else if (action == _channel_candidate) { + _updater->set_channel(streamfx::version_stage::CANDIDATE); } else { - _updater->set_channel(update_channel::TESTING); + _updater->set_channel(streamfx::version_stage::STABLE); } } @@ -300,7 +292,9 @@ void streamfx::ui::updater::on_check_active(bool active) { _cfu->setEnabled(!active); _channel_group->setEnabled(!active); - _channel_preview->setEnabled(!active); + _channel_alpha->setEnabled(!active); + _channel_beta->setEnabled(!active); + _channel_candidate->setEnabled(!active); _channel_stable->setEnabled(!active); _channel_menu->setEnabled(!active); } diff --git a/source/ui/ui-updater.hpp b/source/ui/ui-updater.hpp index 77cefb35d7..9d60077258 100644 --- a/source/ui/ui-updater.hpp +++ b/source/ui/ui-updater.hpp @@ -36,7 +36,7 @@ #include #include "ui_updater.h" -Q_DECLARE_METATYPE(streamfx::update_channel); +Q_DECLARE_METATYPE(::streamfx::version_stage); #ifdef _MSC_VER #pragma warning(pop) @@ -53,7 +53,7 @@ namespace streamfx::ui { updater_dialog(); ~updater_dialog(); - void show(streamfx::update_info current, streamfx::update_info update); + void show(streamfx::version_info current, streamfx::version_info update); void hide(); public slots: @@ -77,7 +77,9 @@ namespace streamfx::ui { QAction* _channel; QMenu* _channel_menu; QAction* _channel_stable; - QAction* _channel_preview; + QAction* _channel_candidate; + QAction* _channel_beta; + QAction* _channel_alpha; QActionGroup* _channel_group; public: @@ -87,7 +89,7 @@ namespace streamfx::ui { void create_gdpr_box(); void on_updater_automation_changed(streamfx::updater&, bool); - void on_updater_channel_changed(streamfx::updater&, streamfx::update_channel); + void on_updater_channel_changed(streamfx::updater&, streamfx::version_stage); void on_updater_refreshed(streamfx::updater&); void obs_ready(); @@ -96,7 +98,7 @@ namespace streamfx::ui { ; // Needed by some linters. void autoupdate_changed(bool); - void channel_changed(streamfx::update_channel); + void channel_changed(streamfx::version_stage); void update_detected(); void check_active(bool); @@ -105,7 +107,7 @@ namespace streamfx::ui { // Internal void on_autoupdate_changed(bool); - void on_channel_changed(streamfx::update_channel); + void on_channel_changed(streamfx::version_stage); void on_update_detected(); void on_check_active(bool); diff --git a/source/updater.cpp b/source/updater.cpp index c63e810fae..932a9d8bbe 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -20,7 +20,9 @@ #include "updater.hpp" #include "version.hpp" +#include #include +#include #include #include "configuration.hpp" #include "plugin.hpp" @@ -45,179 +47,308 @@ // - Move 'autoupdater.last_checked_at' to out of the configuration. // - Figure out if nightly updates are viable at all. -#define ST_CFG_GDPR "updater.gdpr" +#define ST_CFG_DATASHARING "updater.datasharing" #define ST_CFG_AUTOMATION "updater.automation" #define ST_CFG_CHANNEL "updater.channel" #define ST_CFG_LASTCHECKEDAT "updater.lastcheckedat" -void streamfx::to_json(nlohmann::json& json, const update_info& info) +streamfx::version_stage streamfx::stage_from_string(std::string_view str) +{ + if (str == "a") { + return version_stage::ALPHA; + } else if (str == "b") { + return version_stage::BETA; + } else if (str == "c") { + return version_stage::CANDIDATE; + } else { + return version_stage::STABLE; + } +} + +std::string_view streamfx::stage_to_string(version_stage t) +{ + switch (t) { + case version_stage::ALPHA: + return "a"; + case version_stage::BETA: + return "b"; + case version_stage::CANDIDATE: + return "c"; + default: + case version_stage::STABLE: + return "."; + } +} + +void streamfx::to_json(nlohmann::json& json, const version_stage& stage) +{ + json = stage_to_string(stage); +} + +void streamfx::from_json(const nlohmann::json& json, version_stage& stage) +{ + stage = stage_from_string(json.get()); +} + +streamfx::version_info::version_info() + : major(0), minor(0), patch(0), tweak(0), stage(version_stage::STABLE), url(""), name("") +{} + +streamfx::version_info::version_info(const std::string text) : version_info() +{ + // text can be: + // 0.0.0 (Stable) + // 0.0.0a0 (Testing) + // 0.0.0b0 (Testing) + // 0.0.0c0 (Testing) + // 0.0.0_0 (Development) + static const std::regex re_version( + "([0-9]+)\\.([0-9]+)\\.([0-9]+)(([\\._abc]{1,1})([0-9]+|)|)(-g([0-9a-fA-F]{8,8})|)"); + std::smatch matches; + if (std::regex_match(text, matches, re_version, + std::regex_constants::match_any | std::regex_constants::match_continuous)) { + major = static_cast(strtoul(matches[1].str().c_str(), nullptr, 10)); + minor = static_cast(strtoul(matches[2].str().c_str(), nullptr, 10)); + patch = static_cast(strtoul(matches[3].str().c_str(), nullptr, 10)); + if (matches.size() >= 5) { + stage = stage_from_string(matches[5].str()); + tweak = static_cast(strtoul(matches[6].str().c_str(), nullptr, 10)); + } + } else { + throw std::invalid_argument("Provided string is not a version."); + } +} + +void streamfx::to_json(nlohmann::json& json, const version_info& info) { auto version = nlohmann::json::object(); - version["major"] = info.version_major; - version["minor"] = info.version_minor; - version["patch"] = info.version_patch; - if (info.version_type) - version["alpha"] = info.version_type == 'a' ? true : false; - version["index"] = info.version_index; + version["major"] = info.major; + version["minor"] = info.minor; + version["patch"] = info.patch; + version["type"] = info.stage; + version["tweak"] = info.tweak; json["version"] = version; - json["preview"] = info.channel == update_channel::TESTING; json["url"] = info.url; json["name"] = info.name; } -void streamfx::from_json(const nlohmann::json& json, update_info& info) +void streamfx::from_json(const nlohmann::json& json, version_info& info) { - if (json.find("html_url") != json.end()) { + if (json.find("html_url") == json.end()) { + auto version = json.at("version"); + info.major = version.at("major").get(); + info.minor = version.at("minor").get(); + info.patch = version.at("patch").get(); + info.stage = version.at("type"); + info.tweak = version.at("tweak").get(); + info.url = json.at("url").get(); + info.name = json.at("name").get(); + } else { // This is a response from GitHub. // Retrieve entries from the release object. auto entry_tag_name = json.find("tag_name"); auto entry_name = json.find("name"); auto entry_url = json.find("html_url"); - auto entry_preview = json.find("prerelease"); - if ((entry_tag_name == json.end()) || (entry_name == json.end()) || (entry_url == json.end()) - || (entry_preview == json.end())) { + if ((entry_tag_name == json.end()) || (entry_name == json.end()) || (entry_url == json.end())) { throw std::runtime_error("JSON is missing one or more required keys."); } - // Initialize update information. - info.channel = entry_preview->get() ? update_channel::TESTING : update_channel::RELEASE; - info.url = entry_url->get(); - info.name = entry_name->get(); - - // Parse the tag name as SemVer (A.B.C) - { - std::string tag_name = entry_tag_name->get(); - - size_t dot_1 = tag_name.find_first_of(".", 0) + 1; - info.version_major = static_cast(strtoul(&tag_name.at(0), nullptr, 10)); - if (dot_1 < tag_name.size()) { - info.version_minor = static_cast(strtoul(&tag_name.at(dot_1), nullptr, 10)); - } - - char* endptr = nullptr; - size_t dot_2 = tag_name.find_first_of(".", dot_1) + 1; - if (dot_2 < tag_name.size()) { - info.version_patch = static_cast(strtoul(&tag_name.at(dot_2), &endptr, 10)); - } - - // Check if there's data following the SemVer structure. (A.B.CdE) - if ((endptr != nullptr) && (endptr < (tag_name.data() + tag_name.size()))) { - size_t last_num = static_cast(endptr - tag_name.data()) + 1; - info.version_type = *endptr; - if (last_num < tag_name.size()) - info.version_index = static_cast(strtoul(&tag_name.at(last_num), nullptr, 10)); - } else { - info.version_type = 0; - info.version_index = 0; - } - } - } else { - auto version = json.at("version"); - info.version_major = version.at("major").get(); - info.version_minor = version.at("minor").get(); - info.version_patch = version.at("patch").get(); - if (version.find("type") != version.end()) - info.version_type = version.at("alpha").get() ? 'a' : 'b'; - info.version_index = version.at("index").get(); - info.channel = json.at("preview").get() ? update_channel::TESTING : update_channel::RELEASE; - info.url = json.at("url").get(); - info.name = json.at("name").get(); + // Parse the information. + std::string tag_name = entry_tag_name->get(); + info = {tag_name}; + info.url = entry_url->get(); + info.name = entry_name->get(); } } -bool streamfx::update_info::is_newer(update_info& other) +bool streamfx::version_info::is_older_than(const version_info other) { + // 'true' if other is newer, otherwise false. + // 1. Compare Major version: // A. Ours is greater: Remote is older. // B. Theirs is greater: Remote is newer. // C. Continue the check. - if (version_major > other.version_major) + if (major > other.major) return false; - if (version_major < other.version_major) + if (major < other.major) return true; // 2. Compare Minor version: // A. Ours is greater: Remote is older. // B. Theirs is greater: Remote is newer. // C. Continue the check. - if (version_minor > other.version_minor) + if (minor > other.minor) return false; - if (version_minor < other.version_minor) + if (minor < other.minor) return true; // 3. Compare Patch version: // A. Ours is greater: Remote is older. // B. Theirs is greater: Remote is newer. // C. Continue the check. - if (version_patch > other.version_patch) + if (patch > other.patch) return false; - if (version_patch < other.version_patch) + if (patch < other.patch) return true; // 4. Compare Type: - // A. Ours empty: Remote is older. - // B. Theirs empty: Remote is newer. + // A. Outs is smaller: Remote is older. + // B. Theirs is smaller: Remote is newer. // C. Continue the check. - // A automatically implies that ours is not empty for B. A&B combined imply that both are not empty for step 5. - if (version_type == 0) + if (stage < other.stage) return false; - if (other.version_type == 0) + if (stage > other.stage) return true; - // 5. Compare Type value: - // A. Ours is greater: Remote is older. - // B. Theirs is greater: Remote is newer. - // C. Continue the check. - if (version_type > other.version_type) - return false; - if (version_type < other.version_type) - return true; - - // 6. Compare Index: + // 5. Compare Tweak: // A. Ours is greater or equal: Remote is older or identical. // B. Remote is newer - if (version_index >= other.version_index) + if (tweak >= other.tweak) return false; return true; } +streamfx::version_info::operator std::string() +{ + std::vector buffer(25, 0); + if (stage != version_stage::STABLE) { + auto types = stage_to_string(stage); + size_t len = snprintf(buffer.data(), buffer.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, major, + minor, patch, types.data(), tweak); + return std::string(buffer.data(), buffer.data() + len); + } else { + size_t len = snprintf(buffer.data(), buffer.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16, major, minor, patch); + return std::string(buffer.data(), buffer.data() + len); + } +} + void streamfx::updater::task(streamfx::util::threadpool_data_t) try { - { - std::vector buffer; - task_query(buffer); - task_parse(buffer); - } + auto query_fn = [this](std::vector& buffer) { + static constexpr std::string_view ST_API_URL = + "https://api.github.com/repos/Xaymar/obs-StreamFX/releases?per_page=25&page=1"; + + streamfx::util::curl curl; + size_t buffer_offset = 0; + + // Set headers (User-Agent is needed so Github can contact us!). + curl.set_header("User-Agent", "StreamFX Updater v" STREAMFX_VERSION_STRING); + curl.set_header("Accept", "application/vnd.github.v3+json"); + + // Set up request. + curl.set_option(CURLOPT_HTTPGET, true); // GET + curl.set_option(CURLOPT_POST, false); // Not POST + curl.set_option(CURLOPT_URL, ST_API_URL); + curl.set_option(CURLOPT_TIMEOUT, 30); // 10s until we fail. + + // Callbacks + curl.set_write_callback([this, &buffer, &buffer_offset](void* data, size_t s1, size_t s2) { + size_t size = s1 * s2; + if (buffer.size() < (size + buffer_offset)) + buffer.resize(buffer_offset + size); + + memcpy(buffer.data() + buffer_offset, data, size); + buffer_offset += size; + + return s1 * s2; + }); + //std::bind(&streamfx::updater::task_write_cb, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3) + + // Clear any unknown data and reserve 64KiB of memory. + buffer.clear(); + buffer.reserve(0xFFFF); + + // Finally, execute the request. + D_LOG_DEBUG("Querying for latest releases...", ""); + if (CURLcode res = curl.perform(); res != CURLE_OK) { + D_LOG_ERROR("Performing query failed with error: %s", curl_easy_strerror(res)); + throw std::runtime_error(curl_easy_strerror(res)); + } -#ifdef _DEBUG - { - std::lock_guard lock(_lock); - nlohmann::json current = _current_info; - nlohmann::json stable = _release_info; - nlohmann::json preview = _testing_info; - - D_LOG_DEBUG("Current Version: %s", current.dump().c_str()); - D_LOG_DEBUG("Stable Version: %s", stable.dump().c_str()); - D_LOG_DEBUG("Preview Version: %s", preview.dump().c_str()); - } -#endif + int32_t status_code = 0; + if (CURLcode res = curl.get_info(CURLINFO_HTTP_CODE, status_code); res != CURLE_OK) { + D_LOG_ERROR("Retrieving status code failed with error: %s", curl_easy_strerror(res)); + throw std::runtime_error(curl_easy_strerror(res)); + } + D_LOG_DEBUG("API returned status code %d.", status_code); + + if (status_code != 200) { + D_LOG_ERROR("API returned unexpected status code %d.", status_code); + throw std::runtime_error("Request failed due to one or more reasons."); + } + }; + auto parse_fn = [this](nlohmann::json json) { + // Check if it was parsed as an object. + if (json.type() != nlohmann::json::value_t::array) { + throw std::runtime_error("Invalid response from API."); + } + + // Decide on the latest version for all update channels. + std::lock_guard lock(_lock); + _updates.clear(); + for (auto obj : json) { + try { + auto info = obj.get(); + + switch (info.stage) { + case version_stage::STABLE: + if (get_update_info(version_stage::STABLE).is_older_than(info)) { + _updates.emplace(version_stage::STABLE, info); + } + [[fallthrough]]; + case version_stage::CANDIDATE: + if (get_update_info(version_stage::CANDIDATE).is_older_than(info)) { + _updates.emplace(version_stage::CANDIDATE, info); + } + [[fallthrough]]; + case version_stage::BETA: + if (get_update_info(version_stage::BETA).is_older_than(info)) { + _updates.emplace(version_stage::BETA, info); + } + [[fallthrough]]; + case version_stage::ALPHA: + if (get_update_info(version_stage::ALPHA).is_older_than(info)) { + _updates.emplace(version_stage::ALPHA, info); + } + } + + } catch (const std::exception& ex) { + D_LOG_DEBUG("Failed to parse entry, error: %s", ex.what()); + } + } + }; - // Log that we have a potential update. - if (have_update()) { - auto info = get_update_info(); + { // Query and parse the response. + nlohmann::json json; - if (info.version_type) { - D_LOG_INFO("Update to version %d.%d.%d%.1s%d is available at \"%s\".", info.version_major, - info.version_minor, info.version_patch, &info.version_type, info.version_index, - info.url.c_str()); + // Query the API or parse a crafted response. + auto debug_path = streamfx::config_file_path("github_release_query_response.json"); + if (std::filesystem::exists(debug_path)) { + std::ifstream fs{debug_path}; + json = nlohmann::json::parse(fs); + fs.close(); } else { - D_LOG_INFO("Update to version %d.%d.%d is available at \"%s\".", info.version_major, info.version_minor, - info.version_patch, info.url.c_str()); + std::vector buffer; + query_fn(buffer); + json = nlohmann::json::parse(buffer.begin(), buffer.end()); } - } else { - D_LOG_DEBUG("No update available.", ""); + + // Parse the JSON response from the API. + parse_fn(json); + } + + // Print all update information to the log file. + D_LOG_INFO("Current Version: %s", static_cast(_current_info).c_str()); + D_LOG_INFO("Latest Stable Version: %s", static_cast(get_update_info(version_stage::STABLE)).c_str()); + D_LOG_INFO("Latest Candidate Version: %s", + static_cast(get_update_info(version_stage::CANDIDATE)).c_str()); + D_LOG_INFO("Latest Beta Version: %s", static_cast(get_update_info(version_stage::BETA)).c_str()); + D_LOG_INFO("Latest Alpha Version: %s", static_cast(get_update_info(version_stage::ALPHA)).c_str()); + if (is_update_available()) { + D_LOG_INFO("Update is available.", ""); } // Notify listeners of the update. @@ -228,91 +359,6 @@ try { events.error.call(*this, message); } -void streamfx::updater::task_query(std::vector& buffer) -{ - static constexpr std::string_view ST_API_URL = "https://api.github.com/repos/Xaymar/obs-StreamFX/releases"; - - streamfx::util::curl curl; - size_t buffer_offset = 0; - - // Set headers (User-Agent is needed so Github can contact us!). - curl.set_header("User-Agent", "StreamFX Updater v" STREAMFX_VERSION_STRING); - curl.set_header("Accept", "application/vnd.github.v3+json"); - - // Set up request. - curl.set_option(CURLOPT_HTTPGET, true); // GET - curl.set_option(CURLOPT_POST, false); // Not POST - curl.set_option(CURLOPT_URL, ST_API_URL); - curl.set_option(CURLOPT_TIMEOUT, 10); // 10s until we fail. - - // Callbacks - curl.set_write_callback([this, &buffer, &buffer_offset](void* data, size_t s1, size_t s2) { - size_t size = s1 * s2; - if (buffer.size() < (size + buffer_offset)) - buffer.resize(buffer_offset + size); - - memcpy(buffer.data() + buffer_offset, data, size); - buffer_offset += size; - - return s1 * s2; - }); - //std::bind(&streamfx::updater::task_write_cb, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3) - - // Clear any unknown data and reserve 64KiB of memory. - buffer.clear(); - buffer.reserve(0xFFFF); - - // Finally, execute the request. - D_LOG_DEBUG("Querying for latest releases...", ""); - if (CURLcode res = curl.perform(); res != CURLE_OK) { - D_LOG_ERROR("Performing query failed with error: %s", curl_easy_strerror(res)); - throw std::runtime_error(curl_easy_strerror(res)); - } - - int32_t status_code = 0; - if (CURLcode res = curl.get_info(CURLINFO_HTTP_CODE, status_code); res != CURLE_OK) { - D_LOG_ERROR("Retrieving status code failed with error: %s", curl_easy_strerror(res)); - throw std::runtime_error(curl_easy_strerror(res)); - } - D_LOG_DEBUG("API returned status code %d.", status_code); - - if (status_code != 200) { - D_LOG_ERROR("API returned unexpected status code %d.", status_code); - throw std::runtime_error("Request failed due to one or more reasons."); - } -} - -void streamfx::updater::task_parse(std::vector& buffer) -{ - // Parse the JSON response from the API. - nlohmann::json json = nlohmann::json::parse(buffer.begin(), buffer.end()); - - // Check if it was parsed as an object. - if (json.type() != nlohmann::json::value_t::array) { - throw std::runtime_error("Response is not a JSON array."); - } - - // Iterate over all entries. - std::lock_guard lock(_lock); - for (auto obj : json) { - try { - auto info = obj.get(); - - if (info.channel == update_channel::RELEASE) { - if (_release_info.is_newer(info)) - _release_info = info; - if (_testing_info.is_newer(info)) - _testing_info = info; - } else { - if (_testing_info.is_newer(info)) - _testing_info = info; - } - } catch (const std::exception& ex) { - D_LOG_DEBUG("Failed to parse entry, error: %s", ex.what()); - } - } -} - bool streamfx::updater::can_check() { #ifdef _DEBUG @@ -326,16 +372,16 @@ bool streamfx::updater::can_check() void streamfx::updater::load() { - std::lock_guard lock(_lock); + std::lock_guard lock(_lock); if (auto config = streamfx::configuration::instance(); config) { auto dataptr = config->get(); - if (obs_data_has_user_value(dataptr.get(), ST_CFG_GDPR)) - _gdpr = obs_data_get_bool(dataptr.get(), ST_CFG_GDPR); + if (obs_data_has_user_value(dataptr.get(), ST_CFG_DATASHARING)) + _data_sharing_allowed = obs_data_get_bool(dataptr.get(), ST_CFG_DATASHARING); if (obs_data_has_user_value(dataptr.get(), ST_CFG_AUTOMATION)) _automation = obs_data_get_bool(dataptr.get(), ST_CFG_AUTOMATION); if (obs_data_has_user_value(dataptr.get(), ST_CFG_CHANNEL)) - _channel = static_cast(obs_data_get_int(dataptr.get(), ST_CFG_CHANNEL)); + _channel = static_cast(obs_data_get_int(dataptr.get(), ST_CFG_CHANNEL)); if (obs_data_has_user_value(dataptr.get(), ST_CFG_LASTCHECKEDAT)) _lastcheckedat = std::chrono::seconds(obs_data_get_int(dataptr.get(), ST_CFG_LASTCHECKEDAT)); } @@ -346,7 +392,7 @@ void streamfx::updater::save() if (auto config = streamfx::configuration::instance(); config) { auto dataptr = config->get(); - obs_data_set_bool(dataptr.get(), ST_CFG_GDPR, _gdpr); + obs_data_set_bool(dataptr.get(), ST_CFG_DATASHARING, _data_sharing_allowed); obs_data_set_bool(dataptr.get(), ST_CFG_AUTOMATION, _automation); obs_data_set_int(dataptr.get(), ST_CFG_CHANNEL, static_cast(_channel)); obs_data_set_int(dataptr.get(), ST_CFG_LASTCHECKEDAT, static_cast(_lastcheckedat.count())); @@ -356,24 +402,16 @@ void streamfx::updater::save() streamfx::updater::updater() : _lock(), _task(), - _gdpr(false), _automation(true), _channel(update_channel::RELEASE), _lastcheckedat(), + _data_sharing_allowed(false), _automation(true), _channel(version_stage::STABLE), _lastcheckedat(), - _current_info(), _release_info(), _testing_info(), _dirty(false) + _current_info(), _updates(), _dirty(false) { // Load information from configuration. load(); // Build current version information. try { - _current_info.version_major = STREAMFX_VERSION_MAJOR; - _current_info.version_minor = STREAMFX_VERSION_MINOR; - _current_info.version_patch = STREAMFX_VERSION_PATCH; - _current_info.channel = _channel; - std::string suffix = STREAMFX_VERSION_SUFFIX; - if (suffix.length()) { - _current_info.version_type = suffix.at(0); - _current_info.version_index = static_cast(strtoul(&suffix.at(1), nullptr, 10)); - } + _current_info = {STREAMFX_VERSION_STRING}; } catch (...) { D_LOG_ERROR("Failed to parse current version information, results may be inaccurate.", ""); } @@ -384,26 +422,26 @@ streamfx::updater::~updater() save(); } -bool streamfx::updater::gdpr() +bool streamfx::updater::is_data_sharing_allowed() { - return _gdpr; + return _data_sharing_allowed; } -void streamfx::updater::set_gdpr(bool value) +void streamfx::updater::set_data_sharing_allowed(bool value) { - _dirty = true; - _gdpr = value; - events.gdpr_changed(*this, _gdpr); + _dirty = true; + _data_sharing_allowed = value; + events.gdpr_changed(*this, _data_sharing_allowed); { - std::lock_guard lock(_lock); + std::lock_guard lock(_lock); save(); } - D_LOG_INFO("User %s the processing of data.", _gdpr ? "allowed" : "disallowed"); + D_LOG_INFO("User %s the processing of data.", _data_sharing_allowed ? "allowed" : "disallowed"); } -bool streamfx::updater::automation() +bool streamfx::updater::is_automated() { return _automation; } @@ -414,21 +452,21 @@ void streamfx::updater::set_automation(bool value) events.automation_changed(*this, _automation); { - std::lock_guard lock(_lock); + std::lock_guard lock(_lock); save(); } D_LOG_INFO("Automatic checks at launch are now %s.", value ? "enabled" : "disabled"); } -streamfx::update_channel streamfx::updater::channel() +streamfx::version_stage streamfx::updater::get_channel() { return _channel; } -void streamfx::updater::set_channel(update_channel value) +void streamfx::updater::set_channel(version_stage value) { - std::lock_guard lock(_lock); + std::lock_guard lock(_lock); _dirty = true; _channel = value; @@ -436,17 +474,17 @@ void streamfx::updater::set_channel(update_channel value) save(); - D_LOG_INFO("Update channel changed to %s.", value == update_channel::RELEASE ? "Release" : "Testing"); + D_LOG_INFO("Update channel changed to '%s'.", stage_to_string(value).data()); } void streamfx::updater::refresh() { - if (!_task.expired() || !gdpr()) { + if (!_task.expired() || !is_data_sharing_allowed()) { return; } if (can_check()) { - std::lock_guard lock(_lock); + std::lock_guard lock(_lock); // Update last checked time. _lastcheckedat = @@ -460,25 +498,34 @@ void streamfx::updater::refresh() } } -bool streamfx::updater::have_update() +bool streamfx::updater::is_update_available() +{ + return _current_info.is_older_than(get_update_info()); +} + +bool streamfx::updater::is_update_available(version_stage channel) { - auto info = get_update_info(); - return _current_info.is_newer(info); + return _current_info.is_older_than(get_update_info(channel)); } -streamfx::update_info streamfx::updater::get_current_info() +streamfx::version_info streamfx::updater::get_current_info() { return _current_info; } -streamfx::update_info streamfx::updater::get_update_info() +streamfx::version_info streamfx::updater::get_update_info() { - std::lock_guard lock(_lock); - update_info info = _release_info; - if (info.is_newer(_testing_info) && (_channel == update_channel::TESTING)) - info = _testing_info; + return get_update_info(_channel); +} - return info; +streamfx::version_info streamfx::updater::get_update_info(version_stage channel) +{ + std::lock_guard lock(_lock); + if (auto iter = _updates.find(channel); iter != _updates.end()) { + return iter->second; + } else { + return {}; + } } std::shared_ptr streamfx::updater::instance() diff --git a/source/updater.hpp b/source/updater.hpp index 45e5c6f761..89fc27d01a 100644 --- a/source/updater.hpp +++ b/source/updater.hpp @@ -21,54 +21,65 @@ #pragma once #include #include +#include #include #include "util/util-curl.hpp" #include "util/util-event.hpp" #include "util/util-threadpool.hpp" namespace streamfx { - enum class update_channel { - RELEASE, - TESTING, + enum class version_stage : uint8_t { + STABLE, // A.B.C + CANDIDATE, // A.B.CcD + BETA, // A.B.CbD + ALPHA, // A.B.CaD }; + version_stage stage_from_string(std::string_view str); + std::string_view stage_to_string(version_stage t); - struct update_info { - uint16_t version_major = 0; - uint16_t version_minor = 0; - uint16_t version_patch = 0; - char version_type = 0; - uint16_t version_index = 0; - update_channel channel = update_channel::RELEASE; - std::string url = ""; - std::string name = ""; - - bool is_newer(update_info& other); + void to_json(nlohmann::json&, const version_stage&); + void from_json(const nlohmann::json&, version_stage&); + + struct version_info { + public: + uint16_t major; + uint16_t minor; + uint16_t patch; + uint16_t tweak; + version_stage stage; + std::string url; + std::string name; + + public: + version_info(); + version_info(const std::string text); + + bool is_older_than(const version_info other); + + operator std::string(); }; - void to_json(nlohmann::json&, const update_info&); - void from_json(const nlohmann::json&, update_info&); + void to_json(nlohmann::json&, const version_info&); + void from_json(const nlohmann::json&, version_info&); class updater { // Internal - std::mutex _lock; + std::recursive_mutex _lock; std::weak_ptr<::streamfx::util::threadpool::task> _task; // Options - std::atomic_bool _gdpr; + std::atomic_bool _data_sharing_allowed; std::atomic_bool _automation; - update_channel _channel; + version_stage _channel; std::chrono::seconds _lastcheckedat; // Update Information - update_info _current_info; - update_info _release_info; - update_info _testing_info; - bool _dirty; + version_info _current_info; + std::map _updates; + bool _dirty; private: void task(streamfx::util::threadpool_data_t); - void task_query(std::vector& buffer); - void task_parse(std::vector& buffer); bool can_check(); @@ -80,30 +91,34 @@ namespace streamfx { ~updater(); // GDPR compliance (must require user interaction!) - bool gdpr(); - void set_gdpr(bool); + bool is_data_sharing_allowed(); + void set_data_sharing_allowed(bool); // Automatic Update checks - bool automation(); + bool is_automated(); void set_automation(bool); // Update Channel - update_channel channel(); - void set_channel(update_channel channel); + version_stage get_channel(); + void set_channel(version_stage channel); // Refresh information. void refresh(); // Check current data. - bool have_update(); - update_info get_current_info(); - update_info get_update_info(); + version_info get_current_info(); + + // Check update data. + bool is_update_available(); + bool is_update_available(version_stage channel); + version_info get_update_info(); + version_info get_update_info(version_stage channel); public: struct _ { - streamfx::util::event gdpr_changed; - streamfx::util::event automation_changed; - streamfx::util::event channel_changed; + streamfx::util::event gdpr_changed; + streamfx::util::event automation_changed; + streamfx::util::event channel_changed; streamfx::util::event error; streamfx::util::event refreshed; diff --git a/templates/version.hpp.in b/templates/version.hpp.in index 0622c30acc..68b7badfa0 100644 --- a/templates/version.hpp.in +++ b/templates/version.hpp.in @@ -39,6 +39,7 @@ #define STREAMFX_VERSION_PATCH @PROJECT_VERSION_PATCH@ #define STREAMFX_VERSION_BUILD @PROJECT_VERSION_TWEAK@ #define STREAMFX_VERSION_TWEAK @PROJECT_VERSION_TWEAK@ -#define STREAMFX_VERSION_SUFFIX "@VERSION_SUFFIX@" +#define STREAMFX_VERSION_SUFFIX "@VERSION_STAGE@" +#define STREAMFX_VERSION_STAGE "@VERSION_STAGE@" #define STREAMFX_VERSION_COMMIT "@VERSION_COMMIT@" #define STREAMFX_VERSION_STRING "@VERSION_STRING@" From 553dc3db70bc16dca511be3e9fd439d771a26c7c Mon Sep 17 00:00:00 2001 From: Xaymar Date: Thu, 23 Jun 2022 12:27:04 +0200 Subject: [PATCH 046/164] locale: New Crowdin updates (#817) * New translations en-US.ini (Arabic) * New translations en-US.ini (Norwegian) * New translations en-US.ini (Norwegian) * New translations en-US.ini (Arabic) * New translations en-US.ini (Thai) * New translations en-US.ini (Ukrainian) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Chinese Traditional) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (English, United Kingdom) * New translations en-US.ini (Sinhala) * New translations en-US.ini (Turkish) * New translations en-US.ini (Russian) * New translations en-US.ini (Norwegian) * New translations en-US.ini (Finnish) * New translations en-US.ini (Romanian) * New translations en-US.ini (French) * New translations en-US.ini (Spanish) * New translations en-US.ini (Czech) * New translations en-US.ini (German) * New translations en-US.ini (Portuguese) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Italian) * New translations en-US.ini (Japanese) * New translations en-US.ini (Korean) * New translations en-US.ini (Dutch) * New translations en-US.ini (Polish) * New translations en-US.ini (Norwegian) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Romanian) * New translations en-US.ini (Italian) * New translations en-US.ini (Swedish) * New translations en-US.ini (Polish) * New translations en-US.ini (Polish) * New translations en-US.ini (Russian) * New translations en-US.ini (Korean) * New translations en-US.ini (Thai) --- data/locale/ar-SA.ini | 6 ++++-- data/locale/cs-CZ.ini | 3 +-- data/locale/de-DE.ini | 3 +-- data/locale/en-GB.ini | 3 +-- data/locale/es-ES.ini | 6 ++++-- data/locale/fi-FI.ini | 3 +-- data/locale/fr-FR.ini | 3 +-- data/locale/hu-HU.ini | 5 +++-- data/locale/it-IT.ini | 6 ++++-- data/locale/ja-JP.ini | 3 +-- data/locale/ko-KR.ini | 34 +++++++++++++++++++++++++++++++--- data/locale/nl-NL.ini | 3 +-- data/locale/no-NO.ini | 13 +++++++++++-- data/locale/pl-PL.ini | 35 +++++++++++++++++++++++++++++++++-- data/locale/pt-BR.ini | 3 +-- data/locale/pt-PT.ini | 1 + data/locale/ro-RO.ini | 6 ++++-- data/locale/ru-RU.ini | 6 ++++-- data/locale/si-LK.ini | 2 -- data/locale/sv-SE.ini | 4 ++++ data/locale/th-TH.ini | 7 +++++++ data/locale/tr-TR.ini | 3 +-- data/locale/uk-UA.ini | 1 + data/locale/zh-CN.ini | 3 +-- data/locale/zh-TW.ini | 3 +-- 25 files changed, 122 insertions(+), 43 deletions(-) diff --git a/data/locale/ar-SA.ini b/data/locale/ar-SA.ini index 9fa8a9edd8..00e4be094a 100644 --- a/data/locale/ar-SA.ini +++ b/data/locale/ar-SA.ini @@ -51,10 +51,12 @@ UI.Updater.GitHubPermission.Text="يعتمد StreamFX على GitHub لتوفير UI.Updater.Menu.CheckForUpdates="التحقق من وجود تحديثات" UI.Updater.Menu.CheckForUpdates.Automatically="التحقق تلقائياً من وجود تحديثات" UI.Updater.Menu.Channel="قناة التحديث" -UI.Updater.Menu.Channel.Release="النسخة الثابتة " -UI.Updater.Menu.Channel.Testing="النسخة التجريبية" +UI.Updater.Menu.Channel.Alpha="ألفا (شفافية)" Encoder.AOM.AV1="AOM AV1 (مباشر)" +Encoder.AOM.AV1.Encoder="مساعدة" +Encoder.AOM.AV1.Encoder.Usage="إستخدام" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="ذات نوعية جيدة" Encoder.AOM.AV1.RateControl.Buffer.Size="الحجم" diff --git a/data/locale/cs-CZ.ini b/data/locale/cs-CZ.ini index 59eb9ca43d..9645d9e761 100644 --- a/data/locale/cs-CZ.ini +++ b/data/locale/cs-CZ.ini @@ -50,8 +50,7 @@ UI.Updater.GitHubPermission.Text="S cílem poskytnout ruční nebo automatickou UI.Updater.Menu.CheckForUpdates="Zkontrolovat aktualizace" UI.Updater.Menu.CheckForUpdates.Automatically="Automaticky kontrolovat Aktualizace" UI.Updater.Menu.Channel="Kanál pro Aktualizace" -UI.Updater.Menu.Channel.Release="Stabilní" -UI.Updater.Menu.Channel.Testing="Testovací" +UI.Updater.Menu.Channel.Alpha="Průhlednost" Encoder.AOM.AV1="AOM AV1 (přímo)" Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" diff --git a/data/locale/de-DE.ini b/data/locale/de-DE.ini index b2adccbd0d..f3131e637d 100644 --- a/data/locale/de-DE.ini +++ b/data/locale/de-DE.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="Um manuelle oder automatische Updateprüfungen UI.Updater.Menu.CheckForUpdates="Prüfe auf Updates" UI.Updater.Menu.CheckForUpdates.Automatically="Automatische Updateprüfung" UI.Updater.Menu.Channel="Updatekanal" -UI.Updater.Menu.Channel.Release="Release" -UI.Updater.Menu.Channel.Testing="Testphase" +UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1="AOM AV1 (direkt)" Encoder.AOM.AV1.Encoder="Kodierer" diff --git a/data/locale/en-GB.ini b/data/locale/en-GB.ini index d75e11cb6a..5724334a69 100644 --- a/data/locale/en-GB.ini +++ b/data/locale/en-GB.ini @@ -48,8 +48,7 @@ UI.Updater.GitHubPermission.Text="In order to provide manual or automated update UI.Updater.Menu.CheckForUpdates="Check for Updates" UI.Updater.Menu.CheckForUpdates.Automatically="Automatically check for Updates" UI.Updater.Menu.Channel="Update Channel" -UI.Updater.Menu.Channel.Release="Release" -UI.Updater.Menu.Channel.Testing="Testing" +UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1.Encoder.CPUUsage.3="Slow" Encoder.AOM.AV1.Encoder.CPUUsage.4="Medium" diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index 6945cf8c1d..81d605c762 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -51,8 +51,10 @@ UI.Updater.GitHubPermission.Text="Con el fin de proporcionar una comprobación d UI.Updater.Menu.CheckForUpdates="Buscar actualizaciones" UI.Updater.Menu.CheckForUpdates.Automatically="Buscar actualizaciones automáticamente" UI.Updater.Menu.Channel="Tipo de actualizaciones" -UI.Updater.Menu.Channel.Release="Lanzamiento" -UI.Updater.Menu.Channel.Testing="De prueba" +UI.Updater.Menu.Channel.Stable="Estable" +UI.Updater.Menu.Channel.Candidate="Candidato" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (directo)" Encoder.AOM.AV1.Encoder="Codificador" diff --git a/data/locale/fi-FI.ini b/data/locale/fi-FI.ini index b9de650084..555a588917 100644 --- a/data/locale/fi-FI.ini +++ b/data/locale/fi-FI.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="Manuaalisen ja automaattisen päivityksen tark UI.Updater.Menu.CheckForUpdates="Tarkista päivitykset" UI.Updater.Menu.CheckForUpdates.Automatically="Tarkasta päivitykset automaattisesti" UI.Updater.Menu.Channel="Päivityskanava" -UI.Updater.Menu.Channel.Release="Julkaisu" -UI.Updater.Menu.Channel.Testing="Testaus" +UI.Updater.Menu.Channel.Alpha="Läpinäkyvyys" Encoder.AOM.AV1="AOM AV1 (suora)" Encoder.AOM.AV1.Encoder="Enkooderi" diff --git a/data/locale/fr-FR.ini b/data/locale/fr-FR.ini index abc1efc49d..3c25dcb49a 100644 --- a/data/locale/fr-FR.ini +++ b/data/locale/fr-FR.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="Afin de fournir une vérification manuelle ou UI.Updater.Menu.CheckForUpdates="Vérifier les Mises à jour" UI.Updater.Menu.CheckForUpdates.Automatically="Vérifier automatiquement les Mises à jour" UI.Updater.Menu.Channel="Canal de Mise à jour" -UI.Updater.Menu.Channel.Release="Stable" -UI.Updater.Menu.Channel.Testing="Test (instable)" +UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1="AOM AV1 (directe)" Encoder.AOM.AV1.Encoder="Encodeur" diff --git a/data/locale/hu-HU.ini b/data/locale/hu-HU.ini index 27937792ac..ae88a37f72 100644 --- a/data/locale/hu-HU.ini +++ b/data/locale/hu-HU.ini @@ -51,8 +51,9 @@ UI.Updater.GitHubPermission.Text="A StreamFX a GitHub API-t használja az új ki UI.Updater.Menu.CheckForUpdates="Frissítések ellenőrzése" UI.Updater.Menu.CheckForUpdates.Automatically="Automatikusan ellenőrizze a frissítéseket" UI.Updater.Menu.Channel="Frissítési csatorna" -UI.Updater.Menu.Channel.Release="Stabil kiadás" -UI.Updater.Menu.Channel.Testing="Tesztelendő kiadás" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Beta="Béta" +UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direkt)" Encoder.AOM.AV1.Encoder="Kódoló" diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index 3d13ad3ff5..6d235ad3b0 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -51,8 +51,10 @@ UI.Updater.GitHubPermission.Text="Al fine di fornire un controllo manuale o auto UI.Updater.Menu.CheckForUpdates="Cerca aggiornamenti" UI.Updater.Menu.CheckForUpdates.Automatically="Cerca automaticamente gli aggiornamenti" UI.Updater.Menu.Channel="Versione Aggiornamenti" -UI.Updater.Menu.Channel.Release="Stabile" -UI.Updater.Menu.Channel.Testing="Beta" +UI.Updater.Menu.Channel.Stable="Stabile" +UI.Updater.Menu.Channel.Candidate="Candidato" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Trasparenza" Encoder.AOM.AV1="AOM AV1 (diretto)" Encoder.AOM.AV1.Encoder="Codificatore" diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index 711df7a2b8..4002398e8b 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="手動または自動で最新情報を確認 UI.Updater.Menu.CheckForUpdates="アップデートを確認" UI.Updater.Menu.CheckForUpdates.Automatically="アップデートを自動で確認" UI.Updater.Menu.Channel="アップデートチャンネル" -UI.Updater.Menu.Channel.Release="正式リリース" -UI.Updater.Menu.Channel.Testing="テスト" +UI.Updater.Menu.Channel.Alpha="アルファ" Encoder.AOM.AV1="AIM AV1 (direct)" Encoder.AOM.AV1.Encoder="エンコーダー" diff --git a/data/locale/ko-KR.ini b/data/locale/ko-KR.ini index a33f3db733..d0c1b58cbd 100644 --- a/data/locale/ko-KR.ini +++ b/data/locale/ko-KR.ini @@ -25,6 +25,12 @@ State.Automatic="자동" State.Default="기본값" UI.Menu="StreamFX" +UI.Menu.Wiki="위키 읽기" +UI.Menu.Support="도움 && 지원" +UI.Menu.Website="StreamFX 사이트 방문하기" +UI.Menu.Discord="StreamFX 디스코드 참가하기" +UI.Menu.Twitter="트위터에서 StreamFX 팔로우하기" +UI.Menu.YouTube="유튜브에서 StreamFX 구독하기" UI.Menu.About="StreamFX 정보" UI.About.Title="StreamFX 정보" @@ -44,14 +50,36 @@ UI.Updater.GitHubPermission.Text="수동 또는 자동 업데이트 확인을 UI.Updater.Menu.CheckForUpdates="업데이트 확인" UI.Updater.Menu.CheckForUpdates.Automatically="업데이트를 자동으로 확인" UI.Updater.Menu.Channel="채널 업데이트" -UI.Updater.Menu.Channel.Release="정식" -UI.Updater.Menu.Channel.Testing="테스트" - +UI.Updater.Menu.Channel.Stable="안정 버전" +UI.Updater.Menu.Channel.Candidate="후보" +UI.Updater.Menu.Channel.Beta="베타" +UI.Updater.Menu.Channel.Alpha="투명도" + +Encoder.AOM.AV1="AOM AV1 (다이렉트)" +Encoder.AOM.AV1.Encoder="인코더" +Encoder.AOM.AV1.Encoder.Usage="사용법" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="좋은 품질" +Encoder.AOM.AV1.Encoder.Usage.RealTime="실시간" +Encoder.AOM.AV1.Encoder.CPUUsage="CPU 사용량" +Encoder.AOM.AV1.Encoder.CPUUsage.0="플라세보" +Encoder.AOM.AV1.Encoder.CPUUsage.1="매우 느림" +Encoder.AOM.AV1.Encoder.CPUUsage.2="더 느림" +Encoder.AOM.AV1.Encoder.CPUUsage.3="느림" +Encoder.AOM.AV1.Encoder.CPUUsage.4="중간" +Encoder.AOM.AV1.Encoder.CPUUsage.5="빠름" +Encoder.AOM.AV1.Encoder.CPUUsage.6="더 빠름" +Encoder.AOM.AV1.Encoder.CPUUsage.7="매우 빠름" +Encoder.AOM.AV1.Encoder.CPUUsage.8="엄청 빠름" +Encoder.AOM.AV1.Encoder.CPUUsage.9="정말 빠름" +Encoder.AOM.AV1.Encoder.CPUUsage.10="미치도록 빠름" Encoder.AOM.AV1.RateControl.Buffer.Size="크기" Encoder.FFmpeg.NVENC.Preset.default="기본값" +Encoder.FFmpeg.NVENC.Preset.slow="느림" +Encoder.FFmpeg.NVENC.Preset.medium="중간" +Encoder.FFmpeg.NVENC.Preset.fast="빠름" Blur.Type.Box="박스" Blur.Type.BoxLinear="박스 선형" diff --git a/data/locale/nl-NL.ini b/data/locale/nl-NL.ini index b616837c1b..716a823769 100644 --- a/data/locale/nl-NL.ini +++ b/data/locale/nl-NL.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="Om handmatige of geautomatiseerde updatecontro UI.Updater.Menu.CheckForUpdates="Controleer op updates" UI.Updater.Menu.CheckForUpdates.Automatically="Automatisch controleren op updates" UI.Updater.Menu.Channel="Kanaal bijwerken" -UI.Updater.Menu.Channel.Release="Versie" -UI.Updater.Menu.Channel.Testing="Test" +UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direct)" Encoder.AOM.AV1.Encoder="Encoder" diff --git a/data/locale/no-NO.ini b/data/locale/no-NO.ini index 05fc4c9921..bf41e5de84 100644 --- a/data/locale/no-NO.ini +++ b/data/locale/no-NO.ini @@ -25,6 +25,12 @@ State.Automatic="Automatisk" State.Default="Standard" UI.Menu="StreamFX" +UI.Menu.Wiki="Les Wikien" +UI.Menu.Support="Hjelp && Støtte" +UI.Menu.Website="Besøk nettstedet for StreamFX" +UI.Menu.Discord="Bli med på StreamFX Discord" +UI.Menu.Twitter="Følg StreamFX på Twitter" +UI.Menu.YouTube="Abonner på StreamFX på YouTube" UI.Menu.About="Om StreamFX" UI.About.Title="Om StreamFX" @@ -44,9 +50,12 @@ UI.Updater.GitHubPermission.Text="For å tilby manuell eller automatisert sjekk UI.Updater.Menu.CheckForUpdates="Se etter Oppdateringer" UI.Updater.Menu.CheckForUpdates.Automatically="Sjekk automatisk etter Oppdateringer" UI.Updater.Menu.Channel="Oppdaterings Kilde" -UI.Updater.Menu.Channel.Release="Stabil" -UI.Updater.Menu.Channel.Testing="Testing" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Kandidat" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Gjennomsiktighet" +Encoder.AOM.AV1.Encoder="Enkoder" Encoder.AOM.AV1.Encoder.CPUUsage.3="Treg" Encoder.AOM.AV1.Encoder.CPUUsage.4="Medium" Encoder.AOM.AV1.Encoder.CPUUsage.5="Rask" diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index 5b02db84c7..76805c6bf3 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -51,8 +51,10 @@ UI.Updater.GitHubPermission.Text="Aby zapewnić ręczne lub automatyczne sprawdz UI.Updater.Menu.CheckForUpdates="Sprawdź aktualizacje" UI.Updater.Menu.CheckForUpdates.Automatically="Automatycznie sprawdzaj aktualizacje" UI.Updater.Menu.Channel="Kanał aktualizacji" -UI.Updater.Menu.Channel.Release="Stabilny" -UI.Updater.Menu.Channel.Testing="Testowy" +UI.Updater.Menu.Channel.Stable="Wersje stabilne" +UI.Updater.Menu.Channel.Candidate="Kandydaci" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="Kodowanie AOM AV1 (bezpośrednie)" Encoder.AOM.AV1.Encoder="Enkoder" @@ -108,6 +110,7 @@ Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (z przetwarzaniem wstępnym)" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (bez wstępnego przetwarzania)" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" Encoder.AOM.AV1.Advanced.Tune.Content="Zawartość" Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ekran" @@ -157,12 +160,36 @@ Encoder.FFmpeg.NVENC.Preset.default="Domyślne" Encoder.FFmpeg.NVENC.Preset.slow="Wolne" Encoder.FFmpeg.NVENC.Preset.medium="Średnie" Encoder.FFmpeg.NVENC.Preset.fast="Szybkie" +Encoder.FFmpeg.NVENC.Preset.hp="Wysoka wydajność" +Encoder.FFmpeg.NVENC.Preset.hq="Wysoka jakość" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay Disc" +Encoder.FFmpeg.NVENC.Preset.ll="Niskie opóźnienie" +Encoder.FFmpeg.NVENC.Preset.llhq="Niskie opóźnienie, wysoka jakość" +Encoder.FFmpeg.NVENC.Preset.llhp="Niskie opóźnienie, wysoka wydajność" +Encoder.FFmpeg.NVENC.Preset.lossless="Bezstratny" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Bezstratny, wysoka wydajność" +Encoder.FFmpeg.NVENC.Preset.p1="Najszybszy (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Szybszy (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Szybki (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Średni (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Wolny (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Wolniejszy (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Najwolniejszy (P7)" Encoder.FFmpeg.NVENC.Tune="Dostrajanie" +Encoder.FFmpeg.NVENC.Tune.hq="Wysoka jakość" +Encoder.FFmpeg.NVENC.Tune.ll="Niskie opóźnienie" +Encoder.FFmpeg.NVENC.Tune.ull="Bardzo niskie opóźnienie" +Encoder.FFmpeg.NVENC.Tune.lossless="Bezstratny" Encoder.FFmpeg.NVENC.RateControl="Opcje kontroli szybkości" Encoder.FFmpeg.NVENC.RateControl.Mode="Tryb pracy" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Stały parametr kwantyzacji" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Zmienny bitrate" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Stały bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dwa przejścia" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Wielokrotne przejście" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Pojedyncze przejście" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Podwójne przejście w rozdzielczości ćwiartkowej" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Podwójne przejście w pełnej rozdzielczości" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prognozowany (Look Ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptacyjne klatki I-Frame" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptacyjne klatki B-Frame" @@ -184,10 +211,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Czasowa kwantyzacja adaptacyjna" Encoder.FFmpeg.NVENC.Other="Inne opcje" Encoder.FFmpeg.NVENC.Other.BFrames="Maksymalna liczba klatek B-Frame" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Tryb odniesień do B-Frame" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Żadne B-Klatki nie będą używane jako odniesienie" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Tylko połowa B-Klatek będzie używana jako odniesienie" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Każda B-Klatka będzie używana jako odniesienie" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Brak opóźnień" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predykcja ważona" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Niereferencyjne klatki P-Frame" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Klatki referencyjne" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Skala niskiego opóźnienia klatek kluczowych" Blur.Type.Box="Pole" Blur.Type.BoxLinear="Pole liniowe" diff --git a/data/locale/pt-BR.ini b/data/locale/pt-BR.ini index 4f8f77c88e..2eb702296a 100644 --- a/data/locale/pt-BR.ini +++ b/data/locale/pt-BR.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="Para poder checar por Updates Manualmente e At UI.Updater.Menu.CheckForUpdates="Procurar Atualizações" UI.Updater.Menu.CheckForUpdates.Automatically="Verificar por atualizações automaticamente" UI.Updater.Menu.Channel="Atualizar Canal" -UI.Updater.Menu.Channel.Release="Estável" -UI.Updater.Menu.Channel.Testing="Testes" +UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direto)" Encoder.AOM.AV1.Encoder="Codificador" diff --git a/data/locale/pt-PT.ini b/data/locale/pt-PT.ini index 60fd315158..0236eba2c0 100644 --- a/data/locale/pt-PT.ini +++ b/data/locale/pt-PT.ini @@ -31,6 +31,7 @@ UI.About.Text="

StreamFX tornou-se possível por todos os a UI.About.Role.Contributor="Colaborador" UI.About.Role.Translator="Tradutor(a)" +UI.Updater.Menu.Channel.Alpha="Transparência" Encoder.AOM.AV1.Encoder.CPUUsage.3="Lento" Encoder.AOM.AV1.Encoder.CPUUsage.4="Médio" diff --git a/data/locale/ro-RO.ini b/data/locale/ro-RO.ini index d6cbba34ae..0f56d467ec 100644 --- a/data/locale/ro-RO.ini +++ b/data/locale/ro-RO.ini @@ -45,8 +45,10 @@ UI.Updater.GitHubPermission.Text="Pentru a furniza o verificare manuală sau aut UI.Updater.Menu.CheckForUpdates="Verifică pentru actualizare" UI.Updater.Menu.CheckForUpdates.Automatically="Căutare automata de actualizări" UI.Updater.Menu.Channel="Canal de actualizare" -UI.Updater.Menu.Channel.Release="Stabil" -UI.Updater.Menu.Channel.Testing="Testare" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Candidat" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Setări transparenta" Encoder.AOM.AV1.Encoder.CPUUsage.3="Încet" Encoder.AOM.AV1.Encoder.CPUUsage.4="Mediu" diff --git a/data/locale/ru-RU.ini b/data/locale/ru-RU.ini index 6c4553e785..56369d6e22 100644 --- a/data/locale/ru-RU.ini +++ b/data/locale/ru-RU.ini @@ -51,8 +51,10 @@ UI.Updater.GitHubPermission.Text="Для ручной или автоматич UI.Updater.Menu.CheckForUpdates="Проверить наличие обновлений" UI.Updater.Menu.CheckForUpdates.Automatically="Автоматически проверять наличие обновлений" UI.Updater.Menu.Channel="Канал обновлений" -UI.Updater.Menu.Channel.Release="Релиз" -UI.Updater.Menu.Channel.Testing="Тестовый" +UI.Updater.Menu.Channel.Stable="Релиз" +UI.Updater.Menu.Channel.Candidate="Пререлиз" +UI.Updater.Menu.Channel.Beta="Бета" +UI.Updater.Menu.Channel.Alpha="Альфа" Encoder.AOM.AV1="AOM AV1 (прямой)" Encoder.AOM.AV1.Encoder="Энкодер" diff --git a/data/locale/si-LK.ini b/data/locale/si-LK.ini index 8071b227a6..2410163d7c 100644 --- a/data/locale/si-LK.ini +++ b/data/locale/si-LK.ini @@ -16,8 +16,6 @@ State.Automatic="ස්වයංක්‍රීය" -UI.Updater.Menu.Channel.Release="නිකුතුව" -UI.Updater.Menu.Channel.Testing="අත්හදා බැලීම" Encoder.AOM.AV1.Encoder.Usage="භාවිතය" diff --git a/data/locale/sv-SE.ini b/data/locale/sv-SE.ini index 2260529019..b2f069a8cb 100644 --- a/data/locale/sv-SE.ini +++ b/data/locale/sv-SE.ini @@ -14,6 +14,10 @@ SourceType.Source="Källa" +UI.Updater.Menu.Channel.Stable="Stall" +UI.Updater.Menu.Channel.Candidate="Kandidater" +UI.Updater.Menu.Channel.Beta="Betaversioner" +UI.Updater.Menu.Channel.Alpha="Alfa" diff --git a/data/locale/th-TH.ini b/data/locale/th-TH.ini index 16238833d2..f5a6633ff5 100644 --- a/data/locale/th-TH.ini +++ b/data/locale/th-TH.ini @@ -1,4 +1,5 @@ Advanced="ตัวเลือกขั้นสูง" +Manual.Open="เปิดคู่มือ" Channel.Red="สีแดง" Channel.Green="สีเขียว" @@ -24,6 +25,11 @@ State.Automatic="อัตโนมัติ" State.Default="ค่าเริ่มต้น" UI.Menu="StreamFX" +UI.Menu.Wiki="อ่านวิกิ" +UI.Menu.Support="ช่วยเหลือและสนับสนุน" +UI.Menu.Website="เยี่ยมชมเว็บไซต์ StreamFX" +UI.Menu.Discord="เข้าร่วม StreamFX Discord" +UI.Menu.Twitter="ติดตาม StreamFX บนทวิตเตอร์" UI.About.Role.Supporter="สนับสนุน" @@ -31,6 +37,7 @@ UI.Updater.Dialog.Version.Current="รุ่นปัจจุบัน:" UI.Updater.Dialog.Version.Latest="รุ่นล่าสุด:" UI.Updater.Dialog.Button.Cancel="เตือนฉันในภายหลัง" UI.Updater.Menu.CheckForUpdates="ตรวจสอบอัพเดต" +UI.Updater.Menu.Channel.Alpha="ความโปร่งใส" Encoder.AOM.AV1.Encoder.CPUUsage.3="ช้า" Encoder.AOM.AV1.Encoder.CPUUsage.5="รวดเร็ว" diff --git a/data/locale/tr-TR.ini b/data/locale/tr-TR.ini index bae4b469b0..6d9550c028 100644 --- a/data/locale/tr-TR.ini +++ b/data/locale/tr-TR.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="Manüel veya otomatikleştirilmiş güncelleme UI.Updater.Menu.CheckForUpdates="Güncellemeleri Denetle" UI.Updater.Menu.CheckForUpdates.Automatically="Güncellemeleri Otomatik Denetle" UI.Updater.Menu.Channel="Güncelleme Kanalı" -UI.Updater.Menu.Channel.Release="Normal Sürümler" -UI.Updater.Menu.Channel.Testing="Test Sürümleri" +UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direkt)" Encoder.AOM.AV1.Encoder="Kodlayıcı" diff --git a/data/locale/uk-UA.ini b/data/locale/uk-UA.ini index 005bf0eed3..e4e2b4b061 100644 --- a/data/locale/uk-UA.ini +++ b/data/locale/uk-UA.ini @@ -27,6 +27,7 @@ UI.Menu.Support="Допомога і підтримка" UI.Updater.Dialog.Button.Cancel="Нагадайте мені пізніше" +UI.Updater.Menu.Channel.Alpha="Альфа" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index 007c3d73b5..1ef9804a22 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -51,8 +51,7 @@ UI.Updater.GitHubPermission.Text="为了提供手动或自动更新检查,Stre UI.Updater.Menu.CheckForUpdates="检查更新" UI.Updater.Menu.CheckForUpdates.Automatically="自动检查更新" UI.Updater.Menu.Channel="更新通道" -UI.Updater.Menu.Channel.Release="发布版本" -UI.Updater.Menu.Channel.Testing="测试版本" +UI.Updater.Menu.Channel.Alpha="透明度" Encoder.AOM.AV1="AOM AV1 (直接)" Encoder.AOM.AV1.Encoder="编码器" diff --git a/data/locale/zh-TW.ini b/data/locale/zh-TW.ini index d85898ccc7..750b74db66 100644 --- a/data/locale/zh-TW.ini +++ b/data/locale/zh-TW.ini @@ -50,8 +50,7 @@ UI.Updater.GitHubPermission.Text="為了提供手動或自動更新檢查,Stre UI.Updater.Menu.CheckForUpdates="檢查更新" UI.Updater.Menu.CheckForUpdates.Automatically="自動檢查更新" UI.Updater.Menu.Channel="更新方法" -UI.Updater.Menu.Channel.Release="穩定版" -UI.Updater.Menu.Channel.Testing="測試版" +UI.Updater.Menu.Channel.Alpha="阿爾法通道" From f66891f956a60221ccb7f4ab106ad261bf41b8ef Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 31 Jul 2022 01:41:53 +0200 Subject: [PATCH 047/164] ci: Don't run pointless builds The support for Clang on Windows is almost non-existent compared to MSVC and GCC cross-compiling. --- .github/workflows/main.yml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2cca51cf1..595660c0c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,6 +31,10 @@ jobs: generator: GCC - runner: windows-2019 generator: GCC + - runner: windows-2022 + generator: Clang + - runner: windows-2019 + generator: Clang - runner: ubuntu-22.04 generator: MSVC - runner: ubuntu-20.04 @@ -64,24 +68,6 @@ jobs: CMAKE_SYSTEM_VERSION: "10.0.19041.0" CMAKE_GENERATOR: "Visual Studio 16 2019" CMAKE_GENERATOR_PLATFORM: "x64" - - runner: windows-2022 - generator: Clang - experimental: true - platform: "Windows 11" - PACKAGE_NAME: "windows-11-clang" - CMAKE_SYSTEM_VERSION: "10.0.22000.0" - CMAKE_GENERATOR: "Visual Studio 17 2022" - CMAKE_GENERATOR_PLATFORM: "x64" - CMAKE_GENERATOR_TOOLSET: "ClangCL" - - runner: windows-2019 - generator: Clang - experimental: true - platform: "Windows 10" - PACKAGE_NAME: "windows-10-clang" - CMAKE_SYSTEM_VERSION: "10.0.19041.0" - CMAKE_GENERATOR: "Visual Studio 16 2019" - CMAKE_GENERATOR_PLATFORM: "x64" - CMAKE_GENERATOR_TOOLSET: "ClangCL" - runner: ubuntu-22.04 generator: GCC experimental: false @@ -213,8 +199,7 @@ jobs: build/temp/autodeps key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.CACHE_VERSION }} - - name: "Code Signing (Windows)" -# Do not run this on pull requests, ever! + - name: "Code Signing (Windows)" # Do not run this on pull requests, ever! if: (github.event_name != 'pull_request') && startsWith( matrix.runner, 'windows' ) id: codesign shell: bash From ee6cd9fb50aa7a2d3bd1d821fe9e1a035dc4055b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 31 Jul 2022 02:37:09 +0200 Subject: [PATCH 048/164] project: Improve Issue and PR templates --- .github/ISSUE_TEMPLATE/config.yml | 7 ++- .github/ISSUE_TEMPLATE/feature.yml | 26 +++----- .github/ISSUE_TEMPLATE/issue.yml | 99 +++--------------------------- .github/pull_request_template.md | 23 +++---- 4 files changed, 34 insertions(+), 121 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 79d429dd0c..f178c52f16 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,11 @@ blank_issues_enabled: false contact_links: - - name: StreamFX Community Support + - name: Got an idea or feedback for StreamFX? + url: https://github.com/Xaymar/obs-StreamFX/discussions/categories/ideas-feedback + about: We're always open to new ideas and constructive feedback, as long as they have been discussed before. + - name: Having trouble using StreamFX? url: https://s.xaymar.com/streamfx-dc - about: Looking for StreamFX support? Then join our Discord! + about: Join the official Discord and head to support-hub to get all the support necessary. - name: OBS Studio Support url: https://obsproject.com/help about: Unsure if your Issue fits the StreamFX plugin? Consider the OBS Studio Support instead! diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index c3d17cc60a..1c066c9334 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,28 +1,18 @@ --- -name: "Suggest an Enhancment to a Feature or a new Feature" +name: "File an Improvement Request" title: "Replace Me Or Have Your Request Closed" -description: "Is there something that StreamFX is lacking or you'd like to see in OBS Studio?" -labels: ["type:enhancement", "status:help-wanted"] +description: "Requests without an accompanying discussion thread will be closed and locked." +labels: ["enhancement"] body: -- type: textarea +- type: input attributes: - label: "Explain the Feature/Enhancement" - description: "Describe the feature or enhancement in as much detail as possible, leave nothing out. If you think images or example videos help describe the Feature/Enhancement, include them." + label: "Discussion Thread" + description: "Please paste the direct link to the discussion thread" validations: required: true - type: textarea attributes: - label: "What makes this feature/enhancement useful for StreamFX and its users?" - description: "Why should this feature/enhancement become part of the StreamFX plugin, instead of becoming or remaining a third-party plug-in? What benefits do other users of StreamFX get from this?" + label: "Provide a summary of the Improvement" + description: "This should only include parts that were agreed upon." validations: required: true -- type: checkboxes - attributes: - label: "Checklist" - description: "Check all that apply." - options: - - label: "I am offering a monetary bounty/reward for the implementation of this Feature/Enhancement." - - label: "There is no other way to currently do this in StreamFX or OBS Studio." -- type: textarea - attributes: - label: "Any additional Information we need to know?" diff --git a/.github/ISSUE_TEMPLATE/issue.yml b/.github/ISSUE_TEMPLATE/issue.yml index 85a6d18ab8..34b08f8ddc 100644 --- a/.github/ISSUE_TEMPLATE/issue.yml +++ b/.github/ISSUE_TEMPLATE/issue.yml @@ -1,7 +1,7 @@ -name: "Report a Bug/Crash/Freeze" +name: "File an Issue Report" title: "Replace Me Or Have Your Report Closed" -description: "Encountered a problem, a bug or a crash?" -labels: ["type:bug", "status:help-wanted"] +description: "Use this if you've encountered a Bug, Crash or Freeze with StreamFX." +labels: ["bug"] body: - type: dropdown attributes: @@ -16,91 +16,16 @@ body: - "(Other)" validations: required: true -- type: dropdown +- type: input attributes: - label: "OBS Studio Version?" + label: "OBS Studio Version" description: "Which OBS Studio version are you using to run StreamFX? Versions include all patches (the third element in 'A.B.C'), and release candidates for that version. Select 'Other' if you are using a custom build." - options: - - "27.1" - - "27.0" - - "26.1" - - "26.0" - - "25.0" - - "(Other)" validations: required: true -- type: dropdown +- type: input attributes: label: "StreamFX Version" description: "On which StreamFX version did you first encounter this issue?" - options: - - "0.12.0a1" - - "0.11.1" - - "0.11.1b1" - - "0.11.1a1" - - "0.11.0" - - "0.11.0c1" - - "0.11.0b3" - - "0.11.0b2" - - "0.11.0b1" - - "0.11.0a8" - - "0.11.0a7" - - "0.11.0a6" - - "0.11.0a5" - - "0.11.0a4" - - "0.11.0a3" - - "0.11.0a2" - - "0.11.0a1" - - "0.10.1" - - "0.10.0" - - "0.10.0b3" - - "0.10.0b2" - - "0.10.0b1" - - "0.10.0a2" - - "0.10.0a1" - - "0.10.0a0" - - "0.9.3" - - "0.9.2" - - "0.9.1" - - "0.9.0" - - "0.9.0a3" - - "0.9.0a2" - - "0.9.0a1" - - "0.8.3" - - "0.8.2" - - "0.8.1" - - "0.8.0" - - "0.8.0b3" - - "0.8.0b2" - - "0.8.0b2hf2" - - "0.8.0b2hf1" - - "0.8.0b1" - - "0.8.0a4" - - "0.8.0a3" - - "0.8.0a2" - - "0.8.0a1" - - "0.7.2" - - "0.7.1" - - "0.7.0" - - "0.6.3" - - "0.6.2" - - "0.6.1" - - "0.6.0" - - "0.5.2" - - "0.5.1" - - "0.5.0" - - "0.5.0preview3" - - "0.5.0preview2" - - "0.5.0preview1" - - "0.4.3" - - "0.4.3preview1" - - "0.4.2" - - "0.4.1" - - "0.4.0" - - "0.3.0" - - "0.2.0" - - "0.1.1" - - "0.1.0" validations: required: true - type: input @@ -115,19 +40,13 @@ body: description: "If OBS Studio crashed (not froze) paste the crash log here, or upload it somewhere and paste the link here." - type: textarea attributes: - label: "Current Behavior" - description: "What actually happened when you used StreamFX?" - validations: - required: true -- type: textarea - attributes: - label: "Expected Behavior" - description: "What did you expect to happen when using StreamFX?" + label: "Current and Expected Behavior" + description: "What actually happened when you used StreamFX? What did you expect to happen?" validations: required: true - type: textarea attributes: - label: "Steps to Reproduce the Bug" + label: "Steps to Reproduce the Problem" description: "What steps are required to consistently reproduce the bug/crash/freeze?" validations: required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cca9db0119..78e7a44685 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,13 +1,14 @@ ### Explain the Pull Request - - - + -### Related Issues - - - - -### Checklist -- [ ] I will become the maintainer for this part of code. -- [ ] I have tested this code on all supported Platforms. +#### Completion Checklist +- [ ] I have added myself to the Copyright and License headers and files. +- [ ] I will maintain this code in the future and have added myself to `CODEOWNERS`. +- I have tested this change on the following platforms: + - [ ] MacOS 10.15 + - [ ] MacOS 11 + - [ ] MacOS 12 + - [ ] Ubuntu 20.04 + - [ ] Ubuntu 22.04 + - [ ] Windows 10 + - [ ] Windows 11 From 64bae2b897f6989fe60db0224a887bab8fdb0a48 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 3 Aug 2022 04:00:13 +0200 Subject: [PATCH 049/164] project: Fix incorrect tabs in YAML --- .github/ISSUE_TEMPLATE/config.yml | 4 +- tools/argparse.sh | 143 ++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 tools/argparse.sh diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f178c52f16..28b02cc29b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,10 +2,10 @@ blank_issues_enabled: false contact_links: - name: Got an idea or feedback for StreamFX? url: https://github.com/Xaymar/obs-StreamFX/discussions/categories/ideas-feedback - about: We're always open to new ideas and constructive feedback, as long as they have been discussed before. + about: We're always open to new ideas and constructive feedback, as long as they have been discussed before. - name: Having trouble using StreamFX? url: https://s.xaymar.com/streamfx-dc - about: Join the official Discord and head to support-hub to get all the support necessary. + about: Join the official Discord and head to support-hub to get all the support necessary. - name: OBS Studio Support url: https://obsproject.com/help about: Unsure if your Issue fits the StreamFX plugin? Consider the OBS Studio Support instead! diff --git a/tools/argparse.sh b/tools/argparse.sh new file mode 100644 index 0000000000..0b1eaa6019 --- /dev/null +++ b/tools/argparse.sh @@ -0,0 +1,143 @@ +#!/bin/bash + +# Usage +# - Call argparse after registering all Options and Commands. +# +#! Option Handlers: '-name', '--name' +# - $1 will be the exact key (The 'name' part of '-name', '--name'). +# - $2 will be the value either assigned with = or as a second argument. +# - ARGPARSE_USED must be set to 1 if $2 was used by the handler. +# - A status code of 0 must be returned if parsing was successful. +# - A status code of 1 must be returned if parsing failed. +# +#! Command Handlers: 'name' +# - $1 will be the exact key ('name' part) +# - $2 will contain the remaining arguments. +# - ARGPARSE_USED must be set to the number of arguments used by the handler. +# - A status code of 0 must be returned if parsing was successful. +# - A status code of 1 must be returned if parsing failed. + +################################################################################ +# Variables +################################################################################ +# Where is this script really? +SELF=`realpath "$0"` + +# Known and Unknown arguments +declare -a ARGPARSE_KNOWN +declare -a ARGPARSE_UNKNOWN + +# Options +declare -a ARGPARSE_OPTIONS + +# Commands +declare -a ARGPARSE_COMMANDS + +################################################################################ +# Main Functionality +################################################################################ +function argparse_split_option { + OPTION="$1" + IFS=";" read -a OPTION <<< ${OPTION} + IFS="," read -a OPTION_NAMES <<< ${OPTION[0]} + OPTION_FUNCTION=${OPTION[1]} + OPTION_HELP=${OPTION[2]} +} + +function argparse_parse_arg { + ARGPARSE_KEY=$1 + ARGPARSE_VALUE=$2 + ARGPARSE_HAS_ASSIGN=`false` + if [[ "$KEY" =~ .*=.* ]]; then + ARGPARSE_HAS_ASSIGN=`true` + VALUE=${${KEY}//.*=/} + KEY=${${KEY}//=.*/} + fi +} + +function argparse_option { + # Parse Key=Value structures + + argparse_split_option ${3} + for OPTION_NAME in "${OPTION_NAMES[@]}"; do + if [[ "$1" == "${OPTION_NAME}" ]]; then + ${OPTION_FUNCTION} ${} + fi + done + +} + +function argparse { + # Parse both Options and Commands + while (( $# )); do + argparse_parse_arg "$@" + + echo "$1" + for ARGPARSE_OPTION in "${ARGPARSE_OPTIONS[@]}"; do + done + for ARGPARSE_COMMAND in "${ARGPARSE_COMMANDS[@]}"; do + argparse_split_option ${ARGPARSE_COMMAND} + echo " c $ARGPARSE_COMMAND" + done + + if ARGPARSE_HAS_ASSIGN; then + shift + else + shift 2 + fi + done + +#declare -a ARGS +#while (( $# )); do +# ARGS+=("$1") +# shift +#done +# echo "$7" +# # Parse the array one by one, filling either the known or unknown array. +# while (( ${#ARGPARSE_ARGS[@]} )); do +# argparse_parse +# if $? = +# done +} + +################################################################################ +# Command: Help +################################################################################ + +# function argparse_help { +# echo "${SELF} [] ..." +# echo " Options: " + +# echo "" +# echo " Commands: " + +# # We only handled $1, so return 0 +# return 0 +# } +# COMMANDS+=("-h,--help;argparse_help;Show this help.") + + +# function parse_flag { +# RET_NO_ARGS=0 +# RET_ONE_ARG=1 +# RET_TWO_ARG=2 + + +# case "$KEY" in +# "-qt"|"--qt-version") +# QT_VERSION=${VALUE} +# return ${RET_TWO_ARG} +# ;; +# "-ssl"|"--ssl-flavor") +# SSL=${VALUE} +# return ${RET_TWO_ARG} +# ;; +# "-s"|"--silent"|"-q"|"--quiet") +# SILENT=TRUE +# return ${RET_ONE_ARG} +# ;; +# *) # Nothing was parsed. +# return ${RET_NO_ARGS} +# esac +# } + From a149531fb8eb60975294938f772aad24a678cfd5 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 21 Jun 2022 19:09:45 +0200 Subject: [PATCH 050/164] cmake: Upgrade version code to shared cmake-version module This module handles parsing, generating, modifying and comparing of versions with pure CMake. --- .gitmodules | 3 + CMakeLists.txt | 271 +++++++++++------------------ cmake/version | 1 + source/obs/obs-encoder-factory.hpp | 2 +- source/obs/obs-source-factory.hpp | 4 +- templates/version.hpp.in | 19 +- 6 files changed, 121 insertions(+), 179 deletions(-) create mode 160000 cmake/version diff --git a/.gitmodules b/.gitmodules index 36425b713f..87f91db6c8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,9 @@ [submodule "cmake/codesign"] path = cmake/codesign url = https://github.com/Xaymar/cmake-codesign.git +[submodule "cmake/version"] + path = cmake/version + url = https://github.com/Xaymar/cmake-version.git [submodule "third-party/nlohmann-json"] path = third-party/nlohmann-json url = https://github.com/nlohmann/json.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 25ae4ece97..911f61c06a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,25 @@ else() set(LOGPREFIX "") endif() +################################################################################ +# Modules +################################################################################ + +# Search Paths +set(CMAKE_MODULE_PATH + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/codesign" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/version" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" +) + +# Include +include("util") # CacheClear, CacheSet +include("version") # version() +include("DownloadProject") # DownloadProject +include("CheckIPOSupported") # check_ipo_supported + ################################################################################ # Detect if we are building with OBS Studio (different from Grouped builds) ################################################################################ @@ -50,116 +69,51 @@ endif() # Versioning ################################################################################ -# Variables for Versioning -set(VERSION_MAJOR 0) # Major -set(VERSION_MINOR 0) # Minor -set(VERSION_PATCH 0) # Patch -set(VERSION_STAGE "") # Prefix for Tweak, if left empty will assume '.'. -set(VERSION_TWEAK 0) # Tweak -set(VERSION_COMMIT "00000000") -# Final format will be [MAJOR].[MINOR].[PATCH]([TYPE][TWEAK])(-[COMMIT]) - -function(parse_version_string) - # Parses a version in the format A.B.C[.|a|b|rc]D-E - cmake_parse_arguments( - PARSE_ARGV 0 - _ARGS - "" - "INPUT;OUTPUT" - "" - ) - - set(_tmp_MAJOR 0) - set(_tmp_MINOR 0) - set(_tmp_PATCH 0) - set(_tmp_STAGE "") - set(_tmp_TWEAK "") - set(_tmp_COMMIT "") - - # Replace separators with list separators - string(REPLACE "-" "." _tmp "${_ARGS_INPUT}") - string(REPLACE "." ";" _tmp "${_tmp}") - - # Parse version differently depending on total string length. - list(LENGTH _tmp _tmp_len) - if(_tmp_len GREATER_EQUAL 1) # A[...] - list(GET _tmp 0 _tmp_MAJOR) - endif() - if(_tmp_len GREATER_EQUAL 2) # A.B[...] - list(GET _tmp 1 _tmp_MINOR) - endif() - if(_tmp_len GREATER_EQUAL 3) # A.B.C[...] - list(GET _tmp 2 _tmp_PATCH) - endif() - if(_tmp_len EQUAL 4) # A.B.C.D or A.B.C-gEEEEEEEE - list(GET _tmp 3 _tmp2) - # No support for '{N,M}' in CMake-Regex! - if(_tmp2 MATCHES "^g[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]") - # A.B.C-gEEEEEEEE - set(_tmp_COMMIT "${_tmp2}") - else() - # It is A.B.C.D - set(_tmp_TWEAK "${_tmp2}") - set(_tmp_STAGE "a") - endif() - elseif(_tmp_len EQUAL 5) # A.B.C.D-gEEEEEEEE - set(_tmp_STAGE "a") - list(GET _tmp 3 _tmp_TWEAK) - list(GET _tmp 4 _tmp_COMMIT) - endif() - if(_tmp_TWEAK STREQUAL "") # Is A.B.C-gEEEEEEEE actually A.B.CxD-gEEEEEEEE? - string(REGEX MATCHALL "^([0-9]+)([_a-c]+)([0-9]+)" T_MATCHES "${_tmp_PATCH}") - if(T_MATCHES) - set(_tmp_PATCH ${CMAKE_MATCH_1}) - set(_tmp_STAGE ${CMAKE_MATCH_2}) - set(_tmp_TWEAK ${CMAKE_MATCH_3}) - endif() - endif() +# For automatic versioning, which version is the "root" of the current changes? +set(PROJECT_VERSION_GIT_BASE "0.11.0") - set(${_ARGS_OUTPUT}_MAJOR ${_tmp_MAJOR} PARENT_SCOPE) - set(${_ARGS_OUTPUT}_MINOR ${_tmp_MINOR} PARENT_SCOPE) - set(${_ARGS_OUTPUT}_PATCH ${_tmp_PATCH} PARENT_SCOPE) - set(${_ARGS_OUTPUT}_STAGE ${_tmp_STAGE} PARENT_SCOPE) - set(${_ARGS_OUTPUT}_TWEAK ${_tmp_TWEAK} PARENT_SCOPE) - set(${_ARGS_OUTPUT}_COMMIT ${_tmp_COMMIT} PARENT_SCOPE) -endfunction() +# What is our version goal? +set(PROJECT_VERSION "0.12.0") +version(PARSE PROJECT_VERSION "${PROJECT_VERSION}") -# Check if we are in a git repository. +# If possible, automatically generate versions from git. if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") - set(VERSION_BASE "0.11.0") # Automatic versioning base - set(VERSION_TARGET "0.12.0") # Automatic versioning target - - # Parse target version as it is for output. - parse_version_string(OUTPUT "VERSION" INPUT "${VERSION_TARGET}") - - # Try and figure out where git is. - find_program(GIT git - PATHS - /bin - /sbin - /usr/bin - /usr/local/bin - ) - - if(GIT) - # Tweak + find_program(GIT + NAMES + git + git.exe + ) + + if(EXISTS "${GIT}") + # Calculate the Tweak version component from the given base version. execute_process( - COMMAND "${GIT}" describe --tags --long --match "${VERSION_BASE}" --abbrev=8 HEAD + COMMAND "${GIT}" describe --tags --long --match "${PROJECT_VERSION_GIT_BASE}" --abbrev=8 HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} RESULT_VARIABLE GIT_RESULT - OUTPUT_VARIABLE GIT_OUTPUT + OUTPUT_VARIABLE PROJECT_VERSION_GIT ERROR_VARIABLE GIT_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) - if(NOT GIT_RESULT EQUAL 0) - message(WARNING "${LOGPREFIX}Failed to detect version, using default instead.") + if(GIT_RESULT EQUAL 0) + # Some minor string editing so the output conforms to SemVer 2.0.0. + string(REPLACE "-" ";" PROJECT_VERSION_GIT "${PROJECT_VERSION_GIT}") + + # Parse as SemVer 2.0.0 + list(GET PROJECT_VERSION_GIT 1 PROJECT_VERSION_GIT_TWEAK) + list(GET PROJECT_VERSION_GIT 2 PROJECT_VERSION_GIT_BUILD) + + # Update our global version. + version(MODIFY PROJECT_VERSION "${PROJECT_VERSION}" COMPRESS + TWEAK "${PROJECT_VERSION_GIT_TWEAK}" + BUILD "${PROJECT_VERSION_GIT_BUILD}" + PRERELEASE "a" + REQUIRE "PATCH;TWEAK" + ) + version(PARSE PROJECT_VERSION "${PROJECT_VERSION}" REQUIRE "PATCH;TWEAK") else() - parse_version_string(OUTPUT "GIT_VERSION" INPUT "${GIT_OUTPUT}") - set(VERSION_STAGE ${GIT_VERSION_STAGE}) - set(VERSION_TWEAK ${GIT_VERSION_TWEAK}) - set(VERSION_COMMIT ${GIT_VERSION_COMMIT}) + message(WARNING "${LOGPREFIX}Unable to detect Tweak and Build component with 'git'.") endif() # Is there a tag on the current commit? @@ -167,79 +121,81 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") COMMAND "${GIT}" tag "--sort=-v:refname" "--points-at" HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} RESULT_VARIABLE GIT_RESULT - OUTPUT_VARIABLE TAG_OUTPUT + OUTPUT_VARIABLE PROJECT_VERSION_TAG ERROR_VARIABLE GIT_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) - if((GIT_RESULT EQUAL 0) AND (NOT "${TAG_OUTPUT}" STREQUAL "")) - string(REGEX REPLACE "[\r\n]+.*" "" T_MATCHES "${TAG_OUTPUT}") - parse_version_string(OUTPUT "TAG_VERSION" INPUT "${T_MATCHES}") - set(VERSION_MAJOR "${TAG_VERSION_MAJOR}") - set(VERSION_MINOR "${TAG_VERSION_MINOR}") - set(VERSION_PATCH "${TAG_VERSION_PATCH}") - set(VERSION_STAGE "${TAG_VERSION_STAGE}") - set(VERSION_TWEAK "${TAG_VERSION_TWEAK}") + if((GIT_RESULT EQUAL 0) AND (NOT "${PROJECT_VERSION_TAG}" STREQUAL "")) + # Some minor string editing so the output conforms to SemVer 2.0.0. + string(REGEX REPLACE "[\r\n]+.*" "" PROJECT_VERSION_TAG "${PROJECT_VERSION_TAG}") + + # Parse as SemVer 2.0.0 + version(PARSE PROJECT_VERSION_TAG "${PROJECT_VERSION_TAG}" REQUIRE "PATCH;TWEAK") + if(PROJECT_VERSION_TAG_PRERELEASE) + string(SUBSTRING "${PROJECT_VERSION_TAG_PRERELEASE}" 1 -1 PROJECT_VERSION_TAG_TWEAK) + string(SUBSTRING "${PROJECT_VERSION_TAG_PRERELEASE}" 0 1 PROJECT_VERSION_TAG_PRERELEASE) + + if(NOT PROJECT_VERSION_TAG_TWEAK STREQUAL PROJECT_VERSION_GIT_TWEAK) + message(WARNING "${LOGPREFIX}'git' tag mismatches detected version: '${PROJECT_VERSION_TAG_TWEAK}' != '${PROJECT_VERSION_GIT_TWEAK}'.") + endif() + endif() + + # Update our global version. + version(GENERATE PROJECT_VERSION COMPRESS + MAJOR "${PROJECT_VERSION_TAG_MAJOR}" + MINOR "${PROJECT_VERSION_TAG_MINOR}" + PATCH "${PROJECT_VERSION_TAG_PATCH}" + TWEAK "${PROJECT_VERSION_TAG_TWEAK}" + PRERELEASE "${PROJECT_VERSION_TAG_PRERELEASE}" + BUILD "${PROJECT_VERSION_BUILD}" + ) + version(PARSE PROJECT_VERSION "${PROJECT_VERSION}" REQUIRE "PATCH;TWEAK") endif() + else() + message(STATUS "${LOGPREFIX}'git' not found, automatic version detection disabled.") endif() else() message(STATUS "${LOGPREFIX}Not a git repository, automatic version detection disabled.") endif() # Allow manual overrides of the detected version. -set(${PREFIX}VERSION "" CACHE STRING "Override StreamFX version with this string. Format: Major.Minor.Patch[Stage][Tweak[-Commit8c]]") -if(NOT (${PREFIX}VERSION STREQUAL "")) - parse_version_string(OUTPUT "VERSION" INPUT "${${PREFIX}VERSION}") -endif() - -# Generate Version String -if(VERSION_COMMIT) - set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_STAGE}${VERSION_TWEAK}-${VERSION_COMMIT}") -else() - set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_STAGE}${VERSION_TWEAK}") +set(${PREFIX}VERSION "" CACHE STRING "Override detected or pre-configured version with this string. Accepts strings in CMake and SemVer 2.0.0 format.") +if(NOT ("${${PREFIX}VERSION}" STREQUAL "")) + version(PARSE PROJECT_VERSION_CFG "${${PREFIX}VERSION}" REQUIRE "PATCH;TWEAK") + if("${PROJECT_VERSION_CFG_BUILD}" STREQUAL "") + set(PROJECT_VERSION_CFG_BUILD "${PROJECT_VERSION_BUILD}") + endif() + version(GENERATE PROJECT_VERSION COMPRESS + MAJOR "${PROJECT_VERSION_CFG_MAJOR}" + MINOR "${PROJECT_VERSION_CFG_MINOR}" + PATCH "${PROJECT_VERSION_CFG_PATCH}" + TWEAK "${PROJECT_VERSION_CFG_TWEAK}" + PRERELEASE "${PROJECT_VERSION_CFG_PRERELEASE}" + BUILD "${PROJECT_VERSION_CFG_BUILD}" + ) endif() -# Log the detected version. -message(STATUS "${LOGPREFIX}Version ${VERSION_STRING}") +# Parse & Log the detected version. +message(STATUS "${LOGPREFIX}Version ${PROJECT_VERSION}") ################################################################################ # Project ################################################################################ -set(_VERSION_TWEAK "0${VERSION_TWEAK}") +version(GENERATE PROJECT_VERSION_CMAKE + MAJOR "${PROJECT_VERSION_MAJOR}" + MINOR "${PROJECT_VERSION_MINOR}" + PATCH "${PROJECT_VERSION_PATCH}" + TWEAK "${PROJECT_VERSION_TWEAK}" +) project( StreamFX - VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${_VERSION_TWEAK} + VERSION ${PROJECT_VERSION_CMAKE} DESCRIPTION "Additional sources, filters, transitions and encoders for OBS Studio." HOMEPAGE_URL "https://streamfx.xaymar.com/" ) -# Helpers for CI -if(VERSION_STAGE STREQUAL "") - file( - GENERATE - OUTPUT "$/tag_name" - CONTENT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" - TARGET ${PROJECT_NAME} - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE - ) -else() - file( - GENERATE - OUTPUT "$/tag_name" - CONTENT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_STAGE}${VERSION_TWEAK}" - TARGET ${PROJECT_NAME} - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE - ) -endif() -file( - GENERATE - OUTPUT "$/version" - CONTENT "${VERSION_STRING}" - TARGET ${PROJECT_NAME} - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_EXECUTE -) - # Full Project Name set(PROJECT_FULL_NAME "StreamFX (for OBS Studio)") @@ -252,23 +208,6 @@ set(PROJECT_AUTHORS "Michael Fabian 'Xaymar' Dirks ") # Copyright Years (TODO: Update every year) set(PROJECT_COPYRIGHT_YEARS "2018 - 2020") -# Versioning -set(PROJECT_VERSION_STRING ${VERSION_STRING}) - -################################################################################ -# Modules -################################################################################ - -# Search Paths -set(CMAKE_MODULE_PATH - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" - "${CMAKE_CURRENT_SOURCE_DIR}/cmake" -) - -# Include -include("util") # CacheClear, CacheSet -include("DownloadProject") # DownloadProject -include("CheckIPOSupported") # check_ipo_supported ################################################################################ # Platform Setup @@ -2241,6 +2180,8 @@ set_target_properties(${PROJECT_NAME} PROPERTIES # Set file version (on anything but MacOS) if(NOT D_PLATFORM_MAC) set_target_properties(${PROJECT_NAME} PROPERTIES + MACHO_COMPATIBILITY_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} + MACHO_CURRENT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK} ) @@ -2520,7 +2461,7 @@ endif() if(STANDALONE) # Packaging if(NOT PACKAGE_SUFFIX) - set(_PACKAGE_SUFFIX_OVERRIDE "${VERSION_STRING}") + set(_PACKAGE_SUFFIX_OVERRIDE "${PROJECT_VERSION}") else() set(_PACKAGE_SUFFIX_OVERRIDE "${PACKAGE_SUFFIX}") endif() diff --git a/cmake/version b/cmake/version new file mode 160000 index 0000000000..2494a2b6c8 --- /dev/null +++ b/cmake/version @@ -0,0 +1 @@ +Subproject commit 2494a2b6c894380ced96307ae833afc0be37a143 diff --git a/source/obs/obs-encoder-factory.hpp b/source/obs/obs-encoder-factory.hpp index 3b552826e6..66d5868724 100644 --- a/source/obs/obs-encoder-factory.hpp +++ b/source/obs/obs-encoder-factory.hpp @@ -169,7 +169,7 @@ namespace streamfx::obs { instance->migrate(settings, version); } obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); - obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); + obs_data_set_string(settings, S_COMMIT, STREAMFX_VERSION_BUILD); } private /* Factory */: diff --git a/source/obs/obs-source-factory.hpp b/source/obs/obs-source-factory.hpp index 736d761a5e..ad64229da9 100644 --- a/source/obs/obs-source-factory.hpp +++ b/source/obs/obs-source-factory.hpp @@ -444,7 +444,7 @@ namespace streamfx::obs { uint64_t version = static_cast(obs_data_get_int(settings, S_VERSION)); priv->migrate(settings, version); obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); - obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); + obs_data_set_string(settings, S_COMMIT, STREAMFX_VERSION_BUILD); priv->load(settings); } } catch (const std::exception& ex) { @@ -472,7 +472,7 @@ namespace streamfx::obs { if (data) { reinterpret_cast<_instance*>(data)->save(settings); obs_data_set_int(settings, S_VERSION, static_cast(STREAMFX_VERSION)); - obs_data_set_string(settings, S_COMMIT, STREAMFX_COMMIT); + obs_data_set_string(settings, S_COMMIT, STREAMFX_VERSION_BUILD); } } catch (const std::exception& ex) { DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); diff --git a/templates/version.hpp.in b/templates/version.hpp.in index 68b7badfa0..02eab085d1 100644 --- a/templates/version.hpp.in +++ b/templates/version.hpp.in @@ -30,16 +30,13 @@ #define STREAMFX_MASK_COMPAT 0xFFFFFFFF00000000ull #define STREAMFX_MASK_UPDATE 0xFFFFFFFFFFFF0000ull -#define STREAMFX_COMMIT "@VERSION_COMMIT@" +#define STREAMFX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@u +#define STREAMFX_VERSION_MINOR @PROJECT_VERSION_MINOR@u +#define STREAMFX_VERSION_PATCH @PROJECT_VERSION_PATCH@u +#define STREAMFX_VERSION_TWEAK @PROJECT_VERSION_TWEAK@u +#define STREAMFX_VERSION_PRERELEASE "@PROJECT_VERSION_PRERELEASE@" +#define STREAMFX_VERSION_BUILD "@PROJECT_VERSION_BUILD@" #define STREAMFX_VERSION \ STREAMFX_MAKE_VERSION(STREAMFX_VERSION_MAJOR, STREAMFX_VERSION_MINOR, STREAMFX_VERSION_PATCH, \ - STREAMFX_VERSION_BUILD) -#define STREAMFX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ -#define STREAMFX_VERSION_MINOR @PROJECT_VERSION_MINOR@ -#define STREAMFX_VERSION_PATCH @PROJECT_VERSION_PATCH@ -#define STREAMFX_VERSION_BUILD @PROJECT_VERSION_TWEAK@ -#define STREAMFX_VERSION_TWEAK @PROJECT_VERSION_TWEAK@ -#define STREAMFX_VERSION_SUFFIX "@VERSION_STAGE@" -#define STREAMFX_VERSION_STAGE "@VERSION_STAGE@" -#define STREAMFX_VERSION_COMMIT "@VERSION_COMMIT@" -#define STREAMFX_VERSION_STRING "@VERSION_STRING@" + STREAMFX_VERSION_TWEAK) +#define STREAMFX_VERSION_STRING "@PROJECT_VERSION@" From f10096da98fb3b9c2520db23fa7e8806dec691c9 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 31 Jul 2022 00:14:24 +0200 Subject: [PATCH 051/164] cmake: Unify project metadata across platforms --- CMakeLists.txt | 21 ++++++++---------- templates/installer-signed.iss.in | 8 +++---- templates/installer.iss.in | 8 +++---- templates/installer.pkgproj.in | 6 ++--- templates/module.cpp.in | 2 +- templates/version.rc.in | 37 +++++++++---------------------- 6 files changed, 32 insertions(+), 50 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 911f61c06a..6b907cdfc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,6 +183,8 @@ message(STATUS "${LOGPREFIX}Version ${PROJECT_VERSION}") ################################################################################ # Project ################################################################################ + +# Metadata version(GENERATE PROJECT_VERSION_CMAKE MAJOR "${PROJECT_VERSION_MAJOR}" MINOR "${PROJECT_VERSION_MINOR}" @@ -195,19 +197,14 @@ project( DESCRIPTION "Additional sources, filters, transitions and encoders for OBS Studio." HOMEPAGE_URL "https://streamfx.xaymar.com/" ) - -# Full Project Name -set(PROJECT_FULL_NAME "StreamFX (for OBS Studio)") - -# Description -set(PROJECT_DESCRIPTION "Better Production Quality, for free.") - -# Authors (TODO: Generate this from AUTHORS) +set(PROJECT_TITLE "StreamFX (for OBS Studio)") set(PROJECT_AUTHORS "Michael Fabian 'Xaymar' Dirks ") - -# Copyright Years (TODO: Update every year) -set(PROJECT_COPYRIGHT_YEARS "2018 - 2020") - +set(PROJECT_COPYRIGHT "2017 - 2022, Michael Fabian Dirks. All Rights Reserved") +set(PROJECT_TRADEMARKS "") +list(APPEND PROJECT_TRADEMARKS + "AMD is a trademark of Advanced Micro Devices Inc." + "NVIDIA is a trademark of Nvidia Corporation" +) ################################################################################ # Platform Setup diff --git a/templates/installer-signed.iss.in b/templates/installer-signed.iss.in index b2c3d6f23c..467bbd809d 100644 --- a/templates/installer-signed.iss.in +++ b/templates/installer-signed.iss.in @@ -1,12 +1,12 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! -#define MyAppName "@PROJECT_FULL_NAME@" -#define MyAppVersion "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@.@VERSION_TWEAK@" -#define MyAppVersionText "@VERSION_STRING@" +#define MyAppName "@PROJECT_TITLE@" +#define MyAppVersion "@PROJECT_VERSION_CMAKE@" +#define MyAppVersionText "@PROJECT_VERSION@" #define MyAppPublisher "Xaymars Technology Workshop" #define MyAppURL "https://xaymar.com/" -#define MyAppCopyright "@PROJECT_COPYRIGHT_YEARS@ @PROJECT_AUTHORS@" +#define MyAppCopyright "@PROJECT_COPYRIGHT@" [Setup] ; NOTE: The value of AppId uniquely identifies this application. diff --git a/templates/installer.iss.in b/templates/installer.iss.in index bc21f2fba4..506877bf3e 100644 --- a/templates/installer.iss.in +++ b/templates/installer.iss.in @@ -1,12 +1,12 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! -#define MyAppName "@PROJECT_FULL_NAME@" -#define MyAppVersion "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@.@VERSION_TWEAK@" -#define MyAppVersionText "@VERSION_STRING@" +#define MyAppName "@PROJECT_TITLE@" +#define MyAppVersion "@PROJECT_VERSION_CMAKE@" +#define MyAppVersionText "@PROJECT_VERSION@" #define MyAppPublisher "Xaymars Technology Workshop" #define MyAppURL "https://xaymar.com/" -#define MyAppCopyright "@PROJECT_COPYRIGHT_YEARS@ @PROJECT_AUTHORS@" +#define MyAppCopyright "@PROJECT_COPYRIGHT@" [Setup] ; NOTE: The value of AppId uniquely identifies this application. diff --git a/templates/installer.pkgproj.in b/templates/installer.pkgproj.in index 8d1f175f2b..d9cc7924e5 100644 --- a/templates/installer.pkgproj.in +++ b/templates/installer.pkgproj.in @@ -512,7 +512,7 @@ FOLLOW_SYMBOLIC_LINKS IDENTIFIER - com.xaymar.StreamFX + com.xaymar.@PROJECT_NAME@ LOCATION 0 NAME @@ -528,7 +528,7 @@ USE_HFS+_COMPRESSION VERSION - 1.0 + @PROJECT_VERSION_CMAKE@ TYPE 0 @@ -691,7 +691,7 @@ LANGUAGE English VALUE - @PROJECT_FULL_NAME@ + @PROJECT_TITLE@ diff --git a/templates/module.cpp.in b/templates/module.cpp.in index 7eb1c2a698..c27ea004ab 100644 --- a/templates/module.cpp.in +++ b/templates/module.cpp.in @@ -14,7 +14,7 @@ OBS_MODULE_USE_DEFAULT_LOCALE("@PROJECT_NAME@", "en-US") MODULE_EXPORT const char* obs_module_name() { - return "@PROJECT_FULL_NAME@"; + return "@PROJECT_TITLE@"; } MODULE_EXPORT const char* obs_module_description() diff --git a/templates/version.rc.in b/templates/version.rc.in index a9c0b7bd7b..f4c61a5962 100644 --- a/templates/version.rc.in +++ b/templates/version.rc.in @@ -3,12 +3,6 @@ #include #include -#define VER_FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@ -#define VER_FILEVERSION_STR "@VERSION_STRING@\0" - -#define VER_PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@ -#define VER_PRODUCTVERSION_STR "@VERSION_STRING@\0" - #ifndef DEBUG #define VER_DEBUG 0 #else @@ -16,8 +10,8 @@ #endif VS_VERSION_INFO VERSIONINFO -FILEVERSION VER_FILEVERSION -PRODUCTVERSION VER_PRODUCTVERSION +FILEVERSION @PROJECT_VERSION_CMAKE@ +PRODUCTVERSION @PROJECT_VERSION_CMAKE@ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS (VER_DEBUG) FILEOS VOS__WINDOWS32 @@ -26,31 +20,22 @@ FILESUBTYPE VFT2_UNKNOWN BEGIN BLOCK "StringFileInfo" BEGIN - BLOCK "040904E4" + BLOCK "040904B0" BEGIN - VALUE "CompanyName", "@PROJECT_COMPANY_NAME@\0" - VALUE "FileDescription", "@PROJECT_DESCRIPTION@\0" - VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "OriginalFilename", "@PROJECT_NAME@" ".dll\0" VALUE "InternalName", "@PROJECT_NAME@\0" + VALUE "ProductName", "@PROJECT_TITLE@\0" + VALUE "FileDescription", "@PROJECT_DESCRIPTION@\0" + VALUE "CompanyName", "@PROJECT_AUTHORS@\0" VALUE "LegalCopyright", "@PROJECT_COPYRIGHT@\0" - VALUE "LegalTrademarks1", "@PROJECT_LEGAL_TRADEMARKS_1@\0" - VALUE "LegalTrademarks2", "@PROJECT_LEGAL_TRADEMARKS_1@\0" - VALUE "OriginalFilename", "@PROJECT_NAME@\0" - VALUE "ProductName", "@PROJECT_PRODUCT_NAME@\0" - VALUE "ProductVersion", VER_PRODUCTVERSION_STR + VALUE "LegalTrademarks", "@PROJECT_TRADEMARKS@\0" + VALUE "FileVersion", "@VERSION_STRING@\0" + VALUE "ProductVersion", "@VERSION_STRING@\0" END END BLOCK "VarFileInfo" BEGIN - /* The following line should only be modified for localized versions. */ - /* It consists of any number of WORD,WORD pairs, with each pair */ - /* describing a language,codepage combination supported by the file. */ - /* */ - /* For example, a file might have values "0x409,1252" indicating that it */ - /* supports English language (0x409) in the Windows ANSI codepage (1252). */ - - VALUE "Translation", 0x409, 1252 - + VALUE "Translation", 0x0409, 0x04B0 END END From 2acaf7c28069ec0382493156cb7b9dcb4cfbdeec Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 6 Aug 2022 18:31:59 +0200 Subject: [PATCH 052/164] cmake: Support building with Qt5 and Qt6 This allows developers to pick their flavor of Qt, potentially enabling more advanced integrations with Qt in the future. Eventually Qt5 support may be dropped in favor of Qt6. Fixes #811 --- CMakeLists.txt | 120 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 90 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b907cdfc7..1264d36a8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -899,7 +899,7 @@ endfunction() function(feature_frontend RESOLVE) is_feature_enabled(FRONTEND T_CHECK) if(RESOLVE AND T_CHECK) - if(NOT HAVE_QT) + if(NOT (Qt6_FOUND OR Qt5_FOUND)) message(WARNING "${LOGPREFIX}Front-End requires Qt. Disabling...") set_feature_disabled(FRONTEND ON) elseif(NOT HAVE_OBS_FRONTEND_API) @@ -1095,13 +1095,46 @@ if(REQUIRE_NVIDIA_CUDA AND D_PLATFORM_WINDOWS) set(HAVE_NVIDIA_CUDA ON) endif() -#- Qt5 -set(HAVE_QT OFF) +#- Qt if(REQUIRE_QT) - find_package(Qt5 - COMPONENTS Widgets Core REQUIRED - ) - set(HAVE_QT ${Qt5_FOUND}) + # Try Qt6 first... + find_package(Qt6 + COMPONENTS Core Gui Widgets + CONFIG + HINTS + "${Qt6_DIR}" + "${Qt6_DIR}/lib" + "${Qt6_DIR}/lib/cmake" + "${Qt6_DIR}/lib/cmake/Qt6" + "${QTDIR}" + "${QTDIR}/lib" + "${QTDIR}/lib/cmake" + "${QTDIR}/lib/cmake/Qt6" + "${DepsPath}" + "${DepsPath}/lib" + "${DepsPath}/lib/cmake" + "${DepsPath}/lib/cmake/Qt6" + ) + if(NOT Qt6_FOUND) + # If Qt6 isn't present, try Qt5 + find_package(Qt5 + COMPONENTS Core Gui Widgets + CONFIG + HINTS + "${Qt5_DIR}" + "${Qt5_DIR}/lib" + "${Qt5_DIR}/lib/cmake" + "${Qt5_DIR}/lib/cmake/Qt5" + "${QTDIR}" + "${QTDIR}/lib" + "${QTDIR}/lib/cmake" + "${QTDIR}/lib/cmake/Qt5" + "${DepsPath}" + "${DepsPath}/lib" + "${DepsPath}/lib/cmake" + "${DepsPath}/lib/cmake/Qt5" + ) + endif() endif() # Verify Requirements @@ -1303,8 +1336,12 @@ if(REQUIRE_OBS_FRONTEND_API AND HAVE_OBS_FRONTEND_API) list(APPEND PROJECT_LIBRARIES obs-frontend-api) endif() -if(REQUIRE_QT AND HAVE_QT) - list(APPEND PROJECT_LIBRARIES Qt5::Core Qt5::Widgets) +if(REQUIRE_QT) + if(Qt5_FOUND) + list(APPEND PROJECT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets) + elseif(Qt6_FOUND) + list(APPEND PROJECT_LIBRARIES Qt6::Core Qt6::Gui Qt6::Widgets) + endif() endif() ################################################################################ @@ -1949,7 +1986,7 @@ set_source_files_properties(${PROJECT_DATA} ${PROJECT_TEMPLATES} ${PROJECT_UI} P ) # Prevent non-UI files from being Qt'd -if(HAVE_QT) +if(Qt5_Found OR Qt6_FOUND) set_source_files_properties(${PROJECT_DATA} ${PROJECT_TEMPLATES} ${PROJECT_PRIVATE_GENERATED} ${PROJECT_PRIVATE_SOURCE} PROPERTIES SKIP_AUTOGEN ON SKIP_AUTOMOC ON @@ -2197,7 +2234,7 @@ if(D_PLATFORM_WINDOWS) endif() # Enable Qt if needed -if(HAVE_QT) +if(Qt5_FOUND OR Qt6_FOUND) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOUIC ON AUTOUIC_SEARCH_PATHS "${PROJECT_SOURCE_DIR};${PROJECT_SOURCE_DIR}/ui" @@ -2254,28 +2291,51 @@ if(D_PLATFORM_MAC) message(STATUS "${LOGPREFIX}Added post-build step for adjusting libobs-frontend-api linking path.") endif() - # Qt5 - if(REQUIRE_QT AND HAVE_QT) - # Figure out the linker location for Qt5::Core - mac_get_linker_id(TARGET Qt5::Core OUTPUT T_QT5CORE_LINK) + # Qt + if(REQUIRE_QT) + if(Qt5_FOUND) + # Figure out the linker location for Qt5::Core + mac_get_linker_id(TARGET Qt5::Core OUTPUT T_QT5CORE_LINK) - # Figure out the linker location for Qt5::Gui - mac_get_linker_id(TARGET Qt5::Gui OUTPUT T_QT5GUI_LINK) + # Figure out the linker location for Qt5::Gui + mac_get_linker_id(TARGET Qt5::Gui OUTPUT T_QT5GUI_LINK) - # Figure out the linker location for Qt5::Widsgets - mac_get_linker_id(TARGET Qt5::Widgets OUTPUT T_QT5WIDGETS_LINK) + # Figure out the linker location for Qt5::Widsgets + mac_get_linker_id(TARGET Qt5::Widgets OUTPUT T_QT5WIDGETS_LINK) - add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - # - QtCore - COMMAND install_name_tool ARGS -change "${T_QT5CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore" $ - # - QtGui - COMMAND install_name_tool ARGS -change "${T_QT5GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $ - # - QtWidgets - COMMAND install_name_tool ARGS -change "${T_QT5WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" $ - ) - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Core linking path (Found: ${Qt5_DIR} resolved to ${T_QT5CORE_LINK}).") - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Gui linking path (Found: ${Qt5_DIR} resolved to ${T_QT5GUI_LINK}).") - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Widgets linking path (Found: ${Qt5_DIR} resolved to ${T_QT5WIDGETS_LINK}).") + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + # - QtCore + COMMAND install_name_tool ARGS -change "${T_QT5CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore" $ + # - QtGui + COMMAND install_name_tool ARGS -change "${T_QT5GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $ + # - QtWidgets + COMMAND install_name_tool ARGS -change "${T_QT5WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" $ + ) + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Core linking path (Found: ${Qt5_DIR} resolved to ${T_QT5CORE_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Gui linking path (Found: ${Qt5_DIR} resolved to ${T_QT5GUI_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Widgets linking path (Found: ${Qt5_DIR} resolved to ${T_QT5WIDGETS_LINK}).") + elseif(Qt6_FOUND) + # Figure out the linker location for Qt6::Core + mac_get_linker_id(TARGET Qt6::Core OUTPUT T_QT6CORE_LINK) + + # Figure out the linker location for Qt6::Gui + mac_get_linker_id(TARGET Qt6::Gui OUTPUT T_QT6GUI_LINK) + + # Figure out the linker location for Qt6::Widsgets + mac_get_linker_id(TARGET Qt6::Widgets OUTPUT T_QT6WIDGETS_LINK) + + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + # - QtCore + COMMAND install_name_tool ARGS -change "${T_QT6CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/6/QtCore" $ + # - QtGui + COMMAND install_name_tool ARGS -change "${T_QT6GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/6/QtGui" $ + # - QtWidgets + COMMAND install_name_tool ARGS -change "${T_QT6WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/6/QtWidgets" $ + ) + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Core linking path (Found: ${Qt6_DIR} resolved to ${T_QT6CORE_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Gui linking path (Found: ${Qt6_DIR} resolved to ${T_QT6GUI_LINK}).") + message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Widgets linking path (Found: ${Qt6_DIR} resolved to ${T_QT6WIDGETS_LINK}).") + endif() endif() endif() From 5b8a0bbcb5142578fe073f277d9a480b37ede941 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Sat, 6 Aug 2022 20:16:28 +0200 Subject: [PATCH 053/164] locale: New Crowdin updates (#832) * New translations en-US.ini (French) * New translations en-US.ini (Sinhala) * New translations en-US.ini (Arabic) * New translations en-US.ini (Turkish) * New translations en-US.ini (Romanian) * New translations en-US.ini (Thai) * New translations en-US.ini (Thai) * New translations en-US.ini (Arabic) * New translations en-US.ini (Arabic) * New translations en-US.ini (Romanian) --- data/locale/ar-SA.ini | 120 ++++++++++++ data/locale/fr-FR.ini | 2 + data/locale/ro-RO.ini | 24 +++ data/locale/si-LK.ini | 437 +++++++++++++++++++++++++++++++++++++++++- data/locale/th-TH.ini | 28 +++ data/locale/tr-TR.ini | 14 ++ 6 files changed, 622 insertions(+), 3 deletions(-) diff --git a/data/locale/ar-SA.ini b/data/locale/ar-SA.ini index 00e4be094a..2f968a1162 100644 --- a/data/locale/ar-SA.ini +++ b/data/locale/ar-SA.ini @@ -51,17 +51,133 @@ UI.Updater.GitHubPermission.Text="يعتمد StreamFX على GitHub لتوفير UI.Updater.Menu.CheckForUpdates="التحقق من وجود تحديثات" UI.Updater.Menu.CheckForUpdates.Automatically="التحقق تلقائياً من وجود تحديثات" UI.Updater.Menu.Channel="قناة التحديث" +UI.Updater.Menu.Channel.Stable="اسطبل" +UI.Updater.Menu.Channel.Candidate="المرشح" +UI.Updater.Menu.Channel.Beta="الإصدار التجريبي" UI.Updater.Menu.Channel.Alpha="ألفا (شفافية)" Encoder.AOM.AV1="AOM AV1 (مباشر)" Encoder.AOM.AV1.Encoder="مساعدة" Encoder.AOM.AV1.Encoder.Usage="إستخدام" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="ذات نوعية جيدة" +Encoder.AOM.AV1.Encoder.Usage.RealTime="الوقت الحالي" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="كل الإطارات الداخلية" +Encoder.AOM.AV1.Encoder.CPUUsage="المستخدم من المعالج" +Encoder.AOM.AV1.Encoder.CPUUsage.0="الوهمي" +Encoder.AOM.AV1.Encoder.CPUUsage.1="بطيء جداً" +Encoder.AOM.AV1.Encoder.CPUUsage.2="أبطئ" +Encoder.AOM.AV1.Encoder.CPUUsage.3="بطيء" +Encoder.AOM.AV1.Encoder.CPUUsage.4="متوسط" +Encoder.AOM.AV1.Encoder.CPUUsage.5="سريع" +Encoder.AOM.AV1.Encoder.CPUUsage.6="أسرع" +Encoder.AOM.AV1.Encoder.CPUUsage.7="سريع جدا" +Encoder.AOM.AV1.Encoder.CPUUsage.8="سرعة فائقة" +Encoder.AOM.AV1.Encoder.CPUUsage.9="سرعة فائقة جدا" +Encoder.AOM.AV1.Encoder.CPUUsage.10="سريع بجنون" +Encoder.AOM.AV1.Encoder.Profile="الملف الشخصي" +Encoder.AOM.AV1.KeyFrames="مفتاح الإطارات" +Encoder.AOM.AV1.KeyFrames.IntervalType="نوع الفاصل الزمني" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="إطارات" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="ثواني" +Encoder.AOM.AV1.KeyFrames.Interval="مدّة" +Encoder.AOM.AV1.RateControl="التحكم في المعدل" +Encoder.AOM.AV1.RateControl.Mode="وضع" +Encoder.AOM.AV1.RateControl.Mode.CBR="معدل ثابت (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="معدل بايت متغير (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="جودة مقيدة (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="جودة ثابتة (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="نظرة إلى الأمام" +Encoder.AOM.AV1.RateControl.Limits="الحد" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="معدل البت" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="بيتات تحت الصمود" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="متجاوز بيت" +Encoder.AOM.AV1.RateControl.Limits.Quality="الجودة" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="الحد الأدنى للكمية" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="الحد الأقصى للكمية" +Encoder.AOM.AV1.RateControl.Buffer="الصوان" Encoder.AOM.AV1.RateControl.Buffer.Size="الحجم" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="الحجم الأولي" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="الحجم الأمثل" +Encoder.AOM.AV1.Advanced="متقدم" +Encoder.AOM.AV1.Advanced.Threads="المواضيع" +Encoder.AOM.AV1.Advanced.RowMultiThreading="عرض متعدد لكل صف" +Encoder.AOM.AV1.Advanced.Tile.Columns="أعمدة البلاط" +Encoder.AOM.AV1.Advanced.Tile.Rows="صفوف البلاط" +Encoder.AOM.AV1.Advanced.Tune="لحن" +Encoder.AOM.AV1.Advanced.Tune.Metric="متري" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="ذروة نسبة الإشارة إلى الضوضاء (PSNR)" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="التشابه الهيكلي (SSIM)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (مع المعالجة المسبقة)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (دون معالجة مسبقة)" +Encoder.FFmpeg.KeyFrames.IntervalType="نوع الفاصل الزمني" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="إطارات" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="ثواني" +Encoder.FFmpeg.KeyFrames.Interval="مدّة" +Encoder.FFmpeg.AMF.Preset.Quality="الجودة" +Encoder.FFmpeg.AMF.RateControl="خيارات التحكم في المعدل" +Encoder.FFmpeg.AMF.RateControl.Mode="وضع" +Encoder.FFmpeg.AMF.RateControl.LookAhead="المظهر للأمام" +Encoder.FFmpeg.AMF.RateControl.Limits="الحد" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="حجم الصوان" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="هدف معدل بايت" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="الحد الأقصى لمعدل البِت" +Encoder.FFmpeg.AMF.RateControl.QP="بارومترات الكم" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.AMF.Other="الخيارات الأخرى" +Encoder.FFmpeg.AMF.Other.BFrames="الحد الأقصى لاطارات B-B" Encoder.FFmpeg.NVENC.Preset.default="افتراضي" +Encoder.FFmpeg.NVENC.Preset.slow="بطيء" +Encoder.FFmpeg.NVENC.Preset.medium="متوسط" +Encoder.FFmpeg.NVENC.Preset.fast="سريع" +Encoder.FFmpeg.NVENC.Preset.p6="أبطأ (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="أبطأ شيئ (P7)" +Encoder.FFmpeg.NVENC.Tune="لحن" +Encoder.FFmpeg.NVENC.Tune.hq="جودة عالية" +Encoder.FFmpeg.NVENC.Tune.ll="زمن انتقالي قصير" +Encoder.FFmpeg.NVENC.Tune.ull="لاتفيا منخفضة جداً" +Encoder.FFmpeg.NVENC.Tune.lossless="بدون فقدان بيانات" +Encoder.FFmpeg.NVENC.RateControl="خيارات التحكم في المعدل" +Encoder.FFmpeg.NVENC.RateControl.Mode="وضع" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="معلمة الكم الثابت" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="معدل بايت متغير (VBR)" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="معدل ثابت (CBR)" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="مرحلتان" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="متعددة مسار" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="مرر واحد" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="دالة مرحلتين في الربع" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="دالة مرحلتين في الربع" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="المظهر للأمام" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="إطارات تكيفية I-إطارات" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="إطارات التكيف B" +Encoder.FFmpeg.NVENC.RateControl.Limits="الحد" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="حجم الصوان" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="جودة الهدف" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="هدف معدل بايت" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="الحد الأقصى لمعدل البِت" +Encoder.FFmpeg.NVENC.RateControl.QP="بارومترات الكم" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="الحد الأدنى لجودة الصورة (QP)" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="الحد الأعلى لجودة الصورة (QP)" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.NVENC.AQ="الكم التكيفي" +Encoder.FFmpeg.NVENC.AQ.Spatial="كمية التكيف المكاني" +Encoder.FFmpeg.NVENC.AQ.Strength="قوة القياس الكمي التكيفي المكاني" +Encoder.FFmpeg.NVENC.AQ.Temporal="الكميات التكيفية المؤقتة" +Encoder.FFmpeg.NVENC.Other="الخيارات الأخرى" +Encoder.FFmpeg.NVENC.Other.BFrames="الحد الأقصى لاطارات B-B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="وضع مرجع الإطار B-B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="لن يتم استخدام أي إطارات B كمرجع" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="فقط B-Frames/2 سوف تستخدم كمرجع" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="سيتم استخدام كل إطار B-framework كمرجع" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="لاتفيا صفر" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="توقعات مرجحة" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Non-reference P-Frames" Blur.Type.Box="صندوق" Blur.Type.BoxLinear="صندوق خطي" @@ -90,6 +206,7 @@ Filter.Shader="التظليل" Source.Shader="التظليل" Transition.Shader="التظليل" +Filter.AutoFraming.Tracking.Mode="وضع" Filter.AutoFraming.Framing.Offset="إزاحة الألوان" Filter.Blur="غشاوة" @@ -148,9 +265,12 @@ Filter.ColorGrade.Tint.Mode.Linear="خطي" +Filter.Transform.Camera.Mode="وضع" Filter.Transform.Mipmapping="تمكين ميب ماب" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="وضع" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="الجودة" Source.Mirror.Source="المصدر" diff --git a/data/locale/fr-FR.ini b/data/locale/fr-FR.ini index 3c25dcb49a..548561dcda 100644 --- a/data/locale/fr-FR.ini +++ b/data/locale/fr-FR.ini @@ -51,6 +51,8 @@ UI.Updater.GitHubPermission.Text="Afin de fournir une vérification manuelle ou UI.Updater.Menu.CheckForUpdates="Vérifier les Mises à jour" UI.Updater.Menu.CheckForUpdates.Automatically="Vérifier automatiquement les Mises à jour" UI.Updater.Menu.Channel="Canal de Mise à jour" +UI.Updater.Menu.Channel.Stable="Écurie" +UI.Updater.Menu.Channel.Candidate="Candidats" UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1="AOM AV1 (directe)" diff --git a/data/locale/ro-RO.ini b/data/locale/ro-RO.ini index 0f56d467ec..67905d6035 100644 --- a/data/locale/ro-RO.ini +++ b/data/locale/ro-RO.ini @@ -25,6 +25,12 @@ State.Automatic="Automat" State.Default="Prestabilit" UI.Menu="StreamFX" +UI.Menu.Wiki="Citește Wiki" +UI.Menu.Support="Ajutor și asistență" +UI.Menu.Website="Vizitați site-ul StreamFX" +UI.Menu.Discord="Intră pe canalul de Discord StreamFX" +UI.Menu.Twitter="Urmărește StreamFX pe Twitter" +UI.Menu.YouTube="Abonează-te la StreamFX pe YouTube" UI.Menu.About="Despre StreamFX" UI.About.Title="Despre StreamFX" @@ -50,9 +56,26 @@ UI.Updater.Menu.Channel.Candidate="Candidat" UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Setări transparenta" +Encoder.AOM.AV1="AOM AV1 (direct)" +Encoder.AOM.AV1.Encoder="Codificator" +Encoder.AOM.AV1.Encoder.Usage="Utilizare" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Calitate bună" +Encoder.AOM.AV1.Encoder.Usage.RealTime="În timp real" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Toate Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="Utilizare CPU" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Foarte încet" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Mai încet" Encoder.AOM.AV1.Encoder.CPUUsage.3="Încet" Encoder.AOM.AV1.Encoder.CPUUsage.4="Mediu" Encoder.AOM.AV1.Encoder.CPUUsage.5="Rapid" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Mai rapid" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Foarte rapid" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super rapid" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra rapid" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Nebunește de rapid" +Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Cadru cheie" Encoder.AOM.AV1.KeyFrames.IntervalType="Tip Interval" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Cadre" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Secunde" @@ -62,6 +85,7 @@ Encoder.AOM.AV1.RateControl.Limits="Limite" Encoder.AOM.AV1.RateControl.Limits.Quality="Calitate" Encoder.AOM.AV1.RateControl.Buffer.Size="Dimensiune" +Encoder.FFmpeg.GPU="GPU" Encoder.FFmpeg.KeyFrames.IntervalType="Tip Interval" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Cadre" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Secunde" diff --git a/data/locale/si-LK.ini b/data/locale/si-LK.ini index 2410163d7c..693886bacc 100644 --- a/data/locale/si-LK.ini +++ b/data/locale/si-LK.ini @@ -1,44 +1,475 @@ +Advanced="ඉහල විකල්ප" +Manual.Open="අත්පොත විවෘත කරන්න" Channel.Red="රතු" -Channel.Green="කොළ" +Channel.Green="කොළඹ" +Channel.Blue="නිල්" +Channel.Alpha="ඇල්ෆා" FileType.Image="පින්තූරය" FileType.Images="පින්තූර" FileType.Video="දෘශ්‍ය පටිය" FileType.Videos="දෘශ්‍ය පට" FileType.Sound="ශබ්දය" -FileType.Sounds="ශබ්ද" +FileType.Sounds="ශබ්දය" +FileType.Effect="බලපෑම" +FileType.Effects="බලපෑම්" +SourceType.Source="මූලාශ්රය" +SourceType.Scene="දර්ශනය" State.Disabled="අබල කර ඇත" State.Enabled="සබල කර ඇත" +State.Manual="අත්පොත" State.Automatic="ස්වයංක්‍රීය" +State.Default="පෙරනිමිය" +UI.Menu.Wiki="විකිය කියවන්න" +UI.Menu.Support="උදව් සහ සහය" +UI.Menu.Website="StreamFX වෙබ් අඩවියට පිවිසෙන්න" +UI.Menu.Discord="StreamFX Discord හා සම්බන්ධ වන්න" +UI.Menu.Twitter="Twitter හි StreamFX අනුගමනය කරන්න" +UI.Menu.YouTube="YouTube හි StreamFX වෙත දායක වන්න" +UI.Menu.About="StreamFX ගැන" +UI.About.Title="StreamFX ගැන" +UI.About.Text="

StreamFX සියලු ආධාරකරුවන් විසින් Patreon, Github අනුග්‍රාහකයින්, සහ PayPalහරහා පරිත්‍යාග කරන ඕනෑම අයෙකුට හැකි වේ. Crowdinහි ප්‍රාදේශීයකරණයට උදවු කරන සියලුම පරිවර්තකයන්ට අමතර ස්තුතිය පුදකරයි. ඔබ සියලු දෙනාම පුදුමයි!

" +UI.About.Role.Contributor="දායකයා" +UI.About.Role.Translator="පරිවර්තකයා" +UI.About.Role.Supporter="ආධාරකරු" +UI.About.Version="පිටපත:" +UI.Updater.Dialog.Title="StreamFX අනුවාදය %s දැන් තිබේ!" +UI.Updater.Dialog.Text="StreamFX හි නව අනුවාදයක් බාගත කිරීමට තිබේ." +UI.Updater.Dialog.Version.Current="වත්මන් අනුවාදය:" +UI.Updater.Dialog.Version.Latest="නවතම අනුවාදය:" +UI.Updater.Dialog.Button.Ok="බාගැනීම් පිටුව විවෘත කරන්න" +UI.Updater.Dialog.Button.Cancel="මට පසුව මතක් කරන්න" +UI.Updater.GitHubPermission.Title="GitHub වෙත සම්බන්ධ වීමට StreamFX හට ඔබගේ අවසරය අවශ්‍යයි!" +UI.Updater.GitHubPermission.Text="අතින් හෝ ස්වයංක්‍රීය යාවත්කාලීන පිරික්සීම සැපයීම සඳහා, නවතම තොරතුරු ලබා ගැනීමට StreamFX GitHub API මත රඳා පවතී.
කරුණාකර Github රහස්‍යතා ප්‍රකාශයකියවා, ඔබ එකඟ නම් 'හරි' ක්ලික් කරන්න, හෝ ඔබ එකඟ නොවන්නේ නම් 'අවලංගු කරන්න' ක්ලික් කරන්න." +UI.Updater.Menu.CheckForUpdates="යාවත්කාලීන සඳහා පරීක්ෂා කරන්න" +UI.Updater.Menu.CheckForUpdates.Automatically="යාවත්කාලීන සඳහා ස්වයංක්‍රීයව පරීක්ෂා කරන්න" +UI.Updater.Menu.Channel="නාලිකාව යාවත්කාලීන කරන්න" +UI.Updater.Menu.Channel.Stable="ස්ථාවර" +UI.Updater.Menu.Channel.Candidate="අපේක්ෂකයා" +UI.Updater.Menu.Channel.Beta="බීටා" +UI.Updater.Menu.Channel.Alpha="ඇල්ෆා" +Encoder.AOM.AV1="AOM AV1 (සෘජු)" +Encoder.AOM.AV1.Encoder="සංකේතකය" Encoder.AOM.AV1.Encoder.Usage="භාවිතය" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="හොඳ ගුණාත්මකභාවය" +Encoder.AOM.AV1.Encoder.Usage.RealTime="තත්ය කාලය" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="සියලුම අභ්‍යන්තර රාමු" +Encoder.AOM.AV1.Encoder.CPUUsage="CPU භාවිතය" +Encoder.AOM.AV1.Encoder.CPUUsage.0="ප්ලේසෙබෝ" +Encoder.AOM.AV1.Encoder.CPUUsage.1="ඉතා මන්දගාමී" +Encoder.AOM.AV1.Encoder.CPUUsage.2="හිමින්" +Encoder.AOM.AV1.Encoder.CPUUsage.3="මන්දගාමී" +Encoder.AOM.AV1.Encoder.CPUUsage.4="මධ්යම" +Encoder.AOM.AV1.Encoder.CPUUsage.5="ඉක්මනින්" +Encoder.AOM.AV1.Encoder.CPUUsage.6="ඉක්මනින්" +Encoder.AOM.AV1.Encoder.CPUUsage.7="ඉතා වේගවත්" +Encoder.AOM.AV1.Encoder.CPUUsage.8="සුපිරි වේගවත්" +Encoder.AOM.AV1.Encoder.CPUUsage.10="ඉතා වේගවත්" +Encoder.AOM.AV1.Encoder.Profile="පැතිකඩ" +Encoder.AOM.AV1.KeyFrames="යතුරු රාමුව" +Encoder.AOM.AV1.KeyFrames.IntervalType="අන්තරාලය වර්ගය" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="රාමු" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="තත්පර" +Encoder.AOM.AV1.KeyFrames.Interval="අන්තරය" +Encoder.AOM.AV1.RateControl="අනුපාත පාලනය" +Encoder.AOM.AV1.RateControl.Mode="මාදිලිය" +Encoder.AOM.AV1.RateControl.Mode.CBR="නියත බිට්රේට් (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="විචල්‍ය බිට්‍රේට් (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="සීමා සහිත ගුණාත්මකභාවය (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="ස්ථාවර ගුණාත්මකභාවය (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="ඉදිරිය බලන්න" +Encoder.AOM.AV1.RateControl.Limits="සීමාවන්" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="බිට්රේට්" +Encoder.AOM.AV1.RateControl.Limits.Quality="ගුණාත්මක" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="අවම Quantizer" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="උපරිම Quantizer" +Encoder.AOM.AV1.RateControl.Buffer="බෆරය" +Encoder.AOM.AV1.RateControl.Buffer.Size="ප්රමාණය" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="ආරම්භක ප්රමාණය" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="ප්රශස්ත ප්රමාණය" +Encoder.AOM.AV1.Advanced="උසස්" +Encoder.AOM.AV1.Advanced.Threads="නූල්" +Encoder.AOM.AV1.Advanced.RowMultiThreading="පේළියට බහු නූල් දැමීම" +Encoder.AOM.AV1.Advanced.Tile.Columns="ටයිල් තීරු" +Encoder.AOM.AV1.Advanced.Tile.Rows="ටයිල් පේළි" +Encoder.AOM.AV1.Advanced.Tune="සුසර කරන්න" +Encoder.AOM.AV1.Advanced.Tune.Metric="මෙට්රික්" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (පෙර සැකසුම් සහිත)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (පෙර-සැකසීමකින් තොරව)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="බටර්රොග්ලි" +Encoder.AOM.AV1.Advanced.Tune.Content="අන්තර්ගතය" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="තිරය" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="චිත්රපටය" +Encoder.FFmpeg="FFmpeg විකල්ප" +Encoder.FFmpeg.Suffix=" (FFmpeg හරහා)" +Encoder.FFmpeg.CustomSettings="අභිරුචි සැකසුම්" +Encoder.FFmpeg.Threads="නූල් ගණන" +Encoder.FFmpeg.KeyFrames="යතුරු රාමු" +Encoder.FFmpeg.KeyFrames.IntervalType="අන්තරාලය වර්ගය" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="රාමු" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="තත්පර" +Encoder.FFmpeg.KeyFrames.Interval="අන්තරය" +Encoder.FFmpeg.AMF.Preset="පෙරසිටුවයි" +Encoder.FFmpeg.AMF.Preset.Speed="වේගය" +Encoder.FFmpeg.AMF.Preset.Balanced="සමබරයි" +Encoder.FFmpeg.AMF.Preset.Quality="ගුණාත්මක" +Encoder.FFmpeg.AMF.RateControl="අනුපාත පාලන විකල්ප" +Encoder.FFmpeg.AMF.RateControl.Mode="මාදිලිය" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="නියත ප්‍රමාණකරණ පරාමිතිය" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="විචල්‍ය බිට්‍රේට් (උච්ච සීමා සහිත)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="විචල්‍ය බිට්‍රේට් (ප්‍රමාද සීමා සහිත)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="ස්ථාවර බිට්රේට්" +Encoder.FFmpeg.AMF.RateControl.LookAhead="ඉදිරිය බලන්න" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="රාමු මඟ හැරීම" +Encoder.FFmpeg.AMF.RateControl.Limits="සීමාවන්" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="බෆර් ප්රමාණය" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="ඉලක්කගත බිට්රේට්" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="උපරිම බිට්රේට්" +Encoder.FFmpeg.AMF.RateControl.QP="ප්‍රමාණකරණ පරාමිතීන්" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-රාමු QP" +Encoder.FFmpeg.AMF.Other="වෙනත් විකල්ප" +Encoder.FFmpeg.AMF.Other.BFrames="උපරිම B-රාමු" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-රාමු යොමු" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="සමුද්දේශ රාමු" +Encoder.FFmpeg.AMF.Other.EnforceHRD="HRD බලාත්මක කරන්න" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="ප්‍රවේශ ඒකක පරිසීමකය" +Encoder.FFmpeg.NVENC.Preset="පෙරසිටුවයි" +Encoder.FFmpeg.NVENC.Preset.default="පෙරනිමිය" +Encoder.FFmpeg.NVENC.Preset.slow="මන්දගාමී" +Encoder.FFmpeg.NVENC.Preset.medium="මධ්යම" +Encoder.FFmpeg.NVENC.Preset.fast="ඉක්මනින්" +Encoder.FFmpeg.NVENC.Preset.hp="ඉහළ කාර්ය සාධනය" +Encoder.FFmpeg.NVENC.Preset.hq="ඉහළ ගුණත්වය" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay තැටිය" +Encoder.FFmpeg.NVENC.Preset.ll="අඩු පමාවක්" +Encoder.FFmpeg.NVENC.Preset.llhq="අඩු ප්‍රමාදය උසස් තත්ත්වයේ" +Encoder.FFmpeg.NVENC.Preset.llhp="අඩු ප්‍රමාද ඉහළ කාර්ය සාධනය" +Encoder.FFmpeg.NVENC.Preset.lossless="පාඩු නැති" +Encoder.FFmpeg.NVENC.Preset.losslesshp="පාඩු රහිත ඉහළ කාර්ය සාධනය" +Encoder.FFmpeg.NVENC.Preset.p1="වේගවත්ම (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="වේගවත් (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="වේගවත් (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="මධ්‍යම (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="මන්දගාමී (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="මන්දගාමී (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="මන්දගාමී (P7)" +Encoder.FFmpeg.NVENC.Tune="සුසර කරන්න" +Encoder.FFmpeg.NVENC.Tune.hq="ඉහළ ගුණත්වය" +Encoder.FFmpeg.NVENC.Tune.ll="අඩු පමාවක්" +Encoder.FFmpeg.NVENC.Tune.lossless="පාඩු නැති" +Encoder.FFmpeg.NVENC.RateControl="අනුපාත පාලන විකල්ප" +Encoder.FFmpeg.NVENC.RateControl.Mode="මාදිලිය" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="නියත ප්‍රමාණකරණ පරාමිතිය" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="විචල්ය බිට්රේට්" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="ස්ථාවර බිට්රේට්" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="පාස් දෙකක්" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="බහු සමත්" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="තනි පාස්" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="කාර්තු විභේදනයේ දී දෙකක් සමත්" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="සම්පූර්ණ විභේදනයෙන් දෙකක් සමත්" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="ඉදිරිය බලන්න" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="අනුවර්තන I-රාමු" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="අනුවර්තන B-රාමු" +Encoder.FFmpeg.NVENC.RateControl.Limits="සීමාවන්" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="බෆර් ප්රමාණය" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="ඉලක්කගත ගුණාත්මකභාවය" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="ඉලක්කගත බිට්රේට්" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="උපරිම බිට්රේට්" +Encoder.FFmpeg.NVENC.RateControl.QP="ප්‍රමාණකරණ පරාමිතීන්" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="අවම QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="උපරිම QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-රාමු QP" +Encoder.FFmpeg.NVENC.AQ="අනුවර්තන ප්‍රමාණකරණය" +Encoder.FFmpeg.NVENC.AQ.Spatial="අවකාශීය අනුවර්තන ප්‍රමාණකරණය" +Encoder.FFmpeg.NVENC.AQ.Strength="අවකාශීය අනුවර්තන ප්‍රමාණකරණ ශක්තිය" +Encoder.FFmpeg.NVENC.AQ.Temporal="තාවකාලික අනුවර්තන ප්‍රමාණකරණය" +Encoder.FFmpeg.NVENC.Other="වෙනත් විකල්ප" +Encoder.FFmpeg.NVENC.Other.BFrames="උපරිම B-රාමු" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-රාමු යොමු මාදිලිය" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="B-රාමු යොමු ලෙස භාවිතා නොකෙරේ" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="B-Frames/2 පමණක් යොමු ලෙස භාවිත කෙරේ" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="සෑම B-රාමුවක්ම යොමු ලෙස භාවිතා කරනු ඇත" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="ශුන්‍ය ප්‍රමාදය" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="බර අනාවැකි" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="යොමු නොවන P-රාමු" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="සමුද්දේශ රාමු" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="අඩු ප්‍රමාද යතුරු රාමු පරිමාණය" +Blur.Type.Box="පෙට්ටිය" +Blur.Type.BoxLinear="පෙට්ටිය රේඛීය" +Blur.Type.Gaussian="ගවුසියන්" +Blur.Type.GaussianLinear="ගවුසියන් රේඛීය" +Blur.Type.DualFiltering="ද්විත්ව පෙරීම" +Blur.Subtype.Area="ප්රදේශය" +Blur.Subtype.Directional="දිශානුගත" +Blur.Subtype.Rotational="භ්රමණ" +Blur.Subtype.Zoom="විශාලනය කරන්න" +Shader="ෂේඩර්" +Shader.Refresh="විකල්ප සහ පරාමිතීන් නැවුම් කරන්න" +Shader.Shader="සෙවන විකල්ප" +Shader.Shader.File="ගොනුව" +Shader.Shader.Technique="තාක්ෂණය" +Shader.Shader.Size="ප්රමාණය" +Shader.Shader.Size.Width="පළල" +Shader.Shader.Size.Height="උස" +Shader.Shader.Seed="සසම්භාවී කිරීමේ බීජ" +Shader.Parameters="සෙවන පරාමිතීන්" +Shader.Parameter.Texture.Type="ටයිප් කරන්න" +Shader.Parameter.Texture.Type.File="ගොනුව" +Shader.Parameter.Texture.Type.Source="මූලාශ්රය" +Shader.Parameter.Texture.File="ගොනුව" +Shader.Parameter.Texture.Source="මූලාශ්රය" +Filter.Shader="ෂේඩර්" +Source.Shader="ෂේඩර්" +Transition.Shader="ෂේඩර්" +Filter.AutoFraming="ස්වයංක්‍රීය රාමු කිරීම" +Filter.AutoFraming.Tracking="ලුහුබැඳීමේ විකල්ප" +Filter.AutoFraming.Tracking.Mode="මාදිලිය" +Filter.AutoFraming.Tracking.Mode.Solo="ඒකල" +Filter.AutoFraming.Tracking.Mode.Group="සමූහය" +Filter.AutoFraming.Tracking.Frequency="සංඛ්යාතය" +Filter.AutoFraming.Motion="චලන විකල්ප" +Filter.AutoFraming.Motion.Smoothing="සුමට කිරීම" +Filter.AutoFraming.Motion.Prediction="අනාවැකිය" +Filter.AutoFraming.Framing="රාමු විකල්ප" +Filter.AutoFraming.Framing.Stability="ස්ථාවරත්වය" +Filter.AutoFraming.Framing.Padding="පෑඩිං" +Filter.AutoFraming.Framing.Offset="ඕෆ්සෙට්" +Filter.AutoFraming.Framing.AspectRatio="දර්ශන අනුපාතය" +Filter.AutoFraming.Provider="සපයන්නා" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, NVIDIA® Broadcast මගින් බල ගැන්වේ" +Filter.Blur="බොඳ කරන්න" +Filter.Blur.Type="ටයිප් කරන්න" +Filter.Blur.Subtype="උප වර්ගය" +Filter.Blur.Size="ප්රමාණය" +Filter.Blur.Angle="කෝණය (උපාධි)" +Filter.Blur.Center.X="මධ්‍යස්ථානය (X) (ප්‍රතිශතය)" +Filter.Blur.Center.Y="මධ්‍යස්ථානය (Y) (ප්‍රතිශතය)" +Filter.Blur.StepScale="පියවර පරිමාණය" +Filter.Blur.StepScale.X="පියවර පරිමාණ X" +Filter.Blur.StepScale.Y="පියවර පරිමාණ Y" +Filter.Blur.Mask="මාස්ක් එකක් යොදන්න" +Filter.Blur.Mask.Type="මාස්ක් වර්ගය" +Filter.Blur.Mask.Type.Region="කලාපයේ" +Filter.Blur.Mask.Type.Image="රූප" +Filter.Blur.Mask.Type.Source="මූලාශ්රය" +Filter.Blur.Mask.Region.Left="වම් කෙළවර" +Filter.Blur.Mask.Region.Top="ඉහළ කෙළවර" +Filter.Blur.Mask.Region.Right="දකුණු කෙළවර" +Filter.Blur.Mask.Region.Bottom="පහළ කෙළවර" +Filter.Blur.Mask.Region.Feather="පිහාටු ප්රදේශය" +Filter.Blur.Mask.Region.Feather.Shift="පිහාටු මාරුව" +Filter.Blur.Mask.Region.Invert="කලාපය පෙරළන්න" +Filter.Blur.Mask.Image="රූප වෙස් මුහුණ" +Filter.Blur.Mask.Source="මූලාශ්ර වෙස් මුහුණ" +Filter.Blur.Mask.Color="මාස්ක් වර්ණ පෙරහන" +Filter.Blur.Mask.Alpha="මාස්ක් ඇල්ෆා ෆිල්ටරය" +Filter.Blur.Mask.Multiplier="මාස්ක් ගුණකය" +Filter.ColorGrade="වර්ණ ශ්රේණිගත කිරීම" +Filter.ColorGrade.Lift="එසවීම" +Filter.ColorGrade.Lift.Red="රතු සෝපානය" +Filter.ColorGrade.Lift.Green="හරිත සෝපානය" +Filter.ColorGrade.Lift.Blue="නිල් සෝපානය" +Filter.ColorGrade.Lift.All="සියලුම සෝපානය" +Filter.ColorGrade.Gamma="ගැමා" +Filter.ColorGrade.Gamma.Red="රතු ගැමා" +Filter.ColorGrade.Gamma.Green="හරිත ගැමා" +Filter.ColorGrade.Gamma.Blue="නිල් ගැමා" +Filter.ColorGrade.Gamma.All="සියලුම ගැමා" +Filter.ColorGrade.Gain="ලබාගන්න" +Filter.ColorGrade.Gain.Red="රතු ගේන්" +Filter.ColorGrade.Gain.Green="හරිත ලාභය" +Filter.ColorGrade.Gain.Blue="නිල් ලාභය" +Filter.ColorGrade.Gain.All="සියලු වාසි" +Filter.ColorGrade.Offset="ඕෆ්සෙට්" +Filter.ColorGrade.Offset.Red="රතු ඕෆ්සෙට්" +Filter.ColorGrade.Offset.Green="හරිත ඕෆ්සෙට්" +Filter.ColorGrade.Offset.Blue="නිල් ඕෆ්සෙට්" +Filter.ColorGrade.Offset.All="සියලුම ඕෆ්සෙට්" +Filter.ColorGrade.Tint="ටින්ට්" +Filter.ColorGrade.Tint.Detection="ටින්ට් ලුමා හඳුනාගැනීමේ ක්‍රමය" +Filter.ColorGrade.Tint.Detection.HSV="වර්ණ සන්තෘප්තිය අගය" +Filter.ColorGrade.Tint.Detection.HSL="වර්ණ සන්තෘප්තිය සැහැල්ලු බව" +Filter.ColorGrade.Tint.Detection.YUV.SDR="ලුමා ක්‍රෝමා (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="ටින්ට් ලුමා මාදිලිය" +Filter.ColorGrade.Tint.Mode.Linear="රේඛීය" +Filter.ColorGrade.Tint.Mode.Log="ලඝු" +Filter.ColorGrade.Tint.Mode.Log10="ලඝු-සටහන10" +Filter.ColorGrade.Tint.Exponent="ටින්ට් ලුමා ඝාතකයා" +Filter.ColorGrade.Tint.Shadow.Red="සෙවනැලි රතු පැහැය" +Filter.ColorGrade.Tint.Shadow.Green="සෙවනැලි කොළ පැහැය" +Filter.ColorGrade.Tint.Shadow.Blue="සෙවනැලි නිල් පැහැය" +Filter.ColorGrade.Tint.Midtone.Red="මිඩ්ටෝන් රතු පැහැය" +Filter.ColorGrade.Tint.Midtone.Green="මිඩ්ටෝන් ග්‍රීන් ටින්ට්" +Filter.ColorGrade.Tint.Midtone.Blue="මිඩ්ටෝන් බ්ලූ ටින්ට්" +Filter.ColorGrade.Tint.Highlight.Red="රතු පැහැය ඉස්මතු කරන්න" +Filter.ColorGrade.Tint.Highlight.Green="හරිත පැහැය ඉස්මතු කරන්න" +Filter.ColorGrade.Tint.Highlight.Blue="නිල් පැහැය ඉස්මතු කරන්න" +Filter.ColorGrade.Correction="වර්ණ නිවැරදි කිරීම" +Filter.ColorGrade.Correction.Saturation="සන්තෘප්තිය" +Filter.ColorGrade.Correction.Lightness="සැහැල්ලු බව" +Filter.ColorGrade.Correction.Contrast="පරස්පරතාව" +Filter.ColorGrade.RenderMode.Direct="සෘජු විදැහුම්කරණය" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-බිට් බැලීමේ වගුව" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-බිට් බැලීමේ වගුව" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-බිට් බැලීමේ වගුව" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-බිට් බැලීමේ වගුව" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-බිට් බලන්න-අප් වගුව" +Filter.Denoising.Provider="සපයන්නා" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, NVIDIA® Broadcast මගින් බල ගැන්වේ" +Filter.Denoising.NVIDIA.Denoising.Strength="ශක්තිය" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="දුර්වල" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="ශක්තිමත්" +Filter.Displacement="විස්ථාපන සිතියම්ගත කිරීම" +Filter.Displacement.File="ගොනුව" +Filter.Displacement.Scale="පරිමාණ" +Filter.Displacement.Scale.Type="පරිමාණය කිරීමේ වර්ගය" +Filter.DynamicMask="ගතික මාස්ක්" +Filter.DynamicMask.Input="ආදාන මූලාශ්රය" +Filter.DynamicMask.Channel="%s නාලිකාව" +Filter.DynamicMask.Channel.Value="මූලික අගය" +Filter.DynamicMask.Channel.Multiplier="ගුණකය" +Filter.DynamicMask.Channel.Input="%s ආදාන අගය" +Filter.SDFEffects="SDF බලපෑම්" +Filter.SDFEffects.Shadow.Inner="අභ්යන්තර සෙවනැල්ල" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="අභ්යන්තර සෙවන අවම දුර" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="අභ්යන්තර සෙවනැල්ල උපරිම දුර" +Filter.SDFEffects.Shadow.Inner.Offset.X="අභ්‍යන්තර සෙවන ඕෆ්සෙට් X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="අභ්‍යන්තර සෙවනැල්ල ඕෆ්සෙට් Y" +Filter.SDFEffects.Shadow.Inner.Color="අභ්යන්තර සෙවනැලි වර්ණය" +Filter.SDFEffects.Shadow.Inner.Alpha="අභ්යන්තර සෙවනැලි ඇල්ෆා" +Filter.SDFEffects.Shadow.Outer="පිටත සෙවන" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="පිටත සෙවන අවම දුර" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="පිටත සෙවනැලි උපරිම දුර" +Filter.SDFEffects.Shadow.Outer.Offset.X="පිටත සෙවනැලි ඕෆ්සෙට් X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="පිටත සෙවනැලි ඕෆ්සෙට් Y" +Filter.SDFEffects.Shadow.Outer.Color="පිටත සෙවනැලි වර්ණය" +Filter.SDFEffects.Shadow.Outer.Alpha="පිටත සෙවනැලි ඇල්ෆා" +Filter.SDFEffects.Glow.Outer="පිටත දීප්තිය" +Filter.SDFEffects.Glow.Outer.Color="පිටත දිදුලන වර්ණය" +Filter.SDFEffects.Glow.Outer.Alpha="පිටත ග්ලෝ ඇල්ෆා" +Filter.SDFEffects.Glow.Outer.Width="පිටත දිලිසෙන පළල" +Filter.SDFEffects.Glow.Outer.Sharpness="පිටත දීප්තියේ තියුණු බව" +Filter.SDFEffects.Glow.Inner="අභ්යන්තර දීප්තිය" +Filter.SDFEffects.Glow.Inner.Color="අභ්යන්තර දිදුලන වර්ණය" +Filter.SDFEffects.Glow.Inner.Alpha="අභ්‍යන්තර ග්ලෝ ඇල්ෆා" +Filter.SDFEffects.Glow.Inner.Width="අභ්යන්තර දිලිසෙන පළල" +Filter.SDFEffects.Glow.Inner.Sharpness="අභ්යන්තර දීප්තිය තියුණු බව" +Filter.SDFEffects.Outline="දළ සටහන" +Filter.SDFEffects.Outline.Color="දළ සටහන් වර්ණය" +Filter.SDFEffects.Outline.Alpha="දළ සටහන් ඇල්ෆා" +Filter.SDFEffects.Outline.Width="දළ සටහන් පළල" +Filter.SDFEffects.Outline.Offset="දළ සටහන් ඕෆ්සෙට්" +Filter.SDFEffects.Outline.Sharpness="දළ සටහන් තියුණු බව" +Filter.SDFEffects.SDF.Scale="SDF වයනය පරිමාණය" +Filter.SDFEffects.SDF.Threshold="SDF ඇල්ෆා එළිපත්ත" +Filter.Transform="3D පරිවර්තනය" +Filter.Transform.Camera="කැමරා" +Filter.Transform.Camera.Mode="මාදිලිය" +Filter.Transform.Camera.Mode.CornerPin="කෝනර් පින්" +Filter.Transform.Camera.Mode.Orthographic="අක්ෂර වින්යාසය" +Filter.Transform.Camera.Mode.Perspective="ඉදිරිදර්ශනය" +Filter.Transform.Camera.FieldOfView="දර්ශන ක්ෂේත්‍රය" +Filter.Transform.Position="තනතුර" +Filter.Transform.Position.X="x" +Filter.Transform.Position.Y="වයි" +Filter.Transform.Scale="පරිමාණ" +Filter.Transform.Scale.X="x" +Filter.Transform.Scale.Y="වයි" +Filter.Transform.Shear="ෂියර්" +Filter.Transform.Shear.X="x" +Filter.Transform.Shear.Y="වයි" +Filter.Transform.Rotation="භ්රමණය" +Filter.Transform.Rotation.X="තණතීරුව (X)" +Filter.Transform.Rotation.Z="රෝල් (Z)" +Filter.Transform.Rotation.Order="භ්රමණ නියෝගය" +Filter.Transform.Rotation.Order.XYZ="පිච්, යාව්, රෝල්" +Filter.Transform.Rotation.Order.XZY="පිච්, රෝල්, යාව්" +Filter.Transform.Rotation.Order.ZXY="රෝල්, පිච්, යාව්" +Filter.Transform.Rotation.Order.ZYX="රෝල්, යාව්, පිච්" +Filter.Transform.Corners="කොන්" +Filter.Transform.Corners.TopLeft="ඉහළ වම්" +Filter.Transform.Corners.TopRight="ඉහළ දකුණ" +Filter.Transform.Corners.BottomLeft="පහළ වම්" +Filter.Transform.Corners.BottomRight="පහළ දකුණ" +Filter.Transform.Mipmapping="Mipmapping සබල කරන්න" +Filter.Upscaling="ඉහළ නැංවීම" +Filter.Upscaling.Provider="සපයන්නා" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, NVIDIA® Broadcast මගින් බල ගැන්වේ" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® සුපිරි විභේදනය" +Filter.Upscaling.NVIDIA.SuperRes.Scale="පරිමාණ" +Filter.Upscaling.NVIDIA.SuperRes.Strength="ශක්තිය" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="දුර්වල" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="ශක්තිමත්" +Filter.VirtualGreenscreen="අතථ්‍ය හරිත තිරය" +Filter.VirtualGreenscreen.Provider="සපයන්නා" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, NVIDIA® Broadcast මගින් බල ගැන්වේ" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="මාදිලිය" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="කාර්ය සාධනය" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="ගුණත්වය" -Source.Mirror.Source="මූලාශ්‍රය" +Source.Mirror="මූලාශ්රය මිරර්" +Source.Mirror.Source="මූලාශ්රය" +Source.Mirror.Source.Audio="ශ්‍රව්‍ය සක්‍රීය කරන්න" +Source.Mirror.Source.Audio.Layout="ශ්රව්ය පිරිසැලසුම" +Source.Mirror.Source.Audio.Layout.Unknown="නොදන්නා" +Source.Mirror.Source.Audio.Layout.Mono="මොනෝ" +Source.Mirror.Source.Audio.Layout.Stereo="ස්ටීරියෝ" +Source.Mirror.Source.Audio.Layout.StereoLFE="LFE සමඟ ස්ටීරියෝ" +Source.Mirror.Source.Audio.Layout.Quadraphonic="චතුරස්රාකාර" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="LFE සමඟ Quadraphonic" +Source.Mirror.Source.Audio.Layout.Surround="වටකරගන්න" +Source.Mirror.Source.Audio.Layout.FullSurround="සම්පූර්ණ වටපිටාව" +Codec.AV1.Profile="පැතිකඩ" +Codec.AV1.Profile.Main="ප්රධාන" +Codec.AV1.Profile.High="ඉහළ" +Codec.AV1.Profile.Professional="වෘත්තීය" +Codec.H264.Profile="පැතිකඩ" +Codec.H264.Profile.baseline="මූලික රේඛාව" +Codec.H264.Profile.main="ප්රධාන" +Codec.H264.Profile.high="ඉහළ" +Codec.H264.Profile.high444p="ඉහළ 4:4:4 අනාවැකි" +Codec.H264.Level="මට්ටමින්" +Codec.HEVC.Profile="පැතිකඩ" +Codec.HEVC.Profile.main="ප්රධාන" +Codec.HEVC.Profile.main10="ප්රධාන 10-bit" +Codec.HEVC.Profile.rext="පරාසය දිගු කර ඇත" +Codec.HEVC.Tier="ස්ථරය" +Codec.HEVC.Tier.main="ප්රධාන" +Codec.HEVC.Tier.high="ඉහළ" +Codec.HEVC.Level="මට්ටමින්" +Codec.ProRes.Profile="පැතිකඩ" +Codec.ProRes.Profile.APCO="422 ප්‍රොක්සි (APCO)" +Codec.ProRes.Profile.APCN="422 සම්මත (APCN)" +Codec.ProRes.Profile.APCH="422 උසස් තත්ත්වයේ/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 උසස් තත්ත්වයේ/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 අන්ත ගුණත්වය/XQ (AP4X)" +Codec.DNxHR.Profile="පැතිකඩ" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR මූලස්ථානය (4:2:2)" diff --git a/data/locale/th-TH.ini b/data/locale/th-TH.ini index f5a6633ff5..363a7cd345 100644 --- a/data/locale/th-TH.ini +++ b/data/locale/th-TH.ini @@ -30,32 +30,60 @@ UI.Menu.Support="ช่วยเหลือและสนับสนุน" UI.Menu.Website="เยี่ยมชมเว็บไซต์ StreamFX" UI.Menu.Discord="เข้าร่วม StreamFX Discord" UI.Menu.Twitter="ติดตาม StreamFX บนทวิตเตอร์" +UI.Menu.YouTube="ติดตาม StreamFX ทาง YouTube" +UI.Menu.About="เกี่ยวกับ StreamFX" +UI.About.Title="เกี่ยวกับ StreamFX" +UI.About.Role.Contributor="ผู้เอื้อเฟื้อ" +UI.About.Role.Translator="ผู้แปล" UI.About.Role.Supporter="สนับสนุน" +UI.About.Version="เวอร์ชั่น:" +UI.Updater.Dialog.Title="StreamFX เวอร์ชั่น %s พร้อมให้ดาวน์โหลดแล้ว!" +UI.Updater.Dialog.Text="มี StreamFX เวอร์ชั่นใหม่ พร้อมให้ดาวน์โหลด" UI.Updater.Dialog.Version.Current="รุ่นปัจจุบัน:" UI.Updater.Dialog.Version.Latest="รุ่นล่าสุด:" UI.Updater.Dialog.Button.Cancel="เตือนฉันในภายหลัง" UI.Updater.Menu.CheckForUpdates="ตรวจสอบอัพเดต" +UI.Updater.Menu.CheckForUpdates.Automatically="ตรวจสอบการอัปเดตอัตโนมัติ" +UI.Updater.Menu.Channel="ช่องทางอัพเดต:" +UI.Updater.Menu.Channel.Stable="เสถียร" UI.Updater.Menu.Channel.Alpha="ความโปร่งใส" +Encoder.AOM.AV1.Encoder.Usage="อัตราการใช้งาน" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="คุณภาพดี" +Encoder.AOM.AV1.Encoder.Usage.RealTime="เรียลไทม์" +Encoder.AOM.AV1.Encoder.CPUUsage.1="ช้ามาก" +Encoder.AOM.AV1.Encoder.CPUUsage.2="ช้ากว่า" Encoder.AOM.AV1.Encoder.CPUUsage.3="ช้า" +Encoder.AOM.AV1.Encoder.CPUUsage.4="ปานกลาง" Encoder.AOM.AV1.Encoder.CPUUsage.5="รวดเร็ว" +Encoder.AOM.AV1.Encoder.CPUUsage.6="เร็วกว่า" +Encoder.AOM.AV1.Encoder.CPUUsage.7="เร็วมาก" +Encoder.AOM.AV1.Encoder.CPUUsage.8="เร็วมากๆ" +Encoder.AOM.AV1.Encoder.CPUUsage.9="เร็วสุดๆ" +Encoder.AOM.AV1.Encoder.CPUUsage.10="เร็วเหลือเชื่อ" Encoder.AOM.AV1.Encoder.Profile="โปรไฟล์" +Encoder.AOM.AV1.KeyFrames="คีย์เฟรม" +Encoder.AOM.AV1.KeyFrames.IntervalType="ชนิดของช่วงระหว่าง" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="เฟรม" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="วินาที" +Encoder.AOM.AV1.KeyFrames.Interval="ระหว่าง" Encoder.AOM.AV1.RateControl.Mode="รูปแบบ" Encoder.AOM.AV1.RateControl.Limits.Quality="คุณภาพ" Encoder.AOM.AV1.RateControl.Buffer.Size="ขนาด" +Encoder.FFmpeg.KeyFrames.IntervalType="ชนิดของช่วงระหว่าง" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="เฟรม" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="วินาที" +Encoder.FFmpeg.KeyFrames.Interval="ระหว่าง" Encoder.FFmpeg.AMF.Preset.Quality="คุณภาพ" Encoder.FFmpeg.AMF.RateControl.Mode="รูปแบบ" Encoder.FFmpeg.NVENC.Preset.default="ค่าเริ่มต้น" Encoder.FFmpeg.NVENC.Preset.slow="ช้า" +Encoder.FFmpeg.NVENC.Preset.medium="ปานกลาง" Encoder.FFmpeg.NVENC.Preset.fast="รวดเร็ว" Encoder.FFmpeg.NVENC.RateControl.Mode="รูปแบบ" diff --git a/data/locale/tr-TR.ini b/data/locale/tr-TR.ini index 6d9550c028..3a6834ce9e 100644 --- a/data/locale/tr-TR.ini +++ b/data/locale/tr-TR.ini @@ -51,6 +51,8 @@ UI.Updater.GitHubPermission.Text="Manüel veya otomatikleştirilmiş güncelleme UI.Updater.Menu.CheckForUpdates="Güncellemeleri Denetle" UI.Updater.Menu.CheckForUpdates.Automatically="Güncellemeleri Otomatik Denetle" UI.Updater.Menu.Channel="Güncelleme Kanalı" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direkt)" @@ -83,9 +85,17 @@ Encoder.AOM.AV1.RateControl.Mode.Q="Sabit Kalite (K)" Encoder.AOM.AV1.RateControl.Limits="Sınırlar" Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bit Hızı" Encoder.AOM.AV1.RateControl.Limits.Quality="Kaliteli" +Encoder.AOM.AV1.RateControl.Buffer="Arabellek" Encoder.AOM.AV1.RateControl.Buffer.Size="Boyut" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Başlangıç Boyutu" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="İdeal Boyut" +Encoder.AOM.AV1.Advanced="Gelişmiş" +Encoder.AOM.AV1.Advanced.Threads="Konular" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Content="İçerik" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ekran" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" Encoder.FFmpeg="FFmpeg Ayarları" Encoder.FFmpeg.Suffix=" (FFmpeg ile)" @@ -121,6 +131,10 @@ Encoder.FFmpeg.NVENC.Preset.default="Varsayılan" Encoder.FFmpeg.NVENC.Preset.slow="Yavaş" Encoder.FFmpeg.NVENC.Preset.medium="Orta" Encoder.FFmpeg.NVENC.Preset.fast="Hızlı" +Encoder.FFmpeg.NVENC.Preset.ll="Düşük Gecikme" +Encoder.FFmpeg.NVENC.Preset.llhq="Düşük Gecikme Yüksek Kalite" +Encoder.FFmpeg.NVENC.Preset.llhp="Düşük Gecikme Yüksek Performans" +Encoder.FFmpeg.NVENC.Tune.ll="Düşük Gecikme" Encoder.FFmpeg.NVENC.RateControl="Oran Kontrol Seçenekleri" Encoder.FFmpeg.NVENC.RateControl.Mode="Mod" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Sabit Bit Hızı (CBR)" From bba97ada1be50a033a953d5e4d17641daead82cd Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 3 Aug 2022 04:00:13 +0200 Subject: [PATCH 054/164] project: Fix editorconfig for YAML --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index 794e044f75..79f0fb65db 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,7 @@ trim_trailing_whitespace = true charset = utf-8 indent_style = tab indent_size = 4 + +[*.yml] +indent_style = space +indent_size = 2 From 5f27998c017d06179651b077c1586f113cb8a527 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 3 Aug 2022 07:27:35 +0200 Subject: [PATCH 055/164] ci: Compress & optimize main script --- .github/workflows/main.yml | 83 +++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 45 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 595660c0c2..15b4cc2b75 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -139,7 +139,15 @@ jobs: submodules: recursive fetch-depth: 0 - - name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)" + - name: "Dependencies: Windows" + if: startsWith( matrix.runner, 'windows' ) + run: | + curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe" + 7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe" + curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe" + .\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART + + - name: "Dependencies: Linux" if: startsWith( matrix.runner, 'ubuntu' ) shell: bash run: | @@ -155,28 +163,21 @@ jobs: qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev + if [[ "${{ matrix.generator }}" = "GCC" ]]; then + sudo apt-get install gcc-10 g++10 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10 + elif [[ "${{ matrix.generator }}" = "Clang" ]]; then + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 + sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 + sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 + fi - - name: "Dependency: GCC (Linux, GCC)" - if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'GCC' ) - shell: bash - run: | - sudo apt-get install gcc-10 g++10 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10 - - - name: "Dependency: Clang (Linux, Clang)" - if: startsWith( matrix.runner, 'ubuntu' ) && ( matrix.generator == 'Clang' ) - shell: bash - run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 - sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 - sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 - sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 - sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 - - - name: 'Dependency: Packages (Linux)' + - name: 'Dependencies: MacOS' if: startsWith( matrix.runner, 'macos' ) shell: bash run: | @@ -185,12 +186,6 @@ jobs: pushd /Volumes/Packages* sudo installer -pkg ./Install\ Packages.pkg -target / - - name: "Dependency: InnoSetup (Windows)" - if: startsWith( matrix.runner, 'windows' ) - run: | - curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe" - .\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART - - name: "Auto-Dependency Cache" if: github.event_name != 'pull_request' uses: actions/cache@v3 @@ -214,32 +209,30 @@ jobs: CODESIGN_FILE: ${{ github.workspace }}/cert.pfx CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }} run: | + if [[ "${{ matrix.CMAKE_BUILD_TYPE }}" = "Debug" ]]; then + ENABLE_PROFILING=ON + else + ENABLE_PROFILING=OFF + fi cmake -H. -B"build/temp" \ ${{ steps.codesign.outputs.cmake_args }} \ -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \ -DPACKAGE_PREFIX="build/package" \ - -DENABLE_CLANG=FALSE \ - -DENABLE_PROFILING=FALSE - - - name: "Build (Windows)" - if: startsWith( matrix.runner, 'windows' ) - shell: bash - run: | - cmake --build "build/temp" --config RelWithDebInfo --target INSTALL + -DENABLE_CLANG=TRUE \ + -DENABLE_PROFILING=${ENABLE_PROFILING} - - name: "Build (Linux)" - if: startsWith( matrix.runner, 'ubuntu' ) + - name: "Build" shell: bash run: | - cmake --build "build/temp" --config RelWithDebInfo --target install/strip - - - name: "Build (MacOS)" - if: startsWith( matrix.runner, 'macos' ) - shell: bash - run: | - cmake --build "build/temp" --config RelWithDebInfo --target install + if [[ "${{ matrix.runner }}" = windows* ]]; then + cmake --build "build/temp" --config RelWithDebInfo --target INSTALL + elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then + cmake --build "build/temp" --config RelWithDebInfo --target install/strip + elif [[ "${{ matrix.runner }}" = macos* ]]; then + cmake --build "build/temp" --config RelWithDebInfo --target install + fi - name: "Package: Archives" shell: bash From 6e510f17f6241c75a30c32eac793e958c414e270 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 3 Aug 2022 07:33:16 +0200 Subject: [PATCH 056/164] ci: Merge validation into main script This reduces the necessary variations for CI, and makes status checks easier to enforce. --- .github/workflows/main.yml | 15 ++++ .github/workflows/validate.yml | 135 --------------------------------- 2 files changed, 15 insertions(+), 135 deletions(-) delete mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15b4cc2b75..1f3fe2455b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -223,6 +223,21 @@ jobs: -DENABLE_CLANG=TRUE \ -DENABLE_PROFILING=${ENABLE_PROFILING} + - name: "Validation: clang-tidy" + continue-on-error: true + shell: bash + run: | + cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy + + - name: "Validation: Formatting (clang-format)" + continue-on-error: true + shell: bash + run: | + cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format + git --no-pager diff --patch --minimal HEAD -- + git update-index --refresh + git diff-index --quiet HEAD -- + - name: "Build" shell: bash run: | diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml deleted file mode 100644 index 7d11e3578e..0000000000 --- a/.github/workflows/validate.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: Validation - -on: - pull_request: - branches: - - '*' - push: - tags: - - '*' - -concurrency: - group: validate-${{ github.ref }} - cancel-in-progress: true - -env: - CACHE_VERSION: 2 - -jobs: - validation: - strategy: - fail-fast: false - matrix: - runner: [ "windows-2022", "windows-2019", "ubuntu-22.04", "ubuntu-20.04" ] - CMAKE_BUILD_TYPE: [ "Debug", "Release" ] - include: - - runner: "windows-2022" - experimental: true - id: "windows-2022-validate" - name: "Windows 11" - CMAKE_SYSTEM_VERSION: "10.0.18362.0" - CMAKE_GENERATOR: "Visual Studio 17 2022" - CMAKE_GENERATOR_PLATFORM: "x64" - - runner: "windows-2019" - experimental: true - id: "windows-2019-validate" - name: "Windows 10" - CMAKE_SYSTEM_VERSION: "10.0.18362.0" - CMAKE_GENERATOR: "Visual Studio 16 2019" - CMAKE_GENERATOR_PLATFORM: "x64" - - runner: "ubuntu-22.04" - experimental: false - id: "linux-22.04-validate" - name: "Ubuntu 22.04" - CMAKE_GENERATOR: "Ninja" - - runner: "ubuntu-20.04" - experimental: false - id: "linux-20.04-validate" - name: "Ubuntu 20.04" - CMAKE_GENERATOR: "Ninja" - name: "${{ matrix.name }} (${{ matrix.CMAKE_BUILD_TYPE }})" - runs-on: ${{ matrix.runner }} - continue-on-error: ${{ matrix.experimental }} - env: - CC: clang - CXX: clang++ - CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }} - CMAKE_SYSTEM_VERSION: ${{ matrix.CMAKE_SYSTEM_VERSION }} - CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }} - CMAKE_GENERATOR_PLATFORM: ${{ matrix.CMAKE_GENERATOR_PLATFORM }} - steps: - - name: "Clone" - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 - - - name: "Dependency: Ninja, Qt, FFmpeg, CURL (Linux)" - if: startsWith( matrix.runner, 'ubuntu' ) - shell: bash - run: | - sudo apt-get -qq update - sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64 - sudo apt-get install \ - build-essential \ - checkinstall \ - pkg-config \ - cmake \ - ninja-build \ - git \ - qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ - libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ - libcurl4-openssl-dev - - - name: "Dependency: Clang (Windows)" - if: startsWith( matrix.runner, 'windows' ) - run: | - curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe" - 7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe" - - - name: "Dependency: Clang (Linux)" - if: startsWith( matrix.runner, 'ubuntu' ) - shell: bash - run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 - sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 - sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 - sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 - sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 - - - name: "Dependencies: Cache" - if: github.event_name != 'pull_request' - uses: actions/cache@v3 - with: - path: | - build/temp/autodeps - key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }} - - - name: "StreamFX: Configure" - shell: bash - run: | - cmake -H. -B"build/temp" \ - -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ - -DENABLE_CLANG=TRUE \ - -DENABLE_PROFILING=TRUE - - - name: "StreamFX: clang-tidy" - continue-on-error: true - shell: bash - run: | - cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy - - - name: "StreamFX: clang-format" - shell: bash - run: | - cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format - - - name: "Validate Formatting" - shell: bash - run: | - git --no-pager diff --patch --minimal HEAD -- - git update-index --refresh - git diff-index --quiet HEAD -- From b4026f22039779da1cf894efe088b95b92546818 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 6 Aug 2022 20:31:46 +0200 Subject: [PATCH 057/164] ci: Fix clang version --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1f3fe2455b..6797fe5bbb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -167,7 +167,8 @@ jobs: sudo apt-get install gcc-10 g++10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10 elif [[ "${{ matrix.generator }}" = "Clang" ]]; then - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 14 all + curl -jLo /tmp/llvm.sh https://apt.llvm.org/llvm.sh + sudo bash -x /tmp/llvm.sh 14 all sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 From c4de205d524254bb41c3f495541735944e309505 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 12 Aug 2022 15:14:56 +0200 Subject: [PATCH 058/164] ci: Remove Code Signing with self-signed certificate --- .github/workflows/main.yml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6797fe5bbb..0a1e8af427 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -195,15 +195,6 @@ jobs: build/temp/autodeps key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.CACHE_VERSION }} - - name: "Code Signing (Windows)" # Do not run this on pull requests, ever! - if: (github.event_name != 'pull_request') && startsWith( matrix.runner, 'windows' ) - id: codesign - shell: bash - run: | - # Restore the Certificate back into a file. - echo "${{ secrets.CODESIGN_CERT_WIN }}" | base64 --decode > "${{ github.workspace }}/cert.pfx" - echo "::set-output name=cmake_args::-DENABLE_CODESIGN=ON -DCODESIGN_TIMESTAMPS=ON" - - name: "Configure" shell: bash env: @@ -216,7 +207,6 @@ jobs: ENABLE_PROFILING=OFF fi cmake -H. -B"build/temp" \ - ${{ steps.codesign.outputs.cmake_args }} \ -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ -DCMAKE_INSTALL_PREFIX="build/distrib" \ -DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \ @@ -257,22 +247,12 @@ jobs: cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP - - name: "Package: Installer Code Signing (Windows)" - if: (github.event_name != 'pull_request') && startsWith( matrix.runner, 'windows' ) - id: codesign_install - shell: bash - run: | - if [[ -f "${{ github.workspace }}/cert.pfx" ]]; then - signtool=$(awk 'match($0, /^;signtool=(.+)$/, ary) {print ary[1]}' "${{ github.workspace }}/build/temp/installer.iss") - echo "::set-output name=iscc_signtool::${signtool}" - fi - - name: "Package: Installer (Windows)" if: startsWith( matrix.runner, 'windows' ) shell: cmd run: | - echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss"' - "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 "/Ssigntool=${{ steps.codesign_install.outputs.iscc_signtool }} $p" ".\build\temp\installer.iss" + echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss"' + "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss" - name: "Package: Installer (MacOS)" if: startsWith( matrix.runner, 'macos' ) From 30134bd28488e17a6b53f02622eb4b481d846bcb Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 13 Aug 2022 18:42:58 +0200 Subject: [PATCH 059/164] gfx/source-texture: Fix bad ref with Debug compiles --- source/gfx/gfx-source-texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gfx/gfx-source-texture.cpp b/source/gfx/gfx-source-texture.cpp index 733b7e6b1f..dc29091e81 100644 --- a/source/gfx/gfx-source-texture.cpp +++ b/source/gfx/gfx-source-texture.cpp @@ -81,7 +81,7 @@ std::shared_ptr streamfx::gfx::source_texture::rende if (_child) { #ifdef ENABLE_PROFILING auto cctr = streamfx::obs::gs::debug_marker(streamfx::obs::gs::debug_color_capture, "gfx::source_texture '%s'", - obs_source_get_name(_child->get())); + obs_source_get_name(_child.get())); #endif auto op = _rt->render(static_cast(width), static_cast(height)); vec4 black; From 69b5ff8ad56c12e7d717601130831296b99e047a Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 13 Aug 2022 16:49:08 +0200 Subject: [PATCH 060/164] ci: Merge Debug and Release builds into one There is no point in completely separating these, as CMake can build out-of-tree just fine. Thus we can reduce the overall complexity significantly, and also detect far more problems ahead of time. As a side bonus, we get both debug and release packages in one go. --- .github/workflows/main.yml | 83 ++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a1e8af427..06efa0bb28 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,6 @@ jobs: matrix: runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ] generator: [ MSVC, GCC, Clang ] - CMAKE_BUILD_TYPE: [ Debug, RelWithDebInfo ] exclude: - runner: windows-2022 generator: GCC @@ -192,73 +191,79 @@ jobs: uses: actions/cache@v3 with: path: | - build/temp/autodeps - key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ env.CACHE_VERSION }} + build/debug/autodeps + build/release/autodeps + key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ env.CACHE_VERSION }} - - name: "Configure" + - name: "Configure & Build (Debug)" + continue-on-error: true shell: bash - env: - CODESIGN_FILE: ${{ github.workspace }}/cert.pfx - CODESIGN_PASS: ${{ secrets.CODESIGN_CERT_WIN_PASSWORD }} run: | - if [[ "${{ matrix.CMAKE_BUILD_TYPE }}" = "Debug" ]]; then - ENABLE_PROFILING=ON - else - ENABLE_PROFILING=OFF - fi - cmake -H. -B"build/temp" \ - -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ - -DCMAKE_INSTALL_PREFIX="build/distrib" \ - -DPACKAGE_NAME="streamfx-${{ matrix.PACKAGE_NAME }}" \ + cmake -H. -B"build/debug" \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX="build/debug/install" \ + -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}-debug" \ -DPACKAGE_PREFIX="build/package" \ -DENABLE_CLANG=TRUE \ - -DENABLE_PROFILING=${ENABLE_PROFILING} + -DENABLE_PROFILING=ON + if [[ "${{ matrix.runner }}" = windows* ]]; then + cmake --build "build/debug" --config Debug --target INSTALL + elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then + cmake --build "build/debug" --config Debug --target install + elif [[ "${{ matrix.runner }}" = macos* ]]; then + cmake --build "build/debug" --config Debug --target install + fi + cmake --build "build/debug" --config Debug --target StreamFX_clang-tidy + cmake --build "build/debug" --config Debug --target StreamFX_clang-format - - name: "Validation: clang-tidy" - continue-on-error: true + - name: "Configure & Build (Release)" shell: bash run: | - cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-tidy + cmake -H. -B"build/release" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="build/release/install" \ + -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \ + -DPACKAGE_PREFIX="build/package" \ + -DENABLE_CLANG=TRUE \ + -DENABLE_PROFILING=OFF + if [[ "${{ matrix.runner }}" = windows* ]]; then + cmake --build "build/release" --config RelWithDebInfo --target INSTALL + elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then + cmake --build "build/release" --config RelWithDebInfo --target install/strip + elif [[ "${{ matrix.runner }}" = macos* ]]; then + cmake --build "build/release" --config RelWithDebInfo --target install + fi + cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-tidy + cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-format - - name: "Validation: Formatting (clang-format)" - continue-on-error: true + - name: "Validate Formatting" + continue-on-error: false shell: bash run: | - cmake --build "build/temp" --config ${{ matrix.CMAKE_BUILD_TYPE }} --target StreamFX_clang-format git --no-pager diff --patch --minimal HEAD -- git update-index --refresh git diff-index --quiet HEAD -- - - name: "Build" - shell: bash - run: | - if [[ "${{ matrix.runner }}" = windows* ]]; then - cmake --build "build/temp" --config RelWithDebInfo --target INSTALL - elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then - cmake --build "build/temp" --config RelWithDebInfo --target install/strip - elif [[ "${{ matrix.runner }}" = macos* ]]; then - cmake --build "build/temp" --config RelWithDebInfo --target install - fi - - name: "Package: Archives" shell: bash run: | mkdir build/package - cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_7Z - cmake --build "build/temp" --config RelWithDebInfo --target PACKAGE_ZIP + cmake --build "build/debug" --config RelWithDebInfo --target PACKAGE_7Z + cmake --build "build/release" --config RelWithDebInfo --target PACKAGE_7Z - name: "Package: Installer (Windows)" if: startsWith( matrix.runner, 'windows' ) shell: cmd run: | - echo '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss"' - "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\temp\installer.iss" + "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\debug\installer.iss" + "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /V10 ".\build\release\installer.iss" - name: "Package: Installer (MacOS)" if: startsWith( matrix.runner, 'macos' ) shell: bash run: | - packagesbuild ./build/temp/installer.pkgproj + packagesbuild ./build/debug/installer.pkgproj + packagesbuild ./build/release/installer.pkgproj - name: "Artifacts" uses: actions/upload-artifact@v1 From eb047c8882266c8dcd7bf886b713ef4dd7c64150 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 13 Aug 2022 16:49:08 +0200 Subject: [PATCH 061/164] ci: Remove pointless platform additions The runners "windows-2022" and "windows-2019" both come with almost identical software, and we can still target Windows 10 21H2. The same goes for "macos-12", "macos-11" and "macos-10.15", where we can simply target 10.15 and get the same result. Only Ubuntu does not make it easy, as it doesn't easily allow targeting a certain OS version. --- .github/workflows/main.yml | 132 ++++++++++++------------------------- 1 file changed, 43 insertions(+), 89 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06efa0bb28..a5d4850e52 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,114 +23,57 @@ jobs: strategy: fail-fast: false matrix: - runner: [ windows-2022, ubuntu-22.04, macos-12, windows-2019, ubuntu-20.04, macos-11, macos-10.15 ] + runner: [ windows-2022, macos-12, ubuntu-22.04, ubuntu-20.04 ] generator: [ MSVC, GCC, Clang ] exclude: - runner: windows-2022 generator: GCC - - runner: windows-2019 - generator: GCC - runner: windows-2022 generator: Clang - - runner: windows-2019 - generator: Clang - - runner: ubuntu-22.04 - generator: MSVC - - runner: ubuntu-20.04 - generator: MSVC - runner: macos-12 generator: MSVC - runner: macos-12 generator: GCC - - runner: macos-11 + - runner: ubuntu-22.04 generator: MSVC - - runner: macos-11 - generator: GCC - - runner: macos-10.15 + - runner: ubuntu-20.04 generator: MSVC - - runner: macos-10.15 - generator: GCC include: + # Windows supports MSVC - runner: windows-2022 - generator: MSVC - experimental: true - platform: "Windows 11" - PACKAGE_NAME: "windows-11" - CMAKE_SYSTEM_VERSION: "10.0.22000.0" + name: "Windows" + package_name: "windows" + CMAKE_SYSTEM_VERSION: "10.0.20348.0" CMAKE_GENERATOR: "Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM: "x64" - - runner: windows-2019 - generator: MSVC - experimental: false - platform: "Windows 10" - PACKAGE_NAME: "windows-10" - CMAKE_SYSTEM_VERSION: "10.0.19041.0" - CMAKE_GENERATOR: "Visual Studio 16 2019" - CMAKE_GENERATOR_PLATFORM: "x64" - - runner: ubuntu-22.04 - generator: GCC - experimental: false - platform: "Ubuntu 22" - compiler_c: gcc - compiler_cxx: g++ - PACKAGE_NAME: "ubuntu-22-gcc" - CMAKE_GENERATOR: "Ninja" - - runner: ubuntu-20.04 - generator: GCC - experimental: false - platform: "Ubuntu 20" - compiler_c: gcc - compiler_cxx: g++ - PACKAGE_NAME: "ubuntu-20-gcc" - CMAKE_GENERATOR: "Ninja" + + # MacOS supports Clang + - runner: macos-12 + name: "MacOS" + package_name: "macos" + CMAKE_GENERATOR: "Xcode" + CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" + CMAKE_OSX_ARCHITECTURES: "x86_64" + + # Ubuntu needs version-specific binaries - runner: ubuntu-22.04 - generator: Clang - experimental: false - platform: "Ubuntu 22" - compiler_c: clang - compiler_cxx: clang++ - PACKAGE_NAME: "ubuntu-22-clang" + name: "Ubuntu 22.04" + package_name: "ubuntu-22" CMAKE_GENERATOR: "Ninja" - runner: ubuntu-20.04 - generator: Clang - experimental: false - platform: "Ubuntu 20" - compiler_c: clang - compiler_cxx: clang++ - PACKAGE_NAME: "ubuntu-20-clang" + name: "Ubuntu 20.04" + package_name: "ubuntu-20" CMAKE_GENERATOR: "Ninja" - - runner: macos-12 - generator: Clang - experimental: true - platform: "MacOS 12" - PACKAGE_NAME: "macos-12" - CMAKE_GENERATOR: "Xcode" - CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" - - runner: macos-11 - generator: Clang - experimental: false - platform: "MacOS 11" - PACKAGE_NAME: "macos-11" - CMAKE_GENERATOR: "Xcode" - CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" - - runner: macos-10.15 - generator: Clang - experimental: true - platform: "MacOS 10.15" - PACKAGE_NAME: "macos-10.15" - CMAKE_GENERATOR: "Xcode" - CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" - name: "${{ matrix.platform }} (${{ matrix.generator }}, ${{ matrix.CMAKE_BUILD_TYPE }})" + runs-on: ${{ matrix.runner }} - continue-on-error: ${{ matrix.experimental }} + name: "${{ matrix.name }} (${{ matrix.generator }})" env: - CC: ${{ matrix.compiler_c }} - CXX: ${{ matrix.compiler_cxx }} - CMAKE_GENERATOR: ${{ matrix.CMAKE_GENERATOR }} - CMAKE_GENERATOR_PLATFORM: ${{ matrix.CMAKE_GENERATOR_PLATFORM }} - CMAKE_GENERATOR_TOOLSET: ${{ matrix.CMAKE_GENERATOR_TOOLSET }} - CMAKE_SYSTEM_VERSION: ${{ matrix.CMAKE_SYSTEM_VERSION }} + CMAKE_GENERATOR: "${{ matrix.CMAKE_GENERATOR }}" + CMAKE_GENERATOR_PLATFORM: "${{ matrix.CMAKE_GENERATOR_PLATFORM }}" + CMAKE_GENERATOR_TOOLSET: "${{ matrix.CMAKE_GENERATOR_TOOLSET }}" + CMAKE_SYSTEM_VERSION: "${{ matrix.CMAKE_SYSTEM_VERSION }}" CMAKE_OSX_DEPLOYMENT_TARGET: "${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" + CMAKE_OSX_ARCHITECTURES: "${{ matrix.CMAKE_OSX_ARCHITECTURES }}" steps: - name: "Clone" uses: actions/checkout@v3 @@ -162,19 +105,30 @@ jobs: qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ libcurl4-openssl-dev + + # clang-format, clang-tidy + curl -jLo /tmp/llvm.sh "https://apt.llvm.org/llvm.sh" + chmod +x /tmp/llvm.sh + sudo /tmp/llvm.sh 14 all + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 + sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + + # Compiler if [[ "${{ matrix.generator }}" = "GCC" ]]; then sudo apt-get install gcc-10 g++10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10 + echo "CC=gcc-10" >> "${GITHUB_ENV}" + echo "CXX=gcc-10" >> "${GITHUB_ENV}" + echo "LD=ld" >> "${GITHUB_ENV}" elif [[ "${{ matrix.generator }}" = "Clang" ]]; then - curl -jLo /tmp/llvm.sh https://apt.llvm.org/llvm.sh - sudo bash -x /tmp/llvm.sh 14 all sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800 sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 800 - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 - sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-14 800 sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-14 800 + echo "CC=clang-14" >> "${GITHUB_ENV}" + echo "CXX=clang++-14" >> "${GITHUB_ENV}" + echo "LD=lld" >> "${GITHUB_ENV}" fi - name: 'Dependencies: MacOS' From 008a3f2a31ade7c1daad500dc0beba0760983741 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 13 Aug 2022 17:43:26 +0200 Subject: [PATCH 062/164] ci: Ignore clang-tidy for now --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a5d4850e52..bcae4ea0cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -167,7 +167,6 @@ jobs: elif [[ "${{ matrix.runner }}" = macos* ]]; then cmake --build "build/debug" --config Debug --target install fi - cmake --build "build/debug" --config Debug --target StreamFX_clang-tidy cmake --build "build/debug" --config Debug --target StreamFX_clang-format - name: "Configure & Build (Release)" @@ -187,7 +186,6 @@ jobs: elif [[ "${{ matrix.runner }}" = macos* ]]; then cmake --build "build/release" --config RelWithDebInfo --target install fi - cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-tidy cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-format - name: "Validate Formatting" From 19de4c5334921bf9d982abd2ea4d354c9337652e Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 14 Aug 2022 08:57:29 +0200 Subject: [PATCH 063/164] ci: Always set up path for clang binaries --- .github/workflows/main.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bcae4ea0cf..ccbf1f6ca4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,6 +86,7 @@ jobs: run: | curl "-kL" "https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.4/LLVM-14.0.4-win64.exe" "-f" "--retry" "5" "-o" "llvm.exe" 7z x -y -o"C:\Program Files\LLVM" llvm.exe "bin" "include" "lib" "libexec" "share" "Uninstall.exe" + echo "CLANG_PATH=\"C:\\Program Files\\LLVM\\bin\"" >> "${GITHUB_ENV}" curl "-kL" "https://cdn.xaymar.com/ci/innosetup-6.2.1.exe" "-f" "--retry" "5" "-o" "inno.exe" .\inno.exe /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART @@ -112,6 +113,7 @@ jobs: sudo /tmp/llvm.sh 14 all sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 800 sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 800 + echo "CLANG_PATH=/usr/bin" >> "${GITHUB_ENV}" # Compiler if [[ "${{ matrix.generator }}" = "GCC" ]]; then @@ -139,6 +141,7 @@ jobs: sudo hdiutil attach ./Packages.dmg pushd /Volumes/Packages* sudo installer -pkg ./Install\ Packages.pkg -target / + echo "CLANG_PATH=$(brew --prefix llvm@14)/bin/" >> "${GITHUB_ENV}" - name: "Auto-Dependency Cache" if: github.event_name != 'pull_request' @@ -158,7 +161,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="build/debug/install" \ -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}-debug" \ -DPACKAGE_PREFIX="build/package" \ - -DENABLE_CLANG=TRUE \ + -DENABLE_CLANG=TRUE -DCLANG_PATH="${{ env.CLANG_PATH }}" \ -DENABLE_PROFILING=ON if [[ "${{ matrix.runner }}" = windows* ]]; then cmake --build "build/debug" --config Debug --target INSTALL @@ -167,7 +170,6 @@ jobs: elif [[ "${{ matrix.runner }}" = macos* ]]; then cmake --build "build/debug" --config Debug --target install fi - cmake --build "build/debug" --config Debug --target StreamFX_clang-format - name: "Configure & Build (Release)" shell: bash @@ -177,7 +179,7 @@ jobs: -DCMAKE_INSTALL_PREFIX="build/release/install" \ -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \ -DPACKAGE_PREFIX="build/package" \ - -DENABLE_CLANG=TRUE \ + -DENABLE_CLANG=TRUE -DCLANG_PATH="${{ env.CLANG_PATH }}" \ -DENABLE_PROFILING=OFF if [[ "${{ matrix.runner }}" = windows* ]]; then cmake --build "build/release" --config RelWithDebInfo --target INSTALL @@ -186,12 +188,12 @@ jobs: elif [[ "${{ matrix.runner }}" = macos* ]]; then cmake --build "build/release" --config RelWithDebInfo --target install fi - cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-format - name: "Validate Formatting" - continue-on-error: false shell: bash run: | + cmake --build "build/debug" --config Debug --target StreamFX_clang-format + cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-format git --no-pager diff --patch --minimal HEAD -- git update-index --refresh git diff-index --quiet HEAD -- From f2e5bdf78a6d2eb6ea7184e1e4c8eb341df2475d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 3 Aug 2022 04:14:15 +0200 Subject: [PATCH 064/164] third-party: Add obs-studio submodule --- .gitmodules | 3 +++ third-party/obs-studio | 1 + 2 files changed, 4 insertions(+) create mode 160000 third-party/obs-studio diff --git a/.gitmodules b/.gitmodules index 87f91db6c8..151ff140b5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "third-party/nvidia-maxine-vfx-sdk"] path = third-party/nvidia-maxine-vfx-sdk url = https://github.com/NVIDIA/MAXINE-VFX-SDK.git +[submodule "third-party/obs-studio"] + path = third-party/obs-studio + url = https://github.com/obsproject/obs-studio.git diff --git a/third-party/obs-studio b/third-party/obs-studio new file mode 160000 index 0000000000..b4f7499b33 --- /dev/null +++ b/third-party/obs-studio @@ -0,0 +1 @@ +Subproject commit b4f7499b33b53351e56a02fc6194f11d8af78da5 From 7937ff4a4418dcc1167124a28966175b4c98860b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 6 Aug 2022 22:03:38 +0200 Subject: [PATCH 065/164] cmake: Remove Auto-Dependency system While the system helped users get started quickly, it also presented a unique problem by itself. As CMake grew, the code that supported this system became more and more fragile to the point of failing at random, with no indication of why it would fail. Additionally as OBS Studio 28.0 adopted a much nicer system, it is no longer necessary to have this system at all. As an addition to this change, all systems that could rely on FindModules now do so. This drastically reduces the complexity of the CMake system, while allowing significantly more flexibility with what binaries are really being used. In the best case this should allow a prepared user to build StreamFX by itself within seconds. --- .github/workflows/main.yml | 9 - CMakeLists.txt | 493 ++++++------------------------------- 2 files changed, 77 insertions(+), 425 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccbf1f6ca4..4869231323 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -143,15 +143,6 @@ jobs: sudo installer -pkg ./Install\ Packages.pkg -target / echo "CLANG_PATH=$(brew --prefix llvm@14)/bin/" >> "${GITHUB_ENV}" - - name: "Auto-Dependency Cache" - if: github.event_name != 'pull_request' - uses: actions/cache@v3 - with: - path: | - build/debug/autodeps - build/release/autodeps - key: autodeps-${{ matrix.runner }}-${{ matrix.generator }}-${{ env.CACHE_VERSION }} - - name: "Configure & Build (Debug)" continue-on-error: true shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index 1264d36a8d..dd48012b19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ set(CMAKE_MODULE_PATH # Include include("util") # CacheClear, CacheSet include("version") # version() -include("DownloadProject") # DownloadProject include("CheckIPOSupported") # check_ipo_supported ################################################################################ @@ -54,7 +53,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}") else() set(GROUPED ON) set(PREFIX "StreamFX_") - if(GROUPED AND (TARGET libobs)) + if(GROUPED AND ((TARGET libobs) OR (TARGET OBS::libobs))) set(STANDALONE OFF) endif() endif() @@ -284,6 +283,15 @@ message(STATUS "${LOGPREFIX}Target is ${D_PLATFORM_BITS}bit ${ARCH_INST} with a # Options ################################################################################ +# Dependencies +if(STANDALONE) + set(libobs_DIR "" CACHE PATH "Path to libobs and obs-frontend-api") + set(Qt_DIR "" CACHE PATH "Path to Qt6 or Qt5") + set(CURL_DIR "" CACHE PATH "Path to CURL") + set(FFmpeg_DIR "" CACHE PATH "Path to FFmpeg") +endif() +set(AOM_DIR "" CACHE PATH "Path to AOM library") + # Features ## Encoders set(${PREFIX}ENABLE_ENCODER_FFMPEG ON CACHE BOOL "Enable FFmpeg Encoder integration.") @@ -391,318 +399,38 @@ if(${PREFIX}ENABLE_CODESIGN AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/codes endif() ################################################################################ -# Auto-Dependency: libOBS + obs-frontend-api -################################################################################ - -if(STANDALONE) - # Options - set(${PREFIX}OBS_DOWNLOAD TRUE CACHE BOOL "Automatically download libOBS and obs-frontend-api?") - set(${PREFIX}OBS_PATH "" CACHE PATH "Path to libOBS, if ${PREFIX}OBS_DOWNLOAD is not set.") - set(${PREFIX}OBS_DOWNLOAD_URL "" CACHE STRING "The URL from which to download libOBS and obs-frontend-api, if autodetection fails. (Optional)") - set(${PREFIX}OBS_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") - mark_as_advanced( - ${PREFIX}OBS_PATH - ${PREFIX}OBS_DOWNLOAD_URL - ${PREFIX}OBS_DOWNLOAD_HASH - ) - - if(${PREFIX}OBS_DOWNLOAD) - if(${PREFIX}OBS_DOWNLOAD_URL STREQUAL "") - # Figure out download URLs and hashes. - if(D_PLATFORM_WINDOWS) - if(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/windows-x86_64.tar.gz") - set(OBS_DOWNLOAD_HASH "DD931BBB2E0720F1D7573C65D8CC9D638F1EE2AC99F7173BF8935CD3A3BCE3F4") - endif() - endif() - elseif(D_PLATFORM_LINUX) - if(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/linux-x86_64.tar.gz") - set(OBS_DOWNLOAD_HASH "CA19E8260E1A556E6231D75064837C61C6D480BD90C97A0B930005AE527BF625") - endif() - endif() - elseif(D_PLATFORM_MAC) - if(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(OBS_DOWNLOAD_URL "https://github.com/Xaymar/obs-studio/releases/download/27.2.4-ci/macos-x86_64.tar.gz") - set(OBS_DOWNLOAD_HASH "0DD5A57DD537B97CAA8470212F8F6B637F47D4742A5D1F17787F4FE9DBC70B33") - endif() - endif() - endif() - - # Verify that the platform, architecture and bitness is supported. - if(OBS_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX}Download for libOBS failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - else() - set(OBS_DOWNLOAD_URL "${${PREFIX}OBS_DOWNLOAD_URL}") - set(OBS_DOWNLOAD_HASH "${${PREFIX}OBS_DOWNLOAD_HASH}") - endif() - - if(OBS_DOWNLOAD_HASH STREQUAL "") - download_project( - PROJ libobs - PREFIX "autodeps" - URL "${OBS_DOWNLOAD_URL}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - else() - download_project( - PROJ libobs - PREFIX "autodeps" - URL "${OBS_DOWNLOAD_URL}" - URL_HASH "SHA256=${OBS_DOWNLOAD_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - endif() - CacheSet(${PREFIX}OBS_PATH "${libobs_SOURCE_DIR}") - endif() -endif() - -################################################################################ -# Auto-Dependency: OBS Studio Dependencies -################################################################################ - -if(STANDALONE AND NOT D_PLATFORM_LINUX) - # Options - set(${PREFIX}OBSDEPS_DOWNLOAD TRUE CACHE BOOL "Automatically download pre-built libOBS dependencies?") - set(${PREFIX}OBSDEPS_PATH "" CACHE PATH "Path to pre-build libOBS dependencies, if ${PREFIX}OBSDEPS_DOWNLOAD is not set.") - set(${PREFIX}OBSDEPS_DOWNLOAD_URL "" CACHE STRING "The URL from which to download pre-built libOBS dependencies, if autodetection fails. (Optional)") - set(${PREFIX}OBSDEPS_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") - mark_as_advanced( - ${PREFIX}OBSDEPS_PATH - ${PREFIX}OBSDEPS_DOWNLOAD_URL - ${PREFIX}OBSDEPS_DOWNLOAD_HASH - ) - - if(${PREFIX}OBSDEPS_DOWNLOAD) - if(${PREFIX}OBSDEPS_DOWNLOAD_URL STREQUAL "") - # Figure out download URLs and hashes. - if(D_PLATFORM_WINDOWS) - set(DEPS_VERSION "2022-01-31") - if(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/win-${DEPS_VERSION}/windows-deps-${DEPS_VERSION}.zip") - set(OBSDEPS_DOWNLOAD_HASH "66E55FE35A507C902C036EB11E691D0257FECA545A8EE57324B69427717026DD") - endif() - endif() - elseif(D_PLATFORM_MAC) - set(DEPS_VERSION "2022-02-13") - if(D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) - if(D_PLATFORM_BITS EQUAL 64) - set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-universal.tar.xz") - set(OBSDEPS_DOWNLOAD_HASH "77471B1D345A768E8EFEC3F6AD9DC79F3C7CD34840B66F721B80025D29713F5D") - endif() - elseif(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-x86_64.tar.xz") - set(OBSDEPS_DOWNLOAD_HASH "1A8715D66E664B857942DEADED0DC46C4F6CD22E88F01ED1188F3BD3FCF632C4") - endif() - elseif(D_PLATFORM_ARCH_ARM) - if(D_PLATFORM_BITS EQUAL 64) - set(OBSDEPS_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-${DEPS_VERSION}-arm64.tar.xz") - set(OBSDEPS_DOWNLOAD_HASH "2CFCAF05765400C696908F242AEA87B6E1848E1A48CD3EDC2EB7F8CB249C9D48") - endif() - endif() - endif() - - # Verify that the platform, architecture and bitness is supported. - if(OBSDEPS_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX}Download for pre-built OBS dependencies failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - else() - set(OBSDEPS_DOWNLOAD_URL "${${PREFIX}OBSDEPS_DOWNLOAD_URL}") - set(OBSDEPS_DOWNLOAD_HASH "${${PREFIX}OBSDEPS_DOWNLOAD_HASH}") - endif() - - if(OBSDEPS_DOWNLOAD_HASH STREQUAL "") - download_project( - PROJ obsdeps - PREFIX "autodeps" - URL "${OBSDEPS_DOWNLOAD_URL}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - else() - download_project( - PROJ obsdeps - PREFIX "autodeps" - URL "${OBSDEPS_DOWNLOAD_URL}" - URL_HASH "SHA256=${OBSDEPS_DOWNLOAD_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - endif() - CacheSet(${PREFIX}OBSDEPS_PATH "${obsdeps_SOURCE_DIR}") - endif() - - if(D_PLATFORM_WINDOWS) - set(_OBSDEPS_PATH "${${PREFIX}OBSDEPS_PATH}/win${D_PLATFORM_BITS}") - set(FFmpegPath "${${PREFIX}OBSDEPS_PATH}/win${D_PLATFORM_BITS}") - elseif(D_PLATFORM_MAC) - set(_OBSDEPS_PATH "${${PREFIX}OBSDEPS_PATH}/obsdeps") - set(FFmpegPath "${${PREFIX}OBSDEPS_PATH}/obsdeps") - endif() -endif() - -################################################################################ -# Auto-Dependency: Qt v5.x -################################################################################ - -if(STANDALONE AND NOT D_PLATFORM_LINUX) - # Options - set(${PREFIX}QT_DOWNLOAD TRUE CACHE BOOL "Automatically download Qt?") - set(${PREFIX}QT_PATH "" CACHE PATH "Path to Qt, if ${PREFIX}QT_DOWNLOAD is not set.") - set(${PREFIX}QT_DOWNLOAD_URL "" CACHE STRING "The URL from which to download Qt, if autodetection fails. (Optional)") - set(${PREFIX}QT_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") - mark_as_advanced( - ${PREFIX}QT_PATH - ${PREFIX}QT_DOWNLOAD_URL - ${PREFIX}QT_DOWNLOAD_HASH - ) - - if(${PREFIX}QT_DOWNLOAD) - if(${PREFIX}QT_DOWNLOAD_URL STREQUAL "") - # Figure out download URLs and hashes. - if(D_PLATFORM_WINDOWS) - set(DEPS_VERSION "5.15.2") - if(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(QT_DOWNLOAD_URL "https://cdn-fastly.obsproject.com/downloads/Qt_${DEPS_VERSION}.7z") - set(QT_DOWNLOAD_HASH "9EF1DFEEBE6AB7FFC55FD285667CC5D9CB2D298646C107C2295D13F14708E64E") - endif() - endif() - elseif(D_PLATFORM_MAC) - set(DEPS_VERSION "2022-02-13") - if(D_PLATFORM_ARCH_X86 AND D_PLATFORM_ARCH_ARM) - if(D_PLATFORM_BITS EQUAL 64) - set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-universal.tar.xz") - set(QT_DOWNLOAD_HASH "13FBCC45FD9D08B30E702D481FE4D58B23F93AA06848CEDE4EBE0956C79A5E8A") - endif() - elseif(D_PLATFORM_ARCH_X86) - if(D_PLATFORM_BITS EQUAL 64) - set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-x86_64.tar.xz") - set(QT_DOWNLOAD_HASH "35A58FEE8DFD70D3D2DCC0AE0B77132C04A451C6F041A02DC41B207B375FC74B") - endif() - elseif(D_PLATFORM_ARCH_ARM) - if(D_PLATFORM_BITS EQUAL 64) - set(QT_DOWNLOAD_URL "https://github.com/obsproject/obs-deps/releases/download/${DEPS_VERSION}/macos-deps-qt-${DEPS_VERSION}-arm64.tar.xz") - set(QT_DOWNLOAD_HASH "E99146B9C7775C245A2D22F2EF24FC111FCCD71BAD0F03B64DB707124FFB8707") - endif() - endif() - endif() - - # Verify that the platform, architecture and bitness is supported. - if(QT_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX}Download for Qt failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - else() - set(QT_DOWNLOAD_URL "${${PREFIX}QT_DOWNLOAD_URL}") - set(QT_DOWNLOAD_HASH "${${PREFIX}QT_DOWNLOAD_HASH}") - endif() - - if(QT_DOWNLOAD_HASH STREQUAL "") - download_project( - PROJ qt - PREFIX "autodeps" - URL "${QT_DOWNLOAD_URL}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - else() - download_project( - PROJ qt - PREFIX "autodeps" - URL "${QT_DOWNLOAD_URL}" - URL_HASH "SHA256=${QT_DOWNLOAD_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - endif() - execute_process(COMMAND "xattr" "-r" "-d" "com.apple.quarantine" "${qt_SOURCE_DIR}") - - if(D_PLATFORM_WINDOWS) - CacheSet(${PREFIX}QT_PATH "${qt_SOURCE_DIR}/msvc2019_64") - else() - CacheSet(${PREFIX}QT_PATH "${qt_SOURCE_DIR}") - endif() - endif() - - set(Qt5_DIR "${${PREFIX}QT_PATH}/lib/cmake/Qt5" CACHE STRING "Path to Qt") - CacheSet(Qt5_DIR "${${PREFIX}QT_PATH}/lib/cmake/Qt5") -endif() - -################################################################################ -# Auto-Dependency: libAOM +# Component search paths ################################################################################ -if(D_PLATFORM_WINDOWS) - # Options - set(${PREFIX}AOM_DOWNLOAD TRUE CACHE BOOL "Automatically download AOM?") - set(${PREFIX}AOM_PATH "" CACHE PATH "Path to AOM, if ${PREFIX}AOM_DOWNLOAD is not set.") - set(${PREFIX}AOM_DOWNLOAD_URL "" CACHE STRING "The URL from which to download AOM, if autodetection fails. (Optional)") - set(${PREFIX}AOM_DOWNLOAD_HASH "" CACHE STRING "The hash string for the given URL. Must be a SHA-256 hash if provided. (Optional)") - mark_as_advanced( - ${PREFIX}AOM_PATH - ${PREFIX}AOM_DOWNLOAD_URL - ${PREFIX}AOM_DOWNLOAD_HASH - ) - - if(${PREFIX}AOM_DOWNLOAD) - if(${PREFIX}AOM_DOWNLOAD_URL STREQUAL "") - set(AOM_VERSION "v3.2.0.1") - # Figure out download URLs and hashes. - if(D_PLATFORM_WINDOWS) - if(D_PLATFORM_ARCH_X86) - set(AOM_DOWNLOAD_URL "https://github.com/Xaymar/aom/releases/download/${AOM_VERSION}/aom-windows-${D_PLATFORM_BITS}-shared.7z") - set(AOM_DOWNLOAD_HASH "2DE0C215C5B00D6761AD2D1FEAFB545C04249B2CBD542F9F7D423E1A26BA59BD") - endif() - endif() - - # Verify that the platform, architecture and bitness is supported. - if(AOM_DOWNLOAD_URL STREQUAL "") - message(FATAL_ERROR "${LOGPREFIX}Download for AOM failed, as Platform '${D_PLATFORM_OS}' with architecture '${D_PLATFORM_ARCH}' and bitness '${D_PLATFORM_BITS}' is not supported.") - return() - endif() - else() - set(AOM_DOWNLOAD_URL "${${PREFIX}AOM_DOWNLOAD_URL}") - set(AOM_DOWNLOAD_HASH "${${PREFIX}AOM_DOWNLOAD_HASH}") - endif() - - if(AOM_DOWNLOAD_HASH STREQUAL "") - download_project( - PROJ AOM - PREFIX "autodeps" - URL "${AOM_DOWNLOAD_URL}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - else() - download_project( - PROJ AOM - PREFIX "autodeps" - URL "${AOM_DOWNLOAD_URL}" - URL_HASH "SHA256=${AOM_DOWNLOAD_HASH}" - DOWNLOAD_NO_PROGRESS OFF - UPDATE_DISCONNECTED OFF - ) - endif() - - if(D_PLATFORM_WINDOWS) - CacheSet(${PREFIX}AOM_PATH "${AOM_SOURCE_DIR}/msvc2019_64") - else() - CacheSet(${PREFIX}AOM_PATH "${AOM_SOURCE_DIR}") - endif() - endif() - - set(AOM_PATH "${${PREFIX}AOM_PATH}" CACHE STRING "Path to AOM") +list(APPEND CMAKE_PREFIX_PATH + "${${PREFIX}AOM_PATH}" + "${${PREFIX}OBSDEPS_PATH}" + "${${PREFIX}QT_PATH}" + "${AOM_DIR}" + "${CURL_DIR}" + "${DepsPath}" + "${FFmpeg_DIR}" + "${libobs_DIR}" + "${Qt_DIR}" + "${Qt5_DIR}" + "${Qt6_DIR}" + "${QTDIR}" +) +if(D_PLATFORM_MAC) + list(APPEND CMAKE_PREFIX_PATH + "${${PREFIX}AOM_PATH}/Frameworks" + "${${PREFIX}OBSDEPS_PATH}/Frameworks" + "${${PREFIX}QT_PATH}/Frameworks" + "${AOM_DIR}/Frameworks" + "${CURL_DIR}/Frameworks" + "${DepsPath}/Frameworks" + "${FFmpeg_DIR}/Frameworks" + "${libobs_DIR}/Frameworks" + "${Qt_DIR}/Frameworks" + "${Qt5_DIR}/Frameworks" + "${Qt6_DIR}/Frameworks" + "${QTDIR}/Frameworks" + ) endif() ################################################################################ @@ -902,7 +630,7 @@ function(feature_frontend RESOLVE) if(NOT (Qt6_FOUND OR Qt5_FOUND)) message(WARNING "${LOGPREFIX}Front-End requires Qt. Disabling...") set_feature_disabled(FRONTEND ON) - elseif(NOT HAVE_OBS_FRONTEND_API) + elseif(NOT obs-frontend-api_FOUND) message(WARNING "${LOGPREFIX}Front-End requires OBS FrontEnd API. Disabling...") set_feature_disabled(FRONTEND ON) endif() @@ -915,7 +643,7 @@ endfunction() function(feature_updater RESOLVE) is_feature_enabled(UPDATER T_CHECK) if(RESOLVE AND T_CHECK) - if(NOT HAVE_CURL) + if(NOT CURL_FOUND) message(WARNING "${LOGPREFIX}Updater requires CURL. Disabling...") set_feature_disabled(UPDATER ON) elseif(NOT HAVE_JSON) @@ -951,84 +679,38 @@ feature_updater(OFF) # Fulfill Requirements #- OBS: Library if(STANDALONE) - if(EXISTS "${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake") - find_package(LibObs REQUIRED NO_MODULE - PATHS - "${${PREFIX}OBS_PATH}/cmake/libobs" - "${${PREFIX}OBS_PATH}/cmake/LibObs" - ) - else() - find_package(libobs REQUIRED NO_MODULE - PATHS - "${${PREFIX}OBS_PATH}/cmake/libobs" - "${${PREFIX}OBS_PATH}/cmake/LibObs" - ) - endif() + find_package("libobs" REQUIRED CONFIG) +elseif(NOT TARGET OBS::libobs) + # Add the missing OBS::libobs alias target if possible. + add_library(OBS::libobs ALIAS libobs) endif() #- OBS: Front-End API -set(HAVE_OBS_FRONTEND_API OFF) +set(obs-frontend-api_FOUND OFF) if(REQUIRE_OBS_FRONTEND_API) if(STANDALONE) - if(EXISTS "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api/obs-frontend-apiConfig.cmake") - find_package("obs-frontend-api" NO_MODULE - PATHS - "${${PREFIX}OBS_PATH}/cmake/obs-frontend-api" - ) - elseif((EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.dll") AND (EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib")) - add_library(obs-frontend-api SHARED IMPORTED) - set_target_properties(obs-frontend-api PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}OBS_PATH}/include" - INTERFACE_LINK_LIBRARIES "libobs" - IMPORTED_CONFIGURATIONS RELWITHDEBINFO - IMPORTED_IMPLIB_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.lib" - IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/obs-frontend-api.dll" - ) - elseif(EXISTS "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/libobs-frontend-api.so") - add_library(obs-frontend-api SHARED IMPORTED) - set_target_properties(obs-frontend-api PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}OBS_PATH}/include" - INTERFACE_LINK_LIBRARIES "libobs" - IMPORTED_CONFIGURATIONS RELWITHDEBINFO - IMPORTED_LOCATION_RELWITHDEBINFO "${${PREFIX}OBS_PATH}/bin/${D_PLATFORM_BITS}bit/libobs-frontend-api.so" - ) - else() - message(WARNING "${LOGPREFIX}The provided path for libOBS did not contain obs-frontend-api.") - endif() + find_package("obs-frontend-api" CONFIG) + set(obs-frontend-api_FOUND "${obs-frontend-api_FOUND}") + elseif(TARGET obs-frontend-api) + set(obs-frontend-api_FOUND ON) endif() - - if(TARGET obs-frontend-api) - set(HAVE_OBS_FRONTEND_API ON) + if(NOT TARGET OBS::obs-frontend-api) + add_library(OBS::obs-frontend-api ALIAS obs-frontend-api) endif() endif() #- CURL -set(HAVE_CURL OFF) +set(CURL_FOUND OFF) if(REQUIRE_CURL) - if(D_PLATFORM_WINDOWS) - if(STANDALONE) - set(CURL_LIBRARIES "${_OBSDEPS_PATH}/bin/libcurl.lib") - set(CURL_INCLUDE_DIRS "${_OBSDEPS_PATH}/include") - else() - # Already defined by OBS - set(CURL_LIBRARIES "${CURL_LIB}") - set(CURL_INCLUDE_DIRS "${CURL_INCLUDE_DIR}") - endif() - set(CURL_LIBRARY_DEBUG ${CURL_LIBRARIES}) - set(CURL_LIBRARY_RELEASE ${CURL_LIBRARIES}) - set(CURL_INCLUDE_DIR ${CURL_INCLUDE_DIRS}) - set(CURL_FOUND ON) - else() - find_package(CURL) - endif() - - set(HAVE_CURL ${CURL_FOUND}) + find_package("CURL") endif() #- FFmpeg set(HAVE_FFMPEG OFF) if(REQUIRE_FFMPEG) - find_package(FFmpeg COMPONENTS avutil avcodec swscale) + find_package("FFmpeg" + COMPONENTS "avutil" "avcodec" "swscale" + ) set(HAVE_FFMPEG ${FFmpeg_FOUND}) endif() @@ -1036,7 +718,7 @@ endif() set(HAVE_AOM OFF) if(REQUIRE_AOM) if(NOT D_PLATFORM_MAC) - find_package(AOM) + find_package("AOM") set(HAVE_AOM ${AOM_FOUND}) endif() endif() @@ -1098,43 +780,23 @@ endif() #- Qt if(REQUIRE_QT) # Try Qt6 first... - find_package(Qt6 + find_package("Qt6" COMPONENTS Core Gui Widgets CONFIG - HINTS - "${Qt6_DIR}" - "${Qt6_DIR}/lib" - "${Qt6_DIR}/lib/cmake" - "${Qt6_DIR}/lib/cmake/Qt6" - "${QTDIR}" - "${QTDIR}/lib" - "${QTDIR}/lib/cmake" - "${QTDIR}/lib/cmake/Qt6" - "${DepsPath}" - "${DepsPath}/lib" - "${DepsPath}/lib/cmake" - "${DepsPath}/lib/cmake/Qt6" ) + + # If Qt6 isn't present, try Qt5 if(NOT Qt6_FOUND) - # If Qt6 isn't present, try Qt5 - find_package(Qt5 + find_package("Qt5" COMPONENTS Core Gui Widgets CONFIG - HINTS - "${Qt5_DIR}" - "${Qt5_DIR}/lib" - "${Qt5_DIR}/lib/cmake" - "${Qt5_DIR}/lib/cmake/Qt5" - "${QTDIR}" - "${QTDIR}/lib" - "${QTDIR}/lib/cmake" - "${QTDIR}/lib/cmake/Qt5" - "${DepsPath}" - "${DepsPath}/lib" - "${DepsPath}/lib/cmake" - "${DepsPath}/lib/cmake/Qt5" ) endif() + if(Qt6_FOUND) + message(STATUS "${LOGPREFIX}Using Qt6.") + elseif(Qt5_FOUND) + message(STATUS "${LOGPREFIX}Using Qt5.") + endif() endif() # Verify Requirements @@ -1212,16 +874,15 @@ if(D_PLATFORM_WINDOWS) # Windows Support endif() # Minimum Dependencies -list(APPEND PROJECT_LIBRARIES libobs) +list(APPEND PROJECT_LIBRARIES OBS::libobs) # Components -if(HAVE_CURL) +if(CURL_FOUND) list(APPEND PROJECT_PRIVATE_SOURCE "source/util/util-curl.hpp" "source/util/util-curl.cpp" ) - list(APPEND PROJECT_LIBRARIES ${CURL_LIBRARY_RELEASE}) - list(APPEND PROJECT_INCLUDE_DIRS ${CURL_INCLUDE_DIR}) + list(APPEND PROJECT_LIBRARIES CURL::libcurl) endif() if(HAVE_FFMPEG) @@ -1332,8 +993,8 @@ if(HAVE_NVIDIA_CUDA) ) endif() -if(REQUIRE_OBS_FRONTEND_API AND HAVE_OBS_FRONTEND_API) - list(APPEND PROJECT_LIBRARIES obs-frontend-api) +if(REQUIRE_OBS_FRONTEND_API AND obs-frontend-api_FOUND) + list(APPEND PROJECT_LIBRARIES OBS::obs-frontend-api) endif() if(REQUIRE_QT) @@ -1997,9 +1658,9 @@ endif() # Register the library add_library(${PROJECT_NAME} MODULE ${PROJECT_FILES}) # We are a module for libOBS. +target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_LIBRARIES}) target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE_DIRS}) target_compile_definitions(${PROJECT_NAME} PRIVATE ${PROJECT_DEFINITIONS}) -target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBRARIES}) # Always generate position independent code. set_target_properties(${PROJECT_NAME} PROPERTIES @@ -2276,15 +1937,15 @@ endif() # Apple otool if(D_PLATFORM_MAC) # OBS - mac_get_linker_id(TARGET libobs OUTPUT T_OBS_LINK) + mac_get_linker_id(TARGET OBS::libobs OUTPUT T_OBS_LINK) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND install_name_tool ARGS -change "${T_OBS_LINK}" "@executable_path/../Frameworks/libobs.0.dylib" $ ) message(STATUS "${LOGPREFIX}Added post-build step for adjusting libobs linking path.") # OBS Front-End API - if(REQUIRE_OBS_FRONTEND_API AND HAVE_OBS_FRONTEND_API) - mac_get_linker_id(TARGET obs-frontend-api OUTPUT T_OBSFE_LINK) + if(REQUIRE_OBS_FRONTEND_API AND obs-frontend-api_FOUND) + mac_get_linker_id(TARGET OBS::obs-frontend-api OUTPUT T_OBSFE_LINK) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND install_name_tool ARGS -change "${T_OBSFE_LINK}" "@executable_path/../Frameworks/libobs-frontend-api.dylib" $ ) From 730987ba77f95921d64d6b119beaffbbcc5e60c8 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 18 Aug 2022 07:47:21 +0200 Subject: [PATCH 066/164] cmake: Define SHOWWINDOW constants (Windows) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd48012b19..d540881527 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1572,7 +1572,7 @@ if(D_PLATFORM_WINDOWS) NOKEYSTATES NOSYSCOMMANDS NORASTEROPS - NOSHOWWINDOW + #NOSHOWWINDOW NOATOM NOCLIPBOARD NOCOLOR From f8ecf61a7b226dd6bf26d9e77f829b0ab763af0d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 14 Aug 2022 10:31:43 +0200 Subject: [PATCH 067/164] ci: Cache and install dependencies and libraries Note: We define CMAKE_PREFIX_PATH for OBS Studio here, which should normally (https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html#variable:CMAKE_PREFIX_PATH) be filled by the project itself. This is technically non-standard behavior, and may be remedied in the future by OBS Studio. --- .github/workflows/main.yml | 194 ++++++++++++++++++++++++++++++------- 1 file changed, 160 insertions(+), 34 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4869231323..ec6827aabe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,9 @@ jobs: strategy: fail-fast: false matrix: - runner: [ windows-2022, macos-12, ubuntu-22.04, ubuntu-20.04 ] - generator: [ MSVC, GCC, Clang ] + runner: [ "windows-2022", "macos-12", "ubuntu-22.04", "ubuntu-20.04" ] + qt: [ 5, 6 ] + generator: [ "MSVC", "GCC", "Clang" ] exclude: - runner: windows-2022 generator: GCC @@ -38,6 +39,8 @@ jobs: generator: MSVC - runner: ubuntu-20.04 generator: MSVC + - runner: ubuntu-20.04 + qt: 6 include: # Windows supports MSVC - runner: windows-2022 @@ -53,7 +56,7 @@ jobs: package_name: "macos" CMAKE_GENERATOR: "Xcode" CMAKE_OSX_DEPLOYMENT_TARGET: "10.15" - CMAKE_OSX_ARCHITECTURES: "x86_64" + CMAKE_OSX_ARCHITECTURES: "x86_64;arm64" # Ubuntu needs version-specific binaries - runner: ubuntu-22.04 @@ -65,8 +68,8 @@ jobs: package_name: "ubuntu-20" CMAKE_GENERATOR: "Ninja" - runs-on: ${{ matrix.runner }} - name: "${{ matrix.name }} (${{ matrix.generator }})" + runs-on: "${{ matrix.runner }}" + name: "${{ matrix.name }} (${{ matrix.generator }}, Qt${{ matrix.qt }})" env: CMAKE_GENERATOR: "${{ matrix.CMAKE_GENERATOR }}" CMAKE_GENERATOR_PLATFORM: "${{ matrix.CMAKE_GENERATOR_PLATFORM }}" @@ -81,6 +84,22 @@ jobs: submodules: recursive fetch-depth: 0 + - name: "Gather Information" + id: info + shell: bash + run: | + # Dependency Versioning + if [[ "${{ matrix.runner }}" = windows* ]]; then + [[ $(cat "${{ github.workspace }}/third-party/obs-studio/.github/workflows/main.yml") =~ DEPS_VERSION_WIN:\ \'([0-9a-zA-Z\-]+)\' ]] + echo "::set-output name=obs_deps_version::${BASH_REMATCH[1]}" + elif [[ "${{ matrix.runner }}" = macos* ]]; then + [[ $(cat "${{ github.workspace }}/third-party/obs-studio/.github/workflows/main.yml") =~ DEPS_VERSION_MAC:\ \'([0-9a-zA-Z\-]+)\' ]] + echo "::set-output name=obs_deps_version::${BASH_REMATCH[1]}" + else + echo "::set-output name=obs_deps_version::BADVALUE" + fi + echo "::set-output name=obs_version::$(cd "${{ github.workspace }}/third-party/obs-studio" && git describe --tags --long)" + - name: "Dependencies: Windows" if: startsWith( matrix.runner, 'windows' ) run: | @@ -102,10 +121,7 @@ jobs: pkg-config \ cmake \ ninja-build \ - git \ - qtbase5-dev qtbase5-private-dev libqt5svg5-dev \ - libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ - libcurl4-openssl-dev + git # clang-format, clang-tidy curl -jLo /tmp/llvm.sh "https://apt.llvm.org/llvm.sh" @@ -143,48 +159,158 @@ jobs: sudo installer -pkg ./Install\ Packages.pkg -target / echo "CLANG_PATH=$(brew --prefix llvm@14)/bin/" >> "${GITHUB_ENV}" + - name: "Dependency: Qt (Cache)" + id: qt-cache + if: ${{ ! startsWith( matrix.runner, 'ubuntu' ) }} + uses: actions/cache@v3 + with: + path: "${{ github.workspace }}/build/qt" + key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}" + - name: "Dependency: Qt " + id: qt + if: ${{ startsWith( matrix.runner, 'ubuntu' ) || (steps.qt-cache.outputs.cache-hit != 'true') }} + shell: bash + run: | + if [[ "${{ matrix.runner }}" = windows* ]]; then + curl --retry 5 --retry-delay 30 -jLo /tmp/qt.zip "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/windows-deps-qt${{ matrix.qt }}-${{ steps.info.outputs.obs_deps_version }}-x64.zip" + if [[ ! -f "${{ github.workspace }}/build/qt" ]]; then mkdir -p "${{ github.workspace }}/build/qt"; fi + 7z x -y -o"${{ github.workspace }}/build/qt" -- "/tmp/qt.zip" + elif [[ "${{ matrix.runner }}" = macos* ]]; then + curl --retry 5 --retry-delay 30 -jLo /tmp/qt.tar.xz "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/macos-deps-qt${{ matrix.qt }}-${{ steps.info.outputs.obs_deps_version }}-universal.tar.xz" + if [[ ! -f "${{ github.workspace }}/build/qt" ]]; then mkdir -p "${{ github.workspace }}/build/qt"; fi + tar -xvf "/tmp/qt.tar.xz" -C "${{ github.workspace }}/build/qt" + elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then + if [[ ${{ matrix.qt }} -eq 5 ]]; then + sudo apt-get -y install -V \ + qtbase5-dev qtbase5-private-dev libqt5svg5-dev + elif [[ ${{ matrix.qt }} -eq 6 ]]; then + sudo apt-get -y install -V \ + qt6-base-dev qt6-base-private-dev libqt6svg6-dev + fi + fi + + - name: "Dependency: OBS Dependencies (FFmpeg, CURL, ...) (Cache)" + id: obsdeps-cache + if: ${{ ! startsWith( matrix.runner, 'ubuntu' ) }} + uses: actions/cache@v3 + with: + path: "${{ github.workspace }}/build/obsdeps" + key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}" + - name: "Dependency: OBS Dependencies (FFmpeg, CURL, ...)" + id: obsdeps + if: ${{ startsWith( matrix.runner, 'ubuntu' ) || (steps.obsdeps-cache.outputs.cache-hit != 'true') }} + shell: bash + run: | + if [[ "${{ matrix.runner }}" = windows* ]]; then + curl --retry 5 --retry-delay 30 -jLo /tmp/obsdeps.zip "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/windows-deps-${{ steps.info.outputs.obs_deps_version }}-x64.zip" + if [[ ! -f "${{ github.workspace }}/build/obsdeps" ]]; then mkdir -p "${{ github.workspace }}/build/obsdeps"; fi + 7z x -y -o"${{ github.workspace }}/build/obsdeps" -- "/tmp/obsdeps.zip" + elif [[ "${{ matrix.runner }}" = macos* ]]; then + curl --retry 5 --retry-delay 30 -jLo /tmp/obsdeps.tar.xz "https://github.com/obsproject/obs-deps/releases/download/${{ steps.info.outputs.obs_deps_version }}/macos-deps-${{ steps.info.outputs.obs_deps_version }}-universal.tar.xz" + if [[ ! -f "${{ github.workspace }}/build/obsdeps" ]]; then mkdir -p "${{ github.workspace }}/build/obsdeps"; fi + tar -xvf "/tmp/obsdeps.tar.xz" -C "${{ github.workspace }}/build/obsdeps" + elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then + sudo apt-get -y install -V \ + libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ + libcurl4-openssl-dev + fi + + - name: "Dependency: OBS Libraries (Cache)" + id: obs-cache + uses: actions/cache@v3 + with: + path: "${{ github.workspace }}/build/obs" + key: "${{ matrix.runner }}-${{ matrix.generator }}-obs${{ steps.info.outputs.obs_version }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}" + - name: "Dependency: OBS Libraries" + id: obs + if: ${{ steps.obs-cache.outputs.cache-hit != 'true' }} + shell: bash + run: | + # Extra requirements by libobs on Linux. + if [[ "${{ matrix.runner }}" = ubuntu* ]]; then + sudo apt-get install \ + libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \ + libx264-dev libcurl4-openssl-dev libmbedtls-dev libgl1-mesa-dev libjansson-dev libluajit-5.1-dev python3-dev \ + libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev \ + libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev swig libcmocka-dev libxss-dev libglvnd-dev libgles2-mesa \ + libgles2-mesa-dev libwayland-dev \ + libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev libpulse-dev \ + libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev + fi + cmake \ + -S"${{ github.workspace }}/third-party/obs-studio" \ + -B"${{ github.workspace }}/build/obs" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/obs/install" \ + -DENABLE_PLUGINS=OFF \ + -DENABLE_UI=OFF \ + -DENABLE_SCRIPTING=OFF \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/obsdeps;${{ github.workspace }}/build/qt" + cmake \ + --build "${{ github.workspace }}/build/obs" \ + --config Release \ + --target obs-frontend-api + cmake \ + --install "${{ github.workspace }}/build/obs" \ + --config Release \ + --component obs_libraries + - name: "Configure & Build (Debug)" continue-on-error: true shell: bash + env: + CMAKE_BUILD_TYPE: "Debug" run: | - cmake -H. -B"build/debug" \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX="build/debug/install" \ + cmake \ + -S"${{ github.workspace }}" \ + -B"${{ github.workspace }}/build/debug" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/debug/install" \ -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}-debug" \ - -DPACKAGE_PREFIX="build/package" \ + -DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \ -DENABLE_CLANG=TRUE -DCLANG_PATH="${{ env.CLANG_PATH }}" \ - -DENABLE_PROFILING=ON + -DENABLE_PROFILING=ON \ + -Dlibobs_DIR="${{ github.workspace }}/build/obs/install" \ + -DQt_DIR="${{ github.workspace }}/build/qt" \ + -DFFmpeg_DIR="${{ github.workspace }}/build/obsdeps" \ + -DCURL_DIR="${{ github.workspace }}/build/obsdeps" if [[ "${{ matrix.runner }}" = windows* ]]; then - cmake --build "build/debug" --config Debug --target INSTALL + cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target INSTALL elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then - cmake --build "build/debug" --config Debug --target install + cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install elif [[ "${{ matrix.runner }}" = macos* ]]; then - cmake --build "build/debug" --config Debug --target install + cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install fi - name: "Configure & Build (Release)" shell: bash + env: + CMAKE_BUILD_TYPE: "RelWithDebInfo" run: | - cmake -H. -B"build/release" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_INSTALL_PREFIX="build/release/install" \ + cmake \ + -S"${{ github.workspace }}" \ + -B"${{ github.workspace }}/build/release" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/release/install" \ -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \ - -DPACKAGE_PREFIX="build/package" \ + -DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \ -DENABLE_CLANG=TRUE -DCLANG_PATH="${{ env.CLANG_PATH }}" \ - -DENABLE_PROFILING=OFF + -DENABLE_PROFILING=OFF \ + -Dlibobs_DIR="${{ github.workspace }}/build/obs/install" \ + -DQt_DIR="${{ github.workspace}}/build/qt" \ + -DFFmpeg_DIR="${{ github.workspace }}/build/obsdeps" \ + -DCURL_DIR="${{ github.workspace }}/build/obsdeps" if [[ "${{ matrix.runner }}" = windows* ]]; then - cmake --build "build/release" --config RelWithDebInfo --target INSTALL + cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target INSTALL elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then - cmake --build "build/release" --config RelWithDebInfo --target install/strip + cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install/strip elif [[ "${{ matrix.runner }}" = macos* ]]; then - cmake --build "build/release" --config RelWithDebInfo --target install + cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install fi - name: "Validate Formatting" shell: bash run: | - cmake --build "build/debug" --config Debug --target StreamFX_clang-format - cmake --build "build/release" --config RelWithDebInfo --target StreamFX_clang-format + cmake --build "${{ github.workspace }}/build/debug" --config Debug --target StreamFX_clang-format + cmake --build "${{ github.workspace }}/build/release" --config RelWithDebInfo --target StreamFX_clang-format git --no-pager diff --patch --minimal HEAD -- git update-index --refresh git diff-index --quiet HEAD -- @@ -192,9 +318,9 @@ jobs: - name: "Package: Archives" shell: bash run: | - mkdir build/package - cmake --build "build/debug" --config RelWithDebInfo --target PACKAGE_7Z - cmake --build "build/release" --config RelWithDebInfo --target PACKAGE_7Z + mkdir "${{ github.workspace }}/build/package" + cmake --build "${{ github.workspace }}/build/debug" --config Debug --target PACKAGE_7Z + cmake --build "${{ github.workspace }}/build/release" --config RelWithDebInfo --target PACKAGE_7Z - name: "Package: Installer (Windows)" if: startsWith( matrix.runner, 'windows' ) @@ -207,11 +333,11 @@ jobs: if: startsWith( matrix.runner, 'macos' ) shell: bash run: | - packagesbuild ./build/debug/installer.pkgproj - packagesbuild ./build/release/installer.pkgproj + packagesbuild "${{ github.workspace }}/build/debug/installer.pkgproj" + packagesbuild "${{ github.workspace }}/build/release/installer.pkgproj" - name: "Artifacts" uses: actions/upload-artifact@v1 with: - name: ${{ matrix.runner }}-${{ matrix.generator }}-${{ matrix.CMAKE_BUILD_TYPE }} - path: build/package + name: "${{ matrix.runner }}-${{ matrix.generator }}-qt${{ matrix.qt }}" + path: "${{ github.workspace }}/build/package" From ceb21cc386cd7b071e51974e65d24bafba3516d9 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 18 Aug 2022 21:17:10 +0200 Subject: [PATCH 068/164] ci: Always specify all important build variables --- .github/workflows/main.yml | 52 ++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec6827aabe..86f8e5dd05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,6 @@ concurrency: env: CACHE_VERSION: 2 - LIBAOM_VERSION: "3.2.0.0" jobs: build: @@ -100,6 +99,17 @@ jobs: fi echo "::set-output name=obs_version::$(cd "${{ github.workspace }}/third-party/obs-studio" && git describe --tags --long)" + # CMake Flags + if [[ "${{ matrix.CMAKE_GENERATOR }}" != "" ]]; then + echo "::set-output name=cmake_generator::-G \"${{ matrix.CMAKE_GENERATOR }}\"" + fi + if [[ "${{ matrix.CMAKE_GENERATOR_TOOLSET }}" != "" ]]; then + echo "::set-output name=cmake_generator_toolset::-T \"${{ matrix.CMAKE_GENERATOR_TOOLSET }}\"" + fi + if [[ "${{ matrix.CMAKE_GENERATOR_PLATFORM }}" != "" ]]; then + echo "::set-output name=cmake_generator_platform::-A \"${{ matrix.CMAKE_GENERATOR_PLATFORM }}\"" + fi + - name: "Dependencies: Windows" if: startsWith( matrix.runner, 'windows' ) run: | @@ -225,6 +235,8 @@ jobs: id: obs if: ${{ steps.obs-cache.outputs.cache-hit != 'true' }} shell: bash + env: + CMAKE_BUILD_TYPE: "Release" run: | # Extra requirements by libobs on Linux. if [[ "${{ matrix.runner }}" = ubuntu* ]]; then @@ -238,9 +250,15 @@ jobs: libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev fi cmake \ - -S"${{ github.workspace }}/third-party/obs-studio" \ - -B"${{ github.workspace }}/build/obs" \ - -DCMAKE_BUILD_TYPE=Release \ + -S "${{ github.workspace }}/third-party/obs-studio" \ + -B "${{ github.workspace }}/build/obs" \ + ${{ steps.info.outputs.cmake_generator }} \ + ${{ steps.info.outputs.cmake_generator_toolset }} \ + ${{ steps.info.outputs.cmake_generator_platform }} \ + -DDCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \ + -DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \ + -DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \ -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/obs/install" \ -DENABLE_PLUGINS=OFF \ -DENABLE_UI=OFF \ @@ -262,8 +280,15 @@ jobs: CMAKE_BUILD_TYPE: "Debug" run: | cmake \ - -S"${{ github.workspace }}" \ - -B"${{ github.workspace }}/build/debug" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/build/debug" \ + ${{ steps.info.outputs.cmake_generator }} \ + ${{ steps.info.outputs.cmake_generator_toolset }} \ + ${{ steps.info.outputs.cmake_generator_platform }} \ + -DDCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \ + -DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \ + -DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \ -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/debug/install" \ -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}-debug" \ -DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \ @@ -274,7 +299,7 @@ jobs: -DFFmpeg_DIR="${{ github.workspace }}/build/obsdeps" \ -DCURL_DIR="${{ github.workspace }}/build/obsdeps" if [[ "${{ matrix.runner }}" = windows* ]]; then - cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target INSTALL + cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then cmake --build "build/debug" --config ${{ env.CMAKE_BUILD_TYPE }} --target install elif [[ "${{ matrix.runner }}" = macos* ]]; then @@ -287,8 +312,15 @@ jobs: CMAKE_BUILD_TYPE: "RelWithDebInfo" run: | cmake \ - -S"${{ github.workspace }}" \ - -B"${{ github.workspace }}/build/release" \ + -S "${{ github.workspace }}" \ + -B "${{ github.workspace }}/build/release" \ + ${{ steps.info.outputs.cmake_generator }} \ + ${{ steps.info.outputs.cmake_generator_toolset }} \ + ${{ steps.info.outputs.cmake_generator_platform }} \ + -DDCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \ + -DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \ + -DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \ -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/release/install" \ -DPACKAGE_NAME="streamfx-${{ matrix.package_name }}" \ -DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \ @@ -299,7 +331,7 @@ jobs: -DFFmpeg_DIR="${{ github.workspace }}/build/obsdeps" \ -DCURL_DIR="${{ github.workspace }}/build/obsdeps" if [[ "${{ matrix.runner }}" = windows* ]]; then - cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target INSTALL + cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install elif [[ "${{ matrix.runner }}" = ubuntu* ]]; then cmake --build "build/release" --config ${{ env.CMAKE_BUILD_TYPE }} --target install/strip elif [[ "${{ matrix.runner }}" = macos* ]]; then From 5d177ffaf07280d08dd6393d7df43f79977d14f7 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 18 Aug 2022 21:35:16 +0200 Subject: [PATCH 069/164] ci: Update cache version --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86f8e5dd05..e002cffcf7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ concurrency: cancel-in-progress: true env: - CACHE_VERSION: 2 + CACHE_VERSION: "2022-08-19" jobs: build: @@ -175,7 +175,7 @@ jobs: uses: actions/cache@v3 with: path: "${{ github.workspace }}/build/qt" - key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}" + key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}-${{ env.CACHE_VERSION }}" - name: "Dependency: Qt " id: qt if: ${{ startsWith( matrix.runner, 'ubuntu' ) || (steps.qt-cache.outputs.cache-hit != 'true') }} @@ -205,7 +205,7 @@ jobs: uses: actions/cache@v3 with: path: "${{ github.workspace }}/build/obsdeps" - key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}" + key: "${{ matrix.runner }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-${{ env.CACHE_VERSION }}" - name: "Dependency: OBS Dependencies (FFmpeg, CURL, ...)" id: obsdeps if: ${{ startsWith( matrix.runner, 'ubuntu' ) || (steps.obsdeps-cache.outputs.cache-hit != 'true') }} @@ -230,7 +230,7 @@ jobs: uses: actions/cache@v3 with: path: "${{ github.workspace }}/build/obs" - key: "${{ matrix.runner }}-${{ matrix.generator }}-obs${{ steps.info.outputs.obs_version }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}" + key: "${{ matrix.runner }}-${{ matrix.generator }}-obs${{ steps.info.outputs.obs_version }}-obsdeps${{ steps.info.outputs.obs_deps_version }}-qt${{ matrix.qt }}-${{ env.CACHE_VERSION }}" - name: "Dependency: OBS Libraries" id: obs if: ${{ steps.obs-cache.outputs.cache-hit != 'true' }} From 16a52ca1264135a7589a12a1d982af5ead497bc0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 18 Aug 2022 21:18:51 +0200 Subject: [PATCH 070/164] ui/updater: Include QActionGroup for Qt6 support In some cases, this include is provided automatically when it shouldn't exist at all. The exact cause is unknown. --- source/ui/ui-updater.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ui/ui-updater.hpp b/source/ui/ui-updater.hpp index 9d60077258..c1d4eb00ee 100644 --- a/source/ui/ui-updater.hpp +++ b/source/ui/ui-updater.hpp @@ -28,6 +28,7 @@ #endif #include +#include #include #include #include From cbddee5b9073ec999285d1da4e0307026432eb97 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 18 Aug 2022 21:20:59 +0200 Subject: [PATCH 071/164] nvidia: Assign to std::string_view& instead of swapping For unknown reasons this results in an error only when the project is built within git-bash and with cmake. It does not occur with cmake-gui or VS itself. --- source/nvidia/ar/nvidia-ar-feature.cpp | 4 ++-- source/nvidia/vfx/nvidia-vfx-effect.cpp | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/source/nvidia/ar/nvidia-ar-feature.cpp b/source/nvidia/ar/nvidia-ar-feature.cpp index 76ac243e32..af8d1a0663 100644 --- a/source/nvidia/ar/nvidia-ar-feature.cpp +++ b/source/nvidia/ar/nvidia-ar-feature.cpp @@ -70,9 +70,9 @@ streamfx::nvidia::cv::result streamfx::nvidia::ar::feature::get(parameter_t para cv::result res = get(param, cvalue); if (res == cv::result::SUCCESS) { if (cvalue) { - value.swap(std::string_view(cvalue)); + value = std::string_view(cvalue); } else { - value.swap(std::string_view()); + value = std::string_view(); } } return res; diff --git a/source/nvidia/vfx/nvidia-vfx-effect.cpp b/source/nvidia/vfx/nvidia-vfx-effect.cpp index e51c444aff..b836ba063f 100644 --- a/source/nvidia/vfx/nvidia-vfx-effect.cpp +++ b/source/nvidia/vfx/nvidia-vfx-effect.cpp @@ -19,6 +19,7 @@ // SOFTWARE. #include "nvidia-vfx-effect.hpp" +#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" @@ -38,7 +39,7 @@ using namespace ::streamfx::nvidia; -vfx::effect::~effect() +streamfx::nvidia::vfx::effect::~effect() { auto gctx = ::streamfx::obs::gs::context(); auto cctx = cuda::obs::get()->get_context()->enter(); @@ -49,7 +50,8 @@ vfx::effect::~effect() _nvcuda.reset(); } -vfx::effect::effect(effect_t effect) : _nvcuda(cuda::obs::get()), _nvcvi(cv::cv::get()), _nvvfx(vfx::vfx::get()), _fx() +streamfx::nvidia::vfx::effect::effect(effect_t effect) + : _nvcuda(cuda::obs::get()), _nvcvi(cv::cv::get()), _nvvfx(vfx::vfx::get()), _fx() { auto gctx = ::streamfx::obs::gs::context(); auto cctx = cuda::obs::get()->get_context()->enter(); @@ -74,21 +76,21 @@ vfx::effect::effect(effect_t effect) : _nvcuda(cuda::obs::get()), _nvcvi(cv::cv: } } -cv::result vfx::effect::get(parameter_t param, std::string_view& value) +cv::result streamfx::nvidia::vfx::effect::get(parameter_t param, std::string_view& value) { const char* cvalue = nullptr; cv::result res = get(param, cvalue); if (res == cv::result::SUCCESS) { if (cvalue) { - value.swap(std::string_view(cvalue)); + value = std::string_view(cvalue); } else { - value.swap(std::string_view()); + value = std::string_view(); } } return res; } -cv::result vfx::effect::get(parameter_t param, std::string& value) +cv::result streamfx::nvidia::vfx::effect::get(parameter_t param, std::string& value) { const char* cvalue = nullptr; cv::result res = get(param, cvalue); From 6e1566386e3b2a4892123562969b0455c60a8edc Mon Sep 17 00:00:00 2001 From: lainon Date: Thu, 21 Jul 2022 13:09:10 +0200 Subject: [PATCH 072/164] project: Apply more C++ paradigms to the code - Use auto in places where code clarity is improved or identical. - Replace trivial constructors and destructors with default. - Use true random for random generation. - Use std::string_view where it is valid to do so. - Apply const where it is valid to do so. - Use references where it is valid to do so. - Manually optimize memory usage with std::move and std::copy. - Opt for memory efficient containers where the size is known ahead of time. Signed-off-by: lainon --- source/encoders/encoder-ffmpeg.cpp | 10 +++--- source/encoders/encoder-ffmpeg.hpp | 4 +-- source/encoders/handlers/dnxhd_handler.cpp | 2 +- .../encoders/handlers/nvenc_h264_handler.cpp | 4 +-- .../encoders/handlers/nvenc_hevc_handler.cpp | 6 ++-- source/encoders/handlers/nvenc_shared.cpp | 28 ++++++++-------- source/ffmpeg/avframe-queue.cpp | 2 +- source/ffmpeg/hwapi/base.hpp | 2 +- source/ffmpeg/hwapi/d3d11.cpp | 8 ++--- source/ffmpeg/hwapi/d3d11.hpp | 2 +- source/ffmpeg/swscale.cpp | 2 +- source/ffmpeg/tools.cpp | 33 +++++++++---------- source/ffmpeg/tools.hpp | 15 +++++---- source/filters/filter-autoframing.cpp | 16 ++++----- source/filters/filter-displacement.cpp | 2 +- source/filters/filter-dynamic-mask.cpp | 2 +- source/filters/filter-transform.cpp | 8 ++--- source/gfx/blur/gfx-blur-box-linear.cpp | 3 +- source/gfx/blur/gfx-blur-box.cpp | 2 +- source/gfx/blur/gfx-blur-dual-filtering.cpp | 2 +- source/gfx/blur/gfx-blur-gaussian-linear.cpp | 3 +- source/gfx/blur/gfx-blur-gaussian.cpp | 6 ++-- source/gfx/gfx-debug.cpp | 2 +- source/gfx/lut/gfx-lut-consumer.cpp | 2 +- source/gfx/lut/gfx-lut-producer.cpp | 2 +- source/gfx/shader/gfx-shader-param-basic.cpp | 9 ++--- source/gfx/shader/gfx-shader-param-basic.hpp | 2 +- .../gfx/shader/gfx-shader-param-texture.cpp | 23 +++++++------ .../gfx/shader/gfx-shader-param-texture.hpp | 2 +- source/gfx/shader/gfx-shader-param.cpp | 6 ++-- source/gfx/shader/gfx-shader-param.hpp | 2 +- source/gfx/shader/gfx-shader.cpp | 6 ++-- source/gfx/shader/gfx-shader.hpp | 4 +-- source/nvidia/ar/nvidia-ar-facedetection.cpp | 2 +- source/nvidia/cuda/nvidia-cuda-context.hpp | 2 +- source/nvidia/cuda/nvidia-cuda-gs-texture.cpp | 7 ++-- source/nvidia/cv/nvidia-cv.hpp | 2 +- .../nvidia/vfx/nvidia-vfx-superresolution.cpp | 2 +- source/obs/gs/gs-effect-parameter.cpp | 12 +++---- source/obs/gs/gs-effect-pass.cpp | 18 +++++----- source/obs/gs/gs-effect-pass.hpp | 12 +++---- source/obs/gs/gs-effect-technique.cpp | 8 ++--- source/obs/gs/gs-effect-technique.hpp | 4 +-- source/obs/gs/gs-effect.cpp | 26 +++++++-------- source/obs/gs/gs-effect.hpp | 18 +++++----- source/obs/gs/gs-mipmapper.cpp | 4 +-- source/obs/gs/gs-rendertarget.cpp | 2 +- source/obs/gs/gs-rendertarget.hpp | 2 +- source/obs/gs/gs-vertexbuffer.cpp | 2 +- source/obs/gs/gs-vertexbuffer.hpp | 2 +- source/obs/obs-encoder-factory.hpp | 2 +- source/obs/obs-signal-handler.hpp | 6 ++-- source/obs/obs-source-factory.hpp | 2 +- source/sources/source-mirror.cpp | 2 +- source/ui/ui-about.cpp | 3 +- source/util/util-curl.cpp | 18 +++++----- source/util/util-curl.hpp | 2 +- source/util/util-event.hpp | 4 +-- source/util/util-library.cpp | 8 ++--- source/util/util-threadpool.cpp | 2 +- source/util/utility.cpp | 6 ++-- source/util/utility.hpp | 4 +-- 62 files changed, 200 insertions(+), 206 deletions(-) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 465fcdc7e4..c952a06cbe 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -824,7 +824,7 @@ const AVCodecContext* ffmpeg_instance::get_avcodeccontext() return _context; } -void ffmpeg_instance::parse_ffmpeg_commandline(std::string text) +void ffmpeg_instance::parse_ffmpeg_commandline(std::string_view text) { // Steps to properly parse a command line: // 1. Split by space and package by quotes. @@ -915,7 +915,7 @@ void ffmpeg_instance::parse_ffmpeg_commandline(std::string text) // have also dealt with escaping for the most part. We want to parse // an FFmpeg commandline option set here, so the first character in // the string must be a '-'. - for (std::string& opt : opts) { + for (const auto& opt : opts) { // Skip empty options. if (opt.size() == 0) continue; @@ -1133,7 +1133,7 @@ obs_properties_t* ffmpeg_factory::get_properties2(instance_t* data) if (_handler && _handler->has_threading_support(this)) { auto p = obs_properties_add_int_slider(grp, ST_KEY_FFMPEG_THREADS, D_TRANSLATE(ST_I18N_FFMPEG_THREADS), 0, - static_cast(std::thread::hardware_concurrency() * 2), 1); + static_cast(std::thread::hardware_concurrency()) * 2, 1); } }; @@ -1220,9 +1220,9 @@ std::shared_ptr ffmpeg_manager::get_handler(std::string codec) #endif } -bool ffmpeg_manager::has_handler(std::string codec) +bool ffmpeg_manager::has_handler(std::string_view codec) { - return (_handlers.find(codec) != _handlers.end()); + return (_handlers.find(codec.data()) != _handlers.end()); } std::shared_ptr _ffmepg_encoder_factory_instance = nullptr; diff --git a/source/encoders/encoder-ffmpeg.hpp b/source/encoders/encoder-ffmpeg.hpp index ae25553b40..33182df13e 100644 --- a/source/encoders/encoder-ffmpeg.hpp +++ b/source/encoders/encoder-ffmpeg.hpp @@ -123,7 +123,7 @@ namespace streamfx::encoder::ffmpeg { const AVCodecContext* get_avcodeccontext(); - void parse_ffmpeg_commandline(std::string text); + void parse_ffmpeg_commandline(std::string_view text); }; class ffmpeg_factory : public obs::encoder_factory { @@ -172,7 +172,7 @@ namespace streamfx::encoder::ffmpeg { std::shared_ptr get_handler(std::string codec); - bool has_handler(std::string codec); + bool has_handler(std::string_view codec); public: // Singleton static void initialize(); diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp index b7d550889e..f8c8fd3be9 100644 --- a/source/encoders/handlers/dnxhd_handler.cpp +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -27,7 +27,7 @@ void dnxhd_handler::override_colorformat(AVPixelFormat& target_format, obs_data_ std::pair{"dnxhr_444", AV_PIX_FMT_YUV444P10LE}}; const char* selected_profile = obs_data_get_string(settings, S_CODEC_DNXHR_PROFILE); - for (auto kv : profile_to_format_map) { + for (const auto& kv : profile_to_format_map) { if (strcmp(kv.first, selected_profile) == 0) { target_format = kv.second; return; diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index d395c418b2..a4ddac33ec 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -94,10 +94,10 @@ void nvenc_h264_handler::update(obs_data_t* settings, const AVCodec* codec, AVCo nvenc::update(settings, codec, context); if (!context->internal) { - if (auto v = obs_data_get_string(settings, ST_KEY_PROFILE); v && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_PROFILE); v && (v[0] != '\0')) { av_opt_set(context->priv_data, "profile", v, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_string(settings, ST_KEY_LEVEL); v && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_LEVEL); v && (v[0] != '\0')) { av_opt_set(context->priv_data, "level", v, AV_OPT_SEARCH_CHILDREN); } } diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index 7c8915cdbe..570f8f264f 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -92,13 +92,13 @@ void nvenc_hevc_handler::update(obs_data_t* settings, const AVCodec* codec, AVCo nvenc::update(settings, codec, context); if (!context->internal) { - if (auto v = obs_data_get_string(settings, ST_KEY_PROFILE); v && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_PROFILE); v && (v[0] != '\0')) { av_opt_set(context->priv_data, "profile", v, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_string(settings, ST_KEY_TIER); v && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_TIER); v && (v[0] != '\0')) { av_opt_set(context->priv_data, "tier", v, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_string(settings, ST_KEY_LEVEL); v && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_LEVEL); v && (v[0] != '\0')) { av_opt_set(context->priv_data, "level", v, AV_OPT_SEARCH_CHILDREN); } } diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index 2f6de97bf7..a12445b457 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -202,12 +202,12 @@ void nvenc::get_defaults(obs_data_t* settings, const AVCodec*, AVCodecContext*) static bool modified_ratecontrol(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept { // Decode the name into useful flags. - auto value = obs_data_get_string(settings, ST_KEY_RATECONTROL_MODE); - bool have_bitrate = false; - bool have_bitrate_range = false; - bool have_quality = false; - bool have_qp_limits = false; - bool have_qp = false; + const char* value = obs_data_get_string(settings, ST_KEY_RATECONTROL_MODE); + bool have_bitrate = false; + bool have_bitrate_range = false; + bool have_quality = false; + bool have_qp_limits = false; + bool have_qp = false; if (value == std::string_view("cbr")) { have_bitrate = true; } else if (value == std::string_view("vbr")) { @@ -513,14 +513,14 @@ void nvenc::get_runtime_properties(obs_properties_t* props, const AVCodec*, AVCo void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) { - if (auto v = obs_data_get_string(settings, ST_KEY_PRESET); - !context->internal && (v != nullptr) && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_PRESET); + !context->internal && (v != nullptr) && (v[0] != '\0')) { av_opt_set(context->priv_data, "preset", v, AV_OPT_SEARCH_CHILDREN); } { // Rate Control - auto v = obs_data_get_string(settings, ST_KEY_RATECONTROL_MODE); - if (!context->internal && (v != nullptr) && (strlen(v) > 0)) { + const char* v = obs_data_get_string(settings, ST_KEY_RATECONTROL_MODE); + if (!context->internal && (v != nullptr) && (v[0] != '\0')) { av_opt_set(context->priv_data, "rc", v, AV_OPT_SEARCH_CHILDREN); } @@ -572,8 +572,8 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c if (!context->internal) { if (streamfx::ffmpeg::tools::avoption_exists(context->priv_data, "multipass")) { // Multi-Pass - if (auto v = obs_data_get_string(settings, ST_KEY_RATECONTROL_MULTIPASS); - (v != nullptr) && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_RATECONTROL_MULTIPASS); + (v != nullptr) && (v[0] != '\0')) { av_opt_set(context->priv_data, "multipass", v, AV_OPT_SEARCH_CHILDREN); av_opt_set_int(context->priv_data, "2pass", 0, AV_OPT_SEARCH_CHILDREN); } @@ -717,8 +717,8 @@ void nvenc::update(obs_data_t* settings, const AVCodec* codec, AVCodecContext* c av_opt_set_int(context->priv_data, "weighted_pred", wp, AV_OPT_SEARCH_CHILDREN); } - if (auto v = obs_data_get_string(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE); - (v != nullptr) && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_OTHER_BFRAMEREFERENCEMODE); + (v != nullptr) && (v[0] != '\0')) { av_opt_set(context->priv_data, "b_ref_mode", v, AV_OPT_SEARCH_CHILDREN); } diff --git a/source/ffmpeg/avframe-queue.cpp b/source/ffmpeg/avframe-queue.cpp index 059e066627..5066a3d937 100644 --- a/source/ffmpeg/avframe-queue.cpp +++ b/source/ffmpeg/avframe-queue.cpp @@ -42,7 +42,7 @@ std::shared_ptr avframe_queue::create_frame() return frame; } -avframe_queue::avframe_queue() {} +avframe_queue::avframe_queue() = default; avframe_queue::~avframe_queue() { diff --git a/source/ffmpeg/hwapi/base.hpp b/source/ffmpeg/hwapi/base.hpp index b49f603f09..20ade021eb 100644 --- a/source/ffmpeg/hwapi/base.hpp +++ b/source/ffmpeg/hwapi/base.hpp @@ -63,7 +63,7 @@ namespace streamfx::ffmpeg::hwapi { virtual std::list enumerate_adapters() = 0; - virtual std::shared_ptr create(hwapi::device target) = 0; + virtual std::shared_ptr create(const hwapi::device& target) = 0; virtual std::shared_ptr create_from_obs() = 0; }; diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index 425aec4377..d215ff5282 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -102,7 +102,7 @@ std::list d3d11::enumerate_adapters() return std::move(adapters); } -std::shared_ptr d3d11::create(device target) +std::shared_ptr d3d11::create(const device& target) { std::shared_ptr inst; ATL::CComPtr device; @@ -156,10 +156,8 @@ struct D3D11AVFrame { }; d3d11_instance::d3d11_instance(ATL::CComPtr device, ATL::CComPtr context) -{ - _device = device; - _context = context; -} + : _device(device), _context(context) +{} d3d11_instance::~d3d11_instance() {} diff --git a/source/ffmpeg/hwapi/d3d11.hpp b/source/ffmpeg/hwapi/d3d11.hpp index 369a65ff11..9a4d136d73 100644 --- a/source/ffmpeg/hwapi/d3d11.hpp +++ b/source/ffmpeg/hwapi/d3d11.hpp @@ -57,7 +57,7 @@ namespace streamfx::ffmpeg::hwapi { virtual std::list enumerate_adapters() override; - virtual std::shared_ptr create(hwapi::device target) override; + virtual std::shared_ptr create(const hwapi::device& target) override; virtual std::shared_ptr create_from_obs() override; }; diff --git a/source/ffmpeg/swscale.cpp b/source/ffmpeg/swscale.cpp index 0ab25a0bac..73ded2aa4b 100644 --- a/source/ffmpeg/swscale.cpp +++ b/source/ffmpeg/swscale.cpp @@ -24,7 +24,7 @@ using namespace streamfx::ffmpeg; -swscale::swscale() {} +swscale::swscale() = default; swscale::~swscale() { diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 4e454177f7..fc65be428e 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -357,66 +357,65 @@ const char* tools::get_thread_type_name(int thread_type) } } -void tools::print_av_option_bool(AVCodecContext* ctx_codec, const char* option, std::string text, bool inverse) +void tools::print_av_option_bool(AVCodecContext* ctx_codec, const char* option, std::string_view text, bool inverse) { print_av_option_bool(ctx_codec, ctx_codec, option, text, inverse); } -void tools::print_av_option_bool(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string text, +void tools::print_av_option_bool(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string_view text, bool inverse) { int64_t v = 0; if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.c_str(), + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text, streamfx::ffmpeg::tools::get_error_description(err)); } else { - DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.c_str(), - (inverse ? v != 0 : v == 0) ? "Disabled" : "Enabled", + DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text, (inverse ? v != 0 : v == 0) ? "Disabled" : "Enabled", av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " " : ""); } } -void tools::print_av_option_int(AVCodecContext* ctx_codec, const char* option, std::string text, std::string suffix) +void tools::print_av_option_int(AVCodecContext* ctx_codec, const char* option, std::string_view text, + std::string_view suffix) { print_av_option_int(ctx_codec, ctx_codec, option, text, suffix); } -void tools::print_av_option_int(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string text, - std::string suffix) +void tools::print_av_option_int(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string_view text, + std::string_view suffix) { int64_t v = 0; bool is_default = av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0; if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) { if (is_default) { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.c_str()); + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text); } else { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.c_str(), + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text, streamfx::ffmpeg::tools::get_error_description(err)); } } else { - DLOG_INFO("[%s] %s: %" PRId64 " %s%s", ctx_codec->codec->name, text.c_str(), v, suffix.c_str(), - is_default ? " " : ""); + DLOG_INFO("[%s] %s: %" PRId64 " %s%s", ctx_codec->codec->name, text, v, suffix, is_default ? " " : ""); } } -void tools::print_av_option_string(AVCodecContext* ctx_codec, const char* option, std::string text, +void tools::print_av_option_string(AVCodecContext* ctx_codec, const char* option, std::string_view text, std::function decoder) { print_av_option_string(ctx_codec, ctx_codec, option, text, decoder); } -void tools::print_av_option_string(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string text, - std::function decoder) +void tools::print_av_option_string(AVCodecContext* ctx_codec, void* ctx_option, const char* option, + std::string_view text, std::function decoder) { int64_t v = 0; if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.c_str(), + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text, streamfx::ffmpeg::tools::get_error_description(err)); } else { std::string name = ""; if (decoder) name = decoder(v); - DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.c_str(), name.c_str(), + DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text, name.c_str(), av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " " : ""); } } diff --git a/source/ffmpeg/tools.hpp b/source/ffmpeg/tools.hpp index 584dc7a13e..edc1465eeb 100644 --- a/source/ffmpeg/tools.hpp +++ b/source/ffmpeg/tools.hpp @@ -63,17 +63,18 @@ namespace streamfx::ffmpeg::tools { const char* get_thread_type_name(int thread_type); - void print_av_option_bool(AVCodecContext* context, const char* option, std::string text, bool inverse = false); - void print_av_option_bool(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string text, + void print_av_option_bool(AVCodecContext* context, const char* option, std::string_view text, bool inverse = false); + void print_av_option_bool(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string_view text, bool inverse = false); - void print_av_option_int(AVCodecContext* context, const char* option, std::string text, std::string suffix); - void print_av_option_int(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string text, - std::string suffix); + void print_av_option_int(AVCodecContext* context, const char* option, std::string_view text, + std::string_view suffix); + void print_av_option_int(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string_view text, + std::string_view suffix); - void print_av_option_string(AVCodecContext* context, const char* option, std::string text, + void print_av_option_string(AVCodecContext* context, const char* option, std::string_view text, std::function decoder); - void print_av_option_string(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string text, + void print_av_option_string(AVCodecContext* ctx_codec, void* ctx_option, const char* option, std::string_view text, std::function decoder); void print_av_option_string2(AVCodecContext* context, std::string_view option, std::string_view text, diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index 5150c454d8..e7cde0d655 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -246,7 +246,7 @@ void autoframing_instance::update(obs_data_t* data) // Tracking _track_mode = static_cast(obs_data_get_int(data, ST_KEY_TRACKING_MODE)); { - if (auto text = obs_data_get_string(data, ST_KEY_TRACKING_FREQUENCY); text != nullptr) { + if (const char* text = obs_data_get_string(data, ST_KEY_TRACKING_FREQUENCY); text != nullptr) { float value = 0.; if (sscanf(text, "%f", &value) == 1) { if (const char* seconds = strchr(text, 's'); seconds == nullptr) { @@ -284,7 +284,7 @@ void autoframing_instance::update(obs_data_t* data) _frame_size_y = {_frame_stability_kalman, 1.0f, ST_KALMAN_EEC, _frame_size_y.get()}; } { // Padding - if (auto text = obs_data_get_string(data, ST_KEY_FRAMING_PADDING ".X"); text != nullptr) { + if (const char* text = obs_data_get_string(data, ST_KEY_FRAMING_PADDING ".X"); text != nullptr) { float value = 0.; if (sscanf(text, "%f", &value) == 1) { if (const char* percent = strchr(text, '%'); percent != nullptr) { @@ -297,7 +297,7 @@ void autoframing_instance::update(obs_data_t* data) } _frame_padding.x = value; } - if (auto text = obs_data_get_string(data, ST_KEY_FRAMING_PADDING ".Y"); text != nullptr) { + if (const char* text = obs_data_get_string(data, ST_KEY_FRAMING_PADDING ".Y"); text != nullptr) { float value = 0.; if (sscanf(text, "%f", &value) == 1) { if (const char* percent = strchr(text, '%'); percent != nullptr) { @@ -312,7 +312,7 @@ void autoframing_instance::update(obs_data_t* data) } } { // Offset - if (auto text = obs_data_get_string(data, ST_KEY_FRAMING_OFFSET ".X"); text != nullptr) { + if (const char* text = obs_data_get_string(data, ST_KEY_FRAMING_OFFSET ".X"); text != nullptr) { float value = 0.; if (sscanf(text, "%f", &value) == 1) { if (const char* percent = strchr(text, '%'); percent != nullptr) { @@ -325,7 +325,7 @@ void autoframing_instance::update(obs_data_t* data) } _frame_offset.x = value; } - if (auto text = obs_data_get_string(data, ST_KEY_FRAMING_OFFSET ".Y"); text != nullptr) { + if (const char* text = obs_data_get_string(data, ST_KEY_FRAMING_OFFSET ".Y"); text != nullptr) { float value = 0.; if (sscanf(text, "%f", &value) == 1) { if (const char* percent = strchr(text, '%'); percent != nullptr) { @@ -341,7 +341,7 @@ void autoframing_instance::update(obs_data_t* data) } { // Aspect Ratio _frame_aspect_ratio = static_cast(_size.first) / static_cast(_size.second); - if (auto text = obs_data_get_string(data, ST_KEY_FRAMING_ASPECTRATIO); text != nullptr) { + if (const char* text = obs_data_get_string(data, ST_KEY_FRAMING_ASPECTRATIO); text != nullptr) { if (const char* percent = strchr(text, ':'); percent != nullptr) { float left = 0.; float right = 0.; @@ -479,7 +479,7 @@ void autoframing_instance::video_render(gs_effect_t* effect) auto op = _input->render(width, height); // Set correct projection matrix. - gs_ortho(0, width, 0, height, 0, 1); + gs_ortho(0, static_cast(width), 0, static_cast(height), 0, 1); // Clear the buffer gs_clear(GS_CLEAR_COLOR | GS_CLEAR_DEPTH, &blank, 0, 0); @@ -982,7 +982,7 @@ void streamfx::filter::autoframing::autoframing_instance::nvar_facedetection_pro // Try and find a match in the current list of tracked elements. std::shared_ptr match; float match_dst = max_dst; - for (auto el : _tracked_elements) { + for (const auto& el : _tracked_elements) { // Skip "fresh" elements. if (el->age < 0.00001) { continue; diff --git a/source/filters/filter-displacement.cpp b/source/filters/filter-displacement.cpp index 64a28f8680..a89fe79d45 100644 --- a/source/filters/filter-displacement.cpp +++ b/source/filters/filter-displacement.cpp @@ -95,7 +95,7 @@ void displacement_instance::update(obs_data_t* settings) _scale[0] = _scale[1] = static_cast(obs_data_get_double(settings, ST_KEY_SCALE)); _scale_type = static_cast(obs_data_get_double(settings, ST_KEY_SCALE_TYPE) / 100.0); - std::string new_file = obs_data_get_string(settings, ST_KEY_FILE); + const char* new_file = obs_data_get_string(settings, ST_KEY_FILE); if (new_file != _texture_file) { try { _texture = std::make_shared(new_file); diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 7bad5bfb24..df674e1abd 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -112,7 +112,7 @@ void dynamic_mask_instance::migrate(obs_data_t* data, uint64_t version) {} void dynamic_mask_instance::update(obs_data_t* settings) { // Update source. - if (auto v = obs_data_get_string(settings, ST_KEY_INPUT); (v != nullptr) && (strlen(v) > 0)) { + if (const char* v = obs_data_get_string(settings, ST_KEY_INPUT); (v != nullptr) && (v[0] != '\0')) { if (!acquire(v)) DLOG_ERROR("Failed to acquire Input source '%s'.", v); } else { diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index d06f655bf8..e8b3be4a7d 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -705,7 +705,7 @@ obs_properties_t* transform_factory::get_properties2(transform_instance* data) {ST_KEY_POSITION_Y, "Y"}, {ST_KEY_POSITION_Z, "Z"}, }; - for (auto opt : opts) { + for (const auto& opt : opts) { auto p = obs_properties_add_float(grp, opt.first.c_str(), D_TRANSLATE(opt.second.c_str()), std::numeric_limits::lowest(), std::numeric_limits::max(), 0.01); @@ -721,7 +721,7 @@ obs_properties_t* transform_factory::get_properties2(transform_instance* data) {ST_KEY_ROTATION_Y, D_TRANSLATE(ST_I18N_ROTATION ".Y")}, {ST_KEY_ROTATION_Z, D_TRANSLATE(ST_I18N_ROTATION ".Z")}, }; - for (auto opt : opts) { + for (const auto& opt : opts) { auto p = obs_properties_add_float_slider(grp, opt.first.c_str(), D_TRANSLATE(opt.second.c_str()), -180.0, 180.0, 0.01); obs_property_float_set_suffix(p, "° Deg"); @@ -736,7 +736,7 @@ obs_properties_t* transform_factory::get_properties2(transform_instance* data) {ST_KEY_SCALE_X, "X"}, {ST_KEY_SCALE_Y, "Y"}, }; - for (auto opt : opts) { + for (const auto& opt : opts) { auto p = obs_properties_add_float_slider(grp, opt.first.c_str(), opt.second.c_str(), -1000, 1000, 0.01); obs_property_float_set_suffix(p, "%"); } @@ -750,7 +750,7 @@ obs_properties_t* transform_factory::get_properties2(transform_instance* data) {ST_KEY_SHEAR_X, "X"}, {ST_KEY_SHEAR_Y, "Y"}, }; - for (auto opt : opts) { + for (const auto& opt : opts) { auto p = obs_properties_add_float_slider(grp, opt.first.c_str(), opt.second.c_str(), -200.0, 200.0, 0.01); obs_property_float_set_suffix(p, "%"); diff --git a/source/gfx/blur/gfx-blur-box-linear.cpp b/source/gfx/blur/gfx-blur-box-linear.cpp index c6ef7d9255..a9c762ff4d 100644 --- a/source/gfx/blur/gfx-blur-box-linear.cpp +++ b/source/gfx/blur/gfx-blur-box-linear.cpp @@ -66,7 +66,6 @@ bool streamfx::gfx::blur::box_linear_factory::is_type_supported(::streamfx::gfx: { switch (type) { case ::streamfx::gfx::blur::type::Area: - return true; case ::streamfx::gfx::blur::type::Directional: return true; default: @@ -199,7 +198,7 @@ streamfx::gfx::blur::box_linear::~box_linear() {} void streamfx::gfx::blur::box_linear::set_input(std::shared_ptr<::streamfx::obs::gs::texture> texture) { - _input_texture = texture; + _input_texture = std::move(texture); } ::streamfx::gfx::blur::type streamfx::gfx::blur::box_linear::get_type() diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 40dd554ee6..9a223604c3 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -208,7 +208,7 @@ streamfx::gfx::blur::box::~box() {} void streamfx::gfx::blur::box::set_input(std::shared_ptr<::streamfx::obs::gs::texture> texture) { - _input_texture = texture; + _input_texture = std::move(texture); } ::streamfx::gfx::blur::type streamfx::gfx::blur::box::get_type() diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index d56d26caec..6cddb3ecf4 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -202,7 +202,7 @@ streamfx::gfx::blur::dual_filtering::~dual_filtering() {} void streamfx::gfx::blur::dual_filtering::set_input(std::shared_ptr<::streamfx::obs::gs::texture> texture) { - _input_texture = texture; + _input_texture = std::move(texture); } ::streamfx::gfx::blur::type streamfx::gfx::blur::dual_filtering::get_type() diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.cpp b/source/gfx/blur/gfx-blur-gaussian-linear.cpp index fe266cfd30..0ca35ffc6c 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.cpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.cpp @@ -115,7 +115,6 @@ bool streamfx::gfx::blur::gaussian_linear_factory::is_type_supported(::streamfx: { switch (v) { case ::streamfx::gfx::blur::type::Area: - return true; case ::streamfx::gfx::blur::type::Directional: return true; default: @@ -251,7 +250,7 @@ streamfx::gfx::blur::gaussian_linear::~gaussian_linear() {} void streamfx::gfx::blur::gaussian_linear::set_input(std::shared_ptr<::streamfx::obs::gs::texture> texture) { - _input_texture = texture; + _input_texture = std::move(texture); } ::streamfx::gfx::blur::type streamfx::gfx::blur::gaussian_linear::get_type() diff --git a/source/gfx/blur/gfx-blur-gaussian.cpp b/source/gfx/blur/gfx-blur-gaussian.cpp index e705c4f1ca..b295166e4e 100644 --- a/source/gfx/blur/gfx-blur-gaussian.cpp +++ b/source/gfx/blur/gfx-blur-gaussian.cpp @@ -41,8 +41,8 @@ streamfx::gfx::blur::gaussian_data::gaussian_data() { using namespace streamfx::util; - std::vector kernel_dbl(ST_KERNEL_SIZE); - std::vector kernel(ST_KERNEL_SIZE); + std::array kernel_dbl; + std::vector kernel(ST_KERNEL_SIZE); { auto gctx = streamfx::obs::gs::context(); @@ -277,7 +277,7 @@ streamfx::gfx::blur::gaussian::~gaussian() {} void streamfx::gfx::blur::gaussian::set_input(std::shared_ptr<::streamfx::obs::gs::texture> texture) { - _input_texture = texture; + _input_texture = std::move(texture); } ::streamfx::gfx::blur::type streamfx::gfx::blur::gaussian::get_type() diff --git a/source/gfx/gfx-debug.cpp b/source/gfx/gfx-debug.cpp index ca23a54bb1..5ce77d3aa5 100644 --- a/source/gfx/gfx-debug.cpp +++ b/source/gfx/gfx-debug.cpp @@ -139,7 +139,7 @@ void streamfx::gfx::debug::draw_arrow(float x, float y, float x2, float y2, floa float len = sqrt(dx * dx + dy * dy); if (abs(w) <= 1) { - w = len / 3.; + w = len / 3.f; } matrix4 rotator; diff --git a/source/gfx/lut/gfx-lut-consumer.cpp b/source/gfx/lut/gfx-lut-consumer.cpp index 56a1f74d91..54f8d6853c 100644 --- a/source/gfx/lut/gfx-lut-consumer.cpp +++ b/source/gfx/lut/gfx-lut-consumer.cpp @@ -29,7 +29,7 @@ streamfx::gfx::lut::consumer::consumer() throw std::runtime_error("Unable to get LUT consumer effect."); } -streamfx::gfx::lut::consumer::~consumer() {} +streamfx::gfx::lut::consumer::~consumer() = default; std::shared_ptr streamfx::gfx::lut::consumer::prepare(streamfx::gfx::lut::color_depth depth, diff --git a/source/gfx/lut/gfx-lut-producer.cpp b/source/gfx/lut/gfx-lut-producer.cpp index 0e8ddbd580..99bf7ec868 100644 --- a/source/gfx/lut/gfx-lut-producer.cpp +++ b/source/gfx/lut/gfx-lut-producer.cpp @@ -47,7 +47,7 @@ streamfx::gfx::lut::producer::producer() throw std::runtime_error("Unable to get LUT producer effect."); } -streamfx::gfx::lut::producer::~producer() {} +streamfx::gfx::lut::producer::~producer() = default; std::shared_ptr streamfx::gfx::lut::producer::produce(streamfx::gfx::lut::color_depth depth) { diff --git a/source/gfx/shader/gfx-shader-param-basic.cpp b/source/gfx/shader/gfx-shader-param-basic.cpp index df03c46e16..2b0e42af67 100644 --- a/source/gfx/shader/gfx-shader-param-basic.cpp +++ b/source/gfx/shader/gfx-shader-param-basic.cpp @@ -31,7 +31,8 @@ static const std::string_view _annotation_scale = "scale"; static const std::string_view _annotation_enum_entry = "enum_%zu"; static const std::string_view _annotation_enum_entry_name = "enum_%zu_name"; -inline bool get_annotation_string(streamfx::obs::gs::effect_parameter param, std::string anno_name, std::string& out) +inline bool get_annotation_string(streamfx::obs::gs::effect_parameter param, std::string_view anno_name, + std::string& out) { if (!param) return false; @@ -46,7 +47,7 @@ inline bool get_annotation_string(streamfx::obs::gs::effect_parameter param, std return false; } -inline bool get_annotation_float(streamfx::obs::gs::effect_parameter param, std::string anno_name, float_t& out) +inline bool get_annotation_float(streamfx::obs::gs::effect_parameter param, std::string_view anno_name, float_t& out) { if (!param) { return false; @@ -60,7 +61,7 @@ inline bool get_annotation_float(streamfx::obs::gs::effect_parameter param, std: return false; } -streamfx::gfx::shader::basic_field_type streamfx::gfx::shader::get_field_type_from_string(std::string v) +streamfx::gfx::shader::basic_field_type streamfx::gfx::shader::get_field_type_from_string(std::string_view v) { std::map matches = { {"input", basic_field_type::Input}, @@ -69,7 +70,7 @@ streamfx::gfx::shader::basic_field_type streamfx::gfx::shader::get_field_type_fr {"enumeration", basic_field_type::Enum}, }; - auto fnd = matches.find(v); + auto fnd = matches.find(v.data()); if (fnd != matches.end()) return fnd->second; diff --git a/source/gfx/shader/gfx-shader-param-basic.hpp b/source/gfx/shader/gfx-shader-param-basic.hpp index 982282f453..0a8e0ee61d 100644 --- a/source/gfx/shader/gfx-shader-param-basic.hpp +++ b/source/gfx/shader/gfx-shader-param-basic.hpp @@ -29,7 +29,7 @@ namespace streamfx::gfx { Enum, }; - basic_field_type get_field_type_from_string(std::string v); + basic_field_type get_field_type_from_string(std::string_view v); struct basic_data { union { diff --git a/source/gfx/shader/gfx-shader-param-texture.cpp b/source/gfx/shader/gfx-shader-param-texture.cpp index e52b169def..d0bd8b851b 100644 --- a/source/gfx/shader/gfx-shader-param-texture.cpp +++ b/source/gfx/shader/gfx-shader-param-texture.cpp @@ -52,7 +52,7 @@ static constexpr std::string_view _annotation_default = "default"; static constexpr std::string_view _annotation_enum_entry = "enum_%zu"; static constexpr std::string_view _annotation_enum_entry_name = "enum_%zu_name"; -streamfx::gfx::shader::texture_field_type streamfx::gfx::shader::get_texture_field_type_from_string(std::string v) +streamfx::gfx::shader::texture_field_type streamfx::gfx::shader::get_texture_field_type_from_string(std::string_view v) { std::map matches = { {"input", texture_field_type::Input}, @@ -60,7 +60,7 @@ streamfx::gfx::shader::texture_field_type streamfx::gfx::shader::get_texture_fie {"enumeration", texture_field_type::Enum}, }; - auto fnd = matches.find(v); + auto fnd = matches.find(v.data()); if (fnd != matches.end()) return fnd->second; @@ -82,15 +82,15 @@ streamfx::gfx::shader::texture_parameter::texture_parameter(streamfx::gfx::shade _keys.reserve(3); { // Type snprintf(string_buffer, sizeof(string_buffer), "%s%s", get_key().data(), ST_KEY_TYPE); - _keys.push_back(std::string(string_buffer)); + _keys.emplace_back(string_buffer); } { // File snprintf(string_buffer, sizeof(string_buffer), "%s%s", get_key().data(), ST_KEY_FILE); - _keys.push_back(std::string(string_buffer)); + _keys.emplace_back(string_buffer); } { // Source snprintf(string_buffer, sizeof(string_buffer), "%s%s", get_key().data(), ST_KEY_SOURCE); - _keys.push_back(std::string(string_buffer)); + _keys.emplace_back(string_buffer); } } @@ -233,9 +233,8 @@ void streamfx::gfx::shader::texture_parameter::properties(obs_properties_t* prop } } -std::filesystem::path make_absolute_to(std::filesystem::path origin, std::filesystem::path destination) +std::filesystem::path make_absolute_to(const std::filesystem::path& origin, const std::filesystem::path& destination) { - auto destination_dir = std::filesystem::absolute(destination.remove_filename()); return std::filesystem::absolute(destination / origin); } @@ -263,7 +262,7 @@ void streamfx::gfx::shader::texture_parameter::update(obs_data_t* settings) _dirty_ts = std::chrono::high_resolution_clock::now() - std::chrono::milliseconds(1); } } else if (_type == texture_type::Source) { - auto source_name = obs_data_get_string(settings, _keys[2].c_str()); + const char* source_name = obs_data_get_string(settings, _keys[2].c_str()); if (_source_name != source_name) { _source_name = source_name; @@ -321,14 +320,14 @@ void streamfx::gfx::shader::texture_parameter::assign() // Propagate all of this into the storage. _source_rendertarget = rt; - _source_visible = visible; - _source_active = active; + _source_visible = std::move(visible); + _source_active = std::move(active); _source_child = child; - _source = source; + _source = std::move(source); } _dirty = false; - } catch (const std::exception& ex) { + } catch (const std::exception&) { _dirty_ts = std::chrono::high_resolution_clock::now() + std::chrono::milliseconds(5000); } catch (...) { _dirty_ts = std::chrono::high_resolution_clock::now() + std::chrono::milliseconds(5000); diff --git a/source/gfx/shader/gfx-shader-param-texture.hpp b/source/gfx/shader/gfx-shader-param-texture.hpp index 7491efb1a3..7a886aa92d 100644 --- a/source/gfx/shader/gfx-shader-param-texture.hpp +++ b/source/gfx/shader/gfx-shader-param-texture.hpp @@ -19,7 +19,7 @@ namespace streamfx::gfx { Enum, }; - texture_field_type get_texture_field_type_from_string(std::string v); + texture_field_type get_texture_field_type_from_string(std::string_view v); enum class texture_type { File, diff --git a/source/gfx/shader/gfx-shader-param.cpp b/source/gfx/shader/gfx-shader-param.cpp index ef4fcb5b01..620b99e71c 100644 --- a/source/gfx/shader/gfx-shader-param.cpp +++ b/source/gfx/shader/gfx-shader-param.cpp @@ -84,7 +84,7 @@ std::size_t streamfx::gfx::shader::get_length_from_effect_type(streamfx::obs::gs } } -streamfx::gfx::shader::parameter_type streamfx::gfx::shader::get_type_from_string(std::string v) +streamfx::gfx::shader::parameter_type streamfx::gfx::shader::get_type_from_string(std::string_view v) { if ((v == "bool") || (v == "boolean")) { return parameter_type::Boolean; @@ -139,7 +139,7 @@ streamfx::gfx::shader::parameter::parameter(streamfx::gfx::shader::shader* // Read Name if (auto anno = _param.get_annotation(ST_ANNO_NAME); anno) { if (std::string v = anno.get_default_string(); v.length() > 0) { - _name = v; + _name = std::move(v); } else { throw std::out_of_range("'" ST_ANNO_NAME "' annotation has zero length."); } @@ -148,7 +148,7 @@ streamfx::gfx::shader::parameter::parameter(streamfx::gfx::shader::shader* // Read Description if (auto anno = _param.get_annotation(ST_ANNO_DESCRIPTION); anno) { if (std::string v = anno.get_default_string(); v.length() > 0) { - _description = v; + _description = std::move(v); } else { throw std::out_of_range("'" ST_ANNO_DESCRIPTION "' annotation has zero length."); } diff --git a/source/gfx/shader/gfx-shader-param.hpp b/source/gfx/shader/gfx-shader-param.hpp index 7bc47850ce..5561aefc6f 100644 --- a/source/gfx/shader/gfx-shader-param.hpp +++ b/source/gfx/shader/gfx-shader-param.hpp @@ -45,7 +45,7 @@ namespace streamfx::gfx { std::size_t get_length_from_effect_type(streamfx::obs::gs::effect_parameter::type type); - parameter_type get_type_from_string(std::string v); + parameter_type get_type_from_string(std::string_view v); class parameter { // Parent Shader diff --git a/source/gfx/shader/gfx-shader.cpp b/source/gfx/shader/gfx-shader.cpp index eb079149bd..75c3ae3f7f 100644 --- a/source/gfx/shader/gfx-shader.cpp +++ b/source/gfx/shader/gfx-shader.cpp @@ -62,7 +62,7 @@ streamfx::gfx::shader::shader::shader(obs_source_t* self, shader_mode mode) } } -streamfx::gfx::shader::shader::~shader() {} +streamfx::gfx::shader::shader::~shader() = default; bool streamfx::gfx::shader::shader::is_shader_different(const std::filesystem::path& file) try { @@ -88,7 +88,7 @@ try { return false; } -bool streamfx::gfx::shader::shader::is_technique_different(const std::string& tech) +bool streamfx::gfx::shader::shader::is_technique_different(std::string_view tech) { // Is the technique different? if (tech != _shader_tech) @@ -97,7 +97,7 @@ bool streamfx::gfx::shader::shader::is_technique_different(const std::string& te return false; } -bool streamfx::gfx::shader::shader::load_shader(const std::filesystem::path& file, const std::string& tech, +bool streamfx::gfx::shader::shader::load_shader(const std::filesystem::path& file, std::string_view tech, bool& shader_dirty, bool& param_dirty) try { if (!std::filesystem::exists(file)) diff --git a/source/gfx/shader/gfx-shader.hpp b/source/gfx/shader/gfx-shader.hpp index 5b55643f69..b90d1e62d0 100644 --- a/source/gfx/shader/gfx-shader.hpp +++ b/source/gfx/shader/gfx-shader.hpp @@ -84,9 +84,9 @@ namespace streamfx::gfx { bool is_shader_different(const std::filesystem::path& file); - bool is_technique_different(const std::string& tech); + bool is_technique_different(std::string_view tech); - bool load_shader(const std::filesystem::path& file, const std::string& tech, bool& shader_dirty, + bool load_shader(const std::filesystem::path& file, std::string_view tech, bool& shader_dirty, bool& param_dirty); static void defaults(obs_data_t* data); diff --git a/source/nvidia/ar/nvidia-ar-facedetection.cpp b/source/nvidia/ar/nvidia-ar-facedetection.cpp index b5822dbf4c..a27ca89739 100644 --- a/source/nvidia/ar/nvidia-ar-facedetection.cpp +++ b/source/nvidia/ar/nvidia-ar-facedetection.cpp @@ -92,7 +92,7 @@ void ar::facedetection::set_tracking_limit(size_t v) // Update bounding boxes structure. _bboxes.rects = _rects.data(); - _bboxes.maximum = v; + _bboxes.maximum = static_cast(v); _bboxes.current = 0; // Update feature. diff --git a/source/nvidia/cuda/nvidia-cuda-context.hpp b/source/nvidia/cuda/nvidia-cuda-context.hpp index cfe1f59bd8..e231488fb1 100644 --- a/source/nvidia/cuda/nvidia-cuda-context.hpp +++ b/source/nvidia/cuda/nvidia-cuda-context.hpp @@ -60,7 +60,7 @@ namespace streamfx::nvidia::cuda { { _ctx->pop(); } - inline context_stack(std::shared_ptr<::streamfx::nvidia::cuda::context> ctx) : _ctx(ctx) + inline context_stack(std::shared_ptr<::streamfx::nvidia::cuda::context> ctx) : _ctx(std::move(ctx)) { _ctx->push(); } diff --git a/source/nvidia/cuda/nvidia-cuda-gs-texture.cpp b/source/nvidia/cuda/nvidia-cuda-gs-texture.cpp index 3fc8536ce3..e3dac4b79b 100644 --- a/source/nvidia/cuda/nvidia-cuda-gs-texture.cpp +++ b/source/nvidia/cuda/nvidia-cuda-gs-texture.cpp @@ -62,14 +62,11 @@ streamfx::nvidia::cuda::gstexture::gstexture(std::shared_ptrget_type()) { case streamfx::obs::gs::texture::type::Cube: + case streamfx::obs::gs::texture::type::Volume: case streamfx::obs::gs::texture::type::Normal: { resource = static_cast(gs_texture_get_obj(_texture->get_object())); break; } - case streamfx::obs::gs::texture::type::Volume: { - resource = static_cast(gs_texture_get_obj(_texture->get_object())); - break; - } } if (!resource) { @@ -101,7 +98,7 @@ streamfx::nvidia::cuda::array_t throw std::runtime_error("nvidia::cuda::gstexture: Mapping failed."); } - _stream = stream; + _stream = std::move(stream); _is_mapped = true; switch (_cuda->cuGraphicsSubResourceGetMappedArray(&_pointer, _resource, 0, 0)) { diff --git a/source/nvidia/cv/nvidia-cv.hpp b/source/nvidia/cv/nvidia-cv.hpp index 84f6c995f8..51689418b3 100644 --- a/source/nvidia/cv/nvidia-cv.hpp +++ b/source/nvidia/cv/nvidia-cv.hpp @@ -293,7 +293,7 @@ namespace streamfx::nvidia::cv { public: exception(const char* what, result code) : std::runtime_error(what), _code(code) {} - exception(const std::string& what, result code) : std::runtime_error(what), _code(code) {} + exception(std::string_view what, result code) : std::runtime_error(what.data()), _code(code) {} ~exception(){}; inline result code() diff --git a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp index dc487d9f2b..c202312345 100644 --- a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp +++ b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp @@ -134,7 +134,7 @@ void streamfx::nvidia::vfx::superresolution::set_scale(float scale) scale = std::clamp(scale, 1., 4.); // Match to nearest scale. - double factor = find_closest_scale_factor(scale); + float factor = static_cast(find_closest_scale_factor(scale)); // If anything was changed, flag the effect as dirty. if (!::streamfx::util::math::is_close(_scale, factor, 0.01f)) diff --git a/source/obs/gs/gs-effect-parameter.cpp b/source/obs/gs/gs-effect-parameter.cpp index 8556d93a45..49155f75a7 100644 --- a/source/obs/gs/gs-effect-parameter.cpp +++ b/source/obs/gs/gs-effect-parameter.cpp @@ -48,22 +48,22 @@ streamfx::obs::gs::effect_parameter::effect_parameter(gs_eparam_t* param) streamfx::obs::gs::effect_parameter::effect_parameter(gs_eparam_t* param, std::shared_ptr parent) : effect_parameter(param) { - _effect_parent = parent; + _effect_parent = std::move(parent); } streamfx::obs::gs::effect_parameter::effect_parameter(gs_eparam_t* param, std::shared_ptr parent) : effect_parameter(param) { - _pass_parent = parent; + _pass_parent = std::move(parent); } streamfx::obs::gs::effect_parameter::effect_parameter(gs_eparam_t* param, std::shared_ptr parent) : effect_parameter(param) { - _param_parent = parent; + _param_parent = std::move(parent); } -streamfx::obs::gs::effect_parameter::~effect_parameter() {} +streamfx::obs::gs::effect_parameter::~effect_parameter() = default; streamfx::obs::gs::effect_parameter::effect_parameter(const effect_parameter& rhs) { @@ -694,7 +694,7 @@ void streamfx::obs::gs::effect_parameter::get_string(std::string& v) v = std::string(reinterpret_cast(ptr), reinterpret_cast(ptr) + ptr_len - 1); bfree(ptr); } else { - v = ""; + v.clear(); } } @@ -708,6 +708,6 @@ void streamfx::obs::gs::effect_parameter::get_default_string(std::string& v) v = std::string(reinterpret_cast(ptr), reinterpret_cast(ptr) + ptr_len - 1); bfree(ptr); } else { - v = ""; + v.clear(); } } diff --git a/source/obs/gs/gs-effect-pass.cpp b/source/obs/gs/gs-effect-pass.cpp index 46f44ef8cf..4d81ab8279 100644 --- a/source/obs/gs/gs-effect-pass.cpp +++ b/source/obs/gs/gs-effect-pass.cpp @@ -36,7 +36,7 @@ streamfx::obs::gs::effect_pass::effect_pass(gs_epass_t* pass, std::shared_ptrvertshader_params.array + idx)->eparam, *this); } -streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect_pass::get_vertex_parameter(std::string name) +streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect_pass::get_vertex_parameter(std::string_view name) { for (std::size_t idx = 0; idx < count_vertex_parameters(); idx++) { auto ptr = get()->vertshader_params.array + idx; - if (strcmp(ptr->eparam->name, name.c_str()) == 0) + if (strcmp(ptr->eparam->name, name.data()) == 0) return streamfx::obs::gs::effect_parameter(ptr->eparam, *this); } return nullptr; } -bool streamfx::obs::gs::effect_pass::has_vertex_parameter(std::string name) +bool streamfx::obs::gs::effect_pass::has_vertex_parameter(std::string_view name) { return (get_vertex_parameter(name) != nullptr); } -bool streamfx::obs::gs::effect_pass::has_vertex_parameter(std::string name, +bool streamfx::obs::gs::effect_pass::has_vertex_parameter(std::string_view name, streamfx::obs::gs::effect_parameter::type type) { if (auto el = get_vertex_parameter(name); el != nullptr) { @@ -95,22 +95,22 @@ streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect_pass::get_pixel_pa return streamfx::obs::gs::effect_parameter((get()->pixelshader_params.array + idx)->eparam, *this); } -streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect_pass::get_pixel_parameter(std::string name) +streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect_pass::get_pixel_parameter(std::string_view name) { for (std::size_t idx = 0; idx < count_pixel_parameters(); idx++) { auto ptr = get()->pixelshader_params.array + idx; - if (strcmp(ptr->eparam->name, name.c_str()) == 0) + if (strcmp(ptr->eparam->name, name.data()) == 0) return streamfx::obs::gs::effect_parameter(ptr->eparam, *this); } return nullptr; } -bool streamfx::obs::gs::effect_pass::has_pixel_parameter(std::string name) +bool streamfx::obs::gs::effect_pass::has_pixel_parameter(std::string_view name) { return (get_pixel_parameter(name) != nullptr); } -bool streamfx::obs::gs::effect_pass::has_pixel_parameter(std::string name, +bool streamfx::obs::gs::effect_pass::has_pixel_parameter(std::string_view name, streamfx::obs::gs::effect_parameter::type type) { if (auto el = get_pixel_parameter(name); el != nullptr) { diff --git a/source/obs/gs/gs-effect-pass.hpp b/source/obs/gs/gs-effect-pass.hpp index 8d69a4df8e..62e5bac8d2 100644 --- a/source/obs/gs/gs-effect-pass.hpp +++ b/source/obs/gs/gs-effect-pass.hpp @@ -37,14 +37,14 @@ namespace streamfx::obs::gs { std::size_t count_vertex_parameters(); streamfx::obs::gs::effect_parameter get_vertex_parameter(std::size_t idx); - streamfx::obs::gs::effect_parameter get_vertex_parameter(std::string name); - bool has_vertex_parameter(std::string name); - bool has_vertex_parameter(std::string name, streamfx::obs::gs::effect_parameter::type type); + streamfx::obs::gs::effect_parameter get_vertex_parameter(std::string_view name); + bool has_vertex_parameter(std::string_view name); + bool has_vertex_parameter(std::string_view name, streamfx::obs::gs::effect_parameter::type type); std::size_t count_pixel_parameters(); streamfx::obs::gs::effect_parameter get_pixel_parameter(std::size_t idx); - streamfx::obs::gs::effect_parameter get_pixel_parameter(std::string name); - bool has_pixel_parameter(std::string name); - bool has_pixel_parameter(std::string name, streamfx::obs::gs::effect_parameter::type type); + streamfx::obs::gs::effect_parameter get_pixel_parameter(std::string_view name); + bool has_pixel_parameter(std::string_view name); + bool has_pixel_parameter(std::string_view name, streamfx::obs::gs::effect_parameter::type type); }; } // namespace streamfx::obs::gs diff --git a/source/obs/gs/gs-effect-technique.cpp b/source/obs/gs/gs-effect-technique.cpp index 8304e1273b..bd08551112 100644 --- a/source/obs/gs/gs-effect-technique.cpp +++ b/source/obs/gs/gs-effect-technique.cpp @@ -38,7 +38,7 @@ streamfx::obs::gs::effect_technique::effect_technique(gs_technique_t* technique, reset(technique, [](void*) {}); } -streamfx::obs::gs::effect_technique::~effect_technique() {} +streamfx::obs::gs::effect_technique::~effect_technique() = default; std::string streamfx::obs::gs::effect_technique::name() { @@ -61,18 +61,18 @@ streamfx::obs::gs::effect_pass streamfx::obs::gs::effect_technique::get_pass(std return streamfx::obs::gs::effect_pass(get()->passes.array + idx, *this); } -streamfx::obs::gs::effect_pass streamfx::obs::gs::effect_technique::get_pass(std::string name) +streamfx::obs::gs::effect_pass streamfx::obs::gs::effect_technique::get_pass(std::string_view name) { for (std::size_t idx = 0; idx < get()->passes.num; idx++) { auto ptr = get()->passes.array + idx; - if (strcmp(ptr->name, name.c_str()) == 0) + if (strcmp(ptr->name, name.data()) == 0) return streamfx::obs::gs::effect_pass(ptr, *this); } return nullptr; } -bool streamfx::obs::gs::effect_technique::has_pass(std::string name) +bool streamfx::obs::gs::effect_technique::has_pass(std::string_view name) { if (get_pass(name) != nullptr) return true; diff --git a/source/obs/gs/gs-effect-technique.hpp b/source/obs/gs/gs-effect-technique.hpp index fafee06749..791a010876 100644 --- a/source/obs/gs/gs-effect-technique.hpp +++ b/source/obs/gs/gs-effect-technique.hpp @@ -33,7 +33,7 @@ namespace streamfx::obs::gs { std::size_t count_passes(); streamfx::obs::gs::effect_pass get_pass(std::size_t idx); - streamfx::obs::gs::effect_pass get_pass(std::string name); - bool has_pass(std::string name); + streamfx::obs::gs::effect_pass get_pass(std::string_view name); + bool has_pass(std::string_view name); }; } // namespace streamfx::obs::gs diff --git a/source/obs/gs/gs-effect.cpp b/source/obs/gs/gs-effect.cpp index d7d7d56822..8c8d81ae27 100644 --- a/source/obs/gs/gs-effect.cpp +++ b/source/obs/gs/gs-effect.cpp @@ -27,11 +27,11 @@ #define MAX_EFFECT_SIZE 32 * 1024 * 1024 // 32 MiB, big enough for everything. -static std::string load_file_as_code(std::filesystem::path shader_file, bool is_top_level = true) +static std::string load_file_as_code(const std::filesystem::path& shader_file, bool is_top_level = true) { - std::stringstream shader_stream; - std::filesystem::path shader_path = std::filesystem::absolute(shader_file); - std::filesystem::path shader_root = std::filesystem::path(shader_path).remove_filename(); + std::stringstream shader_stream; + const std::filesystem::path& shader_path = std::filesystem::absolute(shader_file); + const std::filesystem::path& shader_root = std::filesystem::path(shader_path).remove_filename(); // Ensure it meets size limits. uintmax_t size = std::filesystem::file_size(shader_path); @@ -96,12 +96,12 @@ static std::string load_file_as_code(std::filesystem::path shader_file, bool is_ return shader_stream.str(); } -streamfx::obs::gs::effect::effect(const std::string& code, const std::string& name) +streamfx::obs::gs::effect::effect(std::string_view code, std::string_view name) { auto gctx = streamfx::obs::gs::context(); char* error_buffer = nullptr; - gs_effect_t* effect = gs_effect_create(code.c_str(), name.c_str(), &error_buffer); + gs_effect_t* effect = gs_effect_create(code.data(), name.data(), &error_buffer); if (!effect) { throw error_buffer ? std::runtime_error(error_buffer) @@ -136,11 +136,11 @@ streamfx::obs::gs::effect_technique streamfx::obs::gs::effect::get_technique(std return streamfx::obs::gs::effect_technique(get()->techniques.array + idx, *this); } -streamfx::obs::gs::effect_technique streamfx::obs::gs::effect::get_technique(const std::string& name) +streamfx::obs::gs::effect_technique streamfx::obs::gs::effect::get_technique(std::string_view name) { for (std::size_t idx = 0; idx < count_techniques(); idx++) { auto ptr = get()->techniques.array + idx; - if (strcmp(ptr->name, name.c_str()) == 0) { + if (strcmp(ptr->name, name.data()) == 0) { return streamfx::obs::gs::effect_technique(ptr, *this); } } @@ -148,7 +148,7 @@ streamfx::obs::gs::effect_technique streamfx::obs::gs::effect::get_technique(con return nullptr; } -bool streamfx::obs::gs::effect::has_technique(const std::string& name) +bool streamfx::obs::gs::effect::has_technique(std::string_view name) { if (get_technique(name)) return true; @@ -169,11 +169,11 @@ streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect::get_parameter(std return streamfx::obs::gs::effect_parameter(get()->params.array + idx, *this); } -streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect::get_parameter(const std::string& name) +streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect::get_parameter(std::string_view name) { for (std::size_t idx = 0; idx < count_parameters(); idx++) { auto ptr = get()->params.array + idx; - if (strcmp(ptr->name, name.c_str()) == 0) { + if (strcmp(ptr->name, name.data()) == 0) { return streamfx::obs::gs::effect_parameter(ptr, *this); } } @@ -181,14 +181,14 @@ streamfx::obs::gs::effect_parameter streamfx::obs::gs::effect::get_parameter(con return nullptr; } -bool streamfx::obs::gs::effect::has_parameter(const std::string& name) +bool streamfx::obs::gs::effect::has_parameter(std::string_view name) { if (get_parameter(name)) return true; return false; } -bool streamfx::obs::gs::effect::has_parameter(const std::string& name, effect_parameter::type type) +bool streamfx::obs::gs::effect::has_parameter(std::string_view name, effect_parameter::type type) { auto eprm = get_parameter(name); if (eprm) diff --git a/source/obs/gs/gs-effect.hpp b/source/obs/gs/gs-effect.hpp index 6b00e52ea2..4d0654439b 100644 --- a/source/obs/gs/gs-effect.hpp +++ b/source/obs/gs/gs-effect.hpp @@ -27,21 +27,21 @@ namespace streamfx::obs::gs { class effect : public std::shared_ptr { public: - effect(){}; - effect(const std::string& code, const std::string& name); + effect() = default; + effect(std::string_view code, std::string_view name); effect(std::filesystem::path file); ~effect(); std::size_t count_techniques(); streamfx::obs::gs::effect_technique get_technique(std::size_t idx); - streamfx::obs::gs::effect_technique get_technique(const std::string& name); - bool has_technique(const std::string& name); + streamfx::obs::gs::effect_technique get_technique(std::string_view name); + bool has_technique(std::string_view name); std::size_t count_parameters(); streamfx::obs::gs::effect_parameter get_parameter(std::size_t idx); - streamfx::obs::gs::effect_parameter get_parameter(const std::string& name); - bool has_parameter(const std::string& name); - bool has_parameter(const std::string& name, effect_parameter::type type); + streamfx::obs::gs::effect_parameter get_parameter(std::string_view name); + bool has_parameter(std::string_view name); + bool has_parameter(std::string_view name, effect_parameter::type type); public /* Legacy Support */: inline gs_effect_t* get_object() @@ -49,12 +49,12 @@ namespace streamfx::obs::gs { return get(); } - static streamfx::obs::gs::effect create(const std::string& code, const std::string& name) + static streamfx::obs::gs::effect create(std::string_view code, std::string_view name) { return streamfx::obs::gs::effect(code, name); }; - static streamfx::obs::gs::effect create(const std::string& file) + static streamfx::obs::gs::effect create(std::string_view file) { return streamfx::obs::gs::effect(std::filesystem::path(file)); }; diff --git a/source/obs/gs/gs-mipmapper.cpp b/source/obs/gs/gs-mipmapper.cpp index f5880475cf..8e9d309575 100644 --- a/source/obs/gs/gs-mipmapper.cpp +++ b/source/obs/gs/gs-mipmapper.cpp @@ -327,11 +327,11 @@ void streamfx::obs::gs::mipmapper::rebuild(std::shared_ptrget_texture(), mip, cwidth, cheight); + d3d_copy_subregion(d3dinfo, _rt->get_texture(), static_cast(mip), cwidth, cheight); } #endif if (gs_get_device_type() == GS_DEVICE_OPENGL) { - opengl_copy_subregion(oglinfo, _rt->get_texture(), mip, cwidth, cheight); + opengl_copy_subregion(oglinfo, _rt->get_texture(), static_cast(mip), cwidth, cheight); } } diff --git a/source/obs/gs/gs-rendertarget.cpp b/source/obs/gs/gs-rendertarget.cpp index c0a65f99f6..46e330de00 100644 --- a/source/obs/gs/gs-rendertarget.cpp +++ b/source/obs/gs/gs-rendertarget.cpp @@ -97,7 +97,7 @@ streamfx::obs::gs::rendertarget_op::rendertarget_op(streamfx::obs::gs::rendertar parent->_is_being_rendered = true; } -streamfx::obs::gs::rendertarget_op::rendertarget_op(streamfx::obs::gs::rendertarget_op&& r) +streamfx::obs::gs::rendertarget_op::rendertarget_op(streamfx::obs::gs::rendertarget_op&& r) noexcept { this->parent = r.parent; r.parent = nullptr; diff --git a/source/obs/gs/gs-rendertarget.hpp b/source/obs/gs/gs-rendertarget.hpp index 0b864fb1ad..d736cdd4ee 100644 --- a/source/obs/gs/gs-rendertarget.hpp +++ b/source/obs/gs/gs-rendertarget.hpp @@ -65,7 +65,7 @@ namespace streamfx::obs::gs { rendertarget_op(streamfx::obs::gs::rendertarget* rt, uint32_t width, uint32_t height); // Move Constructor - rendertarget_op(streamfx::obs::gs::rendertarget_op&&); + rendertarget_op(streamfx::obs::gs::rendertarget_op&&) noexcept; // Copy Constructor rendertarget_op(const streamfx::obs::gs::rendertarget_op&) = delete; diff --git a/source/obs/gs/gs-vertexbuffer.cpp b/source/obs/gs/gs-vertexbuffer.cpp index 1ede2cedcf..8ba49ad731 100644 --- a/source/obs/gs/gs-vertexbuffer.cpp +++ b/source/obs/gs/gs-vertexbuffer.cpp @@ -203,7 +203,7 @@ streamfx::obs::gs::vertex_buffer::vertex_buffer(vertex_buffer const&& other) noe _obs_data = other._obs_data; } -void streamfx::obs::gs::vertex_buffer::operator=(vertex_buffer const&& other) +void streamfx::obs::gs::vertex_buffer::operator=(vertex_buffer const&& other) noexcept { // Move Assignment finalize(); diff --git a/source/obs/gs/gs-vertexbuffer.hpp b/source/obs/gs/gs-vertexbuffer.hpp index 3bb61cd6e2..0d218bdde9 100644 --- a/source/obs/gs/gs-vertexbuffer.hpp +++ b/source/obs/gs/gs-vertexbuffer.hpp @@ -111,7 +111,7 @@ namespace streamfx::obs::gs { * * \param other */ - void operator=(vertex_buffer const&& other); + void operator=(vertex_buffer const&& other) noexcept; void resize(uint32_t new_size); diff --git a/source/obs/obs-encoder-factory.hpp b/source/obs/obs-encoder-factory.hpp index 66d5868724..b70e65009b 100644 --- a/source/obs/obs-encoder-factory.hpp +++ b/source/obs/obs-encoder-factory.hpp @@ -118,7 +118,7 @@ namespace streamfx::obs { _info.get_extra_data = _get_extra_data; _info.get_sei_data = _get_sei_data; } - virtual ~encoder_factory() {} + virtual ~encoder_factory() = default; void finish_setup() { diff --git a/source/obs/obs-signal-handler.hpp b/source/obs/obs-signal-handler.hpp index 47f466ef7c..a691b509f1 100644 --- a/source/obs/obs-signal-handler.hpp +++ b/source/obs/obs-signal-handler.hpp @@ -35,8 +35,8 @@ namespace streamfx::obs { template class signal_handler : public signal_handler_base { public: - signal_handler(std::string signal, T keepalive) {} - virtual ~signal_handler() {} + signal_handler(std::string_view signal, T keepalive) {} + virtual ~signal_handler() = default; }; template<> @@ -51,7 +51,7 @@ namespace streamfx::obs { } public: - signal_handler(std::string signal, std::shared_ptr keepalive) : _keepalive(keepalive) + signal_handler(std::string_view signal, std::shared_ptr keepalive) : _keepalive(keepalive) { _signal = signal; signal_handler_t* sh = obs_source_get_signal_handler(_keepalive.get()); diff --git a/source/obs/obs-source-factory.hpp b/source/obs/obs-source-factory.hpp index ad64229da9..e5c2bf2b37 100644 --- a/source/obs/obs-source-factory.hpp +++ b/source/obs/obs-source-factory.hpp @@ -45,7 +45,7 @@ namespace streamfx::obs { _info.save = _save; _info.filter_remove = _filter_remove; } - virtual ~source_factory() {} + virtual ~source_factory() = default; protected: void finish_setup() diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 7c70649f14..7035f2a1a0 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -195,7 +195,7 @@ try { // Everything went well, store. _source_child = std::make_shared<::streamfx::obs::source_active_child>(_self, source); - _source = source; + _source = std::move(source); _source_size.first = obs_source_get_width(_source); _source_size.second = obs_source_get_height(_source); diff --git a/source/ui/ui-about.cpp b/source/ui/ui-about.cpp index 74f6c3036f..7f0b9ab026 100644 --- a/source/ui/ui-about.cpp +++ b/source/ui/ui-about.cpp @@ -70,7 +70,8 @@ streamfx::ui::about::about() : QDialog(reinterpret_cast(obs_frontend_g content->setSizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Maximum); // Create a uniform - std::mt19937_64 generator; + std::random_device rd; + std::mt19937_64 generator(rd()); std::uniform_int_distribution rnd; // Load entries from 'thanks.json' diff --git a/source/util/util-curl.cpp b/source/util/util-curl.cpp index d72965e986..75db704d2c 100644 --- a/source/util/util-curl.cpp +++ b/source/util/util-curl.cpp @@ -124,9 +124,9 @@ void streamfx::util::curl::clear_headers() _headers.clear(); } -void streamfx::util::curl::clear_header(std::string header) +void streamfx::util::curl::clear_header(std::string_view header) { - _headers.erase(header); + _headers.erase(header.data()); } void streamfx::util::curl::set_header(std::string header, std::string value) @@ -134,7 +134,7 @@ void streamfx::util::curl::set_header(std::string header, std::string value) _headers.insert_or_assign(header, value); } -size_t perform_get_kv_size(std::string a, std::string b) +size_t perform_get_kv_size(std::string_view a, std::string_view b) { return a.size() + 2 + b.size() + 1; }; @@ -148,7 +148,7 @@ CURLcode streamfx::util::curl::perform() // Calculate full buffer size. { size_t buffer_size = 0; - for (auto kv : _headers) { + for (const auto& kv : _headers) { buffer_size += perform_get_kv_size(kv.first, kv.second); } buffer.resize(buffer_size * 2); @@ -156,7 +156,7 @@ CURLcode streamfx::util::curl::perform() // Create HTTP Headers. { size_t buffer_offset = 0; - for (auto kv : _headers) { + for (const auto& kv : _headers) { size_t size = perform_get_kv_size(kv.first, kv.second); snprintf(&buffer.at(buffer_offset), size, "%s: %s", kv.first.c_str(), kv.second.c_str()); @@ -186,7 +186,7 @@ void streamfx::util::curl::reset() CURLcode streamfx::util::curl::set_read_callback(curl_io_callback_t cb) { - _read_callback = cb; + _read_callback = std::move(cb); if (CURLcode res = curl_easy_setopt(_curl, CURLOPT_READDATA, this); res != CURLE_OK) return res; return curl_easy_setopt(_curl, CURLOPT_READFUNCTION, &read_helper); @@ -194,7 +194,7 @@ CURLcode streamfx::util::curl::set_read_callback(curl_io_callback_t cb) CURLcode streamfx::util::curl::set_write_callback(curl_io_callback_t cb) { - _write_callback = cb; + _write_callback = std::move(cb); if (CURLcode res = curl_easy_setopt(_curl, CURLOPT_WRITEDATA, this); res != CURLE_OK) return res; return curl_easy_setopt(_curl, CURLOPT_WRITEFUNCTION, &write_helper); @@ -202,7 +202,7 @@ CURLcode streamfx::util::curl::set_write_callback(curl_io_callback_t cb) CURLcode streamfx::util::curl::set_xferinfo_callback(curl_xferinfo_callback_t cb) { - _xferinfo_callback = cb; + _xferinfo_callback = std::move(cb); if (CURLcode res = curl_easy_setopt(_curl, CURLOPT_XFERINFODATA, this); res != CURLE_OK) return res; return curl_easy_setopt(_curl, CURLOPT_XFERINFOFUNCTION, &xferinfo_callback); @@ -210,7 +210,7 @@ CURLcode streamfx::util::curl::set_xferinfo_callback(curl_xferinfo_callback_t cb CURLcode streamfx::util::curl::set_debug_callback(curl_debug_callback_t cb) { - _debug_callback = cb; + _debug_callback = std::move(cb); if (CURLcode res = curl_easy_setopt(_curl, CURLOPT_DEBUGDATA, this); res != CURLE_OK) return res; return curl_easy_setopt(_curl, CURLOPT_DEBUGFUNCTION, &debug_helper); diff --git a/source/util/util-curl.hpp b/source/util/util-curl.hpp index 54ab4a37e8..12ffaaa1b4 100644 --- a/source/util/util-curl.hpp +++ b/source/util/util-curl.hpp @@ -110,7 +110,7 @@ namespace streamfx::util { void clear_headers(); - void clear_header(std::string header); + void clear_header(std::string_view header); void set_header(std::string header, std::string value); diff --git a/source/util/util-event.hpp b/source/util/util-event.hpp index a0dd01b8f8..7e8a584731 100644 --- a/source/util/util-event.hpp +++ b/source/util/util-event.hpp @@ -44,7 +44,7 @@ namespace streamfx::util { event(const event<_args...>&) = delete; /* Move Constructor */ - event(event<_args...>&& other) : event() + event(event<_args...>&& other) noexcept : event() { std::lock_guard lg(_lock); std::lock_guard lgo(other._lock); @@ -60,7 +60,7 @@ namespace streamfx::util { event<_args...>& operator=(const event<_args...>&) = delete; /* Move Operator */ - event<_args...>& operator=(event<_args...>&& other) + event<_args...>& operator=(event<_args...>&& other) noexcept { std::lock_guard lg(_lock); std::lock_guard lgo(other._lock); diff --git a/source/util/util-library.cpp b/source/util/util-library.cpp index b6ba2d0a9c..5c266cfb33 100644 --- a/source/util/util-library.cpp +++ b/source/util/util-library.cpp @@ -45,10 +45,10 @@ streamfx::util::library::library(std::filesystem::path file) : _library(nullptr) _library = reinterpret_cast(LoadLibraryExW(wfile.c_str(), nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS)); } if (!_library) { - DWORD error = GetLastError(); + std::string ex = "Failed to load library."; + DWORD error = GetLastError(); if (error != ERROR_PROC_NOT_FOUND) { - PSTR message = NULL; - std::string ex = "Failed to load library."; + PSTR message = NULL; FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, error, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), (LPSTR)&message, 0, NULL); if (message) { @@ -57,7 +57,7 @@ streamfx::util::library::library(std::filesystem::path file) : _library(nullptr) throw std::runtime_error(ex); } } - throw std::runtime_error("Failed to load library."); + throw std::runtime_error(ex); } #elif defined(ST_UNIX) _library = dlopen(file.u8string().c_str(), RTLD_LAZY); diff --git a/source/util/util-threadpool.cpp b/source/util/util-threadpool.cpp index 72cb535264..ceb8537fe8 100644 --- a/source/util/util-threadpool.cpp +++ b/source/util/util-threadpool.cpp @@ -145,7 +145,7 @@ void streamfx::util::threadpool::work() _worker_idx.fetch_sub(1); } -streamfx::util::threadpool::task::task() {} +streamfx::util::threadpool::task::task() = default; streamfx::util::threadpool::task::task(threadpool_callback_t fn, threadpool_data_t dt) : _mutex(), _is_complete(), _is_dead(false), _callback(fn), _data(dt) diff --git a/source/util/utility.cpp b/source/util/utility.cpp index 0e57a36a28..4d00247b14 100644 --- a/source/util/utility.cpp +++ b/source/util/utility.cpp @@ -103,12 +103,12 @@ void streamfx::util::vec4a::operator delete[](void* p) streamfx::util::free_aligned(p); } -std::pair streamfx::util::size_from_string(std::string text, bool allowSquare) +std::pair streamfx::util::size_from_string(std::string_view text, bool allowSquare) { int64_t width, height; - const char* begin = text.c_str(); - const char* end = text.c_str() + text.size() + 1; + const auto* begin = text.data(); + const auto* end = text.data() + text.size() + 1; char* here = const_cast(end); long long res = strtoll(begin, &here, 0); diff --git a/source/util/utility.hpp b/source/util/utility.hpp index 9ed49f7ac7..84a9a8c61f 100644 --- a/source/util/utility.hpp +++ b/source/util/utility.hpp @@ -103,7 +103,7 @@ namespace streamfx::util { static void operator delete[](void* p); }; - std::pair size_from_string(std::string text, bool allowSquare = true); + std::pair size_from_string(std::string_view text, bool allowSquare = true); namespace math { template @@ -243,7 +243,7 @@ namespace streamfx::util { : _q_process_noise_covariance(pnc), _r_measurement_noise_covariance(mnc), _x_value_of_interest(value), _p_estimation_error_covariance(eec), _k_kalman_gain(0.0) {} - ~kalman1D() {} + ~kalman1D() = default; T filter(T measurement) { From 808f5c63fbbae3c26ed606b8bc5d786dbac84b1b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 19 Aug 2022 07:58:45 +0200 Subject: [PATCH 073/164] obs/gs/effect: Revert #836 The use of const references breaks '#include' for relative paths. --- source/obs/gs/gs-effect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/obs/gs/gs-effect.cpp b/source/obs/gs/gs-effect.cpp index 8c8d81ae27..a89f97bc7b 100644 --- a/source/obs/gs/gs-effect.cpp +++ b/source/obs/gs/gs-effect.cpp @@ -29,9 +29,9 @@ static std::string load_file_as_code(const std::filesystem::path& shader_file, bool is_top_level = true) { - std::stringstream shader_stream; - const std::filesystem::path& shader_path = std::filesystem::absolute(shader_file); - const std::filesystem::path& shader_root = std::filesystem::path(shader_path).remove_filename(); + std::stringstream shader_stream; + const std::filesystem::path shader_path = std::filesystem::absolute(shader_file.native()); + const std::filesystem::path shader_root = std::filesystem::path(shader_path.native()).remove_filename(); // Ensure it meets size limits. uintmax_t size = std::filesystem::file_size(shader_path); From c92be933d922f7a0551a20d3a940c2599c2635f4 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 19 Aug 2022 05:19:20 +0200 Subject: [PATCH 074/164] third-party/obs-studio: 28.0.0-rc1 --- third-party/obs-studio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/obs-studio b/third-party/obs-studio index b4f7499b33..f5be6f5fdd 160000 --- a/third-party/obs-studio +++ b/third-party/obs-studio @@ -1 +1 @@ -Subproject commit b4f7499b33b53351e56a02fc6194f11d8af78da5 +Subproject commit f5be6f5fdd2fe34b18518ecd38030f0768845688 From e97f1c2a3f68a05ec2de98154cf0809a701a816d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 07:58:55 +0200 Subject: [PATCH 075/164] ci: Fix definition of CMAKE_OSX_ARCHITECTURES (MacOS) --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e002cffcf7..6261094336 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -255,7 +255,7 @@ jobs: ${{ steps.info.outputs.cmake_generator }} \ ${{ steps.info.outputs.cmake_generator_toolset }} \ ${{ steps.info.outputs.cmake_generator_platform }} \ - -DDCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ + -DCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \ -DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \ -DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \ @@ -285,7 +285,7 @@ jobs: ${{ steps.info.outputs.cmake_generator }} \ ${{ steps.info.outputs.cmake_generator_toolset }} \ ${{ steps.info.outputs.cmake_generator_platform }} \ - -DDCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ + -DCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \ -DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \ -DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \ @@ -317,7 +317,7 @@ jobs: ${{ steps.info.outputs.cmake_generator }} \ ${{ steps.info.outputs.cmake_generator_toolset }} \ ${{ steps.info.outputs.cmake_generator_platform }} \ - -DDCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ + -DCMAKE_OSX_ARCHITECTURES="${{ matrix.CMAKE_OSX_ARCHITECTURES }}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${{ matrix.CMAKE_OSX_DEPLOYMENT_TARGET }}" \ -DCMAKE_SYSTEM_VERSION="${{ matrix.CMAKE_SYSTEM_VERSION }}" \ -DCMAKE_BUILD_TYPE="${{ env.CMAKE_BUILD_TYPE }}" \ From 1d066caed34dfee0784b0a92de5cb522be9ac4bc Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 07:51:56 +0200 Subject: [PATCH 076/164] cmake: Set correct path for Qt6 binaries (MacOS) --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d540881527..649d1005f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1987,11 +1987,11 @@ if(D_PLATFORM_MAC) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD # - QtCore - COMMAND install_name_tool ARGS -change "${T_QT6CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/6/QtCore" $ + COMMAND install_name_tool ARGS -change "${T_QT6CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/A/QtCore" $ # - QtGui - COMMAND install_name_tool ARGS -change "${T_QT6GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/6/QtGui" $ + COMMAND install_name_tool ARGS -change "${T_QT6GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/A/QtGui" $ # - QtWidgets - COMMAND install_name_tool ARGS -change "${T_QT6WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/6/QtWidgets" $ + COMMAND install_name_tool ARGS -change "${T_QT6WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/A/QtWidgets" $ ) message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Core linking path (Found: ${Qt6_DIR} resolved to ${T_QT6CORE_LINK}).") message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Gui linking path (Found: ${Qt6_DIR} resolved to ${T_QT6GUI_LINK}).") From 9fbed3a31913043e3d9989ad893b90f9e6375479 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 07:50:19 +0200 Subject: [PATCH 077/164] cmake: Workaround for missing INTERFACE_INCLUDE_DIRECTORIES (MacOS) This work-around adds the necessary include directories, as the 'libobs' target does not export any include directories visible without BUILD_INTERFACE evaluating to TRUE. Hopefully the true cause for this problem can be identified and fixed later. --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 649d1005f2..311729585c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -684,6 +684,21 @@ elseif(NOT TARGET OBS::libobs) # Add the missing OBS::libobs alias target if possible. add_library(OBS::libobs ALIAS libobs) endif() +if(D_PLATFORM_MAC) + # We may need to reconstruct the include directories on MacOS. + get_target_property(libobs_INTERFACE_INCLUDE_DIRECTORIES OBS::libobs INTERFACE_INCLUDE_DIRECTORIES) + if("${libobs_INTERFACE_INCLUDE_DIRECTORIES}" STREQUAL "libobs_INTERFACE_INCLUDE_DIRECTORIES-NOTFOUND") + get_target_property(libobs_IMPORTED_LOCATION_RELEASE OBS::libobs IMPORTED_LOCATION_RELEASE) + get_filename_component(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}" DIRECTORY) + get_filename_component(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}" DIRECTORY) + get_filename_component(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}" DIRECTORY) + set(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}/Headers") + set_target_properties(OBS::libobs PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES + "${libobs_IMPORTED_LOCATION_RELEASE}" + ) + endif() +endif() #- OBS: Front-End API set(obs-frontend-api_FOUND OFF) From 8f8b8839e5e534059714eef98faf6e5efa93038b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 21:07:11 +0200 Subject: [PATCH 078/164] obs/weak-source: Further optimization and modernization --- source/filters/filter-dynamic-mask.cpp | 2 +- source/obs/obs-weak-source.hpp | 108 +++++++++++++++---------- 2 files changed, 68 insertions(+), 42 deletions(-) diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index df674e1abd..e0bac41929 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -434,7 +434,7 @@ try { void dynamic_mask_instance::release() { - _input = {}; + _input.reset(); _input_capture.reset(); deactivate(); diff --git a/source/obs/obs-weak-source.hpp b/source/obs/obs-weak-source.hpp index da34790f0b..b28020e99c 100644 --- a/source/obs/obs-weak-source.hpp +++ b/source/obs/obs-weak-source.hpp @@ -18,40 +18,45 @@ #pragma once #include "common.hpp" +#include #include "obs-source.hpp" -namespace streamfx::obs { - class source; +// ToDo: +// - Is FORCE_INLINE necessary for optimal performance, or can LTO handle this? +namespace streamfx::obs { class weak_source { obs_weak_source_t* _ref; public: - ~weak_source() + FORCE_INLINE ~weak_source() noexcept { if (_ref) { obs_weak_source_release(_ref); } }; - /** Empty/Invalid weak reference. + /** Create an empty weak source. * + * The weak source will be expired, as it points at nothing. */ - weak_source() : _ref(nullptr){}; + FORCE_INLINE weak_source() : _ref(nullptr){}; /** Create a new weak reference from an existing pointer. * - * Attention: Ownership of obs_weak_source_t is transferred to the class itself, and should not be released. + * @param duplicate If true, will duplicate the pointer instead of taking ownership. */ - weak_source(obs_weak_source_t* source) : _ref(source) + FORCE_INLINE weak_source(obs_weak_source_t* source, bool duplicate = true) : _ref(source) { if (!_ref) throw std::invalid_argument("Parameter 'source' does not define a valid source."); + if (duplicate) + obs_weak_source_addref(_ref); }; /** Create a new weak reference from an existing hard reference. */ - weak_source(obs_source_t* source) + FORCE_INLINE weak_source(obs_source_t* source) { _ref = obs_source_get_weak_source(source); if (!_ref) @@ -60,7 +65,7 @@ namespace streamfx::obs { /** Create a new weak reference from an existing hard reference. */ - weak_source(::streamfx::obs::source& source) + FORCE_INLINE weak_source(const ::streamfx::obs::source& source) { _ref = obs_source_get_weak_source(source.get()); if (!_ref) @@ -71,7 +76,7 @@ namespace streamfx::obs { * * Attention: May fail if the name does not exactly match. */ - weak_source(std::string_view name) + FORCE_INLINE weak_source(std::string_view name) { std::shared_ptr ref{obs_get_source_by_name(name.data()), [](obs_source_t* v) { obs_source_release(v); }}; @@ -81,18 +86,31 @@ namespace streamfx::obs { _ref = obs_source_get_weak_source(ref.get()); }; - weak_source(weak_source&& move) noexcept + public /* Move & Copy Operators */: + /** Move Constructor + * + */ + FORCE_INLINE weak_source(::streamfx::obs::weak_source&& move) noexcept { _ref = move._ref; move._ref = nullptr; }; - FORCE_INLINE ::streamfx::obs::weak_source& operator=(weak_source&& move) noexcept + /** Copy Constructor + * + */ + FORCE_INLINE weak_source(const ::streamfx::obs::weak_source& copy) noexcept { - if (_ref) { - obs_weak_source_release(_ref); - _ref = nullptr; - } + _ref = copy._ref; + obs_weak_source_addref(_ref); + }; + + /** Move Assign + * + */ + FORCE_INLINE ::streamfx::obs::weak_source& operator=(::streamfx::obs::weak_source&& move) noexcept + { + reset(); if (move._ref) { _ref = move._ref; move._ref = nullptr; @@ -100,18 +118,12 @@ namespace streamfx::obs { return *this; }; - weak_source(const weak_source& copy) - { - _ref = copy._ref; - obs_weak_source_addref(_ref); - }; - - FORCE_INLINE ::streamfx::obs::weak_source& operator=(const weak_source& copy) + /** Copy Assign + * + */ + FORCE_INLINE ::streamfx::obs::weak_source& operator=(const ::streamfx::obs::weak_source& copy) noexcept { - if (_ref) { - obs_weak_source_release(_ref); - _ref = nullptr; - } + reset(); if (copy._ref) { _ref = copy._ref; obs_weak_source_addref(_ref); @@ -120,20 +132,33 @@ namespace streamfx::obs { return *this; }; + public /* ... */: /** Retrieve the underlying pointer for manual manipulation. * * Attention: Ownership remains with the class instance. */ - FORCE_INLINE obs_weak_source_t* get() const + [[deprecated("Prefer operator*()")]] FORCE_INLINE obs_weak_source_t* get() const noexcept { return _ref; }; + /** Release the ownership of the managed object. + * + * Same as 'x = nullptr;'. + */ + FORCE_INLINE void reset() noexcept + { + if (_ref) { + obs_weak_source_release(_ref); + _ref = nullptr; + } + }; + /** Is the weak reference expired? * * A weak reference is expired when the original object it is pointing at no longer exists. */ - FORCE_INLINE bool expired() const + FORCE_INLINE bool expired() const noexcept { return (!_ref) || (obs_weak_source_expired(_ref)); }; @@ -142,48 +167,49 @@ namespace streamfx::obs { * * May fail if the reference expired before we successfully acquire it. */ - FORCE_INLINE ::streamfx::obs::source lock() const + FORCE_INLINE ::streamfx::obs::source lock() const noexcept { return {obs_weak_source_get_source(_ref)}; }; - public: - FORCE_INLINE operator obs_weak_source_t*() const + public /* Type Conversion Operators */: + FORCE_INLINE operator obs_weak_source_t*() const noexcept { return _ref; - } + }; - FORCE_INLINE obs_weak_source_t* operator*() const + FORCE_INLINE obs_weak_source_t* operator*() const noexcept { return _ref; - } + }; - FORCE_INLINE operator bool() const + FORCE_INLINE operator bool() const noexcept { return !expired(); }; - FORCE_INLINE bool operator==(weak_source const& rhs) const + public /* Comparison Operators */: + FORCE_INLINE bool operator==(::streamfx::obs::weak_source const& rhs) const noexcept { return _ref == rhs._ref; }; - FORCE_INLINE bool operator<(weak_source const& rhs) const + FORCE_INLINE bool operator<(::streamfx::obs::weak_source const& rhs) const noexcept { return _ref < rhs._ref; }; - FORCE_INLINE bool operator==(obs_weak_source_t* const& rhs) const + FORCE_INLINE bool operator==(obs_weak_source_t* const& rhs) const noexcept { return _ref == rhs; }; - FORCE_INLINE bool operator==(source const& rhs) const + FORCE_INLINE bool operator==(::streamfx::obs::source const& rhs) const noexcept { return obs_weak_source_references_source(_ref, rhs.get()); }; - FORCE_INLINE bool operator==(obs_source_t* const& rhs) const + FORCE_INLINE bool operator==(obs_source_t* const& rhs) const noexcept { return obs_weak_source_references_source(_ref, rhs); }; From fb09e98a5fed305d06b49f91be82386ad7e15129 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 21:15:20 +0200 Subject: [PATCH 079/164] gfx/shader/param-texture: Use obs::weak_source instead of obs::source --- .../gfx/shader/gfx-shader-param-texture.cpp | 23 +++++++++++-------- .../gfx/shader/gfx-shader-param-texture.hpp | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/source/gfx/shader/gfx-shader-param-texture.cpp b/source/gfx/shader/gfx-shader-param-texture.cpp index d0bd8b851b..d26f12d742 100644 --- a/source/gfx/shader/gfx-shader-param-texture.cpp +++ b/source/gfx/shader/gfx-shader-param-texture.cpp @@ -282,7 +282,7 @@ void streamfx::gfx::shader::texture_parameter::assign() // Reload or Reacquire everything necessary. try { // Remove now unused references. - _source.release(); + _source.reset(); _source_child.reset(); _source_active.reset(); _source_visible.reset(); @@ -323,7 +323,7 @@ void streamfx::gfx::shader::texture_parameter::assign() _source_visible = std::move(visible); _source_active = std::move(active); _source_child = child; - _source = std::move(source); + _source = source; } _dirty = false; @@ -336,14 +336,15 @@ void streamfx::gfx::shader::texture_parameter::assign() // If this is a source and active or visible, capture it. if ((_type == texture_type::Source) && (_active || _visible) && _source_rendertarget) { + auto source = _source.lock(); #ifdef ENABLE_PROFILING ::streamfx::obs::gs::debug_marker profiler1{::streamfx::obs::gs::debug_color_capture, "Parameter '%s'", get_key().data()}; ::streamfx::obs::gs::debug_marker profiler2{::streamfx::obs::gs::debug_color_capture, "Capture '%s'", - obs_source_get_name(_source.get())}; + source.name().data()}; #endif - uint32_t width = obs_source_get_width(_source.get()); - uint32_t height = obs_source_get_height(_source.get()); + uint32_t width = source.width(); + uint32_t height = source.height(); auto op = _source_rendertarget->render(width, height); @@ -357,7 +358,7 @@ void streamfx::gfx::shader::texture_parameter::assign() gs_enable_color(true, true, true, true); - obs_source_video_render(_source.get()); + obs_source_video_render(source.get()); gs_blend_state_pop(); gs_matrix_pop(); @@ -388,8 +389,9 @@ void streamfx::gfx::shader::texture_parameter::visible(bool visible) { _visible = visible; if (visible) { - if (_source) { - _source_visible = ::streamfx::obs::source_showing_reference::add_showing_reference(_source); + auto source = _source.lock(); + if (source) { + _source_visible = ::streamfx::obs::source_showing_reference::add_showing_reference(source); } } else { _source_visible.reset(); @@ -400,8 +402,9 @@ void streamfx::gfx::shader::texture_parameter::active(bool active) { _active = active; if (active) { - if (_source) { - _source_active = ::streamfx::obs::source_active_reference::add_active_reference(_source); + auto source = _source.lock(); + if (source) { + _source_active = ::streamfx::obs::source_active_reference::add_active_reference(source); } } else { _source_active.reset(); diff --git a/source/gfx/shader/gfx-shader-param-texture.hpp b/source/gfx/shader/gfx-shader-param-texture.hpp index 7a886aa92d..77fe767938 100644 --- a/source/gfx/shader/gfx-shader-param-texture.hpp +++ b/source/gfx/shader/gfx-shader-param-texture.hpp @@ -9,8 +9,8 @@ #include "obs/obs-source-active-child.hpp" #include "obs/obs-source-active-reference.hpp" #include "obs/obs-source-showing-reference.hpp" -#include "obs/obs-source.hpp" #include "obs/obs-tools.hpp" +#include "obs/obs-weak-source.hpp" namespace streamfx::gfx { namespace shader { @@ -59,7 +59,7 @@ namespace streamfx::gfx { // Data: Source std::string _source_name; - ::streamfx::obs::source _source; + ::streamfx::obs::weak_source _source; std::shared_ptr _source_child; std::shared_ptr _source_active; std::shared_ptr _source_visible; From 3883c4759cf33b93d697e6e0ac9ec6236b8a297e Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 23:16:44 +0200 Subject: [PATCH 080/164] encoders/handlers/amf: Deprecate encoder --- data/locale/en-US.ini | 1 + source/encoders/handlers/amf_h264_handler.cpp | 5 +++++ source/encoders/handlers/amf_hevc_handler.cpp | 5 +++++ source/encoders/handlers/amf_hevc_handler.hpp | 4 ++++ source/encoders/handlers/amf_shared.cpp | 11 +++++++++++ source/encoders/handlers/amf_shared.hpp | 2 ++ 6 files changed, 28 insertions(+) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index 9cb5a8f007..27b68f8456 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -138,6 +138,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Seconds" Encoder.FFmpeg.KeyFrames.Interval="Interval" # Encoder/FFmpeg/AMF +Encoder.FFmpeg.AMF.Deprecated="This encoder is deprecated and will be removed soon. Users are urged to migrate to the integrated 'AMD HW H.264 (AVC)' or 'AMD HW H.265 (HEVC)' encoder as soon as possible." Encoder.FFmpeg.AMF.Preset="Preset" Encoder.FFmpeg.AMF.Preset.Speed="Speed" Encoder.FFmpeg.AMF.Preset.Balanced="Balanced" diff --git a/source/encoders/handlers/amf_h264_handler.cpp b/source/encoders/handlers/amf_h264_handler.cpp index 0f7b2be909..5201824d2f 100644 --- a/source/encoders/handlers/amf_h264_handler.cpp +++ b/source/encoders/handlers/amf_h264_handler.cpp @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #include "amf_h264_handler.hpp" #include "../codecs/h264.hpp" #include "../encoder-ffmpeg.hpp" @@ -60,6 +64,7 @@ void amf_h264_handler::adjust_info(ffmpeg_factory* factory, const AVCodec* codec name = "AMD AMF H.264/AVC (via FFmpeg)"; if (!amf::is_available()) factory->get_info()->caps |= OBS_ENCODER_CAP_DEPRECATED; + factory->get_info()->caps |= OBS_ENCODER_CAP_DEPRECATED; } void amf_h264_handler::get_defaults(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context, bool hw_encode) diff --git a/source/encoders/handlers/amf_hevc_handler.cpp b/source/encoders/handlers/amf_hevc_handler.cpp index 17d7989fcf..4f1d323783 100644 --- a/source/encoders/handlers/amf_hevc_handler.cpp +++ b/source/encoders/handlers/amf_hevc_handler.cpp @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #include "amf_hevc_handler.hpp" #include "strings.hpp" #include "../codecs/hevc.hpp" @@ -62,6 +66,7 @@ void amf_hevc_handler::adjust_info(ffmpeg_factory* factory, const AVCodec* codec name = "AMD AMF H.265/HEVC (via FFmpeg)"; if (!amf::is_available()) factory->get_info()->caps |= OBS_ENCODER_CAP_DEPRECATED; + factory->get_info()->caps |= OBS_ENCODER_CAP_DEPRECATED; } void amf_hevc_handler::get_defaults(obs_data_t* settings, const AVCodec* codec, AVCodecContext* context, bool) diff --git a/source/encoders/handlers/amf_hevc_handler.hpp b/source/encoders/handlers/amf_hevc_handler.hpp index 756a31dc48..1cd537ec7e 100644 --- a/source/encoders/handlers/amf_hevc_handler.hpp +++ b/source/encoders/handlers/amf_hevc_handler.hpp @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #pragma once #include "handler.hpp" diff --git a/source/encoders/handlers/amf_shared.cpp b/source/encoders/handlers/amf_shared.cpp index 52209ad107..0d4e4bfffc 100644 --- a/source/encoders/handlers/amf_shared.cpp +++ b/source/encoders/handlers/amf_shared.cpp @@ -19,6 +19,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #include "amf_shared.hpp" #include "ffmpeg/tools.hpp" @@ -31,6 +35,7 @@ extern "C" { // Translation #define ST_I18N "Encoder.FFmpeg.AMF" +#define ST_I18N_DEPRECATED ST_I18N ".Deprecated" #define ST_I18N_PRESET ST_I18N ".Preset" #define ST_I18N_PRESET_(x) ST_I18N_PRESET "." x #define ST_I18N_RATECONTROL "Encoder.FFmpeg.AMF.RateControl" @@ -188,6 +193,12 @@ static bool modified_ratecontrol(obs_properties_t* props, obs_property_t*, obs_d void amf::get_properties_pre(obs_properties_t* props, const AVCodec* codec) { + { + auto p = obs_properties_add_text(props, "[[deprecated]]", D_TRANSLATE(ST_I18N_DEPRECATED), OBS_TEXT_INFO); + obs_property_text_set_info_type(p, OBS_TEXT_INFO_WARNING); + obs_property_text_set_info_word_wrap(p, true); + } + auto p = obs_properties_add_list(props, ST_KEY_PRESET, D_TRANSLATE(ST_I18N_PRESET), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); for (auto kv : presets) { diff --git a/source/encoders/handlers/amf_shared.hpp b/source/encoders/handlers/amf_shared.hpp index 0cb32e3286..2e4adfadef 100644 --- a/source/encoders/handlers/amf_shared.hpp +++ b/source/encoders/handlers/amf_shared.hpp @@ -19,6 +19,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. + #pragma once #include "common.hpp" #include "handler.hpp" From c150a1b0d7f1d08a88a768245dd1566824e071c2 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 20 Aug 2022 23:36:10 +0200 Subject: [PATCH 081/164] encoders/aom-av1: Deprecate encoder --- data/locale/en-US.ini | 1 + source/encoders/encoder-aom-av1.cpp | 12 ++++++++++++ source/encoders/encoder-aom-av1.hpp | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index 27b68f8456..79c150fba0 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -66,6 +66,7 @@ UI.Updater.Menu.Channel.Alpha="Alpha" # Encoder/AOM-AV1 Encoder.AOM.AV1="AOM AV1 (direct)" +Encoder.AOM.AV1.Deprecated="This encoder is deprecated and will be removed soon. Users are urged to switch to the integrated 'SVT-AV1' or 'AOM AV1' encoder as soon as possible." Encoder.AOM.AV1.Encoder="Encoder" Encoder.AOM.AV1.Encoder.Usage="Usage" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Good Quality" diff --git a/source/encoders/encoder-aom-av1.cpp b/source/encoders/encoder-aom-av1.cpp index 12b7358581..468615f3a8 100644 --- a/source/encoders/encoder-aom-av1.cpp +++ b/source/encoders/encoder-aom-av1.cpp @@ -18,6 +18,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #include "encoder-aom-av1.hpp" #include #include @@ -40,6 +44,7 @@ #define ST_I18N "Encoder.AOM.AV1" // Preset +#define ST_I18N_DEPRECATED ST_I18N ".Deprecated" #define ST_I18N_ENCODER ST_I18N ".Encoder" #define ST_I18N_ENCODER_USAGE ST_I18N_ENCODER ".Usage" #define ST_I18N_ENCODER_USAGE_GOODQUALITY ST_I18N_ENCODER_USAGE ".GoodQuality" @@ -1263,6 +1268,7 @@ aom_av1_factory::aom_av1_factory() _info.type = obs_encoder_type::OBS_ENCODER_VIDEO; _info.codec = "av1"; _info.caps = OBS_ENCODER_CAP_DYN_BITRATE; + _info.caps |= OBS_ENCODER_CAP_DEPRECATED; finish_setup(); } @@ -1425,6 +1431,12 @@ obs_properties_t* aom_av1_factory::get_properties2(instance_t* data) { obs_properties_t* props = obs_properties_create(); + { + auto p = obs_properties_add_text(props, "[[deprecated]]", D_TRANSLATE(ST_I18N_DEPRECATED), OBS_TEXT_INFO); + obs_property_text_set_info_type(p, OBS_TEXT_INFO_WARNING); + obs_property_text_set_info_word_wrap(p, true); + } + #ifdef ENABLE_FRONTEND { obs_properties_add_button2(props, S_MANUAL_OPEN, D_TRANSLATE(S_MANUAL_OPEN), aom_av1_factory::on_manual_open, diff --git a/source/encoders/encoder-aom-av1.hpp b/source/encoders/encoder-aom-av1.hpp index ee9bc4cc96..f8380bc1c5 100644 --- a/source/encoders/encoder-aom-av1.hpp +++ b/source/encoders/encoder-aom-av1.hpp @@ -18,6 +18,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #pragma once #include "common.hpp" #include From 5ea8aa2accf4876efe49b045e16c06392e815fb7 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 22 Aug 2022 11:37:01 +0200 Subject: [PATCH 082/164] encoders/handlers/amf: Add missing deprecation notice --- source/encoders/handlers/amf_h264_handler.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/encoders/handlers/amf_h264_handler.hpp b/source/encoders/handlers/amf_h264_handler.hpp index 04b5be716d..6a963f0b4d 100644 --- a/source/encoders/handlers/amf_h264_handler.hpp +++ b/source/encoders/handlers/amf_h264_handler.hpp @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #pragma once #include "common.hpp" #include "handler.hpp" From b5195c580c2678d0416c691cc3965e5360cc6106 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 22 Aug 2022 12:19:22 +0200 Subject: [PATCH 083/164] filter/displacement: Add missing deprecation notice --- data/locale/en-US.ini | 1 + source/filters/filter-displacement.cpp | 11 +++++++++++ source/filters/filter-displacement.hpp | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index 79c150fba0..e281354b59 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -379,6 +379,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Strong" # Filter - Displacement Filter.Displacement="Displacement Mapping" +Filter.Displacement.Deprecated="This filter is deprecated and has been removed. Users are urged to migrate to the 'Shader' filter with the 'displace.effect' example immediately." Filter.Displacement.File="File" Filter.Displacement.Scale="Scale" Filter.Displacement.Scale.Type="Scaling Type" diff --git a/source/filters/filter-displacement.cpp b/source/filters/filter-displacement.cpp index a89fe79d45..96bf3e203d 100644 --- a/source/filters/filter-displacement.cpp +++ b/source/filters/filter-displacement.cpp @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #include "filter-displacement.hpp" #include "strings.hpp" #include @@ -39,6 +43,7 @@ #endif #define ST_I18N "Filter.Displacement" +#define ST_I18N_DEPRECATED ST_I18N ".Deprecated" #define ST_I18N_FILE "Filter.Displacement.File" #define ST_KEY_FILE "Filter.Displacement.File" #define ST_I18N_SCALE "Filter.Displacement.Scale" @@ -174,6 +179,12 @@ obs_properties_t* displacement_factory::get_properties2(displacement_instance* d { obs_properties_t* pr = obs_properties_create(); + { + auto p = obs_properties_add_text(pr, "[[deprecated]]", D_TRANSLATE(ST_I18N_DEPRECATED), OBS_TEXT_INFO); + obs_property_text_set_info_type(p, OBS_TEXT_INFO_WARNING); + obs_property_text_set_info_word_wrap(p, true); + } + std::string path = ""; if (data) { path = data->get_file(); diff --git a/source/filters/filter-displacement.hpp b/source/filters/filter-displacement.hpp index 3308413b3d..ba289a0ff4 100644 --- a/source/filters/filter-displacement.hpp +++ b/source/filters/filter-displacement.hpp @@ -17,6 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +//--------------------------------------------------------------------------------// +// THIS FEATURE IS DEPRECATED. SUBMITTED PATCHES WILL BE REJECTED. +//--------------------------------------------------------------------------------// + #pragma once #include "common.hpp" #include "obs/gs/gs-effect.hpp" From 584ee995beadaf01da2485842532b782485481df Mon Sep 17 00:00:00 2001 From: Xaymar Date: Mon, 22 Aug 2022 13:44:32 +0200 Subject: [PATCH 084/164] locale: New Crowdin updates (#867) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Romanian) * New translations en-US.ini (Spanish) * New translations en-US.ini (Russian) * New translations en-US.ini (Italian) * New translations en-US.ini (Czech) --- data/locale/cs-CZ.ini | 52 +++++++++++++++++++++++++++++++++++++++++++ data/locale/es-ES.ini | 1 + data/locale/it-IT.ini | 1 + data/locale/pt-BR.ini | 9 ++++++++ data/locale/ro-RO.ini | 1 + data/locale/ru-RU.ini | 2 ++ data/locale/zh-CN.ini | 4 ++++ 7 files changed, 70 insertions(+) diff --git a/data/locale/cs-CZ.ini b/data/locale/cs-CZ.ini index 9645d9e761..01f7f46256 100644 --- a/data/locale/cs-CZ.ini +++ b/data/locale/cs-CZ.ini @@ -25,6 +25,7 @@ State.Automatic="Automatický" State.Default="Výchozí" UI.Menu="StreamFX" +UI.Menu.Wiki="Přečíst na Wiki" UI.Menu.Support="Nápověda && Podpora" UI.Menu.Website="Navštívit web StreamFX" UI.Menu.Discord="Připojit se na StreamFX Discord server" @@ -50,30 +51,68 @@ UI.Updater.GitHubPermission.Text="S cílem poskytnout ruční nebo automatickou UI.Updater.Menu.CheckForUpdates="Zkontrolovat aktualizace" UI.Updater.Menu.CheckForUpdates.Automatically="Automaticky kontrolovat Aktualizace" UI.Updater.Menu.Channel="Kanál pro Aktualizace" +UI.Updater.Menu.Channel.Stable="Stabilní" +UI.Updater.Menu.Channel.Candidate="Kandidát" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Průhlednost" Encoder.AOM.AV1="AOM AV1 (přímo)" +Encoder.AOM.AV1.Deprecated="Tento enkodér je zastaralý a brzy bude odstraněn. Uživatelé jsou vyzváni, aby co nejdříve přepli na integrovaný enkodér 'SVT-AV1' nebo 'AOM AV1'." +Encoder.AOM.AV1.Encoder="Enkodér" +Encoder.AOM.AV1.Encoder.Usage="Využití" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Dobrá kvalita" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Reálný čas" +Encoder.AOM.AV1.Encoder.CPUUsage="Využití CPU" Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Velmi pomalu" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Pomalejší" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Pomalý" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Střední" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Rychlý" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Rychlejší" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Velmi rychlý" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super rychlý" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra rychlý" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Šíleně rychlý" Encoder.AOM.AV1.Encoder.Profile="Profil" Encoder.AOM.AV1.KeyFrames="Klíčový snímek" +Encoder.AOM.AV1.KeyFrames.IntervalType="Typ intervalu" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Snímky" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.AOM.AV1.KeyFrames.Interval="Interval" +Encoder.AOM.AV1.RateControl.Mode="Režim" +Encoder.AOM.AV1.RateControl.Mode.CBR="Konstantní bitrate (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Proměnný bitrate (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Omezená kvalita (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Konstantní kvalita (Q)" +Encoder.AOM.AV1.RateControl.Limits="Omezení" Encoder.AOM.AV1.RateControl.Limits.Bitrate="Přenosová rychlost" Encoder.AOM.AV1.RateControl.Limits.Quality="Kvalitní" Encoder.AOM.AV1.RateControl.Buffer="Zásobník" Encoder.AOM.AV1.RateControl.Buffer.Size="Rozměr" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Počáteční velikost" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimální velikost" +Encoder.AOM.AV1.Advanced="Pokročilé" Encoder.AOM.AV1.Advanced.Threads="Vlákna" +Encoder.AOM.AV1.Advanced.Tune="Ladění" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (s předzpracováním)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (bez předběžného zpracování)" +Encoder.AOM.AV1.Advanced.Tune.Content="Obsah" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Obrazovka" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" +Encoder.FFmpeg="Možnosti FFmpeg" +Encoder.FFmpeg.KeyFrames.IntervalType="Typ intervalu" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Snímky" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.FFmpeg.KeyFrames.Interval="Interval" Encoder.FFmpeg.AMF.Preset="Profil" Encoder.FFmpeg.AMF.Preset.Quality="Kvalitní" +Encoder.FFmpeg.AMF.RateControl.Mode="Režim" +Encoder.FFmpeg.AMF.RateControl.Limits="Omezení" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Cílový bitrate" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maximální bitrate" @@ -85,6 +124,16 @@ Encoder.FFmpeg.AMF.Other="Ostatní možnosti" Encoder.FFmpeg.NVENC.Preset="Profil" Encoder.FFmpeg.NVENC.Preset.default="Výchozí" +Encoder.FFmpeg.NVENC.Preset.slow="Pomalý" +Encoder.FFmpeg.NVENC.Preset.medium="Střední" +Encoder.FFmpeg.NVENC.Preset.fast="Rychlý" +Encoder.FFmpeg.NVENC.Tune="Ladění" +Encoder.FFmpeg.NVENC.Tune.hq="Vysoká kvalita" +Encoder.FFmpeg.NVENC.Tune.ll="Nízká odezva" +Encoder.FFmpeg.NVENC.Tune.ull="Ultra nízká odezva" +Encoder.FFmpeg.NVENC.Tune.lossless="Bezztrátový" +Encoder.FFmpeg.NVENC.RateControl.Mode="Režim" +Encoder.FFmpeg.NVENC.RateControl.Limits="Omezení" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Cílový bitrate" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximální bitrate" @@ -123,6 +172,7 @@ Filter.Shader="Shader" Source.Shader="Shader" Transition.Shader="Shader" +Filter.AutoFraming.Tracking.Mode="Režim" Filter.AutoFraming.Framing.Offset="Kompenzace" Filter.AutoFraming.Framing.AspectRatio="Poměr stran" Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, využívá NVIDIA® Broadcast" @@ -232,6 +282,7 @@ Filter.SDFEffects.Glow.Outer.Width="Šířka vnější záře" Filter.Transform="3D transformace" Filter.Transform.Camera="Kamera" +Filter.Transform.Camera.Mode="Režim" Filter.Transform.Camera.FieldOfView="Zorné pole" Filter.Transform.Position="Pozice" Filter.Transform.Position.X="X" @@ -266,6 +317,7 @@ Filter.Upscaling.NVIDIA.SuperRes.Scale="Měřítko" Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, využívá NVIDIA® Broadcast" Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Režim" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kvalitní" Source.Mirror="Kopie zdroje" diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index 81d605c762..a2d726c86d 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Fotogramas" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Segundos" Encoder.FFmpeg.KeyFrames.Interval="Intervalo" +Encoder.FFmpeg.AMF.Deprecated="Este codificador está obsoleto y se eliminará pronto. Se insta a los usuarios a migrar al codificador integrado 'AMD HW H.264 (AVC)' o 'AMD HW H.265 (HEVC)' tan pronto como sea posible." Encoder.FFmpeg.AMF.Preset="Preajuste" Encoder.FFmpeg.AMF.Preset.Speed="Velocidad" Encoder.FFmpeg.AMF.Preset.Balanced="Equilibrado" diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index 6d235ad3b0..1c5f5cbac2 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -57,6 +57,7 @@ UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Trasparenza" Encoder.AOM.AV1="AOM AV1 (diretto)" +Encoder.AOM.AV1.Deprecated="Questo encoder è deprecato e verrà rimosso presto. Gli utenti sono invitati a passare al codificatore integrato 'SVT-AV1' o 'AOM AV1' il più presto possibile." Encoder.AOM.AV1.Encoder="Codificatore" Encoder.AOM.AV1.Encoder.Usage="Utilizzo" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Buona Qualità" diff --git a/data/locale/pt-BR.ini b/data/locale/pt-BR.ini index 2eb702296a..fa060aecc2 100644 --- a/data/locale/pt-BR.ini +++ b/data/locale/pt-BR.ini @@ -51,12 +51,17 @@ UI.Updater.GitHubPermission.Text="Para poder checar por Updates Manualmente e At UI.Updater.Menu.CheckForUpdates="Procurar Atualizações" UI.Updater.Menu.CheckForUpdates.Automatically="Verificar por atualizações automaticamente" UI.Updater.Menu.Channel="Atualizar Canal" +UI.Updater.Menu.Channel.Stable="Estável" +UI.Updater.Menu.Channel.Candidate="Candidato" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direto)" Encoder.AOM.AV1.Encoder="Codificador" Encoder.AOM.AV1.Encoder.Usage="Utilização" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Qualidade: Boa" Encoder.AOM.AV1.Encoder.Usage.RealTime="Tempo real" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Tudo dentro do enquadramento" Encoder.AOM.AV1.Encoder.CPUUsage="Uso da CPU" Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" Encoder.AOM.AV1.Encoder.CPUUsage.1="Muito Lento" @@ -70,11 +75,15 @@ Encoder.AOM.AV1.Encoder.CPUUsage.8="Super Rápido" Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra Rápido" Encoder.AOM.AV1.Encoder.CPUUsage.10="Insanamente Rápido" Encoder.AOM.AV1.Encoder.Profile="Perfil" +Encoder.AOM.AV1.KeyFrames="Quadro-Chave" Encoder.AOM.AV1.KeyFrames.IntervalType="Tipo de Intervalo" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Quadros" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Segundos" Encoder.AOM.AV1.KeyFrames.Interval="Intervalo" +Encoder.AOM.AV1.RateControl="Controle da taxa de bits" Encoder.AOM.AV1.RateControl.Mode="Modo" +Encoder.AOM.AV1.RateControl.Mode.CBR="Taxa de Bits Constante (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Taxa de Bits Variável (VBR)" Encoder.AOM.AV1.RateControl.Limits="Limites" Encoder.AOM.AV1.RateControl.Limits.Quality="Qualidade" Encoder.AOM.AV1.RateControl.Buffer.Size="Tamanho" diff --git a/data/locale/ro-RO.ini b/data/locale/ro-RO.ini index 67905d6035..cda4eace35 100644 --- a/data/locale/ro-RO.ini +++ b/data/locale/ro-RO.ini @@ -91,6 +91,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Cadre" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Secunde" Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.AMF.Deprecated="Acest codificator este învechit și va fi eliminat în curând. Utilizatorii sunt îndemnați să migreze la 'AMD HW H. Codificator 'AMD H.265 (HEVC)' sau 'AMD H.265 (HEVC)' cât mai curând posibil." Encoder.FFmpeg.AMF.Preset="Presetare" Encoder.FFmpeg.AMF.Preset.Quality="Calitate" Encoder.FFmpeg.AMF.RateControl="Opţiuni de control al ratei" diff --git a/data/locale/ru-RU.ini b/data/locale/ru-RU.ini index 56369d6e22..68dcad8bfd 100644 --- a/data/locale/ru-RU.ini +++ b/data/locale/ru-RU.ini @@ -57,6 +57,7 @@ UI.Updater.Menu.Channel.Beta="Бета" UI.Updater.Menu.Channel.Alpha="Альфа" Encoder.AOM.AV1="AOM AV1 (прямой)" +Encoder.AOM.AV1.Deprecated="Данный кодировщик устарел и будет удален в ближайшее время. Рекомендуется перейти на встроенные кодировщики 'SVT-AV1' или 'AOM AV1' как можно скорее." Encoder.AOM.AV1.Encoder="Энкодер" Encoder.AOM.AV1.Encoder.Usage="Использование" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Хорошее качество" @@ -127,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Кадры" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Секунды" Encoder.FFmpeg.KeyFrames.Interval="Интервал" +Encoder.FFmpeg.AMF.Deprecated="Данный кодировщик устарел и будет удален в ближайшее время. Рекомендуется перейти на встроенные кодировщики 'AMD HW H.264 (AVC)' или 'AMD HW H.265 (HEVC)' как можно скорее." Encoder.FFmpeg.AMF.Preset="Пресет" Encoder.FFmpeg.AMF.Preset.Speed="Производительность" Encoder.FFmpeg.AMF.Preset.Balanced="Баланс" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index 1ef9804a22..df15518df9 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -51,9 +51,13 @@ UI.Updater.GitHubPermission.Text="为了提供手动或自动更新检查,Stre UI.Updater.Menu.CheckForUpdates="检查更新" UI.Updater.Menu.CheckForUpdates.Automatically="自动检查更新" UI.Updater.Menu.Channel="更新通道" +UI.Updater.Menu.Channel.Stable="正式版" +UI.Updater.Menu.Channel.Candidate="候选版" +UI.Updater.Menu.Channel.Beta="测试版" UI.Updater.Menu.Channel.Alpha="透明度" Encoder.AOM.AV1="AOM AV1 (直接)" +Encoder.AOM.AV1.Deprecated="此编码器已废弃,不久将被删除。 请用户尽快切换到集成的 'SVT-AV1' 或 'AOM AV1' 编码器。" Encoder.AOM.AV1.Encoder="编码器" Encoder.AOM.AV1.Encoder.Usage="使用率" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="优质" From c1b832c03a7d1045a1ad34457024a8590ef3e165 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 21 Aug 2022 06:57:26 +0200 Subject: [PATCH 085/164] cmake: Fix bad version strings PROJECT_VERSION is defined by CMake, and can't be relied on. --- CMakeLists.txt | 122 ++++++++++++++++-------------- cmake/version | 2 +- templates/installer-signed.iss.in | 4 +- templates/installer.iss.in | 4 +- templates/installer.pkgproj.in | 2 +- templates/version.hpp.in | 6 +- templates/version.rc.in | 8 +- 7 files changed, 78 insertions(+), 70 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 311729585c..8b63802eac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,11 +69,11 @@ endif() ################################################################################ # For automatic versioning, which version is the "root" of the current changes? -set(PROJECT_VERSION_GIT_BASE "0.11.0") +set(_VERSION_GIT_BASE "0.11.0") # What is our version goal? -set(PROJECT_VERSION "0.12.0") -version(PARSE PROJECT_VERSION "${PROJECT_VERSION}") +set(_VERSION "0.12.0") +version(PARSE _VERSION "${_VERSION}") # If possible, automatically generate versions from git. if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") @@ -86,10 +86,10 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") if(EXISTS "${GIT}") # Calculate the Tweak version component from the given base version. execute_process( - COMMAND "${GIT}" describe --tags --long --match "${PROJECT_VERSION_GIT_BASE}" --abbrev=8 HEAD + COMMAND "${GIT}" describe --tags --long --match "${_VERSION_GIT_BASE}" --abbrev=8 HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} RESULT_VARIABLE GIT_RESULT - OUTPUT_VARIABLE PROJECT_VERSION_GIT + OUTPUT_VARIABLE _VERSION_GIT ERROR_VARIABLE GIT_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE @@ -97,20 +97,20 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") ) if(GIT_RESULT EQUAL 0) # Some minor string editing so the output conforms to SemVer 2.0.0. - string(REPLACE "-" ";" PROJECT_VERSION_GIT "${PROJECT_VERSION_GIT}") + string(REPLACE "-" ";" _VERSION_GIT "${_VERSION_GIT}") # Parse as SemVer 2.0.0 - list(GET PROJECT_VERSION_GIT 1 PROJECT_VERSION_GIT_TWEAK) - list(GET PROJECT_VERSION_GIT 2 PROJECT_VERSION_GIT_BUILD) + list(GET _VERSION_GIT 1 _VERSION_GIT_TWEAK) + list(GET _VERSION_GIT 2 _VERSION_GIT_BUILD) # Update our global version. - version(MODIFY PROJECT_VERSION "${PROJECT_VERSION}" COMPRESS - TWEAK "${PROJECT_VERSION_GIT_TWEAK}" - BUILD "${PROJECT_VERSION_GIT_BUILD}" + version(MODIFY _VERSION "${_VERSION}" COMPRESS + TWEAK "${_VERSION_GIT_TWEAK}" + BUILD "${_VERSION_GIT_BUILD}" PRERELEASE "a" - REQUIRE "PATCH;TWEAK" + REQUIRE PATCH TWEAK ) - version(PARSE PROJECT_VERSION "${PROJECT_VERSION}" REQUIRE "PATCH;TWEAK") + version(PARSE _VERSION "${_VERSION}" REQUIRE PATCH TWEAK) else() message(WARNING "${LOGPREFIX}Unable to detect Tweak and Build component with 'git'.") endif() @@ -120,37 +120,38 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") COMMAND "${GIT}" tag "--sort=-v:refname" "--points-at" HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} RESULT_VARIABLE GIT_RESULT - OUTPUT_VARIABLE PROJECT_VERSION_TAG + OUTPUT_VARIABLE _VERSION_TAG ERROR_VARIABLE GIT_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) - if((GIT_RESULT EQUAL 0) AND (NOT "${PROJECT_VERSION_TAG}" STREQUAL "")) + if((GIT_RESULT EQUAL 0) AND (NOT "${_VERSION_TAG}" STREQUAL "")) # Some minor string editing so the output conforms to SemVer 2.0.0. - string(REGEX REPLACE "[\r\n]+.*" "" PROJECT_VERSION_TAG "${PROJECT_VERSION_TAG}") + string(REGEX REPLACE "[\r\n]+.*" "" _VERSION_TAG "${_VERSION_TAG}") # Parse as SemVer 2.0.0 - version(PARSE PROJECT_VERSION_TAG "${PROJECT_VERSION_TAG}" REQUIRE "PATCH;TWEAK") - if(PROJECT_VERSION_TAG_PRERELEASE) - string(SUBSTRING "${PROJECT_VERSION_TAG_PRERELEASE}" 1 -1 PROJECT_VERSION_TAG_TWEAK) - string(SUBSTRING "${PROJECT_VERSION_TAG_PRERELEASE}" 0 1 PROJECT_VERSION_TAG_PRERELEASE) + version(PARSE _VERSION_TAG "${_VERSION_TAG}" REQUIRE PATCH TWEAK) + if(_VERSION_TAG_PRERELEASE) + string(SUBSTRING "${_VERSION_TAG_PRERELEASE}" 1 -1 _VERSION_TAG_TWEAK) + string(SUBSTRING "${_VERSION_TAG_PRERELEASE}" 0 1 _VERSION_TAG_PRERELEASE) - if(NOT PROJECT_VERSION_TAG_TWEAK STREQUAL PROJECT_VERSION_GIT_TWEAK) - message(WARNING "${LOGPREFIX}'git' tag mismatches detected version: '${PROJECT_VERSION_TAG_TWEAK}' != '${PROJECT_VERSION_GIT_TWEAK}'.") + if(NOT _VERSION_TAG_TWEAK STREQUAL _VERSION_GIT_TWEAK) + message(WARNING "${LOGPREFIX}'git' tag mismatches detected version: '${_VERSION_TAG_TWEAK}' != '${_VERSION_GIT_TWEAK}'.") endif() endif() # Update our global version. - version(GENERATE PROJECT_VERSION COMPRESS - MAJOR "${PROJECT_VERSION_TAG_MAJOR}" - MINOR "${PROJECT_VERSION_TAG_MINOR}" - PATCH "${PROJECT_VERSION_TAG_PATCH}" - TWEAK "${PROJECT_VERSION_TAG_TWEAK}" - PRERELEASE "${PROJECT_VERSION_TAG_PRERELEASE}" - BUILD "${PROJECT_VERSION_BUILD}" + version(GENERATE _VERSION COMPRESS + MAJOR "${_VERSION_TAG_MAJOR}" + MINOR "${_VERSION_TAG_MINOR}" + PATCH "${_VERSION_TAG_PATCH}" + TWEAK "${_VERSION_TAG_TWEAK}" + PRERELEASE "${_VERSION_TAG_PRERELEASE}" + BUILD "${_VERSION_BUILD}" + REQUIRE PATCH TWEAK ) - version(PARSE PROJECT_VERSION "${PROJECT_VERSION}" REQUIRE "PATCH;TWEAK") + version(PARSE _VERSION "${_VERSION}" REQUIRE PATCH TWEAK) endif() else() message(STATUS "${LOGPREFIX}'git' not found, automatic version detection disabled.") @@ -162,37 +163,46 @@ endif() # Allow manual overrides of the detected version. set(${PREFIX}VERSION "" CACHE STRING "Override detected or pre-configured version with this string. Accepts strings in CMake and SemVer 2.0.0 format.") if(NOT ("${${PREFIX}VERSION}" STREQUAL "")) - version(PARSE PROJECT_VERSION_CFG "${${PREFIX}VERSION}" REQUIRE "PATCH;TWEAK") - if("${PROJECT_VERSION_CFG_BUILD}" STREQUAL "") - set(PROJECT_VERSION_CFG_BUILD "${PROJECT_VERSION_BUILD}") + version(PARSE _VERSION_CFG "${${PREFIX}VERSION}" REQUIRE PATCH TWEAK) + if("${_VERSION_CFG_BUILD}" STREQUAL "") + set(_VERSION_CFG_BUILD "${_VERSION_BUILD}") endif() - version(GENERATE PROJECT_VERSION COMPRESS - MAJOR "${PROJECT_VERSION_CFG_MAJOR}" - MINOR "${PROJECT_VERSION_CFG_MINOR}" - PATCH "${PROJECT_VERSION_CFG_PATCH}" - TWEAK "${PROJECT_VERSION_CFG_TWEAK}" - PRERELEASE "${PROJECT_VERSION_CFG_PRERELEASE}" - BUILD "${PROJECT_VERSION_CFG_BUILD}" + version(GENERATE _VERSION COMPRESS + MAJOR "${_VERSION_CFG_MAJOR}" + MINOR "${_VERSION_CFG_MINOR}" + PATCH "${_VERSION_CFG_PATCH}" + TWEAK "${_VERSION_CFG_TWEAK}" + PRERELEASE "${_VERSION_CFG_PRERELEASE}" + BUILD "${_VERSION_CFG_BUILD}" ) endif() +set(_VERSION_THIN "${_VERSION_MAJOR}.${_VERSION_MINOR}.${_VERSION_PATCH}") +if(NOT (_VERSION_PRERELEASE STREQUAL "")) + set(_VERSION_THIN "${_VERSION_THIN}${_VERSION_PRERELEASE}${_VERSION_TWEAK}") +endif() +if(NOT (VERSION_COMMIT STREQUAL "")) + set(_VERSION_THIN "${_VERSION_THIN}-${_VERSION_BUILD}") +endif() + # Parse & Log the detected version. -message(STATUS "${LOGPREFIX}Version ${PROJECT_VERSION}") +message(STATUS "${LOGPREFIX}Version ${_VERSION}") ################################################################################ # Project ################################################################################ # Metadata -version(GENERATE PROJECT_VERSION_CMAKE - MAJOR "${PROJECT_VERSION_MAJOR}" - MINOR "${PROJECT_VERSION_MINOR}" - PATCH "${PROJECT_VERSION_PATCH}" - TWEAK "${PROJECT_VERSION_TWEAK}" +version(GENERATE PROJECT_VERSION + MAJOR "${_VERSION_MAJOR}" + MINOR "${_VERSION_MINOR}" + PATCH "${_VERSION_PATCH}" + TWEAK "${_VERSION_TWEAK}" + REQUIRE PATCH TWEAK ) project( StreamFX - VERSION ${PROJECT_VERSION_CMAKE} + VERSION ${PROJECT_VERSION} DESCRIPTION "Additional sources, filters, transitions and encoders for OBS Studio." HOMEPAGE_URL "https://streamfx.xaymar.com/" ) @@ -1887,15 +1897,13 @@ set_target_properties(${PROJECT_NAME} PROPERTIES IMPORT_PREFIX "" ) -# Set file version (on anything but MacOS) -if(NOT D_PLATFORM_MAC) - set_target_properties(${PROJECT_NAME} PROPERTIES - MACHO_COMPATIBILITY_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} - MACHO_CURRENT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} - VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK} - SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK} - ) -endif() +# Set file version +set_target_properties(${PROJECT_NAME} PROPERTIES + MACHO_COMPATIBILITY_VERSION ${_VERSION_MAJOR}.${_VERSION_MINOR} + MACHO_CURRENT_VERSION ${PROJECT_VERSION} + SOVERSION ${_VERSION_MAJOR}.${_VERSION_MINOR} + VERSION ${PROJECT_VERSION} +) # Delay-Loading on Microsoft Visual C++ if(D_PLATFORM_WINDOWS) @@ -2194,7 +2202,7 @@ endif() if(STANDALONE) # Packaging if(NOT PACKAGE_SUFFIX) - set(_PACKAGE_SUFFIX_OVERRIDE "${PROJECT_VERSION}") + set(_PACKAGE_SUFFIX_OVERRIDE "${_VERSION_THIN}") else() set(_PACKAGE_SUFFIX_OVERRIDE "${PACKAGE_SUFFIX}") endif() diff --git a/cmake/version b/cmake/version index 2494a2b6c8..16bfa9568c 160000 --- a/cmake/version +++ b/cmake/version @@ -1 +1 @@ -Subproject commit 2494a2b6c894380ced96307ae833afc0be37a143 +Subproject commit 16bfa9568c3d72e07d94c214a0da53956c7a33eb diff --git a/templates/installer-signed.iss.in b/templates/installer-signed.iss.in index 467bbd809d..a80214b80d 100644 --- a/templates/installer-signed.iss.in +++ b/templates/installer-signed.iss.in @@ -2,8 +2,8 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "@PROJECT_TITLE@" -#define MyAppVersion "@PROJECT_VERSION_CMAKE@" -#define MyAppVersionText "@PROJECT_VERSION@" +#define MyAppVersion "@PROJECT_VERSION@" +#define MyAppVersionText "@_VERSION@" #define MyAppPublisher "Xaymars Technology Workshop" #define MyAppURL "https://xaymar.com/" #define MyAppCopyright "@PROJECT_COPYRIGHT@" diff --git a/templates/installer.iss.in b/templates/installer.iss.in index 506877bf3e..9b2cc81f75 100644 --- a/templates/installer.iss.in +++ b/templates/installer.iss.in @@ -2,8 +2,8 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "@PROJECT_TITLE@" -#define MyAppVersion "@PROJECT_VERSION_CMAKE@" -#define MyAppVersionText "@PROJECT_VERSION@" +#define MyAppVersion "@PROJECT_VERSION@" +#define MyAppVersionText "@_VERSION@" #define MyAppPublisher "Xaymars Technology Workshop" #define MyAppURL "https://xaymar.com/" #define MyAppCopyright "@PROJECT_COPYRIGHT@" diff --git a/templates/installer.pkgproj.in b/templates/installer.pkgproj.in index d9cc7924e5..2c33be46ba 100644 --- a/templates/installer.pkgproj.in +++ b/templates/installer.pkgproj.in @@ -528,7 +528,7 @@ USE_HFS+_COMPRESSION VERSION - @PROJECT_VERSION_CMAKE@ + @PROJECT_VERSION@ TYPE 0 diff --git a/templates/version.hpp.in b/templates/version.hpp.in index 02eab085d1..baf8a53e0c 100644 --- a/templates/version.hpp.in +++ b/templates/version.hpp.in @@ -34,9 +34,9 @@ #define STREAMFX_VERSION_MINOR @PROJECT_VERSION_MINOR@u #define STREAMFX_VERSION_PATCH @PROJECT_VERSION_PATCH@u #define STREAMFX_VERSION_TWEAK @PROJECT_VERSION_TWEAK@u -#define STREAMFX_VERSION_PRERELEASE "@PROJECT_VERSION_PRERELEASE@" -#define STREAMFX_VERSION_BUILD "@PROJECT_VERSION_BUILD@" +#define STREAMFX_VERSION_PRERELEASE "@_VERSION_PRERELEASE@" +#define STREAMFX_VERSION_BUILD "@_VERSION_BUILD@" #define STREAMFX_VERSION \ STREAMFX_MAKE_VERSION(STREAMFX_VERSION_MAJOR, STREAMFX_VERSION_MINOR, STREAMFX_VERSION_PATCH, \ STREAMFX_VERSION_TWEAK) -#define STREAMFX_VERSION_STRING "@PROJECT_VERSION@" +#define STREAMFX_VERSION_STRING "@_VERSION_THIN@" diff --git a/templates/version.rc.in b/templates/version.rc.in index f4c61a5962..6d9cceaa89 100644 --- a/templates/version.rc.in +++ b/templates/version.rc.in @@ -10,8 +10,8 @@ #endif VS_VERSION_INFO VERSIONINFO -FILEVERSION @PROJECT_VERSION_CMAKE@ -PRODUCTVERSION @PROJECT_VERSION_CMAKE@ +FILEVERSION @PROJECT_VERSION@ +PRODUCTVERSION @PROJECT_VERSION@ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS (VER_DEBUG) FILEOS VOS__WINDOWS32 @@ -29,8 +29,8 @@ BEGIN VALUE "CompanyName", "@PROJECT_AUTHORS@\0" VALUE "LegalCopyright", "@PROJECT_COPYRIGHT@\0" VALUE "LegalTrademarks", "@PROJECT_TRADEMARKS@\0" - VALUE "FileVersion", "@VERSION_STRING@\0" - VALUE "ProductVersion", "@VERSION_STRING@\0" + VALUE "FileVersion", "@_VERSION@\0" + VALUE "ProductVersion", "@_VERSION@\0" END END From ed88c4a4d2e202c882995faf15ab7bb93de421a6 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 27 Aug 2022 19:40:24 +0200 Subject: [PATCH 086/164] project: Updating contributing guidelines --- CONTRIBUTING.md | 294 ++++++++++++++++++++++++++++++------------------ 1 file changed, 185 insertions(+), 109 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd1914a347..fea6aeb4e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,161 +1,237 @@ -# Commits -Commits should always only focus on a single change that is necessary for that commit to work. For example, a commit that changes how something logs messages should not also include a new blur effect. In those cases, the commit should be split up into two, so that they can be reverted independently from another. +# Contributing +This document goes over how you are expected to contribute to the project. This document is softly enforced, and considered a guideline instead of a requirement. -## Commit Subject -The subject line of a commit should begin with the prefix followed by a `: `, and then followed by a summary of what the change does, which should be no longer than 52 alphanumerical characters including whitespace. The prefix is determined by the file being modified, simply remove the extension or find the group that a file belongs to. For example, a modifiation to blur.effect would have the category effects, due to it being re-usable. +## Localization +We use Crowdin to handle translations into many languages. Please join the [StreamFX project on Crowdin](https://crowdin.com/project/obs-stream-effects) if you are interested in improving the translations to your native tongue. Pull Requests therefore should only include changes to `en-US.ini`, and no other localization files should be touched. -### Prefixes -- effects: Anything modifying generic effects like blur.effect, color-conversion.effect, mask.effect, etc. -- locale: Changes in `/data/locale`. -- examples: Changes in `/data/examples` that are not directly influenced by a change to one of the filters, sources or transitions. -- project: Changes to files like README, CONTRIBUTING, AUTHORS, etc. -- cmake: Changes to CMake build scripts. -- ci: Changes to Continuous Integration. +## Commit Guidelines +Commits should focus on a single change, such as formatting, fixing a single bug, a single warning across the code, and similar things. This means that you should not include a fix to color format handling in a commit that implements a new encoder. -All other files should be prefixed with the main file changed, so a change to the translations for Source Mirror would be `source-mirror: commit`. +### Linear History +This project prefers the linear history of `git rebase`, and as such forbids merge commits. This allows all branches to be a single line back to the root, unless viewed as a whole where it becomes a tree. If you are working on a branch for a feature, bug or other thing, you should learn how to rebase back onto the main branch before making a pull request. -## Commit Messages -The commit message should always convey why this change was necessary, what is being changed and how it affects the code when being run. There are rare cases where this can be left out (formatting, refactoring, ...) but it should always be descriptive of what is actually being done. +### Commit Message & Title +As the StreamFX project uses linear history without merge commits, we require a commit message format like this: -# Coding Guidelines +``` +prefix: short description + +optional long description +``` + +The `short description` should be no longer than 80 characters, excluding the `prefix: ` part. The `optional long description` should be present if the change is not immediately obvious - however it does not replace proper documentation. + +#### The correct `prefix` +Depending on where the file is that you ended up modifying, or if you modified multiple files at once, the prefix changes. Take a look at the list to understand which directories cause which prefix: + +- `/CMakeLists.txt`, `/cmake` -> `cmake` +- `/.github/workflows` -> `ci` +- `/data/locale`, `/crowdin.yml` -> `locale` +- `/data/examples` -> `examples` +- `/data` -> `data` (if not part of another prefix) +- `/media` -> `media` +- `/source`, `/include` -> `code` +- `/templates` -> `templates` (or merge with `cmake`) +- `/third-party` -> `third-party` +- `/tools` -> `tools` +- `/ui` -> `ui` (if not part of a `code` change) +- Most other files -> `project` + +Multiple prefixes should be separated by `, ` and sorted alphabetically so that a change to `ui` and `code` results in a prefix of `code, ui`. If only a single code file was changed or multiple related file with a common parent were changed, the `code` prefix should be replaced by the path to the file like in these examples: + +- `/source/encoders/encoder-ffmpeg` -> `encoder/ffmpeg` +- `/source/filters/filter-shader` -> `filter/shader` +- and so on. -## Naming -The project uses the generally known snake_case for code and the uppercase variant for enumerations and macros: +These guidelines are soft requirements and may be extended in the future. -### Macros (ELEPHANT_CASE) -- Casing: Uppercase +## Coding Guidelines + +### Documentation & Comments +Your code should contain the comments where they would save time, as well as documentation for "public" facing functionality. This means that you shouldn't explain things like `1 + 1`, but should provide explanations for complex things. Consider the following: + +```c++ +int32_t idepth = static_cast(depth); +int32_t size = static_cast(pow(2l, idepth)); +int32_t grid_size = static_cast(pow(2l, (idepth / 2))); +int32_t container_size = static_cast(pow(2l, (idepth + (idepth / 2)))); +``` + +This would be much easier to read if it had a an explaination and didn't require parsing the math. Comments are all about saving time to developers not already invested into the code. + +### Naming & Casing +Names for anything should describe the purpose or function of the thing, unless the thing is temporary such as iterators. + +#### Macros +- Casing: ELEPHANT_CASE - Separator: `_` -- Prefixes: `S_` for global values, `ST_` for local (this file) values, `D_` for simple functions, `P_` for complex functions +- Prefixes: Optional + - `S_` for global values + - `ST_` for local values + - `D_` for simple functions + - `P_` for complex functions - Suffixes: No -Example: -``` -#define S_PI 3.14141 -#define ST_PI2 S_PI / 2.0 -#define D_(x) S_PI * x -#define P_(x, y) double_t x(double_t a, double_t b) { return a * b * y; } +##### Example +```c++ +#define EXAMPLE FALSE // ❌ +#define S_PI 3.14141 // ✔ (in .h and .hpp files) +#define ST_PI2 S_PI / 2.0 // ✔ +#define D_(x) S_PI * x // ✔ +#define P_(x, y) double_t x(double_t a, double_t b) { return a * b * y; } // ✔ ``` -### Enumerations (snake_case) -- Casing: Lowercase +#### Namespaces +- Casing: snake_case - Separator: `_` +- Prefixes: None +- Suffixes: None -Example: -``` -enum my_enum {}; -enum class my_enum_class {}; -enum class my_enum_class_int : int {}; +##### Example +```c++ +namespace BLA {}; // ❌ +namespace a_space {}; // ✔ ``` -#### Enumeration Entries (ELEPHANT_CASE) -- Casing: Uppercase +#### Type Definitions +- Casing: snake_case - Separator: `_` +- Prefixes: No +- Suffixes: `_t` Example: -``` -enum my_enum { - ENTRY_1, - ENTRY_2 -}; +```c++ +typedef int32_t my_type; // ❌ +typedef int32_t my_type_t; // ✔ ``` -### Variables (snake_case) -- Casing: Lowercase +#### Enumerations +- Casing: snake_case - Separator: `_` - Prefixes: No - Suffixes: No -Example: -``` -int my_var = 0; +##### Entries +- Casing: ELEPHANT_CASE +- Separator: `_` +- Prefixes: Conditional + - `enum`: `STREAMFX__` + - `enum class`: None +- Suffixes: No + +##### Example +```c++ +enum my_enum { // ✔ + STREAMFX_MY_ENUM_ENTRY_1, // ✔ + ENUM_ENTRY_2 // ❌ +}; +enum class my_enum : int { // ✔ + STREAMFX_MY_ENTRY_1, // ❌ + ENUM_ENTRY_2 // ✔ +}; +enum class my_enum_int : int { // ❌, has `_int` suffix. +}; ``` -### Functions (snake_case) -- Casing: Lowercase +#### Variables +- Casing: snake_case - Separator: `_` -- Prefixes: No -- Suffixes: No (differentiate by parameters only) +- Prefixes: + - Locals: None + - Globals: `g_` +- Suffixes: None -Example: -``` -// This is forbidden. -void func(); -int func_int(); +##### Example +```c++ +float example; // ❌ +float g_example; // ✔ -// This is okay. -void func(); -void func(int& result); +function example() { + float _example; // ❌ + float example; // ✔ +} ``` -### Namespaces (snake_case) -- Casing: Lowercase +#### Classes & Structures +- Casing: snake_case - Separator: `_` +- Prefixes: None +- Suffixes: None -Example: -``` -namespace a_space {}; -``` +##### Members +- Casing: snake_case +- Separator: `_` +- Prefixes: + - `_` for private, protected + - None for public (prefer set-/get-ters) +- Suffixes: None -### Classes, Structs, Unions (snake_case) -- Casing: Lowercase +##### Methods +- Casing: snake_case - Separator: `_` -- Prefixes: No -- Suffixes: No +- Prefixes: None +- Suffixes: None -Example: -``` -class a_class {}; -class interface_class {}; +##### Example +```c++ +class example { + float example; // ❌ + float _example; // ✔ + + int example_int(); // ❌, has `_int` suffix. + void example(); // ✔ + void example(int& result); // ✔ +} + +struct example { + float _example; // ❌ + float example; // ✔ +} ``` -#### Interface Classes -Interface Classes are handled like normal classes. There are no prefixes or suffixes to attach. +#### Unions +- Casing: snake_case +- Separator: `_` +- Prefixes: None +- Suffixes: None -#### Methods (snake_case) -- Casing: Lowercase +##### Union Members +- Casing: snake_case - Separator: `_` -- Prefixes: No -- Suffixes: No (differentiate by parameters only) +- Prefixes: None +- Suffixes: None -Example: -``` -class a_class { - // This is forbidden. - void func(); - int func_int(); - - // This is okay. - void func(); - void func(int& result); -}; +##### Example +```c++ +union { + float _example; // ❌ + float example; // ✔ +} ``` -#### Member Variables (snake_case) -- Casing: Lowercase +#### Functions +- Casing: snake_case - Separator: `_` -- Prefixes: `_` if private, otherwise none +- Prefixes: No - Suffixes: No -Example: -``` -class a_class { - int64_t _local_var; - void* _pointer; - int32_t _id; -}; +##### Example +```c++ +void func(); // ✔ +void func(int& result); // ✔ +int func_int(); // ❌ ``` -### Type Definitions (snake_case) -- Casing: Lowercase -- Separator: `_` -- Prefixes: No -- Suffixes: `_t` +#### Interface Classes +Interface Classes are handled like normal classes. There are no prefixes or suffixes to attach. -Example: -``` -typedef int32_t my_type_t; -``` +### Preprocessor Macros +Pre-processor Macros are a "last stand" option, when all other options fail or would produce worse results. If possible and cleaner to do so, prefer the use of `constexpr` code. + +### Classes +#### Members +Members of classes should be private and only accessible via get/set methods. -## Preprocessor Macros -Preprocessor `#define` Macros should be used sparingly, due to their nature of changing code before the compiler gets a chance to work with it. Unless necessary, they should never be in a header file. +## Building +Please read [the guide on the wiki](https://github.com/Xaymar/obs-StreamFX/wiki/Building) for building the project. From 5d76a3865a32ec5581cd369942dd77b8ea85eb76 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Sun, 28 Aug 2022 09:24:02 +0200 Subject: [PATCH 087/164] locale: New Crowdin updates (#890) * New translations en-US.ini (Russian) * New translations en-US.ini (Czech) * New translations en-US.ini (Italian) * New translations en-US.ini (Spanish) * New translations en-US.ini (Polish) * New translations en-US.ini (Danish) * New translations en-US.ini (Danish) * New translations en-US.ini (Danish) * New translations en-US.ini (Danish) * New translations en-US.ini (Danish) * New translations en-US.ini (French) --- data/locale/cs-CZ.ini | 50 +++++++++++++++++++++++++++ data/locale/da-DK.ini | 78 +++++++++++++++++++++++++++++++++++++------ data/locale/es-ES.ini | 1 + data/locale/fr-FR.ini | 3 ++ data/locale/it-IT.ini | 1 + data/locale/pl-PL.ini | 2 ++ data/locale/ru-RU.ini | 1 + 7 files changed, 125 insertions(+), 11 deletions(-) diff --git a/data/locale/cs-CZ.ini b/data/locale/cs-CZ.ini index 01f7f46256..2e96993679 100644 --- a/data/locale/cs-CZ.ini +++ b/data/locale/cs-CZ.ini @@ -94,6 +94,8 @@ Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Počáteční velikost" Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimální velikost" Encoder.AOM.AV1.Advanced="Pokročilé" Encoder.AOM.AV1.Advanced.Threads="Vlákna" +Encoder.AOM.AV1.Advanced.Tile.Columns="Sloupce dlaždic" +Encoder.AOM.AV1.Advanced.Tile.Rows="Řádky dlaždic" Encoder.AOM.AV1.Advanced.Tune="Ladění" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" @@ -104,14 +106,20 @@ Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Obrazovka" Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" Encoder.FFmpeg="Možnosti FFmpeg" +Encoder.FFmpeg.CustomSettings="Vlastní nastavení" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Klíčové snímky" Encoder.FFmpeg.KeyFrames.IntervalType="Typ intervalu" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Snímky" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.FFmpeg.KeyFrames.Interval="Interval" Encoder.FFmpeg.AMF.Preset="Profil" +Encoder.FFmpeg.AMF.Preset.Speed="Rychlost" +Encoder.FFmpeg.AMF.Preset.Balanced="Vyvážený" Encoder.FFmpeg.AMF.Preset.Quality="Kvalitní" Encoder.FFmpeg.AMF.RateControl.Mode="Režim" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Konstantní bitrate" Encoder.FFmpeg.AMF.RateControl.Limits="Omezení" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Cílový bitrate" @@ -121,27 +129,47 @@ Encoder.FFmpeg.AMF.RateControl.QP.I="QP I-snímků" Encoder.FFmpeg.AMF.RateControl.QP.P="QP P-snímků" Encoder.FFmpeg.AMF.RateControl.QP.B="QP B-snímků" Encoder.FFmpeg.AMF.Other="Ostatní možnosti" +Encoder.FFmpeg.AMF.Other.BFrames="Maximum B-snímků" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referenční snímky" Encoder.FFmpeg.NVENC.Preset="Profil" Encoder.FFmpeg.NVENC.Preset.default="Výchozí" Encoder.FFmpeg.NVENC.Preset.slow="Pomalý" Encoder.FFmpeg.NVENC.Preset.medium="Střední" Encoder.FFmpeg.NVENC.Preset.fast="Rychlý" +Encoder.FFmpeg.NVENC.Preset.ll="Nízká odezva" +Encoder.FFmpeg.NVENC.Preset.llhq="Nízká odezva a Vysoká kvalita" +Encoder.FFmpeg.NVENC.Preset.llhp="Nízká odezva a Vysoký výkon" +Encoder.FFmpeg.NVENC.Preset.lossless="Bezztrátový" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Bezztrátový a Vysoký výkon" Encoder.FFmpeg.NVENC.Tune="Ladění" Encoder.FFmpeg.NVENC.Tune.hq="Vysoká kvalita" Encoder.FFmpeg.NVENC.Tune.ll="Nízká odezva" Encoder.FFmpeg.NVENC.Tune.ull="Ultra nízká odezva" Encoder.FFmpeg.NVENC.Tune.lossless="Bezztrátový" Encoder.FFmpeg.NVENC.RateControl.Mode="Režim" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parametr konstantní kvantizace" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Proměnný bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstantní bitrate" Encoder.FFmpeg.NVENC.RateControl.Limits="Omezení" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Cílová kvalita" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Cílový bitrate" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximální bitrate" Encoder.FFmpeg.NVENC.RateControl.QP="Parametry kvantizace (QP)" Encoder.FFmpeg.NVENC.RateControl.QP.I="QP I-snímků" Encoder.FFmpeg.NVENC.RateControl.QP.P="QP P-snímků" Encoder.FFmpeg.NVENC.RateControl.QP.B="QP B-snímků" +Encoder.FFmpeg.NVENC.AQ="Adaptivní kvantizace" Encoder.FFmpeg.NVENC.Other="Ostatní možnosti" +Encoder.FFmpeg.NVENC.Other.BFrames="Maximum B-snímků" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Referenční režim B-snímku" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Žádné B-snímky nebudou použity jako reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Pouze B-snímky/2 budou použity jako reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Každý B-snímek bude použit jako reference" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nulová odezva" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Vážená předpověď" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referenční snímky" Blur.Type.Box="Box" Blur.Type.BoxLinear="Box lineární" @@ -172,9 +200,20 @@ Filter.Shader="Shader" Source.Shader="Shader" Transition.Shader="Shader" +Filter.AutoFraming="Automatické snímkování" +Filter.AutoFraming.Tracking="Možnosti sledování" Filter.AutoFraming.Tracking.Mode="Režim" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Skupina" +Filter.AutoFraming.Tracking.Frequency="Frekvence" +Filter.AutoFraming.Motion="Možnosti pohybu" +Filter.AutoFraming.Motion.Smoothing="Vyhlazování" +Filter.AutoFraming.Motion.Prediction="Předpověď" +Filter.AutoFraming.Framing="Možnosti snímkování" +Filter.AutoFraming.Framing.Stability="Stabilita" Filter.AutoFraming.Framing.Offset="Kompenzace" Filter.AutoFraming.Framing.AspectRatio="Poměr stran" +Filter.AutoFraming.Provider="Poskytovatel" Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, využívá NVIDIA® Broadcast" Filter.Blur="Rozostření" @@ -229,7 +268,10 @@ Filter.ColorGrade.Offset.All="Posun všech kanálů" Filter.ColorGrade.Tint="Tón" Filter.ColorGrade.Tint.Detection="Metoda detekce tónu jasového kanálu" Filter.ColorGrade.Tint.Detection.HSV="Saturace" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" Filter.ColorGrade.Tint.Mode.Linear="Lineární" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" Filter.ColorGrade.Tint.Mode.Log="Log" Filter.ColorGrade.Tint.Mode.Log10="Log10" Filter.ColorGrade.Tint.Shadow.Red="Červený tón stínů" @@ -311,6 +353,7 @@ Filter.Transform.Corners.BottomLeft="Levý spodní" Filter.Transform.Corners.BottomRight="Pravý spodní" Filter.Transform.Mipmapping="Zapnout mipmapping" +Filter.Upscaling.Provider="Poskytovatel" Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, využívá NVIDIA® Broadcast" Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" Filter.Upscaling.NVIDIA.SuperRes.Scale="Měřítko" @@ -318,6 +361,7 @@ Filter.Upscaling.NVIDIA.SuperRes.Scale="Měřítko" Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, využívá NVIDIA® Broadcast" Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Režim" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Výkon" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kvalitní" Source.Mirror="Kopie zdroje" @@ -335,12 +379,18 @@ Source.Mirror.Source.Audio.Layout.FullSurround="Plný prostorový zvuk" Codec.AV1="AV1" Codec.AV1.Profile="Profil" +Codec.AV1.Profile.Main="Hlavní" Codec.H264="H264" +Codec.H264.Profile="Profil" +Codec.H264.Profile.main="Hlavní" Codec.H264.Level="Úroveň" Codec.HEVC="HEVC" Codec.HEVC.Profile="Profil" +Codec.HEVC.Profile.main="Hlavní" +Codec.HEVC.Tier="Úroveň" +Codec.HEVC.Tier.main="Hlavní" Codec.HEVC.Level="Úroveň" Codec.ProRes.Profile="Profil" diff --git a/data/locale/da-DK.ini b/data/locale/da-DK.ini index 975a9c217f..8d333790e0 100644 --- a/data/locale/da-DK.ini +++ b/data/locale/da-DK.ini @@ -1,14 +1,70 @@ - - - - - - - - - - - +Advanced="Avancerede indstillinger" +Manual.Open="Åbn manual" + +Channel.Red="Rød" +Channel.Green="Grøn" +Channel.Blue="Blå" +Channel.Alpha="Alfa" + +FileType.Image="Billede" +FileType.Images="Billeder" +FileType.Video="Video" +FileType.Videos="Videoer" +FileType.Sound="Lyd" +FileType.Sounds="Lyde" +FileType.Effect="Effekt" +FileType.Effects="Effekter" + +SourceType.Source="Kilde" +SourceType.Scene="Scene" + +State.Disabled="Deaktiveret" +State.Enabled="Aktiveret" +State.Manual="Manuel" +State.Automatic="Automatisk" +State.Default="Standard" + +UI.Menu="StreamFX" +UI.Menu.Wiki="Læs Wikien" +UI.Menu.Support="Hjælp & Support" +UI.Menu.Website="Besøg hjemmesiden StreamFX" +UI.Menu.Discord="Deltag i StreamFX Discord" +UI.Menu.Twitter="Følg StreamFX på Twitter" +UI.Menu.YouTube="Abonner på StreamFX på YouTube" +UI.Menu.About="Om StreamFX" + +UI.About.Title="Om StreamFX" +UI.About.Text="

StreamFX er gjort mulig af alle støttere på Patreon, Github Sponsorer, og alle der donerer igennem PayPal. Yderligere tak går til alle oversættere, der hjælper med lokaliseringen på Crowdin. I er alle fantastiske!

" +UI.About.Role.Contributor="Bidragyder" +UI.About.Role.Translator="Oversætter" +UI.About.Role.Supporter="Supporter" +UI.About.Version="Version:" + +UI.Updater.Dialog.Title="StreamFX Version %s er nu tilgængelig!" +UI.Updater.Dialog.Text="En ny version af StreamFX er tilgængelig til at downloade." +UI.Updater.Dialog.Version.Current="Nuværende Version:" +UI.Updater.Dialog.Version.Latest="Seneste Version:" +UI.Updater.Dialog.Button.Ok="Åbn Downloadsiden" +UI.Updater.Dialog.Button.Cancel="Påmind mig senere" +UI.Updater.GitHubPermission.Title="StreamFX kræver din tilladelse til at oprette forbindelse til GitHub!" +UI.Updater.GitHubPermission.Text="For at kunne give manuelle eller automatiske opdatering er StreamFX afhængig af GitHub API til at hente de nyeste oplysninger.
Læs venligst Github Privacy Statement, og klik på 'OK', hvis du er enig eller 'Annuller', hvis du er uenig." +UI.Updater.Menu.CheckForUpdates="Tjek for Opdateringer" +UI.Updater.Menu.CheckForUpdates.Automatically="Tjek automatisk for opdateringer" +UI.Updater.Menu.Channel="Opdateringskanal" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Kandidat" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Alfa" + + +Encoder.FFmpeg="FFmpeg Indstillinger" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Brugerdefinerede Indstillinger" +Encoder.FFmpeg.Threads="Antal af tråde" +Encoder.FFmpeg.GPU="GPU" + + +Encoder.FFmpeg.NVENC.Preset.default="Standard" diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index a2d726c86d..039ac36702 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -359,6 +359,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Débil" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Fuerte" Filter.Displacement="Mapeo de Desplazamiento" +Filter.Displacement.Deprecated="Este filtro está obsoleto y ha sido eliminado. Se insta a los usuarios a migrar al filtro \"Shader\" con el ejemplo \"displace.effect\" inmediatamente." Filter.Displacement.File="Archivo" Filter.Displacement.Scale="Escala" Filter.Displacement.Scale.Type="Tipo de escalado" diff --git a/data/locale/fr-FR.ini b/data/locale/fr-FR.ini index 548561dcda..24829bf785 100644 --- a/data/locale/fr-FR.ini +++ b/data/locale/fr-FR.ini @@ -56,6 +56,7 @@ UI.Updater.Menu.Channel.Candidate="Candidats" UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1="AOM AV1 (directe)" +Encoder.AOM.AV1.Deprecated="Cet encodeur est obsolète et sera bientôt retiré. Les utilisateurs sont invités à passer le plus rapidement possible à l'encodeur intégré 'SVT-AV1' ou 'AOM AV1'." Encoder.AOM.AV1.Encoder="Encodeur" Encoder.AOM.AV1.Encoder.Usage="Utilisation" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Bonne qualité" @@ -126,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Images" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Secondes" Encoder.FFmpeg.KeyFrames.Interval="Intervalle" +Encoder.FFmpeg.AMF.Deprecated="Cet encodeur est obsolète et sera bientôt retiré. Les utilisateurs sont invités à migrer vers un des encodeurs intégré 'AMD HW H.264 (AVC)' ou 'AMD HW H.265 (HEVC)' dès que possible." Encoder.FFmpeg.AMF.Preset="Préréglage" Encoder.FFmpeg.AMF.Preset.Speed="Vitesse" Encoder.FFmpeg.AMF.Preset.Balanced="Équilibré" @@ -350,6 +352,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Faible" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Forte" Filter.Displacement="Displacement Mapping" +Filter.Displacement.Deprecated="Ce filtre est obsolète et a été retiré. Les utilisateurs sont invités à migrer vers le filtre 'Shader' avec l'exemple 'displace.effect' immédiatement." Filter.Displacement.File="Fichier" Filter.Displacement.Scale="Échelle" Filter.Displacement.Scale.Type="Type de mise à l'échelle" diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index 1c5f5cbac2..8793395bc1 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -359,6 +359,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Debole" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Forte" Filter.Displacement="Mappatura Dislocamento" +Filter.Displacement.Deprecated="Questo filtro è deprecato ed è stato rimosso. Gli utenti sono invitati a migrare immediatamente al filtro 'Shader' con l'esempio 'displace.effect'." Filter.Displacement.File="File" Filter.Displacement.Scale="Scala" Filter.Displacement.Scale.Type="Tipo di scalatura" diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index 76805c6bf3..2b2b226940 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -57,6 +57,7 @@ UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="Kodowanie AOM AV1 (bezpośrednie)" +Encoder.AOM.AV1.Deprecated="Ten enkoder jest przestarzały i zostanie wkrótce usunięty. Użytkownicy proszeni są o jak najszybsze przejście na zintegrowany enkoder „SVT-AV1” lub „AOM AV1”." Encoder.AOM.AV1.Encoder="Enkoder" Encoder.AOM.AV1.Encoder.Usage="Użycie" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Dobra jakość" @@ -127,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Klatki" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.FFmpeg.KeyFrames.Interval="Interwał" +Encoder.FFmpeg.AMF.Deprecated="Ten enkoder jest przestarzały i wkrótce zostanie usunięty. Użytkownicy są proszeni o migrację do zintegrowanego 'AMD HW H. Koder 64 (AVC)” lub „AMD HW H.265 (HEVC) tak szybko, jak to możliwe." Encoder.FFmpeg.AMF.Preset="Preset" Encoder.FFmpeg.AMF.Preset.Speed="Szybkość" Encoder.FFmpeg.AMF.Preset.Balanced="Zbalansowane" diff --git a/data/locale/ru-RU.ini b/data/locale/ru-RU.ini index 68dcad8bfd..464e40bf6e 100644 --- a/data/locale/ru-RU.ini +++ b/data/locale/ru-RU.ini @@ -360,6 +360,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Слабый" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Сильный" Filter.Displacement="Карта смещения" +Filter.Displacement.Deprecated="Данный фильтр устарел и был удален. Необходимо немедленно перейти на использование фильтра 'Шейдер' с основой 'displace.effect'." Filter.Displacement.File="Файл" Filter.Displacement.Scale="Масштаб" Filter.Displacement.Scale.Type="Тип масштабирования" From 398a58ec649e876536a2b49cefb239efee14499b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 27 Aug 2022 19:40:24 +0200 Subject: [PATCH 088/164] project: Updating contributing guidelines --- CONTRIBUTING.md | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fea6aeb4e6..65a349faee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,17 @@ # Contributing -This document goes over how you are expected to contribute to the project. This document is softly enforced, and considered a guideline instead of a requirement. +This document goes over how you (and/or your organization) are expected to contribute. These guidelines are softly enforced and sometimes not required. ## Localization -We use Crowdin to handle translations into many languages. Please join the [StreamFX project on Crowdin](https://crowdin.com/project/obs-stream-effects) if you are interested in improving the translations to your native tongue. Pull Requests therefore should only include changes to `en-US.ini`, and no other localization files should be touched. +We use Crowdin to handle translations into many languages, and you can join the [StreamFX project on Crowdin](https://crowdin.com/project/obs-stream-effects) if you are interested in improving the translations to your native tongue. As Crowdin handles all other languages, Pull Requests therefore should only include changes to `en-US.ini`. ## Commit Guidelines -Commits should focus on a single change, such as formatting, fixing a single bug, a single warning across the code, and similar things. This means that you should not include a fix to color format handling in a commit that implements a new encoder. +Commits should focus on a single change such as formatting, fixing a bug, a warning across the code, and similar things. This means that you should not include a fix to color format handling in a commit that implements a new encoder, or include a fix to a bug with a fix to a warning. ### Linear History -This project prefers the linear history of `git rebase`, and as such forbids merge commits. This allows all branches to be a single line back to the root, unless viewed as a whole where it becomes a tree. If you are working on a branch for a feature, bug or other thing, you should learn how to rebase back onto the main branch before making a pull request. +This project prefers the linear history of `git rebase` and forbids merge commits. This allows all branches to be a single line back to the root, unless viewed as a whole where it becomes a tree. If you are working on a branch for a feature, bug or other thing, you should know how to rebase back onto the main branch before making a pull request. ### Commit Message & Title -As the StreamFX project uses linear history without merge commits, we require a commit message format like this: +We require a commit message format like this: ``` prefix: short description @@ -37,18 +37,16 @@ Depending on where the file is that you ended up modifying, or if you modified m - `/ui` -> `ui` (if not part of a `code` change) - Most other files -> `project` -Multiple prefixes should be separated by `, ` and sorted alphabetically so that a change to `ui` and `code` results in a prefix of `code, ui`. If only a single code file was changed or multiple related file with a common parent were changed, the `code` prefix should be replaced by the path to the file like in these examples: +If multiple locations match, they should be alphabetically sorted and separated by `, `. A change to both `ui` and `code` will as such result in a prefix of `code, ui`. If a `code` change only affects a single file, or multiple files with a common parent file, the prefix should be the path of the file, like shown in the following examples: - `/source/encoders/encoder-ffmpeg` -> `encoder/ffmpeg` - `/source/filters/filter-shader` -> `filter/shader` -- and so on. - -These guidelines are soft requirements and may be extended in the future. +- `/source/encoders/handlers/handler`, `/source/encoders/encoder-ffmpeg` -> `encoder/ffmpeg` ## Coding Guidelines -### Documentation & Comments -Your code should contain the comments where they would save time, as well as documentation for "public" facing functionality. This means that you shouldn't explain things like `1 + 1`, but should provide explanations for complex things. Consider the following: +### Documentation +Documentation should be present in areas where it would save time to new developers, and in areas where an API is defined. This means that you should not provide documentation for things like `1 + 1`, but for things like the following: ```c++ int32_t idepth = static_cast(depth); @@ -57,10 +55,16 @@ int32_t grid_size = static_cast(pow(2l, (idepth / 2))); int32_t container_size = static_cast(pow(2l, (idepth + (idepth / 2)))); ``` -This would be much easier to read if it had a an explaination and didn't require parsing the math. Comments are all about saving time to developers not already invested into the code. +```c++ +class magic_class { + void do_magic_thing(float magic_number); +} +``` + +Both of these examples would be much easier to understand if they had proper documentation, and save hours if not even days of delving into code. Documentation is about saving time to new developers, and can't be replaced by code. Code is not Documentation! ### Naming & Casing -Names for anything should describe the purpose or function of the thing, unless the thing is temporary such as iterators. +All long-term objects should have a descriptive name, which can be used by other developers to know what it is for. Temporary objects should also have some information, but do not necessarily follow the same rules. #### Macros - Casing: ELEPHANT_CASE @@ -162,8 +166,8 @@ function example() { - Casing: snake_case - Separator: `_` - Prefixes: - - `_` for private, protected - - None for public (prefer set-/get-ters) + - private: `_` + - protected, public: None - Suffixes: None ##### Methods @@ -181,6 +185,13 @@ class example { int example_int(); // ❌, has `_int` suffix. void example(); // ✔ void example(int& result); // ✔ + + public: + float exa_mple; // ✔ + + int example_int(); // ❌, has `_int` suffix. + void example(); // ✔ + void example(int& result); // ✔ } struct example { @@ -228,9 +239,14 @@ Interface Classes are handled like normal classes. There are no prefixes or suff ### Preprocessor Macros Pre-processor Macros are a "last stand" option, when all other options fail or would produce worse results. If possible and cleaner to do so, prefer the use of `constexpr` code. +### Global Variables +Only allowed if there is no other cleaner way to handle this. + ### Classes +Special rules for `class` + #### Members -Members of classes should be private and only accessible via get/set methods. +All class members must be `private` and only accessible through get-/setters. The setter of a member should also validate if the setting is within an allowed range, and throw exceptions if an error occurs. If there is no better option, it is allowed to delay validation until a common function is called. ## Building Please read [the guide on the wiki](https://github.com/Xaymar/obs-StreamFX/wiki/Building) for building the project. From bb79b574b54863e5a61d225c36ce6c37e86147ec Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 27 Aug 2022 13:44:52 +0200 Subject: [PATCH 089/164] cmake: Enable all warnings --- CMakeLists.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b63802eac..29c662d4c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1720,15 +1720,14 @@ if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX $<$:/MD> ) - # - Enable most useful warnings. + # - Treat Warnings as Errors + target_compile_options(${PROJECT_NAME} PRIVATE "/Wall") + + # - Disable useless warnings set(DISABLED_WARNINGS - "/wd4061" "/wd4100" "/wd4180" "/wd4201" "/wd4464" "/wd4505" "/wd4514" - "/wd4571" "/wd4623" "/wd4625" "/wd4626" "/wd4668" "/wd4710" "/wd4774" - "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd26812" ) - target_compile_options(${PROJECT_NAME} PRIVATE "/W3") foreach(WARN ${DISABLED_WARNINGS}) - target_compile_options(${PROJECT_NAME} PRIVATE "${WARN}") + target_compile_options(${PROJECT_NAME} PRIVATE "/wd${WARN}") endforeach() # - Require enabled instruction sets. @@ -1791,10 +1790,17 @@ elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_ # GCC/Clang message(STATUS "${LOGPREFIX}Applying custom flags for GCC/Clang style build.") - # - Enable most useful warnings. + # - Enable all warnings. target_compile_options(${PROJECT_NAME} PRIVATE "-Wall") target_compile_options(${PROJECT_NAME} PRIVATE "-Wextra") + # - Disable useless warnings + set(DISABLED_WARNINGS + ) + foreach(WARN ${DISABLED_WARNINGS}) + target_compile_options(${PROJECT_NAME} PRIVATE "-Wno-${WARN}") + endforeach() + # - Require enabled instruction sets. if(${PREFIX}TARGET_NATIVE) target_compile_options(${PROJECT_NAME} PRIVATE From 678399ce813247b5c9024b31b93fd1b03bc54f3d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 13:08:08 +0200 Subject: [PATCH 090/164] cmake: Ignore not-so-useful warnings These warnings are mostly hints or complete nonsense based on broken parsing. It is easier to disable them than to find a common solution that works on all compilers. --- CMakeLists.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29c662d4c4..b82adcb498 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1725,6 +1725,37 @@ if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX # - Disable useless warnings set(DISABLED_WARNINGS + # Don't warn about unused variables, parameters, labels, functions, or typedefs. + "4100" + "4101" + "4102" + "4505" + "4514" + "5245" + # Don't warn about unreferenced variables or parameters which are assigned/initialized. + "4189" + # Don't warn about not-explicitly-handled enumeration identifiers + "4061" + # Ignore automatic padding warnings. + "4820" + # Ignore assignment/move/copy being implicit '= delete;'. + "4623" + "4625" + "4626" + "5026" + "5027" + # Relative include paths are fine. + "4464" + # Buggy warning: printf expects string literal + "4774" + # Buggy warning: subobject initialization should be wrapped in braces + "5246" + # Ignore undefined, unused or unreferenced pre-processor macros + "4688" + # Ignore non-inlined functions + "4710" + # Ignore Spectre mitigation insertions + "5045" ) foreach(WARN ${DISABLED_WARNINGS}) target_compile_options(${PROJECT_NAME} PRIVATE "/wd${WARN}") @@ -1796,6 +1827,27 @@ elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_ # - Disable useless warnings set(DISABLED_WARNINGS + # Don't warn about unused variables, parameters, labels, functions, or typedefs. + "unused-function" + "unused-label" + "unused-local-typedefs" + "unused-parameter" + "unused-result" + "unused-const-variable" + "unused-variable" + "unused-value" + # Don't warn about unreferenced variables or parameters which are assigned/initialized. + "unused-but-set-parameter" + "unused-but-set-variable" + # Don't warn about not-explicitly-handled enumeration identifiers + "switch" + # Ignore automatic padding warnings. + "padded" + # Ignore implicit '= delete;'. + # Ignore extra arguments for printf + "format-extra-args" + # Ignore undefined, unused or unreferenced pre-processor macros + "unused-macros" ) foreach(WARN ${DISABLED_WARNINGS}) target_compile_options(${PROJECT_NAME} PRIVATE "-Wno-${WARN}") From 0fe5c7e654f19201f3255194186bd7ddd79c2d90 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 27 Aug 2022 13:17:47 +0200 Subject: [PATCH 091/164] code: Don't use try-catch as function definition This breaks MSVC and results in leaked exceptions. --- source/encoders/encoder-aom-av1.cpp | 144 ++++---- source/encoders/encoder-ffmpeg.cpp | 26 +- source/filters/filter-autoframing.cpp | 34 +- source/filters/filter-blur.cpp | 264 +++++++------- source/filters/filter-color-grade.cpp | 36 +- source/filters/filter-denoising.cpp | 34 +- source/filters/filter-displacement.cpp | 16 +- source/filters/filter-dynamic-mask.cpp | 82 +++-- source/filters/filter-sdf-effects.cpp | 36 +- source/filters/filter-shader.cpp | 36 +- source/filters/filter-transform.cpp | 82 +++-- source/filters/filter-upscaling.cpp | 54 +-- source/filters/filter-virtual-greenscreen.cpp | 54 +-- source/gfx/shader/gfx-shader.cpp | 176 +++++----- source/nvidia/ar/nvidia-ar.cpp | 2 +- .../nvidia/vfx/nvidia-vfx-superresolution.cpp | 2 +- source/obs/gs/gs-effect-parameter.cpp | 50 +-- source/obs/obs-encoder-factory.hpp | 328 ++++++++++-------- source/obs/obs-signal-handler.hpp | 20 +- source/plugin.cpp | 268 +++++++------- source/sources/source-mirror.cpp | 96 ++--- source/sources/source-shader.cpp | 36 +- source/transitions/transition-shader.cpp | 36 +- source/updater.cpp | 245 ++++++------- 24 files changed, 1142 insertions(+), 1015 deletions(-) diff --git a/source/encoders/encoder-aom-av1.cpp b/source/encoders/encoder-aom-av1.cpp index 468615f3a8..b834e13f57 100644 --- a/source/encoders/encoder-aom-av1.cpp +++ b/source/encoders/encoder-aom-av1.cpp @@ -1278,12 +1278,14 @@ aom_av1_factory::~aom_av1_factory() {} std::shared_ptr _aom_av1_factory_instance = nullptr; void aom_av1_factory::initialize() -try { - if (!_aom_av1_factory_instance) { - _aom_av1_factory_instance = std::make_shared(); +{ + try { + if (!_aom_av1_factory_instance) { + _aom_av1_factory_instance = std::make_shared(); + } + } catch (std::exception const& ex) { + D_LOG_ERROR("Failed to initialize AOM AV1 encoder: %s", ex.what()); } -} catch (std::exception const& ex) { - D_LOG_ERROR("Failed to initialize AOM AV1 encoder: %s", ex.what()); } void aom_av1_factory::finalize() @@ -1349,82 +1351,88 @@ void aom_av1_factory::get_defaults2(obs_data_t* settings) } static bool modified_usage(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - bool is_all_intra = false; - if (obs_data_get_int(settings, ST_KEY_ENCODER_USAGE) == AOM_USAGE_ALL_INTRA) { - is_all_intra = true; - } +{ + try { + bool is_all_intra = false; + if (obs_data_get_int(settings, ST_KEY_ENCODER_USAGE) == AOM_USAGE_ALL_INTRA) { + is_all_intra = true; + } - // All-Intra does not support these. - obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LOOKAHEAD), !is_all_intra); - obs_property_set_visible(obs_properties_get(props, ST_I18N_KEYFRAMES), !is_all_intra); + // All-Intra does not support these. + obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LOOKAHEAD), !is_all_intra); + obs_property_set_visible(obs_properties_get(props, ST_I18N_KEYFRAMES), !is_all_intra); - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } static bool modified_ratecontrol_mode(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - bool is_bitrate_visible = false; - bool is_overundershoot_visible = false; - bool is_quality_visible = false; - - // Fix rate control mode selection if ALL_INTRA is selected. - if (obs_data_get_int(settings, ST_KEY_ENCODER_USAGE) == AOM_USAGE_ALL_INTRA) { - obs_data_set_int(settings, ST_KEY_RATECONTROL_MODE, static_cast(aom_rc_mode::AOM_Q)); - } - - { // Based on the Rate Control Mode, show and hide options. - auto mode = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE)); - if (mode == AOM_CBR) { - is_bitrate_visible = true; - is_overundershoot_visible = true; - } else if (mode == AOM_VBR) { - is_bitrate_visible = true; - is_overundershoot_visible = true; - } else if (mode == AOM_CQ) { - is_bitrate_visible = true; - is_overundershoot_visible = true; - is_quality_visible = true; - } else if (mode == AOM_Q) { - is_quality_visible = true; +{ + try { + bool is_bitrate_visible = false; + bool is_overundershoot_visible = false; + bool is_quality_visible = false; + + // Fix rate control mode selection if ALL_INTRA is selected. + if (obs_data_get_int(settings, ST_KEY_ENCODER_USAGE) == AOM_USAGE_ALL_INTRA) { + obs_data_set_int(settings, ST_KEY_RATECONTROL_MODE, static_cast(aom_rc_mode::AOM_Q)); } - obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_BITRATE), is_bitrate_visible); - obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_BITRATE_UNDERSHOOT), - is_overundershoot_visible); - obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_BITRATE_OVERSHOOT), - is_overundershoot_visible); + { // Based on the Rate Control Mode, show and hide options. + auto mode = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_MODE)); + if (mode == AOM_CBR) { + is_bitrate_visible = true; + is_overundershoot_visible = true; + } else if (mode == AOM_VBR) { + is_bitrate_visible = true; + is_overundershoot_visible = true; + } else if (mode == AOM_CQ) { + is_bitrate_visible = true; + is_overundershoot_visible = true; + is_quality_visible = true; + } else if (mode == AOM_Q) { + is_quality_visible = true; + } + + obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_BITRATE), is_bitrate_visible); + obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_BITRATE_UNDERSHOOT), + is_overundershoot_visible); + obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_BITRATE_OVERSHOOT), + is_overundershoot_visible); #ifdef AOM_CTRL_AOME_SET_CQ_LEVEL - obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_QUALITY), is_quality_visible); + obs_property_set_visible(obs_properties_get(props, ST_KEY_RATECONTROL_LIMITS_QUALITY), is_quality_visible); #endif + } + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; } - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; } static bool modified_keyframes(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - bool is_seconds = obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVALTYPE) == 0; - obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_FRAMES), !is_seconds); - obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_SECONDS), is_seconds); - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; +{ + try { + bool is_seconds = obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVALTYPE) == 0; + obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_FRAMES), !is_seconds); + obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_SECONDS), is_seconds); + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } obs_properties_t* aom_av1_factory::get_properties2(instance_t* data) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index c952a06cbe..503cc3ffd1 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -129,7 +129,7 @@ ffmpeg_instance::ffmpeg_instance(obs_data_t* settings, obs_encoder_t* self, bool throw std::runtime_error("Failed to create encoder context."); } - // Create 8MB of precached Packet data for use later on. + // Allocate a small packet for later use. av_init_packet(&_packet); av_new_packet(&_packet, 8 * 1024 * 1024); // 8 MB precached Packet size. @@ -1051,17 +1051,19 @@ void ffmpeg_factory::migrate(obs_data_t* data, uint64_t version) } static bool modified_keyframes(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - bool is_seconds = obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVALTYPE) == 0; - obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_FRAMES), !is_seconds); - obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_SECONDS), is_seconds); - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; +{ + try { + bool is_seconds = obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVALTYPE) == 0; + obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_FRAMES), !is_seconds); + obs_property_set_visible(obs_properties_get(props, ST_KEY_KEYFRAMES_INTERVAL_SECONDS), is_seconds); + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } obs_properties_t* ffmpeg_factory::get_properties2(instance_t* data) diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index e7cde0d655..4b7e3b05f8 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -1125,14 +1125,16 @@ void autoframing_factory::get_defaults2(obs_data_t* data) } static bool modified_provider(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; +{ + try { + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } obs_properties_t* autoframing_factory::get_properties2(autoframing_instance* data) @@ -1315,13 +1317,15 @@ tracking_provider streamfx::filter::autoframing::autoframing_factory::find_ideal std::shared_ptr _filter_autoframing_factory_instance = nullptr; void autoframing_factory::initialize() -try { - if (!_filter_autoframing_factory_instance) - _filter_autoframing_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_autoframing_factory_instance) + _filter_autoframing_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void autoframing_factory::finalize() diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 728273f8e8..64c8e77c3a 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -649,133 +649,135 @@ void blur_factory::get_defaults2(obs_data_t* settings) } bool modified_properties(void*, obs_properties_t* props, obs_property* prop, obs_data_t* settings) noexcept -try { - obs_property_t* p; - const char* propname = obs_property_name(prop); - const char* vtype = obs_data_get_string(settings, ST_KEY_TYPE); - const char* vsubtype = obs_data_get_string(settings, ST_KEY_SUBTYPE); - - // Find new Type - auto type_found = list_of_types.find(vtype); - if (type_found == list_of_types.end()) { - return false; - } +{ + try { + obs_property_t* p; + const char* propname = obs_property_name(prop); + const char* vtype = obs_data_get_string(settings, ST_KEY_TYPE); + const char* vsubtype = obs_data_get_string(settings, ST_KEY_SUBTYPE); + + // Find new Type + auto type_found = list_of_types.find(vtype); + if (type_found == list_of_types.end()) { + return false; + } - // Find new Subtype - auto subtype_found = list_of_subtypes.find(vsubtype); - if (subtype_found == list_of_subtypes.end()) { - return false; - } + // Find new Subtype + auto subtype_found = list_of_subtypes.find(vsubtype); + if (subtype_found == list_of_subtypes.end()) { + return false; + } - // Blur Type - if (strcmp(propname, ST_KEY_TYPE) == 0) { - obs_property_t* prop_subtype = obs_properties_get(props, ST_KEY_SUBTYPE); + // Blur Type + if (strcmp(propname, ST_KEY_TYPE) == 0) { + obs_property_t* prop_subtype = obs_properties_get(props, ST_KEY_SUBTYPE); - /// Disable unsupported items. - std::size_t subvalue_idx = 0; - for (std::size_t idx = 0, edx = obs_property_list_item_count(prop_subtype); idx < edx; idx++) { - const char* subtype = obs_property_list_item_string(prop_subtype, idx); - bool disabled = false; + /// Disable unsupported items. + std::size_t subvalue_idx = 0; + for (std::size_t idx = 0, edx = obs_property_list_item_count(prop_subtype); idx < edx; idx++) { + const char* subtype = obs_property_list_item_string(prop_subtype, idx); + bool disabled = false; - auto subtype_found_idx = list_of_subtypes.find(subtype); - if (subtype_found_idx != list_of_subtypes.end()) { - disabled = !type_found->second.fn().is_type_supported(subtype_found_idx->second.type); - } else { - disabled = true; - } + auto subtype_found_idx = list_of_subtypes.find(subtype); + if (subtype_found_idx != list_of_subtypes.end()) { + disabled = !type_found->second.fn().is_type_supported(subtype_found_idx->second.type); + } else { + disabled = true; + } - obs_property_list_item_disable(prop_subtype, idx, disabled); - if (strcmp(subtype, vsubtype) == 0) { - subvalue_idx = idx; + obs_property_list_item_disable(prop_subtype, idx, disabled); + if (strcmp(subtype, vsubtype) == 0) { + subvalue_idx = idx; + } } - } - /// Ensure that there is a valid item selected. - if (obs_property_list_item_disabled(prop_subtype, subvalue_idx)) { - for (std::size_t idx = 0, edx = obs_property_list_item_count(prop_subtype); idx < edx; idx++) { - if (!obs_property_list_item_disabled(prop_subtype, idx)) { - obs_data_set_string(settings, ST_KEY_SUBTYPE, obs_property_list_item_string(prop_subtype, idx)); - - // Find new Subtype - auto subtype_found2 = list_of_subtypes.find(vsubtype); - if (subtype_found2 == list_of_subtypes.end()) { - subtype_found = list_of_subtypes.end(); - } else { - subtype_found = subtype_found2; + /// Ensure that there is a valid item selected. + if (obs_property_list_item_disabled(prop_subtype, subvalue_idx)) { + for (std::size_t idx = 0, edx = obs_property_list_item_count(prop_subtype); idx < edx; idx++) { + if (!obs_property_list_item_disabled(prop_subtype, idx)) { + obs_data_set_string(settings, ST_KEY_SUBTYPE, obs_property_list_item_string(prop_subtype, idx)); + + // Find new Subtype + auto subtype_found2 = list_of_subtypes.find(vsubtype); + if (subtype_found2 == list_of_subtypes.end()) { + subtype_found = list_of_subtypes.end(); + } else { + subtype_found = subtype_found2; + } + + break; } - - break; } } } - } - // Blur Sub-Type - { - bool has_angle_support = (subtype_found->second.type == ::streamfx::gfx::blur::type::Directional) - || (subtype_found->second.type == ::streamfx::gfx::blur::type::Rotational); - bool has_center_support = (subtype_found->second.type == ::streamfx::gfx::blur::type::Rotational) - || (subtype_found->second.type == ::streamfx::gfx::blur::type::Zoom); - bool has_stepscale_support = type_found->second.fn().is_step_scale_supported(subtype_found->second.type); - bool show_scaling = obs_data_get_bool(settings, ST_KEY_STEPSCALE) && has_stepscale_support; - - /// Size - p = obs_properties_get(props, ST_KEY_SIZE); - obs_property_float_set_limits(p, type_found->second.fn().get_min_size(subtype_found->second.type), - type_found->second.fn().get_max_size(subtype_found->second.type), - type_found->second.fn().get_step_size(subtype_found->second.type)); - - /// Angle - p = obs_properties_get(props, ST_KEY_ANGLE); - obs_property_set_visible(p, has_angle_support); - obs_property_float_set_limits(p, type_found->second.fn().get_min_angle(subtype_found->second.type), - type_found->second.fn().get_max_angle(subtype_found->second.type), - type_found->second.fn().get_step_angle(subtype_found->second.type)); - - /// Center, Radius - obs_property_set_visible(obs_properties_get(props, ST_KEY_CENTER_X), has_center_support); - obs_property_set_visible(obs_properties_get(props, ST_KEY_CENTER_Y), has_center_support); - - /// Step Scaling - obs_property_set_visible(obs_properties_get(props, ST_KEY_STEPSCALE), has_stepscale_support); - p = obs_properties_get(props, ST_KEY_STEPSCALE_X); - obs_property_set_visible(p, show_scaling); - obs_property_float_set_limits(p, type_found->second.fn().get_min_step_scale_x(subtype_found->second.type), - type_found->second.fn().get_max_step_scale_x(subtype_found->second.type), - type_found->second.fn().get_step_step_scale_x(subtype_found->second.type)); - p = obs_properties_get(props, ST_KEY_STEPSCALE_Y); - obs_property_set_visible(p, show_scaling); - obs_property_float_set_limits(p, type_found->second.fn().get_min_step_scale_x(subtype_found->second.type), - type_found->second.fn().get_max_step_scale_x(subtype_found->second.type), - type_found->second.fn().get_step_step_scale_x(subtype_found->second.type)); - } + // Blur Sub-Type + { + bool has_angle_support = (subtype_found->second.type == ::streamfx::gfx::blur::type::Directional) + || (subtype_found->second.type == ::streamfx::gfx::blur::type::Rotational); + bool has_center_support = (subtype_found->second.type == ::streamfx::gfx::blur::type::Rotational) + || (subtype_found->second.type == ::streamfx::gfx::blur::type::Zoom); + bool has_stepscale_support = type_found->second.fn().is_step_scale_supported(subtype_found->second.type); + bool show_scaling = obs_data_get_bool(settings, ST_KEY_STEPSCALE) && has_stepscale_support; + + /// Size + p = obs_properties_get(props, ST_KEY_SIZE); + obs_property_float_set_limits(p, type_found->second.fn().get_min_size(subtype_found->second.type), + type_found->second.fn().get_max_size(subtype_found->second.type), + type_found->second.fn().get_step_size(subtype_found->second.type)); + + /// Angle + p = obs_properties_get(props, ST_KEY_ANGLE); + obs_property_set_visible(p, has_angle_support); + obs_property_float_set_limits(p, type_found->second.fn().get_min_angle(subtype_found->second.type), + type_found->second.fn().get_max_angle(subtype_found->second.type), + type_found->second.fn().get_step_angle(subtype_found->second.type)); + + /// Center, Radius + obs_property_set_visible(obs_properties_get(props, ST_KEY_CENTER_X), has_center_support); + obs_property_set_visible(obs_properties_get(props, ST_KEY_CENTER_Y), has_center_support); + + /// Step Scaling + obs_property_set_visible(obs_properties_get(props, ST_KEY_STEPSCALE), has_stepscale_support); + p = obs_properties_get(props, ST_KEY_STEPSCALE_X); + obs_property_set_visible(p, show_scaling); + obs_property_float_set_limits(p, type_found->second.fn().get_min_step_scale_x(subtype_found->second.type), + type_found->second.fn().get_max_step_scale_x(subtype_found->second.type), + type_found->second.fn().get_step_step_scale_x(subtype_found->second.type)); + p = obs_properties_get(props, ST_KEY_STEPSCALE_Y); + obs_property_set_visible(p, show_scaling); + obs_property_float_set_limits(p, type_found->second.fn().get_min_step_scale_x(subtype_found->second.type), + type_found->second.fn().get_max_step_scale_x(subtype_found->second.type), + type_found->second.fn().get_step_step_scale_x(subtype_found->second.type)); + } - { // Masking - using namespace ::streamfx::gfx::blur; - bool show_mask = obs_data_get_bool(settings, ST_KEY_MASK); - mask_type mtype = static_cast(obs_data_get_int(settings, ST_KEY_MASK_TYPE)); - bool show_region = (mtype == mask_type::Region) && show_mask; - bool show_image = (mtype == mask_type::Image) && show_mask; - bool show_source = (mtype == mask_type::Source) && show_mask; - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_TYPE), show_mask); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_LEFT), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_TOP), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_RIGHT), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_BOTTOM), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_FEATHER), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_FEATHER_SHIFT), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_INVERT), show_region); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_IMAGE), show_image); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_SOURCE), show_source); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_COLOR), show_image || show_source); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_ALPHA), show_image || show_source); - obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_MULTIPLIER), show_image || show_source); - } + { // Masking + using namespace ::streamfx::gfx::blur; + bool show_mask = obs_data_get_bool(settings, ST_KEY_MASK); + mask_type mtype = static_cast(obs_data_get_int(settings, ST_KEY_MASK_TYPE)); + bool show_region = (mtype == mask_type::Region) && show_mask; + bool show_image = (mtype == mask_type::Image) && show_mask; + bool show_source = (mtype == mask_type::Source) && show_mask; + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_TYPE), show_mask); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_LEFT), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_TOP), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_RIGHT), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_BOTTOM), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_FEATHER), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_FEATHER_SHIFT), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_REGION_INVERT), show_region); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_IMAGE), show_image); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_SOURCE), show_source); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_COLOR), show_image || show_source); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_ALPHA), show_image || show_source); + obs_property_set_visible(obs_properties_get(props, ST_KEY_MASK_MULTIPLIER), show_image || show_source); + } - return true; -} catch (...) { - DLOG_ERROR("Unexpected exception in modified_properties callback."); - return false; + return true; + } catch (...) { + DLOG_ERROR("Unexpected exception in modified_properties callback."); + return false; + } } obs_properties_t* blur_factory::get_properties2(blur_instance* data) @@ -896,28 +898,32 @@ std::string blur_factory::translate_string(const char* format, ...) #ifdef ENABLE_FRONTEND bool blur_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _filter_blur_factory_instance = nullptr; void streamfx::filter::blur::blur_factory::initialize() -try { - if (!_filter_blur_factory_instance) - _filter_blur_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_blur_factory_instance) + _filter_blur_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::filter::blur::blur_factory::finalize() diff --git a/source/filters/filter-color-grade.cpp b/source/filters/filter-color-grade.cpp index dacb778c53..4a1903663b 100644 --- a/source/filters/filter-color-grade.cpp +++ b/source/filters/filter-color-grade.cpp @@ -882,28 +882,32 @@ obs_properties_t* color_grade_factory::get_properties2(color_grade_instance* dat #ifdef ENABLE_FRONTEND bool color_grade_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _color_grade_factory_instance = nullptr; void streamfx::filter::color_grade::color_grade_factory::initialize() -try { - if (!_color_grade_factory_instance) - _color_grade_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_color_grade_factory_instance) + _color_grade_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::filter::color_grade::color_grade_factory::finalize() diff --git a/source/filters/filter-denoising.cpp b/source/filters/filter-denoising.cpp index 3ff8c14220..94c11d7d7b 100644 --- a/source/filters/filter-denoising.cpp +++ b/source/filters/filter-denoising.cpp @@ -572,14 +572,16 @@ void denoising_factory::get_defaults2(obs_data_t* data) } static bool modified_provider(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; +{ + try { + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } obs_properties_t* denoising_factory::get_properties2(denoising_instance* data) @@ -649,13 +651,15 @@ denoising_provider streamfx::filter::denoising::denoising_factory::find_ideal_pr std::shared_ptr _video_denoising_factory_instance = nullptr; void denoising_factory::initialize() -try { - if (!_video_denoising_factory_instance) - _video_denoising_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_video_denoising_factory_instance) + _video_denoising_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void denoising_factory::finalize() diff --git a/source/filters/filter-displacement.cpp b/source/filters/filter-displacement.cpp index 96bf3e203d..92fa8003e6 100644 --- a/source/filters/filter-displacement.cpp +++ b/source/filters/filter-displacement.cpp @@ -203,13 +203,15 @@ obs_properties_t* displacement_factory::get_properties2(displacement_instance* d std::shared_ptr _filter_displacement_factory_instance = nullptr; void streamfx::filter::displacement::displacement_factory::initialize() -try { - if (!_filter_displacement_factory_instance) - _filter_displacement_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_displacement_factory_instance) + _filter_displacement_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::filter::displacement::displacement_factory::finalize() diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index e0bac41929..31068be2bb 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -403,33 +403,35 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::deactivate() } bool dynamic_mask_instance::acquire(std::string_view name) -try { - // Prevent us from creating a circle. - if (auto v = obs_source_get_name(obs_filter_get_parent(_self)); (v != nullptr) && (name == v)) { - return false; - } +{ + try { + // Prevent us from creating a circle. + if (auto v = obs_source_get_name(obs_filter_get_parent(_self)); (v != nullptr) && (name == v)) { + return false; + } - // Acquire a reference to the actual source. - ::streamfx::obs::source input = name; + // Acquire a reference to the actual source. + ::streamfx::obs::source input = name; - // Acquire a texture renderer for the source, with the parent source as the parent. - auto capture = std::make_shared(input, obs_filter_get_parent(_self)); + // Acquire a texture renderer for the source, with the parent source as the parent. + auto capture = std::make_shared(input, obs_filter_get_parent(_self)); - // Update our local storage. - _input = input; - _input_capture = capture; + // Update our local storage. + _input = input; + _input_capture = capture; - // Do the necessary things. - activate(); - show(); + // Do the necessary things. + activate(); + show(); - return true; -} catch (const std::exception&) { - release(); - return false; -} catch (...) { - release(); - return false; + return true; + } catch (const std::exception&) { + release(); + return false; + } catch (...) { + release(); + return false; + } } void dynamic_mask_instance::release() @@ -565,28 +567,32 @@ std::string dynamic_mask_factory::translate_string(const char* format, ...) #ifdef ENABLE_FRONTEND bool dynamic_mask_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _filter_dynamic_mask_factory_instance = nullptr; void streamfx::filter::dynamic_mask::dynamic_mask_factory::initialize() -try { - if (!_filter_dynamic_mask_factory_instance) - _filter_dynamic_mask_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_dynamic_mask_factory_instance) + _filter_dynamic_mask_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::filter::dynamic_mask::dynamic_mask_factory::finalize() diff --git a/source/filters/filter-sdf-effects.cpp b/source/filters/filter-sdf-effects.cpp index 9d7877fa34..9b468f510c 100644 --- a/source/filters/filter-sdf-effects.cpp +++ b/source/filters/filter-sdf-effects.cpp @@ -724,28 +724,32 @@ obs_properties_t* sdf_effects_factory::get_properties2(sdf_effects_instance* dat #ifdef ENABLE_FRONTEND bool sdf_effects_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _filter_sdf_effects_factory_instance = nullptr; void streamfx::filter::sdf_effects::sdf_effects_factory::initialize() -try { - if (!_filter_sdf_effects_factory_instance) - _filter_sdf_effects_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_sdf_effects_factory_instance) + _filter_sdf_effects_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::filter::sdf_effects::sdf_effects_factory::finalize() diff --git a/source/filters/filter-shader.cpp b/source/filters/filter-shader.cpp index d47a85874c..77e8dabeb0 100644 --- a/source/filters/filter-shader.cpp +++ b/source/filters/filter-shader.cpp @@ -218,28 +218,32 @@ obs_properties_t* shader_factory::get_properties2(shader::shader_instance* data) #ifdef ENABLE_FRONTEND bool shader_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _filter_shader_factory_instance = nullptr; void streamfx::filter::shader::shader_factory::initialize() -try { - if (!_filter_shader_factory_instance) - _filter_shader_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_shader_factory_instance) + _filter_shader_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::filter::shader::shader_factory::finalize() diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index e8b3be4a7d..cf1cb682c3 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -636,28 +636,30 @@ void transform_factory::get_defaults2(obs_data_t* settings) } static bool modified_camera_mode(obs_properties_t* pr, obs_property_t*, obs_data_t* d) noexcept -try { - auto mode = static_cast(obs_data_get_int(d, ST_KEY_CAMERA_MODE)); - bool is_camera = mode != transform_mode::CORNER_PIN; - bool is_perspective = (mode == transform_mode::PERSPECTIVE) && is_camera; - bool is_orthographic = (mode == transform_mode::ORTHOGRAPHIC) && is_camera; - - obs_property_set_visible(obs_properties_get(pr, ST_KEY_CAMERA_FIELDOFVIEW), is_perspective); - obs_property_set_visible(obs_properties_get(pr, ST_I18N_POSITION), is_camera); - obs_property_set_visible(obs_properties_get(pr, ST_KEY_POSITION_Z), is_perspective); - obs_property_set_visible(obs_properties_get(pr, ST_I18N_ROTATION), is_camera); - obs_property_set_visible(obs_properties_get(pr, ST_I18N_SCALE), is_camera); - obs_property_set_visible(obs_properties_get(pr, ST_I18N_SHEAR), is_camera); - obs_property_set_visible(obs_properties_get(pr, ST_KEY_ROTATION_ORDER), is_camera); - obs_property_set_visible(obs_properties_get(pr, ST_I18N_CORNERS), !is_camera); - - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return true; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return true; +{ + try { + auto mode = static_cast(obs_data_get_int(d, ST_KEY_CAMERA_MODE)); + bool is_camera = mode != transform_mode::CORNER_PIN; + bool is_perspective = (mode == transform_mode::PERSPECTIVE) && is_camera; + bool is_orthographic = (mode == transform_mode::ORTHOGRAPHIC) && is_camera; + + obs_property_set_visible(obs_properties_get(pr, ST_KEY_CAMERA_FIELDOFVIEW), is_perspective); + obs_property_set_visible(obs_properties_get(pr, ST_I18N_POSITION), is_camera); + obs_property_set_visible(obs_properties_get(pr, ST_KEY_POSITION_Z), is_perspective); + obs_property_set_visible(obs_properties_get(pr, ST_I18N_ROTATION), is_camera); + obs_property_set_visible(obs_properties_get(pr, ST_I18N_SCALE), is_camera); + obs_property_set_visible(obs_properties_get(pr, ST_I18N_SHEAR), is_camera); + obs_property_set_visible(obs_properties_get(pr, ST_KEY_ROTATION_ORDER), is_camera); + obs_property_set_visible(obs_properties_get(pr, ST_I18N_CORNERS), !is_camera); + + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return true; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return true; + } } obs_properties_t* transform_factory::get_properties2(transform_instance* data) @@ -856,28 +858,32 @@ obs_properties_t* transform_factory::get_properties2(transform_instance* data) #ifdef ENABLE_FRONTEND bool transform_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _filter_transform_factory_instance = nullptr; void transform_factory::initialize() -try { - if (!_filter_transform_factory_instance) - _filter_transform_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_filter_transform_factory_instance) + _filter_transform_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void transform_factory::finalize() diff --git a/source/filters/filter-upscaling.cpp b/source/filters/filter-upscaling.cpp index d9ba6290af..610a96ac12 100644 --- a/source/filters/filter-upscaling.cpp +++ b/source/filters/filter-upscaling.cpp @@ -573,14 +573,16 @@ void upscaling_factory::get_defaults2(obs_data_t* data) } static bool modified_provider(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; +{ + try { + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } obs_properties_t* upscaling_factory::get_properties2(upscaling_instance* data) @@ -618,15 +620,17 @@ obs_properties_t* upscaling_factory::get_properties2(upscaling_instance* data) #ifdef ENABLE_FRONTEND bool upscaling_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif @@ -656,13 +660,15 @@ upscaling_provider streamfx::filter::upscaling::upscaling_factory::find_ideal_pr std::shared_ptr _video_superresolution_factory_instance = nullptr; void upscaling_factory::initialize() -try { - if (!_video_superresolution_factory_instance) - _video_superresolution_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_video_superresolution_factory_instance) + _video_superresolution_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void upscaling_factory::finalize() diff --git a/source/filters/filter-virtual-greenscreen.cpp b/source/filters/filter-virtual-greenscreen.cpp index b46b810885..d67f1e6f76 100644 --- a/source/filters/filter-virtual-greenscreen.cpp +++ b/source/filters/filter-virtual-greenscreen.cpp @@ -574,14 +574,16 @@ void virtual_greenscreen_factory::get_defaults2(obs_data_t* data) } static bool modified_provider(obs_properties_t* props, obs_property_t*, obs_data_t* settings) noexcept -try { - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; +{ + try { + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } obs_properties_t* virtual_greenscreen_factory::get_properties2(virtual_greenscreen_instance* data) @@ -619,15 +621,17 @@ obs_properties_t* virtual_greenscreen_factory::get_properties2(virtual_greenscre #ifdef ENABLE_FRONTEND bool virtual_greenscreen_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif @@ -658,13 +662,15 @@ virtual_greenscreen_provider streamfx::filter::virtual_greenscreen::virtual_gree std::shared_ptr _video_superresolution_factory_instance = nullptr; void virtual_greenscreen_factory::initialize() -try { - if (!_video_superresolution_factory_instance) - _video_superresolution_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_video_superresolution_factory_instance) + _video_superresolution_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void virtual_greenscreen_factory::finalize() diff --git a/source/gfx/shader/gfx-shader.cpp b/source/gfx/shader/gfx-shader.cpp index 75c3ae3f7f..e3d26693de 100644 --- a/source/gfx/shader/gfx-shader.cpp +++ b/source/gfx/shader/gfx-shader.cpp @@ -65,27 +65,29 @@ streamfx::gfx::shader::shader::shader(obs_source_t* self, shader_mode mode) streamfx::gfx::shader::shader::~shader() = default; bool streamfx::gfx::shader::shader::is_shader_different(const std::filesystem::path& file) -try { - if (std::filesystem::exists(file)) { - // Check if the file name differs. - if (file != _shader_file) - return true; - } +{ + try { + if (std::filesystem::exists(file)) { + // Check if the file name differs. + if (file != _shader_file) + return true; + } - if (std::filesystem::exists(_shader_file)) { - // Is the file write time different? - if (std::filesystem::last_write_time(_shader_file) != _shader_file_mt) - return true; + if (std::filesystem::exists(_shader_file)) { + // Is the file write time different? + if (std::filesystem::last_write_time(_shader_file) != _shader_file_mt) + return true; - // Is the file size different? - if (std::filesystem::file_size(_shader_file) != _shader_file_sz) - return true; - } + // Is the file size different? + if (std::filesystem::file_size(_shader_file) != _shader_file_sz) + return true; + } - return false; -} catch (const std::exception& ex) { - DLOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what()); - return false; + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what()); + return false; + } } bool streamfx::gfx::shader::shader::is_technique_different(std::string_view tech) @@ -99,83 +101,85 @@ bool streamfx::gfx::shader::shader::is_technique_different(std::string_view tech bool streamfx::gfx::shader::shader::load_shader(const std::filesystem::path& file, std::string_view tech, bool& shader_dirty, bool& param_dirty) -try { - if (!std::filesystem::exists(file)) - return false; - - shader_dirty = is_shader_different(file); - param_dirty = is_technique_different(tech) || shader_dirty; - - // Update Shader - if (shader_dirty) { - _shader = streamfx::obs::gs::effect(file); - _shader_file_mt = std::filesystem::last_write_time(file); - _shader_file_sz = std::filesystem::file_size(file); - _shader_file = file; - _shader_file_tick = 0; - } +{ + try { + if (!std::filesystem::exists(file)) + return false; + + shader_dirty = is_shader_different(file); + param_dirty = is_technique_different(tech) || shader_dirty; + + // Update Shader + if (shader_dirty) { + _shader = streamfx::obs::gs::effect(file); + _shader_file_mt = std::filesystem::last_write_time(file); + _shader_file_sz = std::filesystem::file_size(file); + _shader_file = file; + _shader_file_tick = 0; + } - // Update Params - if (param_dirty) { - auto settings = - std::shared_ptr(obs_source_get_settings(_self), [](obs_data_t* p) { obs_data_release(p); }); + // Update Params + if (param_dirty) { + auto settings = + std::shared_ptr(obs_source_get_settings(_self), [](obs_data_t* p) { obs_data_release(p); }); - bool have_valid_tech = false; - for (std::size_t idx = 0; idx < _shader.count_techniques(); idx++) { - if (_shader.get_technique(idx).name() == tech) { - have_valid_tech = true; - break; + bool have_valid_tech = false; + for (std::size_t idx = 0; idx < _shader.count_techniques(); idx++) { + if (_shader.get_technique(idx).name() == tech) { + have_valid_tech = true; + break; + } } - } - if (have_valid_tech) { - _shader_tech = tech; - } else { - _shader_tech = _shader.get_technique(0).name(); + if (have_valid_tech) { + _shader_tech = tech; + } else { + _shader_tech = _shader.get_technique(0).name(); - // Update source data. - obs_data_set_string(settings.get(), ST_KEY_SHADER_TECHNIQUE, _shader_tech.c_str()); - } + // Update source data. + obs_data_set_string(settings.get(), ST_KEY_SHADER_TECHNIQUE, _shader_tech.c_str()); + } - // Clear the shader parameters map and rebuild. - _shader_params.clear(); - auto etech = _shader.get_technique(_shader_tech); - for (std::size_t idx = 0; idx < etech.count_passes(); idx++) { - auto pass = etech.get_pass(idx); - auto fetch_params = [&](std::size_t count, - std::function get_func) { - for (std::size_t vidx = 0; vidx < count; vidx++) { - auto el = get_func(vidx); - if (!el) - continue; - - auto el_name = el.get_name(); - auto fnd = _shader_params.find(el_name); - if (fnd != _shader_params.end()) - continue; - - auto param = streamfx::gfx::shader::parameter::make_parameter(this, el, ST_KEY_PARAMETERS); - - if (param) { - _shader_params.insert_or_assign(el_name, param); - param->defaults(settings.get()); - param->update(settings.get()); + // Clear the shader parameters map and rebuild. + _shader_params.clear(); + auto etech = _shader.get_technique(_shader_tech); + for (std::size_t idx = 0; idx < etech.count_passes(); idx++) { + auto pass = etech.get_pass(idx); + auto fetch_params = [&](std::size_t count, + std::function get_func) { + for (std::size_t vidx = 0; vidx < count; vidx++) { + auto el = get_func(vidx); + if (!el) + continue; + + auto el_name = el.get_name(); + auto fnd = _shader_params.find(el_name); + if (fnd != _shader_params.end()) + continue; + + auto param = streamfx::gfx::shader::parameter::make_parameter(this, el, ST_KEY_PARAMETERS); + + if (param) { + _shader_params.insert_or_assign(el_name, param); + param->defaults(settings.get()); + param->update(settings.get()); + } } - } - }; + }; - auto gvp = [&](std::size_t idx) { return pass.get_vertex_parameter(idx); }; - fetch_params(pass.count_vertex_parameters(), gvp); - auto gpp = [&](std::size_t idx) { return pass.get_pixel_parameter(idx); }; - fetch_params(pass.count_pixel_parameters(), gpp); + auto gvp = [&](std::size_t idx) { return pass.get_vertex_parameter(idx); }; + fetch_params(pass.count_vertex_parameters(), gvp); + auto gpp = [&](std::size_t idx) { return pass.get_pixel_parameter(idx); }; + fetch_params(pass.count_pixel_parameters(), gpp); + } } - } - return true; -} catch (const std::exception& ex) { - DLOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what()); - return false; -} catch (...) { - return false; + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Loading shader '%s' failed with error: %s", file.c_str(), ex.what()); + return false; + } catch (...) { + return false; + } } void streamfx::gfx::shader::shader::defaults(obs_data_t* data) diff --git a/source/nvidia/ar/nvidia-ar.cpp b/source/nvidia/ar/nvidia-ar.cpp index 123cec3d6f..0d33e828e6 100644 --- a/source/nvidia/ar/nvidia-ar.cpp +++ b/source/nvidia/ar/nvidia-ar.cpp @@ -90,7 +90,7 @@ streamfx::nvidia::ar::ar::ar() : _library(), _model_path() DWORD env_size = GetEnvironmentVariableW(L"NVAR_MODEL_PATH", nullptr, 0); if (env_size > 0) { std::vector buffer(static_cast(env_size) + 1, 0); - env_size = GetEnvironmentVariableW(L"NVAR_MODEL_PATH", buffer.data(), buffer.size()); + env_size = GetEnvironmentVariableW(L"NVAR_MODEL_PATH", buffer.data(), static_cast(buffer.size())); _model_path = std::wstring(buffer.data(), buffer.size()); // The SDK is location one directory "up" from the model path. diff --git a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp index c202312345..57e89a7143 100644 --- a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp +++ b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp @@ -58,7 +58,7 @@ static float find_closest_scale_factor(float factor) static size_t find_closest_scale_factor_index(float factor) { - std::pair minimal = {0.f, std::numeric_limits::max()}; + std::pair minimal = {0, std::numeric_limits::max()}; for (size_t idx = 0; idx < supported_scale_factors.size(); idx++) { float delta = supported_scale_factors[idx]; float value = abs(delta - factor); diff --git a/source/obs/gs/gs-effect-parameter.cpp b/source/obs/gs/gs-effect-parameter.cpp index 49155f75a7..d715ce4fca 100644 --- a/source/obs/gs/gs-effect-parameter.cpp +++ b/source/obs/gs/gs-effect-parameter.cpp @@ -83,34 +83,38 @@ streamfx::obs::gs::effect_parameter& streamfx::obs::gs::effect_parameter::operat } streamfx::obs::gs::effect_parameter::effect_parameter(effect_parameter&& rhs) noexcept -try { - reset(rhs.get(), [](gs_eparam_t*) {}); - _effect_parent = rhs._effect_parent; - _pass_parent = rhs._pass_parent; - _param_parent = rhs._param_parent; - - rhs.reset(); - rhs._effect_parent = nullptr; - rhs._pass_parent = nullptr; - rhs._param_parent = nullptr; -} catch (...) { +{ + try { + reset(rhs.get(), [](gs_eparam_t*) {}); + _effect_parent = rhs._effect_parent; + _pass_parent = rhs._pass_parent; + _param_parent = rhs._param_parent; + + rhs.reset(); + rhs._effect_parent = nullptr; + rhs._pass_parent = nullptr; + rhs._param_parent = nullptr; + } catch (...) { + } } streamfx::obs::gs::effect_parameter& streamfx::obs::gs::effect_parameter::operator=(effect_parameter&& rhs) noexcept -try { - reset(rhs.get(), [](gs_eparam_t*) {}); - _effect_parent = rhs._effect_parent; - _pass_parent = rhs._pass_parent; - _param_parent = rhs._param_parent; +{ + try { + reset(rhs.get(), [](gs_eparam_t*) {}); + _effect_parent = rhs._effect_parent; + _pass_parent = rhs._pass_parent; + _param_parent = rhs._param_parent; - rhs.reset(); - rhs._effect_parent = nullptr; - rhs._pass_parent = nullptr; - rhs._param_parent = nullptr; + rhs.reset(); + rhs._effect_parent = nullptr; + rhs._pass_parent = nullptr; + rhs._param_parent = nullptr; - return *this; -} catch (...) { - return *this; + return *this; + } catch (...) { + return *this; + } } std::string_view streamfx::obs::gs::effect_parameter::get_name() diff --git a/source/obs/obs-encoder-factory.hpp b/source/obs/obs-encoder-factory.hpp index b70e65009b..66646b315b 100644 --- a/source/obs/obs-encoder-factory.hpp +++ b/source/obs/obs-encoder-factory.hpp @@ -174,207 +174,237 @@ namespace streamfx::obs { private /* Factory */: static const char* _get_name(void* type_data) noexcept - try { - if (type_data) - return reinterpret_cast(type_data)->get_name(); - return nullptr; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; + { + try { + if (type_data) + return reinterpret_cast(type_data)->get_name(); + return nullptr; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; + } } static void* _create(obs_data_t* settings, obs_encoder_t* encoder) noexcept - try { - auto* fac = reinterpret_cast(obs_encoder_get_type_data(encoder)); - return fac->create(settings, encoder, false); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; + { + try { + auto* fac = reinterpret_cast(obs_encoder_get_type_data(encoder)); + return fac->create(settings, encoder, false); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; + } } static void* _create_hw(obs_data_t* settings, obs_encoder_t* encoder) noexcept - try { - auto* fac = reinterpret_cast(obs_encoder_get_type_data(encoder)); + { try { - return fac->create(settings, encoder, true); + auto* fac = reinterpret_cast(obs_encoder_get_type_data(encoder)); + try { + return fac->create(settings, encoder, true); + } catch (...) { + return obs_encoder_create_rerouted(encoder, fac->_info_fallback.id); + } + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; } catch (...) { - return obs_encoder_create_rerouted(encoder, fac->_info_fallback.id); + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; } - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; } static void _get_defaults2(obs_data_t* settings, void* type_data) noexcept - try { - if (type_data) - reinterpret_cast(type_data)->get_defaults2(settings); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (type_data) + reinterpret_cast(type_data)->get_defaults2(settings); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } static bool _properties_migrate_settings(void* priv, obs_properties_t*, obs_property_t* p, obs_data_t* settings) noexcept - try { - obs_property_set_visible(p, false); - reinterpret_cast(priv)->_migrate(settings, nullptr); - return true; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + { + try { + obs_property_set_visible(p, false); + reinterpret_cast(priv)->_migrate(settings, nullptr); + return true; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } static obs_properties_t* _get_properties2(void* data, void* type_data) noexcept - try { - if (type_data) { - auto props = - reinterpret_cast(type_data)->get_properties2(reinterpret_cast(data)); - - { // Support for permanent settings migration. - auto p = obs_properties_add_int( - props, S_VERSION, "If you can see this, something went horribly wrong.", - std::numeric_limits::lowest(), std::numeric_limits::max(), 1); - obs_property_set_modified_callback2(p, _properties_migrate_settings, type_data); + { + try { + if (type_data) { + auto props = + reinterpret_cast(type_data)->get_properties2(reinterpret_cast(data)); + + { // Support for permanent settings migration. + auto p = obs_properties_add_int( + props, S_VERSION, "If you can see this, something went horribly wrong.", + std::numeric_limits::lowest(), std::numeric_limits::max(), 1); + obs_property_set_modified_callback2(p, _properties_migrate_settings, type_data); + } + + return props; } - - return props; + return nullptr; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return nullptr; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return nullptr; } - return nullptr; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return nullptr; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return nullptr; } private /* Instance */: static void _destroy(void* data) noexcept - try { - if (data) - delete reinterpret_cast(data); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + delete reinterpret_cast(data); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } static bool _update(void* data, obs_data_t* settings) noexcept - try { - auto priv = reinterpret_cast(data); - if (priv) { - reinterpret_cast(obs_encoder_get_type_data(priv->get()))->_migrate(settings, priv); - return priv->update(settings); + { + try { + auto priv = reinterpret_cast(data); + if (priv) { + reinterpret_cast(obs_encoder_get_type_data(priv->get()))->_migrate(settings, priv); + return priv->update(settings); + } + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; } - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; } static bool _encode(void* data, struct encoder_frame* frame, struct encoder_packet* packet, bool* received_packet) noexcept - try { - if (data) - return reinterpret_cast(data)->encode_video(frame, packet, received_packet); - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + { + try { + if (data) + return reinterpret_cast(data)->encode_video(frame, packet, received_packet); + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } static bool _encode_texture(void* data, uint32_t handle, int64_t pts, uint64_t lock_key, uint64_t* next_key, struct encoder_packet* packet, bool* received_packet) noexcept - try { - if (data) - return reinterpret_cast(data)->encode_video(handle, pts, lock_key, next_key, packet, - received_packet); - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + { + try { + if (data) + return reinterpret_cast(data)->encode_video(handle, pts, lock_key, next_key, + packet, received_packet); + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } static size_t _get_frame_size(void* data) noexcept - try { - if (data) - return reinterpret_cast(data)->get_frame_size(); - return 0; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return 0; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return 0; + { + try { + if (data) + return reinterpret_cast(data)->get_frame_size(); + return 0; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return 0; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return 0; + } } static bool _get_extra_data(void* data, uint8_t** extra_data, size_t* size) noexcept - try { - if (data) - return reinterpret_cast(data)->get_extra_data(extra_data, size); - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + { + try { + if (data) + return reinterpret_cast(data)->get_extra_data(extra_data, size); + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } static bool _get_sei_data(void* data, uint8_t** sei_data, size_t* size) noexcept - try { - if (data) - return reinterpret_cast(data)->get_sei_data(sei_data, size); - return false; - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - return false; - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + { + try { + if (data) + return reinterpret_cast(data)->get_sei_data(sei_data, size); + return false; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } static void _get_audio_info(void* data, struct audio_convert_info* info) noexcept - try { - if (data) - reinterpret_cast(data)->get_audio_info(info); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + reinterpret_cast(data)->get_audio_info(info); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } static void _get_video_info(void* data, struct video_scale_info* info) noexcept - try { - if (data) - reinterpret_cast(data)->get_video_info(info); - } catch (const std::exception& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); - } catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + { + try { + if (data) + reinterpret_cast(data)->get_video_info(info); + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } public: diff --git a/source/obs/obs-signal-handler.hpp b/source/obs/obs-signal-handler.hpp index a691b509f1..f4eef27d54 100644 --- a/source/obs/obs-signal-handler.hpp +++ b/source/obs/obs-signal-handler.hpp @@ -44,10 +44,12 @@ namespace streamfx::obs { std::shared_ptr _keepalive; static void handle_signal(void* ptr, calldata* cd) noexcept - try { - auto p = reinterpret_cast>*>(ptr); - p->event(p->_keepalive, cd); - } catch (...) { + { + try { + auto p = reinterpret_cast>*>(ptr); + p->event(p->_keepalive, cd); + } catch (...) { + } } public: @@ -72,10 +74,12 @@ namespace streamfx::obs { ::streamfx::obs::source _keepalive; static void handle_audio(void* ptr, obs_source_t*, const struct audio_data* audio_data, bool muted) noexcept - try { - auto p = reinterpret_cast(ptr); - p->event(p->_keepalive, audio_data, muted); - } catch (...) { + { + try { + auto p = reinterpret_cast(ptr); + p->event(p->_keepalive, audio_data, muted); + } catch (...) { + } } public: diff --git a/source/plugin.cpp b/source/plugin.cpp index 3701394e63..cdb5d6e339 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -97,238 +97,242 @@ static std::shared_ptr _streamfx_gfx_opengl; static std::shared_ptr _source_tracker; MODULE_EXPORT bool obs_module_load(void) -try { - DLOG_INFO("Loading Version %s", STREAMFX_VERSION_STRING); +{ + try { + DLOG_INFO("Loading Version %s", STREAMFX_VERSION_STRING); - // Initialize global configuration. - streamfx::configuration::initialize(); + // Initialize global configuration. + streamfx::configuration::initialize(); - // Initialize global Thread Pool. - _threadpool = std::make_shared(); + // Initialize global Thread Pool. + _threadpool = std::make_shared(); - // Initialize Source Tracker - _source_tracker = streamfx::obs::source_tracker::get(); + // Initialize Source Tracker + _source_tracker = streamfx::obs::source_tracker::get(); - // Initialize GLAD (OpenGL) - { - streamfx::obs::gs::context gctx{}; - _streamfx_gfx_opengl = streamfx::gfx::opengl::get(); - } + // Initialize GLAD (OpenGL) + { + streamfx::obs::gs::context gctx{}; + _streamfx_gfx_opengl = streamfx::gfx::opengl::get(); + } #ifdef ENABLE_NVIDIA_CUDA - // Initialize CUDA if features requested it. - std::shared_ptr<::streamfx::nvidia::cuda::obs> cuda; - try { - cuda = ::streamfx::nvidia::cuda::obs::get(); - } catch (...) { - // If CUDA failed to load, it is considered safe to ignore. - } + // Initialize CUDA if features requested it. + std::shared_ptr<::streamfx::nvidia::cuda::obs> cuda; + try { + cuda = ::streamfx::nvidia::cuda::obs::get(); + } catch (...) { + // If CUDA failed to load, it is considered safe to ignore. + } #endif - // GS Stuff - { - _gs_fstri_vb = std::make_shared(uint32_t(3), uint8_t(1)); - { - auto vtx = _gs_fstri_vb->at(0); - vec3_set(vtx.position, 0, 0, 0); - vec4_set(vtx.uv[0], 0, 0, 0, 0); - } - { - auto vtx = _gs_fstri_vb->at(1); - vec3_set(vtx.position, 2, 0, 0); - vec4_set(vtx.uv[0], 2, 0, 0, 0); - } + // GS Stuff { - auto vtx = _gs_fstri_vb->at(2); - vec3_set(vtx.position, 0, 2, 0); - vec4_set(vtx.uv[0], 0, 2, 0, 0); + _gs_fstri_vb = std::make_shared(uint32_t(3), uint8_t(1)); + { + auto vtx = _gs_fstri_vb->at(0); + vec3_set(vtx.position, 0, 0, 0); + vec4_set(vtx.uv[0], 0, 0, 0, 0); + } + { + auto vtx = _gs_fstri_vb->at(1); + vec3_set(vtx.position, 2, 0, 0); + vec4_set(vtx.uv[0], 2, 0, 0, 0); + } + { + auto vtx = _gs_fstri_vb->at(2); + vec3_set(vtx.position, 0, 2, 0); + vec4_set(vtx.uv[0], 0, 2, 0, 0); + } + _gs_fstri_vb->update(); } - _gs_fstri_vb->update(); - } - // Encoders - { + // Encoders + { #ifdef ENABLE_ENCODER_AOM_AV1 - streamfx::encoder::aom::av1::aom_av1_factory::initialize(); + streamfx::encoder::aom::av1::aom_av1_factory::initialize(); #endif #ifdef ENABLE_ENCODER_FFMPEG - using namespace streamfx::encoder::ffmpeg; - ffmpeg_manager::initialize(); + using namespace streamfx::encoder::ffmpeg; + ffmpeg_manager::initialize(); #endif - } + } - // Filters - { + // Filters + { #ifdef ENABLE_FILTER_AUTOFRAMING - streamfx::filter::autoframing::autoframing_factory::initialize(); + streamfx::filter::autoframing::autoframing_factory::initialize(); #endif #ifdef ENABLE_FILTER_BLUR - streamfx::filter::blur::blur_factory::initialize(); + streamfx::filter::blur::blur_factory::initialize(); #endif #ifdef ENABLE_FILTER_COLOR_GRADE - streamfx::filter::color_grade::color_grade_factory::initialize(); + streamfx::filter::color_grade::color_grade_factory::initialize(); #endif #ifdef ENABLE_FILTER_DENOISING - streamfx::filter::denoising::denoising_factory::initialize(); + streamfx::filter::denoising::denoising_factory::initialize(); #endif #ifdef ENABLE_FILTER_DISPLACEMENT - streamfx::filter::displacement::displacement_factory::initialize(); + streamfx::filter::displacement::displacement_factory::initialize(); #endif #ifdef ENABLE_FILTER_DYNAMIC_MASK - streamfx::filter::dynamic_mask::dynamic_mask_factory::initialize(); + streamfx::filter::dynamic_mask::dynamic_mask_factory::initialize(); #endif #ifdef ENABLE_FILTER_SDF_EFFECTS - streamfx::filter::sdf_effects::sdf_effects_factory::initialize(); + streamfx::filter::sdf_effects::sdf_effects_factory::initialize(); #endif #ifdef ENABLE_FILTER_SHADER - streamfx::filter::shader::shader_factory::initialize(); + streamfx::filter::shader::shader_factory::initialize(); #endif #ifdef ENABLE_FILTER_TRANSFORM - streamfx::filter::transform::transform_factory::initialize(); + streamfx::filter::transform::transform_factory::initialize(); #endif #ifdef ENABLE_FILTER_UPSCALING - streamfx::filter::upscaling::upscaling_factory::initialize(); + streamfx::filter::upscaling::upscaling_factory::initialize(); #endif #ifdef ENABLE_FILTER_VIRTUAL_GREENSCREEN - streamfx::filter::virtual_greenscreen::virtual_greenscreen_factory::initialize(); + streamfx::filter::virtual_greenscreen::virtual_greenscreen_factory::initialize(); #endif - } + } - // Sources - { + // Sources + { #ifdef ENABLE_SOURCE_MIRROR - streamfx::source::mirror::mirror_factory::initialize(); + streamfx::source::mirror::mirror_factory::initialize(); #endif #ifdef ENABLE_SOURCE_SHADER - streamfx::source::shader::shader_factory::initialize(); + streamfx::source::shader::shader_factory::initialize(); #endif - } + } - // Transitions - { + // Transitions + { #ifdef ENABLE_TRANSITION_SHADER - streamfx::transition::shader::shader_factory::initialize(); + streamfx::transition::shader::shader_factory::initialize(); #endif - } + } // Frontend #ifdef ENABLE_FRONTEND - streamfx::ui::handler::initialize(); + streamfx::ui::handler::initialize(); #endif - DLOG_INFO("Loaded Version %s", STREAMFX_VERSION_STRING); - return true; -} catch (std::exception const& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s", __FUNCTION_NAME__, ex.what()); - return false; -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); - return false; + DLOG_INFO("Loaded Version %s", STREAMFX_VERSION_STRING); + return true; + } catch (std::exception const& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s", __FUNCTION_NAME__, ex.what()); + return false; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return false; + } } MODULE_EXPORT void obs_module_unload(void) -try { - DLOG_INFO("Unloading Version %s", STREAMFX_VERSION_STRING); +{ + try { + DLOG_INFO("Unloading Version %s", STREAMFX_VERSION_STRING); - // Frontend + // Frontend #ifdef ENABLE_FRONTEND - streamfx::ui::handler::finalize(); + streamfx::ui::handler::finalize(); #endif - // Transitions - { + // Transitions + { #ifdef ENABLE_TRANSITION_SHADER - streamfx::transition::shader::shader_factory::finalize(); + streamfx::transition::shader::shader_factory::finalize(); #endif - } + } - // Sources - { + // Sources + { #ifdef ENABLE_SOURCE_MIRROR - streamfx::source::mirror::mirror_factory::finalize(); + streamfx::source::mirror::mirror_factory::finalize(); #endif #ifdef ENABLE_SOURCE_SHADER - streamfx::source::shader::shader_factory::finalize(); + streamfx::source::shader::shader_factory::finalize(); #endif - } + } - // Filters - { + // Filters + { #ifdef ENABLE_FILTER_AUTOFRAMING - streamfx::filter::autoframing::autoframing_factory::finalize(); + streamfx::filter::autoframing::autoframing_factory::finalize(); #endif #ifdef ENABLE_FILTER_BLUR - streamfx::filter::blur::blur_factory::finalize(); + streamfx::filter::blur::blur_factory::finalize(); #endif #ifdef ENABLE_FILTER_COLOR_GRADE - streamfx::filter::color_grade::color_grade_factory::finalize(); + streamfx::filter::color_grade::color_grade_factory::finalize(); #endif #ifdef ENABLE_FILTER_DENOISING - streamfx::filter::denoising::denoising_factory::finalize(); + streamfx::filter::denoising::denoising_factory::finalize(); #endif #ifdef ENABLE_FILTER_DISPLACEMENT - streamfx::filter::displacement::displacement_factory::finalize(); + streamfx::filter::displacement::displacement_factory::finalize(); #endif #ifdef ENABLE_FILTER_DYNAMIC_MASK - streamfx::filter::dynamic_mask::dynamic_mask_factory::finalize(); + streamfx::filter::dynamic_mask::dynamic_mask_factory::finalize(); #endif #ifdef ENABLE_FILTER_SDF_EFFECTS - streamfx::filter::sdf_effects::sdf_effects_factory::finalize(); + streamfx::filter::sdf_effects::sdf_effects_factory::finalize(); #endif #ifdef ENABLE_FILTER_SHADER - streamfx::filter::shader::shader_factory::finalize(); + streamfx::filter::shader::shader_factory::finalize(); #endif #ifdef ENABLE_FILTER_TRANSFORM - streamfx::filter::transform::transform_factory::finalize(); + streamfx::filter::transform::transform_factory::finalize(); #endif #ifdef ENABLE_FILTER_UPSCALING - streamfx::filter::upscaling::upscaling_factory::finalize(); + streamfx::filter::upscaling::upscaling_factory::finalize(); #endif #ifdef ENABLE_FILTER_VIRTUAL_GREENSCREEN - streamfx::filter::virtual_greenscreen::virtual_greenscreen_factory::finalize(); + streamfx::filter::virtual_greenscreen::virtual_greenscreen_factory::finalize(); #endif - } + } - // Encoders - { + // Encoders + { #ifdef ENABLE_ENCODER_FFMPEG - streamfx::encoder::ffmpeg::ffmpeg_manager::finalize(); + streamfx::encoder::ffmpeg::ffmpeg_manager::finalize(); #endif #ifdef ENABLE_ENCODER_AOM_AV1 - streamfx::encoder::aom::av1::aom_av1_factory::finalize(); + streamfx::encoder::aom::av1::aom_av1_factory::finalize(); #endif - } + } - // GS Stuff - { - _gs_fstri_vb.reset(); - } + // GS Stuff + { + _gs_fstri_vb.reset(); + } - // Finalize GLAD (OpenGL) - { - streamfx::obs::gs::context gctx{}; - _streamfx_gfx_opengl.reset(); - } + // Finalize GLAD (OpenGL) + { + streamfx::obs::gs::context gctx{}; + _streamfx_gfx_opengl.reset(); + } - // Finalize Source Tracker - _source_tracker.reset(); + // Finalize Source Tracker + _source_tracker.reset(); - // // Auto-Updater - //#ifdef ENABLE_UPDATER - // _updater.reset(); - //#endif + // // Auto-Updater + //#ifdef ENABLE_UPDATER + // _updater.reset(); + //#endif - // Finalize Thread Pool - _threadpool.reset(); + // Finalize Thread Pool + _threadpool.reset(); - // Finalize Configuration - streamfx::configuration::finalize(); + // Finalize Configuration + streamfx::configuration::finalize(); - DLOG_INFO("Unloaded Version %s", STREAMFX_VERSION_STRING); -} catch (std::exception const& ex) { - DLOG_ERROR("Unexpected exception in function '%s': %s", __FUNCTION_NAME__, ex.what()); -} catch (...) { - DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + DLOG_INFO("Unloaded Version %s", STREAMFX_VERSION_STRING); + } catch (std::exception const& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s", __FUNCTION_NAME__, ex.what()); + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + } } std::shared_ptr streamfx::threadpool() diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 7035f2a1a0..1258078be5 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -184,29 +184,31 @@ void mirror_instance::enum_all_sources(obs_source_enum_proc_t cb, void* ptr) } void mirror_instance::acquire(std::string source_name) -try { - release(); +{ + try { + release(); - // Find source by name if possible. - decltype(_source) source{source_name}; - if ((!source) || (source == _self)) { // If we failed, just exit early. - return; - } + // Find source by name if possible. + decltype(_source) source{source_name}; + if ((!source) || (source == _self)) { // If we failed, just exit early. + return; + } - // Everything went well, store. - _source_child = std::make_shared<::streamfx::obs::source_active_child>(_self, source); - _source = std::move(source); - _source_size.first = obs_source_get_width(_source); - _source_size.second = obs_source_get_height(_source); - - // Listen to any audio the source spews out. - if (_audio_enabled) { - _signal_audio = std::make_shared(_source); - _signal_audio->event.add(std::bind(&mirror_instance::on_audio, this, std::placeholders::_1, - std::placeholders::_2, std::placeholders::_3)); + // Everything went well, store. + _source_child = std::make_shared<::streamfx::obs::source_active_child>(_self, source); + _source = std::move(source); + _source_size.first = obs_source_get_width(_source); + _source_size.second = obs_source_get_height(_source); + + // Listen to any audio the source spews out. + if (_audio_enabled) { + _signal_audio = std::make_shared(_source); + _signal_audio->event.add(std::bind(&mirror_instance::on_audio, this, std::placeholders::_1, + std::placeholders::_2, std::placeholders::_3)); + } + } catch (...) { + release(); } -} catch (...) { - release(); } void mirror_instance::release() @@ -306,15 +308,17 @@ void mirror_factory::get_defaults2(obs_data_t* data) } static bool modified_properties(obs_properties_t* pr, obs_property_t* p, obs_data_t* data) noexcept -try { - if (obs_properties_get(pr, ST_KEY_SOURCE_AUDIO) == p) { - bool show = obs_data_get_bool(data, ST_KEY_SOURCE_AUDIO); - obs_property_set_visible(obs_properties_get(pr, ST_KEY_SOURCE_AUDIO_LAYOUT), show); - return true; +{ + try { + if (obs_properties_get(pr, ST_KEY_SOURCE_AUDIO) == p) { + bool show = obs_data_get_bool(data, ST_KEY_SOURCE_AUDIO); + obs_property_set_visible(obs_properties_get(pr, ST_KEY_SOURCE_AUDIO_LAYOUT), show); + return true; + } + return false; + } catch (...) { + return false; } - return false; -} catch (...) { - return false; } obs_properties_t* mirror_factory::get_properties2(mirror_instance* data) @@ -384,28 +388,32 @@ obs_properties_t* mirror_factory::get_properties2(mirror_instance* data) #ifdef ENABLE_FRONTEND bool mirror_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _source_mirror_factory_instance; void streamfx::source::mirror::mirror_factory::initialize() -try { - if (!_source_mirror_factory_instance) - _source_mirror_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_source_mirror_factory_instance) + _source_mirror_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::source::mirror::mirror_factory::finalize() diff --git a/source/sources/source-shader.cpp b/source/sources/source-shader.cpp index c8098e3775..1a05c77c85 100644 --- a/source/sources/source-shader.cpp +++ b/source/sources/source-shader.cpp @@ -171,28 +171,32 @@ obs_properties_t* shader_factory::get_properties2(shader_instance* data) #ifdef ENABLE_FRONTEND bool shader_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _source_shader_factory_instance = nullptr; void streamfx::source::shader::shader_factory::initialize() -try { - if (!_source_shader_factory_instance) - _source_shader_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_source_shader_factory_instance) + _source_shader_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::source::shader::shader_factory::finalize() diff --git a/source/transitions/transition-shader.cpp b/source/transitions/transition-shader.cpp index 0dad6de860..fd914d636e 100644 --- a/source/transitions/transition-shader.cpp +++ b/source/transitions/transition-shader.cpp @@ -183,28 +183,32 @@ obs_properties_t* shader_factory::get_properties2(shader::shader_instance* data) #ifdef ENABLE_FRONTEND bool shader_factory::on_manual_open(obs_properties_t* props, obs_property_t* property, void* data) -try { - streamfx::open_url(HELP_URL); - return false; -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); - return false; -} catch (...) { - D_LOG_ERROR("Failed to open manual due to unknown error.", ""); - return false; +{ + try { + streamfx::open_url(HELP_URL); + return false; + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to open manual due to error: %s", ex.what()); + return false; + } catch (...) { + D_LOG_ERROR("Failed to open manual due to unknown error.", ""); + return false; + } } #endif std::shared_ptr _transition_shader_factory_instance = nullptr; void streamfx::transition::shader::shader_factory::initialize() -try { - if (!_transition_shader_factory_instance) - _transition_shader_factory_instance = std::make_shared(); -} catch (const std::exception& ex) { - D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); -} catch (...) { - D_LOG_ERROR("Failed to initialize due to unknown error.", ""); +{ + try { + if (!_transition_shader_factory_instance) + _transition_shader_factory_instance = std::make_shared(); + } catch (const std::exception& ex) { + D_LOG_ERROR("Failed to initialize due to error: %s", ex.what()); + } catch (...) { + D_LOG_ERROR("Failed to initialize due to unknown error.", ""); + } } void streamfx::transition::shader::shader_factory::finalize() diff --git a/source/updater.cpp b/source/updater.cpp index 932a9d8bbe..f4e82bc5c5 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -226,137 +226,140 @@ streamfx::version_info::operator std::string() } void streamfx::updater::task(streamfx::util::threadpool_data_t) -try { - auto query_fn = [this](std::vector& buffer) { - static constexpr std::string_view ST_API_URL = - "https://api.github.com/repos/Xaymar/obs-StreamFX/releases?per_page=25&page=1"; - - streamfx::util::curl curl; - size_t buffer_offset = 0; - - // Set headers (User-Agent is needed so Github can contact us!). - curl.set_header("User-Agent", "StreamFX Updater v" STREAMFX_VERSION_STRING); - curl.set_header("Accept", "application/vnd.github.v3+json"); - - // Set up request. - curl.set_option(CURLOPT_HTTPGET, true); // GET - curl.set_option(CURLOPT_POST, false); // Not POST - curl.set_option(CURLOPT_URL, ST_API_URL); - curl.set_option(CURLOPT_TIMEOUT, 30); // 10s until we fail. - - // Callbacks - curl.set_write_callback([this, &buffer, &buffer_offset](void* data, size_t s1, size_t s2) { - size_t size = s1 * s2; - if (buffer.size() < (size + buffer_offset)) - buffer.resize(buffer_offset + size); - - memcpy(buffer.data() + buffer_offset, data, size); - buffer_offset += size; - - return s1 * s2; - }); - //std::bind(&streamfx::updater::task_write_cb, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3) - - // Clear any unknown data and reserve 64KiB of memory. - buffer.clear(); - buffer.reserve(0xFFFF); - - // Finally, execute the request. - D_LOG_DEBUG("Querying for latest releases...", ""); - if (CURLcode res = curl.perform(); res != CURLE_OK) { - D_LOG_ERROR("Performing query failed with error: %s", curl_easy_strerror(res)); - throw std::runtime_error(curl_easy_strerror(res)); - } +{ + try { + auto query_fn = [this](std::vector& buffer) { + static constexpr std::string_view ST_API_URL = + "https://api.github.com/repos/Xaymar/obs-StreamFX/releases?per_page=25&page=1"; + + streamfx::util::curl curl; + size_t buffer_offset = 0; + + // Set headers (User-Agent is needed so Github can contact us!). + curl.set_header("User-Agent", "StreamFX Updater v" STREAMFX_VERSION_STRING); + curl.set_header("Accept", "application/vnd.github.v3+json"); + + // Set up request. + curl.set_option(CURLOPT_HTTPGET, true); // GET + curl.set_option(CURLOPT_POST, false); // Not POST + curl.set_option(CURLOPT_URL, ST_API_URL); + curl.set_option(CURLOPT_TIMEOUT, 30); // 10s until we fail. + + // Callbacks + curl.set_write_callback([this, &buffer, &buffer_offset](void* data, size_t s1, size_t s2) { + size_t size = s1 * s2; + if (buffer.size() < (size + buffer_offset)) + buffer.resize(buffer_offset + size); + + memcpy(buffer.data() + buffer_offset, data, size); + buffer_offset += size; + + return s1 * s2; + }); + //std::bind(&streamfx::updater::task_write_cb, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3) + + // Clear any unknown data and reserve 64KiB of memory. + buffer.clear(); + buffer.reserve(0xFFFF); + + // Finally, execute the request. + D_LOG_DEBUG("Querying for latest releases...", ""); + if (CURLcode res = curl.perform(); res != CURLE_OK) { + D_LOG_ERROR("Performing query failed with error: %s", curl_easy_strerror(res)); + throw std::runtime_error(curl_easy_strerror(res)); + } - int32_t status_code = 0; - if (CURLcode res = curl.get_info(CURLINFO_HTTP_CODE, status_code); res != CURLE_OK) { - D_LOG_ERROR("Retrieving status code failed with error: %s", curl_easy_strerror(res)); - throw std::runtime_error(curl_easy_strerror(res)); - } - D_LOG_DEBUG("API returned status code %d.", status_code); + int32_t status_code = 0; + if (CURLcode res = curl.get_info(CURLINFO_HTTP_CODE, status_code); res != CURLE_OK) { + D_LOG_ERROR("Retrieving status code failed with error: %s", curl_easy_strerror(res)); + throw std::runtime_error(curl_easy_strerror(res)); + } + D_LOG_DEBUG("API returned status code %d.", status_code); - if (status_code != 200) { - D_LOG_ERROR("API returned unexpected status code %d.", status_code); - throw std::runtime_error("Request failed due to one or more reasons."); - } - }; - auto parse_fn = [this](nlohmann::json json) { - // Check if it was parsed as an object. - if (json.type() != nlohmann::json::value_t::array) { - throw std::runtime_error("Invalid response from API."); - } + if (status_code != 200) { + D_LOG_ERROR("API returned unexpected status code %d.", status_code); + throw std::runtime_error("Request failed due to one or more reasons."); + } + }; + auto parse_fn = [this](nlohmann::json json) { + // Check if it was parsed as an object. + if (json.type() != nlohmann::json::value_t::array) { + throw std::runtime_error("Invalid response from API."); + } - // Decide on the latest version for all update channels. - std::lock_guard lock(_lock); - _updates.clear(); - for (auto obj : json) { - try { - auto info = obj.get(); - - switch (info.stage) { - case version_stage::STABLE: - if (get_update_info(version_stage::STABLE).is_older_than(info)) { - _updates.emplace(version_stage::STABLE, info); + // Decide on the latest version for all update channels. + std::lock_guard lock(_lock); + _updates.clear(); + for (auto obj : json) { + try { + auto info = obj.get(); + + switch (info.stage) { + case version_stage::STABLE: + if (get_update_info(version_stage::STABLE).is_older_than(info)) { + _updates.emplace(version_stage::STABLE, info); + } + [[fallthrough]]; + case version_stage::CANDIDATE: + if (get_update_info(version_stage::CANDIDATE).is_older_than(info)) { + _updates.emplace(version_stage::CANDIDATE, info); + } + [[fallthrough]]; + case version_stage::BETA: + if (get_update_info(version_stage::BETA).is_older_than(info)) { + _updates.emplace(version_stage::BETA, info); + } + [[fallthrough]]; + case version_stage::ALPHA: + if (get_update_info(version_stage::ALPHA).is_older_than(info)) { + _updates.emplace(version_stage::ALPHA, info); + } } - [[fallthrough]]; - case version_stage::CANDIDATE: - if (get_update_info(version_stage::CANDIDATE).is_older_than(info)) { - _updates.emplace(version_stage::CANDIDATE, info); - } - [[fallthrough]]; - case version_stage::BETA: - if (get_update_info(version_stage::BETA).is_older_than(info)) { - _updates.emplace(version_stage::BETA, info); - } - [[fallthrough]]; - case version_stage::ALPHA: - if (get_update_info(version_stage::ALPHA).is_older_than(info)) { - _updates.emplace(version_stage::ALPHA, info); - } - } - } catch (const std::exception& ex) { - D_LOG_DEBUG("Failed to parse entry, error: %s", ex.what()); + } catch (const std::exception& ex) { + D_LOG_DEBUG("Failed to parse entry, error: %s", ex.what()); + } } - } - }; - - { // Query and parse the response. - nlohmann::json json; - - // Query the API or parse a crafted response. - auto debug_path = streamfx::config_file_path("github_release_query_response.json"); - if (std::filesystem::exists(debug_path)) { - std::ifstream fs{debug_path}; - json = nlohmann::json::parse(fs); - fs.close(); - } else { - std::vector buffer; - query_fn(buffer); - json = nlohmann::json::parse(buffer.begin(), buffer.end()); + }; + + { // Query and parse the response. + nlohmann::json json; + + // Query the API or parse a crafted response. + auto debug_path = streamfx::config_file_path("github_release_query_response.json"); + if (std::filesystem::exists(debug_path)) { + std::ifstream fs{debug_path}; + json = nlohmann::json::parse(fs); + fs.close(); + } else { + std::vector buffer; + query_fn(buffer); + json = nlohmann::json::parse(buffer.begin(), buffer.end()); + } + + // Parse the JSON response from the API. + parse_fn(json); } - // Parse the JSON response from the API. - parse_fn(json); - } + // Print all update information to the log file. + D_LOG_INFO("Current Version: %s", static_cast(_current_info).c_str()); + D_LOG_INFO("Latest Stable Version: %s", + static_cast(get_update_info(version_stage::STABLE)).c_str()); + D_LOG_INFO("Latest Candidate Version: %s", + static_cast(get_update_info(version_stage::CANDIDATE)).c_str()); + D_LOG_INFO("Latest Beta Version: %s", static_cast(get_update_info(version_stage::BETA)).c_str()); + D_LOG_INFO("Latest Alpha Version: %s", static_cast(get_update_info(version_stage::ALPHA)).c_str()); + if (is_update_available()) { + D_LOG_INFO("Update is available.", ""); + } - // Print all update information to the log file. - D_LOG_INFO("Current Version: %s", static_cast(_current_info).c_str()); - D_LOG_INFO("Latest Stable Version: %s", static_cast(get_update_info(version_stage::STABLE)).c_str()); - D_LOG_INFO("Latest Candidate Version: %s", - static_cast(get_update_info(version_stage::CANDIDATE)).c_str()); - D_LOG_INFO("Latest Beta Version: %s", static_cast(get_update_info(version_stage::BETA)).c_str()); - D_LOG_INFO("Latest Alpha Version: %s", static_cast(get_update_info(version_stage::ALPHA)).c_str()); - if (is_update_available()) { - D_LOG_INFO("Update is available.", ""); + // Notify listeners of the update. + events.refreshed.call(*this); + } catch (const std::exception& ex) { + // Notify about the error. + std::string message = ex.what(); + events.error.call(*this, message); } - - // Notify listeners of the update. - events.refreshed.call(*this); -} catch (const std::exception& ex) { - // Notify about the error. - std::string message = ex.what(); - events.error.call(*this, message); } bool streamfx::updater::can_check() From de703867e638ef556e734c2bc85b796caaf1cd53 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 27 Aug 2022 13:15:30 +0200 Subject: [PATCH 092/164] encoder/ffmpeg: Drop support for broken FFmpeg versions This removes the Matroska fix for ProRes content, and upgrades from av_init_packet to av_packet_alloc. --- source/encoders/encoder-ffmpeg.cpp | 32 +++++++++---------- source/encoders/encoder-ffmpeg.hpp | 2 +- source/encoders/handlers/handler.hpp | 3 +- .../encoders/handlers/prores_aw_handler.cpp | 14 -------- .../encoders/handlers/prores_aw_handler.hpp | 2 -- 5 files changed, 19 insertions(+), 34 deletions(-) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 503cc3ffd1..78ab470503 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -130,8 +130,8 @@ ffmpeg_instance::ffmpeg_instance(obs_data_t* settings, obs_encoder_t* self, bool } // Allocate a small packet for later use. - av_init_packet(&_packet); - av_new_packet(&_packet, 8 * 1024 * 1024); // 8 MB precached Packet size. + _packet = {av_packet_alloc(), [](AVPacket* ptr) { av_packet_free(&ptr); }}; + av_new_packet(_packet.get(), 8 * 1024 * 1024); // 8 MiB is usually enough for compressed data. // Initialize if (is_hw) { @@ -158,7 +158,7 @@ ffmpeg_instance::~ffmpeg_instance() // Flush encoders that require it. if ((_codec->capabilities & AV_CODEC_CAP_DELAY) != 0) { avcodec_send_frame(_context, nullptr); - while (avcodec_receive_packet(_context, &_packet) >= 0) { + while (avcodec_receive_packet(_context, _packet.get()) >= 0) { avcodec_send_frame(_context, nullptr); std::this_thread::sleep_for(std::chrono::milliseconds(1)); } @@ -169,7 +169,7 @@ ffmpeg_instance::~ffmpeg_instance() avcodec_free_context(&_context); } - av_packet_unref(&_packet); + av_packet_unref(_packet.get()); _scaler.finalize(); } @@ -608,11 +608,11 @@ int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet { int res = 0; - av_packet_unref(&_packet); + av_packet_unref(_packet.get()); { auto gctx = streamfx::obs::gs::context(); - res = avcodec_receive_packet(_context, &_packet); + res = avcodec_receive_packet(_context, _packet.get()); } if (res != 0) { return res; @@ -625,7 +625,7 @@ int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet uint8_t* tmp_sei; std::size_t sz_packet, sz_header, sz_sei; - obs_extract_avc_headers(_packet.data, static_cast(_packet.size), &tmp_packet, &sz_packet, + obs_extract_avc_headers(_packet->data, static_cast(_packet->size), &tmp_packet, &sz_packet, &tmp_header, &sz_header, &tmp_sei, &sz_sei); if (sz_header) { @@ -646,7 +646,7 @@ int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet bfree(tmp_header); bfree(tmp_sei); } else if (_codec->id == AV_CODEC_ID_HEVC) { - hevc::extract_header_sei(_packet.data, static_cast(_packet.size), _extra_data, _sei_data); + hevc::extract_header_sei(_packet->data, static_cast(_packet->size), _extra_data, _sei_data); } else if (_context->extradata != nullptr) { _extra_data.resize(static_cast(_context->extradata_size)); std::memcpy(_extra_data.data(), _context->extradata, static_cast(_context->extradata_size)); @@ -660,25 +660,25 @@ int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet // Build packet for use in OBS. packet->type = OBS_ENCODER_VIDEO; - packet->pts = _packet.pts; - packet->dts = _packet.dts; - packet->data = _packet.data; - packet->size = static_cast(_packet.size); - packet->keyframe = !!(_packet.flags & AV_PKT_FLAG_KEY); + packet->pts = _packet->pts; + packet->dts = _packet->dts; + packet->data = _packet->data; + packet->size = static_cast(_packet->size); + packet->keyframe = !!(_packet->flags & AV_PKT_FLAG_KEY); *received_packet = true; // Figure out priority and drop_priority. // In theory, this is done by OBS, but its not doing a great job. packet->priority = packet->keyframe ? 3 : 2; packet->drop_priority = 3; - for (size_t idx = 0, edx = _packet.side_data_elems; idx < edx; idx++) { - auto& side_data = _packet.side_data[idx]; + for (size_t idx = 0, edx = _packet->side_data_elems; idx < edx; idx++) { + auto& side_data = _packet->side_data[idx]; if (side_data.type == AV_PKT_DATA_QUALITY_STATS) { // Decisions based on picture type, if present. switch (side_data.data[sizeof(uint32_t)]) { case AV_PICTURE_TYPE_I: // I-Frame case AV_PICTURE_TYPE_SI: // Switching I-Frame - if (_packet.flags & AV_PKT_FLAG_KEY) { + if (_packet->flags & AV_PKT_FLAG_KEY) { // Recovery only via IDR-Frame. packet->priority = 3; // OBS_NAL_PRIORITY_HIGHEST packet->drop_priority = 2; // OBS_NAL_PRIORITY_HIGH diff --git a/source/encoders/encoder-ffmpeg.hpp b/source/encoders/encoder-ffmpeg.hpp index 33182df13e..814402017a 100644 --- a/source/encoders/encoder-ffmpeg.hpp +++ b/source/encoders/encoder-ffmpeg.hpp @@ -58,7 +58,7 @@ namespace streamfx::encoder::ffmpeg { std::shared_ptr _handler; ::streamfx::ffmpeg::swscale _scaler; - AVPacket _packet; + std::shared_ptr _packet; std::shared_ptr<::streamfx::ffmpeg::hwapi::base> _hwapi; std::shared_ptr<::streamfx::ffmpeg::hwapi::instance> _hwinst; diff --git a/source/encoders/handlers/handler.hpp b/source/encoders/handlers/handler.hpp index b3bc772f30..383ed95cbb 100644 --- a/source/encoders/handlers/handler.hpp +++ b/source/encoders/handlers/handler.hpp @@ -81,7 +81,8 @@ namespace streamfx::encoder::ffmpeg { virtual void override_colorformat(AVPixelFormat& target_format, obs_data_t* settings, const AVCodec* codec, AVCodecContext* context){}; - virtual void process_avpacket(AVPacket& packet, const AVCodec* codec, AVCodecContext* context){}; + virtual void process_avpacket(std::shared_ptr packet, const AVCodec* codec, + AVCodecContext* context){}; }; } // namespace handler } // namespace streamfx::encoder::ffmpeg diff --git a/source/encoders/handlers/prores_aw_handler.cpp b/source/encoders/handlers/prores_aw_handler.cpp index e63681dbf8..5f117ec516 100644 --- a/source/encoders/handlers/prores_aw_handler.cpp +++ b/source/encoders/handlers/prores_aw_handler.cpp @@ -112,17 +112,3 @@ void prores_aw_handler::log_options(obs_data_t* settings, const AVCodec* codec, return std::string(""); }); } - -void prores_aw_handler::process_avpacket(AVPacket& packet, const AVCodec*, AVCodecContext*) -{ - //FFmpeg Bug: - // When ProRes content is stored in Matroska, FFmpeg strips the size - // from the atom. Later when the ProRes content is demuxed from Matroska, - // FFmpeg creates an atom with the incorrect size, as the ATOM size - // should be content + atom, but FFmpeg set it to only be content. This - // difference leads to decoders to be off by 8 bytes. - //Fix (until FFmpeg stops being broken): - // Pad the packet with 8 bytes of 0x00. - - av_grow_packet(&packet, 8); -} diff --git a/source/encoders/handlers/prores_aw_handler.hpp b/source/encoders/handlers/prores_aw_handler.hpp index a58630ba6f..35f557789d 100644 --- a/source/encoders/handlers/prores_aw_handler.hpp +++ b/source/encoders/handlers/prores_aw_handler.hpp @@ -56,7 +56,5 @@ namespace streamfx::encoder::ffmpeg::handler { public /*instance*/: void override_colorformat(AVPixelFormat& target_format, obs_data_t* settings, const AVCodec* codec, AVCodecContext* context) override; - - void process_avpacket(AVPacket& packet, const AVCodec* codec, AVCodecContext* context) override; }; } // namespace streamfx::encoder::ffmpeg::handler From 4fa26dd2d677e9e8383258f7ac88339f0ef6c781 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 13:44:00 +0200 Subject: [PATCH 093/164] code: Always initialize or cast to correct type --- source/encoders/codecs/h264.cpp | 4 ++-- source/encoders/encoder-aom-av1.cpp | 20 +++++++++---------- source/encoders/encoder-ffmpeg.cpp | 2 +- source/filters/filter-autoframing.cpp | 10 +++++++--- source/filters/filter-blur.cpp | 6 +++--- source/gfx/blur/gfx-blur-dual-filtering.cpp | 10 ++++++---- source/gfx/gfx-debug.cpp | 8 ++++---- source/nvidia/ar/nvidia-ar-feature.hpp | 2 +- .../nvidia/vfx/nvidia-vfx-superresolution.cpp | 6 +++--- source/obs/gs/gs-mipmapper.cpp | 6 ++++-- source/updater.cpp | 8 ++++---- source/util/util-logging.cpp | 2 +- source/util/util-platform.cpp | 8 ++++---- 13 files changed, 50 insertions(+), 42 deletions(-) diff --git a/source/encoders/codecs/h264.cpp b/source/encoders/codecs/h264.cpp index 5ca26e2a54..c69826ab7c 100644 --- a/source/encoders/codecs/h264.cpp +++ b/source/encoders/codecs/h264.cpp @@ -72,9 +72,9 @@ uint32_t streamfx::encoder::codec::h264::get_packet_reference_count(uint8_t* ptr // Try and figure out the ideal priority. switch (static_cast((*nal_ptr) & 0x5)) { case nal_unit_type::CODED_SLICE_NONIDR: - return (*nal_ptr >> 5) & 0x2; + return static_cast((*nal_ptr >> 5) & 0x2); case nal_unit_type::CODED_SLICE_IDR: - return (*nal_ptr >> 5) & 0x2; + return static_cast((*nal_ptr >> 5) & 0x2); default: break; } diff --git a/source/encoders/encoder-aom-av1.cpp b/source/encoders/encoder-aom-av1.cpp index b834e13f57..e66323a455 100644 --- a/source/encoders/encoder-aom-av1.cpp +++ b/source/encoders/encoder-aom-av1.cpp @@ -420,7 +420,7 @@ aom_av1_instance::aom_av1_instance(obs_data_t* settings, obs_encoder_t* self, bo if (auto threads = obs_data_get_int(settings, ST_KEY_ADVANCED_THREADS); threads > 0) { _settings.threads = static_cast(threads); } else { - _settings.threads = std::thread::hardware_concurrency(); + _settings.threads = static_cast(std::thread::hardware_concurrency()); } _settings.rowmultithreading = static_cast(obs_data_get_int(settings, ST_KEY_ADVANCED_ROWMULTITHREADING)); @@ -664,16 +664,16 @@ bool aom_av1_instance::update(obs_data_t* settings) } { // Rate Control - _settings.rc_bitrate = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_BITRATE)); + _settings.rc_bitrate = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_BITRATE)); _settings.rc_bitrate_overshoot = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_BITRATE_UNDERSHOOT)); _settings.rc_bitrate_undershoot = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_BITRATE_OVERSHOOT)); - _settings.rc_quality = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY)); + _settings.rc_quality = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_QUALITY)); _settings.rc_quantizer_min = - static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_QUANTIZER_MINIMUM)); + static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_QUANTIZER_MINIMUM)); _settings.rc_quantizer_max = - static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_QUANTIZER_MAXIMUM)); + static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_LIMITS_QUANTIZER_MAXIMUM)); _settings.rc_buffer_ms = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_BUFFER_SIZE)); _settings.rc_buffer_initial_ms = static_cast(obs_data_get_int(settings, ST_KEY_RATECONTROL_BUFFER_SIZE_INITIAL)); @@ -687,12 +687,12 @@ bool aom_av1_instance::update(obs_data_t* settings) _settings.kf_mode = AOM_KF_AUTO; if (is_seconds) { - _settings.kf_distance_max = static_cast( + _settings.kf_distance_max = static_cast( std::lround(obs_data_get_double(settings, ST_KEY_KEYFRAMES_INTERVAL_SECONDS) * static_cast(obsFPSnum) / static_cast(obsFPSden))); } else { _settings.kf_distance_max = - static_cast(obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVAL_FRAMES)); + static_cast(obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVAL_FRAMES)); } _settings.kf_distance_min = _settings.kf_distance_max; } @@ -719,15 +719,15 @@ bool aom_av1_instance::update(obs_data_t* settings) _cfg.g_h = _settings.height; // Time Base (Rate is inverted Time Base) - _cfg.g_timebase.num = _settings.fps.den; - _cfg.g_timebase.den = _settings.fps.num; + _cfg.g_timebase.num = static_cast(_settings.fps.den); + _cfg.g_timebase.den = static_cast(_settings.fps.num); // !INFO: Whenever OBS decides to support anything but 8-bits, let me know. _cfg.g_bit_depth = AOM_BITS_8; _cfg.g_input_bit_depth = AOM_BITS_8; // Monochrome color - _cfg.monochrome = _settings.monochrome ? 1 : 0; + _cfg.monochrome = _settings.monochrome ? 1u : 0u; } { // Encoder diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 78ab470503..18726c844f 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -671,7 +671,7 @@ int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet // In theory, this is done by OBS, but its not doing a great job. packet->priority = packet->keyframe ? 3 : 2; packet->drop_priority = 3; - for (size_t idx = 0, edx = _packet->side_data_elems; idx < edx; idx++) { + for (size_t idx = 0, edx = static_cast(_packet->side_data_elems); idx < edx; idx++) { auto& side_data = _packet->side_data[idx]; if (side_data.type == AV_PKT_DATA_QUALITY_STATS) { // Decisions based on picture type, if present. diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index 4b7e3b05f8..dd79ba5135 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -212,7 +212,7 @@ autoframing_instance::autoframing_instance(obs_data_t* data, obs_source_t* self) std::make_shared<::streamfx::obs::gs::effect>(::streamfx::data_file_path("effects/standard.effect")); // Create the Vertex Buffer for rendering. - _vb = std::make_shared<::streamfx::obs::gs::vertex_buffer>(4u, 1u); + _vb = std::make_shared<::streamfx::obs::gs::vertex_buffer>(uint32_t{4}, uint8_t{1}); vec3_set(_vb->at(0).position, 0, 0, 0); vec3_set(_vb->at(1).position, 1, 0, 0); vec3_set(_vb->at(2).position, 0, 1, 0); @@ -432,9 +432,13 @@ void autoframing_instance::video_tick(float_t seconds) _out_size = _size; if (_frame_aspect_ratio > 0.0) { if (width > height) { - _out_size.first = std::lroundf(static_cast(_out_size.second) * _frame_aspect_ratio); + _out_size.first = + static_cast(std::lroundf(static_cast(_out_size.second) * _frame_aspect_ratio), 0, + std::numeric_limits::max()); } else { - _out_size.second = std::lroundf(static_cast(_out_size.first) * _frame_aspect_ratio); + _out_size.second = + static_cast(std::lroundf(static_cast(_out_size.first) * _frame_aspect_ratio), 0, + std::numeric_limits::max()); } } } diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 64c8e77c3a..5156f217c0 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -331,9 +331,9 @@ void blur_instance::update(obs_data_t* settings) } if ((_mask.type == mask_type::Image) || (_mask.type == mask_type::Source)) { uint32_t color = static_cast(obs_data_get_int(settings, ST_KEY_MASK_COLOR)); - _mask.color.r = ((color >> 0) & 0xFF) / 255.0f; - _mask.color.g = ((color >> 8) & 0xFF) / 255.0f; - _mask.color.b = ((color >> 16) & 0xFF) / 255.0f; + _mask.color.r = static_cast((color >> 0) & 0xFF) / 255.0f; + _mask.color.g = static_cast((color >> 8) & 0xFF) / 255.0f; + _mask.color.b = static_cast((color >> 16) & 0xFF) / 255.0f; _mask.color.a = static_cast(obs_data_get_double(settings, ST_KEY_MASK_ALPHA)); _mask.multiplier = float_t(obs_data_get_double(settings, ST_KEY_MASK_MULTIPLIER)); } diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index 6cddb3ecf4..f4cc372baf 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -279,8 +279,9 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::dual_filterin // Apply effect.get_parameter("pImage").set_texture(tex); - effect.get_parameter("pImageSize").set_float2(float_t(owidth), float_t(oheight)); - effect.get_parameter("pImageTexel").set_float2(0.5f / owidth, 0.5f / oheight); + effect.get_parameter("pImageSize").set_float2(static_cast(owidth), static_cast(oheight)); + effect.get_parameter("pImageTexel") + .set_float2(0.5f / static_cast(owidth), 0.5f / static_cast(oheight)); { auto op = _rts[n]->render(owidth, oheight); @@ -308,8 +309,9 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::dual_filterin // Apply effect.get_parameter("pImage").set_texture(tex); - effect.get_parameter("pImageSize").set_float2(float_t(iwidth), float_t(iheight)); - effect.get_parameter("pImageTexel").set_float2(0.5f / iwidth, 0.5f / iheight); + effect.get_parameter("pImageSize").set_float2(static_cast(iwidth), static_cast(iheight)); + effect.get_parameter("pImageTexel") + .set_float2(0.5f / static_cast(iwidth), 0.5f / static_cast(iheight)); { auto op = _rts[n - 1]->render(owidth, oheight); diff --git a/source/gfx/gfx-debug.cpp b/source/gfx/gfx-debug.cpp index 5ce77d3aa5..77eb8ce831 100644 --- a/source/gfx/gfx-debug.cpp +++ b/source/gfx/gfx-debug.cpp @@ -80,7 +80,7 @@ void streamfx::gfx::debug::draw_point(float x, float y, uint32_t color) obs::gs::context gctx{}; if (!_point_vb) { - _point_vb = std::make_shared(1u, 1u); + _point_vb = std::make_shared(uint32_t{1}, uint8_t{1}); } { @@ -102,7 +102,7 @@ void streamfx::gfx::debug::draw_line(float x, float y, float x2, float y2, uint3 obs::gs::context gctx{}; if (!_line_vb) { - _line_vb = std::make_shared(2u, 1u); + _line_vb = std::make_shared(uint32_t{2}, uint8_t{1}); } { @@ -130,7 +130,7 @@ void streamfx::gfx::debug::draw_arrow(float x, float y, float x2, float y2, floa obs::gs::context gctx{}; if (!_arrow_vb) { - _arrow_vb = std::make_shared(5u, 1u); + _arrow_vb = std::make_shared(uint32_t{5}, uint8_t{1}); } float dx = x2 - x; @@ -198,7 +198,7 @@ void streamfx::gfx::debug::draw_rectangle(float x, float y, float w, float h, bo obs::gs::context gctx{}; if (!_quad_vb) { - _quad_vb = std::make_shared(5u, 1u); + _quad_vb = std::make_shared(uint32_t{5}, uint8_t{1}); } if (frame) { diff --git a/source/nvidia/ar/nvidia-ar-feature.hpp b/source/nvidia/ar/nvidia-ar-feature.hpp index 773591ecd2..44cda225e7 100644 --- a/source/nvidia/ar/nvidia-ar-feature.hpp +++ b/source/nvidia/ar/nvidia-ar-feature.hpp @@ -104,7 +104,7 @@ namespace streamfx::nvidia::ar { result = _nvar->NvAR_GetF32Array(_fx.get(), param, &data, &size); - value.resize(size); + value.resize(static_cast(size)); memcpy(value.data(), data, size * sizeof(float)); return result; diff --git a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp index 57e89a7143..eefc9f3003 100644 --- a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp +++ b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp @@ -114,7 +114,7 @@ void streamfx::nvidia::vfx::superresolution::set_strength(float strength) _dirty = true; // Update Effect - uint32_t value = (_strength >= .5f) ? 1 : 0; + uint32_t value = (_strength >= .5f) ? 1u : 0u; auto gctx = ::streamfx::obs::gs::context(); auto cctx = ::streamfx::nvidia::cuda::obs::get()->get_context()->enter(); if (auto res = set(::streamfx::nvidia::vfx::PARAMETER_STRENGTH, value); @@ -198,8 +198,8 @@ void streamfx::nvidia::vfx::superresolution::size(std::pair } // Calculate Output Size. - output_size.first = static_cast(std::lround(input_size.first * _scale)); - output_size.second = static_cast(std::lround(input_size.second * _scale)); + output_size.first = static_cast(std::lround(static_cast(input_size.first) * _scale)); + output_size.second = static_cast(std::lround(static_cast(input_size.second) * _scale)); // Verify that this is a valid scale factor. float width_mul = (static_cast(output_size.first) / static_cast(input_size.first)); diff --git a/source/obs/gs/gs-mipmapper.cpp b/source/obs/gs/gs-mipmapper.cpp index 8e9d309575..b9eada3a63 100644 --- a/source/obs/gs/gs-mipmapper.cpp +++ b/source/obs/gs/gs-mipmapper.cpp @@ -168,7 +168,8 @@ void opengl_copy_subregion(opengl_info& info, std::shared_ptr(mip_level), 0, 0, 0, 0, static_cast(width), + static_cast(height)); D_OPENGL_CHECK_ERROR("glCopyTexSubImage2D(GL_TEXTURE_2D, mip_level, 0, 0, 0, 0, width, height);"); // Target -/-> Texture Unit 1 @@ -212,7 +213,8 @@ streamfx::obs::gs::mipmapper::mipmapper() uint32_t streamfx::obs::gs::mipmapper::calculate_max_mip_level(uint32_t width, uint32_t height) { - return static_cast(1 + std::lroundl(floor(log2(std::max(width, height))))); + return static_cast( + 1 + std::lroundl(floor(log2(std::max(static_cast(width), static_cast(height)))))); } void streamfx::obs::gs::mipmapper::rebuild(std::shared_ptr source, diff --git a/source/updater.cpp b/source/updater.cpp index f4e82bc5c5..75d14c1bed 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -215,12 +215,12 @@ streamfx::version_info::operator std::string() { std::vector buffer(25, 0); if (stage != version_stage::STABLE) { - auto types = stage_to_string(stage); - size_t len = snprintf(buffer.data(), buffer.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, major, - minor, patch, types.data(), tweak); + auto types = stage_to_string(stage); + int len = snprintf(buffer.data(), buffer.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16 "%.1s%" PRIu16, major, + minor, patch, types.data(), tweak); return std::string(buffer.data(), buffer.data() + len); } else { - size_t len = snprintf(buffer.data(), buffer.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16, major, minor, patch); + int len = snprintf(buffer.data(), buffer.size(), "%" PRIu16 ".%" PRIu16 ".%" PRIu16, major, minor, patch); return std::string(buffer.data(), buffer.data() + len); } } diff --git a/source/util/util-logging.cpp b/source/util/util-logging.cpp index 8c3cfa7048..0164913652 100644 --- a/source/util/util-logging.cpp +++ b/source/util/util-logging.cpp @@ -37,7 +37,7 @@ void streamfx::util::logging::log(level lvl, const char* format, ...) va_list vargs_copy; va_copy(vargs_copy, vargs); int32_t ret = vsnprintf(buffer.data(), buffer.size(), format, vargs); - buffer.resize(ret + 1); + buffer.resize(static_cast(ret) + 1); ret = vsnprintf(buffer.data(), buffer.size(), format, vargs_copy); va_end(vargs); diff --git a/source/util/util-platform.cpp b/source/util/util-platform.cpp index 56e63f507c..0fe41e9476 100644 --- a/source/util/util-platform.cpp +++ b/source/util/util-platform.cpp @@ -45,8 +45,8 @@ std::string streamfx::util::platform::native_to_utf8(std::wstring const& v) { std::vector buffer((v.length() + 1) * 4, 0); - DWORD res = WideCharToMultiByte(CP_UTF8, 0, v.c_str(), static_cast(v.length()), buffer.data(), - static_cast(buffer.size()), nullptr, nullptr); + int res = WideCharToMultiByte(CP_UTF8, 0, v.c_str(), static_cast(v.length()), buffer.data(), + static_cast(buffer.size()), nullptr, nullptr); if (res == 0) { D_LOG_WARNING("Failed to convert '%ls' to UTF-8 format.", v.c_str()); throw std::runtime_error("Failed to convert Windows-native to UTF-8."); @@ -66,8 +66,8 @@ std::wstring streamfx::util::platform::utf8_to_native(std::string const& v) { std::vector buffer(v.length() + 1, 0); - DWORD res = MultiByteToWideChar(CP_UTF8, 0, v.c_str(), static_cast(v.length()), buffer.data(), - static_cast(buffer.size())); + int res = MultiByteToWideChar(CP_UTF8, 0, v.c_str(), static_cast(v.length()), buffer.data(), + static_cast(buffer.size())); if (res == 0) { D_LOG_WARNING("Failed to convert '%s' to native format.", v.c_str()); throw std::runtime_error("Failed to convert UTF-8 to Windows-native."); From badca28a08136f0b8e094c4c13eb6ef5fe3d7236 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 14:53:03 +0200 Subject: [PATCH 094/164] updater: Don't pass unused variables into lambda captures --- source/updater.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/updater.cpp b/source/updater.cpp index 75d14c1bed..47f3553fed 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -228,7 +228,7 @@ streamfx::version_info::operator std::string() void streamfx::updater::task(streamfx::util::threadpool_data_t) { try { - auto query_fn = [this](std::vector& buffer) { + auto query_fn = [](std::vector& buffer) { static constexpr std::string_view ST_API_URL = "https://api.github.com/repos/Xaymar/obs-StreamFX/releases?per_page=25&page=1"; @@ -246,7 +246,7 @@ void streamfx::updater::task(streamfx::util::threadpool_data_t) curl.set_option(CURLOPT_TIMEOUT, 30); // 10s until we fail. // Callbacks - curl.set_write_callback([this, &buffer, &buffer_offset](void* data, size_t s1, size_t s2) { + curl.set_write_callback([&buffer, &buffer_offset](void* data, size_t s1, size_t s2) { size_t size = s1 * s2; if (buffer.size() < (size + buffer_offset)) buffer.resize(buffer_offset + size); From 0aca1fc1328bff78105f0aed26e90b2b1fdde1b1 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 14:55:40 +0200 Subject: [PATCH 095/164] code: Always provide a default case for enumerations --- source/encoders/encoder-aom-av1.cpp | 8 +++++++- source/filters/filter-virtual-greenscreen.cpp | 2 ++ source/gfx/lut/gfx-lut-producer.cpp | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/encoders/encoder-aom-av1.cpp b/source/encoders/encoder-aom-av1.cpp index e66323a455..d85f628468 100644 --- a/source/encoders/encoder-aom-av1.cpp +++ b/source/encoders/encoder-aom-av1.cpp @@ -358,7 +358,7 @@ aom_av1_instance::aom_av1_instance(obs_data_t* settings, obs_encoder_t* self, bo _settings.color_format = AOM_IMG_FMT_I444; break; default: - throw std::runtime_error("Something went wrong figuring out our color format."); + throw std::runtime_error("Color Format is unknown."); } // Color Space @@ -378,6 +378,8 @@ aom_av1_instance::aom_av1_instance(obs_data_t* settings, obs_encoder_t* self, bo _settings.color_trc = AOM_CICP_TC_SRGB; _settings.color_matrix = AOM_CICP_MC_BT_709; break; + default: + throw std::runtime_error("Color Space is unknown."); } // Color Range @@ -388,6 +390,8 @@ aom_av1_instance::aom_av1_instance(obs_data_t* settings, obs_encoder_t* self, bo case VIDEO_RANGE_PARTIAL: _settings.color_range = AOM_CR_STUDIO_RANGE; break; + default: + throw std::runtime_error("Color Range is unknown."); } // Monochrome @@ -1040,6 +1044,8 @@ void aom_av1_instance::get_video_info(struct video_scale_info* info) D_LOG_WARNING("Color-format '%s' is not supported, forcing 'I444'...", obs_video_format_to_string(format)); info->format = VIDEO_FORMAT_I444; break; + default: + throw std::runtime_error("Color Format is unknown."); } // Fix up color space. diff --git a/source/filters/filter-virtual-greenscreen.cpp b/source/filters/filter-virtual-greenscreen.cpp index d67f1e6f76..32d8f5419c 100644 --- a/source/filters/filter-virtual-greenscreen.cpp +++ b/source/filters/filter-virtual-greenscreen.cpp @@ -325,6 +325,8 @@ void virtual_greenscreen_instance::video_render(gs_effect_t* effect) nvvfxgs_process(_output_color, _output_alpha); break; #endif + default: + break; } } catch (...) { obs_source_skip_video_filter(_self); diff --git a/source/gfx/lut/gfx-lut-producer.cpp b/source/gfx/lut/gfx-lut-producer.cpp index 99bf7ec868..60f2057475 100644 --- a/source/gfx/lut/gfx-lut-producer.cpp +++ b/source/gfx/lut/gfx-lut-producer.cpp @@ -36,8 +36,9 @@ gs_color_format format_from_depth(streamfx::gfx::lut::color_depth depth) case streamfx::gfx::lut::color_depth::_14: case streamfx::gfx::lut::color_depth::_16: return gs_color_format::GS_RGBA16; + default: + return GS_RGBA32F; } - return GS_RGBA32F; } streamfx::gfx::lut::producer::producer() From 24a19c2ed3b54dc0f7fff9aee8fecc808e5c7deb Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 15:49:21 +0200 Subject: [PATCH 096/164] ffmpeg/tools: Revert #836 It is not valid to pass std::string_view to snprintf's %s. --- source/ffmpeg/tools.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index fc65be428e..7f94303b5e 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -367,10 +367,11 @@ void tools::print_av_option_bool(AVCodecContext* ctx_codec, void* ctx_option, co { int64_t v = 0; if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text, + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.data(), streamfx::ffmpeg::tools::get_error_description(err)); } else { - DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text, (inverse ? v != 0 : v == 0) ? "Disabled" : "Enabled", + DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.data(), + (inverse ? v != 0 : v == 0) ? "Disabled" : "Enabled", av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " " : ""); } } @@ -388,13 +389,14 @@ void tools::print_av_option_int(AVCodecContext* ctx_codec, void* ctx_option, con bool is_default = av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0; if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) { if (is_default) { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text); + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.data()); } else { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text, + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.data(), streamfx::ffmpeg::tools::get_error_description(err)); } } else { - DLOG_INFO("[%s] %s: %" PRId64 " %s%s", ctx_codec->codec->name, text, v, suffix, is_default ? " " : ""); + DLOG_INFO("[%s] %s: %" PRId64 " %s%s", ctx_codec->codec->name, text.data(), v, suffix.data(), + is_default ? " " : ""); } } @@ -409,13 +411,13 @@ void tools::print_av_option_string(AVCodecContext* ctx_codec, void* ctx_option, { int64_t v = 0; if (int err = av_opt_get_int(ctx_option, option, AV_OPT_SEARCH_CHILDREN, &v); err != 0) { - DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text, + DLOG_INFO("[%s] %s: ", ctx_codec->codec->name, text.data(), streamfx::ffmpeg::tools::get_error_description(err)); } else { std::string name = ""; if (decoder) name = decoder(v); - DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text, name.c_str(), + DLOG_INFO("[%s] %s: %s%s", ctx_codec->codec->name, text.data(), name.c_str(), av_opt_is_set_to_default_by_name(ctx_option, option, AV_OPT_SEARCH_CHILDREN) > 0 ? " " : ""); } } From b9d8583d58d7d3124960ceabae085dedd27caaf4 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 15:53:01 +0200 Subject: [PATCH 097/164] code: (sn)printf automatically zero-terminates strings --- source/encoders/handlers/dnxhd_handler.cpp | 2 +- source/encoders/handlers/nvenc_h264_handler.cpp | 2 +- source/encoders/handlers/nvenc_hevc_handler.cpp | 4 ++-- source/encoders/handlers/nvenc_shared.cpp | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp index f8c8fd3be9..0c18a936b0 100644 --- a/source/encoders/handlers/dnxhd_handler.cpp +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -56,7 +56,7 @@ bool dnxhd_handler::has_pixel_format_support(ffmpeg_factory* instance) inline const char* dnx_profile_to_display_name(const char* profile) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_DNXHR_PROFILE, profile); + snprintf(buffer, sizeof(buffer), "%s.%s", S_CODEC_DNXHR_PROFILE, profile); return D_TRANSLATE(buffer); } diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index a4ddac33ec..0e32b6c2b1 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -143,7 +143,7 @@ void nvenc_h264_handler::get_encoder_properties(obs_properties_t* props, const A streamfx::ffmpeg::tools::avoption_list_add_entries( context->priv_data, "profile", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_H264_PROFILE, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", S_CODEC_H264_PROFILE, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index 570f8f264f..7c7767499a 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -146,7 +146,7 @@ void nvenc_hevc_handler::get_encoder_properties(obs_properties_t* props, const A streamfx::ffmpeg::tools::avoption_list_add_entries( context->priv_data, "profile", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_HEVC_PROFILE, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", S_CODEC_HEVC_PROFILE, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } @@ -156,7 +156,7 @@ void nvenc_hevc_handler::get_encoder_properties(obs_properties_t* props, const A obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DEFAULT), -1); streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tier", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", S_CODEC_HEVC_TIER, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", S_CODEC_HEVC_TIER, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index a12445b457..4f978ec354 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -256,7 +256,7 @@ void nvenc::get_properties_pre(obs_properties_t* props, const AVCodec*, const AV OBS_COMBO_FORMAT_STRING); streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "preset", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_PRESET, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", ST_I18N_PRESET, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } @@ -266,7 +266,7 @@ void nvenc::get_properties_pre(obs_properties_t* props, const AVCodec*, const AV OBS_COMBO_FORMAT_STRING); streamfx::ffmpeg::tools::avoption_list_add_entries(context->priv_data, "tune", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_TUNE, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", ST_I18N_TUNE, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } @@ -293,7 +293,7 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec, c return; char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_RATECONTROL_MODE, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", ST_I18N_RATECONTROL_MODE, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } @@ -306,7 +306,7 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec, c streamfx::ffmpeg::tools::avoption_list_add_entries( context->priv_data, "multipass", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_RATECONTROL_MULTIPASS, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", ST_I18N_RATECONTROL_MULTIPASS, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } else { @@ -441,7 +441,7 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec, c streamfx::ffmpeg::tools::avoption_list_add_entries( context->priv_data, "b_ref_mode", [&p](const AVOption* opt) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "%s.%s\0", ST_I18N_OTHER_BFRAMEREFERENCEMODE, opt->name); + snprintf(buffer, sizeof(buffer), "%s.%s", ST_I18N_OTHER_BFRAMEREFERENCEMODE, opt->name); obs_property_list_add_string(p, D_TRANSLATE(buffer), opt->name); }); } From 4e41c5cf248c9be09d54dd5947d8f3ead4df25e0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 29 Aug 2022 10:43:33 +0200 Subject: [PATCH 098/164] code: Revert #836 The compiler will choose the optimal way automatically, and forcing std::move here actually results in two objects existing side by side, before being "moved" into one. --- source/ffmpeg/hwapi/d3d11.cpp | 2 +- source/ffmpeg/tools.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index d215ff5282..af27314aa0 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -99,7 +99,7 @@ std::list d3d11::enumerate_adapters() adapters.push_back(dev); } - return std::move(adapters); + return adapters; } std::shared_ptr d3d11::create(const device& target) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 7f94303b5e..013be635fb 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -280,7 +280,7 @@ std::vector tools::get_software_formats(const AVPixelFormat* list fmts.push_back(AV_PIX_FMT_NONE); - return std::move(fmts); + return fmts; } void tools::context_setup_from_obs(const video_output_info* voi, AVCodecContext* context) From 8e52bbf88b9935e7bc9952eb2d4076dd00929ccc Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 28 Aug 2022 14:28:37 +0200 Subject: [PATCH 099/164] code: Ignore warnings from external code May need to find a better solution such as disabling all warnings on third party code. --- .clang-format | 16 +++++----- source/common.hpp | 17 +++++++---- source/encoders/encoder-aom-av1.hpp | 17 +++++++++++ source/encoders/encoder-ffmpeg.cpp | 30 ++++++++++++++++++- source/encoders/encoder-ffmpeg.hpp | 8 +++-- source/encoders/handlers/amf_h264_handler.cpp | 10 ++++++- source/encoders/handlers/amf_h264_handler.hpp | 14 ++++++++- source/encoders/handlers/amf_hevc_handler.cpp | 13 ++++++-- source/encoders/handlers/amf_hevc_handler.hpp | 14 ++++++++- source/encoders/handlers/amf_shared.cpp | 14 ++++++++- source/encoders/handlers/amf_shared.hpp | 10 ++++++- source/encoders/handlers/debug_handler.cpp | 16 ++++++++-- source/encoders/handlers/dnxhd_handler.cpp | 5 +--- source/encoders/handlers/dnxhd_handler.hpp | 14 ++++++++- source/encoders/handlers/handler.hpp | 14 ++++++++- .../encoders/handlers/nvenc_h264_handler.cpp | 12 ++++++-- .../encoders/handlers/nvenc_h264_handler.hpp | 14 ++++++++- .../encoders/handlers/nvenc_hevc_handler.cpp | 16 ++++++++-- .../encoders/handlers/nvenc_hevc_handler.hpp | 14 ++++++++- source/encoders/handlers/nvenc_shared.cpp | 14 ++++++++- .../encoders/handlers/prores_aw_handler.cpp | 5 +--- .../encoders/handlers/prores_aw_handler.hpp | 14 ++++++++- source/ffmpeg/avframe-queue.hpp | 7 ++++- source/ffmpeg/hwapi/base.hpp | 7 ++++- source/ffmpeg/hwapi/d3d11.cpp | 15 ++++++---- source/ffmpeg/hwapi/d3d11.hpp | 7 ++++- source/ffmpeg/swscale.hpp | 7 ++++- source/ffmpeg/tools.cpp | 11 ++++++- source/ffmpeg/tools.hpp | 7 ++++- source/gfx/blur/gfx-blur-box-linear.cpp | 11 +------ source/gfx/blur/gfx-blur-box.cpp | 11 +------ source/gfx/blur/gfx-blur-dual-filtering.cpp | 11 +------ source/gfx/blur/gfx-blur-gaussian-linear.cpp | 11 +------ source/gfx/blur/gfx-blur-gaussian.cpp | 11 +------ source/gfx/gfx-opengl.cpp | 15 ++++++++++ .../gfx/shader/gfx-shader-param-texture.hpp | 2 +- source/nvidia/ar/nvidia-ar.cpp | 15 ++++++++++ source/nvidia/cuda/nvidia-cuda-context.cpp | 10 ++++++- source/nvidia/cuda/nvidia-cuda.hpp | 15 ++++++++-- source/nvidia/cv/nvidia-cv.cpp | 15 ++++++++++ source/nvidia/cv/nvidia-cv.hpp | 15 ++++++++-- source/nvidia/vfx/nvidia-vfx.cpp | 15 ++++++++++ source/obs/gs/gs-effect-parameter.cpp | 10 ++++++- source/obs/gs/gs-effect-pass.cpp | 10 ++++++- source/obs/gs/gs-effect-technique.cpp | 10 ++++++- source/sources/source-mirror.cpp | 10 ++++++- source/ui/ui-about-entry.hpp | 10 +++++-- source/ui/ui-about.cpp | 18 +++++++---- source/ui/ui-about.hpp | 7 ++++- source/ui/ui-common.hpp | 29 +++++++++++++++--- source/ui/ui-updater.hpp | 8 +++-- source/ui/ui.cpp | 4 +-- source/ui/ui.hpp | 2 +- source/updater.hpp | 19 +++++++++++- source/util/util-curl.hpp | 15 ++++++++++ source/util/utility.cpp | 12 +------- source/util/utility.hpp | 10 ++++++- templates/module.cpp.in | 11 ++----- 58 files changed, 549 insertions(+), 155 deletions(-) diff --git a/.clang-format b/.clang-format index 10ca177bb3..2ed0c10b2e 100644 --- a/.clang-format +++ b/.clang-format @@ -2,11 +2,11 @@ TabWidth: 4 UseTab: ForContinuationAndIndentation ColumnLimit: 120 - + # Language Language: Cpp Standard: Cpp11 - + # Indentation AccessModifierOffset: 0 ConstructorInitializerIndentWidth: 4 @@ -16,11 +16,11 @@ IndentCaseLabels: false IndentWidth: 4 IndentWrappedFunctionNames: true NamespaceIndentation: All - + # Includes #IncludeBlocks: Regroup IncludeCategories: - - Regex: '^(<|")(config.hpp|common.hpp|strings.hpp|version.hpp|obs.h)("|>)' + - Regex: '^(<|")(config.hpp|common.hpp|ui-common.hpp|strings.hpp|version.hpp|obs.h)("|>)' Priority: 100 - Regex: '^ @@ -79,13 +85,14 @@ extern "C" { #include #include - -// Fix libOBS's global defines -#undef strtoll - #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif + +// Fix libOBS's global defines +#undef strtoll } // Common Global defines diff --git a/source/encoders/encoder-aom-av1.hpp b/source/encoders/encoder-aom-av1.hpp index f8380bc1c5..fba31a7059 100644 --- a/source/encoders/encoder-aom-av1.hpp +++ b/source/encoders/encoder-aom-av1.hpp @@ -31,7 +31,24 @@ #include "util/util-library.hpp" #include "util/util-profiler.hpp" +extern "C" { +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif +}; namespace streamfx::encoder::aom::av1 { class aom_av1_factory; diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 18726c844f..a47da31fa3 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -47,15 +47,43 @@ #endif extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include #include #include #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } #ifdef WIN32 diff --git a/source/encoders/encoder-ffmpeg.hpp b/source/encoders/encoder-ffmpeg.hpp index 814402017a..ac7659e781 100644 --- a/source/encoders/encoder-ffmpeg.hpp +++ b/source/encoders/encoder-ffmpeg.hpp @@ -37,13 +37,17 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif -#include #include #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/encoders/handlers/amf_h264_handler.cpp b/source/encoders/handlers/amf_h264_handler.cpp index 5201824d2f..838bac1f6c 100644 --- a/source/encoders/handlers/amf_h264_handler.cpp +++ b/source/encoders/handlers/amf_h264_handler.cpp @@ -30,11 +30,19 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/encoders/handlers/amf_h264_handler.hpp b/source/encoders/handlers/amf_h264_handler.hpp index 6a963f0b4d..a6a0104a3c 100644 --- a/source/encoders/handlers/amf_h264_handler.hpp +++ b/source/encoders/handlers/amf_h264_handler.hpp @@ -26,10 +26,22 @@ #include "handler.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/amf_hevc_handler.cpp b/source/encoders/handlers/amf_hevc_handler.cpp index 4f1d323783..44a8f6ec4d 100644 --- a/source/encoders/handlers/amf_hevc_handler.cpp +++ b/source/encoders/handlers/amf_hevc_handler.cpp @@ -22,6 +22,7 @@ //--------------------------------------------------------------------------------// #include "amf_hevc_handler.hpp" +#include "common.hpp" #include "strings.hpp" #include "../codecs/hevc.hpp" #include "../encoder-ffmpeg.hpp" @@ -30,11 +31,19 @@ #include "plugin.hpp" extern "C" { -#include +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } // Settings diff --git a/source/encoders/handlers/amf_hevc_handler.hpp b/source/encoders/handlers/amf_hevc_handler.hpp index 1cd537ec7e..cb87b4c990 100644 --- a/source/encoders/handlers/amf_hevc_handler.hpp +++ b/source/encoders/handlers/amf_hevc_handler.hpp @@ -25,10 +25,22 @@ #include "handler.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/amf_shared.cpp b/source/encoders/handlers/amf_shared.cpp index 0d4e4bfffc..df78e900e0 100644 --- a/source/encoders/handlers/amf_shared.cpp +++ b/source/encoders/handlers/amf_shared.cpp @@ -27,10 +27,22 @@ #include "ffmpeg/tools.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } // Translation diff --git a/source/encoders/handlers/amf_shared.hpp b/source/encoders/handlers/amf_shared.hpp index 2e4adfadef..a2cc5b73a6 100644 --- a/source/encoders/handlers/amf_shared.hpp +++ b/source/encoders/handlers/amf_shared.hpp @@ -28,11 +28,19 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/encoders/handlers/debug_handler.cpp b/source/encoders/handlers/debug_handler.cpp index 2de298adb2..f3588b7036 100644 --- a/source/encoders/handlers/debug_handler.cpp +++ b/source/encoders/handlers/debug_handler.cpp @@ -20,6 +20,7 @@ // SOFTWARE. #include "debug_handler.hpp" +#include "common.hpp" #include #include #include @@ -28,11 +29,22 @@ #include "plugin.hpp" extern "C" { -#include +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } using namespace streamfx::encoder::ffmpeg::handler; diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp index 0c18a936b0..c00e03e41d 100644 --- a/source/encoders/handlers/dnxhd_handler.cpp +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -1,13 +1,10 @@ #include "dnxhd_handler.hpp" +#include "common.hpp" #include #include "../codecs/dnxhr.hpp" #include "ffmpeg/tools.hpp" #include "plugin.hpp" -extern "C" { -#include -} - using namespace streamfx::encoder::ffmpeg::handler; using namespace streamfx::encoder::codec::dnxhr; diff --git a/source/encoders/handlers/dnxhd_handler.hpp b/source/encoders/handlers/dnxhd_handler.hpp index 590bf11ed7..d6a6a5c8fc 100644 --- a/source/encoders/handlers/dnxhd_handler.hpp +++ b/source/encoders/handlers/dnxhd_handler.hpp @@ -24,10 +24,22 @@ #include "handler.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/handler.hpp b/source/encoders/handlers/handler.hpp index 383ed95cbb..02e82d758f 100644 --- a/source/encoders/handlers/handler.hpp +++ b/source/encoders/handlers/handler.hpp @@ -24,10 +24,22 @@ #include "ffmpeg/hwapi/base.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg { diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index 0e32b6c2b1..fd3e789edd 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -20,6 +20,7 @@ // SOFTWARE. #include "nvenc_h264_handler.hpp" +#include "common.hpp" #include "strings.hpp" #include "../codecs/h264.hpp" #include "../encoder-ffmpeg.hpp" @@ -30,12 +31,19 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif -#include #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/encoders/handlers/nvenc_h264_handler.hpp b/source/encoders/handlers/nvenc_h264_handler.hpp index ea3ad2b6ed..ec8d96cf5d 100644 --- a/source/encoders/handlers/nvenc_h264_handler.hpp +++ b/source/encoders/handlers/nvenc_h264_handler.hpp @@ -23,10 +23,22 @@ #include "handler.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index 7c7767499a..d6c085777c 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -20,6 +20,7 @@ // SOFTWARE. #include "nvenc_hevc_handler.hpp" +#include "common.hpp" #include "strings.hpp" #include "../codecs/hevc.hpp" #include "../encoder-ffmpeg.hpp" @@ -28,11 +29,22 @@ #include "plugin.hpp" extern "C" { -#include +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } #define ST_KEY_PROFILE "H265.Profile" diff --git a/source/encoders/handlers/nvenc_hevc_handler.hpp b/source/encoders/handlers/nvenc_hevc_handler.hpp index 469888574a..ee65fddff1 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.hpp +++ b/source/encoders/handlers/nvenc_hevc_handler.hpp @@ -23,10 +23,22 @@ #include "handler.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index 4f978ec354..8979363c99 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -24,10 +24,22 @@ #include "ffmpeg/tools.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } #define ST_I18N_PRESET "Encoder.FFmpeg.NVENC.Preset" diff --git a/source/encoders/handlers/prores_aw_handler.cpp b/source/encoders/handlers/prores_aw_handler.cpp index 5f117ec516..0cba86e0a8 100644 --- a/source/encoders/handlers/prores_aw_handler.cpp +++ b/source/encoders/handlers/prores_aw_handler.cpp @@ -20,15 +20,12 @@ // SOFTWARE. #include "prores_aw_handler.hpp" +#include "common.hpp" #include #include "../codecs/prores.hpp" #include "ffmpeg/tools.hpp" #include "plugin.hpp" -extern "C" { -#include -} - using namespace streamfx::encoder::ffmpeg::handler; using namespace streamfx::encoder::codec::prores; diff --git a/source/encoders/handlers/prores_aw_handler.hpp b/source/encoders/handlers/prores_aw_handler.hpp index 35f557789d..01d1ea6394 100644 --- a/source/encoders/handlers/prores_aw_handler.hpp +++ b/source/encoders/handlers/prores_aw_handler.hpp @@ -23,10 +23,22 @@ #include "handler.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/ffmpeg/avframe-queue.hpp b/source/ffmpeg/avframe-queue.hpp index 9926ef159d..2a04dd208a 100644 --- a/source/ffmpeg/avframe-queue.hpp +++ b/source/ffmpeg/avframe-queue.hpp @@ -27,11 +27,16 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/ffmpeg/hwapi/base.hpp b/source/ffmpeg/hwapi/base.hpp index 20ade021eb..7c4adfe824 100644 --- a/source/ffmpeg/hwapi/base.hpp +++ b/source/ffmpeg/hwapi/base.hpp @@ -27,12 +27,17 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index af27314aa0..0ba660c25e 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -27,14 +27,19 @@ #include "obs/gs/gs-helper.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4191) -#pragma warning(disable : 4242) -#pragma warning(disable : 4244) -#pragma warning(disable : 4365) -#pragma warning(disable : 4986) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } using namespace streamfx::ffmpeg::hwapi; diff --git a/source/ffmpeg/hwapi/d3d11.hpp b/source/ffmpeg/hwapi/d3d11.hpp index 9a4d136d73..ef0e02019f 100644 --- a/source/ffmpeg/hwapi/d3d11.hpp +++ b/source/ffmpeg/hwapi/d3d11.hpp @@ -24,7 +24,10 @@ #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4191 4242 4244 4365 4777 4986 5039 5204) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #include @@ -32,6 +35,8 @@ #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif namespace streamfx::ffmpeg::hwapi { diff --git a/source/ffmpeg/swscale.hpp b/source/ffmpeg/swscale.hpp index 8293305d57..30124a04c7 100644 --- a/source/ffmpeg/swscale.hpp +++ b/source/ffmpeg/swscale.hpp @@ -26,12 +26,17 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 013be635fb..307fd02c2d 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -25,13 +25,22 @@ #include "plugin.hpp" extern "C" { +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4244) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include #include #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } using namespace streamfx::ffmpeg; diff --git a/source/ffmpeg/tools.hpp b/source/ffmpeg/tools.hpp index edc1465eeb..9ae3d7b18d 100644 --- a/source/ffmpeg/tools.hpp +++ b/source/ffmpeg/tools.hpp @@ -26,13 +26,18 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4242 4244 4365) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #include #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/gfx/blur/gfx-blur-box-linear.cpp b/source/gfx/blur/gfx-blur-box-linear.cpp index a9c762ff4d..c2f787cd74 100644 --- a/source/gfx/blur/gfx-blur-box-linear.cpp +++ b/source/gfx/blur/gfx-blur-box-linear.cpp @@ -16,22 +16,13 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-blur-box-linear.hpp" +#include "common.hpp" #include #include #include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #define ST_MAX_BLUR_SIZE 128 // Also change this in box-linear.effect if modified. streamfx::gfx::blur::box_linear_data::box_linear_data() diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 9a223604c3..338be7eb78 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -16,22 +16,13 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-blur-box.hpp" +#include "common.hpp" #include #include #include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #define ST_MAX_BLUR_SIZE 128 // Also change this in box.effect if modified. streamfx::gfx::blur::box_data::box_data() diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index f4cc372baf..d421904f12 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -16,21 +16,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-blur-dual-filtering.hpp" +#include "common.hpp" #include #include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - // Dual Filtering Blur // // This type of Blur uses downsampling and upsampling and clever math. That makes it less diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.cpp b/source/gfx/blur/gfx-blur-gaussian-linear.cpp index 0ca35ffc6c..e7ba118bbd 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.cpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.cpp @@ -16,19 +16,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-blur-gaussian-linear.hpp" +#include "common.hpp" #include #include "obs/gs/gs-helper.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - // FIXME: This breaks when MAX_KERNEL_SIZE is changed, due to the way the Gaussian // function first goes up at the point, and then once we pass the critical point // will go down again and it is not handled well. This is a pretty basic diff --git a/source/gfx/blur/gfx-blur-gaussian.cpp b/source/gfx/blur/gfx-blur-gaussian.cpp index b295166e4e..ebcc9bf4b4 100644 --- a/source/gfx/blur/gfx-blur-gaussian.cpp +++ b/source/gfx/blur/gfx-blur-gaussian.cpp @@ -16,21 +16,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-blur-gaussian.hpp" +#include "common.hpp" #include #include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - // TODO: It may be possible to optimize to run much faster: https://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ #define ST_KERNEL_SIZE 128u diff --git a/source/gfx/gfx-opengl.cpp b/source/gfx/gfx-opengl.cpp index 09980d93bd..d34eca168d 100644 --- a/source/gfx/gfx-opengl.cpp +++ b/source/gfx/gfx-opengl.cpp @@ -24,6 +24,16 @@ #include "util/util-logging.hpp" // OpenGL +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include "glad/gl.h" #ifdef D_PLATFORM_WINDOWS #include "glad/wgl.h" @@ -31,6 +41,11 @@ #ifdef D_PLATFORM_LINUX #include "glad/glx.h" #endif +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif #ifdef _DEBUG #define ST_PREFIX "<%s> " diff --git a/source/gfx/shader/gfx-shader-param-texture.hpp b/source/gfx/shader/gfx-shader-param-texture.hpp index 77fe767938..8c27f90949 100644 --- a/source/gfx/shader/gfx-shader-param-texture.hpp +++ b/source/gfx/shader/gfx-shader-param-texture.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include "common.hpp" #include #include #include "gfx-shader-param.hpp" diff --git a/source/nvidia/ar/nvidia-ar.cpp b/source/nvidia/ar/nvidia-ar.cpp index 0d33e828e6..f178074a9d 100644 --- a/source/nvidia/ar/nvidia-ar.cpp +++ b/source/nvidia/ar/nvidia-ar.cpp @@ -41,9 +41,24 @@ #endif #ifdef WIN32 +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif #define ST_LIBRARY_NAME "nvARPose.dll" #else diff --git a/source/nvidia/cuda/nvidia-cuda-context.cpp b/source/nvidia/cuda/nvidia-cuda-context.cpp index ba48cef96d..a431a3376e 100644 --- a/source/nvidia/cuda/nvidia-cuda-context.cpp +++ b/source/nvidia/cuda/nvidia-cuda-context.cpp @@ -39,11 +39,19 @@ #ifdef WIN32 #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4191 4242 4244 4365 4777 4986 5039 5204) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif #endif diff --git a/source/nvidia/cuda/nvidia-cuda.hpp b/source/nvidia/cuda/nvidia-cuda.hpp index 5929a50bd2..e6f1a3b89b 100644 --- a/source/nvidia/cuda/nvidia-cuda.hpp +++ b/source/nvidia/cuda/nvidia-cuda.hpp @@ -24,12 +24,23 @@ #include "util/util-library.hpp" #ifdef WIN32 +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4365) -#pragma warning(disable : 5204) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif #endif #define P_CUDA_DEFINE_FUNCTION(name, ...) \ diff --git a/source/nvidia/cv/nvidia-cv.cpp b/source/nvidia/cv/nvidia-cv.cpp index a3ce9dcada..d248a9b5e3 100644 --- a/source/nvidia/cv/nvidia-cv.cpp +++ b/source/nvidia/cv/nvidia-cv.cpp @@ -45,9 +45,24 @@ #endif #if defined(WIN32) +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif #define LIB_NAME "NVCVImage.dll" #else diff --git a/source/nvidia/cv/nvidia-cv.hpp b/source/nvidia/cv/nvidia-cv.hpp index 51689418b3..0d7b35d9fc 100644 --- a/source/nvidia/cv/nvidia-cv.hpp +++ b/source/nvidia/cv/nvidia-cv.hpp @@ -25,12 +25,23 @@ #include "util/util-library.hpp" #ifdef WIN32 +#ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4365) -#pragma warning(disable : 5204) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include +#ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif #endif #define NVCVI_DEFINE_FUNCTION(name, ...) \ diff --git a/source/nvidia/vfx/nvidia-vfx.cpp b/source/nvidia/vfx/nvidia-vfx.cpp index cdaa080059..0572e3a214 100644 --- a/source/nvidia/vfx/nvidia-vfx.cpp +++ b/source/nvidia/vfx/nvidia-vfx.cpp @@ -41,9 +41,24 @@ #endif #if defined(WIN32) +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include #include #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif #define LIB_NAME "NVVideoEffects.dll" #else diff --git a/source/obs/gs/gs-effect-parameter.cpp b/source/obs/gs/gs-effect-parameter.cpp index d715ce4fca..8ac54e5a7e 100644 --- a/source/obs/gs/gs-effect-parameter.cpp +++ b/source/obs/gs/gs-effect-parameter.cpp @@ -25,11 +25,19 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4201) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/obs/gs/gs-effect-pass.cpp b/source/obs/gs/gs-effect-pass.cpp index 4d81ab8279..5b3856daff 100644 --- a/source/obs/gs/gs-effect-pass.cpp +++ b/source/obs/gs/gs-effect-pass.cpp @@ -23,11 +23,19 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4201) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/obs/gs/gs-effect-technique.cpp b/source/obs/gs/gs-effect-technique.cpp index bd08551112..e7bb1bb6c0 100644 --- a/source/obs/gs/gs-effect-technique.cpp +++ b/source/obs/gs/gs-effect-technique.cpp @@ -24,11 +24,19 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4201) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 1258078be5..9be06e974d 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -48,11 +48,19 @@ // OBS #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4201) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif #define ST_I18N "Source.Mirror" diff --git a/source/ui/ui-about-entry.hpp b/source/ui/ui-about-entry.hpp index 2bcf24bbdb..692fe88578 100644 --- a/source/ui/ui-about-entry.hpp +++ b/source/ui/ui-about-entry.hpp @@ -18,18 +18,24 @@ */ #pragma once +#include "ui-common.hpp" #include #include "ui-about.hpp" -#include "ui-common.hpp" #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4251 4365 4371 4619 4946) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #include "ui_about-entry.h" + #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif namespace streamfx::ui { diff --git a/source/ui/ui-about.cpp b/source/ui/ui-about.cpp index 7f0b9ab026..076233f283 100644 --- a/source/ui/ui-about.cpp +++ b/source/ui/ui-about.cpp @@ -18,26 +18,32 @@ */ #include "ui-about.hpp" +#include "ui-common.hpp" #include #include #include #include #include - -#include -#include #include "plugin.hpp" #include "ui-about-entry.hpp" #include "util/util-logging.hpp" #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4251 4365 4371 4619 4946) +#pragma warning(disable : 4623) +#pragma warning(disable : 4625) +#pragma warning(disable : 4626) +#pragma warning(disable : 5027) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif -#include -#include +#include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif #ifdef _DEBUG diff --git a/source/ui/ui-about.hpp b/source/ui/ui-about.hpp index aaae9b7a41..92b8d3b78d 100644 --- a/source/ui/ui-about.hpp +++ b/source/ui/ui-about.hpp @@ -23,11 +23,16 @@ #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4251 4365 4371 4619 4946) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include "ui_about.h" #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif namespace streamfx::ui { diff --git a/source/ui/ui-common.hpp b/source/ui/ui-common.hpp index f87c267978..1820d6a3b4 100644 --- a/source/ui/ui-common.hpp +++ b/source/ui/ui-common.hpp @@ -18,15 +18,20 @@ */ #pragma once +#include "common.hpp" #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4251 4365 4371 4619 4946) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif - #include #include #include +#include +#include #include #include #include @@ -35,11 +40,27 @@ #include #include #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif extern "C" { +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include -} - #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif +} diff --git a/source/ui/ui-updater.hpp b/source/ui/ui-updater.hpp index c1d4eb00ee..daa14f8d9c 100644 --- a/source/ui/ui-updater.hpp +++ b/source/ui/ui-updater.hpp @@ -24,9 +24,11 @@ #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4251 4365 4371 4619 4946) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif - #include #include #include @@ -41,6 +43,8 @@ Q_DECLARE_METATYPE(::streamfx::version_stage); #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif namespace streamfx::ui { diff --git a/source/ui/ui.cpp b/source/ui/ui.cpp index 0812b6dd16..62b25bed2f 100644 --- a/source/ui/ui.cpp +++ b/source/ui/ui.cpp @@ -18,15 +18,13 @@ */ #include "ui.hpp" -#include "common.hpp" #include "strings.hpp" +#include "ui-common.hpp" #include #include "configuration.hpp" #include "obs/obs-tools.hpp" #include "plugin.hpp" -#include - // Translation Keys constexpr std::string_view _i18n_prefix = "StreamFX::"; constexpr std::string_view _i18n_menu = "UI.Menu"; diff --git a/source/ui/ui.hpp b/source/ui/ui.hpp index 18c219c9f9..78658c2ebc 100644 --- a/source/ui/ui.hpp +++ b/source/ui/ui.hpp @@ -18,8 +18,8 @@ */ #pragma once -#include "ui-about.hpp" #include "ui-common.hpp" +#include "ui-about.hpp" #ifdef ENABLE_UPDATER #include "ui-updater.hpp" diff --git a/source/updater.hpp b/source/updater.hpp index 89fc27d01a..c64dabccdb 100644 --- a/source/updater.hpp +++ b/source/updater.hpp @@ -22,11 +22,28 @@ #include #include #include -#include #include "util/util-curl.hpp" #include "util/util-event.hpp" #include "util/util-threadpool.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4623) +#pragma warning(disable : 4625) +#pragma warning(disable : 4626) +#pragma warning(disable : 5027) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif +#include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif + namespace streamfx { enum class version_stage : uint8_t { STABLE, // A.B.C diff --git a/source/util/util-curl.hpp b/source/util/util-curl.hpp index 12ffaaa1b4..c8c9304075 100644 --- a/source/util/util-curl.hpp +++ b/source/util/util-curl.hpp @@ -30,7 +30,22 @@ extern "C" { #ifndef NOMINMAX #define NOMINMAX #endif +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" +#endif #include +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif } namespace streamfx::util { diff --git a/source/util/utility.cpp b/source/util/utility.cpp index 4d00247b14..868f991027 100644 --- a/source/util/utility.cpp +++ b/source/util/utility.cpp @@ -18,22 +18,12 @@ */ #include "utility.hpp" +#include "common.hpp" #include #include #include #include "plugin.hpp" -// OBS -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#pragma warning(disable : 5039) -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - obs_property_t* streamfx::util::obs_properties_add_tristate(obs_properties_t* props, const char* name, const char* desc) { obs_property_t* p = obs_properties_add_list(props, name, desc, OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); diff --git a/source/util/utility.hpp b/source/util/utility.hpp index 84a9a8c61f..5a4815982f 100644 --- a/source/util/utility.hpp +++ b/source/util/utility.hpp @@ -27,7 +27,13 @@ extern "C" { #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable : 4201) +#pragma warning(disable : 4464) +#pragma warning(disable : 4820) +#pragma warning(disable : 5220) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #endif #include #include @@ -35,6 +41,8 @@ extern "C" { #include #ifdef _MSC_VER #pragma warning(pop) +#else +#pragma GCC diagnostic pop #endif } diff --git a/templates/module.cpp.in b/templates/module.cpp.in index c27ea004ab..a81a12981a 100644 --- a/templates/module.cpp.in +++ b/templates/module.cpp.in @@ -1,12 +1,4 @@ -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif +#include "common.hpp" OBS_DECLARE_MODULE() OBS_MODULE_AUTHOR("@PROJECT_AUTHORS@") @@ -21,3 +13,4 @@ MODULE_EXPORT const char* obs_module_description() { return "@PROJECT_DESCRIPTION@"; } + From 08544b4116ef3646dfc0bd3e871599b83e63ff6a Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 29 Aug 2022 12:29:44 +0200 Subject: [PATCH 100/164] cmake, code: Abuse pre-processor to disable/enable warnings --- .clang-format | 4 ++ CMakeLists.txt | 2 + source/common.hpp | 21 ++----- source/configuration.hpp | 3 + source/encoders/encoder-aom-av1.cpp | 5 +- source/encoders/encoder-aom-av1.hpp | 24 +++----- source/encoders/encoder-ffmpeg.cpp | 59 ++++++------------- source/encoders/encoder-ffmpeg.hpp | 27 ++++----- source/encoders/handlers/amf_h264_handler.cpp | 17 +----- source/encoders/handlers/amf_h264_handler.hpp | 17 +----- source/encoders/handlers/amf_hevc_handler.cpp | 14 +---- source/encoders/handlers/amf_hevc_handler.hpp | 17 +----- source/encoders/handlers/amf_shared.cpp | 17 +----- source/encoders/handlers/amf_shared.hpp | 17 +----- source/encoders/handlers/debug_handler.cpp | 24 +++----- source/encoders/handlers/dnxhd_handler.cpp | 5 +- source/encoders/handlers/dnxhd_handler.hpp | 17 +----- source/encoders/handlers/handler.hpp | 17 +----- .../encoders/handlers/nvenc_h264_handler.cpp | 17 +----- .../encoders/handlers/nvenc_h264_handler.hpp | 17 +----- .../encoders/handlers/nvenc_hevc_handler.cpp | 17 +----- .../encoders/handlers/nvenc_hevc_handler.hpp | 17 +----- source/encoders/handlers/nvenc_shared.cpp | 17 +----- source/encoders/handlers/nvenc_shared.hpp | 9 +-- .../encoders/handlers/prores_aw_handler.cpp | 5 +- .../encoders/handlers/prores_aw_handler.hpp | 17 +----- source/ffmpeg/avframe-queue.hpp | 17 ++---- source/ffmpeg/hwapi/base.hpp | 17 ++---- source/ffmpeg/hwapi/d3d11.cpp | 19 ++---- source/ffmpeg/hwapi/d3d11.hpp | 14 +---- source/ffmpeg/swscale.cpp | 3 + source/ffmpeg/swscale.hpp | 17 ++---- source/ffmpeg/tools.cpp | 19 ++---- source/ffmpeg/tools.hpp | 17 ++---- source/filters/filter-autoframing.hpp | 11 ++-- source/filters/filter-blur.cpp | 34 +++++------ source/filters/filter-blur.hpp | 11 ++-- source/filters/filter-color-grade.cpp | 26 ++++---- source/filters/filter-color-grade.hpp | 5 +- source/filters/filter-denoising.cpp | 5 +- source/filters/filter-denoising.hpp | 9 ++- source/filters/filter-displacement.cpp | 7 ++- source/filters/filter-dynamic-mask.cpp | 7 ++- source/filters/filter-dynamic-mask.hpp | 7 ++- source/filters/filter-sdf-effects.cpp | 5 +- source/filters/filter-shader.cpp | 5 +- source/filters/filter-transform.cpp | 26 ++++---- source/filters/filter-transform.hpp | 5 +- source/filters/filter-upscaling.cpp | 5 +- source/filters/filter-upscaling.hpp | 9 ++- source/filters/filter-virtual-greenscreen.cpp | 5 +- source/filters/filter-virtual-greenscreen.hpp | 9 ++- source/gfx/blur/gfx-blur-base.cpp | 3 + source/gfx/blur/gfx-blur-box-linear.cpp | 7 ++- source/gfx/blur/gfx-blur-box-linear.hpp | 5 +- source/gfx/blur/gfx-blur-box.cpp | 7 ++- source/gfx/blur/gfx-blur-box.hpp | 5 +- source/gfx/blur/gfx-blur-dual-filtering.cpp | 7 ++- source/gfx/blur/gfx-blur-dual-filtering.hpp | 7 ++- source/gfx/blur/gfx-blur-gaussian-linear.cpp | 5 +- source/gfx/blur/gfx-blur-gaussian-linear.hpp | 7 ++- source/gfx/blur/gfx-blur-gaussian.cpp | 7 ++- source/gfx/blur/gfx-blur-gaussian.hpp | 7 ++- source/gfx/gfx-debug.cpp | 5 +- source/gfx/gfx-debug.hpp | 5 +- source/gfx/gfx-opengl.cpp | 22 ++----- source/gfx/gfx-opengl.hpp | 2 + source/gfx/gfx-source-texture.cpp | 5 +- source/gfx/gfx-source-texture.hpp | 5 +- source/gfx/lut/gfx-lut-consumer.cpp | 1 - source/gfx/lut/gfx-lut-consumer.hpp | 6 +- source/gfx/lut/gfx-lut-producer.hpp | 3 +- source/gfx/lut/gfx-lut.cpp | 5 +- source/gfx/lut/gfx-lut.hpp | 6 +- source/gfx/shader/gfx-shader-param-basic.cpp | 3 + source/gfx/shader/gfx-shader-param-basic.hpp | 5 +- .../gfx/shader/gfx-shader-param-texture.cpp | 9 ++- .../gfx/shader/gfx-shader-param-texture.hpp | 7 ++- source/gfx/shader/gfx-shader-param.cpp | 7 ++- source/gfx/shader/gfx-shader-param.hpp | 5 +- source/gfx/shader/gfx-shader.cpp | 9 ++- source/gfx/shader/gfx-shader.hpp | 9 ++- source/nvidia/ar/nvidia-ar-facedetection.cpp | 7 ++- source/nvidia/ar/nvidia-ar-feature.hpp | 5 +- source/nvidia/ar/nvidia-ar.cpp | 24 +++----- source/nvidia/ar/nvidia-ar.hpp | 5 +- source/nvidia/cuda/nvidia-cuda-context.cpp | 22 ++----- source/nvidia/cuda/nvidia-cuda-context.hpp | 5 +- source/nvidia/cuda/nvidia-cuda-gs-texture.hpp | 7 ++- source/nvidia/cuda/nvidia-cuda-memory.cpp | 5 +- source/nvidia/cuda/nvidia-cuda-memory.hpp | 5 +- source/nvidia/cuda/nvidia-cuda-obs.hpp | 5 +- source/nvidia/cuda/nvidia-cuda-stream.cpp | 5 +- source/nvidia/cuda/nvidia-cuda-stream.hpp | 5 +- source/nvidia/cuda/nvidia-cuda.cpp | 5 +- source/nvidia/cuda/nvidia-cuda.hpp | 24 +++----- source/nvidia/cv/nvidia-cv-image.hpp | 5 +- source/nvidia/cv/nvidia-cv-texture.hpp | 5 +- source/nvidia/cv/nvidia-cv.cpp | 24 +++----- source/nvidia/cv/nvidia-cv.hpp | 19 +----- source/nvidia/vfx/nvidia-vfx-denoising.cpp | 7 ++- source/nvidia/vfx/nvidia-vfx-effect.cpp | 5 +- source/nvidia/vfx/nvidia-vfx-effect.hpp | 9 ++- source/nvidia/vfx/nvidia-vfx-greenscreen.cpp | 7 ++- .../nvidia/vfx/nvidia-vfx-superresolution.cpp | 9 ++- source/nvidia/vfx/nvidia-vfx.cpp | 24 +++----- source/nvidia/vfx/nvidia-vfx.hpp | 5 +- source/obs/gs/gs-effect-parameter.cpp | 22 ++----- source/obs/gs/gs-effect-pass.cpp | 20 ++----- source/obs/gs/gs-effect-technique.cpp | 20 ++----- source/obs/gs/gs-effect.cpp | 7 ++- source/obs/gs/gs-effect.hpp | 7 ++- source/obs/gs/gs-helper.hpp | 5 +- source/obs/gs/gs-indexbuffer.cpp | 5 +- source/obs/gs/gs-indexbuffer.hpp | 3 + source/obs/gs/gs-mipmapper.cpp | 14 ++--- source/obs/gs/gs-rendertarget.cpp | 5 +- source/obs/gs/gs-sampler.cpp | 3 + source/obs/gs/gs-texture.cpp | 5 +- source/obs/gs/gs-vertex.cpp | 3 + source/obs/gs/gs-vertexbuffer.cpp | 5 +- source/obs/obs-source-tracker.cpp | 7 ++- source/obs/obs-source-tracker.hpp | 3 + source/obs/obs-tools.cpp | 9 ++- source/obs/obs-weak-source.hpp | 5 +- source/plugin.cpp | 7 ++- source/sources/source-mirror.hpp | 13 ++-- source/sources/source-shader.cpp | 5 +- source/transitions/transition-shader.cpp | 5 +- source/ui/ui-about-entry.hpp | 20 ++----- source/ui/ui-about.cpp | 28 +++------ source/ui/ui-about.hpp | 14 +---- source/ui/ui-common.hpp | 31 ++-------- source/ui/ui-updater.hpp | 14 +---- source/ui/ui.cpp | 5 +- source/updater.cpp | 9 ++- source/updater.hpp | 24 ++------ source/util/util-bitmask.hpp | 2 + source/util/util-curl.cpp | 3 + source/util/util-curl.hpp | 22 ++----- source/util/util-event.hpp | 3 + source/util/util-library.cpp | 4 +- source/util/util-library.hpp | 2 + source/util/util-logging.cpp | 3 + source/util/util-logging.hpp | 2 + source/util/util-platform.cpp | 2 + source/util/util-platform.hpp | 2 + source/util/util-profiler.cpp | 3 + source/util/util-profiler.hpp | 3 + source/util/util-threadpool.cpp | 5 +- source/util/util-threadpool.hpp | 2 + source/util/utility.cpp | 5 +- source/util/utility.hpp | 19 ++---- source/warning-disable.hpp | 12 ++++ source/warning-enable.hpp | 8 +++ source/windll.cpp | 2 + templates/module.cpp.in | 3 + templates/version.hpp.in | 2 + 158 files changed, 707 insertions(+), 896 deletions(-) create mode 100644 source/warning-disable.hpp create mode 100644 source/warning-enable.hpp diff --git a/.clang-format b/.clang-format index 2ed0c10b2e..15d650fe36 100644 --- a/.clang-format +++ b/.clang-format @@ -20,6 +20,8 @@ NamespaceIndentation: All # Includes #IncludeBlocks: Regroup IncludeCategories: + - Regex: '^"warning-disable.hpp"$' + Priority: 50 - Regex: '^(<|")(config.hpp|common.hpp|ui-common.hpp|strings.hpp|version.hpp|obs.h)("|>)' Priority: 100 - Regex: '^ #include @@ -44,6 +46,8 @@ #include #include +#include "warning-enable.hpp" + // Common Plugin includes #include "config.hpp" #include "strings.hpp" @@ -56,17 +60,8 @@ #include "util/utility.hpp" // Common OBS includes +#include "warning-disable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif #include #include @@ -85,15 +80,11 @@ extern "C" { #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif // Fix libOBS's global defines #undef strtoll } +#include "warning-enable.hpp" // Common Global defines /// Logging diff --git a/source/configuration.hpp b/source/configuration.hpp index d199ad94d4..5b9f1b772d 100644 --- a/source/configuration.hpp +++ b/source/configuration.hpp @@ -19,8 +19,11 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" namespace streamfx { class configuration { diff --git a/source/encoders/encoder-aom-av1.cpp b/source/encoders/encoder-aom-av1.cpp index d85f628468..dd33bb364d 100644 --- a/source/encoders/encoder-aom-av1.cpp +++ b/source/encoders/encoder-aom-av1.cpp @@ -23,9 +23,12 @@ //--------------------------------------------------------------------------------// #include "encoder-aom-av1.hpp" +#include "util/util-logging.hpp" + +#include "warning-disable.hpp" #include #include -#include "util/util-logging.hpp" +#include "warning-enable.hpp" #ifdef _DEBUG #define ST_PREFIX "<%s> " diff --git a/source/encoders/encoder-aom-av1.hpp b/source/encoders/encoder-aom-av1.hpp index fba31a7059..1effe18349 100644 --- a/source/encoders/encoder-aom-av1.hpp +++ b/source/encoders/encoder-aom-av1.hpp @@ -24,30 +24,20 @@ #pragma once #include "common.hpp" -#include -#include #include "encoders/codecs/av1.hpp" #include "obs/obs-encoder-factory.hpp" #include "util/util-library.hpp" #include "util/util-profiler.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" }; namespace streamfx::encoder::aom::av1 { diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index a47da31fa3..2da6e71a47 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -21,13 +21,30 @@ #include "encoder-ffmpeg.hpp" #include "strings.hpp" -#include #include "codecs/hevc.hpp" #include "ffmpeg/tools.hpp" #include "handlers/debug_handler.hpp" #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + +extern "C" { +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + +#include "warning-disable.hpp" +#include +#include +#include +#include +#include +#include "warning-enable.hpp" +} + #ifdef ENABLE_ENCODER_FFMPEG_AMF #include "handlers/amf_h264_handler.hpp" #include "handlers/amf_hevc_handler.hpp" @@ -46,46 +63,6 @@ #include "handlers/dnxhd_handler.hpp" #endif -extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif -#include -#include -#include -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif -} - #ifdef WIN32 #include "ffmpeg/hwapi/d3d11.hpp" #endif diff --git a/source/encoders/encoder-ffmpeg.hpp b/source/encoders/encoder-ffmpeg.hpp index ac7659e781..bd0a5d78f0 100644 --- a/source/encoders/encoder-ffmpeg.hpp +++ b/source/encoders/encoder-ffmpeg.hpp @@ -21,6 +21,13 @@ #pragma once #include "common.hpp" +#include "ffmpeg/avframe-queue.hpp" +#include "ffmpeg/hwapi/base.hpp" +#include "ffmpeg/swscale.hpp" +#include "handlers/handler.hpp" +#include "obs/obs-encoder-factory.hpp" + +#include "warning-disable.hpp" #include #include #include @@ -28,27 +35,13 @@ #include #include #include -#include "ffmpeg/avframe-queue.hpp" -#include "ffmpeg/hwapi/base.hpp" -#include "ffmpeg/swscale.hpp" -#include "handlers/handler.hpp" -#include "obs/obs-encoder-factory.hpp" +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg { diff --git a/source/encoders/handlers/amf_h264_handler.cpp b/source/encoders/handlers/amf_h264_handler.cpp index 838bac1f6c..9a2385b517 100644 --- a/source/encoders/handlers/amf_h264_handler.cpp +++ b/source/encoders/handlers/amf_h264_handler.cpp @@ -28,22 +28,9 @@ #include "ffmpeg/tools.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } // Settings diff --git a/source/encoders/handlers/amf_h264_handler.hpp b/source/encoders/handlers/amf_h264_handler.hpp index a6a0104a3c..3a464837ab 100644 --- a/source/encoders/handlers/amf_h264_handler.hpp +++ b/source/encoders/handlers/amf_h264_handler.hpp @@ -26,22 +26,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/amf_hevc_handler.cpp b/source/encoders/handlers/amf_hevc_handler.cpp index 44a8f6ec4d..e586abd88c 100644 --- a/source/encoders/handlers/amf_hevc_handler.cpp +++ b/source/encoders/handlers/amf_hevc_handler.cpp @@ -31,19 +31,9 @@ #include "plugin.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } // Settings diff --git a/source/encoders/handlers/amf_hevc_handler.hpp b/source/encoders/handlers/amf_hevc_handler.hpp index cb87b4c990..3698855214 100644 --- a/source/encoders/handlers/amf_hevc_handler.hpp +++ b/source/encoders/handlers/amf_hevc_handler.hpp @@ -25,22 +25,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/amf_shared.cpp b/source/encoders/handlers/amf_shared.cpp index df78e900e0..071dd27098 100644 --- a/source/encoders/handlers/amf_shared.cpp +++ b/source/encoders/handlers/amf_shared.cpp @@ -27,22 +27,9 @@ #include "ffmpeg/tools.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } // Translation diff --git a/source/encoders/handlers/amf_shared.hpp b/source/encoders/handlers/amf_shared.hpp index a2cc5b73a6..059c515a2a 100644 --- a/source/encoders/handlers/amf_shared.hpp +++ b/source/encoders/handlers/amf_shared.hpp @@ -26,22 +26,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler::amf { diff --git a/source/encoders/handlers/debug_handler.cpp b/source/encoders/handlers/debug_handler.cpp index f3588b7036..de58e67191 100644 --- a/source/encoders/handlers/debug_handler.cpp +++ b/source/encoders/handlers/debug_handler.cpp @@ -21,30 +21,20 @@ #include "debug_handler.hpp" #include "common.hpp" +#include "handler.hpp" +#include "plugin.hpp" + +#include "warning-disable.hpp" #include #include #include #include -#include "handler.hpp" -#include "plugin.hpp" +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } using namespace streamfx::encoder::ffmpeg::handler; diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp index c00e03e41d..af48d3a177 100644 --- a/source/encoders/handlers/dnxhd_handler.cpp +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -1,10 +1,13 @@ #include "dnxhd_handler.hpp" #include "common.hpp" -#include #include "../codecs/dnxhr.hpp" #include "ffmpeg/tools.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + using namespace streamfx::encoder::ffmpeg::handler; using namespace streamfx::encoder::codec::dnxhr; diff --git a/source/encoders/handlers/dnxhd_handler.hpp b/source/encoders/handlers/dnxhd_handler.hpp index d6a6a5c8fc..49a6ad44c9 100644 --- a/source/encoders/handlers/dnxhd_handler.hpp +++ b/source/encoders/handlers/dnxhd_handler.hpp @@ -24,22 +24,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/handler.hpp b/source/encoders/handlers/handler.hpp index 02e82d758f..aec41681d8 100644 --- a/source/encoders/handlers/handler.hpp +++ b/source/encoders/handlers/handler.hpp @@ -24,22 +24,9 @@ #include "ffmpeg/hwapi/base.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg { diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index fd3e789edd..906699278a 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -29,22 +29,9 @@ #include "plugin.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } #define ST_KEY_PROFILE "H264.Profile" diff --git a/source/encoders/handlers/nvenc_h264_handler.hpp b/source/encoders/handlers/nvenc_h264_handler.hpp index ec8d96cf5d..f8b46fec92 100644 --- a/source/encoders/handlers/nvenc_h264_handler.hpp +++ b/source/encoders/handlers/nvenc_h264_handler.hpp @@ -23,22 +23,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index d6c085777c..a7aa85b128 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -29,22 +29,9 @@ #include "plugin.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } #define ST_KEY_PROFILE "H265.Profile" diff --git a/source/encoders/handlers/nvenc_hevc_handler.hpp b/source/encoders/handlers/nvenc_hevc_handler.hpp index ee65fddff1..a0fef6d7a5 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.hpp +++ b/source/encoders/handlers/nvenc_hevc_handler.hpp @@ -23,22 +23,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index 8979363c99..3004a2d4f6 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -24,22 +24,9 @@ #include "ffmpeg/tools.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } #define ST_I18N_PRESET "Encoder.FFmpeg.NVENC.Preset" diff --git a/source/encoders/handlers/nvenc_shared.hpp b/source/encoders/handlers/nvenc_shared.hpp index 08288b27cc..535e8a1bd7 100644 --- a/source/encoders/handlers/nvenc_shared.hpp +++ b/source/encoders/handlers/nvenc_shared.hpp @@ -24,14 +24,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4242 4244 4365) -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif +#include "warning-enable.hpp" } /* NVENC has multiple compression modes: diff --git a/source/encoders/handlers/prores_aw_handler.cpp b/source/encoders/handlers/prores_aw_handler.cpp index 0cba86e0a8..13d4ee88ac 100644 --- a/source/encoders/handlers/prores_aw_handler.cpp +++ b/source/encoders/handlers/prores_aw_handler.cpp @@ -21,11 +21,14 @@ #include "prores_aw_handler.hpp" #include "common.hpp" -#include #include "../codecs/prores.hpp" #include "ffmpeg/tools.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + using namespace streamfx::encoder::ffmpeg::handler; using namespace streamfx::encoder::codec::prores; diff --git a/source/encoders/handlers/prores_aw_handler.hpp b/source/encoders/handlers/prores_aw_handler.hpp index 01d1ea6394..caffa1d637 100644 --- a/source/encoders/handlers/prores_aw_handler.hpp +++ b/source/encoders/handlers/prores_aw_handler.hpp @@ -23,22 +23,9 @@ #include "handler.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::encoder::ffmpeg::handler { diff --git a/source/ffmpeg/avframe-queue.hpp b/source/ffmpeg/avframe-queue.hpp index 2a04dd208a..2a5703adef 100644 --- a/source/ffmpeg/avframe-queue.hpp +++ b/source/ffmpeg/avframe-queue.hpp @@ -21,23 +21,16 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::ffmpeg { diff --git a/source/ffmpeg/hwapi/base.hpp b/source/ffmpeg/hwapi/base.hpp index 7c4adfe824..0ebec171d3 100644 --- a/source/ffmpeg/hwapi/base.hpp +++ b/source/ffmpeg/hwapi/base.hpp @@ -21,24 +21,17 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::ffmpeg::hwapi { diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index 0ba660c25e..16b6677bce 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -22,24 +22,17 @@ #ifdef WIN32 #include "d3d11.hpp" +#include "obs/gs/gs-helper.hpp" + +#include "warning-disable.hpp" #include #include -#include "obs/gs/gs-helper.hpp" +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } using namespace streamfx::ffmpeg::hwapi; diff --git a/source/ffmpeg/hwapi/d3d11.hpp b/source/ffmpeg/hwapi/d3d11.hpp index ef0e02019f..b7b36f8923 100644 --- a/source/ffmpeg/hwapi/d3d11.hpp +++ b/source/ffmpeg/hwapi/d3d11.hpp @@ -22,22 +22,12 @@ #pragma once #include "base.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" namespace streamfx::ffmpeg::hwapi { class d3d11 : public streamfx::ffmpeg::hwapi::base { diff --git a/source/ffmpeg/swscale.cpp b/source/ffmpeg/swscale.cpp index 73ded2aa4b..9a47e01d7e 100644 --- a/source/ffmpeg/swscale.cpp +++ b/source/ffmpeg/swscale.cpp @@ -20,7 +20,10 @@ // SOFTWARE. #include "swscale.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" using namespace streamfx::ffmpeg; diff --git a/source/ffmpeg/swscale.hpp b/source/ffmpeg/swscale.hpp index 30124a04c7..5d5fcfab0e 100644 --- a/source/ffmpeg/swscale.hpp +++ b/source/ffmpeg/swscale.hpp @@ -21,23 +21,16 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::ffmpeg { diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 307fd02c2d..9b75b65428 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -20,27 +20,20 @@ // SOFTWARE. #include "tools.hpp" +#include "plugin.hpp" + +#include "warning-disable.hpp" #include #include -#include "plugin.hpp" +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } using namespace streamfx::ffmpeg; diff --git a/source/ffmpeg/tools.hpp b/source/ffmpeg/tools.hpp index 9ae3d7b18d..13de717c2c 100644 --- a/source/ffmpeg/tools.hpp +++ b/source/ffmpeg/tools.hpp @@ -21,24 +21,17 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::ffmpeg::tools { diff --git a/source/filters/filter-autoframing.hpp b/source/filters/filter-autoframing.hpp index 71ef06dafb..29ee24ff43 100644 --- a/source/filters/filter-autoframing.hpp +++ b/source/filters/filter-autoframing.hpp @@ -18,10 +18,6 @@ */ #pragma once -#include -#include -#include -#include #include "gfx/gfx-debug.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -31,6 +27,13 @@ #include "util/util-threadpool.hpp" #include "util/utility.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include +#include "warning-enable.hpp" + #ifdef ENABLE_FILTER_AUTOFRAMING_NVIDIA #include "nvidia/ar/nvidia-ar-facedetection.hpp" #endif diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 5156f217c0..4250585dd6 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -19,11 +19,6 @@ #include "filter-blur.hpp" #include "strings.hpp" -#include -#include -#include -#include -#include #include "gfx/blur/gfx-blur-box-linear.hpp" #include "gfx/blur/gfx-blur-box.hpp" #include "gfx/blur/gfx-blur-dual-filtering.hpp" @@ -33,6 +28,22 @@ #include "obs/obs-source-tracker.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include +#include +#include "warning-enable.hpp" + +// OBS +#include "warning-disable.hpp" +#include +#include +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -47,19 +58,6 @@ #define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) #endif -// OBS -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - // Translation Strings #define ST_I18N "Filter.Blur" diff --git a/source/filters/filter-blur.hpp b/source/filters/filter-blur.hpp index da5bdeec5e..f2ee74f962 100644 --- a/source/filters/filter-blur.hpp +++ b/source/filters/filter-blur.hpp @@ -19,10 +19,6 @@ #pragma once #include "common.hpp" -#include -#include -#include -#include #include "gfx/blur/gfx-blur-base.hpp" #include "gfx/gfx-source-texture.hpp" #include "obs/gs/gs-effect.hpp" @@ -31,6 +27,13 @@ #include "obs/gs/gs-texture.hpp" #include "obs/obs-source-factory.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include +#include "warning-enable.hpp" + namespace streamfx::filter::blur { enum class mask_type : int64_t { Region, diff --git a/source/filters/filter-color-grade.cpp b/source/filters/filter-color-grade.cpp index 4a1903663b..34f23986f9 100644 --- a/source/filters/filter-color-grade.cpp +++ b/source/filters/filter-color-grade.cpp @@ -19,10 +19,22 @@ #include "filter-color-grade.hpp" #include "strings.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + +// OBS +#include "warning-disable.hpp" +extern "C" { +#include +#include +#include +} +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -37,18 +49,6 @@ #define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) #endif -// OBS -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #define ST_I18N "Filter.ColorGrade" // Lift #define ST_KEY_LIFT "Filter.ColorGrade.Lift" diff --git a/source/filters/filter-color-grade.hpp b/source/filters/filter-color-grade.hpp index a9b1c4f199..fcdc887df2 100644 --- a/source/filters/filter-color-grade.hpp +++ b/source/filters/filter-color-grade.hpp @@ -18,7 +18,6 @@ */ #pragma once -#include #include "gfx/lut/gfx-lut-consumer.hpp" #include "gfx/lut/gfx-lut-producer.hpp" #include "gfx/lut/gfx-lut.hpp" @@ -29,6 +28,10 @@ #include "obs/obs-source-factory.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::filter::color_grade { enum class detection_mode { HSV, diff --git a/source/filters/filter-denoising.cpp b/source/filters/filter-denoising.cpp index 94c11d7d7b..73e3a7e065 100644 --- a/source/filters/filter-denoising.cpp +++ b/source/filters/filter-denoising.cpp @@ -19,11 +19,14 @@ // SOFTWARE. #include "filter-denoising.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/filters/filter-denoising.hpp b/source/filters/filter-denoising.hpp index b1e46ce328..a524e6a9b3 100644 --- a/source/filters/filter-denoising.hpp +++ b/source/filters/filter-denoising.hpp @@ -19,9 +19,6 @@ // SOFTWARE. #pragma once -#include -#include -#include #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -29,6 +26,12 @@ #include "plugin.hpp" #include "util/util-threadpool.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + #ifdef ENABLE_FILTER_DENOISING_NVIDIA #include "nvidia/vfx/nvidia-vfx-denoising.hpp" #endif diff --git a/source/filters/filter-displacement.cpp b/source/filters/filter-displacement.cpp index 92fa8003e6..d1745ac4c3 100644 --- a/source/filters/filter-displacement.cpp +++ b/source/filters/filter-displacement.cpp @@ -23,11 +23,14 @@ #include "filter-displacement.hpp" #include "strings.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 31068be2bb..51156dc3df 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -19,11 +19,14 @@ #include "filter-dynamic-mask.hpp" #include "strings.hpp" +#include "obs/gs/gs-helper.hpp" +#include "util/util-logging.hpp" + +#include "warning-disable.hpp" #include #include #include -#include "obs/gs/gs-helper.hpp" -#include "util/util-logging.hpp" +#include "warning-enable.hpp" #ifdef _DEBUG #define ST_PREFIX "<%s> " diff --git a/source/filters/filter-dynamic-mask.hpp b/source/filters/filter-dynamic-mask.hpp index 3b936aeced..60c7b3c3a4 100644 --- a/source/filters/filter-dynamic-mask.hpp +++ b/source/filters/filter-dynamic-mask.hpp @@ -19,8 +19,6 @@ #pragma once #include "common.hpp" -#include -#include #include "gfx/gfx-source-texture.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/obs-source-active-reference.hpp" @@ -30,6 +28,11 @@ #include "obs/obs-source.hpp" #include "obs/obs-tools.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::filter::dynamic_mask { enum class channel : int8_t { Invalid = -1, Red, Green, Blue, Alpha }; diff --git a/source/filters/filter-sdf-effects.cpp b/source/filters/filter-sdf-effects.cpp index 9b468f510c..3b73af7f22 100644 --- a/source/filters/filter-sdf-effects.cpp +++ b/source/filters/filter-sdf-effects.cpp @@ -19,10 +19,13 @@ #include "filter-sdf-effects.hpp" #include "strings.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/filters/filter-shader.cpp b/source/filters/filter-shader.cpp index 77e8dabeb0..7ad26055e7 100644 --- a/source/filters/filter-shader.cpp +++ b/source/filters/filter-shader.cpp @@ -19,10 +19,13 @@ #include "filter-shader.hpp" #include "strings.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index cf1cb682c3..b45f9e43be 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -19,11 +19,21 @@ #include "filter-transform.hpp" #include "strings.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + +// OBS +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -38,18 +48,6 @@ #define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) #endif -// OBS -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4201) -#endif -#include -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #define ST_I18N "Filter.Transform" #define ST_I18N_CAMERA ST_I18N ".Camera" #define ST_I18N_CAMERA_MODE ST_I18N_CAMERA ".Mode" diff --git a/source/filters/filter-transform.hpp b/source/filters/filter-transform.hpp index ec79898a8f..3d3f46b005 100644 --- a/source/filters/filter-transform.hpp +++ b/source/filters/filter-transform.hpp @@ -19,13 +19,16 @@ #pragma once #include "common.hpp" -#include #include "obs/gs/gs-mipmapper.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" #include "obs/gs/gs-vertexbuffer.hpp" #include "obs/obs-source-factory.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::filter::transform { enum class transform_mode { ORTHOGRAPHIC = 0, diff --git a/source/filters/filter-upscaling.cpp b/source/filters/filter-upscaling.cpp index 610a96ac12..8ec6b78816 100644 --- a/source/filters/filter-upscaling.cpp +++ b/source/filters/filter-upscaling.cpp @@ -19,11 +19,14 @@ // SOFTWARE. #include "filter-upscaling.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/filters/filter-upscaling.hpp b/source/filters/filter-upscaling.hpp index 564016d1e4..35932bde5c 100644 --- a/source/filters/filter-upscaling.hpp +++ b/source/filters/filter-upscaling.hpp @@ -19,9 +19,6 @@ // SOFTWARE. #pragma once -#include -#include -#include #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -29,6 +26,12 @@ #include "plugin.hpp" #include "util/util-threadpool.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + #ifdef ENABLE_FILTER_UPSCALING_NVIDIA #include "nvidia/vfx/nvidia-vfx-superresolution.hpp" #endif diff --git a/source/filters/filter-virtual-greenscreen.cpp b/source/filters/filter-virtual-greenscreen.cpp index 32d8f5419c..62fb96f607 100644 --- a/source/filters/filter-virtual-greenscreen.cpp +++ b/source/filters/filter-virtual-greenscreen.cpp @@ -19,11 +19,14 @@ // SOFTWARE. #include "filter-virtual-greenscreen.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/filters/filter-virtual-greenscreen.hpp b/source/filters/filter-virtual-greenscreen.hpp index a2c5275ff2..c170add7a8 100644 --- a/source/filters/filter-virtual-greenscreen.hpp +++ b/source/filters/filter-virtual-greenscreen.hpp @@ -19,9 +19,6 @@ // SOFTWARE. #pragma once -#include -#include -#include #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -29,6 +26,12 @@ #include "plugin.hpp" #include "util/util-threadpool.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + #ifdef ENABLE_FILTER_VIRTUAL_GREENSCREEN_NVIDIA #include "nvidia/vfx/nvidia-vfx-greenscreen.hpp" #endif diff --git a/source/gfx/blur/gfx-blur-base.cpp b/source/gfx/blur/gfx-blur-base.cpp index ca0dcd99f3..74817e5e28 100644 --- a/source/gfx/blur/gfx-blur-base.cpp +++ b/source/gfx/blur/gfx-blur-base.cpp @@ -16,7 +16,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-blur-base.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" void streamfx::gfx::blur::base::set_step_scale_x(double_t v) { diff --git a/source/gfx/blur/gfx-blur-box-linear.cpp b/source/gfx/blur/gfx-blur-box-linear.cpp index c2f787cd74..59f5306aee 100644 --- a/source/gfx/blur/gfx-blur-box-linear.cpp +++ b/source/gfx/blur/gfx-blur-box-linear.cpp @@ -17,11 +17,14 @@ #include "gfx-blur-box-linear.hpp" #include "common.hpp" +#include "obs/gs/gs-helper.hpp" +#include "plugin.hpp" + +#include "warning-disable.hpp" #include #include #include -#include "obs/gs/gs-helper.hpp" -#include "plugin.hpp" +#include "warning-enable.hpp" #define ST_MAX_BLUR_SIZE 128 // Also change this in box-linear.effect if modified. diff --git a/source/gfx/blur/gfx-blur-box-linear.hpp b/source/gfx/blur/gfx-blur-box-linear.hpp index 5f6df0f09a..031604ede3 100644 --- a/source/gfx/blur/gfx-blur-box-linear.hpp +++ b/source/gfx/blur/gfx-blur-box-linear.hpp @@ -17,12 +17,15 @@ #pragma once #include "common.hpp" -#include #include "gfx-blur-base.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace blur { class box_linear_data { diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 338be7eb78..369c68c47d 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -17,11 +17,14 @@ #include "gfx-blur-box.hpp" #include "common.hpp" +#include "obs/gs/gs-helper.hpp" +#include "plugin.hpp" + +#include "warning-disable.hpp" #include #include #include -#include "obs/gs/gs-helper.hpp" -#include "plugin.hpp" +#include "warning-enable.hpp" #define ST_MAX_BLUR_SIZE 128 // Also change this in box.effect if modified. diff --git a/source/gfx/blur/gfx-blur-box.hpp b/source/gfx/blur/gfx-blur-box.hpp index 7316afbcdb..6e489ace7d 100644 --- a/source/gfx/blur/gfx-blur-box.hpp +++ b/source/gfx/blur/gfx-blur-box.hpp @@ -17,12 +17,15 @@ #pragma once #include "common.hpp" -#include #include "gfx-blur-base.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace blur { class box_data { diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index d421904f12..40ae3dba6f 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -17,11 +17,14 @@ #include "gfx-blur-dual-filtering.hpp" #include "common.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + // Dual Filtering Blur // // This type of Blur uses downsampling and upsampling and clever math. That makes it less diff --git a/source/gfx/blur/gfx-blur-dual-filtering.hpp b/source/gfx/blur/gfx-blur-dual-filtering.hpp index d594868675..2afb8942c5 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.hpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.hpp @@ -17,13 +17,16 @@ #pragma once #include "common.hpp" -#include -#include #include "gfx-blur-base.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace blur { class dual_filtering_data { diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.cpp b/source/gfx/blur/gfx-blur-gaussian-linear.cpp index e7ba118bbd..d9a11312bd 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.cpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.cpp @@ -17,9 +17,12 @@ #include "gfx-blur-gaussian-linear.hpp" #include "common.hpp" -#include #include "obs/gs/gs-helper.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + // FIXME: This breaks when MAX_KERNEL_SIZE is changed, due to the way the Gaussian // function first goes up at the point, and then once we pass the critical point // will go down again and it is not handled well. This is a pretty basic diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.hpp b/source/gfx/blur/gfx-blur-gaussian-linear.hpp index 26efe35256..e3f356d0dc 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.hpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.hpp @@ -17,13 +17,16 @@ #pragma once #include "common.hpp" -#include -#include #include "gfx-blur-base.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace blur { class gaussian_linear_data { diff --git a/source/gfx/blur/gfx-blur-gaussian.cpp b/source/gfx/blur/gfx-blur-gaussian.cpp index ebcc9bf4b4..6cc447a667 100644 --- a/source/gfx/blur/gfx-blur-gaussian.cpp +++ b/source/gfx/blur/gfx-blur-gaussian.cpp @@ -17,11 +17,14 @@ #include "gfx-blur-gaussian.hpp" #include "common.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + // TODO: It may be possible to optimize to run much faster: https://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ #define ST_KERNEL_SIZE 128u diff --git a/source/gfx/blur/gfx-blur-gaussian.hpp b/source/gfx/blur/gfx-blur-gaussian.hpp index e8d665f0d9..07ae847778 100644 --- a/source/gfx/blur/gfx-blur-gaussian.hpp +++ b/source/gfx/blur/gfx-blur-gaussian.hpp @@ -17,13 +17,16 @@ #pragma once #include "common.hpp" -#include -#include #include "gfx-blur-base.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace blur { class gaussian_data { diff --git a/source/gfx/gfx-debug.cpp b/source/gfx/gfx-debug.cpp index 77eb8ce831..9c174b2587 100644 --- a/source/gfx/gfx-debug.cpp +++ b/source/gfx/gfx-debug.cpp @@ -19,12 +19,15 @@ // SOFTWARE. #include "gfx-debug.hpp" -#include #include "graphics/matrix4.h" #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/gfx/gfx-debug.hpp b/source/gfx/gfx-debug.hpp index d904cb655e..0476c05ea6 100644 --- a/source/gfx/gfx-debug.hpp +++ b/source/gfx/gfx-debug.hpp @@ -18,10 +18,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-vertexbuffer.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { class debug { std::shared_ptr<::streamfx::obs::gs::effect> _effect; diff --git a/source/gfx/gfx-opengl.cpp b/source/gfx/gfx-opengl.cpp index d34eca168d..91f182199d 100644 --- a/source/gfx/gfx-opengl.cpp +++ b/source/gfx/gfx-opengl.cpp @@ -19,21 +19,15 @@ // SOFTWARE. #include "gfx-opengl.hpp" -#include #include "plugin.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + // OpenGL -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include "glad/gl.h" #ifdef D_PLATFORM_WINDOWS #include "glad/wgl.h" @@ -41,11 +35,7 @@ #ifdef D_PLATFORM_LINUX #include "glad/glx.h" #endif -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" #ifdef _DEBUG #define ST_PREFIX "<%s> " diff --git a/source/gfx/gfx-opengl.hpp b/source/gfx/gfx-opengl.hpp index 7696d905da..8825f467e2 100644 --- a/source/gfx/gfx-opengl.hpp +++ b/source/gfx/gfx-opengl.hpp @@ -18,7 +18,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" namespace streamfx::gfx { class opengl { diff --git a/source/gfx/gfx-source-texture.cpp b/source/gfx/gfx-source-texture.cpp index dc29091e81..9bc1f19626 100644 --- a/source/gfx/gfx-source-texture.cpp +++ b/source/gfx/gfx-source-texture.cpp @@ -16,10 +16,13 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-source-texture.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "obs/obs-tools.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + streamfx::gfx::source_texture::~source_texture() { if (_child && _parent) { diff --git a/source/gfx/gfx-source-texture.hpp b/source/gfx/gfx-source-texture.hpp index e930aff140..5eae0fc28a 100644 --- a/source/gfx/gfx-source-texture.hpp +++ b/source/gfx/gfx-source-texture.hpp @@ -17,11 +17,14 @@ #pragma once #include "common.hpp" -#include #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" #include "obs/obs-weak-source.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { class source_texture { streamfx::obs::source _parent; diff --git a/source/gfx/lut/gfx-lut-consumer.cpp b/source/gfx/lut/gfx-lut-consumer.cpp index 54f8d6853c..bfde55dd7c 100644 --- a/source/gfx/lut/gfx-lut-consumer.cpp +++ b/source/gfx/lut/gfx-lut-consumer.cpp @@ -19,7 +19,6 @@ // SOFTWARE. #include "gfx-lut-consumer.hpp" - #include "obs/gs/gs-helper.hpp" streamfx::gfx::lut::consumer::consumer() diff --git a/source/gfx/lut/gfx-lut-consumer.hpp b/source/gfx/lut/gfx-lut-consumer.hpp index c407e9b424..10bbd66bc4 100644 --- a/source/gfx/lut/gfx-lut-consumer.hpp +++ b/source/gfx/lut/gfx-lut-consumer.hpp @@ -19,12 +19,14 @@ // SOFTWARE. #pragma once -#include - #include "gfx-lut.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx::lut { class consumer { std::shared_ptr _data; diff --git a/source/gfx/lut/gfx-lut-producer.hpp b/source/gfx/lut/gfx-lut-producer.hpp index 3478faf262..50b6444698 100644 --- a/source/gfx/lut/gfx-lut-producer.hpp +++ b/source/gfx/lut/gfx-lut-producer.hpp @@ -19,11 +19,12 @@ // SOFTWARE. #pragma once +#include "warning-disable.hpp" #include - #include "gfx-lut.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" +#include "warning-enable.hpp" namespace streamfx::gfx::lut { class producer { diff --git a/source/gfx/lut/gfx-lut.cpp b/source/gfx/lut/gfx-lut.cpp index 1a06720ff8..fbd6f160f8 100644 --- a/source/gfx/lut/gfx-lut.cpp +++ b/source/gfx/lut/gfx-lut.cpp @@ -19,11 +19,14 @@ // SOFTWARE. #include "gfx-lut.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/gfx/lut/gfx-lut.hpp b/source/gfx/lut/gfx-lut.hpp index 6296c83320..e363188983 100644 --- a/source/gfx/lut/gfx-lut.hpp +++ b/source/gfx/lut/gfx-lut.hpp @@ -19,10 +19,12 @@ // SOFTWARE. #pragma once -#include - #include "obs/gs/gs-effect.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx::lut { class data { std::shared_ptr _producer_effect; diff --git a/source/gfx/shader/gfx-shader-param-basic.cpp b/source/gfx/shader/gfx-shader-param-basic.cpp index 2b0e42af67..3f61f4d7a9 100644 --- a/source/gfx/shader/gfx-shader-param-basic.cpp +++ b/source/gfx/shader/gfx-shader-param-basic.cpp @@ -17,10 +17,13 @@ #include "gfx-shader-param-basic.hpp" #include "strings.hpp" + +#include "warning-disable.hpp" #include #include #include #include +#include "warning-enable.hpp" static const std::string_view _annotation_field_type = "field_type"; static const std::string_view _annotation_suffix = "suffix"; diff --git a/source/gfx/shader/gfx-shader-param-basic.hpp b/source/gfx/shader/gfx-shader-param-basic.hpp index 0a8e0ee61d..5d3bb2638c 100644 --- a/source/gfx/shader/gfx-shader-param-basic.hpp +++ b/source/gfx/shader/gfx-shader-param-basic.hpp @@ -17,10 +17,13 @@ #pragma once #include "common.hpp" -#include #include "gfx-shader-param.hpp" #include "obs/gs/gs-effect-parameter.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace shader { enum class basic_field_type { diff --git a/source/gfx/shader/gfx-shader-param-texture.cpp b/source/gfx/shader/gfx-shader-param-texture.cpp index d26f12d742..c16f5b8fab 100644 --- a/source/gfx/shader/gfx-shader-param-texture.cpp +++ b/source/gfx/shader/gfx-shader-param-texture.cpp @@ -17,15 +17,18 @@ #include "gfx-shader-param-texture.hpp" #include "strings.hpp" -#include -#include -#include #include "gfx-shader.hpp" #include "gfx/gfx-debug.hpp" #include "obs/gs/gs-helper.hpp" #include "obs/obs-source-tracker.hpp" #include "util/util-platform.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + // TODO: // - FFT Audio Conversion // - FFT Variable Size... diff --git a/source/gfx/shader/gfx-shader-param-texture.hpp b/source/gfx/shader/gfx-shader-param-texture.hpp index 8c27f90949..564e16a09c 100644 --- a/source/gfx/shader/gfx-shader-param-texture.hpp +++ b/source/gfx/shader/gfx-shader-param-texture.hpp @@ -1,8 +1,6 @@ #pragma once #include "common.hpp" -#include -#include #include "gfx-shader-param.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -12,6 +10,11 @@ #include "obs/obs-tools.hpp" #include "obs/obs-weak-source.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::gfx { namespace shader { enum class texture_field_type { diff --git a/source/gfx/shader/gfx-shader-param.cpp b/source/gfx/shader/gfx-shader-param.cpp index 620b99e71c..a16d224716 100644 --- a/source/gfx/shader/gfx-shader-param.cpp +++ b/source/gfx/shader/gfx-shader-param.cpp @@ -16,11 +16,14 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-shader-param.hpp" -#include -#include #include "gfx-shader-param-basic.hpp" #include "gfx-shader-param-texture.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #define ST_ANNO_ORDER "order" #define ST_ANNO_VISIBILITY "visible" #define ST_ANNO_AUTOMATIC "automatic" diff --git a/source/gfx/shader/gfx-shader-param.hpp b/source/gfx/shader/gfx-shader-param.hpp index 5561aefc6f..3567d2ebf2 100644 --- a/source/gfx/shader/gfx-shader-param.hpp +++ b/source/gfx/shader/gfx-shader-param.hpp @@ -16,9 +16,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #pragma once +#include "obs/gs/gs-effect-parameter.hpp" + +#include "warning-disable.hpp" #include #include -#include "obs/gs/gs-effect-parameter.hpp" +#include "warning-enable.hpp" namespace streamfx::gfx { namespace shader { diff --git a/source/gfx/shader/gfx-shader.cpp b/source/gfx/shader/gfx-shader.cpp index e3d26693de..a40d57194b 100644 --- a/source/gfx/shader/gfx-shader.cpp +++ b/source/gfx/shader/gfx-shader.cpp @@ -16,13 +16,16 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-shader.hpp" -#include -#include -#include #include "obs/gs/gs-helper.hpp" #include "obs/obs-tools.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + #define ST_I18N "Shader" #define ST_I18N_REFRESH ST_I18N ".Refresh" #define ST_KEY_REFRESH "Shader.Refresh" diff --git a/source/gfx/shader/gfx-shader.hpp b/source/gfx/shader/gfx-shader.hpp index b90d1e62d0..06a2c33c5e 100644 --- a/source/gfx/shader/gfx-shader.hpp +++ b/source/gfx/shader/gfx-shader.hpp @@ -17,13 +17,16 @@ #pragma once #include "common.hpp" +#include "gfx/shader/gfx-shader-param.hpp" +#include "obs/gs/gs-effect.hpp" +#include "obs/gs/gs-rendertarget.hpp" + +#include "warning-disable.hpp" #include #include #include #include -#include "gfx/shader/gfx-shader-param.hpp" -#include "obs/gs/gs-effect.hpp" -#include "obs/gs/gs-rendertarget.hpp" +#include "warning-enable.hpp" namespace streamfx::gfx { namespace shader { diff --git a/source/nvidia/ar/nvidia-ar-facedetection.cpp b/source/nvidia/ar/nvidia-ar-facedetection.cpp index a27ca89739..2d826ce526 100644 --- a/source/nvidia/ar/nvidia-ar-facedetection.cpp +++ b/source/nvidia/ar/nvidia-ar-facedetection.cpp @@ -18,11 +18,14 @@ */ #include "nvidia-ar-facedetection.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/ar/nvidia-ar-feature.hpp b/source/nvidia/ar/nvidia-ar-feature.hpp index 44cda225e7..2c46e37285 100644 --- a/source/nvidia/ar/nvidia-ar-feature.hpp +++ b/source/nvidia/ar/nvidia-ar-feature.hpp @@ -19,13 +19,16 @@ // SOFTWARE. #pragma once -#include #include "nvidia/ar/nvidia-ar.hpp" #include "nvidia/cuda/nvidia-cuda-obs.hpp" #include "nvidia/cv/nvidia-cv-image.hpp" #include "nvidia/cv/nvidia-cv-texture.hpp" #include "nvidia/cv/nvidia-cv.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::ar { class feature { protected: diff --git a/source/nvidia/ar/nvidia-ar.cpp b/source/nvidia/ar/nvidia-ar.cpp index f178074a9d..b8966f5e41 100644 --- a/source/nvidia/ar/nvidia-ar.cpp +++ b/source/nvidia/ar/nvidia-ar.cpp @@ -19,13 +19,16 @@ // SOFTWARE. #include "nvidia-ar.hpp" -#include -#include #include "nvidia/cuda/nvidia-cuda-obs.hpp" #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" #include "util/util-platform.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -41,24 +44,11 @@ #endif #ifdef WIN32 -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" #define ST_LIBRARY_NAME "nvARPose.dll" #else diff --git a/source/nvidia/ar/nvidia-ar.hpp b/source/nvidia/ar/nvidia-ar.hpp index 9ec661a990..05556a6ef3 100644 --- a/source/nvidia/ar/nvidia-ar.hpp +++ b/source/nvidia/ar/nvidia-ar.hpp @@ -19,9 +19,12 @@ // SOFTWARE. #pragma once -#include #include "nvidia/cv/nvidia-cv.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #define P_NVAR_DEFINE_FUNCTION(name, ...) \ private: \ typedef ::streamfx::nvidia::cv::result (*t##name)(__VA_ARGS__); \ diff --git a/source/nvidia/cuda/nvidia-cuda-context.cpp b/source/nvidia/cuda/nvidia-cuda-context.cpp index a431a3376e..da933e49a3 100644 --- a/source/nvidia/cuda/nvidia-cuda-context.cpp +++ b/source/nvidia/cuda/nvidia-cuda-context.cpp @@ -18,9 +18,12 @@ */ #include "nvidia-cuda-context.hpp" +#include "util/util-logging.hpp" + +#include "warning-disable.hpp" #include #include -#include "util/util-logging.hpp" +#include "warning-enable.hpp" #ifdef _DEBUG #define ST_PREFIX "<%s> " @@ -37,22 +40,9 @@ #endif #ifdef WIN32 -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" #endif #define ENABLE_STACK_CHECKS diff --git a/source/nvidia/cuda/nvidia-cuda-context.hpp b/source/nvidia/cuda/nvidia-cuda-context.hpp index e231488fb1..c2d15c5435 100644 --- a/source/nvidia/cuda/nvidia-cuda-context.hpp +++ b/source/nvidia/cuda/nvidia-cuda-context.hpp @@ -18,9 +18,12 @@ */ #pragma once -#include #include "nvidia-cuda.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::cuda { class context_stack; diff --git a/source/nvidia/cuda/nvidia-cuda-gs-texture.hpp b/source/nvidia/cuda/nvidia-cuda-gs-texture.hpp index a110a81eb0..a18b37e56f 100644 --- a/source/nvidia/cuda/nvidia-cuda-gs-texture.hpp +++ b/source/nvidia/cuda/nvidia-cuda-gs-texture.hpp @@ -18,12 +18,15 @@ */ #pragma once -#include -#include #include "nvidia-cuda-stream.hpp" #include "nvidia-cuda.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::cuda { class gstexture { std::shared_ptr<::streamfx::nvidia::cuda::cuda> _cuda; diff --git a/source/nvidia/cuda/nvidia-cuda-memory.cpp b/source/nvidia/cuda/nvidia-cuda-memory.cpp index 7661c3c01a..61b1310944 100644 --- a/source/nvidia/cuda/nvidia-cuda-memory.cpp +++ b/source/nvidia/cuda/nvidia-cuda-memory.cpp @@ -18,9 +18,12 @@ */ #include "nvidia-cuda-memory.hpp" -#include #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/cuda/nvidia-cuda-memory.hpp b/source/nvidia/cuda/nvidia-cuda-memory.hpp index 4f80714b13..6de825defb 100644 --- a/source/nvidia/cuda/nvidia-cuda-memory.hpp +++ b/source/nvidia/cuda/nvidia-cuda-memory.hpp @@ -18,9 +18,12 @@ */ #pragma once +#include "nvidia-cuda.hpp" + +#include "warning-disable.hpp" #include #include -#include "nvidia-cuda.hpp" +#include "warning-enable.hpp" namespace streamfx::nvidia::cuda { class memory { diff --git a/source/nvidia/cuda/nvidia-cuda-obs.hpp b/source/nvidia/cuda/nvidia-cuda-obs.hpp index 555459c545..0239286aa9 100644 --- a/source/nvidia/cuda/nvidia-cuda-obs.hpp +++ b/source/nvidia/cuda/nvidia-cuda-obs.hpp @@ -18,11 +18,14 @@ */ #pragma once -#include #include "nvidia-cuda-context.hpp" #include "nvidia-cuda-stream.hpp" #include "nvidia-cuda.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::cuda { class obs { std::shared_ptr<::streamfx::nvidia::cuda::cuda> _cuda; diff --git a/source/nvidia/cuda/nvidia-cuda-stream.cpp b/source/nvidia/cuda/nvidia-cuda-stream.cpp index fcb7a854e7..37edb10b70 100644 --- a/source/nvidia/cuda/nvidia-cuda-stream.cpp +++ b/source/nvidia/cuda/nvidia-cuda-stream.cpp @@ -18,9 +18,12 @@ */ #include "nvidia-cuda-stream.hpp" -#include #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/cuda/nvidia-cuda-stream.hpp b/source/nvidia/cuda/nvidia-cuda-stream.hpp index 007adb68d5..1ac35daeb0 100644 --- a/source/nvidia/cuda/nvidia-cuda-stream.hpp +++ b/source/nvidia/cuda/nvidia-cuda-stream.hpp @@ -18,9 +18,12 @@ */ #pragma once -#include #include "nvidia-cuda.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::cuda { class stream { std::shared_ptr<::streamfx::nvidia::cuda::cuda> _cuda; diff --git a/source/nvidia/cuda/nvidia-cuda.cpp b/source/nvidia/cuda/nvidia-cuda.cpp index da2f44b9a6..9f80b058a4 100644 --- a/source/nvidia/cuda/nvidia-cuda.cpp +++ b/source/nvidia/cuda/nvidia-cuda.cpp @@ -18,9 +18,12 @@ */ #include "nvidia-cuda.hpp" -#include #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/cuda/nvidia-cuda.hpp b/source/nvidia/cuda/nvidia-cuda.hpp index e6f1a3b89b..f43e5fb401 100644 --- a/source/nvidia/cuda/nvidia-cuda.hpp +++ b/source/nvidia/cuda/nvidia-cuda.hpp @@ -18,29 +18,19 @@ */ #pragma once -#include -#include #include "util/util-bitmask.hpp" #include "util/util-library.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef WIN32 -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" #endif #define P_CUDA_DEFINE_FUNCTION(name, ...) \ diff --git a/source/nvidia/cv/nvidia-cv-image.hpp b/source/nvidia/cv/nvidia-cv-image.hpp index 0348d0d1b6..7d166fb879 100644 --- a/source/nvidia/cv/nvidia-cv-image.hpp +++ b/source/nvidia/cv/nvidia-cv-image.hpp @@ -19,9 +19,12 @@ // SOFTWARE. #pragma once -#include #include "nvidia/cv/nvidia-cv.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::cv { using ::streamfx::nvidia::cv::component_layout; using ::streamfx::nvidia::cv::component_type; diff --git a/source/nvidia/cv/nvidia-cv-texture.hpp b/source/nvidia/cv/nvidia-cv-texture.hpp index 0852a6f083..7ebab58e50 100644 --- a/source/nvidia/cv/nvidia-cv-texture.hpp +++ b/source/nvidia/cv/nvidia-cv-texture.hpp @@ -19,10 +19,13 @@ // SOFTWARE. #pragma once -#include #include "nvidia/cv/nvidia-cv-image.hpp" #include "obs/gs/gs-texture.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::cv { using ::streamfx::nvidia::cv::component_layout; using ::streamfx::nvidia::cv::component_type; diff --git a/source/nvidia/cv/nvidia-cv.cpp b/source/nvidia/cv/nvidia-cv.cpp index d248a9b5e3..74655cee0d 100644 --- a/source/nvidia/cv/nvidia-cv.cpp +++ b/source/nvidia/cv/nvidia-cv.cpp @@ -23,13 +23,16 @@ // - NVIDIA Augmented Reality SDK #include "nvidia-cv.hpp" -#include -#include #include "nvidia/cuda/nvidia-cuda-obs.hpp" #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" #include "util/util-platform.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -45,24 +48,11 @@ #endif #if defined(WIN32) -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" #define LIB_NAME "NVCVImage.dll" #else diff --git a/source/nvidia/cv/nvidia-cv.hpp b/source/nvidia/cv/nvidia-cv.hpp index 0d7b35d9fc..e189095a39 100644 --- a/source/nvidia/cv/nvidia-cv.hpp +++ b/source/nvidia/cv/nvidia-cv.hpp @@ -19,30 +19,17 @@ // SOFTWARE. #pragma once -#include #include "nvidia/cuda/nvidia-cuda.hpp" #include "util/util-bitmask.hpp" #include "util/util-library.hpp" +#include "warning-disable.hpp" +#include #ifdef WIN32 -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif #endif +#include "warning-enable.hpp" #define NVCVI_DEFINE_FUNCTION(name, ...) \ private: \ diff --git a/source/nvidia/vfx/nvidia-vfx-denoising.cpp b/source/nvidia/vfx/nvidia-vfx-denoising.cpp index b8f8050f24..598dfd112c 100644 --- a/source/nvidia/vfx/nvidia-vfx-denoising.cpp +++ b/source/nvidia/vfx/nvidia-vfx-denoising.cpp @@ -19,12 +19,15 @@ // SOFTWARE. #include "nvidia-vfx-denoising.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" #include "util/utility.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/vfx/nvidia-vfx-effect.cpp b/source/nvidia/vfx/nvidia-vfx-effect.cpp index b836ba063f..0500a94171 100644 --- a/source/nvidia/vfx/nvidia-vfx-effect.cpp +++ b/source/nvidia/vfx/nvidia-vfx-effect.cpp @@ -19,10 +19,13 @@ // SOFTWARE. #include "nvidia-vfx-effect.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/vfx/nvidia-vfx-effect.hpp b/source/nvidia/vfx/nvidia-vfx-effect.hpp index 2a0cbf8c6a..3b28aa298d 100644 --- a/source/nvidia/vfx/nvidia-vfx-effect.hpp +++ b/source/nvidia/vfx/nvidia-vfx-effect.hpp @@ -19,9 +19,6 @@ // SOFTWARE. #pragma once -#include -#include -#include #include "nvidia-vfx.hpp" #include "nvidia/cuda/nvidia-cuda-obs.hpp" #include "nvidia/cuda/nvidia-cuda-stream.hpp" @@ -31,6 +28,12 @@ #include "nvidia/cv/nvidia-cv.hpp" #include "nvidia/vfx/nvidia-vfx.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + namespace streamfx::nvidia::vfx { using namespace ::streamfx::nvidia; diff --git a/source/nvidia/vfx/nvidia-vfx-greenscreen.cpp b/source/nvidia/vfx/nvidia-vfx-greenscreen.cpp index e07aa35f00..e57008b1e3 100644 --- a/source/nvidia/vfx/nvidia-vfx-greenscreen.cpp +++ b/source/nvidia/vfx/nvidia-vfx-greenscreen.cpp @@ -19,13 +19,16 @@ // SOFTWARE. #include "nvidia-vfx-greenscreen.hpp" -#include -#include #include "nvidia/cv/nvidia-cv.hpp" #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" #include "util/utility.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp index eefc9f3003..f96df745d6 100644 --- a/source/nvidia/vfx/nvidia-vfx-superresolution.cpp +++ b/source/nvidia/vfx/nvidia-vfx-superresolution.cpp @@ -19,13 +19,16 @@ // SOFTWARE. #include "nvidia-vfx-superresolution.hpp" -#include -#include -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" #include "util/utility.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/nvidia/vfx/nvidia-vfx.cpp b/source/nvidia/vfx/nvidia-vfx.cpp index 0572e3a214..a9a45d2f3c 100644 --- a/source/nvidia/vfx/nvidia-vfx.cpp +++ b/source/nvidia/vfx/nvidia-vfx.cpp @@ -19,13 +19,16 @@ // SOFTWARE. #include "nvidia-vfx.hpp" -#include -#include #include "nvidia/cuda/nvidia-cuda-obs.hpp" #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" #include "util/util-platform.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -41,24 +44,11 @@ #endif #if defined(WIN32) -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" #define LIB_NAME "NVVideoEffects.dll" #else diff --git a/source/nvidia/vfx/nvidia-vfx.hpp b/source/nvidia/vfx/nvidia-vfx.hpp index 217eaff1ae..1013d2e591 100644 --- a/source/nvidia/vfx/nvidia-vfx.hpp +++ b/source/nvidia/vfx/nvidia-vfx.hpp @@ -19,9 +19,12 @@ // SOFTWARE. #pragma once -#include #include "nvidia/cv/nvidia-cv.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #define NVVFX_DEFINE_FUNCTION(name, ...) \ private: \ typedef ::streamfx::nvidia::cv::result(__cdecl* t##name)(__VA_ARGS__); \ diff --git a/source/obs/gs/gs-effect-parameter.cpp b/source/obs/gs/gs-effect-parameter.cpp index 8ac54e5a7e..0a58c0a0c8 100644 --- a/source/obs/gs/gs-effect-parameter.cpp +++ b/source/obs/gs/gs-effect-parameter.cpp @@ -18,27 +18,17 @@ */ #include "gs-effect-parameter.hpp" +#include "gs-effect-pass.hpp" + +#include "warning-disable.hpp" #include #include -#include "gs-effect-pass.hpp" +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } streamfx::obs::gs::effect_parameter::effect_parameter() diff --git a/source/obs/gs/gs-effect-pass.cpp b/source/obs/gs/gs-effect-pass.cpp index 5b3856daff..ee710f0065 100644 --- a/source/obs/gs/gs-effect-pass.cpp +++ b/source/obs/gs/gs-effect-pass.cpp @@ -18,25 +18,15 @@ */ #include "gs-effect-pass.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } streamfx::obs::gs::effect_pass::effect_pass(gs_epass_t* pass, std::shared_ptr parent) : _parent(parent) diff --git a/source/obs/gs/gs-effect-technique.cpp b/source/obs/gs/gs-effect-technique.cpp index e7bb1bb6c0..767c1b1ec2 100644 --- a/source/obs/gs/gs-effect-technique.cpp +++ b/source/obs/gs/gs-effect-technique.cpp @@ -18,26 +18,16 @@ */ #include "gs-effect-technique.hpp" + +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } streamfx::obs::gs::effect_technique::effect_technique(gs_technique_t* technique, std::shared_ptr parent) diff --git a/source/obs/gs/gs-effect.cpp b/source/obs/gs/gs-effect.cpp index a89f97bc7b..28101a932a 100644 --- a/source/obs/gs/gs-effect.cpp +++ b/source/obs/gs/gs-effect.cpp @@ -18,12 +18,15 @@ */ #include "gs-effect.hpp" +#include "obs/gs/gs-helper.hpp" +#include "util/util-platform.hpp" + +#include "warning-disable.hpp" #include #include #include #include -#include "obs/gs/gs-helper.hpp" -#include "util/util-platform.hpp" +#include "warning-enable.hpp" #define MAX_EFFECT_SIZE 32 * 1024 * 1024 // 32 MiB, big enough for everything. diff --git a/source/obs/gs/gs-effect.hpp b/source/obs/gs/gs-effect.hpp index 4d0654439b..4f1fbe25ea 100644 --- a/source/obs/gs/gs-effect.hpp +++ b/source/obs/gs/gs-effect.hpp @@ -19,11 +19,14 @@ #pragma once #include "common.hpp" -#include -#include #include "gs-effect-parameter.hpp" #include "gs-effect-technique.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + namespace streamfx::obs::gs { class effect : public std::shared_ptr { public: diff --git a/source/obs/gs/gs-helper.hpp b/source/obs/gs/gs-helper.hpp index e8f1315c3b..ad1b35de9f 100644 --- a/source/obs/gs/gs-helper.hpp +++ b/source/obs/gs/gs-helper.hpp @@ -19,9 +19,12 @@ #pragma once #include "common.hpp" -#include #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + namespace streamfx::obs::gs { class context { public: diff --git a/source/obs/gs/gs-indexbuffer.cpp b/source/obs/gs/gs-indexbuffer.cpp index 02cd4d3f5d..f677788a51 100644 --- a/source/obs/gs/gs-indexbuffer.cpp +++ b/source/obs/gs/gs-indexbuffer.cpp @@ -18,10 +18,13 @@ */ #include "gs-indexbuffer.hpp" -#include #include "gs-limits.hpp" #include "obs/gs/gs-helper.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + streamfx::obs::gs::index_buffer::index_buffer(uint32_t maximumVertices) { this->reserve(maximumVertices); diff --git a/source/obs/gs/gs-indexbuffer.hpp b/source/obs/gs/gs-indexbuffer.hpp index b160f0bd25..b1ff5bab34 100644 --- a/source/obs/gs/gs-indexbuffer.hpp +++ b/source/obs/gs/gs-indexbuffer.hpp @@ -19,7 +19,10 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" namespace streamfx::obs::gs { class index_buffer : public std::vector { diff --git a/source/obs/gs/gs-mipmapper.cpp b/source/obs/gs/gs-mipmapper.cpp index b9eada3a63..fd4df3cbf2 100644 --- a/source/obs/gs/gs-mipmapper.cpp +++ b/source/obs/gs/gs-mipmapper.cpp @@ -18,28 +18,22 @@ */ #include "gs-mipmapper.hpp" -#include -#include #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include // Direct3D 11 #ifdef _WIN32 -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4191 4242 4244 4365 4777 4986 5039 5204) -#endif #include #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#endif #endif - // OpenGL #include "glad/gl.h" +#include "warning-enable.hpp" #ifdef _WIN32 struct d3d_info { diff --git a/source/obs/gs/gs-rendertarget.cpp b/source/obs/gs/gs-rendertarget.cpp index 46e330de00..5a3a6d8457 100644 --- a/source/obs/gs/gs-rendertarget.cpp +++ b/source/obs/gs/gs-rendertarget.cpp @@ -18,9 +18,12 @@ */ #include "gs-rendertarget.hpp" -#include #include "obs/gs/gs-helper.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + streamfx::obs::gs::rendertarget::~rendertarget() { auto gctx = streamfx::obs::gs::context(); diff --git a/source/obs/gs/gs-sampler.cpp b/source/obs/gs/gs-sampler.cpp index bd6913bb16..8a801bad51 100644 --- a/source/obs/gs/gs-sampler.cpp +++ b/source/obs/gs/gs-sampler.cpp @@ -18,7 +18,10 @@ */ #include "gs-sampler.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" streamfx::obs::gs::sampler::sampler() { diff --git a/source/obs/gs/gs-texture.cpp b/source/obs/gs/gs-texture.cpp index eb4f17e9d5..e71e800894 100644 --- a/source/obs/gs/gs-texture.cpp +++ b/source/obs/gs/gs-texture.cpp @@ -18,10 +18,13 @@ */ #include "gs-texture.hpp" +#include "obs/gs/gs-helper.hpp" + +#include "warning-disable.hpp" #include #include #include -#include "obs/gs/gs-helper.hpp" +#include "warning-enable.hpp" static uint32_t decode_flags(streamfx::obs::gs::texture::flags texture_flags) { diff --git a/source/obs/gs/gs-vertex.cpp b/source/obs/gs/gs-vertex.cpp index 1052a4f771..39102cb59a 100644 --- a/source/obs/gs/gs-vertex.cpp +++ b/source/obs/gs/gs-vertex.cpp @@ -18,7 +18,10 @@ */ #include "gs-vertex.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" streamfx::obs::gs::vertex::vertex() : position(nullptr), normal(nullptr), tangent(nullptr), color(nullptr), _has_store(true), _store(nullptr) diff --git a/source/obs/gs/gs-vertexbuffer.cpp b/source/obs/gs/gs-vertexbuffer.cpp index 8ba49ad731..6e652a2409 100644 --- a/source/obs/gs/gs-vertexbuffer.cpp +++ b/source/obs/gs/gs-vertexbuffer.cpp @@ -18,9 +18,12 @@ */ #include "gs-vertexbuffer.hpp" -#include #include "obs/gs/gs-helper.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + void streamfx::obs::gs::vertex_buffer::initialize(uint32_t capacity, uint8_t layers) { finalize(); diff --git a/source/obs/obs-source-tracker.cpp b/source/obs/obs-source-tracker.cpp index aba02a92d5..133afc4391 100644 --- a/source/obs/obs-source-tracker.cpp +++ b/source/obs/obs-source-tracker.cpp @@ -18,11 +18,14 @@ */ #include "obs-source-tracker.hpp" -#include -#include #include "obs/obs-tools.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/obs/obs-source-tracker.hpp b/source/obs/obs-source-tracker.hpp index a8303a70f6..13a35dca9d 100644 --- a/source/obs/obs-source-tracker.hpp +++ b/source/obs/obs-source-tracker.hpp @@ -19,9 +19,12 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include #include #include +#include "warning-enable.hpp" namespace streamfx::obs { class source_tracker { diff --git a/source/obs/obs-tools.cpp b/source/obs/obs-tools.cpp index c15068203c..f9e0fd582d 100644 --- a/source/obs/obs-tools.cpp +++ b/source/obs/obs-tools.cpp @@ -18,13 +18,16 @@ */ #include "obs-tools.hpp" -#include -#include -#include #include "obs-source.hpp" #include "obs-weak-source.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include "warning-enable.hpp" + struct __sfs_data { std::set<::streamfx::obs::weak_source> sources; }; diff --git a/source/obs/obs-weak-source.hpp b/source/obs/obs-weak-source.hpp index b28020e99c..301f22248e 100644 --- a/source/obs/obs-weak-source.hpp +++ b/source/obs/obs-weak-source.hpp @@ -18,9 +18,12 @@ #pragma once #include "common.hpp" -#include #include "obs-source.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + // ToDo: // - Is FORCE_INLINE necessary for optimal performance, or can LTO handle this? diff --git a/source/plugin.cpp b/source/plugin.cpp index cdb5d6e339..25dff0c050 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -18,8 +18,6 @@ */ #include "plugin.hpp" -#include -#include #include "configuration.hpp" #include "gfx/gfx-opengl.hpp" #include "obs/gs/gs-helper.hpp" @@ -91,6 +89,11 @@ //static std::shared_ptr _updater; #endif +#include "warning-disable.hpp" +#include +#include +#include "warning-enable.hpp" + static std::shared_ptr _threadpool; static std::shared_ptr _gs_fstri_vb; static std::shared_ptr _streamfx_gfx_opengl; diff --git a/source/sources/source-mirror.hpp b/source/sources/source-mirror.hpp index d0f7da0d01..5bea7e61c3 100644 --- a/source/sources/source-mirror.hpp +++ b/source/sources/source-mirror.hpp @@ -19,11 +19,6 @@ #pragma once #include "common.hpp" -#include -#include -#include -#include -#include #include "gfx/gfx-source-texture.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-sampler.hpp" @@ -33,6 +28,14 @@ #include "obs/obs-source.hpp" #include "obs/obs-tools.hpp" +#include "warning-disable.hpp" +#include +#include +#include +#include +#include +#include "warning-enable.hpp" + namespace streamfx::source::mirror { struct mirror_audio_data { mirror_audio_data(const audio_data*, speaker_layout); diff --git a/source/sources/source-shader.cpp b/source/sources/source-shader.cpp index 1a05c77c85..c41d303d94 100644 --- a/source/sources/source-shader.cpp +++ b/source/sources/source-shader.cpp @@ -19,10 +19,13 @@ #include "source-shader.hpp" #include "strings.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/transitions/transition-shader.cpp b/source/transitions/transition-shader.cpp index fd914d636e..58f68ea44c 100644 --- a/source/transitions/transition-shader.cpp +++ b/source/transitions/transition-shader.cpp @@ -19,10 +19,13 @@ #include "transition-shader.hpp" #include "strings.hpp" -#include #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/ui/ui-about-entry.hpp b/source/ui/ui-about-entry.hpp index 692fe88578..88186329dc 100644 --- a/source/ui/ui-about-entry.hpp +++ b/source/ui/ui-about-entry.hpp @@ -19,24 +19,16 @@ #pragma once #include "ui-common.hpp" -#include #include "ui-about.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + +#include "warning-disable.hpp" #include #include "ui_about-entry.h" - -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" namespace streamfx::ui { class about_entry : public QWidget, public Ui::AboutEntry { diff --git a/source/ui/ui-about.cpp b/source/ui/ui-about.cpp index 076233f283..07fe95d44b 100644 --- a/source/ui/ui-about.cpp +++ b/source/ui/ui-about.cpp @@ -19,32 +19,18 @@ #include "ui-about.hpp" #include "ui-common.hpp" -#include -#include -#include -#include -#include #include "plugin.hpp" #include "ui-about-entry.hpp" #include "util/util-logging.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4623) -#pragma warning(disable : 4625) -#pragma warning(disable : 4626) -#pragma warning(disable : 5027) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" +#include +#include +#include +#include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include +#include "warning-enable.hpp" #ifdef _DEBUG #define ST_PREFIX "<%s> " diff --git a/source/ui/ui-about.hpp b/source/ui/ui-about.hpp index 92b8d3b78d..9965902a31 100644 --- a/source/ui/ui-about.hpp +++ b/source/ui/ui-about.hpp @@ -21,19 +21,9 @@ #include "common.hpp" #include "ui-common.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include "ui_about.h" -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" namespace streamfx::ui { class about : public QDialog, public Ui::About { diff --git a/source/ui/ui-common.hpp b/source/ui/ui-common.hpp index 1820d6a3b4..588528512a 100644 --- a/source/ui/ui-common.hpp +++ b/source/ui/ui-common.hpp @@ -20,13 +20,7 @@ #pragma once #include "common.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include @@ -40,27 +34,10 @@ #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } diff --git a/source/ui/ui-updater.hpp b/source/ui/ui-updater.hpp index daa14f8d9c..8c89839ed0 100644 --- a/source/ui/ui-updater.hpp +++ b/source/ui/ui-updater.hpp @@ -22,13 +22,7 @@ #include "ui-common.hpp" #include "updater.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include @@ -41,11 +35,7 @@ Q_DECLARE_METATYPE(::streamfx::version_stage); -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" namespace streamfx::ui { class updater_dialog : public QDialog, public Ui::Updater { diff --git a/source/ui/ui.cpp b/source/ui/ui.cpp index 62b25bed2f..c8d21d22f5 100644 --- a/source/ui/ui.cpp +++ b/source/ui/ui.cpp @@ -20,11 +20,14 @@ #include "ui.hpp" #include "strings.hpp" #include "ui-common.hpp" -#include #include "configuration.hpp" #include "obs/obs-tools.hpp" #include "plugin.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + // Translation Keys constexpr std::string_view _i18n_prefix = "StreamFX::"; constexpr std::string_view _i18n_menu = "UI.Menu"; diff --git a/source/updater.cpp b/source/updater.cpp index 47f3553fed..98b5924b31 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -20,13 +20,16 @@ #include "updater.hpp" #include "version.hpp" +#include "configuration.hpp" +#include "plugin.hpp" +#include "util/util-logging.hpp" + +#include "warning-disable.hpp" #include #include #include #include -#include "configuration.hpp" -#include "plugin.hpp" -#include "util/util-logging.hpp" +#include "warning-enable.hpp" #ifdef _DEBUG #define ST_PREFIX "<%s> " diff --git a/source/updater.hpp b/source/updater.hpp index c64dabccdb..7b8a8fdcb7 100644 --- a/source/updater.hpp +++ b/source/updater.hpp @@ -19,30 +19,16 @@ // SOFTWARE. #pragma once -#include -#include -#include #include "util/util-curl.hpp" #include "util/util-event.hpp" #include "util/util-threadpool.hpp" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4623) -#pragma warning(disable : 4625) -#pragma warning(disable : 4626) -#pragma warning(disable : 5027) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" +#include +#include +#include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" namespace streamfx { enum class version_stage : uint8_t { diff --git a/source/util/util-bitmask.hpp b/source/util/util-bitmask.hpp index 05a87cee53..546d14d818 100644 --- a/source/util/util-bitmask.hpp +++ b/source/util/util-bitmask.hpp @@ -18,8 +18,10 @@ */ #pragma once +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" template struct enable_bitmask_operators { diff --git a/source/util/util-curl.cpp b/source/util/util-curl.cpp index 75db704d2c..36f53e979b 100644 --- a/source/util/util-curl.cpp +++ b/source/util/util-curl.cpp @@ -19,7 +19,10 @@ // SOFTWARE. #include "util-curl.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" int32_t streamfx::util::curl::debug_helper(CURL* handle, curl_infotype type, char* data, size_t size, streamfx::util::curl* self) diff --git a/source/util/util-curl.hpp b/source/util/util-curl.hpp index c8c9304075..e8be4e98a8 100644 --- a/source/util/util-curl.hpp +++ b/source/util/util-curl.hpp @@ -19,33 +19,19 @@ // SOFTWARE. #pragma once +#include "warning-disable.hpp" #include #include #include #include #include #include +#include "warning-enable.hpp" extern "C" { -#ifndef NOMINMAX -#define NOMINMAX -#endif -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } namespace streamfx::util { diff --git a/source/util/util-event.hpp b/source/util/util-event.hpp index 7e8a584731..2b45b09b0d 100644 --- a/source/util/util-event.hpp +++ b/source/util/util-event.hpp @@ -19,9 +19,12 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include #include #include +#include "warning-enable.hpp" namespace streamfx::util { template diff --git a/source/util/util-library.cpp b/source/util/util-library.cpp index 5c266cfb33..05df817314 100644 --- a/source/util/util-library.cpp +++ b/source/util/util-library.cpp @@ -19,7 +19,6 @@ // SOFTWARE. #include "util-library.hpp" -#include #include "util-platform.hpp" #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) // Windows @@ -28,11 +27,14 @@ #define ST_UNIX #endif +#include "warning-disable.hpp" +#include #if defined(ST_WINDOWS) #include #elif defined(ST_UNIX) #include #endif +#include "warning-enable.hpp" streamfx::util::library::library(std::filesystem::path file) : _library(nullptr) { diff --git a/source/util/util-library.hpp b/source/util/util-library.hpp index 2892ec22cd..9cb781dd0c 100644 --- a/source/util/util-library.hpp +++ b/source/util/util-library.hpp @@ -19,9 +19,11 @@ // SOFTWARE. #pragma once +#include "warning-disable.hpp" #include #include #include +#include "warning-enable.hpp" namespace streamfx::util { class library { diff --git a/source/util/util-logging.cpp b/source/util/util-logging.cpp index 0164913652..c29bfcbc25 100644 --- a/source/util/util-logging.cpp +++ b/source/util/util-logging.cpp @@ -19,7 +19,10 @@ #include "util-logging.hpp" #include "common.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" void streamfx::util::logging::log(level lvl, const char* format, ...) { diff --git a/source/util/util-logging.hpp b/source/util/util-logging.hpp index 9f1818946d..2df58acbaa 100644 --- a/source/util/util-logging.hpp +++ b/source/util/util-logging.hpp @@ -18,8 +18,10 @@ */ #pragma once +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" #define P_LOG(...) streamfx::util::logging::log(__VA_ARGS__); #define P_LOG_ERROR(...) P_LOG(streamfx::util::logging::level::LEVEL_ERROR, __VA_ARGS__) diff --git a/source/util/util-platform.cpp b/source/util/util-platform.cpp index 0fe41e9476..4d663328c3 100644 --- a/source/util/util-platform.cpp +++ b/source/util/util-platform.cpp @@ -39,7 +39,9 @@ #endif #ifdef WIN32 +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" std::string streamfx::util::platform::native_to_utf8(std::wstring const& v) { diff --git a/source/util/util-platform.hpp b/source/util/util-platform.hpp index 16b606808e..2b39d34855 100644 --- a/source/util/util-platform.hpp +++ b/source/util/util-platform.hpp @@ -22,8 +22,10 @@ // OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" namespace streamfx::util::platform { #ifdef WIN32 diff --git a/source/util/util-profiler.cpp b/source/util/util-profiler.cpp index cc1d3ef84e..8c030f6ebb 100644 --- a/source/util/util-profiler.cpp +++ b/source/util/util-profiler.cpp @@ -18,7 +18,10 @@ */ #include "util-profiler.hpp" + +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" streamfx::util::profiler::profiler() {} diff --git a/source/util/util-profiler.hpp b/source/util/util-profiler.hpp index 8eb710a526..623a4d9c5e 100644 --- a/source/util/util-profiler.hpp +++ b/source/util/util-profiler.hpp @@ -19,9 +19,12 @@ #pragma once #include "common.hpp" + +#include "warning-disable.hpp" #include #include #include +#include "warning-enable.hpp" namespace streamfx::util { class profiler : public std::enable_shared_from_this { diff --git a/source/util/util-threadpool.cpp b/source/util/util-threadpool.cpp index ceb8537fe8..5e719a42c6 100644 --- a/source/util/util-threadpool.cpp +++ b/source/util/util-threadpool.cpp @@ -19,9 +19,12 @@ #include "util-threadpool.hpp" #include "common.hpp" -#include #include "util/util-logging.hpp" +#include "warning-disable.hpp" +#include +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) diff --git a/source/util/util-threadpool.hpp b/source/util/util-threadpool.hpp index 6b824f4587..a003a17059 100644 --- a/source/util/util-threadpool.hpp +++ b/source/util/util-threadpool.hpp @@ -18,6 +18,7 @@ */ #pragma once +#include "warning-disable.hpp" #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include "warning-enable.hpp" namespace streamfx::util { typedef std::shared_ptr threadpool_data_t; diff --git a/source/util/utility.cpp b/source/util/utility.cpp index 868f991027..d800b05d0e 100644 --- a/source/util/utility.cpp +++ b/source/util/utility.cpp @@ -19,10 +19,13 @@ #include "utility.hpp" #include "common.hpp" +#include "plugin.hpp" + +#include "warning-disable.hpp" #include #include #include -#include "plugin.hpp" +#include "warning-enable.hpp" obs_property_t* streamfx::util::obs_properties_add_tristate(obs_properties_t* props, const char* name, const char* desc) { diff --git a/source/util/utility.hpp b/source/util/utility.hpp index 5a4815982f..7165199a51 100644 --- a/source/util/utility.hpp +++ b/source/util/utility.hpp @@ -18,32 +18,21 @@ */ #pragma once +#include "warning-disable.hpp" #include #include #include #include #include +#include "warning-enable.hpp" extern "C" { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4464) -#pragma warning(disable : 4820) -#pragma warning(disable : 5220) -#else -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wall" -#pragma GCC diagnostic ignored "-Wextra" -#endif +#include "warning-disable.hpp" #include #include #include #include -#ifdef _MSC_VER -#pragma warning(pop) -#else -#pragma GCC diagnostic pop -#endif +#include "warning-enable.hpp" } // Constants diff --git a/source/warning-disable.hpp b/source/warning-disable.hpp new file mode 100644 index 0000000000..f06bbf7ed8 --- /dev/null +++ b/source/warning-disable.hpp @@ -0,0 +1,12 @@ +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wall" +#pragma clang diagnostic ignored "-Wextra" +#elif defined(__GNUC__) || defined(__GNUG__) +#pragma gcc diagnostic push +#pragma gcc diagnostic ignored "-Wall" +#pragma gcc diagnostic ignored "-Wextra" +#elif defined(_MSC_VER) +#pragma warning(push, 0) +#else +#endif diff --git a/source/warning-enable.hpp b/source/warning-enable.hpp new file mode 100644 index 0000000000..6afcf28689 --- /dev/null +++ b/source/warning-enable.hpp @@ -0,0 +1,8 @@ +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) || defined(__GNUG__) +#pragma gcc diagnostic pop +#elif defined(_MSC_VER) +#pragma warning(pop) +#else +#endif diff --git a/source/windll.cpp b/source/windll.cpp index 30b9cd6ebf..d2591fa7a1 100644 --- a/source/windll.cpp +++ b/source/windll.cpp @@ -17,7 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "warning-disable.hpp" #include +#include "warning-enable.hpp" BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID) { diff --git a/templates/module.cpp.in b/templates/module.cpp.in index a81a12981a..9f690998e7 100644 --- a/templates/module.cpp.in +++ b/templates/module.cpp.in @@ -1,3 +1,5 @@ +#include "warning-disable.hpp" + #include "common.hpp" OBS_DECLARE_MODULE() @@ -14,3 +16,4 @@ MODULE_EXPORT const char* obs_module_description() return "@PROJECT_DESCRIPTION@"; } +#include "warning-enable.hpp" diff --git a/templates/version.hpp.in b/templates/version.hpp.in index baf8a53e0c..5d24ea9d11 100644 --- a/templates/version.hpp.in +++ b/templates/version.hpp.in @@ -19,8 +19,10 @@ // SOFTWARE. #pragma once +#include "warning-disable.hpp" #include #include +#include "warning-enable.hpp" #define STREAMFX_MAKE_VERSION(major, minor, patch, tweak) \ (((uint64_t(major) & 0xFFFFull) << 48ull) | ((uint64_t(minor) & 0xFFFFull) << 32ull) \ From 1c7350edf718521b979ef79cc6c01a0065b11a1a Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 29 Aug 2022 12:44:25 +0200 Subject: [PATCH 101/164] code: Fix initialization order for constructors Prevents some out-of-order events from occurring. --- source/filters/filter-autoframing.cpp | 4 ++-- source/filters/filter-color-grade.cpp | 12 ++++-------- source/filters/filter-denoising.cpp | 4 ++-- source/filters/filter-transform.cpp | 4 ++-- source/filters/filter-upscaling.cpp | 7 +++---- source/gfx/gfx-source-texture.cpp | 2 +- 6 files changed, 14 insertions(+), 19 deletions(-) diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index dd79ba5135..c9151ac372 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -183,8 +183,8 @@ autoframing_instance::autoframing_instance(obs_data_t* data, obs_source_t* self) _track_mode(tracking_mode::SOLO), _track_frequency(1), - _motion_prediction(0.0), _motion_smoothing(0.0), _motion_smoothing_kalman_pnc(1.), - _motion_smoothing_kalman_mnc(1.), + _motion_smoothing(0.0), _motion_smoothing_kalman_pnc(1.), _motion_smoothing_kalman_mnc(1.), + _motion_prediction(0.0), _frame_stability(0.), _frame_stability_kalman(1.), _frame_padding_prc(), _frame_padding(), _frame_offset_prc(), _frame_offset(), _frame_aspect_ratio(0.0), diff --git a/source/filters/filter-color-grade.cpp b/source/filters/filter-color-grade.cpp index 34f23986f9..9bdf929fe5 100644 --- a/source/filters/filter-color-grade.cpp +++ b/source/filters/filter-color-grade.cpp @@ -128,14 +128,10 @@ static constexpr std::string_view HELP_URL = "https://github.com/Xaymar/obs-Stre color_grade_instance::~color_grade_instance() {} color_grade_instance::color_grade_instance(obs_data_t* data, obs_source_t* self) - : obs::source_instance(data, self), _effect(), - - _lift(), _gamma(), _gain(), _offset(), _tint_detection(), _tint_luma(), _tint_exponent(), _tint_low(), - _tint_mid(), _tint_hig(), _correction(), _lut_enabled(true), _lut_depth(), - - _cache_rt(), _cache_texture(), _cache_fresh(false), - - _lut_initialized(false), _lut_dirty(true), _lut_producer(), _lut_consumer() + : obs::source_instance(data, self), _effect(), _lift(), _gamma(), _gain(), _offset(), _tint_detection(), + _tint_luma(), _tint_exponent(), _tint_low(), _tint_mid(), _tint_hig(), _correction(), _lut_enabled(true), + _lut_depth(), _ccache_rt(), _ccache_texture(), _ccache_fresh(false), _lut_initialized(false), _lut_dirty(true), + _lut_producer(), _lut_consumer(), _lut_rt(), _lut_texture(), _cache_rt(), _cache_texture(), _cache_fresh(false) { { auto gctx = streamfx::obs::gs::context(); diff --git a/source/filters/filter-denoising.cpp b/source/filters/filter-denoising.cpp index 73e3a7e065..7b38cceec9 100644 --- a/source/filters/filter-denoising.cpp +++ b/source/filters/filter-denoising.cpp @@ -90,8 +90,8 @@ std::string streamfx::filter::denoising::string(denoising_provider provider) denoising_instance::denoising_instance(obs_data_t* data, obs_source_t* self) : obs::source_instance(data, self), - _size(1, 1), _provider_ready(false), _provider(denoising_provider::INVALID), _provider_lock(), _provider_task(), - _input(), _output() + _size(1, 1), _provider(denoising_provider::INVALID), _provider_ui(denoising_provider::INVALID), + _provider_ready(false), _provider_lock(), _provider_task(), _input(), _output() { D_LOG_DEBUG("Initializating... (Addr: 0x%" PRIuPTR ")", this); diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index b45f9e43be..ac61f74aa2 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -108,8 +108,8 @@ enum RotationOrder : int64_t { }; transform_instance::transform_instance(obs_data_t* data, obs_source_t* context) - : obs::source_instance(data, context), _camera_mode(), _camera_fov(), _standard_effect(), _transform_effect(), - _sampler(), _params(), _corners(), _cache_rendered(), _mipmap_enabled(), _source_rendered(), _source_size(), + : obs::source_instance(data, context), _camera_mode(), _camera_fov(), _params(), _corners(), _standard_effect(), + _transform_effect(), _sampler(), _cache_rendered(), _mipmap_enabled(), _source_rendered(), _source_size(), _update_mesh(true) { { diff --git a/source/filters/filter-upscaling.cpp b/source/filters/filter-upscaling.cpp index 8ec6b78816..cc58f564c8 100644 --- a/source/filters/filter-upscaling.cpp +++ b/source/filters/filter-upscaling.cpp @@ -93,10 +93,9 @@ std::string streamfx::filter::upscaling::string(upscaling_provider provider) // Instance //------------------------------------------------------------------------------ upscaling_instance::upscaling_instance(obs_data_t* data, obs_source_t* self) - : obs::source_instance(data, self), - - _in_size(1, 1), _out_size(1, 1), _provider_ready(false), _provider(upscaling_provider::INVALID), _provider_lock(), - _provider_task(), _input(), _output(), _dirty(false) + : obs::source_instance(data, self), _in_size(1, 1), _out_size(1, 1), _provider(upscaling_provider::INVALID), + _provider_ui(upscaling_provider::INVALID), _provider_ready(false), _provider_lock(), _provider_task(), _input(), + _output(), _dirty(false) { D_LOG_DEBUG("Initializating... (Addr: 0x%" PRIuPTR ")", this); diff --git a/source/gfx/gfx-source-texture.cpp b/source/gfx/gfx-source-texture.cpp index 9bc1f19626..1066f11752 100644 --- a/source/gfx/gfx-source-texture.cpp +++ b/source/gfx/gfx-source-texture.cpp @@ -31,7 +31,7 @@ streamfx::gfx::source_texture::~source_texture() } streamfx::gfx::source_texture::source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent) - : _child(child.lock()), _parent(parent.lock()) + : _parent(parent.lock()), _child(child.lock()) { // Verify that 'child' and 'parent' exist. if (!_child || !_parent) { From 15bf5b8e6482d9d68d3412b11d299955f04b0aae Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 30 Aug 2022 12:42:48 +0200 Subject: [PATCH 102/164] cmake: Remove pointless floating math contract option --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e2f30db49..fa23b80444 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1916,13 +1916,11 @@ elseif(D_PLATFORM_LINUX AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_ else() target_compile_options(${PROJECT_NAME} PRIVATE "-ffp-model=fast" - "-ffp-contract=on" ) endif() else() target_compile_options(${PROJECT_NAME} PRIVATE "-ffp-model=precise" - "-ffp-contract=on" ) endif() From f1c91f167132567f0b8921f085116f7048a92e99 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 30 Aug 2022 13:34:29 +0200 Subject: [PATCH 103/164] ci: Install GLES, EGL and OpenGL development files (Linux) --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6261094336..9fecf4a8d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -195,7 +195,7 @@ jobs: qtbase5-dev qtbase5-private-dev libqt5svg5-dev elif [[ ${{ matrix.qt }} -eq 6 ]]; then sudo apt-get -y install -V \ - qt6-base-dev qt6-base-private-dev libqt6svg6-dev + qt6-base-dev qt6-base-private-dev libqt6svg6-dev libgles2-mesa-dev libegl1-mesa-dev libgl1-mesa-dev fi fi From 6c8578e5552c727bd162a83e9783ada6e1b73005 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 1 Sep 2022 16:21:23 +0200 Subject: [PATCH 104/164] third-party: Update obs-studio to 28.0.0 --- third-party/obs-studio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/obs-studio b/third-party/obs-studio index f5be6f5fdd..09da3ac439 160000 --- a/third-party/obs-studio +++ b/third-party/obs-studio @@ -1 +1 @@ -Subproject commit f5be6f5fdd2fe34b18518ecd38030f0768845688 +Subproject commit 09da3ac4397ee9b1431c9c97cd2c71484b240382 From 78e5c10a74b5d1d514241b46c3dd005f732a54ca Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 1 Sep 2022 16:33:21 +0200 Subject: [PATCH 105/164] code: Fix GCC warning diagnostic pragmas --- source/warning-disable.hpp | 6 +++--- source/warning-enable.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/warning-disable.hpp b/source/warning-disable.hpp index f06bbf7ed8..37bf729da7 100644 --- a/source/warning-disable.hpp +++ b/source/warning-disable.hpp @@ -3,9 +3,9 @@ #pragma clang diagnostic ignored "-Wall" #pragma clang diagnostic ignored "-Wextra" #elif defined(__GNUC__) || defined(__GNUG__) -#pragma gcc diagnostic push -#pragma gcc diagnostic ignored "-Wall" -#pragma gcc diagnostic ignored "-Wextra" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wall" +#pragma GCC diagnostic ignored "-Wextra" #elif defined(_MSC_VER) #pragma warning(push, 0) #else diff --git a/source/warning-enable.hpp b/source/warning-enable.hpp index 6afcf28689..0bb2fdf396 100644 --- a/source/warning-enable.hpp +++ b/source/warning-enable.hpp @@ -1,7 +1,7 @@ #if defined(__clang__) #pragma clang diagnostic pop #elif defined(__GNUC__) || defined(__GNUG__) -#pragma gcc diagnostic pop +#pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) #else From e59660a18fb06f877f9eae4e3bc86c2d97690bde Mon Sep 17 00:00:00 2001 From: Xaymar Date: Thu, 1 Sep 2022 17:11:00 +0200 Subject: [PATCH 106/164] locale: New Crowdin updates (#897) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Japanese) --- data/locale/ja-JP.ini | 2 ++ data/locale/zh-CN.ini | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index 4002398e8b..32e742ea0f 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -54,6 +54,7 @@ UI.Updater.Menu.Channel="アップデートチャンネル" UI.Updater.Menu.Channel.Alpha="アルファ" Encoder.AOM.AV1="AIM AV1 (direct)" +Encoder.AOM.AV1.Deprecated="このエンコーダは非推奨で、間もなく削除されます。 統合された「SVT-AV1」または「AOM AV1」エンコーダにできるだけ早く切り替えることをお勧めします。" Encoder.AOM.AV1.Encoder="エンコーダー" Encoder.AOM.AV1.Encoder.Usage="利用" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="高品質" @@ -327,6 +328,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="弱" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="強" Filter.Displacement="ディスプレイスメントマッピング" +Filter.Displacement.Deprecated="このフィルターは非推奨であり、削除されました。ユーザーは 'displace.effect' の例で 'Shader' フィルターに移行することをお勧めします。" Filter.Displacement.File="ファイル" Filter.Displacement.Scale="スケール" Filter.Displacement.Scale.Type="スケールタイプ" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index df15518df9..cf0ec4293a 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -128,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="帧" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="秒" Encoder.FFmpeg.KeyFrames.Interval="间隔" +Encoder.FFmpeg.AMF.Deprecated="此编码器已弃用并很快将被删除。请尽快迁移到集成的 “AMD HW H.264 (AVC)” 或 “AMD HW H.265 (HEVC)” 编码器。" Encoder.FFmpeg.AMF.Preset="预设" Encoder.FFmpeg.AMF.Preset.Speed="速度" Encoder.FFmpeg.AMF.Preset.Balanced="平衡" @@ -187,8 +188,10 @@ Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="恒量化参数" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="可变比特率" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="恒定比特率" Encoder.FFmpeg.NVENC.RateControl.TwoPass="双通道" -Encoder.FFmpeg.NVENC.RateControl.MultiPass="多路径" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="多次编码" Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="单次通过" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="第一次以四分之一分辨率,第二次以完整分辨率进行二次编码" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="以完整分辨率进行二次编码" Encoder.FFmpeg.NVENC.RateControl.LookAhead="预测(Look Ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="自适应 I 帧" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="自适应 B 帧" @@ -500,4 +503,10 @@ Codec.ProRes.Profile.AP4H="4444 高品质/高清(AP4H)" Codec.ProRes.Profile.AP4X="444 超高品质/XQ (AP4X)" Codec.DNxHR.Profile="配置" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" From 630600fd96765de0d11016c6d09ba8a4d1fbc668 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Mon, 5 Sep 2022 07:40:34 +0200 Subject: [PATCH 107/164] locale: New Crowdin updates (#907) * New translations en-US.ini (Portuguese) * New translations en-US.ini (Portuguese) * New translations en-US.ini (Italian) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Swedish) * New translations en-US.ini (Turkish) * New translations en-US.ini (Indonesian) * New translations en-US.ini (Portuguese) * New translations en-US.ini (Estonian) * New translations en-US.ini (Polish) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Greek) * New translations en-US.ini (Romanian) * New translations en-US.ini (French) * New translations en-US.ini (Spanish) * New translations en-US.ini (Bulgarian) * New translations en-US.ini (Czech) * New translations en-US.ini (Danish) * New translations en-US.ini (German) * New translations en-US.ini (Finnish) * New translations en-US.ini (Hungarian) * New translations en-US.ini (Japanese) * New translations en-US.ini (Dutch) --- data/locale/bg-BG.ini | 483 ++++++++++++++++++++++++++++++++++++++++++ data/locale/cs-CZ.ini | 102 +++++++++ data/locale/da-DK.ini | 427 +++++++++++++++++++++++++++++++++++++ data/locale/de-DE.ini | 6 + data/locale/el-GR.ini | 483 ++++++++++++++++++++++++++++++++++++++++++ data/locale/es-ES.ini | 1 + data/locale/et-EE.ini | 483 ++++++++++++++++++++++++++++++++++++++++++ data/locale/fi-FI.ini | 89 ++++++++ data/locale/fr-FR.ini | 15 ++ data/locale/hu-HU.ini | 261 +++++++++++++++++++++++ data/locale/id-ID.ini | 473 +++++++++++++++++++++++++++++++++++++++++ data/locale/it-IT.ini | 1 + data/locale/ja-JP.ini | 38 ++++ data/locale/nl-NL.ini | 30 +++ data/locale/pl-PL.ini | 1 + data/locale/pt-BR.ini | 120 +++++++++++ data/locale/pt-PT.ini | 373 ++++++++++++++++++++++++++++++++ data/locale/ro-RO.ini | 207 ++++++++++++++++++ data/locale/sv-SE.ini | 459 +++++++++++++++++++++++++++++++++++++++ data/locale/tr-TR.ini | 215 +++++++++++++++++++ data/locale/zh-CN.ini | 1 + 21 files changed, 4268 insertions(+) diff --git a/data/locale/bg-BG.ini b/data/locale/bg-BG.ini index 975a9c217f..f4fdbe9f9f 100644 --- a/data/locale/bg-BG.ini +++ b/data/locale/bg-BG.ini @@ -1,30 +1,513 @@ +Advanced="Разширени опции" +Manual.Open="Отворено ръководство" +Channel.Red="Червено" +Channel.Green="Зелен" +Channel.Blue="Синьо" +Channel.Alpha="Alpha" +FileType.Image="Изображение" +FileType.Images="Изображения" +FileType.Video="Видео" +FileType.Videos="Видеоклипове" +FileType.Sound="Звук" +FileType.Sounds="Звуци" +FileType.Effect="Ефект" +FileType.Effects="Ефекти" +SourceType.Source="Източник:" +SourceType.Scene="Сцена" +State.Disabled="Инвалиди" +State.Enabled="Разрешено" +State.Manual="Ръководство" +State.Automatic="Автоматичен" +State.Default="По подразбиране" +UI.Menu="StreamFX" +UI.Menu.Wiki="Прочетете уикипедията" +UI.Menu.Support="Помощ и поддръжка" +UI.Menu.Website="Посетете уебсайта на StreamFX" +UI.Menu.Discord="Присъединете се към StreamFX Discord" +UI.Menu.Twitter="Следвайте StreamFX в Twitter" +UI.Menu.YouTube="Абонирайте се за StreamFX в YouTube" +UI.Menu.About="За StreamFX" +UI.About.Title="За StreamFX" +UI.About.Text="

StreamFX е възможен благодарение на всички поддръжници на Patreon, на Github Sponsors, както и на всички, които правят дарения чрез PayPal. Допълнителни благодарности изказваме на всички преводачи, които помагат за локализацията на Crowdin. Всички вие сте невероятни!

" +UI.About.Role.Contributor="Донор" +UI.About.Role.Translator="Преводач" +UI.About.Role.Supporter="Поддръжник" +UI.About.Version="Версия:" +UI.Updater.Dialog.Title="Версия на StreamFX %s вече е налична!" +UI.Updater.Dialog.Text="Налична е нова версия на StreamFX за изтегляне." +UI.Updater.Dialog.Version.Current="Текуща версия:" +UI.Updater.Dialog.Version.Latest="Последна версия:" +UI.Updater.Dialog.Button.Ok="Отворете страницата за изтегляне" +UI.Updater.Dialog.Button.Cancel="Напомни ми по-късно" +UI.Updater.GitHubPermission.Title="StreamFX изисква вашето разрешение, за да се свърже с GitHub!" +UI.Updater.GitHubPermission.Text="За да осигури ръчна или автоматична проверка на актуализациите, StreamFX разчита на API на GitHub за извличане на най-новата информация.
Моля, прочетете декларацията за поверителност на Github, и щракнете върху \"OK\", ако сте съгласни, или върху \"Cancel\", ако не сте съгласни." +UI.Updater.Menu.CheckForUpdates="Проверка за актуализации" +UI.Updater.Menu.CheckForUpdates.Automatically="Автоматична проверка за актуализации" +UI.Updater.Menu.Channel="Канал за актуализация" +UI.Updater.Menu.Channel.Stable="Стабилен" +UI.Updater.Menu.Channel.Candidate="Кандидат" +UI.Updater.Menu.Channel.Beta="Бета" +UI.Updater.Menu.Channel.Alpha="Alpha" +Encoder.AOM.AV1="AOM AV1 (директно)" +Encoder.AOM.AV1.Deprecated="Този енкодер е остарял и скоро ще бъде премахнат. Призоваваме потребителите да преминат към интегрирания енкодер \"SVT-AV1\" или \"AOM AV1\" възможно най-скоро." +Encoder.AOM.AV1.Encoder="Енкодер" +Encoder.AOM.AV1.Encoder.Usage="Употреба" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Добро качество" +Encoder.AOM.AV1.Encoder.Usage.RealTime="В реално време" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Всички вътрешнорамкови" +Encoder.AOM.AV1.Encoder.CPUUsage="Използване на процесора" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Плацебо" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Много бавно" +Encoder.AOM.AV1.Encoder.CPUUsage.2="По-бавно" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Бавен" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Среден" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Бърз" +Encoder.AOM.AV1.Encoder.CPUUsage.6="По-бързо" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Много бързо" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Супер бързо" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Изключително бързо" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Безумно бързо" +Encoder.AOM.AV1.Encoder.Profile="Профил" +Encoder.AOM.AV1.KeyFrames="Ключова рамка" +Encoder.AOM.AV1.KeyFrames.IntervalType="Тип интервал" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Рамки" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Секунди" +Encoder.AOM.AV1.KeyFrames.Interval="Интервал" +Encoder.AOM.AV1.RateControl="Контрол на скоростта" +Encoder.AOM.AV1.RateControl.Mode="Режим" +Encoder.AOM.AV1.RateControl.Mode.CBR="Постоянен битрейт (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Променлив битрейт (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Ограничено качество (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Постоянно качество (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Look-Ahead" +Encoder.AOM.AV1.RateControl.Limits="Ограничения" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Битрейт" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Превишаване на битрейта" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Превишаване на битрейта" +Encoder.AOM.AV1.RateControl.Limits.Quality="Качество" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Минимален квантификатор" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Максимален квантификатор" +Encoder.AOM.AV1.RateControl.Buffer="Буфер" +Encoder.AOM.AV1.RateControl.Buffer.Size="Размер" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Първоначален размер" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Оптимален размер" +Encoder.AOM.AV1.Advanced="Разширен" +Encoder.AOM.AV1.Advanced.Threads="Нишки" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Многопоточност на ред" +Encoder.AOM.AV1.Advanced.Tile.Columns="Колони с плочки" +Encoder.AOM.AV1.Advanced.Tile.Rows="Редове от плочки" +Encoder.AOM.AV1.Advanced.Tune="Настройване" +Encoder.AOM.AV1.Advanced.Tune.Metric="Метричен" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (с предварителна обработка)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (без предварителна обработка)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Съдържание" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Екран" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Филм" +Encoder.FFmpeg="Опции на FFmpeg" +Encoder.FFmpeg.Suffix=" (чрез FFmpeg)" +Encoder.FFmpeg.CustomSettings="Потребителски настройки" +Encoder.FFmpeg.Threads="Брой нишки" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Ключови кадри" +Encoder.FFmpeg.KeyFrames.IntervalType="Тип интервал" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Рамки" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Секунди" +Encoder.FFmpeg.KeyFrames.Interval="Интервал" +Encoder.FFmpeg.AMF.Deprecated="Този енкодер е остарял и скоро ще бъде премахнат. Призоваваме потребителите да преминат към интегрирания енкодер \"AMD HW H.264 (AVC)\" или \"AMD HW H.265 (HEVC)\" възможно най-скоро." +Encoder.FFmpeg.AMF.Preset="Предварително зададени" +Encoder.FFmpeg.AMF.Preset.Speed="Скорост" +Encoder.FFmpeg.AMF.Preset.Balanced="Балансиран" +Encoder.FFmpeg.AMF.Preset.Quality="Качество" +Encoder.FFmpeg.AMF.RateControl="Опции за контрол на скоростта" +Encoder.FFmpeg.AMF.RateControl.Mode="Режим" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Константен параметър на квантуване" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Променлив битрейт (с ограничение на пиковите стойности)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Променлив битрейт (с ограничение на закъснението)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Постоянен битрейт" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Поглед напред" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Прескачане на кадри" +Encoder.FFmpeg.AMF.RateControl.Limits="Ограничения" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Размер на буфера" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Целеви битрейт" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Максимален битрейт" +Encoder.FFmpeg.AMF.RateControl.QP="Параметри на квантуване" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="Рамка P QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="Рамка B QP" +Encoder.FFmpeg.AMF.Other="Други опции" +Encoder.FFmpeg.AMF.Other.BFrames="Максимален брой B-кадри" +Encoder.FFmpeg.AMF.Other.BFrameReferences="Препратки към рамка B" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Референтни рамки" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Прилагане на ОПРЧР" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Разделител на единиците за достъп" +Encoder.FFmpeg.NVENC.Preset="Предварителна настройка" +Encoder.FFmpeg.NVENC.Preset.default="По подразбиране" +Encoder.FFmpeg.NVENC.Preset.slow="Бавен" +Encoder.FFmpeg.NVENC.Preset.medium="Среден" +Encoder.FFmpeg.NVENC.Preset.fast="Бърз" +Encoder.FFmpeg.NVENC.Preset.hp="Висока производителност" +Encoder.FFmpeg.NVENC.Preset.hq="Високо качество" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay диск" +Encoder.FFmpeg.NVENC.Preset.ll="Ниска латентност" +Encoder.FFmpeg.NVENC.Preset.llhq="Ниска латентност Високо качество" +Encoder.FFmpeg.NVENC.Preset.llhp="Ниска латентност Висока производителност" +Encoder.FFmpeg.NVENC.Preset.lossless="Без загуби" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Висока производителност без загуби" +Encoder.FFmpeg.NVENC.Preset.p1="Най-бърз (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="По-бързо (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Бързо (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Среден (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Бавно (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="По-бавно (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Най-бавен (P7)" +Encoder.FFmpeg.NVENC.Tune="Настройване" +Encoder.FFmpeg.NVENC.Tune.hq="Високо качество" +Encoder.FFmpeg.NVENC.Tune.ll="Ниска латентност" +Encoder.FFmpeg.NVENC.Tune.ull="Изключително ниска латентност" +Encoder.FFmpeg.NVENC.Tune.lossless="Без загуби" +Encoder.FFmpeg.NVENC.RateControl="Опции за контрол на скоростта" +Encoder.FFmpeg.NVENC.RateControl.Mode="Режим" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Константен параметър на квантуване" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Променлив битрейт" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Постоянен битрейт" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Два паса" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Еднократно преминаване" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Две преминавания при четвърт резолюция" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Две преминавания при пълна разделителна способност" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Поглед напред" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Адаптивни I-рамки" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Адаптивни B-рамки" +Encoder.FFmpeg.NVENC.RateControl.Limits="Ограничения" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Размер на буфера" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Целево качество" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Целеви битрейт" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Максимален битрейт" +Encoder.FFmpeg.NVENC.RateControl.QP="Параметри на квантуване" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Минимален QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Максимален QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="Рамка P QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="Рамка B QP" +Encoder.FFmpeg.NVENC.AQ="Адаптивно квантуване" +Encoder.FFmpeg.NVENC.AQ.Spatial="Пространствено адаптивно квантуване" +Encoder.FFmpeg.NVENC.AQ.Strength="Пространствена адаптивна сила на квантуване" +Encoder.FFmpeg.NVENC.AQ.Temporal="Темпорално адаптивно квантуване" +Encoder.FFmpeg.NVENC.Other="Други опции" +Encoder.FFmpeg.NVENC.Other.BFrames="Максимален брой B-кадри" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Референтен режим на B-кадър" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Няма да се използват рамки B като референтни." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Само B-рамки/2 ще се използват като референтни." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Всеки B-кадър ще се използва като референтен" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Нулева латентност" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Претеглено прогнозиране" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Нереферентни P-рамки" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Референтни рамки" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Малка скала на ключовия кадър със закъснение" +Blur.Type.Box="Кутия" +Blur.Type.BoxLinear="Box Linear" +Blur.Type.Gaussian="Гаусов" +Blur.Type.GaussianLinear="Гаусов линеен" +Blur.Type.DualFiltering="Двойно филтриране" +Blur.Subtype.Area="Област" +Blur.Subtype.Directional="Насочен" +Blur.Subtype.Rotational="Ротация" +Blur.Subtype.Zoom="Zoom" +Shader="Шейдър" +Shader.Refresh="Опции и параметри за опресняване" +Shader.Shader="Опции за шейдър" +Shader.Shader.File="Файл" +Shader.Shader.Technique="Техника" +Shader.Shader.Size="Размер" +Shader.Shader.Size.Width="Ширина" +Shader.Shader.Size.Height="Височина" +Shader.Shader.Seed="Семе за рандомизация" +Shader.Parameters="Параметри на шейдъра" +Shader.Parameter.Texture.Type="Тип" +Shader.Parameter.Texture.Type.File="Файл" +Shader.Parameter.Texture.Type.Source="Източник:" +Shader.Parameter.Texture.File="Файл" +Shader.Parameter.Texture.Source="Източник:" +Filter.Shader="Шейдър" +Source.Shader="Шейдър" +Transition.Shader="Шейдър" +Filter.AutoFraming="Автоматично рамкиране" +Filter.AutoFraming.Tracking="Опции за проследяване" +Filter.AutoFraming.Tracking.Mode="Режим" +Filter.AutoFraming.Tracking.Mode.Solo="Соло" +Filter.AutoFraming.Tracking.Mode.Group="Група" +Filter.AutoFraming.Tracking.Frequency="Честота" +Filter.AutoFraming.Motion="Опции за движение" +Filter.AutoFraming.Motion.Smoothing="Изглаждане" +Filter.AutoFraming.Motion.Prediction="Прогноза" +Filter.AutoFraming.Framing="Опции за рамкиране" +Filter.AutoFraming.Framing.Stability="Стабилност" +Filter.AutoFraming.Framing.Padding="Подложка" +Filter.AutoFraming.Framing.Offset="Офсет" +Filter.AutoFraming.Framing.AspectRatio="Съотношение на страните" +Filter.AutoFraming.Provider="Доставчик" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="Разпознаване на лица NVIDIA®, задвижвано от NVIDIA® Broadcast" +Filter.Blur="Размазване" +Filter.Blur.Type="Тип" +Filter.Blur.Subtype="Подтип" +Filter.Blur.Size="Размер" +Filter.Blur.Angle="Ъгъл (градуси)" +Filter.Blur.Center.X="Център (X) (в проценти)" +Filter.Blur.Center.Y="Център (Y) (в проценти)" +Filter.Blur.StepScale="Стъпково мащабиране" +Filter.Blur.StepScale.X="Степенна скала X" +Filter.Blur.StepScale.Y="Стъпка на скалата Y" +Filter.Blur.Mask="Нанасяне на маска" +Filter.Blur.Mask.Type="Тип маска" +Filter.Blur.Mask.Type.Region="Регион" +Filter.Blur.Mask.Type.Image="Изображение" +Filter.Blur.Mask.Type.Source="Източник:" +Filter.Blur.Mask.Region.Left="Ляв край" +Filter.Blur.Mask.Region.Top="Горният ръб" +Filter.Blur.Mask.Region.Right="Десен край" +Filter.Blur.Mask.Region.Bottom="Долен ръб" +Filter.Blur.Mask.Region.Feather="Област на перата" +Filter.Blur.Mask.Region.Feather.Shift="Смяна на перата" +Filter.Blur.Mask.Region.Invert="Инвертиране на региона" +Filter.Blur.Mask.Image="Маска на изображението" +Filter.Blur.Mask.Source="Източник Маска" +Filter.Blur.Mask.Color="Филтър за цвят на маската" +Filter.Blur.Mask.Alpha="Маска Алфа филтър" +Filter.Blur.Mask.Multiplier="Множител на маски" +Filter.ColorGrade="Класификация на цветовете" +Filter.ColorGrade.Lift="Асансьор" +Filter.ColorGrade.Lift.Red="Червен асансьор" +Filter.ColorGrade.Lift.Green="Зелен асансьор" +Filter.ColorGrade.Lift.Blue="Син асансьор" +Filter.ColorGrade.Lift.All="Всички асансьори" +Filter.ColorGrade.Gamma="Гама" +Filter.ColorGrade.Gamma.Red="Червена гама" +Filter.ColorGrade.Gamma.Green="Зелена гама" +Filter.ColorGrade.Gamma.Blue="Blue Gamma" +Filter.ColorGrade.Gamma.All="Всички Gamma" +Filter.ColorGrade.Gain="Печалба" +Filter.ColorGrade.Gain.Red="Червена печалба" +Filter.ColorGrade.Gain.Green="Зелена печалба" +Filter.ColorGrade.Gain.Blue="Синьо усилване" +Filter.ColorGrade.Gain.All="Всички печалби" +Filter.ColorGrade.Offset="Офсет" +Filter.ColorGrade.Offset.Red="Червен офсет" +Filter.ColorGrade.Offset.Green="Зелен офсет" +Filter.ColorGrade.Offset.Blue="Син офсет" +Filter.ColorGrade.Offset.All="Всички отмествания" +Filter.ColorGrade.Tint="Тинт" +Filter.ColorGrade.Tint.Detection="Метод за откриване на оттенък Luma" +Filter.ColorGrade.Tint.Detection.HSV="Оттенък Наситеност Стойност" +Filter.ColorGrade.Tint.Detection.HSL="Оттенък Наситеност Светлина" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Режим Tint Luma" +Filter.ColorGrade.Tint.Mode.Linear="Линейна" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Log" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Експонента на оттенъка Luma" +Filter.ColorGrade.Tint.Shadow.Red="Червен нюанс на сянката" +Filter.ColorGrade.Tint.Shadow.Green="Сенчест зелен оттенък" +Filter.ColorGrade.Tint.Shadow.Blue="Синя сянка" +Filter.ColorGrade.Tint.Midtone.Red="Среден тон червен оттенък" +Filter.ColorGrade.Tint.Midtone.Green="Среден тон зелен оттенък" +Filter.ColorGrade.Tint.Midtone.Blue="Среден тон син оттенък" +Filter.ColorGrade.Tint.Highlight.Red="Подчертаване на червен оттенък" +Filter.ColorGrade.Tint.Highlight.Green="Подчертаване на зелен оттенък" +Filter.ColorGrade.Tint.Highlight.Blue="Подчертаване на синия оттенък" +Filter.ColorGrade.Correction="Корекция на цветовете" +Filter.ColorGrade.Correction.Hue="Смяна на нюанса" +Filter.ColorGrade.Correction.Saturation="Насищане" +Filter.ColorGrade.Correction.Lightness="Лекота" +Filter.ColorGrade.Correction.Contrast="Контраст" +Filter.ColorGrade.RenderMode="Режим на рендериране" +Filter.ColorGrade.RenderMode.Direct="Директно визуализиране" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-битова таблица за търсене" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-битова таблица за търсене" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-битова таблица за търсене" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-битова таблица за търсене" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-битова таблица за търсене" +Filter.Denoising="Деноализацията" +Filter.Denoising.Provider="Доставчик" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, задвижван от NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Сила" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Слаб" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Силен" +Filter.Displacement="Картографиране на изместването" +Filter.Displacement.Deprecated="Този филтър е остарял и е премахнат. Потребителите се приканват незабавно да преминат към филтъра \"Shader\" с примера \"displace.effect\"." +Filter.Displacement.File="Файл" +Filter.Displacement.Scale="Скала" +Filter.Displacement.Scale.Type="Тип мащабиране" +Filter.DynamicMask="Динамична маска" +Filter.DynamicMask.Input="Източник на входни данни" +Filter.DynamicMask.Channel="%s Канал" +Filter.DynamicMask.Channel.Value="Базова стойност" +Filter.DynamicMask.Channel.Multiplier="Мултипликатор" +Filter.DynamicMask.Channel.Input="%s Входна стойност" +Filter.SDFEffects="Ефекти на SDF" +Filter.SDFEffects.Shadow.Inner="Вътрешна сянка" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Вътрешна сянка Минимално разстояние" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Вътрешна сянка Максимално разстояние" +Filter.SDFEffects.Shadow.Inner.Offset.X="Отместване на вътрешната сянка X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Отместване на вътрешната сянка Y" +Filter.SDFEffects.Shadow.Inner.Color="Цвят на вътрешната сянка" +Filter.SDFEffects.Shadow.Inner.Alpha="Вътрешна сянка Alpha" +Filter.SDFEffects.Shadow.Outer="Външна сянка" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Външна сянка Минимално разстояние" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Максимално разстояние на външната сянка" +Filter.SDFEffects.Shadow.Outer.Offset.X="Отместване на външната сянка X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Отместване на външната сянка Y" +Filter.SDFEffects.Shadow.Outer.Color="Външен цвят на сянката" +Filter.SDFEffects.Shadow.Outer.Alpha="Външна сянка Alpha" +Filter.SDFEffects.Glow.Outer="Външен блясък" +Filter.SDFEffects.Glow.Outer.Color="Външен цвят на светене" +Filter.SDFEffects.Glow.Outer.Alpha="Външен блясък Alpha" +Filter.SDFEffects.Glow.Outer.Width="Външна ширина на светене" +Filter.SDFEffects.Glow.Outer.Sharpness="Острота на външното сияние" +Filter.SDFEffects.Glow.Inner="Вътрешно сияние" +Filter.SDFEffects.Glow.Inner.Color="Вътрешен цвят на блясъка" +Filter.SDFEffects.Glow.Inner.Alpha="Вътрешен блясък Alpha" +Filter.SDFEffects.Glow.Inner.Width="Ширина на вътрешното сияние" +Filter.SDFEffects.Glow.Inner.Sharpness="Вътрешно сияние Острота" +Filter.SDFEffects.Outline="Контур" +Filter.SDFEffects.Outline.Color="Цвят на контура" +Filter.SDFEffects.Outline.Alpha="Очертайте Alpha" +Filter.SDFEffects.Outline.Width="Ширина на контура" +Filter.SDFEffects.Outline.Offset="Отместване на контура" +Filter.SDFEffects.Outline.Sharpness="Острота на контура" +Filter.SDFEffects.SDF.Scale="Мащаб на текстурата на SDF" +Filter.SDFEffects.SDF.Threshold="Праг на SDF Alpha" +Filter.Transform="3D трансформация" +Filter.Transform.Camera="Камера" +Filter.Transform.Camera.Mode="Режим" +Filter.Transform.Camera.Mode.CornerPin="Ъглов щифт" +Filter.Transform.Camera.Mode.Orthographic="Ортографски" +Filter.Transform.Camera.Mode.Perspective="Перспектива" +Filter.Transform.Camera.FieldOfView="Поле на видимост" +Filter.Transform.Position="Позиция" +Filter.Transform.Position.X="X" +Filter.Transform.Position.Y="Y" +Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Скала" +Filter.Transform.Scale.X="X" +Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Срязване" +Filter.Transform.Shear.X="X" +Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Завъртане" +Filter.Transform.Rotation.X="Височина на наклона (X)" +Filter.Transform.Rotation.Y="Отклонение (Y)" +Filter.Transform.Rotation.Z="Преобръщане (Z)" +Filter.Transform.Rotation.Order="Ред на въртене" +Filter.Transform.Rotation.Order.XYZ="Наклон, отклонение, преобръщане" +Filter.Transform.Rotation.Order.XZY="Наклон, преобръщане, отклонение" +Filter.Transform.Rotation.Order.YXZ="Отклонение, наклон, преобръщане" +Filter.Transform.Rotation.Order.YZX="Накланяне, преобръщане, наклон" +Filter.Transform.Rotation.Order.ZXY="Преобръщане, наклон, отклонение" +Filter.Transform.Rotation.Order.ZYX="Преобръщане, отклонение, наклон" +Filter.Transform.Corners="Ъгли" +Filter.Transform.Corners.TopLeft="Горе вляво" +Filter.Transform.Corners.TopRight="В горния десен ъгъл" +Filter.Transform.Corners.BottomLeft="Долен ляв ъгъл" +Filter.Transform.Corners.BottomRight="Долен десен ъгъл" +Filter.Transform.Mipmapping="Активиране на Mipmapping" +Filter.Upscaling="Увеличаване на мащаба" +Filter.Upscaling.Provider="Доставчик" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, задвижвана от NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Скала" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Сила" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Слаб" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Силен" +Filter.VirtualGreenscreen="Виртуален зелен екран" +Filter.VirtualGreenscreen.Provider="Доставчик" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, задвижван от NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Режим" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Изпълнение" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Качество" +Source.Mirror="Източник: Mirror" +Source.Mirror.Source="Източник:" +Source.Mirror.Source.Audio="Активиране на аудио" +Source.Mirror.Source.Audio.Layout="Аудио оформление" +Source.Mirror.Source.Audio.Layout.Unknown="Неизвестно" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Стерео" +Source.Mirror.Source.Audio.Layout.StereoLFE="Стерео с LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Quadraphonic" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Quadraphonic с LFE" +Source.Mirror.Source.Audio.Layout.Surround="Съраунд" +Source.Mirror.Source.Audio.Layout.FullSurround="Пълен съраунд" +Codec.AV1="AV1" +Codec.AV1.Profile="Профил" +Codec.AV1.Profile.Main="Основен" +Codec.AV1.Profile.High="Висока" +Codec.AV1.Profile.Professional="Професионален" +Codec.H264="H264" +Codec.H264.Profile="Профил" +Codec.H264.Profile.baseline="Базова линия" +Codec.H264.Profile.main="Основен" +Codec.H264.Profile.high="Висока" +Codec.H264.Profile.high444p="Висока 4: 4: 4 Предсказваща" +Codec.H264.Level="Ниво" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Профил" +Codec.HEVC.Profile.main="Основен" +Codec.HEVC.Profile.main10="Основен 10-битов" +Codec.HEVC.Profile.rext="Разширен обхват" +Codec.HEVC.Tier="Ниво" +Codec.HEVC.Tier.main="Основен" +Codec.HEVC.Tier.high="Висока" +Codec.HEVC.Level="Ниво" +Codec.ProRes.Profile="Профил" +Codec.ProRes.Profile.APCO="422 Пълномощно (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Стандарт (APCN)" +Codec.ProRes.Profile.APCH="422 Високо качество/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Високо качество/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Екстремно качество/XQ (AP4X)" +Codec.DNxHR.Profile="Профил" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/cs-CZ.ini b/data/locale/cs-CZ.ini index 2e96993679..356cb51d0c 100644 --- a/data/locale/cs-CZ.ini +++ b/data/locale/cs-CZ.ini @@ -62,6 +62,7 @@ Encoder.AOM.AV1.Encoder="Enkodér" Encoder.AOM.AV1.Encoder.Usage="Využití" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Dobrá kvalita" Encoder.AOM.AV1.Encoder.Usage.RealTime="Reálný čas" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Vše v rámci rámu" Encoder.AOM.AV1.Encoder.CPUUsage="Využití CPU" Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" Encoder.AOM.AV1.Encoder.CPUUsage.1="Velmi pomalu" @@ -80,33 +81,46 @@ Encoder.AOM.AV1.KeyFrames.IntervalType="Typ intervalu" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Snímky" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.AOM.AV1.KeyFrames.Interval="Interval" +Encoder.AOM.AV1.RateControl="Řízení rychlosti" Encoder.AOM.AV1.RateControl.Mode="Režim" Encoder.AOM.AV1.RateControl.Mode.CBR="Konstantní bitrate (CBR)" Encoder.AOM.AV1.RateControl.Mode.VBR="Proměnný bitrate (VBR)" Encoder.AOM.AV1.RateControl.Mode.CQ="Omezená kvalita (CQ)" Encoder.AOM.AV1.RateControl.Mode.Q="Konstantní kvalita (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Look-Ahead" Encoder.AOM.AV1.RateControl.Limits="Omezení" Encoder.AOM.AV1.RateControl.Limits.Bitrate="Přenosová rychlost" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Nedostatečný datový tok" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Překročení přenosové rychlosti" Encoder.AOM.AV1.RateControl.Limits.Quality="Kvalitní" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimální kvantizer" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maximální kvantizer" Encoder.AOM.AV1.RateControl.Buffer="Zásobník" Encoder.AOM.AV1.RateControl.Buffer.Size="Rozměr" Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Počáteční velikost" Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimální velikost" Encoder.AOM.AV1.Advanced="Pokročilé" Encoder.AOM.AV1.Advanced.Threads="Vlákna" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Vícevláknové zpracování na řádek" Encoder.AOM.AV1.Advanced.Tile.Columns="Sloupce dlaždic" Encoder.AOM.AV1.Advanced.Tile.Rows="Řádky dlaždic" Encoder.AOM.AV1.Advanced.Tune="Ladění" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metrické" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (s předzpracováním)" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (bez předběžného zpracování)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" Encoder.AOM.AV1.Advanced.Tune.Content="Obsah" Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Obrazovka" Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" Encoder.FFmpeg="Možnosti FFmpeg" +Encoder.FFmpeg.Suffix=" (přes FFmpeg)" Encoder.FFmpeg.CustomSettings="Vlastní nastavení" +Encoder.FFmpeg.Threads="Počet vláken" Encoder.FFmpeg.GPU="GPU" Encoder.FFmpeg.KeyFrames="Klíčové snímky" Encoder.FFmpeg.KeyFrames.IntervalType="Typ intervalu" @@ -114,12 +128,19 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Snímky" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.AMF.Deprecated="Tento kodér je zastaralý a bude brzy odstraněn. Uživatele vyzýváme, aby co nejdříve přešli na integrovaný kodér 'AMD HW H.264 (AVC)' nebo 'AMD HW H.265 (HEVC)'." Encoder.FFmpeg.AMF.Preset="Profil" Encoder.FFmpeg.AMF.Preset.Speed="Rychlost" Encoder.FFmpeg.AMF.Preset.Balanced="Vyvážený" Encoder.FFmpeg.AMF.Preset.Quality="Kvalitní" +Encoder.FFmpeg.AMF.RateControl="Možnosti řízení rychlosti" Encoder.FFmpeg.AMF.RateControl.Mode="Režim" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Konstantní kvantizační parametr" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Proměnlivý datový tok (s omezením na špičku)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Proměnlivý datový tok (s omezením zpoždění)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Konstantní bitrate" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Podívejte se dopředu" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Přeskakování snímků" Encoder.FFmpeg.AMF.RateControl.Limits="Omezení" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Cílový bitrate" @@ -130,37 +151,65 @@ Encoder.FFmpeg.AMF.RateControl.QP.P="QP P-snímků" Encoder.FFmpeg.AMF.RateControl.QP.B="QP B-snímků" Encoder.FFmpeg.AMF.Other="Ostatní možnosti" Encoder.FFmpeg.AMF.Other.BFrames="Maximum B-snímků" +Encoder.FFmpeg.AMF.Other.BFrameReferences="Reference na rám B" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referenční snímky" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Prosazování rozvoje lidských zdrojů" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Oddělovač přístupových jednotek" Encoder.FFmpeg.NVENC.Preset="Profil" Encoder.FFmpeg.NVENC.Preset.default="Výchozí" Encoder.FFmpeg.NVENC.Preset.slow="Pomalý" Encoder.FFmpeg.NVENC.Preset.medium="Střední" Encoder.FFmpeg.NVENC.Preset.fast="Rychlý" +Encoder.FFmpeg.NVENC.Preset.hp="Vysoký výkon" +Encoder.FFmpeg.NVENC.Preset.hq="Vysoká kvalita" +Encoder.FFmpeg.NVENC.Preset.bd="Disk BluRay" Encoder.FFmpeg.NVENC.Preset.ll="Nízká odezva" Encoder.FFmpeg.NVENC.Preset.llhq="Nízká odezva a Vysoká kvalita" Encoder.FFmpeg.NVENC.Preset.llhp="Nízká odezva a Vysoký výkon" Encoder.FFmpeg.NVENC.Preset.lossless="Bezztrátový" Encoder.FFmpeg.NVENC.Preset.losslesshp="Bezztrátový a Vysoký výkon" +Encoder.FFmpeg.NVENC.Preset.p1="Nejrychlejší (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Rychlejší (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Rychle (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Střední (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Pomalý (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Pomalejší (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Nejpomalejší (P7)" Encoder.FFmpeg.NVENC.Tune="Ladění" Encoder.FFmpeg.NVENC.Tune.hq="Vysoká kvalita" Encoder.FFmpeg.NVENC.Tune.ll="Nízká odezva" Encoder.FFmpeg.NVENC.Tune.ull="Ultra nízká odezva" Encoder.FFmpeg.NVENC.Tune.lossless="Bezztrátový" +Encoder.FFmpeg.NVENC.RateControl="Možnosti řízení rychlosti" Encoder.FFmpeg.NVENC.RateControl.Mode="Režim" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parametr konstantní kvantizace" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Proměnný bitrate" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstantní bitrate" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dva průchody" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Víceprůchodové" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Jeden průchod" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Dva průchody při čtvrtinovém rozlišení" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Dva průchody při plném rozlišení" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Podívejte se dopředu" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptivní rámy I" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptivní rámečky B" Encoder.FFmpeg.NVENC.RateControl.Limits="Omezení" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Velikost vyrovnávací paměti" Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Cílová kvalita" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Cílový bitrate" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximální bitrate" Encoder.FFmpeg.NVENC.RateControl.QP="Parametry kvantizace (QP)" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimální QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maximální QP" Encoder.FFmpeg.NVENC.RateControl.QP.I="QP I-snímků" Encoder.FFmpeg.NVENC.RateControl.QP.P="QP P-snímků" Encoder.FFmpeg.NVENC.RateControl.QP.B="QP B-snímků" Encoder.FFmpeg.NVENC.AQ="Adaptivní kvantizace" +Encoder.FFmpeg.NVENC.AQ.Spatial="Prostorová adaptivní kvantizace" +Encoder.FFmpeg.NVENC.AQ.Strength="Prostorová adaptivní kvantizační síla" +Encoder.FFmpeg.NVENC.AQ.Temporal="Časově adaptivní kvantizace" Encoder.FFmpeg.NVENC.Other="Ostatní možnosti" Encoder.FFmpeg.NVENC.Other.BFrames="Maximum B-snímků" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Referenční režim B-snímku" @@ -169,7 +218,9 @@ Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Pouze B-snímky/2 budou p Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Každý B-snímek bude použit jako reference" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nulová odezva" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Vážená předpověď" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Rámečky P bez odkazu" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referenční snímky" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Stupnice klíčových snímků s malým zpožděním" Blur.Type.Box="Box" Blur.Type.BoxLinear="Box lineární" @@ -211,6 +262,7 @@ Filter.AutoFraming.Motion.Smoothing="Vyhlazování" Filter.AutoFraming.Motion.Prediction="Předpověď" Filter.AutoFraming.Framing="Možnosti snímkování" Filter.AutoFraming.Framing.Stability="Stabilita" +Filter.AutoFraming.Framing.Padding="Vycpávky" Filter.AutoFraming.Framing.Offset="Kompenzace" Filter.AutoFraming.Framing.AspectRatio="Poměr stran" Filter.AutoFraming.Provider="Poskytovatel" @@ -268,12 +320,15 @@ Filter.ColorGrade.Offset.All="Posun všech kanálů" Filter.ColorGrade.Tint="Tón" Filter.ColorGrade.Tint.Detection="Metoda detekce tónu jasového kanálu" Filter.ColorGrade.Tint.Detection.HSV="Saturace" +Filter.ColorGrade.Tint.Detection.HSL="Odstín Sytost Světlost" Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Režim odstínu Luma" Filter.ColorGrade.Tint.Mode.Linear="Lineární" Filter.ColorGrade.Tint.Mode.Exp="Exp" Filter.ColorGrade.Tint.Mode.Exp2="Exp2" Filter.ColorGrade.Tint.Mode.Log="Log" Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Exponent odstínu Luma" Filter.ColorGrade.Tint.Shadow.Red="Červený tón stínů" Filter.ColorGrade.Tint.Shadow.Green="Zelený tón stínů" Filter.ColorGrade.Tint.Shadow.Blue="Modrý tón stínů" @@ -296,20 +351,35 @@ Filter.ColorGrade.RenderMode.LUT.6Bit="6-bitová vyhledávací tabulka" Filter.ColorGrade.RenderMode.LUT.8Bit="8-bitová vyhledávací tabulka" Filter.ColorGrade.RenderMode.LUT.10Bit="10-bitová vyhledávací tabulka" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Poskytovatel" Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, využívá NVIDIA® Broadcast" Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Síla" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Slabé" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Silný" Filter.Displacement="Displacement Mapping" +Filter.Displacement.Deprecated="Tento filtr je zastaralý a byl odstraněn. Vyzýváme uživatele, aby okamžitě přešli na filtr 'Shader' s příkladem 'displace.effect'." Filter.Displacement.File="Soubor" Filter.Displacement.Scale="Měřítko" Filter.Displacement.Scale.Type="Typ škálování" +Filter.DynamicMask="Dynamická maska" Filter.DynamicMask.Input="Zdroj vstupu" +Filter.DynamicMask.Channel="%s Kanál" Filter.DynamicMask.Channel.Value="Základní hodnota" Filter.DynamicMask.Channel.Multiplier="Násobitel" +Filter.DynamicMask.Channel.Input="%s Vstupní hodnota" Filter.SDFEffects="SDF efekty" Filter.SDFEffects.Shadow.Inner="Vnitřní stín" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Minimální vzdálenost vnitřního stínu" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Maximální vzdálenost vnitřního stínu" +Filter.SDFEffects.Shadow.Inner.Offset.X="Posun vnitřního stínu X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Posun vnitřního stínu Y" +Filter.SDFEffects.Shadow.Inner.Color="Barva vnitřního stínu" +Filter.SDFEffects.Shadow.Inner.Alpha="Vnitřní stín Alpha" Filter.SDFEffects.Shadow.Outer="Vnější stín" Filter.SDFEffects.Shadow.Outer.Range.Minimum="Minimální vzdálenost vnějšího stínu" Filter.SDFEffects.Shadow.Outer.Range.Maximum="Maximální vzdálenost vnějšího stínu" @@ -321,10 +391,27 @@ Filter.SDFEffects.Glow.Outer="Vnější záře" Filter.SDFEffects.Glow.Outer.Color="Barva vnější záře" Filter.SDFEffects.Glow.Outer.Alpha="Průhlednost vnější záře" Filter.SDFEffects.Glow.Outer.Width="Šířka vnější záře" +Filter.SDFEffects.Glow.Outer.Sharpness="Ostrost vnější záře" +Filter.SDFEffects.Glow.Inner="Vnitřní záře" +Filter.SDFEffects.Glow.Inner.Color="Barva vnitřní záře" +Filter.SDFEffects.Glow.Inner.Alpha="Vnitřní záře Alpha" +Filter.SDFEffects.Glow.Inner.Width="Šířka vnitřní záře" +Filter.SDFEffects.Glow.Inner.Sharpness="Vnitřní záře Ostrost" +Filter.SDFEffects.Outline="Náčrt" +Filter.SDFEffects.Outline.Color="Obrysová barva" +Filter.SDFEffects.Outline.Alpha="Obrys Alpha" +Filter.SDFEffects.Outline.Width="Šířka obrysu" +Filter.SDFEffects.Outline.Offset="Posun obrysu" +Filter.SDFEffects.Outline.Sharpness="Ostrost obrysů" +Filter.SDFEffects.SDF.Scale="Měřítko textury SDF" +Filter.SDFEffects.SDF.Threshold="Prahová hodnota SDF Alpha" Filter.Transform="3D transformace" Filter.Transform.Camera="Kamera" Filter.Transform.Camera.Mode="Režim" +Filter.Transform.Camera.Mode.CornerPin="Rohový kolík" +Filter.Transform.Camera.Mode.Orthographic="Ortografické" +Filter.Transform.Camera.Mode.Perspective="Perspektiva" Filter.Transform.Camera.FieldOfView="Zorné pole" Filter.Transform.Position="Pozice" Filter.Transform.Position.X="X" @@ -333,6 +420,7 @@ Filter.Transform.Position.Z="Z" Filter.Transform.Scale="Měřítko" Filter.Transform.Scale.X="X" Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Střih" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" Filter.Transform.Rotation="Otáčení" @@ -353,11 +441,17 @@ Filter.Transform.Corners.BottomLeft="Levý spodní" Filter.Transform.Corners.BottomRight="Pravý spodní" Filter.Transform.Mipmapping="Zapnout mipmapping" +Filter.Upscaling="Zvyšování rozlišení" Filter.Upscaling.Provider="Poskytovatel" Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, využívá NVIDIA® Broadcast" Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" Filter.Upscaling.NVIDIA.SuperRes.Scale="Měřítko" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Síla" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Slabé" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Silný" +Filter.VirtualGreenscreen="Virtuální zelená obrazovka" +Filter.VirtualGreenscreen.Provider="Poskytovatel" Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, využívá NVIDIA® Broadcast" Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Režim" @@ -380,17 +474,25 @@ Source.Mirror.Source.Audio.Layout.FullSurround="Plný prostorový zvuk" Codec.AV1="AV1" Codec.AV1.Profile="Profil" Codec.AV1.Profile.Main="Hlavní" +Codec.AV1.Profile.High="Vysoká" +Codec.AV1.Profile.Professional="Profesionální" Codec.H264="H264" Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Základní údaje" Codec.H264.Profile.main="Hlavní" +Codec.H264.Profile.high="Vysoká" +Codec.H264.Profile.high444p="Vysoký 4:4:4 Prediktivní" Codec.H264.Level="Úroveň" Codec.HEVC="HEVC" Codec.HEVC.Profile="Profil" Codec.HEVC.Profile.main="Hlavní" +Codec.HEVC.Profile.main10="Hlavní 10bitový" +Codec.HEVC.Profile.rext="Rozšířený rozsah" Codec.HEVC.Tier="Úroveň" Codec.HEVC.Tier.main="Hlavní" +Codec.HEVC.Tier.high="Vysoká" Codec.HEVC.Level="Úroveň" Codec.ProRes.Profile="Profil" diff --git a/data/locale/da-DK.ini b/data/locale/da-DK.ini index 8d333790e0..fce1f08a6b 100644 --- a/data/locale/da-DK.ini +++ b/data/locale/da-DK.ini @@ -56,31 +56,458 @@ UI.Updater.Menu.Channel.Candidate="Kandidat" UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" +Encoder.AOM.AV1="AOM AV1 (direkte)" +Encoder.AOM.AV1.Deprecated="Denne encoder er forældet og vil snart blive fjernet. Brugerne opfordres til at skifte til den integrerede \"SVT-AV1\"- eller \"AOM AV1\"-koder så hurtigt som muligt." +Encoder.AOM.AV1.Encoder="Encoder" +Encoder.AOM.AV1.Encoder.Usage="Anvendelse" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="God kvalitet" +Encoder.AOM.AV1.Encoder.Usage.RealTime="I realtid" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Alle Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="CPU-forbrug" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Meget langsom" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Langsommere" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Langsom" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Medium" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Hurtig" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Hurtigere" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Meget hurtigt" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super hurtig" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultrahurtig" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Vanvittigt hurtig" +Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Nøgle-ramme" +Encoder.AOM.AV1.KeyFrames.IntervalType="Interval type" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Rammer" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekunder" +Encoder.AOM.AV1.KeyFrames.Interval="Interval" +Encoder.AOM.AV1.RateControl="Styring af sats" +Encoder.AOM.AV1.RateControl.Mode="Tilstand" +Encoder.AOM.AV1.RateControl.Mode.CBR="Konstant bitrate (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Variabel bitrate (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Begrænset kvalitet (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Konstant kvalitet (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Fremadskuende" +Encoder.AOM.AV1.RateControl.Limits="Grænser" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Underskridelse af bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Overskridelse af bitrate" +Encoder.AOM.AV1.RateControl.Limits.Quality="Kvalitet" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimum kvantisator" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maksimal kvantisator" +Encoder.AOM.AV1.RateControl.Buffer="Buffer" +Encoder.AOM.AV1.RateControl.Buffer.Size="Størrelse" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Oprindelig størrelse" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimal størrelse" +Encoder.AOM.AV1.Advanced="Avanceret" +Encoder.AOM.AV1.Advanced.Threads="Tråde" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-Threading pr. række" +Encoder.AOM.AV1.Advanced.Tile.Columns="Flisesøjler" +Encoder.AOM.AV1.Advanced.Tile.Rows="Fliserækker" +Encoder.AOM.AV1.Advanced.Tune="Afstemning" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metrisk" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (med forbehandling)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (uden forbehandling)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Indhold" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Skærm" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" Encoder.FFmpeg="FFmpeg Indstillinger" Encoder.FFmpeg.Suffix=" (via FFmpeg)" Encoder.FFmpeg.CustomSettings="Brugerdefinerede Indstillinger" Encoder.FFmpeg.Threads="Antal af tråde" Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Nøglerammer" +Encoder.FFmpeg.KeyFrames.IntervalType="Interval type" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Rammer" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunder" +Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.AMF.Deprecated="Denne encoder er forældet og vil snart blive fjernet. Brugere opfordres til at migrere til den integrerede \"AMD HW H.264 (AVC)\" eller \"AMD HW H.265 (HEVC)\" encoder så hurtigt som muligt." +Encoder.FFmpeg.AMF.Preset="Forudindstillet" +Encoder.FFmpeg.AMF.Preset.Speed="Hastighed" +Encoder.FFmpeg.AMF.Preset.Balanced="Balanceret" +Encoder.FFmpeg.AMF.Preset.Quality="Kvalitet" +Encoder.FFmpeg.AMF.RateControl="Valgmuligheder for styring af hastighed" +Encoder.FFmpeg.AMF.RateControl.Mode="Tilstand" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Konstant kvantiseringsparameter" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Variabel bitrate (Peak Constrained)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Variabel bithastighed (med begrænsede ventetider)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Konstant bitrate" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Se fremad" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Springning af rammer" +Encoder.FFmpeg.AMF.RateControl.Limits="Grænser" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Bufferstørrelse" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Målbitrate" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maksimal bithastighed" +Encoder.FFmpeg.AMF.RateControl.QP="Kvantiseringsparametre" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-ramme QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-ramme QP" +Encoder.FFmpeg.AMF.Other="Andre muligheder" +Encoder.FFmpeg.AMF.Other.BFrames="Maksimum B-rammer" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-ramme referencer" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referencerammer" +Encoder.FFmpeg.AMF.Other.EnforceHRD="håndhæve HRD" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Access Unit Delimiter" +Encoder.FFmpeg.NVENC.Preset="Forudindstillet" Encoder.FFmpeg.NVENC.Preset.default="Standard" +Encoder.FFmpeg.NVENC.Preset.slow="Langsom" +Encoder.FFmpeg.NVENC.Preset.medium="Medium" +Encoder.FFmpeg.NVENC.Preset.fast="Hurtig" +Encoder.FFmpeg.NVENC.Preset.hp="Høj ydeevne" +Encoder.FFmpeg.NVENC.Preset.hq="Høj kvalitet" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay-disk" +Encoder.FFmpeg.NVENC.Preset.ll="Lav latenstid" +Encoder.FFmpeg.NVENC.Preset.llhq="Lav latenstid Høj kvalitet" +Encoder.FFmpeg.NVENC.Preset.llhp="Lav latenstid Høj ydeevne" +Encoder.FFmpeg.NVENC.Preset.lossless="Lossless" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Tabsfri høj ydeevne" +Encoder.FFmpeg.NVENC.Preset.p1="Hurtigste (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Hurtigere (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Hurtig (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Medium (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Langsom (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Langsommere (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Langsomste (P7)" +Encoder.FFmpeg.NVENC.Tune="Afstemning" +Encoder.FFmpeg.NVENC.Tune.hq="Høj kvalitet" +Encoder.FFmpeg.NVENC.Tune.ll="Lav latenstid" +Encoder.FFmpeg.NVENC.Tune.ull="Ultra lav latenstid" +Encoder.FFmpeg.NVENC.Tune.lossless="Lossless" +Encoder.FFmpeg.NVENC.RateControl="Valgmuligheder for styring af hastighed" +Encoder.FFmpeg.NVENC.RateControl.Mode="Tilstand" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Konstant kvantiseringsparameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variabel bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstant bitrate" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="To pas" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Enkelt pas" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="To gange ved kvartalsvis opløsning" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="To gange ved fuld opløsning" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Se fremad" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptive I-rammer" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptive B-rammer" +Encoder.FFmpeg.NVENC.RateControl.Limits="Grænser" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Bufferstørrelse" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Målkvalitet" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Målbitrate" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maksimal bithastighed" +Encoder.FFmpeg.NVENC.RateControl.QP="Kvantiseringsparametre" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimum QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maksimal QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-ramme QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-ramme QP" +Encoder.FFmpeg.NVENC.AQ="Adaptiv kvantisering" +Encoder.FFmpeg.NVENC.AQ.Spatial="Rumlig adaptiv kvantisering" +Encoder.FFmpeg.NVENC.AQ.Strength="Spatial adaptiv kvantiseringsstyrke" +Encoder.FFmpeg.NVENC.AQ.Temporal="Temporal adaptiv kvantisering" +Encoder.FFmpeg.NVENC.Other="Andre muligheder" +Encoder.FFmpeg.NVENC.Other.BFrames="Maksimum B-rammer" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Frame-referencetilstand" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Der vil ikke blive anvendt B-rammer som reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Kun B-rammer/2 vil blive anvendt som reference" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Hvert B-billede vil blive anvendt som reference" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nul forsinkelse" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Vægtet forudsigelse" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="P-rammer uden reference" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referencerammer" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Lav forsinkelse Key-Frame-skala" +Blur.Type.Box="Boks" +Blur.Type.BoxLinear="Box Lineær" +Blur.Type.Gaussian="Gaussisk" +Blur.Type.GaussianLinear="Gaussisk lineær" +Blur.Type.DualFiltering="Dobbelt filtrering" +Blur.Subtype.Area="Område" +Blur.Subtype.Directional="Retningsbestemt" +Blur.Subtype.Rotational="Roterende" +Blur.Subtype.Zoom="Zoom" +Shader="Shader" +Shader.Refresh="Indstillinger og parametre for opdatering" +Shader.Shader="Indstillinger for shader" +Shader.Shader.File="Fil" +Shader.Shader.Technique="Teknik" +Shader.Shader.Size="Størrelse" +Shader.Shader.Size.Width="Bredde" +Shader.Shader.Size.Height="Højde" +Shader.Shader.Seed="Randomiseringsfrø" +Shader.Parameters="Shader-parametre" +Shader.Parameter.Texture.Type="Type" +Shader.Parameter.Texture.Type.File="Fil" +Shader.Parameter.Texture.Type.Source="Kilde" +Shader.Parameter.Texture.File="Fil" +Shader.Parameter.Texture.Source="Kilde" +Filter.Shader="Shader" +Source.Shader="Shader" +Transition.Shader="Shader" +Filter.AutoFraming="Automatisk indramning" +Filter.AutoFraming.Tracking="Indstillinger for sporing" +Filter.AutoFraming.Tracking.Mode="Tilstand" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Gruppe" +Filter.AutoFraming.Tracking.Frequency="Frekvens" +Filter.AutoFraming.Motion="Indstillinger for bevægelse" +Filter.AutoFraming.Motion.Smoothing="Udjævning" +Filter.AutoFraming.Motion.Prediction="Forudsigelse" +Filter.AutoFraming.Framing="Muligheder for indramning" +Filter.AutoFraming.Framing.Stability="Stabilitet" +Filter.AutoFraming.Framing.Padding="Polstring" +Filter.AutoFraming.Framing.Offset="Offset" +Filter.AutoFraming.Framing.AspectRatio="Aspektforhold" +Filter.AutoFraming.Provider="Udbyder" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, drevet af NVIDIA® Broadcast" +Filter.Blur="Slør" +Filter.Blur.Type="Type" +Filter.Blur.Subtype="Undertype" +Filter.Blur.Size="Størrelse" +Filter.Blur.Angle="Vinkel (grader)" +Filter.Blur.Center.X="Center (X) (Procent)" +Filter.Blur.Center.Y="Center (Y) (Procent)" +Filter.Blur.StepScale="Trinskalering" +Filter.Blur.StepScale.X="Trin Skala X" +Filter.Blur.StepScale.Y="Trin Skala Y" +Filter.Blur.Mask="Påfør en maske" +Filter.Blur.Mask.Type="Masketype" +Filter.Blur.Mask.Type.Region="Region" +Filter.Blur.Mask.Type.Image="Billede" +Filter.Blur.Mask.Type.Source="Kilde" +Filter.Blur.Mask.Region.Left="Venstre kant" +Filter.Blur.Mask.Region.Top="Øverste kant" +Filter.Blur.Mask.Region.Right="Højre kant" +Filter.Blur.Mask.Region.Bottom="Nederste kant" +Filter.Blur.Mask.Region.Feather="Område med fjer" +Filter.Blur.Mask.Region.Feather.Shift="Skift af fjer" +Filter.Blur.Mask.Region.Invert="Omvendt område" +Filter.Blur.Mask.Image="Billedmaske" +Filter.Blur.Mask.Source="Kilde Maske" +Filter.Blur.Mask.Color="Maske farvefilter" +Filter.Blur.Mask.Alpha="Maske-alfa-filter" +Filter.Blur.Mask.Multiplier="Maske multiplikator" +Filter.ColorGrade="Farveklassificering" +Filter.ColorGrade.Lift="Løft" +Filter.ColorGrade.Lift.Red="Rødt løft" +Filter.ColorGrade.Lift.Green="Grønt løft" +Filter.ColorGrade.Lift.Blue="Blå lift" +Filter.ColorGrade.Lift.All="Alle elevatorer" +Filter.ColorGrade.Gamma="Gamma" +Filter.ColorGrade.Gamma.Red="Rød Gamma" +Filter.ColorGrade.Gamma.Green="Grøn Gamma" +Filter.ColorGrade.Gamma.Blue="Blå Gamma" +Filter.ColorGrade.Gamma.All="Alle Gamma" +Filter.ColorGrade.Gain="Gain" +Filter.ColorGrade.Gain.Red="Rød forstærkning" +Filter.ColorGrade.Gain.Green="Grøn gevinst" +Filter.ColorGrade.Gain.Blue="Blå forstærkning" +Filter.ColorGrade.Gain.All="Alle gevinster" +Filter.ColorGrade.Offset="Offset" +Filter.ColorGrade.Offset.Red="Rød forskydning" +Filter.ColorGrade.Offset.Green="Grønt modregning" +Filter.ColorGrade.Offset.Blue="Blå forskydning" +Filter.ColorGrade.Offset.All="Alle forskydninger" +Filter.ColorGrade.Tint="Tint" +Filter.ColorGrade.Tint.Detection="Tint Luma-detektionsmetode" +Filter.ColorGrade.Tint.Detection.HSV="Farvetone Mætning Værdi" +Filter.ColorGrade.Tint.Detection.HSL="Farvetone Mætning Lysstyrke Lysstyrke" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Tint Luma-tilstand" +Filter.ColorGrade.Tint.Mode.Linear="Lineær" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Log" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Tint Luma Exponent" +Filter.ColorGrade.Tint.Shadow.Red="Skygge rødt skær" +Filter.ColorGrade.Tint.Shadow.Green="Skygge grønt farvetone" +Filter.ColorGrade.Tint.Shadow.Blue="Skyggeblå nuance" +Filter.ColorGrade.Tint.Midtone.Red="Midtone Red Tint" +Filter.ColorGrade.Tint.Midtone.Green="Midtone Green Tint" +Filter.ColorGrade.Tint.Midtone.Blue="Midtone Blue Tint" +Filter.ColorGrade.Tint.Highlight.Red="Fremhævning af rød farve" +Filter.ColorGrade.Tint.Highlight.Green="Fremhævelse grønt skær" +Filter.ColorGrade.Tint.Highlight.Blue="Fremhævning Blå nuance" +Filter.ColorGrade.Correction="Farvekorrektion" +Filter.ColorGrade.Correction.Hue="Farveskift" +Filter.ColorGrade.Correction.Saturation="Mætning" +Filter.ColorGrade.Correction.Lightness="Lethed" +Filter.ColorGrade.Correction.Contrast="Kontrast" +Filter.ColorGrade.RenderMode="Rendertilstand" +Filter.ColorGrade.RenderMode.Direct="Direkte gengivelse" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-bit opslagstabel" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-bit opslagstabel" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-bits opslagstabel" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-bit opslagstabel" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-bit opslagstabel" +Filter.Denoising="Afstøjning" +Filter.Denoising.Provider="Udbyder" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, drevet af NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Styrke" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Svag" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Stærk" +Filter.Displacement="Kortlægning af forskydning" +Filter.Displacement.Deprecated="Dette filter er forældet og er blevet fjernet. Brugere opfordres til at skifte til filteret \"Shader\" med eksemplet \"displace.effect\" med det samme." +Filter.Displacement.File="Fil" +Filter.Displacement.Scale="Skala" +Filter.Displacement.Scale.Type="Skaleringstype" +Filter.DynamicMask="Dynamisk maske" +Filter.DynamicMask.Input="Indgangskilde" +Filter.DynamicMask.Channel="%s Kanal" +Filter.DynamicMask.Channel.Value="Basisværdi" +Filter.DynamicMask.Channel.Multiplier="Multiplikator" +Filter.DynamicMask.Channel.Input="%s Indgangsværdi" +Filter.SDFEffects="SDF-effekter" +Filter.SDFEffects.Shadow.Inner="Indre skygge" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Mindsteafstand for indre skygge" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Indre skygge Maksimal afstand" +Filter.SDFEffects.Shadow.Inner.Offset.X="Indre skygge forskydning X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Indre skygge forskydning Y" +Filter.SDFEffects.Shadow.Inner.Color="Indvendig skyggefarve" +Filter.SDFEffects.Shadow.Inner.Alpha="Indre skygge Alpha" +Filter.SDFEffects.Shadow.Outer="Ydre skygge" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Ydre skygge Minimumsafstand" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Ydre skygge Maksimal afstand" +Filter.SDFEffects.Shadow.Outer.Offset.X="Udvendig skyggeforskydning X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Ydre skygge forskydning Y" +Filter.SDFEffects.Shadow.Outer.Color="Ydre skyggefarve" +Filter.SDFEffects.Shadow.Outer.Alpha="Outer Shadow Alpha" +Filter.SDFEffects.Glow.Outer="Ydre glød" +Filter.SDFEffects.Glow.Outer.Color="Ydre glød farve" +Filter.SDFEffects.Glow.Outer.Alpha="Ydre glød Alpha" +Filter.SDFEffects.Glow.Outer.Width="Udvendig glød bredde" +Filter.SDFEffects.Glow.Outer.Sharpness="Udvendig glød Skarphed" +Filter.SDFEffects.Glow.Inner="Indre glød" +Filter.SDFEffects.Glow.Inner.Color="Indvendig glød farve" +Filter.SDFEffects.Glow.Inner.Alpha="Indre glød Alpha" +Filter.SDFEffects.Glow.Inner.Width="Indre glød bredde" +Filter.SDFEffects.Glow.Inner.Sharpness="Indre glød Skarphed" +Filter.SDFEffects.Outline="Oversigt" +Filter.SDFEffects.Outline.Color="Omridsfarve" +Filter.SDFEffects.Outline.Alpha="Omrids Alpha" +Filter.SDFEffects.Outline.Width="Konturbredde" +Filter.SDFEffects.Outline.Offset="Outline-offset" +Filter.SDFEffects.Outline.Sharpness="Skarphed af omrids" +Filter.SDFEffects.SDF.Scale="SDF-teksturskala" +Filter.SDFEffects.SDF.Threshold="SDF-alfa-tærskel" +Filter.Transform="3D-transformation" +Filter.Transform.Camera="Kamera" +Filter.Transform.Camera.Mode="Tilstand" +Filter.Transform.Camera.Mode.CornerPin="Hjørnestift" +Filter.Transform.Camera.Mode.Orthographic="Ortografisk" +Filter.Transform.Camera.Mode.Perspective="Perspektiv" +Filter.Transform.Camera.FieldOfView="Synsfelt" +Filter.Transform.Position="Position" +Filter.Transform.Position.X="X" +Filter.Transform.Position.Y="Y" +Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Skala" +Filter.Transform.Scale.X="X" +Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Skæring" +Filter.Transform.Shear.X="X" +Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Rotation" +Filter.Transform.Rotation.X="Stigning (X)" +Filter.Transform.Rotation.Y="Givning (Y)" +Filter.Transform.Rotation.Z="Rulning (Z)" +Filter.Transform.Rotation.Order="Rotationsrækkefølge" +Filter.Transform.Rotation.Order.XYZ="Stigning, gydning, rulning" +Filter.Transform.Rotation.Order.XZY="Stigning, rulning, gydning" +Filter.Transform.Rotation.Order.YXZ="Giv, pitch, rul" +Filter.Transform.Rotation.Order.YZX="Giv, rul, stigning" +Filter.Transform.Rotation.Order.ZXY="Rulning, pitch, gydning" +Filter.Transform.Rotation.Order.ZYX="Rulning, gydning, hældning" +Filter.Transform.Corners="Hjørner" +Filter.Transform.Corners.TopLeft="Øverst til venstre" +Filter.Transform.Corners.TopRight="Øverst til højre" +Filter.Transform.Corners.BottomLeft="Nederst til venstre" +Filter.Transform.Corners.BottomRight="Nederst til højre" +Filter.Transform.Mipmapping="Aktiver Mipmapping" +Filter.Upscaling="Opskalering" +Filter.Upscaling.Provider="Udbyder" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, drevet af NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super opløsning" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Skala" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Styrke" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Svag" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Stærk" +Filter.VirtualGreenscreen="Virtuel grøn skærm" +Filter.VirtualGreenscreen.Provider="Udbyder" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, drevet af NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Tilstand" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Ydelse" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kvalitet" +Source.Mirror="Kilde spejl" +Source.Mirror.Source="Kilde" +Source.Mirror.Source.Audio="Aktiver lyd" +Source.Mirror.Source.Audio.Layout="Layout af lyd" +Source.Mirror.Source.Audio.Layout.Unknown="Ukendt" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Stereo med LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Quadrafonisk" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Quadrafonisk med LFE" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Fuld surround" +Codec.AV1="AV1" +Codec.AV1.Profile="Profil" +Codec.AV1.Profile.Main="Vigtigste" +Codec.AV1.Profile.High="Høj" +Codec.AV1.Profile.Professional="Professionel" +Codec.H264="H264" +Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Baseline" +Codec.H264.Profile.main="Vigtigste" +Codec.H264.Profile.high="Høj" +Codec.H264.Profile.high444p="Høj 4:4:4:4 Forudsigelig" +Codec.H264.Level="Niveau" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Profil" +Codec.HEVC.Profile.main="Vigtigste" +Codec.HEVC.Profile.main10="Main 10-bit" +Codec.HEVC.Profile.rext="Udvidet rækkevidde" +Codec.HEVC.Tier="Niveau" +Codec.HEVC.Tier.main="Vigtigste" +Codec.HEVC.Tier.high="Høj" +Codec.HEVC.Level="Niveau" +Codec.ProRes.Profile="Profil" +Codec.ProRes.Profile.APCO="422 fuldmagt (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standard (APCN)" +Codec.ProRes.Profile.APCH="422 Høj kvalitet/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Høj kvalitet/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Ekstrem kvalitet/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4:4)" diff --git a/data/locale/de-DE.ini b/data/locale/de-DE.ini index f3131e637d..b10feee2bf 100644 --- a/data/locale/de-DE.ini +++ b/data/locale/de-DE.ini @@ -51,9 +51,13 @@ UI.Updater.GitHubPermission.Text="Um manuelle oder automatische Updateprüfungen UI.Updater.Menu.CheckForUpdates="Prüfe auf Updates" UI.Updater.Menu.CheckForUpdates.Automatically="Automatische Updateprüfung" UI.Updater.Menu.Channel="Updatekanal" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Kandidat" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1="AOM AV1 (direkt)" +Encoder.AOM.AV1.Deprecated="Dieser Encoder ist veraltet und wird bald entfernt werden. Benutzer werden dringend gebeten, so bald wie möglich auf den integrierten 'SVT-AV1' oder 'AOM AV1' Encoder zu wechseln." Encoder.AOM.AV1.Encoder="Kodierer" Encoder.AOM.AV1.Encoder.Usage="Verwendungszweck" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Gute Qualität" @@ -124,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Bilder" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunden" Encoder.FFmpeg.KeyFrames.Interval="Intervall" +Encoder.FFmpeg.AMF.Deprecated="Dieser Encoder ist veraltet und wird bald entfernt werden. Benutzer werden dringend gebeten, so bald wie möglich auf den integrierten 'AMD HW H.264 (AVC)' oder 'AMD HW H.265 (HEVC)' Encoder umzusteigen." Encoder.FFmpeg.AMF.Preset="Voreinstellung" Encoder.FFmpeg.AMF.Preset.Speed="Geschwindigkeit" Encoder.FFmpeg.AMF.Preset.Balanced="Ausgeglichen" @@ -355,6 +360,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Schwach" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Stark" Filter.Displacement="Verschiebungs-Mapping" +Filter.Displacement.Deprecated="Dieser Filter ist veraltet und wurde entfernt. Benutzer werden dringend gebeten, sofort auf den Filter 'Shader' mit dem Beispiel 'displace.effect' umzusteigen." Filter.Displacement.File="Datei" Filter.Displacement.Scale="Skalierung" Filter.Displacement.Scale.Type="Skalierungsart" diff --git a/data/locale/el-GR.ini b/data/locale/el-GR.ini index 975a9c217f..dbd97c19bd 100644 --- a/data/locale/el-GR.ini +++ b/data/locale/el-GR.ini @@ -1,30 +1,513 @@ +Advanced="Προηγμένες επιλογές" +Manual.Open="Ανοιχτό εγχειρίδιο" +Channel.Red="Κόκκινο" +Channel.Green="Πράσινο" +Channel.Blue="Μπλε" +Channel.Alpha="Alpha" +FileType.Image="Εικόνα" +FileType.Images="Εικόνες" +FileType.Video="Βίντεο" +FileType.Videos="Βίντεο" +FileType.Sound="Ήχος" +FileType.Sounds="Ακούγεται" +FileType.Effect="Επίδραση" +FileType.Effects="Αποτελέσματα" +SourceType.Source="Πηγή" +SourceType.Scene="Σκηνή" +State.Disabled="Άτομα με ειδικές ανάγκες" +State.Enabled="Ενεργοποιημένο" +State.Manual="Χειροκίνητο" +State.Automatic="Αυτόματο" +State.Default="Προεπιλογή" +UI.Menu="StreamFX" +UI.Menu.Wiki="Διαβάστε το Wiki" +UI.Menu.Support="Βοήθεια & & Υποστήριξη" +UI.Menu.Website="Επισκεφθείτε την ιστοσελίδα της StreamFX" +UI.Menu.Discord="Εγγραφείτε στο Discord της StreamFX" +UI.Menu.Twitter="Ακολουθήστε την StreamFX στο Twitter" +UI.Menu.YouTube="Εγγραφείτε στο StreamFX στο YouTube" +UI.Menu.About="Σχετικά με την StreamFX" +UI.About.Title="Σχετικά με την StreamFX" +UI.About.Text="

Το StreamFX καθίσταται εφικτό χάρη σε όλους τους υποστηρικτές στο Patreon, στο Github Sponsors, και σε όσους κάνουν δωρεές μέσω του PayPal. Πρόσθετες ευχαριστίες απευθύνονται σε όλους τους μεταφραστές που βοηθούν με την τοπική προσαρμογή στο Crowdin. Είστε όλοι καταπληκτικοί!

" +UI.About.Role.Contributor="Συντελεστής" +UI.About.Role.Translator="Μεταφραστής" +UI.About.Role.Supporter="Υποστηρικτής" +UI.About.Version="Έκδοση:" +UI.Updater.Dialog.Title="StreamFX Έκδοση %s είναι τώρα διαθέσιμη!" +UI.Updater.Dialog.Text="Μια νέα έκδοση του StreamFX είναι διαθέσιμη για λήψη." +UI.Updater.Dialog.Version.Current="Τρέχουσα έκδοση:" +UI.Updater.Dialog.Version.Latest="Τελευταία έκδοση:" +UI.Updater.Dialog.Button.Ok="Άνοιγμα σελίδας λήψης" +UI.Updater.Dialog.Button.Cancel="Θύμισέ μου αργότερα" +UI.Updater.GitHubPermission.Title="Το StreamFX απαιτεί την άδειά σας για να συνδεθεί στο GitHub!" +UI.Updater.GitHubPermission.Text="Προκειμένου να παρέχει χειροκίνητο ή αυτοματοποιημένο έλεγχο ενημερώσεων, το StreamFX βασίζεται στο API του GitHub για την ανάκτηση των πιο πρόσφατων πληροφοριών.
Παρακαλούμε διαβάστε τη δήλωση απορρήτου Github, και κάντε κλικ στο 'OK' αν συμφωνείτε ή στο 'Cancel' αν διαφωνείτε." +UI.Updater.Menu.CheckForUpdates="Έλεγχος για ενημερώσεις" +UI.Updater.Menu.CheckForUpdates.Automatically="Αυτόματος έλεγχος για ενημερώσεις" +UI.Updater.Menu.Channel="Κανάλι ενημέρωσης" +UI.Updater.Menu.Channel.Stable="Σταθερό" +UI.Updater.Menu.Channel.Candidate="Υποψήφιος" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Alpha" +Encoder.AOM.AV1="AOM AV1 (απευθείας)" +Encoder.AOM.AV1.Deprecated="Αυτός ο κωδικοποιητής έχει ξεπεραστεί και θα καταργηθεί σύντομα. Οι χρήστες καλούνται να στραφούν στον ενσωματωμένο κωδικοποιητή 'SVT-AV1' ή 'AOM AV1' το συντομότερο δυνατό." +Encoder.AOM.AV1.Encoder="Κωδικοποιητής" +Encoder.AOM.AV1.Encoder.Usage="Χρήση" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Καλή ποιότητα" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Πραγματικός χρόνος" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Όλα Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="Χρήση CPU" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Εικονικό φάρμακο" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Πολύ αργή" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Πιο αργή" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Αργή" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Μεσαίο" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Γρήγορη" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Ταχύτερη" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Πολύ γρήγορα" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Σούπερ γρήγορα" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Εξαιρετικά γρήγορο" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Παράλογα γρήγορα" +Encoder.AOM.AV1.Encoder.Profile="Προφίλ" +Encoder.AOM.AV1.KeyFrames="Πλαίσιο-κλειδί" +Encoder.AOM.AV1.KeyFrames.IntervalType="Τύπος διαστήματος" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Πλαίσια" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Δευτερόλεπτα" +Encoder.AOM.AV1.KeyFrames.Interval="Διάστημα" +Encoder.AOM.AV1.RateControl="Έλεγχος ποσοστού" +Encoder.AOM.AV1.RateControl.Mode="Λειτουργία" +Encoder.AOM.AV1.RateControl.Mode.CBR="Σταθερό ρυθμό μετάδοσης (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Μεταβλητό ρυθμό μετάδοσης (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Ποιότητα με περιορισμούς (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Σταθερή ποιότητα (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Look-Ahead" +Encoder.AOM.AV1.RateControl.Limits="Όρια" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Υπολειπόμενο ρυθμό bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Υπέρβαση ρυθμού μετάδοσης" +Encoder.AOM.AV1.RateControl.Limits.Quality="Ποιότητα" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Ελάχιστος κβαντιστής" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Μέγιστος κβαντιστής" +Encoder.AOM.AV1.RateControl.Buffer="Ρυθμιστικό διάλυμα" +Encoder.AOM.AV1.RateControl.Buffer.Size="Μέγεθος" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Αρχικό μέγεθος" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Βέλτιστο μέγεθος" +Encoder.AOM.AV1.Advanced="Προχωρημένο" +Encoder.AOM.AV1.Advanced.Threads="Νήματα" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-Threading ανά σειρά" +Encoder.AOM.AV1.Advanced.Tile.Columns="Στήλες κεραμιδιών" +Encoder.AOM.AV1.Advanced.Tile.Rows="Σειρές πλακιδίων" +Encoder.AOM.AV1.Advanced.Tune="Συντονισμός" +Encoder.AOM.AV1.Advanced.Tune.Metric="Μετρικό" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (με προεπεξεργασία)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (χωρίς προεπεξεργασία)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Περιεχόμενο" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Οθόνη" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Ταινία" +Encoder.FFmpeg="Επιλογές FFmpeg" +Encoder.FFmpeg.Suffix=" (μέσω FFmpeg)" +Encoder.FFmpeg.CustomSettings="Προσαρμοσμένες ρυθμίσεις" +Encoder.FFmpeg.Threads="Αριθμός νημάτων" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Βασικά πλαίσια" +Encoder.FFmpeg.KeyFrames.IntervalType="Τύπος διαστήματος" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Πλαίσια" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Δευτερόλεπτα" +Encoder.FFmpeg.KeyFrames.Interval="Διάστημα" +Encoder.FFmpeg.AMF.Deprecated="Αυτός ο κωδικοποιητής έχει ξεπεραστεί και θα καταργηθεί σύντομα. Οι χρήστες καλούνται να μεταβούν στον ενσωματωμένο κωδικοποιητή 'AMD HW H.264 (AVC)' ή 'AMD HW H.265 (HEVC)' το συντομότερο δυνατό." +Encoder.FFmpeg.AMF.Preset="Προεπιλεγμένο" +Encoder.FFmpeg.AMF.Preset.Speed="Ταχύτητα" +Encoder.FFmpeg.AMF.Preset.Balanced="Ισορροπημένο" +Encoder.FFmpeg.AMF.Preset.Quality="Ποιότητα" +Encoder.FFmpeg.AMF.RateControl="Επιλογές ελέγχου ρυθμού" +Encoder.FFmpeg.AMF.RateControl.Mode="Λειτουργία" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Σταθερή παράμετρος κβαντισμού" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Μεταβλητό bitrate (περιορισμένο μέγιστο)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Μεταβλητό ρυθμό μετάδοσης (περιορισμένη καθυστέρηση)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Σταθερό Bitrate" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Κοιτάξτε μπροστά" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Παράλειψη πλαισίων" +Encoder.FFmpeg.AMF.RateControl.Limits="Όρια" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Μέγεθος ρυθμιστικού διαστήματος" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Bitrate στόχου" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Μέγιστο Bitrate" +Encoder.FFmpeg.AMF.RateControl.QP="Παράμετροι κβαντισμού" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="Πλαίσιο P QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="Πλαίσιο B QP" +Encoder.FFmpeg.AMF.Other="Άλλες επιλογές" +Encoder.FFmpeg.AMF.Other.BFrames="Μέγιστο B-Frames" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-Frame Αναφορές" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Πλαίσια αναφοράς" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Επιβολή της ΑΑΔ" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Διαχωριστής μονάδας πρόσβασης" +Encoder.FFmpeg.NVENC.Preset="Προεπιλεγμένο" +Encoder.FFmpeg.NVENC.Preset.default="Προεπιλογή" +Encoder.FFmpeg.NVENC.Preset.slow="Αργή" +Encoder.FFmpeg.NVENC.Preset.medium="Μεσαίο" +Encoder.FFmpeg.NVENC.Preset.fast="Γρήγορη" +Encoder.FFmpeg.NVENC.Preset.hp="Υψηλή απόδοση" +Encoder.FFmpeg.NVENC.Preset.hq="Υψηλή ποιότητα" +Encoder.FFmpeg.NVENC.Preset.bd="Δίσκος BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Χαμηλή καθυστέρηση" +Encoder.FFmpeg.NVENC.Preset.llhq="Χαμηλή καθυστέρηση Υψηλή ποιότητα" +Encoder.FFmpeg.NVENC.Preset.llhp="Χαμηλή καθυστέρηση Υψηλές επιδόσεις" +Encoder.FFmpeg.NVENC.Preset.lossless="Χωρίς απώλειες" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Υψηλές επιδόσεις χωρίς απώλειες" +Encoder.FFmpeg.NVENC.Preset.p1="Γρηγορότερος (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Πιο γρήγορα (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Γρήγορα (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Μέτρια (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Αργή (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Πιο αργή (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Αργότερος (P7)" +Encoder.FFmpeg.NVENC.Tune="Συντονισμός" +Encoder.FFmpeg.NVENC.Tune.hq="Υψηλή ποιότητα" +Encoder.FFmpeg.NVENC.Tune.ll="Χαμηλή καθυστέρηση" +Encoder.FFmpeg.NVENC.Tune.ull="Εξαιρετικά χαμηλή καθυστέρηση" +Encoder.FFmpeg.NVENC.Tune.lossless="Χωρίς απώλειες" +Encoder.FFmpeg.NVENC.RateControl="Επιλογές ελέγχου ρυθμού" +Encoder.FFmpeg.NVENC.RateControl.Mode="Λειτουργία" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Σταθερή παράμετρος κβαντισμού" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Μεταβλητό Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Σταθερό Bitrate" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Δύο περάσματα" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Ενιαίο πέρασμα" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Δύο περάσματα σε ανάλυση τετάρτου" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Δύο περάσματα σε πλήρη ανάλυση" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Κοιτάξτε μπροστά" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Προσαρμοστικά I-Frames" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Προσαρμοστικά πλαίσια B" +Encoder.FFmpeg.NVENC.RateControl.Limits="Όρια" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Μέγεθος ρυθμιστικού διαστήματος" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Ποιότητα στόχου" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Bitrate στόχου" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Μέγιστο Bitrate" +Encoder.FFmpeg.NVENC.RateControl.QP="Παράμετροι κβαντισμού" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Ελάχιστο QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Μέγιστο QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="Πλαίσιο P QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="Πλαίσιο B QP" +Encoder.FFmpeg.NVENC.AQ="Προσαρμοστικός κβαντισμός" +Encoder.FFmpeg.NVENC.AQ.Spatial="Χωρικός προσαρμοστικός κβαντισμός" +Encoder.FFmpeg.NVENC.AQ.Strength="Χωρική προσαρμοστική δύναμη κβαντισμού" +Encoder.FFmpeg.NVENC.AQ.Temporal="Χρονικός προσαρμοστικός κβαντισμός" +Encoder.FFmpeg.NVENC.Other="Άλλες επιλογές" +Encoder.FFmpeg.NVENC.Other.BFrames="Μέγιστο B-Frames" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Λειτουργία αναφοράς πλαισίου B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Δεν θα χρησιμοποιηθούν πλαίσια Β ως αναφορά" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Μόνο τα B-Frames/2 θα χρησιμοποιηθούν ως αναφορά" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Κάθε πλαίσιο Β θα χρησιμοποιηθεί ως αναφορά" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Μηδενική καθυστέρηση" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Σταθμισμένη πρόβλεψη" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Πλαίσια P χωρίς αναφορά" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Πλαίσια αναφοράς" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Κλίμακα Key-Frame χαμηλής καθυστέρησης" +Blur.Type.Box="Κουτί" +Blur.Type.BoxLinear="Κουτί Γραμμικό" +Blur.Type.Gaussian="Γκαουσιανή" +Blur.Type.GaussianLinear="Gaussian Γραμμική" +Blur.Type.DualFiltering="Διπλό φιλτράρισμα" +Blur.Subtype.Area="Περιοχή" +Blur.Subtype.Directional="Κατευθυντικό" +Blur.Subtype.Rotational="Περιστροφικό" +Blur.Subtype.Zoom="Ζουμ" +Shader="Shader" +Shader.Refresh="Επιλογές και παράμετροι ανανέωσης" +Shader.Shader="Επιλογές Shader" +Shader.Shader.File="Αρχείο" +Shader.Shader.Technique="Τεχνική" +Shader.Shader.Size="Μέγεθος" +Shader.Shader.Size.Width="Πλάτος" +Shader.Shader.Size.Height="Ύψος" +Shader.Shader.Seed="Τυχαιοποίηση Σπόρος" +Shader.Parameters="Παράμετροι Shader" +Shader.Parameter.Texture.Type="Τύπος" +Shader.Parameter.Texture.Type.File="Αρχείο" +Shader.Parameter.Texture.Type.Source="Πηγή" +Shader.Parameter.Texture.File="Αρχείο" +Shader.Parameter.Texture.Source="Πηγή" +Filter.Shader="Shader" +Source.Shader="Shader" +Transition.Shader="Shader" +Filter.AutoFraming="Auto-Framing" +Filter.AutoFraming.Tracking="Επιλογές παρακολούθησης" +Filter.AutoFraming.Tracking.Mode="Λειτουργία" +Filter.AutoFraming.Tracking.Mode.Solo="Σόλο" +Filter.AutoFraming.Tracking.Mode.Group="Ομάδα" +Filter.AutoFraming.Tracking.Frequency="Συχνότητα" +Filter.AutoFraming.Motion="Επιλογές κίνησης" +Filter.AutoFraming.Motion.Smoothing="Εξομάλυνση" +Filter.AutoFraming.Motion.Prediction="Πρόβλεψη" +Filter.AutoFraming.Framing="Επιλογές πλαισίωσης" +Filter.AutoFraming.Framing.Stability="Σταθερότητα" +Filter.AutoFraming.Framing.Padding="Padding" +Filter.AutoFraming.Framing.Offset="Offset" +Filter.AutoFraming.Framing.AspectRatio="Αναλογία διαστάσεων" +Filter.AutoFraming.Provider="Πάροχος" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="Ανίχνευση προσώπου NVIDIA®, που υποστηρίζεται από την NVIDIA® Broadcast" +Filter.Blur="Θολούρα" +Filter.Blur.Type="Τύπος" +Filter.Blur.Subtype="Υποτύπος" +Filter.Blur.Size="Μέγεθος" +Filter.Blur.Angle="Γωνία (μοίρες)" +Filter.Blur.Center.X="Κέντρο (X) (Ποσοστό)" +Filter.Blur.Center.Y="Κέντρο (Υ) (Ποσοστό)" +Filter.Blur.StepScale="Κλιμάκωση βημάτων" +Filter.Blur.StepScale.X="Βήμα Κλίμακα X" +Filter.Blur.StepScale.Y="Βήμα Κλίμακα Y" +Filter.Blur.Mask="Εφαρμόστε μια μάσκα" +Filter.Blur.Mask.Type="Τύπος μάσκας" +Filter.Blur.Mask.Type.Region="Περιοχή" +Filter.Blur.Mask.Type.Image="Εικόνα" +Filter.Blur.Mask.Type.Source="Πηγή" +Filter.Blur.Mask.Region.Left="Αριστερή άκρη" +Filter.Blur.Mask.Region.Top="Επάνω άκρη" +Filter.Blur.Mask.Region.Right="Δεξιά άκρη" +Filter.Blur.Mask.Region.Bottom="Κάτω άκρο" +Filter.Blur.Mask.Region.Feather="Περιοχή Φτερό" +Filter.Blur.Mask.Region.Feather.Shift="Μετατόπιση φτερών" +Filter.Blur.Mask.Region.Invert="Αντιστροφή περιοχής" +Filter.Blur.Mask.Image="Μάσκα εικόνας" +Filter.Blur.Mask.Source="Μάσκα πηγής" +Filter.Blur.Mask.Color="Φίλτρο χρώματος μάσκας" +Filter.Blur.Mask.Alpha="Φίλτρο Alpha μάσκας" +Filter.Blur.Mask.Multiplier="Πολλαπλασιαστής μάσκας" +Filter.ColorGrade="Διαβάθμιση χρώματος" +Filter.ColorGrade.Lift="Ανελκυστήρας" +Filter.ColorGrade.Lift.Red="Κόκκινος ανελκυστήρας" +Filter.ColorGrade.Lift.Green="Πράσινο ασανσέρ" +Filter.ColorGrade.Lift.Blue="Μπλε ανελκυστήρας" +Filter.ColorGrade.Lift.All="Όλος ο ανελκυστήρας" +Filter.ColorGrade.Gamma="Γάμμα" +Filter.ColorGrade.Gamma.Red="Κόκκινο γάμμα" +Filter.ColorGrade.Gamma.Green="Πράσινο Γάμμα" +Filter.ColorGrade.Gamma.Blue="Μπλε Γάμμα" +Filter.ColorGrade.Gamma.All="Όλα Gamma" +Filter.ColorGrade.Gain="Κέρδος" +Filter.ColorGrade.Gain.Red="Κόκκινο κέρδος" +Filter.ColorGrade.Gain.Green="Πράσινο κέρδος" +Filter.ColorGrade.Gain.Blue="Μπλε κέρδος" +Filter.ColorGrade.Gain.All="Όλα τα κέρδη" +Filter.ColorGrade.Offset="Offset" +Filter.ColorGrade.Offset.Red="Κόκκινο Offset" +Filter.ColorGrade.Offset.Green="Πράσινο αντιστάθμισμα" +Filter.ColorGrade.Offset.Blue="Μπλε Offset" +Filter.ColorGrade.Offset.All="Όλα Offset" +Filter.ColorGrade.Tint="Απόχρωση" +Filter.ColorGrade.Tint.Detection="Μέθοδος ανίχνευσης Tint Luma" +Filter.ColorGrade.Tint.Detection.HSV="Απόχρωση Κορεσμός Τιμή" +Filter.ColorGrade.Tint.Detection.HSL="Απόχρωση Κορεσμός Φωτεινότητα" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Χρώμα (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Λειτουργία Luma απόχρωσης" +Filter.ColorGrade.Tint.Mode.Linear="Γραμμική" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Ημερολόγιο" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Απόχρωση Luma Εκθέτης" +Filter.ColorGrade.Tint.Shadow.Red="Σκιά κόκκινη απόχρωση" +Filter.ColorGrade.Tint.Shadow.Green="Σκιά πράσινη απόχρωση" +Filter.ColorGrade.Tint.Shadow.Blue="Σκιά μπλε απόχρωση" +Filter.ColorGrade.Tint.Midtone.Red="Κόκκινη απόχρωση Midtone" +Filter.ColorGrade.Tint.Midtone.Green="Πράσινη απόχρωση Midtone" +Filter.ColorGrade.Tint.Midtone.Blue="Midtone μπλε απόχρωση" +Filter.ColorGrade.Tint.Highlight.Red="Highlight Κόκκινη απόχρωση" +Filter.ColorGrade.Tint.Highlight.Green="Επισημάνετε την πράσινη απόχρωση" +Filter.ColorGrade.Tint.Highlight.Blue="Επισημάνετε μπλε απόχρωση" +Filter.ColorGrade.Correction="Διόρθωση χρώματος" +Filter.ColorGrade.Correction.Hue="Μετατόπιση απόχρωσης" +Filter.ColorGrade.Correction.Saturation="Κορεσμός" +Filter.ColorGrade.Correction.Lightness="Ελαφρότητα" +Filter.ColorGrade.Correction.Contrast="Αντίθεση" +Filter.ColorGrade.RenderMode="Λειτουργία αναπαράστασης" +Filter.ColorGrade.RenderMode.Direct="Άμεση απόδοση" +Filter.ColorGrade.RenderMode.LUT.2Bit="Πίνακας αναζήτησης 2-bit" +Filter.ColorGrade.RenderMode.LUT.4Bit="Πίνακας αναζήτησης 4-bit" +Filter.ColorGrade.RenderMode.LUT.6Bit="Πίνακας αναζήτησης 6-bit" +Filter.ColorGrade.RenderMode.LUT.8Bit="Πίνακας αναζήτησης 8-bit" +Filter.ColorGrade.RenderMode.LUT.10Bit="Πίνακας αναζήτησης 10-bit" +Filter.Denoising="Αποθορυβοποίηση" +Filter.Denoising.Provider="Πάροχος" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, που υποστηρίζεται από την NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="Αποθορυβοποίηση NVIDIA®" +Filter.Denoising.NVIDIA.Denoising.Strength="Δύναμη" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Αδύναμο" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Ισχυρό" +Filter.Displacement="Χαρτογράφηση μετατόπισης" +Filter.Displacement.Deprecated="Αυτό το φίλτρο έχει καταργηθεί και έχει αφαιρεθεί. Οι χρήστες καλούνται να μεταβούν αμέσως στο φίλτρο 'Shader' με το παράδειγμα 'displace.effect'." +Filter.Displacement.File="Αρχείο" +Filter.Displacement.Scale="Κλίμακα" +Filter.Displacement.Scale.Type="Τύπος κλιμάκωσης" +Filter.DynamicMask="Δυναμική μάσκα" +Filter.DynamicMask.Input="Πηγή εισόδου" +Filter.DynamicMask.Channel="%s Κανάλι" +Filter.DynamicMask.Channel.Value="Αξία βάσης" +Filter.DynamicMask.Channel.Multiplier="Πολλαπλασιαστής" +Filter.DynamicMask.Channel.Input="%s Τιμή εισόδου" +Filter.SDFEffects="Επιπτώσεις SDF" +Filter.SDFEffects.Shadow.Inner="Εσωτερική σκιά" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Εσωτερική σκιά Ελάχιστη απόσταση" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Εσωτερική σκιά Μέγιστη απόσταση" +Filter.SDFEffects.Shadow.Inner.Offset.X="Μετατόπιση εσωτερικής σκιάς X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Μετατόπιση εσωτερικής σκιάς Y" +Filter.SDFEffects.Shadow.Inner.Color="Χρώμα εσωτερικής σκιάς" +Filter.SDFEffects.Shadow.Inner.Alpha="Εσωτερική σκιά Άλφα" +Filter.SDFEffects.Shadow.Outer="Εξωτερική σκιά" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Εξωτερική σκιά Ελάχιστη απόσταση" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Εξωτερική σκιά Μέγιστη απόσταση" +Filter.SDFEffects.Shadow.Outer.Offset.X="Εξωτερική μετατόπιση σκιάς X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Εξωτερική μετατόπιση σκιάς Y" +Filter.SDFEffects.Shadow.Outer.Color="Χρώμα εξωτερικής σκιάς" +Filter.SDFEffects.Shadow.Outer.Alpha="Εξωτερική σκιά Άλφα" +Filter.SDFEffects.Glow.Outer="Εξωτερική λάμψη" +Filter.SDFEffects.Glow.Outer.Color="Εξωτερικό χρώμα λάμψης" +Filter.SDFEffects.Glow.Outer.Alpha="Εξωτερική λάμψη Alpha" +Filter.SDFEffects.Glow.Outer.Width="Εξωτερικό πλάτος λάμψης" +Filter.SDFEffects.Glow.Outer.Sharpness="Εξωτερική λάμψη Ευκρίνεια" +Filter.SDFEffects.Glow.Inner="Εσωτερική λάμψη" +Filter.SDFEffects.Glow.Inner.Color="Χρώμα εσωτερικής λάμψης" +Filter.SDFEffects.Glow.Inner.Alpha="Εσωτερική λάμψη Alpha" +Filter.SDFEffects.Glow.Inner.Width="Πλάτος εσωτερικής λάμψης" +Filter.SDFEffects.Glow.Inner.Sharpness="Εσωτερική λάμψη Αιχμηρότητα" +Filter.SDFEffects.Outline="Περίγραμμα" +Filter.SDFEffects.Outline.Color="Χρώμα περιγράμματος" +Filter.SDFEffects.Outline.Alpha="Περίγραμμα Alpha" +Filter.SDFEffects.Outline.Width="Πλάτος περιγράμματος" +Filter.SDFEffects.Outline.Offset="Μετατόπιση περιγράμματος" +Filter.SDFEffects.Outline.Sharpness="Ευκρίνεια περιγράμματος" +Filter.SDFEffects.SDF.Scale="Κλίμακα υφής SDF" +Filter.SDFEffects.SDF.Threshold="Κατώφλι SDF Alpha" +Filter.Transform="Μετασχηματισμός 3D" +Filter.Transform.Camera="Κάμερα" +Filter.Transform.Camera.Mode="Λειτουργία" +Filter.Transform.Camera.Mode.CornerPin="Γωνιακός πείρος" +Filter.Transform.Camera.Mode.Orthographic="Ορθογραφικό" +Filter.Transform.Camera.Mode.Perspective="Προοπτική" +Filter.Transform.Camera.FieldOfView="Πεδίο θέασης" +Filter.Transform.Position="Θέση" +Filter.Transform.Position.X="X" +Filter.Transform.Position.Y="Y" +Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Κλίμακα" +Filter.Transform.Scale.X="X" +Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Διάτμηση" +Filter.Transform.Shear.X="X" +Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Περιστροφή" +Filter.Transform.Rotation.X="Βήμα (X)" +Filter.Transform.Rotation.Y="Κλίση (Y)" +Filter.Transform.Rotation.Z="Κύλιση (Z)" +Filter.Transform.Rotation.Order="Σειρά περιστροφής" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Κλίση, κλίση, κύλιση" +Filter.Transform.Rotation.Order.YZX="Κλίση, κύλιση, κλίση" +Filter.Transform.Rotation.Order.ZXY="Roll, Pitch, Yaw" +Filter.Transform.Rotation.Order.ZYX="Roll, Yaw, Pitch" +Filter.Transform.Corners="Γωνίες" +Filter.Transform.Corners.TopLeft="Επάνω αριστερά" +Filter.Transform.Corners.TopRight="Επάνω δεξιά" +Filter.Transform.Corners.BottomLeft="Κάτω αριστερά" +Filter.Transform.Corners.BottomRight="Κάτω δεξιά" +Filter.Transform.Mipmapping="Ενεργοποίηση Mipmapping" +Filter.Upscaling="Αναβάθμιση της κλίμακας" +Filter.Upscaling.Provider="Πάροχος" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, που υποστηρίζεται από την NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Κλίμακα" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Δύναμη" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Αδύναμο" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Ισχυρό" +Filter.VirtualGreenscreen="Εικονική πράσινη οθόνη" +Filter.VirtualGreenscreen.Provider="Πάροχος" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, που υποστηρίζεται από την NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Λειτουργία" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Επιδόσεις" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Ποιότητα" +Source.Mirror="Πηγή Καθρέφτης" +Source.Mirror.Source="Πηγή" +Source.Mirror.Source.Audio="Ενεργοποίηση ήχου" +Source.Mirror.Source.Audio.Layout="Διάταξη ήχου" +Source.Mirror.Source.Audio.Layout.Unknown="Άγνωστος" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Στερεοφωνικό" +Source.Mirror.Source.Audio.Layout.StereoLFE="Στερεοφωνία με LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Τετραφωνικό" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Τετραφωνικό με LFE" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Πλήρες Surround" +Codec.AV1="AV1" +Codec.AV1.Profile="Προφίλ" +Codec.AV1.Profile.Main="Κύρια" +Codec.AV1.Profile.High="Υψηλή" +Codec.AV1.Profile.Professional="Επαγγελματικό" +Codec.H264="H264" +Codec.H264.Profile="Προφίλ" +Codec.H264.Profile.baseline="Βασική γραμμή" +Codec.H264.Profile.main="Κύρια" +Codec.H264.Profile.high="Υψηλή" +Codec.H264.Profile.high444p="Υψηλή 4:4:4:4 Προβλεπτική" +Codec.H264.Level="Επίπεδο" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Προφίλ" +Codec.HEVC.Profile.main="Κύρια" +Codec.HEVC.Profile.main10="Κύρια 10-bit" +Codec.HEVC.Profile.rext="Εύρος Επέκταση" +Codec.HEVC.Tier="Βαθμίδα" +Codec.HEVC.Tier.main="Κύρια" +Codec.HEVC.Tier.high="Υψηλή" +Codec.HEVC.Level="Επίπεδο" +Codec.ProRes.Profile="Προφίλ" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Πρότυπο (APCN)" +Codec.ProRes.Profile.APCH="422 Υψηλή ποιότητα/Υψηλή ποιότητα (APCH)" +Codec.ProRes.Profile.AP4H="4444 Υψηλή ποιότητα/Ποιοτικό (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.DNxHR.Profile="Προφίλ" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index 039ac36702..608cfdae18 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -57,6 +57,7 @@ UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (directo)" +Encoder.AOM.AV1.Deprecated="Este codificador está obsoleto y se eliminará pronto. Se insta a los usuarios a cambiar al codificador integrado 'SVT-AV1' o 'AOM AV1' lo antes posible." Encoder.AOM.AV1.Encoder="Codificador" Encoder.AOM.AV1.Encoder.Usage="Uso" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Buena Calidad" diff --git a/data/locale/et-EE.ini b/data/locale/et-EE.ini index 975a9c217f..0ea0888280 100644 --- a/data/locale/et-EE.ini +++ b/data/locale/et-EE.ini @@ -1,30 +1,513 @@ +Advanced="Täiustatud valikud" +Manual.Open="Avatud käsiraamat" +Channel.Red="Punane" +Channel.Green="Roheline" +Channel.Blue="Sinine" +Channel.Alpha="Alpha" +FileType.Image="Pilt" +FileType.Images="Pildid" +FileType.Video="Video" +FileType.Videos="Videod" +FileType.Sound="Heli" +FileType.Sounds="Kõlab" +FileType.Effect="Mõju" +FileType.Effects="Efektid" +SourceType.Source="Allikas" +SourceType.Scene="Stseen" +State.Disabled="Puudega inimesed" +State.Enabled="Lubatud" +State.Manual="Käsitsi" +State.Automatic="Automaatne" +State.Default="Vaikimisi" +UI.Menu="StreamFX" +UI.Menu.Wiki="Loe Wiki" +UI.Menu.Support="Abi & & tugi" +UI.Menu.Website="Külasta StreamFXi veebisaiti" +UI.Menu.Discord="Liitu StreamFX Discordiga" +UI.Menu.Twitter="Jälgi StreamFXi Twitteris" +UI.Menu.YouTube="StreamFXi tellimine YouTube'is" +UI.Menu.About="StreamFXi kohta" +UI.About.Title="StreamFXi kohta" +UI.About.Text="

StreamFX on võimalik tänu kõigile toetajatele Patreon, Githubi sponsoriteleja kõigile, kes annetavad läbi PayPali. Täiendavad tänud lähevad kõigile tõlkijatele, kes aitavad lokaliseerimisel Crowdin. Te kõik olete hämmastavad!

" +UI.About.Role.Contributor="Toetaja" +UI.About.Role.Translator="Tõlkija" +UI.About.Role.Supporter="Toetaja" +UI.About.Version="Versioon:" +UI.Updater.Dialog.Title="StreamFX versioon %s on nüüd saadaval!" +UI.Updater.Dialog.Text="StreamFXi uus versioon on saadaval allalaadimiseks." +UI.Updater.Dialog.Version.Current="Praegune versioon:" +UI.Updater.Dialog.Version.Latest="Viimane versioon:" +UI.Updater.Dialog.Button.Ok="Avatud allalaadimisleht" +UI.Updater.Dialog.Button.Cancel="Tuleta mulle hiljem meelde" +UI.Updater.GitHubPermission.Title="StreamFX nõuab teie luba GitHubiga ühendumiseks!" +UI.Updater.GitHubPermission.Text="Manuaalse või automatiseeritud uuenduste kontrollimiseks tugineb StreamFX GitHubi API-le, et saada uusimat teavet.
Palun lugege Githubi privaatsusavaldustja klõpsake \"OK\", kui nõustute, või \"Tühista\", kui ei nõustu." +UI.Updater.Menu.CheckForUpdates="Kontrollige uuendusi" +UI.Updater.Menu.CheckForUpdates.Automatically="Kontrollige automaatselt uuendusi" +UI.Updater.Menu.Channel="Uuenduskanali uuendamine" +UI.Updater.Menu.Channel.Stable="Stabiilne" +UI.Updater.Menu.Channel.Candidate="Kandidaat" +UI.Updater.Menu.Channel.Beta="Beeta" +UI.Updater.Menu.Channel.Alpha="Alpha" +Encoder.AOM.AV1="AOM AV1 (otsene)" +Encoder.AOM.AV1.Deprecated="See kodeerija on aegunud ja eemaldatakse peagi. Kasutajatel soovitatakse võimalikult kiiresti üle minna integreeritud kodeerijale \"SVT-AV1\" või \"AOM AV1\"." +Encoder.AOM.AV1.Encoder="Kodeerija" +Encoder.AOM.AV1.Encoder.Usage="Kasutamine" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Hea kvaliteet" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Reaalajas" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Kõik Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="Protsessori kasutamine" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Platseebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Väga aeglane" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Aeglasem" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Aeglane" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Keskmine" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Kiire" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Kiirem" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Väga kiire" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Ülikiire" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ülikiire" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Meeletult kiire" +Encoder.AOM.AV1.Encoder.Profile="Profiil" +Encoder.AOM.AV1.KeyFrames="Key-Frame" +Encoder.AOM.AV1.KeyFrames.IntervalType="Intervalli tüüp" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Raamid" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekundid" +Encoder.AOM.AV1.KeyFrames.Interval="Intervall" +Encoder.AOM.AV1.RateControl="Hindade kontroll" +Encoder.AOM.AV1.RateControl.Mode="Režiim" +Encoder.AOM.AV1.RateControl.Mode.CBR="Konstantne bitikiirus (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Muutuva bitikiirusega (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Piiratud kvaliteet (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Konstantne kvaliteet (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Look-Ahead" +Encoder.AOM.AV1.RateControl.Limits="Piirid" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitikiirus" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Bitikiiruse allakäik" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Bitikiiruse ületamine" +Encoder.AOM.AV1.RateControl.Limits.Quality="Kvaliteet" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimaalne kvantor" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maksimaalne kvantor" +Encoder.AOM.AV1.RateControl.Buffer="Puhver" +Encoder.AOM.AV1.RateControl.Buffer.Size="Suurus" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Esialgne suurus" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimaalne suurus" +Encoder.AOM.AV1.Advanced="Täiustatud" +Encoder.AOM.AV1.Advanced.Threads="Niidid" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Mitme rea kohta mitme lõimingu tegemine" +Encoder.AOM.AV1.Advanced.Tile.Columns="Plaatide veerud" +Encoder.AOM.AV1.Advanced.Tile.Rows="Plaatide read" +Encoder.AOM.AV1.Advanced.Tune="Tune" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metriline" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (koos eeltöötlusega)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (ilma eeltöötluseta)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Sisu" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ekraan" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" +Encoder.FFmpeg="FFmpeg Valikud" +Encoder.FFmpeg.Suffix=" (kaudu FFmpeg)" +Encoder.FFmpeg.CustomSettings="Kohandatud seaded" +Encoder.FFmpeg.Threads="Niitide arv" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Võtmeraamid" +Encoder.FFmpeg.KeyFrames.IntervalType="Intervalli tüüp" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Raamid" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundid" +Encoder.FFmpeg.KeyFrames.Interval="Intervall" +Encoder.FFmpeg.AMF.Deprecated="See kodeerija on aegunud ja eemaldatakse peagi. Kasutajatel soovitatakse võimalikult kiiresti üle minna integreeritud 'AMD HW H.264 (AVC)' või 'AMD HW H.265 (HEVC)' kodeerijale." +Encoder.FFmpeg.AMF.Preset="Eelseadistatud" +Encoder.FFmpeg.AMF.Preset.Speed="Kiirus" +Encoder.FFmpeg.AMF.Preset.Balanced="Tasakaalustatud" +Encoder.FFmpeg.AMF.Preset.Quality="Kvaliteet" +Encoder.FFmpeg.AMF.RateControl="Hinnakontrolli valikud" +Encoder.FFmpeg.AMF.RateControl.Mode="Režiim" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Konstantne kvantsioneerimise parameeter" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Muutuv bitikiirus (piikide piirangutega)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Muutuv bitikiirus (viivituspiiranguga)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Konstantne bitikiirus" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Vaata ettepoole" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Kaadri vahelejätmine" +Encoder.FFmpeg.AMF.RateControl.Limits="Piirid" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Puhvri suurus" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Siht Bitrate" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maksimaalne bitikiirus" +Encoder.FFmpeg.AMF.RateControl.QP="Kvantimise parameetrid" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-raam QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-raam QP" +Encoder.FFmpeg.AMF.Other="Muud valikud" +Encoder.FFmpeg.AMF.Other.BFrames="Maksimaalsed B-raamid" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-raami viited" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referentsraamid" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Inimressursside arendamise jõustamine" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Juurdepääsuühiku eraldaja" +Encoder.FFmpeg.NVENC.Preset="Eelseadistatud" +Encoder.FFmpeg.NVENC.Preset.default="Vaikimisi" +Encoder.FFmpeg.NVENC.Preset.slow="Aeglane" +Encoder.FFmpeg.NVENC.Preset.medium="Keskmine" +Encoder.FFmpeg.NVENC.Preset.fast="Kiire" +Encoder.FFmpeg.NVENC.Preset.hp="Kõrge jõudlus" +Encoder.FFmpeg.NVENC.Preset.hq="Kõrge kvaliteet" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay ketas" +Encoder.FFmpeg.NVENC.Preset.ll="Madal latentsus" +Encoder.FFmpeg.NVENC.Preset.llhq="Madal latentsus Kõrge kvaliteet" +Encoder.FFmpeg.NVENC.Preset.llhp="Madal latentsus, kõrge jõudlus" +Encoder.FFmpeg.NVENC.Preset.lossless="Kaotusteta" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Kaotusteta kõrge jõudlus" +Encoder.FFmpeg.NVENC.Preset.p1="Kiireim (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Kiiremini (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Kiire (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Keskmine (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Aeglane (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Aeglasem (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Kõige aeglasem (P7)" +Encoder.FFmpeg.NVENC.Tune="Tune" +Encoder.FFmpeg.NVENC.Tune.hq="Kõrge kvaliteet" +Encoder.FFmpeg.NVENC.Tune.ll="Madal latentsus" +Encoder.FFmpeg.NVENC.Tune.ull="Ülimalt madal latentsus" +Encoder.FFmpeg.NVENC.Tune.lossless="Kaotusteta" +Encoder.FFmpeg.NVENC.RateControl="Hinnakontrolli valikud" +Encoder.FFmpeg.NVENC.RateControl.Mode="Režiim" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Konstantne kvantimisparameeter" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Muutuv bitikiirus" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstantne bitikiirus" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Kaks läbipääsu" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Üks läbipääs" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Kaks läbipääsu veerandlahenduse juures" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Kaks läbipääsu täislahutusega" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vaata ettepoole" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Kohanduvad I-raamid" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Kohanduvad B-raamid" +Encoder.FFmpeg.NVENC.RateControl.Limits="Piirid" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Puhvri suurus" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Eesmärk Kvaliteet" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Siht Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maksimaalne bitikiirus" +Encoder.FFmpeg.NVENC.RateControl.QP="Kvantimise parameetrid" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimaalne QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maksimaalne QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-raam QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-raam QP" +Encoder.FFmpeg.NVENC.AQ="Kohanduv kvantsioneerimine" +Encoder.FFmpeg.NVENC.AQ.Spatial="Ruumiline adaptiivne kvantimine" +Encoder.FFmpeg.NVENC.AQ.Strength="Ruumiline adaptiivne kvantimise tugevus" +Encoder.FFmpeg.NVENC.AQ.Temporal="Ajaline adaptiivne kvantimine" +Encoder.FFmpeg.NVENC.Other="Muud valikud" +Encoder.FFmpeg.NVENC.Other.BFrames="Maksimaalsed B-raamid" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-kaadri võrdlusrežiim" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="B-raame ei kasutata viitena" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Viitena kasutatakse ainult B-raame/2." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Iga B-raami kasutatakse võrdlusalusena." +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Null viivitus" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Kaalutud ennustus" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Mitteviidatud P-raamid" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referentsraamid" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Madal viivitus Key-Frame skaala" +Blur.Type.Box="Kast" +Blur.Type.BoxLinear="Kastiline lineaarne" +Blur.Type.Gaussian="Gaussi" +Blur.Type.GaussianLinear="Gaussi lineaarne" +Blur.Type.DualFiltering="Kahepoolne filtreerimine" +Blur.Subtype.Area="Piirkond" +Blur.Subtype.Directional="Suunatud" +Blur.Subtype.Rotational="Rotatsiooniline" +Blur.Subtype.Zoom="Zoom" +Shader="Shader" +Shader.Refresh="Värskendusvõimalused ja parameetrid" +Shader.Shader="Shader Valikud" +Shader.Shader.File="Faili" +Shader.Shader.Technique="Tehnika" +Shader.Shader.Size="Suurus" +Shader.Shader.Size.Width="Laius" +Shader.Shader.Size.Height="Kõrgus" +Shader.Shader.Seed="Randomiseerimine Seed" +Shader.Parameters="Shader parameetrid" +Shader.Parameter.Texture.Type="Tüüp" +Shader.Parameter.Texture.Type.File="Faili" +Shader.Parameter.Texture.Type.Source="Allikas" +Shader.Parameter.Texture.File="Faili" +Shader.Parameter.Texture.Source="Allikas" +Filter.Shader="Shader" +Source.Shader="Shader" +Transition.Shader="Shader" +Filter.AutoFraming="Automaatne raamimine" +Filter.AutoFraming.Tracking="Jälgimisvõimalused" +Filter.AutoFraming.Tracking.Mode="Režiim" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Rühm" +Filter.AutoFraming.Tracking.Frequency="Sagedus" +Filter.AutoFraming.Motion="Liikumisvõimalused" +Filter.AutoFraming.Motion.Smoothing="Silumine" +Filter.AutoFraming.Motion.Prediction="Prognoos" +Filter.AutoFraming.Framing="Raamimisvõimalused" +Filter.AutoFraming.Framing.Stability="Stabiilsus" +Filter.AutoFraming.Framing.Padding="Pehmendus" +Filter.AutoFraming.Framing.Offset="Offset" +Filter.AutoFraming.Framing.AspectRatio="Kujundisuhe" +Filter.AutoFraming.Provider="Teenusepakkuja" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® näotuvastus, mida toetab NVIDIA® Broadcast" +Filter.Blur="Blur" +Filter.Blur.Type="Tüüp" +Filter.Blur.Subtype="Alatüüp" +Filter.Blur.Size="Suurus" +Filter.Blur.Angle="Nurk (kraadid)" +Filter.Blur.Center.X="Keskus (X) (protsentides)" +Filter.Blur.Center.Y="Keskus (Y) (protsentides)" +Filter.Blur.StepScale="Astmeline skaleerimine" +Filter.Blur.StepScale.X="Astmeline skaala X" +Filter.Blur.StepScale.Y="Astmeline skaala Y" +Filter.Blur.Mask="Rakenda mask" +Filter.Blur.Mask.Type="Maski tüüp" +Filter.Blur.Mask.Type.Region="Piirkond" +Filter.Blur.Mask.Type.Image="Pilt" +Filter.Blur.Mask.Type.Source="Allikas" +Filter.Blur.Mask.Region.Left="Vasakpoolne serv" +Filter.Blur.Mask.Region.Top="Top Edge" +Filter.Blur.Mask.Region.Right="Parem serv" +Filter.Blur.Mask.Region.Bottom="Alumine serv" +Filter.Blur.Mask.Region.Feather="Sulgede piirkond" +Filter.Blur.Mask.Region.Feather.Shift="Sulgade vahetamine" +Filter.Blur.Mask.Region.Invert="Inverteeritud piirkond" +Filter.Blur.Mask.Image="Pildimask" +Filter.Blur.Mask.Source="Allikas Mask" +Filter.Blur.Mask.Color="Maski värvifilter" +Filter.Blur.Mask.Alpha="Maski alfafilter" +Filter.Blur.Mask.Multiplier="Maski kordaja" +Filter.ColorGrade="Värvi sorteerimine" +Filter.ColorGrade.Lift="Lift" +Filter.ColorGrade.Lift.Red="Punane tõstuk" +Filter.ColorGrade.Lift.Green="Roheline tõstuk" +Filter.ColorGrade.Lift.Blue="Sinine tõstuk" +Filter.ColorGrade.Lift.All="Kõik Lift" +Filter.ColorGrade.Gamma="Gamma" +Filter.ColorGrade.Gamma.Red="Punane Gamma" +Filter.ColorGrade.Gamma.Green="Roheline Gamma" +Filter.ColorGrade.Gamma.Blue="Sinine Gamma" +Filter.ColorGrade.Gamma.All="Kõik Gamma" +Filter.ColorGrade.Gain="Gain" +Filter.ColorGrade.Gain.Red="Punane kasum" +Filter.ColorGrade.Gain.Green="Roheline kasum" +Filter.ColorGrade.Gain.Blue="Sinine kasum" +Filter.ColorGrade.Gain.All="Kogu kasum" +Filter.ColorGrade.Offset="Offset" +Filter.ColorGrade.Offset.Red="Punane Offset" +Filter.ColorGrade.Offset.Green="Roheline kompensatsioon" +Filter.ColorGrade.Offset.Blue="Blue Offset" +Filter.ColorGrade.Offset.All="Kõik Offset" +Filter.ColorGrade.Tint="Tint" +Filter.ColorGrade.Tint.Detection="Tint Luma tuvastamise meetod" +Filter.ColorGrade.Tint.Detection.HSV="Värvitoon Küllastus Väärtus" +Filter.ColorGrade.Tint.Detection.HSL="Värvitoon Küllastus Heledus" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Tint Luma režiim" +Filter.ColorGrade.Tint.Mode.Linear="Lineaarne" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Logi" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Tint Luma Eksponent" +Filter.ColorGrade.Tint.Shadow.Red="Shadow Red Tint" +Filter.ColorGrade.Tint.Shadow.Green="Shadow Green Tint" +Filter.ColorGrade.Tint.Shadow.Blue="Shadow Blue Tint" +Filter.ColorGrade.Tint.Midtone.Red="Keskmise tooniga punane toon" +Filter.ColorGrade.Tint.Midtone.Green="Keskmine roheline toon" +Filter.ColorGrade.Tint.Midtone.Blue="Keskmine sinine toon" +Filter.ColorGrade.Tint.Highlight.Red="Rõhuta punast tooni" +Filter.ColorGrade.Tint.Highlight.Green="Rõhuta rohelist tooni" +Filter.ColorGrade.Tint.Highlight.Blue="Rõhuta sinist tooni" +Filter.ColorGrade.Correction="Värvikorrektsioon" +Filter.ColorGrade.Correction.Hue="Hue Shift" +Filter.ColorGrade.Correction.Saturation="Küllastumine" +Filter.ColorGrade.Correction.Lightness="Kergus" +Filter.ColorGrade.Correction.Contrast="Kontrast" +Filter.ColorGrade.RenderMode="Renderdamise režiim" +Filter.ColorGrade.RenderMode.Direct="Otsene renderdamine" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-bitine otsingutabeli" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-bitine otsimistabel" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-bitine otsimistabel" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-bitine otsimistabel" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-bitine otsimistabel" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Teenusepakkuja" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, mida toetab NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Tugevus" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Nõrgad" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Tugev" +Filter.Displacement="Nihke kaardistamine" +Filter.Displacement.Deprecated="See filter on aegunud ja eemaldatud. Kasutajatel palutakse viivitamatult üle minna filtrile 'Shader' koos näitega 'displace.effect'." +Filter.Displacement.File="Faili" +Filter.Displacement.Scale="Skaala" +Filter.Displacement.Scale.Type="Tüüp skaalamine" +Filter.DynamicMask="Dünaamiline mask" +Filter.DynamicMask.Input="Sisendi allikas" +Filter.DynamicMask.Channel="%s Kanal" +Filter.DynamicMask.Channel.Value="Baasväärtus" +Filter.DynamicMask.Channel.Multiplier="Korrutis" +Filter.DynamicMask.Channel.Input="%s Sisendväärtus" +Filter.SDFEffects="SDF mõju" +Filter.SDFEffects.Shadow.Inner="Sisemine vari" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Sisemine vari Minimaalne kaugus" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Sisemine vari Maksimaalne kaugus" +Filter.SDFEffects.Shadow.Inner.Offset.X="Sisemine varju nihe X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Sisemine varju nihe Y" +Filter.SDFEffects.Shadow.Inner.Color="Sisemine varju värv" +Filter.SDFEffects.Shadow.Inner.Alpha="Sisemine vari Alpha" +Filter.SDFEffects.Shadow.Outer="Väline vari" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Välimine vari Minimaalne kaugus" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Väline vari Maksimaalne kaugus" +Filter.SDFEffects.Shadow.Outer.Offset.X="Väline varju nihe X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Väline varju nihe Y" +Filter.SDFEffects.Shadow.Outer.Color="Välimine varju värv" +Filter.SDFEffects.Shadow.Outer.Alpha="Outer Shadow Alpha" +Filter.SDFEffects.Glow.Outer="Väline sära" +Filter.SDFEffects.Glow.Outer.Color="Väline hõõguvärv" +Filter.SDFEffects.Glow.Outer.Alpha="Väline hõõgumine Alpha" +Filter.SDFEffects.Glow.Outer.Width="Väline hõõgumise laius" +Filter.SDFEffects.Glow.Outer.Sharpness="Väline hõõgumine Teravus" +Filter.SDFEffects.Glow.Inner="Sisemine sära" +Filter.SDFEffects.Glow.Inner.Color="Sisemine helendav värv" +Filter.SDFEffects.Glow.Inner.Alpha="Sisemine sära Alpha" +Filter.SDFEffects.Glow.Inner.Width="Sisemine hõõgumine Laius" +Filter.SDFEffects.Glow.Inner.Sharpness="Sisemine hõõgumine Teravus" +Filter.SDFEffects.Outline="Ümbrised" +Filter.SDFEffects.Outline.Color="Ümbritsevärv" +Filter.SDFEffects.Outline.Alpha="Pealkiri Alpha" +Filter.SDFEffects.Outline.Width="Kontuuri laius" +Filter.SDFEffects.Outline.Offset="Outline Offset" +Filter.SDFEffects.Outline.Sharpness="Kontuuri teravus" +Filter.SDFEffects.SDF.Scale="SDF tekstuuri skaala" +Filter.SDFEffects.SDF.Threshold="SDF Alpha künnis" +Filter.Transform="3D transform" +Filter.Transform.Camera="Kaamera" +Filter.Transform.Camera.Mode="Režiim" +Filter.Transform.Camera.Mode.CornerPin="Nurgapoldid" +Filter.Transform.Camera.Mode.Orthographic="Ortograafiline" +Filter.Transform.Camera.Mode.Perspective="Perspektiiv" +Filter.Transform.Camera.FieldOfView="Vaateväli" +Filter.Transform.Position="Positsioon" +Filter.Transform.Position.X="X" +Filter.Transform.Position.Y="Y" +Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Skaala" +Filter.Transform.Scale.X="X" +Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Shear" +Filter.Transform.Shear.X="X" +Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Rotatsioon" +Filter.Transform.Rotation.X="Pitch (X)" +Filter.Transform.Rotation.Y="Yaw (Y)" +Filter.Transform.Rotation.Z="Rull (Z)" +Filter.Transform.Rotation.Order="Pöörlemisjärjekord" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Ripp, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Rippumine, pöörlemine, pööre" +Filter.Transform.Rotation.Order.ZXY="Veeretus, pööre, kaldega, õõtsumine" +Filter.Transform.Rotation.Order.ZYX="Veeretamine, õõtsumine, pööre" +Filter.Transform.Corners="Nurgad" +Filter.Transform.Corners.TopLeft="Ülemine vasakpoolne" +Filter.Transform.Corners.TopRight="Top Right" +Filter.Transform.Corners.BottomLeft="Alumine vasakpoolne" +Filter.Transform.Corners.BottomRight="All paremal" +Filter.Transform.Mipmapping="Mipmappingi lubamine" +Filter.Upscaling="Ümberhindamine" +Filter.Upscaling.Provider="Teenusepakkuja" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, mida toetab NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Skaala" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Tugevus" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Nõrgad" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Tugev" +Filter.VirtualGreenscreen="Virtuaalne roheline ekraan" +Filter.VirtualGreenscreen.Provider="Teenusepakkuja" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, mida toetab NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Režiim" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Tulemuslikkus" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kvaliteet" +Source.Mirror="Allikas Peegel" +Source.Mirror.Source="Allikas" +Source.Mirror.Source.Audio="Helisignaali lubamine" +Source.Mirror.Source.Audio.Layout="Audio paigutus" +Source.Mirror.Source.Audio.Layout.Unknown="Teadmata" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Stereo koos LFE-ga" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Kvadrafoniline" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Kvadrafooniline koos LFE-ga" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Täielik surround" +Codec.AV1="AV1" +Codec.AV1.Profile="Profiil" +Codec.AV1.Profile.Main="Main" +Codec.AV1.Profile.High="Kõrge" +Codec.AV1.Profile.Professional="Professionaalne" +Codec.H264="H264" +Codec.H264.Profile="Profiil" +Codec.H264.Profile.baseline="Põhitasemel" +Codec.H264.Profile.main="Main" +Codec.H264.Profile.high="Kõrge" +Codec.H264.Profile.high444p="Kõrge 4:4:4 Predictive" +Codec.H264.Level="Tasand" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Profiil" +Codec.HEVC.Profile.main="Main" +Codec.HEVC.Profile.main10="Peamine 10-bitine" +Codec.HEVC.Profile.rext="Range Laiendatud" +Codec.HEVC.Tier="Tasand" +Codec.HEVC.Tier.main="Main" +Codec.HEVC.Tier.high="Kõrge" +Codec.HEVC.Level="Tasand" +Codec.ProRes.Profile="Profiil" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standard (APCN)" +Codec.ProRes.Profile.APCH="422 Kõrge kvaliteet / HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Kõrge kvaliteet/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.DNxHR.Profile="Profiil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/fi-FI.ini b/data/locale/fi-FI.ini index 555a588917..cb3cd7dbfd 100644 --- a/data/locale/fi-FI.ini +++ b/data/locale/fi-FI.ini @@ -51,9 +51,13 @@ UI.Updater.GitHubPermission.Text="Manuaalisen ja automaattisen päivityksen tark UI.Updater.Menu.CheckForUpdates="Tarkista päivitykset" UI.Updater.Menu.CheckForUpdates.Automatically="Tarkasta päivitykset automaattisesti" UI.Updater.Menu.Channel="Päivityskanava" +UI.Updater.Menu.Channel.Stable="Vakaa" +UI.Updater.Menu.Channel.Candidate="Ehdokas" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Läpinäkyvyys" Encoder.AOM.AV1="AOM AV1 (suora)" +Encoder.AOM.AV1.Deprecated="Tämä kooderi on vanhentunut ja poistetaan pian. Käyttäjiä kehotetaan siirtymään integroituun 'SVT-AV1'- tai 'AOM AV1'-koodaimeen mahdollisimman pian." Encoder.AOM.AV1.Encoder="Enkooderi" Encoder.AOM.AV1.Encoder.Usage="Käyttö" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Hyvä Laatu" @@ -106,20 +110,33 @@ Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="Huippusignaali-kohinasuhde (PSNR (pea Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="Rakenteellinen samankaltaisuusindeksi (SSIM (structural similarity index))" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (esikäsittelyllä)" Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (ilman esikäsittelyä)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Sisältö" Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Näyttö" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Elokuva" +Encoder.FFmpeg="FFmpeg-asetukset" Encoder.FFmpeg.Suffix=" (FFmpegin välityksellä)" +Encoder.FFmpeg.CustomSettings="Mukautetut asetukset" +Encoder.FFmpeg.Threads="Kierteiden määrä" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Avainkehykset" Encoder.FFmpeg.KeyFrames.IntervalType="Aikaväli Tyyppi" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Framet" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunnit" Encoder.FFmpeg.KeyFrames.Interval="Aikaväli" +Encoder.FFmpeg.AMF.Deprecated="Tämä kooderi on vanhentunut ja poistetaan pian. Käyttäjiä kehotetaan siirtymään integroituun 'AMD HW H.264 (AVC)' tai 'AMD HW H.265 (HEVC)' -enkooderiin mahdollisimman pian." Encoder.FFmpeg.AMF.Preset="Esiasetus" Encoder.FFmpeg.AMF.Preset.Speed="Nopeus" Encoder.FFmpeg.AMF.Preset.Balanced="Tasapainotettu" Encoder.FFmpeg.AMF.Preset.Quality="Laatu" Encoder.FFmpeg.AMF.RateControl="Virrannopeuden hallinnan asetukset" Encoder.FFmpeg.AMF.RateControl.Mode="Tila" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Vakio kvantisointiparametri" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Muuttuva bittinopeus (huippuarvot rajoitettu)" Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Vaihteleva bittivirrannopeus (viive rajattu)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Vakaa bittivirrannopeus" Encoder.FFmpeg.AMF.RateControl.LookAhead="Eteenpäin katsova" @@ -170,6 +187,11 @@ Encoder.FFmpeg.NVENC.RateControl.Mode="Tila" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Vakaa kvantitaatioparametri" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Vaihteleva bittivirta" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Vakaa bittivirta" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Kaksi passia" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Yhden kerran läpikäynti" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Two Pass at Quarter Resolution" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Kaksi läpäisyä täydellä resoluutiolla" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Eteenpäin katsova" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Mukautuvat I-kehykset" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Mukautuvat B-kehykset" @@ -187,12 +209,15 @@ Encoder.FFmpeg.NVENC.RateControl.QP.B="B-kehyksen kvantifiointiparametrit" Encoder.FFmpeg.NVENC.AQ="Mukautuva Kvantifiointi" Encoder.FFmpeg.NVENC.AQ.Spatial="Spatiaalinen mukautuva kvantitaatio" Encoder.FFmpeg.NVENC.AQ.Strength="Spatiaalisen mukautuvan kvantitaation voima" +Encoder.FFmpeg.NVENC.AQ.Temporal="Ajallinen mukautuva kvantisointi" Encoder.FFmpeg.NVENC.Other="Muut valinnat" Encoder.FFmpeg.NVENC.Other.BFrames="B-kehysten enimmäismäärä" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-kehyksen viitetila" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Viitteenä ei käytetä B-kehyksiä" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Ainoastaan B-kehykset/2 käytetään viitteenä" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Jokainen B-kehys käytetään viitteenä" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nolla viive" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Painotettu ennuste" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Ei-viitetilan P-kehykset" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Viitetilan kehykset" Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Alhaisen viiveen avainkehyksen mittakaava" @@ -215,6 +240,7 @@ Shader.Shader.Technique="Tekniikka" Shader.Shader.Size="Koko" Shader.Shader.Size.Width="Leveys" Shader.Shader.Size.Height="Korkeus" +Shader.Shader.Seed="Satunnaistaminen Seed" Shader.Parameters="Varjostimen parametrit" Shader.Parameter.Texture.Type="Tyyppi" Shader.Parameter.Texture.Type.File="Tiedosto" @@ -225,19 +251,33 @@ Filter.Shader="Shaderit" Source.Shader="Shaderit" Transition.Shader="Shaderit" +Filter.AutoFraming="Automaattinen kehystäminen" Filter.AutoFraming.Tracking="Seurantavalinnat" Filter.AutoFraming.Tracking.Mode="Tila" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Ryhmä" +Filter.AutoFraming.Tracking.Frequency="Taajuus" Filter.AutoFraming.Motion="Liikevalinnat" +Filter.AutoFraming.Motion.Smoothing="Tasoitus" +Filter.AutoFraming.Motion.Prediction="Ennuste" Filter.AutoFraming.Framing="Ruutuvalinnat" Filter.AutoFraming.Framing.Stability="Vakaus" +Filter.AutoFraming.Framing.Padding="Pehmuste" Filter.AutoFraming.Framing.Offset="Siirtymä" Filter.AutoFraming.Framing.AspectRatio="Kuvasuhde" Filter.AutoFraming.Provider="Tarjoaja" Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection:n kasvontunnistus, NVIDIA® Broadcast:n toimittamana" +Filter.Blur="Sumeus" +Filter.Blur.Type="Tyyppi" Filter.Blur.Subtype="Alityyppi" Filter.Blur.Size="Koko" Filter.Blur.Angle="Kulma (asteet)" +Filter.Blur.Center.X="Keskusta (X) (prosenttia)" +Filter.Blur.Center.Y="Keskusta (Y) (prosenttia)" +Filter.Blur.StepScale="Vaiheiden skaalaus" +Filter.Blur.StepScale.X="Askelasteikko X" +Filter.Blur.StepScale.Y="Askelasteikko Y" Filter.Blur.Mask="Käytä peitettä" Filter.Blur.Mask.Type="Peitteen tyyppi" Filter.Blur.Mask.Type.Region="Alue" @@ -248,6 +288,7 @@ Filter.Blur.Mask.Region.Top="Yläreuna" Filter.Blur.Mask.Region.Right="Oikea reuna" Filter.Blur.Mask.Region.Bottom="Alareuna" Filter.Blur.Mask.Region.Feather="Sulan alue" +Filter.Blur.Mask.Region.Feather.Shift="Sulka Shift" Filter.Blur.Mask.Region.Invert="Käänteinen alue" Filter.Blur.Mask.Image="Kuvan peite" Filter.Blur.Mask.Source="Lähteen Maski" @@ -318,9 +359,18 @@ Filter.Denoising.NVIDIA.Denoising.Strength="Voima" Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Heikko" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Vahva" +Filter.Displacement="Siirtymäkartoitus" +Filter.Displacement.Deprecated="Tämä suodatin on vanhentunut ja poistettu. Käyttäjiä kehotetaan siirtymään välittömästi 'Shader'-suodattimeen esimerkin 'displace.effect' avulla." Filter.Displacement.File="Tiedosto" +Filter.Displacement.Scale="Mittakaava" +Filter.Displacement.Scale.Type="Skaalaustyyppi" +Filter.DynamicMask="Dynaaminen maski" +Filter.DynamicMask.Input="Tulolähde" +Filter.DynamicMask.Channel="%s Kanava" +Filter.DynamicMask.Channel.Value="Perusarvo" Filter.DynamicMask.Channel.Multiplier="Kerroin" +Filter.DynamicMask.Channel.Input="%s Syöttöarvo" Filter.SDFEffects="SDF-tehosteet" Filter.SDFEffects.Shadow.Inner="Sisäinen varjo" @@ -330,6 +380,13 @@ Filter.SDFEffects.Shadow.Inner.Offset.X="Sisäisen varjon siirtymä X" Filter.SDFEffects.Shadow.Inner.Offset.Y="Sisäisen varjon siirtymä Y" Filter.SDFEffects.Shadow.Inner.Color="Sisäisen varjon väri" Filter.SDFEffects.Shadow.Inner.Alpha="Sisäisen varjon Alpha" +Filter.SDFEffects.Shadow.Outer="Outer Shadow" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Ulompi varjo Vähimmäisetäisyys" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Ulompi varjo Suurin etäisyys" +Filter.SDFEffects.Shadow.Outer.Offset.X="Outer Shadow Offset X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Outer Shadow Offset Y" +Filter.SDFEffects.Shadow.Outer.Color="Ulompi varjon väri" +Filter.SDFEffects.Shadow.Outer.Alpha="Outer Shadow Alpha" Filter.SDFEffects.Glow.Outer="Ulkoinen hehku" Filter.SDFEffects.Glow.Outer.Color="Ulomman Hehkun Väri" Filter.SDFEffects.Glow.Outer.Alpha="Ulomman Hehkun Läpinäkyvyys" @@ -352,7 +409,9 @@ Filter.SDFEffects.SDF.Threshold="Sdf Alpha -kynnysarvo" Filter.Transform="3D muunnin" Filter.Transform.Camera="Kamera" Filter.Transform.Camera.Mode="Tila" +Filter.Transform.Camera.Mode.CornerPin="Kulmatappi" Filter.Transform.Camera.Mode.Orthographic="Ortografinen" +Filter.Transform.Camera.Mode.Perspective="Perspektiivi" Filter.Transform.Camera.FieldOfView="Näkökenttä" Filter.Transform.Position="Sijainti" Filter.Transform.Position.X="X" @@ -361,40 +420,70 @@ Filter.Transform.Position.Z="Z" Filter.Transform.Scale="Koko" Filter.Transform.Scale.X="X" Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Leikkaus" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" Filter.Transform.Rotation="Kierto" +Filter.Transform.Rotation.X="Kallistus (X)" +Filter.Transform.Rotation.Y="Yaw (Y)" Filter.Transform.Rotation.Z="Rullaa (Z)" Filter.Transform.Rotation.Order="Kierron järjestys" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" +Filter.Transform.Rotation.Order.ZXY="Roll, Pitch, Yaw" +Filter.Transform.Rotation.Order.ZYX="Roll, Yaw, Pitch" +Filter.Transform.Corners="Kulmat" Filter.Transform.Corners.TopLeft="Ylävasen" Filter.Transform.Corners.TopRight="Yläoikea" Filter.Transform.Corners.BottomLeft="Alavasen" Filter.Transform.Corners.BottomRight="Alaoikea" +Filter.Transform.Mipmapping="Ota Mipmapping käyttöön" +Filter.Upscaling="Upscaling" Filter.Upscaling.Provider="Tarjoaja" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, powered by NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Mittakaava" Filter.Upscaling.NVIDIA.SuperRes.Strength="Voima" Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Heikko" Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Vahva" +Filter.VirtualGreenscreen="Virtuaalinen Greenscreen" Filter.VirtualGreenscreen.Provider="Tarjoaja" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, powered by NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Tila" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Suorituskyky" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Laatu" +Source.Mirror="Lähde Mirror" Source.Mirror.Source="Lähde" Source.Mirror.Source.Audio="Ota ääni käyttöön" Source.Mirror.Source.Audio.Layout="Äänen asettelu" Source.Mirror.Source.Audio.Layout.Unknown="Tuntematon" Source.Mirror.Source.Audio.Layout.Mono="Yksikanavainen (mono)" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Stereo LFE:llä" Source.Mirror.Source.Audio.Layout.Quadraphonic="3D-äänen simulointi neljällä kaiuttimella" Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="3D-äänen simulointi neljällä kaiuttimella LFE:neen" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Täysi surround" +Codec.AV1="AV1" Codec.AV1.Profile="Profiili" Codec.AV1.Profile.Main="Ensisijainen" Codec.AV1.Profile.High="Korkea" +Codec.AV1.Profile.Professional="Ammattilainen" Codec.H264="H264" Codec.H264.Profile="Profiili" +Codec.H264.Profile.baseline="Perustaso" +Codec.H264.Profile.main="Main" +Codec.H264.Profile.high="Korkea" +Codec.H264.Profile.high444p="Korkea 4:4:4 Ennustava" +Codec.H264.Level="Taso" Codec.HEVC="HEVC (High Efficiency Video Coding)" Codec.HEVC.Profile="Profiili" diff --git a/data/locale/fr-FR.ini b/data/locale/fr-FR.ini index 24829bf785..437bb7f27f 100644 --- a/data/locale/fr-FR.ini +++ b/data/locale/fr-FR.ini @@ -53,6 +53,7 @@ UI.Updater.Menu.CheckForUpdates.Automatically="Vérifier automatiquement les Mis UI.Updater.Menu.Channel="Canal de Mise à jour" UI.Updater.Menu.Channel.Stable="Écurie" UI.Updater.Menu.Channel.Candidate="Candidats" +UI.Updater.Menu.Channel.Beta="Bêta" UI.Updater.Menu.Channel.Alpha="Alpha" Encoder.AOM.AV1="AOM AV1 (directe)" @@ -189,6 +190,8 @@ Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Débit constant" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Deux passes" Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Single Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Deux passages à quart de résolution" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Deux passages à pleine résolution" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prédiction (Look-ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames adaptatives" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="B-Frames adaptatives" @@ -210,9 +213,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Quantification adaptative temporelle" Encoder.FFmpeg.NVENC.Other="Autres Options" Encoder.FFmpeg.NVENC.Other.BFrames="B-Frames maximum" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Mode de référence B-Frame" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Aucun cadre B ne sera utilisé comme référence" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Seuls les B-Frames/2 seront utilisés comme Référence" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Chaque cadre B sera utilisé comme référence" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Zéro Latence" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Prédiction pondérée" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Cadres P non référencés" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Cadres de référence" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Échelle de trame clé à faible retard" Blur.Type.Box="Flou par moyenne" Blur.Type.BoxLinear="Flou par moyenne linéaire" @@ -401,6 +409,7 @@ Filter.SDFEffects.SDF.Threshold="Seuil de transparence SDF" Filter.Transform="Transformation 3D" Filter.Transform.Camera="Caméra" Filter.Transform.Camera.Mode="Mode" +Filter.Transform.Camera.Mode.CornerPin="Broche d'angle" Filter.Transform.Camera.Mode.Orthographic="Orthographique" Filter.Transform.Camera.Mode.Perspective="Perspective" Filter.Transform.Camera.FieldOfView="Champ de vision" @@ -495,4 +504,10 @@ Codec.ProRes.Profile.AP4H="4444 Haute Qualité/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Qualité Extrême/XQ (AP4X)" Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/hu-HU.ini b/data/locale/hu-HU.ini index ae88a37f72..2eaa095a69 100644 --- a/data/locale/hu-HU.ini +++ b/data/locale/hu-HU.ini @@ -52,10 +52,12 @@ UI.Updater.Menu.CheckForUpdates="Frissítések ellenőrzése" UI.Updater.Menu.CheckForUpdates.Automatically="Automatikusan ellenőrizze a frissítéseket" UI.Updater.Menu.Channel="Frissítési csatorna" UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Jelölt" UI.Updater.Menu.Channel.Beta="Béta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direkt)" +Encoder.AOM.AV1.Deprecated="Ez a kódoló elavult és hamarosan eltávolításra kerül. A felhasználókat arra kérjük, hogy minél hamarabb térjenek át az integrált 'SVT-AV1' vagy 'AOM AV1' kódolóra." Encoder.AOM.AV1.Encoder="Kódoló" Encoder.AOM.AV1.Encoder.Usage="Használat" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Jó minőség" @@ -95,27 +97,47 @@ Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimum kvantálás" Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maximum kvantálás" Encoder.AOM.AV1.RateControl.Buffer="Puffer" Encoder.AOM.AV1.RateControl.Buffer.Size="Méret" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Kezdeti méret" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimális méret" Encoder.AOM.AV1.Advanced="Haladó" +Encoder.AOM.AV1.Advanced.Threads="Szálak" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Soronkénti többszálú futás" +Encoder.AOM.AV1.Advanced.Tile.Columns="Csempe oszlopok" +Encoder.AOM.AV1.Advanced.Tile.Rows="Csempe sorok" Encoder.AOM.AV1.Advanced.Tune="Hangolás" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metrikus" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (előfeldolgozással)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (előfeldolgozás nélkül)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Tartalom" Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Képernyő" Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" Encoder.FFmpeg="FFmpeg beállítások" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" Encoder.FFmpeg.CustomSettings="Egyéni beállítások" +Encoder.FFmpeg.Threads="Szálak száma" Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Kulcsfontosságú keretek" Encoder.FFmpeg.KeyFrames.IntervalType="Időtartam egysége" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Képkocka" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Másodperc" Encoder.FFmpeg.KeyFrames.Interval="Időköz" +Encoder.FFmpeg.AMF.Deprecated="Ez a kódoló elavult és hamarosan eltávolításra kerül. A felhasználókat arra kérjük, hogy mielőbb térjenek át az integrált \"AMD HW H.264 (AVC)\" vagy \"AMD HW H.265 (HEVC)\" kódolóra." Encoder.FFmpeg.AMF.Preset="Alapbeállítások" Encoder.FFmpeg.AMF.Preset.Speed="Sebesség" Encoder.FFmpeg.AMF.Preset.Balanced="Kiegyensúlyozott" Encoder.FFmpeg.AMF.Preset.Quality="Minőség" Encoder.FFmpeg.AMF.RateControl="Sebesség vezérlés beállítások" Encoder.FFmpeg.AMF.RateControl.Mode="Mód" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Állandó kvantálási paraméter" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Változó bitráta (csúcsérték-korlátozással)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Változó bitráta (késleltetési korlátozásokkal)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Állandó bitsebesség" Encoder.FFmpeg.AMF.RateControl.LookAhead="Előretekintés" Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Képkocka kihagyás" @@ -123,10 +145,17 @@ Encoder.FFmpeg.AMF.RateControl.Limits="Korlátok" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Pufferméret" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Célbitsebesség" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maximális bitsebesség" +Encoder.FFmpeg.AMF.RateControl.QP="Kvantálási paraméterek" Encoder.FFmpeg.AMF.RateControl.QP.I="I-Képkocka QP" Encoder.FFmpeg.AMF.RateControl.QP.P="P-Képkocka QP" Encoder.FFmpeg.AMF.RateControl.QP.B="B-Képkocka QP" +Encoder.FFmpeg.AMF.Other="Egyéb lehetőségek" +Encoder.FFmpeg.AMF.Other.BFrames="Maximális B-keretek" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-keret referenciák" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referenciakeretek" +Encoder.FFmpeg.AMF.Other.EnforceHRD="A humánerőforrás-fejlesztés érvényesítése" Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Hozzáférési egység Határolójel" Encoder.FFmpeg.NVENC.Preset="Alapbeállítások" Encoder.FFmpeg.NVENC.Preset.default="Alapértelmezett" @@ -155,6 +184,7 @@ Encoder.FFmpeg.NVENC.Tune.ull="Nagyon alacsony késleltetés" Encoder.FFmpeg.NVENC.Tune.lossless="Veszteségmentes" Encoder.FFmpeg.NVENC.RateControl="Sebesség vezérlés beállítások" Encoder.FFmpeg.NVENC.RateControl.Mode="Mód" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Állandó kvantálási paraméter" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Változó bitsebesség" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Állandó bitsebesség" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Két fázisú" @@ -164,83 +194,314 @@ Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Két fázisú - negyed felbont Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Két fázisú - teljes felbontáson" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Előretekintés" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptív közteskockák" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptív B-keretek" Encoder.FFmpeg.NVENC.RateControl.Limits="Korlátok" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Pufferméret" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Célminőség" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Célbitsebesség" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximális bitsebesség" +Encoder.FFmpeg.NVENC.RateControl.QP="Kvantálási paraméterek" Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimális QP" Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maximális QP" Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Képkocka QP" Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Képkocka QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Képkocka QP" +Encoder.FFmpeg.NVENC.AQ="Adaptív kvantálás" +Encoder.FFmpeg.NVENC.AQ.Spatial="Térbeli adaptív kvantálás" +Encoder.FFmpeg.NVENC.AQ.Strength="Térbeli adaptív kvantálási erősség" +Encoder.FFmpeg.NVENC.AQ.Temporal="Időbeli adaptív kvantálás" +Encoder.FFmpeg.NVENC.Other="Egyéb lehetőségek" +Encoder.FFmpeg.NVENC.Other.BFrames="Maximális B-keretek" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-keret referencia üzemmód" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Referenciaként nem használnak B-kereteket" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Referenciaként csak a B-keret/2 lesz használva." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Minden egyes B-keret referencia-keretként lesz használva" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nulla késleltetés" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Súlyozott előrejelzés" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Nem referencia P-keretek" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referenciakeretek" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Alacsony késleltetésű kulcs-keret skála" +Blur.Type.Box="Box" +Blur.Type.BoxLinear="Doboz Lineáris" +Blur.Type.Gaussian="Gauss" +Blur.Type.GaussianLinear="Gauss lineáris" +Blur.Type.DualFiltering="Kettős szűrés" +Blur.Subtype.Area="Terület" +Blur.Subtype.Directional="Irányított" +Blur.Subtype.Rotational="Rotációs" +Blur.Subtype.Zoom="Nagyítás" +Shader="Shader" +Shader.Refresh="Frissítési lehetőségek és paraméterek" +Shader.Shader="Shader beállítások" Shader.Shader.File="Fájl" +Shader.Shader.Technique="Technika" Shader.Shader.Size="Méret" Shader.Shader.Size.Width="Szélesség" Shader.Shader.Size.Height="Magasság" +Shader.Shader.Seed="Randomization Seed" +Shader.Parameters="Shader paraméterek" Shader.Parameter.Texture.Type="Típus" Shader.Parameter.Texture.Type.File="Fájl" Shader.Parameter.Texture.Type.Source="Forrás" Shader.Parameter.Texture.File="Fájl" Shader.Parameter.Texture.Source="Forrás" +Filter.Shader="Shader" +Source.Shader="Shader" +Transition.Shader="Shader" +Filter.AutoFraming="Automatikus keretezés" +Filter.AutoFraming.Tracking="Nyomonkövetési lehetőségek" Filter.AutoFraming.Tracking.Mode="Mód" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" Filter.AutoFraming.Tracking.Mode.Group="Csoport" +Filter.AutoFraming.Tracking.Frequency="Frekvencia" +Filter.AutoFraming.Motion="Mozgási lehetőségek" +Filter.AutoFraming.Motion.Smoothing="Simítás" +Filter.AutoFraming.Motion.Prediction="Előrejelzés" +Filter.AutoFraming.Framing="Keretezési lehetőségek" +Filter.AutoFraming.Framing.Stability="Stabilitás" +Filter.AutoFraming.Framing.Padding="Kitömés" +Filter.AutoFraming.Framing.Offset="Offset" +Filter.AutoFraming.Framing.AspectRatio="Tengelyarány" Filter.AutoFraming.Provider="Szolgáltató" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Arcfelismerés, az NVIDIA® Broadcast támogatásával" +Filter.Blur="Elmosódás" Filter.Blur.Type="Típus" +Filter.Blur.Subtype="Alattípus" Filter.Blur.Size="Méret" +Filter.Blur.Angle="Szög (fok)" +Filter.Blur.Center.X="Központ (X) (százalék)" +Filter.Blur.Center.Y="Központ (Y) (százalék)" +Filter.Blur.StepScale="Lépés skálázás" +Filter.Blur.StepScale.X="Lépésskála X" +Filter.Blur.StepScale.Y="Lépés Skála Y" +Filter.Blur.Mask="Alkalmazzon maszkot" +Filter.Blur.Mask.Type="Maszk típusa" +Filter.Blur.Mask.Type.Region="Régió" Filter.Blur.Mask.Type.Image="Kép" Filter.Blur.Mask.Type.Source="Forrás" +Filter.Blur.Mask.Region.Left="Bal szél" +Filter.Blur.Mask.Region.Top="Felső él" +Filter.Blur.Mask.Region.Right="Jobb szél" +Filter.Blur.Mask.Region.Bottom="Alsó él" +Filter.Blur.Mask.Region.Feather="Tollas terület" +Filter.Blur.Mask.Region.Feather.Shift="Toll váltás" +Filter.Blur.Mask.Region.Invert="Invertált régió" +Filter.Blur.Mask.Image="Kép maszk" +Filter.Blur.Mask.Source="Forrás maszk" +Filter.Blur.Mask.Color="Maszk színszűrő" +Filter.Blur.Mask.Alpha="Maszk alfa szűrő" +Filter.Blur.Mask.Multiplier="Maszk szorzó" +Filter.ColorGrade="Színosztályozás" +Filter.ColorGrade.Lift="Lift" +Filter.ColorGrade.Lift.Red="Vörös emelő" +Filter.ColorGrade.Lift.Green="Zöld emelő" +Filter.ColorGrade.Lift.Blue="Blue Lift" +Filter.ColorGrade.Lift.All="Minden felvonó" +Filter.ColorGrade.Gamma="Gamma" +Filter.ColorGrade.Gamma.Red="Vörös Gamma" +Filter.ColorGrade.Gamma.Green="Zöld Gamma" +Filter.ColorGrade.Gamma.Blue="Kék Gamma" +Filter.ColorGrade.Gamma.All="Minden Gamma" +Filter.ColorGrade.Gain="Nyereség" +Filter.ColorGrade.Gain.Red="Vörös nyereség" +Filter.ColorGrade.Gain.Green="Zöld nyereség" +Filter.ColorGrade.Gain.Blue="Kék nyereség" +Filter.ColorGrade.Gain.All="Minden nyereség" +Filter.ColorGrade.Offset="Offset" +Filter.ColorGrade.Offset.Red="Vörös Offset" +Filter.ColorGrade.Offset.Green="Green Offset" +Filter.ColorGrade.Offset.Blue="Kék Offset" +Filter.ColorGrade.Offset.All="Minden Offset" +Filter.ColorGrade.Tint="Tint" +Filter.ColorGrade.Tint.Detection="Tint Luma érzékelési módszer" +Filter.ColorGrade.Tint.Detection.HSV="Színárnyalat telítettség érték" +Filter.ColorGrade.Tint.Detection.HSL="Színárnyalat Telítettség Világosság" Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Tint Luma mód" Filter.ColorGrade.Tint.Mode.Linear="Lineáris" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Napló" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Színárnyalat Luma Exponens" +Filter.ColorGrade.Tint.Shadow.Red="Árnyék vörös árnyalat" +Filter.ColorGrade.Tint.Shadow.Green="Árnyék zöld árnyalat" +Filter.ColorGrade.Tint.Shadow.Blue="Árnyék kék árnyalat" +Filter.ColorGrade.Tint.Midtone.Red="Középárnyalatos vörös árnyalat" +Filter.ColorGrade.Tint.Midtone.Green="Középárnyalatú zöld árnyalat" +Filter.ColorGrade.Tint.Midtone.Blue="Középárnyalatú kék árnyalat" +Filter.ColorGrade.Tint.Highlight.Red="kiemelés Vörös árnyalat" +Filter.ColorGrade.Tint.Highlight.Green="kiemelés Zöld árnyalat" +Filter.ColorGrade.Tint.Highlight.Blue="Kiemelés Kék árnyalat" +Filter.ColorGrade.Correction="Színkorrekció" +Filter.ColorGrade.Correction.Hue="Hue Shift" Filter.ColorGrade.Correction.Saturation="Telítettség" +Filter.ColorGrade.Correction.Lightness="Könnyedség" Filter.ColorGrade.Correction.Contrast="Kontraszt" +Filter.ColorGrade.RenderMode="Renderelési mód" +Filter.ColorGrade.RenderMode.Direct="Közvetlen renderelés" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-bites keresőtábla" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-bites keresőtábla" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-bites keresőtábla" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-bites keresőtábla" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-bites keresőtábla" +Filter.Denoising="Denoising" Filter.Denoising.Provider="Szolgáltató" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, az NVIDIA® Broadcast segítségével" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Erősség" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Gyenge" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Erős" +Filter.Displacement="Elmozdulás feltérképezése" +Filter.Displacement.Deprecated="Ez a szűrő elavult és eltávolításra került. A felhasználókat arra kérjük, hogy azonnal térjenek át a 'Shader' szűrőre a 'displace.effect' példával." Filter.Displacement.File="Fájl" +Filter.Displacement.Scale="Skála" +Filter.Displacement.Scale.Type="Méretezés típusa" +Filter.DynamicMask="Dinamikus maszk" +Filter.DynamicMask.Input="Bemeneti forrás" Filter.DynamicMask.Channel="%s csatorna" +Filter.DynamicMask.Channel.Value="Alapérték" +Filter.DynamicMask.Channel.Multiplier="Multiplikátor" +Filter.DynamicMask.Channel.Input="%s Bemeneti érték" +Filter.SDFEffects="SDF hatások" +Filter.SDFEffects.Shadow.Inner="Belső árnyék" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Belső árnyék Minimális távolság" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Belső árnyék Maximális távolság" +Filter.SDFEffects.Shadow.Inner.Offset.X="Belső árnyék Offset X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Belső árnyék Offset Y" +Filter.SDFEffects.Shadow.Inner.Color="Belső árnyék szín" +Filter.SDFEffects.Shadow.Inner.Alpha="Belső árnyék Alpha" +Filter.SDFEffects.Shadow.Outer="Külső árnyék" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Külső árnyék Minimális távolság" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Külső árnyék Maximális távolság" +Filter.SDFEffects.Shadow.Outer.Offset.X="Külső árnyék Offset X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Külső árnyék Offset Y" +Filter.SDFEffects.Shadow.Outer.Color="Külső árnyék színe" +Filter.SDFEffects.Shadow.Outer.Alpha="Outer Shadow Alpha" +Filter.SDFEffects.Glow.Outer="Külső ragyogás" +Filter.SDFEffects.Glow.Outer.Color="Külső izzó szín" +Filter.SDFEffects.Glow.Outer.Alpha="Külső izzás Alpha" +Filter.SDFEffects.Glow.Outer.Width="Külső izzás szélessége" +Filter.SDFEffects.Glow.Outer.Sharpness="Külső izzás élessége" +Filter.SDFEffects.Glow.Inner="Belső ragyogás" +Filter.SDFEffects.Glow.Inner.Color="Belső ragyogás színe" +Filter.SDFEffects.Glow.Inner.Alpha="Belső ragyogás Alpha" +Filter.SDFEffects.Glow.Inner.Width="Belső izzás szélessége" +Filter.SDFEffects.Glow.Inner.Sharpness="Belső izzás élesség" Filter.SDFEffects.Outline="Körvonal" Filter.SDFEffects.Outline.Color="Körvonal színe" +Filter.SDFEffects.Outline.Alpha="Alpha vázlat" +Filter.SDFEffects.Outline.Width="Körvonal szélessége" +Filter.SDFEffects.Outline.Offset="Outline Offset" +Filter.SDFEffects.Outline.Sharpness="Körvonal élessége" +Filter.SDFEffects.SDF.Scale="SDF textúra skála" +Filter.SDFEffects.SDF.Threshold="SDF Alpha küszöbérték" +Filter.Transform="3D transzformáció" Filter.Transform.Camera="Kamera" Filter.Transform.Camera.Mode="Mód" +Filter.Transform.Camera.Mode.CornerPin="Sarokcsap" +Filter.Transform.Camera.Mode.Orthographic="Ortográfiai" +Filter.Transform.Camera.Mode.Perspective="Perspektíva" +Filter.Transform.Camera.FieldOfView="Látómező" Filter.Transform.Position="Pozíció" Filter.Transform.Position.X="X" Filter.Transform.Position.Y="Y" Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Skála" Filter.Transform.Scale.X="X" Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Nyírás" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Forgatás" +Filter.Transform.Rotation.X="Szélesség (X)" +Filter.Transform.Rotation.Y="Yaw (Y)" +Filter.Transform.Rotation.Z="Gurulás (Z)" +Filter.Transform.Rotation.Order="Forgási sorrend" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" +Filter.Transform.Rotation.Order.ZXY="Gördülés, dőlés, dőlés" +Filter.Transform.Rotation.Order.ZYX="Gördülés, dőlés, dőlésszög" +Filter.Transform.Corners="Sarkok" +Filter.Transform.Corners.TopLeft="Balra fent" +Filter.Transform.Corners.TopRight="Top Right" +Filter.Transform.Corners.BottomLeft="Balra lent" +Filter.Transform.Corners.BottomRight="Jobbra lent" +Filter.Transform.Mipmapping="Mipmapping engedélyezése" +Filter.Upscaling="Upscaling" Filter.Upscaling.Provider="Szolgáltató" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, az NVIDIA® Broadcast támogatásával" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Szuper felbontás" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Skála" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Erősség" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Gyenge" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Erős" +Filter.VirtualGreenscreen="Virtuális Greenscreen" Filter.VirtualGreenscreen.Provider="Szolgáltató" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, powered by NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Mód" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Teljesítmény" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Minőség" +Source.Mirror="Forrás Tükör" Source.Mirror.Source="Forrás" Source.Mirror.Source.Audio="Hang engedélyezése" +Source.Mirror.Source.Audio.Layout="Audio elrendezés" Source.Mirror.Source.Audio.Layout.Unknown="Ismeretlen" Source.Mirror.Source.Audio.Layout.Mono="Monó" Source.Mirror.Source.Audio.Layout.Stereo="Sztereó" +Source.Mirror.Source.Audio.Layout.StereoLFE="Sztereó LFE-vel" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Quadraphonic" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Quadraphonic LFE-vel" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Teljes surround" Codec.AV1="AV1" Codec.AV1.Profile="Profil" +Codec.AV1.Profile.Main="Főoldal" +Codec.AV1.Profile.High="Magas" +Codec.AV1.Profile.Professional="Szakmai" Codec.H264="H264" Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Alapvonal" +Codec.H264.Profile.main="Főoldal" +Codec.H264.Profile.high="Magas" +Codec.H264.Profile.high444p="Magas 4:4:4:4 Előrejelző" +Codec.H264.Level="Szint" Codec.HEVC="HEVC" Codec.HEVC.Profile="Profil" +Codec.HEVC.Profile.main="Főoldal" +Codec.HEVC.Profile.main10="Fő 10-bites" +Codec.HEVC.Profile.rext="Kiterjesztett tartomány" +Codec.HEVC.Tier="Tier" +Codec.HEVC.Tier.main="Főoldal" +Codec.HEVC.Tier.high="Magas" +Codec.HEVC.Level="Szint" Codec.ProRes.Profile="Profil" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Szabvány (APCN)" +Codec.ProRes.Profile.APCH="422 Magas minőség/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Kiváló minőség/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extrém minőség/XQ (AP4X)" Codec.DNxHR.Profile="Profil" Codec.DNxHR.Profile.dnxhd="DNxHD" diff --git a/data/locale/id-ID.ini b/data/locale/id-ID.ini index bb910483f0..2f16f25919 100644 --- a/data/locale/id-ID.ini +++ b/data/locale/id-ID.ini @@ -1,40 +1,513 @@ Advanced="Pilihan Lanjutan" Manual.Open="Buka Panduan" +Channel.Red="Merah" +Channel.Green="Hijau" +Channel.Blue="Biru" +Channel.Alpha="Alpha" +FileType.Image="Gambar" +FileType.Images="Gambar" +FileType.Video="Video" +FileType.Videos="Video" +FileType.Sound="Suara" +FileType.Sounds="Suara" +FileType.Effect="Efek" +FileType.Effects="Efek" +SourceType.Source="Sumber" +SourceType.Scene="Adegan" +State.Disabled="Dinonaktifkan" +State.Enabled="Diaktifkan" +State.Manual="Manual" +State.Automatic="Otomatis" +State.Default="Default" UI.Menu="StreamFX" +UI.Menu.Wiki="Baca Wiki" +UI.Menu.Support="Bantuan & & Dukungan" +UI.Menu.Website="Kunjungi Situs Web StreamFX" +UI.Menu.Discord="Bergabunglah dengan StreamFX Discord" +UI.Menu.Twitter="Ikuti StreamFX di Twitter" +UI.Menu.YouTube="Berlangganan StreamFX di YouTube" +UI.Menu.About="Tentang StreamFX" +UI.About.Title="Tentang StreamFX" +UI.About.Text="

StreamFX dimungkinkan oleh semua pendukung di Patreon, di Sponsor Github, dan siapa pun yang menyumbang melalui PayPal. Terima kasih tambahan untuk semua penerjemah yang membantu pelokalan di Crowdin. Kalian semua luar biasa!

" UI.About.Role.Contributor="Kontributor" UI.About.Role.Translator="Penerjemah" +UI.About.Role.Supporter="Pendukung" UI.About.Version="Versi:" UI.Updater.Dialog.Title="StreamFX versi %s sekarang tersedia!" UI.Updater.Dialog.Text="StreamFX versi baru telah tersedia untuk diunduh." UI.Updater.Dialog.Version.Current="Versi Saat Ini:" UI.Updater.Dialog.Version.Latest="Versi Terkini:" +UI.Updater.Dialog.Button.Ok="Buka Halaman Unduh" +UI.Updater.Dialog.Button.Cancel="Ingatkan saya nanti" +UI.Updater.GitHubPermission.Title="StreamFX memerlukan izin Anda untuk terhubung ke GitHub!" +UI.Updater.GitHubPermission.Text="Untuk menyediakan pemeriksaan pembaruan manual atau otomatis, StreamFX mengandalkan API GitHub untuk mengambil informasi terbaru.
Silakan baca Pernyataan Privasi Github, dan klik 'OK' jika Anda setuju, atau 'Batal' jika Anda tidak setuju." +UI.Updater.Menu.CheckForUpdates="Periksa Pembaruan" +UI.Updater.Menu.CheckForUpdates.Automatically="Secara otomatis memeriksa Pembaruan" +UI.Updater.Menu.Channel="Perbarui Saluran" +UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Kandidat" +UI.Updater.Menu.Channel.Beta="Beta" +UI.Updater.Menu.Channel.Alpha="Alpha" +Encoder.AOM.AV1="AOM AV1 (langsung)" +Encoder.AOM.AV1.Deprecated="Encoder ini sudah tidak digunakan lagi dan akan segera dihapus. Pengguna dihimbau untuk beralih ke encoder 'SVT-AV1' atau 'AOM AV1' yang terintegrasi sesegera mungkin." +Encoder.AOM.AV1.Encoder="Penyandi" +Encoder.AOM.AV1.Encoder.Usage="Penggunaan" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Kualitas Baik" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Waktu Nyata" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Semua Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="Penggunaan CPU" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Plasebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Sangat Lambat" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Lebih lambat" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Lambat" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Sedang" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Cepat" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Lebih cepat" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Sangat Cepat" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super Cepat" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Sangat Cepat" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Sangat Cepat" +Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Bingkai-Kunci" +Encoder.AOM.AV1.KeyFrames.IntervalType="Jenis Interval" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Bingkai" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Detik" +Encoder.AOM.AV1.KeyFrames.Interval="Interval" +Encoder.AOM.AV1.RateControl="Kontrol Tarif" +Encoder.AOM.AV1.RateControl.Mode="Mode" +Encoder.AOM.AV1.RateControl.Mode.CBR="Bitrate Konstan (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Bitrate Variabel (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Kualitas Terkendala (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Kualitas Konstan (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Lihat ke Depan" +Encoder.AOM.AV1.RateControl.Limits="Batasan" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Bitrate Undershoot" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Bitrate Overshoot" +Encoder.AOM.AV1.RateControl.Limits.Quality="Kualitas" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Kuantizer Minimum" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Kuantizer Maksimum" +Encoder.AOM.AV1.RateControl.Buffer="Penyangga" +Encoder.AOM.AV1.RateControl.Buffer.Size="Ukuran" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Ukuran Awal" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Ukuran Optimal" +Encoder.AOM.AV1.Advanced="Lanjutan" +Encoder.AOM.AV1.Advanced.Threads="Benang" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-Threading Per-Baris" +Encoder.AOM.AV1.Advanced.Tile.Columns="Kolom Ubin" +Encoder.AOM.AV1.Advanced.Tile.Rows="Baris Ubin" +Encoder.AOM.AV1.Advanced.Tune="Tune" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metrik" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (dengan pra-pemrosesan)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (tanpa pra-pemrosesan)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Konten" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Layar" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" +Encoder.FFmpeg="Opsi FFmpeg" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Pengaturan Khusus" +Encoder.FFmpeg.Threads="Jumlah Benang" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Bingkai Kunci" +Encoder.FFmpeg.KeyFrames.IntervalType="Jenis Interval" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Bingkai" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Detik" +Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.AMF.Deprecated="Encoder ini sudah tidak digunakan lagi dan akan segera dihapus. Pengguna dihimbau untuk bermigrasi ke encoder 'AMD HW H.264 (AVC)' atau 'AMD HW H.265 (HEVC)' yang terintegrasi sesegera mungkin." +Encoder.FFmpeg.AMF.Preset="Prasetel" +Encoder.FFmpeg.AMF.Preset.Speed="Kecepatan" +Encoder.FFmpeg.AMF.Preset.Balanced="Seimbang" +Encoder.FFmpeg.AMF.Preset.Quality="Kualitas" +Encoder.FFmpeg.AMF.RateControl="Opsi Kontrol Tarif" +Encoder.FFmpeg.AMF.RateControl.Mode="Mode" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Parameter Kuantisasi Konstan" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Bitrate Variabel (Terkendala Puncak)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Bitrate Variabel (Terkendala Latensi)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Bitrate Konstan" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Lihat ke Depan" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Melewati Bingkai" +Encoder.FFmpeg.AMF.RateControl.Limits="Batasan" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Ukuran Penyangga" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Target Bitrate" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Bitrate Maksimum" +Encoder.FFmpeg.AMF.RateControl.QP="Parameter Kuantisasi" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.AMF.Other="Opsi Lainnya" +Encoder.FFmpeg.AMF.Other.BFrames="B-Frame Maksimum" +Encoder.FFmpeg.AMF.Other.BFrameReferences="Referensi B-Frame" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Bingkai Referensi" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Menegakkan HRD" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Pembatas Unit Akses" +Encoder.FFmpeg.NVENC.Preset="Prasetel" +Encoder.FFmpeg.NVENC.Preset.default="Default" +Encoder.FFmpeg.NVENC.Preset.slow="Lambat" +Encoder.FFmpeg.NVENC.Preset.medium="Sedang" +Encoder.FFmpeg.NVENC.Preset.fast="Cepat" +Encoder.FFmpeg.NVENC.Preset.hp="Kinerja Tinggi" +Encoder.FFmpeg.NVENC.Preset.hq="Kualitas Tinggi" +Encoder.FFmpeg.NVENC.Preset.bd="Cakram BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Latensi Rendah" +Encoder.FFmpeg.NVENC.Preset.llhq="Latensi Rendah Kualitas Tinggi" +Encoder.FFmpeg.NVENC.Preset.llhp="Latensi Rendah Kinerja Tinggi" +Encoder.FFmpeg.NVENC.Preset.lossless="Tanpa kerugian" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Kinerja Tinggi Tanpa Kerugian" +Encoder.FFmpeg.NVENC.Preset.p1="Tercepat (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Lebih cepat (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Cepat (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Sedang (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lambat (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Lebih lambat (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Paling lambat (P7)" +Encoder.FFmpeg.NVENC.Tune="Tune" +Encoder.FFmpeg.NVENC.Tune.hq="Kualitas Tinggi" +Encoder.FFmpeg.NVENC.Tune.ll="Latensi Rendah" +Encoder.FFmpeg.NVENC.Tune.ull="Latensi Sangat Rendah" +Encoder.FFmpeg.NVENC.Tune.lossless="Tanpa kerugian" +Encoder.FFmpeg.NVENC.RateControl="Opsi Kontrol Tarif" +Encoder.FFmpeg.NVENC.RateControl.Mode="Mode" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parameter Kuantisasi Konstan" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Bitrate Variabel" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Bitrate Konstan" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dua Lulus" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Single Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Dua Lulus pada Resolusi Seperempat" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Dua Lulus pada Resolusi Penuh" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Lihat ke Depan" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frame Adaptif" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="B-Frame Adaptif" +Encoder.FFmpeg.NVENC.RateControl.Limits="Batasan" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Ukuran Penyangga" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Kualitas Target" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Target Bitrate" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Bitrate Maksimum" +Encoder.FFmpeg.NVENC.RateControl.QP="Parameter Kuantisasi" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="QP minimum" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="QP maksimum" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.NVENC.AQ="Kuantisasi Adaptif" +Encoder.FFmpeg.NVENC.AQ.Spatial="Kuantisasi Adaptif Spasial" +Encoder.FFmpeg.NVENC.AQ.Strength="Kekuatan Kuantisasi Adaptif Spasial" +Encoder.FFmpeg.NVENC.AQ.Temporal="Kuantisasi Adaptif Temporal" +Encoder.FFmpeg.NVENC.Other="Opsi Lainnya" +Encoder.FFmpeg.NVENC.Other.BFrames="B-Frame Maksimum" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Mode Referensi B-Frame" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Tidak ada B-Frame yang akan digunakan sebagai Referensi" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Hanya B-Frame/2 yang akan digunakan sebagai Referensi" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Setiap B-Frame akan digunakan sebagai Referensi" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Tanpa Latensi" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Prediksi Berbobot" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="P-Frame non-referensi" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Bingkai Referensi" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Skala Bingkai-Kunci Keterlambatan Rendah" +Blur.Type.Box="Kotak" +Blur.Type.BoxLinear="Kotak Linear" +Blur.Type.Gaussian="Gaussian" +Blur.Type.GaussianLinear="Linear Gaussian" +Blur.Type.DualFiltering="Penyaringan Ganda" +Blur.Subtype.Area="Area" +Blur.Subtype.Directional="Arah" +Blur.Subtype.Rotational="Rotasi" +Blur.Subtype.Zoom="Zoom" +Shader="Shader" +Shader.Refresh="Opsi dan Parameter Penyegaran" +Shader.Shader="Opsi Shader" +Shader.Shader.File="Berkas" +Shader.Shader.Technique="Teknik" +Shader.Shader.Size="Ukuran" +Shader.Shader.Size.Width="Lebar" +Shader.Shader.Size.Height="Tinggi" +Shader.Shader.Seed="Benih Pengacakan" +Shader.Parameters="Parameter Shader" +Shader.Parameter.Texture.Type="Jenis" +Shader.Parameter.Texture.Type.File="Berkas" +Shader.Parameter.Texture.Type.Source="Sumber" +Shader.Parameter.Texture.File="Berkas" +Shader.Parameter.Texture.Source="Sumber" +Filter.Shader="Shader" +Source.Shader="Shader" +Transition.Shader="Shader" +Filter.AutoFraming="Pembingkaian Otomatis" +Filter.AutoFraming.Tracking="Opsi Pelacakan" +Filter.AutoFraming.Tracking.Mode="Mode" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Kelompok" +Filter.AutoFraming.Tracking.Frequency="Frekuensi" +Filter.AutoFraming.Motion="Opsi Gerakan" +Filter.AutoFraming.Motion.Smoothing="Menghaluskan" +Filter.AutoFraming.Motion.Prediction="Prediksi" +Filter.AutoFraming.Framing="Opsi Pembingkaian" +Filter.AutoFraming.Framing.Stability="Stabilitas" +Filter.AutoFraming.Framing.Padding="Padding" +Filter.AutoFraming.Framing.Offset="Offset" +Filter.AutoFraming.Framing.AspectRatio="Rasio Aspek" +Filter.AutoFraming.Provider="Penyedia" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Deteksi Wajah, didukung oleh NVIDIA® Broadcast" +Filter.Blur="Blur" +Filter.Blur.Type="Jenis" +Filter.Blur.Subtype="Subtipe" +Filter.Blur.Size="Ukuran" +Filter.Blur.Angle="Sudut (Derajat)" +Filter.Blur.Center.X="Pusat (X) (Persen)" +Filter.Blur.Center.Y="Pusat (Y) (Persen)" +Filter.Blur.StepScale="Penskalaan Langkah" +Filter.Blur.StepScale.X="Skala Langkah X" +Filter.Blur.StepScale.Y="Skala Langkah Y" +Filter.Blur.Mask="Menerapkan Masker" +Filter.Blur.Mask.Type="Jenis Topeng" +Filter.Blur.Mask.Type.Region="Wilayah" +Filter.Blur.Mask.Type.Image="Gambar" +Filter.Blur.Mask.Type.Source="Sumber" +Filter.Blur.Mask.Region.Left="Tepi Kiri" +Filter.Blur.Mask.Region.Top="Tepi Atas" +Filter.Blur.Mask.Region.Right="Tepi Kanan" +Filter.Blur.Mask.Region.Bottom="Tepi Bawah" +Filter.Blur.Mask.Region.Feather="Area Bulu" +Filter.Blur.Mask.Region.Feather.Shift="Pergeseran Bulu" +Filter.Blur.Mask.Region.Invert="Membalikkan Wilayah" +Filter.Blur.Mask.Image="Topeng Gambar" +Filter.Blur.Mask.Source="Sumber Masker" +Filter.Blur.Mask.Color="Filter Warna Topeng" +Filter.Blur.Mask.Alpha="Masker Filter Alfa" +Filter.Blur.Mask.Multiplier="Pengganda Topeng" +Filter.ColorGrade="Penilaian Warna" +Filter.ColorGrade.Lift="Angkat" +Filter.ColorGrade.Lift.Red="Angkat Merah" +Filter.ColorGrade.Lift.Green="Angkat Hijau" +Filter.ColorGrade.Lift.Blue="Angkat Biru" +Filter.ColorGrade.Lift.All="Semua Angkat" +Filter.ColorGrade.Gamma="Gamma" +Filter.ColorGrade.Gamma.Red="Gamma Merah" +Filter.ColorGrade.Gamma.Green="Gamma Hijau" +Filter.ColorGrade.Gamma.Blue="Gamma Biru" +Filter.ColorGrade.Gamma.All="Semua Gamma" +Filter.ColorGrade.Gain="Keuntungan" +Filter.ColorGrade.Gain.Red="Keuntungan Merah" +Filter.ColorGrade.Gain.Green="Keuntungan Hijau" +Filter.ColorGrade.Gain.Blue="Keuntungan Biru" +Filter.ColorGrade.Gain.All="Semua Keuntungan" +Filter.ColorGrade.Offset="Offset" +Filter.ColorGrade.Offset.Red="Offset Merah" +Filter.ColorGrade.Offset.Green="Offset Hijau" +Filter.ColorGrade.Offset.Blue="Offset Biru" +Filter.ColorGrade.Offset.All="Semua Offset" +Filter.ColorGrade.Tint="Warna" +Filter.ColorGrade.Tint.Detection="Metode Pendeteksian Warna Luma" +Filter.ColorGrade.Tint.Detection.HSV="Nilai Saturasi Rona Warna" +Filter.ColorGrade.Tint.Detection.HSL="Rona Saturasi Kecerahan" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Mode Warna Luma" +Filter.ColorGrade.Tint.Mode.Linear="Linear" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Log" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Eksponen Warna Luma" +Filter.ColorGrade.Tint.Shadow.Red="Bayangan Warna Merah" +Filter.ColorGrade.Tint.Shadow.Green="Bayangan Warna Hijau" +Filter.ColorGrade.Tint.Shadow.Blue="Warna Biru Bayangan" +Filter.ColorGrade.Tint.Midtone.Red="Warna Merah Midtone" +Filter.ColorGrade.Tint.Midtone.Green="Warna Hijau Midtone" +Filter.ColorGrade.Tint.Midtone.Blue="Warna Biru Midtone" +Filter.ColorGrade.Tint.Highlight.Red="Sorot Warna Merah" +Filter.ColorGrade.Tint.Highlight.Green="Sorot Warna Hijau" +Filter.ColorGrade.Tint.Highlight.Blue="Sorot Warna Biru" +Filter.ColorGrade.Correction="Koreksi Warna" +Filter.ColorGrade.Correction.Hue="Pergeseran Rona" +Filter.ColorGrade.Correction.Saturation="Kejenuhan" +Filter.ColorGrade.Correction.Lightness="Ringan" +Filter.ColorGrade.Correction.Contrast="Kontras" +Filter.ColorGrade.RenderMode="Mode Render" +Filter.ColorGrade.RenderMode.Direct="Rendering Langsung" +Filter.ColorGrade.RenderMode.LUT.2Bit="Tabel Look-Up 2-Bit" +Filter.ColorGrade.RenderMode.LUT.4Bit="Tabel Pencarian 4-Bit" +Filter.ColorGrade.RenderMode.LUT.6Bit="Tabel Look-Up 6-Bit" +Filter.ColorGrade.RenderMode.LUT.8Bit="Tabel Look-Up 8-Bit" +Filter.ColorGrade.RenderMode.LUT.10Bit="Tabel Look-Up 10-Bit" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Penyedia" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, didukung oleh NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Kekuatan" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Lemah" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Kuat" +Filter.Displacement="Pemetaan Perpindahan" +Filter.Displacement.Deprecated="Filter ini sudah tidak digunakan lagi dan telah dihapus. Pengguna dihimbau untuk segera bermigrasi ke filter 'Shader' dengan contoh 'displace.effect'." +Filter.Displacement.File="Berkas" +Filter.Displacement.Scale="Skala" +Filter.Displacement.Scale.Type="Tipe Penskalaan" +Filter.DynamicMask="Topeng Dinamis" +Filter.DynamicMask.Input="Sumber Input" +Filter.DynamicMask.Channel="%s Saluran" +Filter.DynamicMask.Channel.Value="Nilai Dasar" +Filter.DynamicMask.Channel.Multiplier="Pengganda" +Filter.DynamicMask.Channel.Input="%s Nilai Masukan" +Filter.SDFEffects="Efek SDF" +Filter.SDFEffects.Shadow.Inner="Bayangan Batin" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Jarak Minimum Bayangan Dalam" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Jarak Maksimum Bayangan Dalam" +Filter.SDFEffects.Shadow.Inner.Offset.X="Offset Bayangan Dalam X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Offset Bayangan Dalam Y" +Filter.SDFEffects.Shadow.Inner.Color="Warna Bayangan Dalam" +Filter.SDFEffects.Shadow.Inner.Alpha="Bayangan Dalam Alpha" +Filter.SDFEffects.Shadow.Outer="Bayangan Luar" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Jarak Minimum Bayangan Luar" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Jarak Maksimum Bayangan Luar" +Filter.SDFEffects.Shadow.Outer.Offset.X="Offset Bayangan Luar X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Offset Bayangan Luar Y" +Filter.SDFEffects.Shadow.Outer.Color="Warna Bayangan Luar" +Filter.SDFEffects.Shadow.Outer.Alpha="Bayangan Luar Alpha" +Filter.SDFEffects.Glow.Outer="Cahaya Luar" +Filter.SDFEffects.Glow.Outer.Color="Warna Cahaya Luar" +Filter.SDFEffects.Glow.Outer.Alpha="Alpha Cahaya Luar" +Filter.SDFEffects.Glow.Outer.Width="Lebar Cahaya Luar" +Filter.SDFEffects.Glow.Outer.Sharpness="Ketajaman Cahaya Luar" +Filter.SDFEffects.Glow.Inner="Cahaya Batin" +Filter.SDFEffects.Glow.Inner.Color="Warna Cahaya Dalam" +Filter.SDFEffects.Glow.Inner.Alpha="Cahaya Dalam Alpha" +Filter.SDFEffects.Glow.Inner.Width="Lebar Cahaya Bagian Dalam" +Filter.SDFEffects.Glow.Inner.Sharpness="Ketajaman Cahaya Batin" +Filter.SDFEffects.Outline="Garis besar" +Filter.SDFEffects.Outline.Color="Warna Garis Besar" +Filter.SDFEffects.Outline.Alpha="Garis Besar Alpha" +Filter.SDFEffects.Outline.Width="Lebar Garis Besar" +Filter.SDFEffects.Outline.Offset="Garis Besar Offset" +Filter.SDFEffects.Outline.Sharpness="Ketajaman Garis Besar" +Filter.SDFEffects.SDF.Scale="Skala Tekstur SDF" +Filter.SDFEffects.SDF.Threshold="Ambang Batas Alpha SDF" +Filter.Transform="Transformasi 3D" +Filter.Transform.Camera="Kamera" +Filter.Transform.Camera.Mode="Mode" +Filter.Transform.Camera.Mode.CornerPin="Pin Sudut" +Filter.Transform.Camera.Mode.Orthographic="Ortografis" +Filter.Transform.Camera.Mode.Perspective="Perspektif" +Filter.Transform.Camera.FieldOfView="Bidang pandang" +Filter.Transform.Position="Posisi" +Filter.Transform.Position.X="X" +Filter.Transform.Position.Y="Y" +Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Skala" +Filter.Transform.Scale.X="X" +Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Geser" +Filter.Transform.Shear.X="X" +Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Rotasi" +Filter.Transform.Rotation.X="Pitch (X)" +Filter.Transform.Rotation.Y="Yaw (Y)" +Filter.Transform.Rotation.Z="Gulung (Z)" +Filter.Transform.Rotation.Order="Urutan Rotasi" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" +Filter.Transform.Rotation.Order.ZXY="Guling, Pitch, Yaw" +Filter.Transform.Rotation.Order.ZYX="Guling, Yaw, Pitch" +Filter.Transform.Corners="Sudut" +Filter.Transform.Corners.TopLeft="Kiri Atas" +Filter.Transform.Corners.TopRight="Kanan Atas" +Filter.Transform.Corners.BottomLeft="Kiri Bawah" +Filter.Transform.Corners.BottomRight="Kanan Bawah" +Filter.Transform.Mipmapping="Aktifkan Mipmapping" +Filter.Upscaling="Peningkatan skala" +Filter.Upscaling.Provider="Penyedia" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, didukung oleh NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="Resolusi Super NVIDIA®" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Skala" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Kekuatan" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Lemah" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Kuat" +Filter.VirtualGreenscreen="Layar Hijau Virtual" +Filter.VirtualGreenscreen.Provider="Penyedia" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, didukung oleh NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Mode" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Kinerja" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kualitas" +Source.Mirror="Sumber Cermin" +Source.Mirror.Source="Sumber" +Source.Mirror.Source.Audio="Aktifkan Audio" +Source.Mirror.Source.Audio.Layout="Tata Letak Audio" +Source.Mirror.Source.Audio.Layout.Unknown="Tidak diketahui" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Stereo dengan LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Quadraphonic" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Kuadrafonik Dengan LFE" +Source.Mirror.Source.Audio.Layout.Surround="Mengelilingi" +Source.Mirror.Source.Audio.Layout.FullSurround="Surround Penuh" +Codec.AV1="AV1" +Codec.AV1.Profile="Profil" +Codec.AV1.Profile.Main="Utama" +Codec.AV1.Profile.High="Tinggi" +Codec.AV1.Profile.Professional="Profesional" +Codec.H264="H264" +Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Garis Dasar" +Codec.H264.Profile.main="Utama" +Codec.H264.Profile.high="Tinggi" +Codec.H264.Profile.high444p="Tinggi 4:4:4 Prediktif" +Codec.H264.Level="Level" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Profil" +Codec.HEVC.Profile.main="Utama" +Codec.HEVC.Profile.main10="Utama 10-bit" +Codec.HEVC.Profile.rext="Rentang Diperpanjang" +Codec.HEVC.Tier="Tingkat" +Codec.HEVC.Tier.main="Utama" +Codec.HEVC.Tier.high="Tinggi" +Codec.HEVC.Level="Level" +Codec.ProRes.Profile="Profil" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standar (APCN)" +Codec.ProRes.Profile.APCH="422 Kualitas Tinggi/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Kualitas Tinggi/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Kualitas Ekstrim/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index 8793395bc1..e1d0eed53d 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -128,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Fotogrammi" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Secondi" Encoder.FFmpeg.KeyFrames.Interval="Intervallo" +Encoder.FFmpeg.AMF.Deprecated="Questo encoder è obsoleto e presto sarà rimosso. Gli utenti sono invitati a migrare all'encoder integrato 'AMD HW H.264 (AVC)' o 'AMD HW H.265 (HEVC) il prima possibile." Encoder.FFmpeg.AMF.Preset="Preimpostazioni" Encoder.FFmpeg.AMF.Preset.Speed="Velocità" Encoder.FFmpeg.AMF.Preset.Balanced="Bilanciato" diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index 32e742ea0f..7471a663a3 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -51,6 +51,9 @@ UI.Updater.GitHubPermission.Text="手動または自動で最新情報を確認 UI.Updater.Menu.CheckForUpdates="アップデートを確認" UI.Updater.Menu.CheckForUpdates.Automatically="アップデートを自動で確認" UI.Updater.Menu.Channel="アップデートチャンネル" +UI.Updater.Menu.Channel.Stable="安定した" +UI.Updater.Menu.Channel.Candidate="候補者" +UI.Updater.Menu.Channel.Beta="ベータ版" UI.Updater.Menu.Channel.Alpha="アルファ" Encoder.AOM.AV1="AIM AV1 (direct)" @@ -125,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="フレーム" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="秒" Encoder.FFmpeg.KeyFrames.Interval="インターバル" +Encoder.FFmpeg.AMF.Deprecated="このエンコーダーは非推奨で、まもなく削除される予定です。ユーザーは、できるだけ早く統合された 'AMD HW H.264 (AVC)' または 'AMD HW H.265 (HEVC)' エンコーダーに移行することが推奨されます。" Encoder.FFmpeg.AMF.Preset="プリセット" Encoder.FFmpeg.AMF.Preset.Speed="速度" Encoder.FFmpeg.AMF.Preset.Balanced="バランス" @@ -158,12 +162,36 @@ Encoder.FFmpeg.NVENC.Preset.default="デフォルト" Encoder.FFmpeg.NVENC.Preset.slow="Slow" Encoder.FFmpeg.NVENC.Preset.medium="Medium" Encoder.FFmpeg.NVENC.Preset.fast="Fast" +Encoder.FFmpeg.NVENC.Preset.hp="ハイパフォーマンス" +Encoder.FFmpeg.NVENC.Preset.hq="高品質" +Encoder.FFmpeg.NVENC.Preset.bd="ブルーレイディスク" +Encoder.FFmpeg.NVENC.Preset.ll="低レイテンシー" +Encoder.FFmpeg.NVENC.Preset.llhq="低遅延高品質" +Encoder.FFmpeg.NVENC.Preset.llhp="ローレイテンシー ハイパフォーマンス" +Encoder.FFmpeg.NVENC.Preset.lossless="ロスレス" +Encoder.FFmpeg.NVENC.Preset.losslesshp="ロスレス・ハイパフォーマンス" +Encoder.FFmpeg.NVENC.Preset.p1="最速(P1)" +Encoder.FFmpeg.NVENC.Preset.p2="より速く(P2)" +Encoder.FFmpeg.NVENC.Preset.p3="ファスト(P3)" +Encoder.FFmpeg.NVENC.Preset.p4="中型(P4)" +Encoder.FFmpeg.NVENC.Preset.p5="スロー (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="遅くなる(P6)" +Encoder.FFmpeg.NVENC.Preset.p7="最遅(P7)" Encoder.FFmpeg.NVENC.Tune="Tune" +Encoder.FFmpeg.NVENC.Tune.hq="高品質" +Encoder.FFmpeg.NVENC.Tune.ll="低レイテンシー" +Encoder.FFmpeg.NVENC.Tune.ull="超低遅延" +Encoder.FFmpeg.NVENC.Tune.lossless="ロスレス" Encoder.FFmpeg.NVENC.RateControl="レートコントロールオプション" Encoder.FFmpeg.NVENC.RateControl.Mode="モード" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="固定量子化パラメータ" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="バリアブル・ビットレート" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="固定ビットレート" Encoder.FFmpeg.NVENC.RateControl.TwoPass="2パス" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="マルチパス" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="シングルパス" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="クォーターレゾリューションで2パス" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="フル解像度での2パス" Encoder.FFmpeg.NVENC.RateControl.LookAhead="先読み" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="適応I-フレーム" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="適応B-フレーム" @@ -185,10 +213,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="時間適応量子化" Encoder.FFmpeg.NVENC.Other="その他のオプション" Encoder.FFmpeg.NVENC.Other.BFrames="最大B-フレーム" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-フレーム参照モード" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="B-Frameは使用しません。" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="B-Frame/2のみリファレンスとして使用されます。" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="各B-Frameはリファレンスとして使用されます。" Encoder.FFmpeg.NVENC.Other.ZeroLatency="遅延なし" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="加重予測" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="非参照P-フレーム" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="参照フレーム" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="ローディレイ・キーフレーム・スケール" Blur.Type.Box="ボックス" Blur.Type.BoxLinear="ボックスリニア" @@ -472,4 +504,10 @@ Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" Codec.DNxHR.Profile="プロファイル" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/nl-NL.ini b/data/locale/nl-NL.ini index 716a823769..850f3539cc 100644 --- a/data/locale/nl-NL.ini +++ b/data/locale/nl-NL.ini @@ -51,9 +51,13 @@ UI.Updater.GitHubPermission.Text="Om handmatige of geautomatiseerde updatecontro UI.Updater.Menu.CheckForUpdates="Controleer op updates" UI.Updater.Menu.CheckForUpdates.Automatically="Automatisch controleren op updates" UI.Updater.Menu.Channel="Kanaal bijwerken" +UI.Updater.Menu.Channel.Stable="Stabiel" +UI.Updater.Menu.Channel.Candidate="Kandidaat" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direct)" +Encoder.AOM.AV1.Deprecated="Deze encoder is deprecated en zal binnenkort verwijderd worden. Gebruikers wordt dringend verzocht zo snel mogelijk over te schakelen op de geïntegreerde \"SVT-AV1\" of \"AOM AV1\" encoder." Encoder.AOM.AV1.Encoder="Encoder" Encoder.AOM.AV1.Encoder.Usage="Gebruik" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Goede Kwaliteit" @@ -124,6 +128,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Frames" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Seconden" Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.AMF.Deprecated="Deze encoder is deprecated en zal binnenkort verwijderd worden. Gebruikers wordt dringend verzocht zo snel mogelijk te migreren naar de geïntegreerde \"AMD HW H.264 (AVC)\" of \"AMD HW H.265 (HEVC)\" encoder." Encoder.FFmpeg.AMF.Preset="Preset" Encoder.FFmpeg.AMF.Preset.Speed="Snelheid" Encoder.FFmpeg.AMF.Preset.Balanced="Gebalanceerd" @@ -164,15 +169,29 @@ Encoder.FFmpeg.NVENC.Preset.ll="Lage Latentie" Encoder.FFmpeg.NVENC.Preset.llhq="Lage Latentie, Hoge Kwaliteit" Encoder.FFmpeg.NVENC.Preset.llhp="Lage Latency, Hoge Prestaties" Encoder.FFmpeg.NVENC.Preset.lossless="Lossless" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Verliesvrije hoge prestaties" +Encoder.FFmpeg.NVENC.Preset.p1="Snelste (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Sneller (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Snel (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Middelgroot (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Langzaam (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Langzamer (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Traagste (P7)" Encoder.FFmpeg.NVENC.Tune="Afstemmen" Encoder.FFmpeg.NVENC.Tune.hq="Hoge Kwaliteit" Encoder.FFmpeg.NVENC.Tune.ll="Lage Latentie" +Encoder.FFmpeg.NVENC.Tune.ull="Ultra-lage latentie" Encoder.FFmpeg.NVENC.Tune.lossless="Lossless" Encoder.FFmpeg.NVENC.RateControl="Opties voor Snelheidsregeling" Encoder.FFmpeg.NVENC.RateControl.Mode="Modus" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Constante Kwantisatie Parameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variabele bitsnelheid" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Constante Bitrate" Encoder.FFmpeg.NVENC.RateControl.TwoPass="Tweemaal" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Enkele pas" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Twee Pass bij Kwart Resolutie" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Twee Pass bij volledige resolutie" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Vooruitkijk" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Adaptieve I-Frames" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptieve B-Frames" @@ -194,10 +213,14 @@ Encoder.FFmpeg.NVENC.AQ.Temporal="Tijdelijke Adaptieve Kwantificering" Encoder.FFmpeg.NVENC.Other="Andere opties" Encoder.FFmpeg.NVENC.Other.BFrames="Maximale B-Frames" Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B-Frame Referentie Modus" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Er zullen geen B-Frames als referentie worden gebruikt" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Alleen B-Frames/2 zullen als Referentie worden gebruikt" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Elk B-Frame zal gebruikt worden als Referentie" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Nul Latentie" Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Gewogen Voorspelling" Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Niet-Referentie Frames" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referentie Frames" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Lage vertraging toets-frameschaal" Blur.Type.Box="Vierkant" Blur.Type.BoxLinear="Lineair vierkant" @@ -337,6 +360,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Zwak" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Sterk" Filter.Displacement="Verplaatsing Mapping" +Filter.Displacement.Deprecated="Dit filter is afgeschreven en is verwijderd. Gebruikers wordt dringend verzocht onmiddellijk over te stappen op het \"Shader\" filter met het \"displace.effect\" voorbeeld." Filter.Displacement.File="Bestand" Filter.Displacement.Scale="Grootte" Filter.Displacement.Scale.Type="Schalings type" @@ -480,4 +504,10 @@ Codec.ProRes.Profile.AP4H="4444 Hoge Kwaliteit/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Extreme Kwaliteit/XQ (AP4X)" Codec.DNxHR.Profile="Profiel" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index 2b2b226940..ab7a1a4dbf 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -360,6 +360,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Słabe" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Silne" Filter.Displacement="Mapowanie przemieszczenia" +Filter.Displacement.Deprecated="Ten filtr jest przestarzały i został usunięty. Użytkownicy są proszeni o natychmiastowe przejście na filtr \"Shader\" z przykładem \"displace.effect\"." Filter.Displacement.File="Plik" Filter.Displacement.Scale="Skala" Filter.Displacement.Scale.Type="Typ skalowania" diff --git a/data/locale/pt-BR.ini b/data/locale/pt-BR.ini index fa060aecc2..6385db899b 100644 --- a/data/locale/pt-BR.ini +++ b/data/locale/pt-BR.ini @@ -57,6 +57,7 @@ UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direto)" +Encoder.AOM.AV1.Deprecated="Este codificador é depreciado e será removido em breve. Os utilizadores são instados a mudar para o codificador integrado 'SVT-AV1' ou 'AOM AV1' o mais rapidamente possível." Encoder.AOM.AV1.Encoder="Codificador" Encoder.AOM.AV1.Encoder.Usage="Utilização" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Qualidade: Boa" @@ -84,20 +85,50 @@ Encoder.AOM.AV1.RateControl="Controle da taxa de bits" Encoder.AOM.AV1.RateControl.Mode="Modo" Encoder.AOM.AV1.RateControl.Mode.CBR="Taxa de Bits Constante (CBR)" Encoder.AOM.AV1.RateControl.Mode.VBR="Taxa de Bits Variável (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Qualidade Restrita (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Qualidade Constante (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Look-Ahead" Encoder.AOM.AV1.RateControl.Limits="Limites" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Taxa de bits" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Sub-inserção da taxa de bits" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Ultrapassagem da taxa de bits" Encoder.AOM.AV1.RateControl.Limits.Quality="Qualidade" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Quantificador mínimo" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Quantificador máximo" +Encoder.AOM.AV1.RateControl.Buffer="Buffer" Encoder.AOM.AV1.RateControl.Buffer.Size="Tamanho" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Tamanho inicial" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Tamanho óptimo" Encoder.AOM.AV1.Advanced="Avançado" +Encoder.AOM.AV1.Advanced.Threads="Tópicos" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-fios por fila" +Encoder.AOM.AV1.Advanced.Tile.Columns="Colunas de Ladrilho" +Encoder.AOM.AV1.Advanced.Tile.Rows="Fileiras de Azulejos" +Encoder.AOM.AV1.Advanced.Tune="Melodia" +Encoder.AOM.AV1.Advanced.Tune.Metric="Métrica" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (com pré-processamento)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (sem pré-processamento)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" Encoder.AOM.AV1.Advanced.Tune.Content="Conteúdo" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ecrã" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Filme" +Encoder.FFmpeg="FFmpeg Opções" Encoder.FFmpeg.Suffix=" (via FFmpeg)" Encoder.FFmpeg.CustomSettings="Configurações Personalizadas" +Encoder.FFmpeg.Threads="Número de roscas" Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Quadros-chave" Encoder.FFmpeg.KeyFrames.IntervalType="Tipo de Intervalo" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Quadros" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Segundos" Encoder.FFmpeg.KeyFrames.Interval="Intervalo" +Encoder.FFmpeg.AMF.Deprecated="Este codificador é depreciado e será removido em breve. Os utilizadores são instados a migrar para o codificador integrado 'AMD HW H.264 (AVC)' ou 'AMD HW H.265 (HEVC)' o mais cedo possível." Encoder.FFmpeg.AMF.Preset="Modelo" Encoder.FFmpeg.AMF.Preset.Speed="Velocidade" Encoder.FFmpeg.AMF.Preset.Balanced="Balanceado" @@ -109,6 +140,7 @@ Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Taxa de Bits Variável (Pico Restr Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Taxa de Bits Variável (Latência Restringida)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Taxa de Bits Constante" Encoder.FFmpeg.AMF.RateControl.LookAhead="Olhar a Frente" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Salto de Moldura" Encoder.FFmpeg.AMF.RateControl.Limits="Limites" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Tamanho do Buffer" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Taxa de Bits Alvo" @@ -119,30 +151,76 @@ Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.AMF.RateControl.QP.B="B-Frame QP" Encoder.FFmpeg.AMF.Other="Outras Opções" Encoder.FFmpeg.AMF.Other.BFrames="Máximo de B-Frames" +Encoder.FFmpeg.AMF.Other.BFrameReferences="Referências da Frame B" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Quadros de Referência" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Aplicar o DRH" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Unidade de Acesso Delimitador" Encoder.FFmpeg.NVENC.Preset="Modelo" Encoder.FFmpeg.NVENC.Preset.default="Padrão" Encoder.FFmpeg.NVENC.Preset.slow="Lento" Encoder.FFmpeg.NVENC.Preset.medium="Médio" Encoder.FFmpeg.NVENC.Preset.fast="Rápido" +Encoder.FFmpeg.NVENC.Preset.hp="Alto desempenho" +Encoder.FFmpeg.NVENC.Preset.hq="Alta Qualidade" +Encoder.FFmpeg.NVENC.Preset.bd="Disco BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Baixa latência" +Encoder.FFmpeg.NVENC.Preset.llhq="Baixa Latência Alta Qualidade" +Encoder.FFmpeg.NVENC.Preset.llhp="Baixa Latência Alta Performance" +Encoder.FFmpeg.NVENC.Preset.lossless="Sem perdas" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Alta performance sem perdas" +Encoder.FFmpeg.NVENC.Preset.p1="Mais rápido (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Mais rápido (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Rápido (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Médio (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lento (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Mais lento (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Mais lento (P7)" +Encoder.FFmpeg.NVENC.Tune="Melodia" +Encoder.FFmpeg.NVENC.Tune.hq="Alta Qualidade" +Encoder.FFmpeg.NVENC.Tune.ll="Baixa latência" +Encoder.FFmpeg.NVENC.Tune.ull="Latência Ultra Baixa" +Encoder.FFmpeg.NVENC.Tune.lossless="Sem perdas" Encoder.FFmpeg.NVENC.RateControl="Opções do Controle de Taxa" Encoder.FFmpeg.NVENC.RateControl.Mode="Modo" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parâmetro de Quantização Constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Taxa de bits variável" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Taxa de Bits Constante" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dois Passes" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Passe Único" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Dois passes na resolução trimestral" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Dois Passes em Resolução Total" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Olhar a Frente" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames Adaptativos" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Quadros B Adaptativos" Encoder.FFmpeg.NVENC.RateControl.Limits="Limites" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Tamanho do Buffer" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Qualidade Alvo" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Taxa de Bits Alvo" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Taxa de Bits Máxima" Encoder.FFmpeg.NVENC.RateControl.QP="Parâmetros de Quantização" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="QP mínimo" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Máximo QP" Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.NVENC.AQ="Quantização adaptativa" +Encoder.FFmpeg.NVENC.AQ.Spatial="Quantização Adaptativa Espacial" +Encoder.FFmpeg.NVENC.AQ.Strength="Força Quantitativa Adaptativa Espacial" +Encoder.FFmpeg.NVENC.AQ.Temporal="Quantização Adaptativa Temporal" Encoder.FFmpeg.NVENC.Other="Outras Opções" Encoder.FFmpeg.NVENC.Other.BFrames="Máximo de B-Frames" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Modo de Referência da Frame B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Não serão utilizados como Referência os Quadros B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Apenas B-Frames/2 serão utilizados como Referência" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Cada Quadro B será utilizado como Referência" Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latência zero" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predição ponderada" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Quadros P sem referência" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Quadros de Referência" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Escala de chave de baixo atraso" Blur.Type.Box="Caixa" Blur.Type.BoxLinear="Caixa Linear" @@ -173,9 +251,22 @@ Filter.Shader="Shader" Source.Shader="Shader" Transition.Shader="Shader" +Filter.AutoFraming="Auto-Framing" +Filter.AutoFraming.Tracking="Opções de rastreio" Filter.AutoFraming.Tracking.Mode="Modo" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Grupo" +Filter.AutoFraming.Tracking.Frequency="Frequência" +Filter.AutoFraming.Motion="Opções de movimento" +Filter.AutoFraming.Motion.Smoothing="Alisamento" +Filter.AutoFraming.Motion.Prediction="Predição" +Filter.AutoFraming.Framing="Opções de Enquadramento" +Filter.AutoFraming.Framing.Stability="Estabilidade" +Filter.AutoFraming.Framing.Padding="Acolchoamento" Filter.AutoFraming.Framing.Offset="Deslocamento" Filter.AutoFraming.Framing.AspectRatio="Proporção de tela" +Filter.AutoFraming.Provider="Fornecedor" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, powered by NVIDIA® Broadcast" Filter.Blur="Desfoque" Filter.Blur.Type="Tipo" @@ -260,8 +351,16 @@ Filter.ColorGrade.RenderMode.LUT.6Bit="Mesa de Pesquisa de 6-Bit" Filter.ColorGrade.RenderMode.LUT.8Bit="Mesa de Pesquisa de 8-Bit" Filter.ColorGrade.RenderMode.LUT.10Bit="Mesa de Pesquisa de 10-Bit" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Fornecedor" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, alimentado por NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Força" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Fraco" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Forte" Filter.Displacement="Mapeamento de Deslocamento" +Filter.Displacement.Deprecated="Este filtro está obsoleto e foi removido. Os utilizadores são instados a migrar para o filtro 'Shader' com o exemplo 'displace.effect' imediatamente." Filter.Displacement.File="Arquivo" Filter.Displacement.Scale="Escala" Filter.Displacement.Scale.Type="Tipo de Escala" @@ -310,6 +409,9 @@ Filter.SDFEffects.SDF.Threshold="Limite de Opacidade SDF" Filter.Transform="Transformação 3D" Filter.Transform.Camera="Câmera" Filter.Transform.Camera.Mode="Modo" +Filter.Transform.Camera.Mode.CornerPin="Alfinete de canto" +Filter.Transform.Camera.Mode.Orthographic="Ortográfico" +Filter.Transform.Camera.Mode.Perspective="Perspectiva" Filter.Transform.Camera.FieldOfView="Campo de Visão" Filter.Transform.Position="Posição" Filter.Transform.Position.X="X" @@ -332,14 +434,26 @@ Filter.Transform.Rotation.Order.YXZ="Largura, Altura, Profundidade" Filter.Transform.Rotation.Order.YZX="Largura, Profundidade, Altura" Filter.Transform.Rotation.Order.ZXY="Profundidade, Altura, Largura" Filter.Transform.Rotation.Order.ZYX="Profundidade, Largura, Altura" +Filter.Transform.Corners="Cantos" Filter.Transform.Corners.TopLeft="Superior Esquerdo" Filter.Transform.Corners.TopRight="Superior Direito" Filter.Transform.Corners.BottomLeft="Inferior Esquerdo" Filter.Transform.Corners.BottomRight="Inferior Direito" Filter.Transform.Mipmapping="Habilitar Mip-Maps" +Filter.Upscaling="Ampliação" +Filter.Upscaling.Provider="Fornecedor" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, alimentado por NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolução" Filter.Upscaling.NVIDIA.SuperRes.Scale="Escala" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Força" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Fraco" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Forte" +Filter.VirtualGreenscreen="Ecrã verde virtual" +Filter.VirtualGreenscreen.Provider="Fornecedor" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="Ecrã Verde NVIDIA®, alimentado por NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Ecrã Verde" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Modo" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Performance" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Qualidade" @@ -390,4 +504,10 @@ Codec.ProRes.Profile.AP4H="4444 Alta Qualidade/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Qualidade Extrema/XQ (AP4X)" Codec.DNxHR.Profile="Perfil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/pt-PT.ini b/data/locale/pt-PT.ini index 0236eba2c0..8c4d19b5b5 100644 --- a/data/locale/pt-PT.ini +++ b/data/locale/pt-PT.ini @@ -1,4 +1,5 @@ Advanced="Opções Avançadas" +Manual.Open="Abrir manual" Channel.Red="Vermelho" Channel.Green="Verde" @@ -24,61 +25,248 @@ State.Automatic="Automático" State.Default="Padrão" UI.Menu="StreamFX" +UI.Menu.Wiki="Lê a Wiki" +UI.Menu.Support="Ajuda e Suporte" +UI.Menu.Website="Visita o site do StreamFX" +UI.Menu.Discord="Entra no Discord do StreamFX" +UI.Menu.Twitter="Segue o StreamFX no Twitter" +UI.Menu.YouTube="Subscreve ao canal do StreamFX no YouTube" UI.Menu.About="Sobre StreamFX" UI.About.Title="Sobre StreamFX" UI.About.Text="

StreamFX tornou-se possível por todos os apoiadores em Patreon, em Patrocinadores Github, e qualquer um doando através de PayPal. Agradecimentos adicionais vão para todos os tradutores que nos ajudaram Crowdin. Todos vocês são incríveis!

" UI.About.Role.Contributor="Colaborador" UI.About.Role.Translator="Tradutor(a)" +UI.About.Role.Supporter="Apoiante" +UI.About.Version="Versão:" +UI.Updater.Dialog.Title="Versão %s do StreamFX está disponível!" +UI.Updater.Dialog.Text="Uma nova versão do StreamFX está disponível para download." +UI.Updater.Dialog.Version.Current="Versão atual:" +UI.Updater.Dialog.Version.Latest="Versão mais recente:" +UI.Updater.Dialog.Button.Ok="Abrir página de download" +UI.Updater.Dialog.Button.Cancel="Lembrar mais tarde" +UI.Updater.GitHubPermission.Title="O StreamFX requer a tua permissão para se conectar ao GitHub!" +UI.Updater.GitHubPermission.Text="Para fornecer a verificação manual ou automatizada de atualizações, o StreamFX depende da API do GitHub para obter as informações mais recentes.
Por favor, lê a Declaração de Privacidade do Github, e clica em 'OK' se concordares, ou 'Cancelar' se discordares." +UI.Updater.Menu.CheckForUpdates="Verificar por atualizações" +UI.Updater.Menu.CheckForUpdates.Automatically="Verificação automática de actualizações" +UI.Updater.Menu.Channel="Canal de Actualização" +UI.Updater.Menu.Channel.Stable="Estável" +UI.Updater.Menu.Channel.Candidate="Candidato" +UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Transparência" +Encoder.AOM.AV1="AOM AV1 (directo)" +Encoder.AOM.AV1.Deprecated="Este codificador é depreciado e será removido em breve. Os utilizadores são instados a mudar para o codificador integrado 'SVT-AV1' ou 'AOM AV1' o mais rapidamente possível." +Encoder.AOM.AV1.Encoder="Codificador" +Encoder.AOM.AV1.Encoder.Usage="Utilização" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Boa qualidade" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Tempo Real" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Todos Intra-Frame" +Encoder.AOM.AV1.Encoder.CPUUsage="Utilização de CPU" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Muito lento" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Mais devagar" Encoder.AOM.AV1.Encoder.CPUUsage.3="Lento" Encoder.AOM.AV1.Encoder.CPUUsage.4="Médio" Encoder.AOM.AV1.Encoder.CPUUsage.5="Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Mais rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Muito rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Super Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra Rápido" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Insanely Fast" +Encoder.AOM.AV1.Encoder.Profile="Perfil" +Encoder.AOM.AV1.KeyFrames="Quadro-Chave" Encoder.AOM.AV1.KeyFrames.IntervalType="Tipo de Intervalo" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Molduras" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Segundos" Encoder.AOM.AV1.KeyFrames.Interval="Intervalo" +Encoder.AOM.AV1.RateControl="Controlo da taxa" Encoder.AOM.AV1.RateControl.Mode="Modo" +Encoder.AOM.AV1.RateControl.Mode.CBR="Taxa de bits constante (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Taxa de bits variável (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Qualidade Restrita (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Qualidade Constante (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Look-Ahead" +Encoder.AOM.AV1.RateControl.Limits="Limites" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Taxa de bits" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Sub-inserção da taxa de bits" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Ultrapassagem da taxa de bits" +Encoder.AOM.AV1.RateControl.Limits.Quality="Qualidade" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Quantificador mínimo" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Quantificador máximo" +Encoder.AOM.AV1.RateControl.Buffer="Buffer" Encoder.AOM.AV1.RateControl.Buffer.Size="Tamanho" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Tamanho inicial" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Tamanho óptimo" +Encoder.AOM.AV1.Advanced="Avançado" +Encoder.AOM.AV1.Advanced.Threads="Tópicos" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-fios por fila" +Encoder.AOM.AV1.Advanced.Tile.Columns="Colunas de Ladrilho" +Encoder.AOM.AV1.Advanced.Tile.Rows="Fileiras de Azulejos" +Encoder.AOM.AV1.Advanced.Tune="Melodia" +Encoder.AOM.AV1.Advanced.Tune.Metric="Métrica" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (com pré-processamento)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (sem pré-processamento)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Conteúdo" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ecrã" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Filme" +Encoder.FFmpeg="FFmpeg Opções" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Configurações personalizadas" +Encoder.FFmpeg.Threads="Número de roscas" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Quadros-chave" Encoder.FFmpeg.KeyFrames.IntervalType="Tipo de Intervalo" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Molduras" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Segundos" Encoder.FFmpeg.KeyFrames.Interval="Intervalo" +Encoder.FFmpeg.AMF.Deprecated="Este codificador é depreciado e será removido em breve. Os utilizadores são instados a migrar para o codificador integrado 'AMD HW H.264 (AVC)' ou 'AMD HW H.265 (HEVC)' o mais cedo possível." +Encoder.FFmpeg.AMF.Preset="Predefinição" +Encoder.FFmpeg.AMF.Preset.Speed="Velocidade" +Encoder.FFmpeg.AMF.Preset.Balanced="Equilibrado" +Encoder.FFmpeg.AMF.Preset.Quality="Qualidade" +Encoder.FFmpeg.AMF.RateControl="Opções de Controlo da Taxa" Encoder.FFmpeg.AMF.RateControl.Mode="Modo" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Parâmetro de Quantização Constante" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Bitrate Variável (Pico Restringido)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Taxa de bits variável (Latência restringida)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Bitrate constante" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Olhe em frente" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Salto de Moldura" +Encoder.FFmpeg.AMF.RateControl.Limits="Limites" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Tamanho do tampão" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Taxa de bits alvo" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Taxa máxima de bits" +Encoder.FFmpeg.AMF.RateControl.QP="Parâmetros de Quantização" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="Quadro B QP" +Encoder.FFmpeg.AMF.Other="Outras opções" +Encoder.FFmpeg.AMF.Other.BFrames="Máximo de Quadros-B" +Encoder.FFmpeg.AMF.Other.BFrameReferences="Referências da Frame B" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Quadros de referência" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Aplicar o DRH" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Unidade de Acesso Delimitador" +Encoder.FFmpeg.NVENC.Preset="Predefinição" Encoder.FFmpeg.NVENC.Preset.default="Padrão" Encoder.FFmpeg.NVENC.Preset.slow="Lento" Encoder.FFmpeg.NVENC.Preset.medium="Médio" Encoder.FFmpeg.NVENC.Preset.fast="Rápido" +Encoder.FFmpeg.NVENC.Preset.hp="Alto desempenho" +Encoder.FFmpeg.NVENC.Preset.hq="Alta Qualidade" +Encoder.FFmpeg.NVENC.Preset.bd="Disco BluRay" +Encoder.FFmpeg.NVENC.Preset.ll="Baixa latência" +Encoder.FFmpeg.NVENC.Preset.llhq="Baixa Latência Alta Qualidade" +Encoder.FFmpeg.NVENC.Preset.llhp="Baixa Latência Alta Performance" +Encoder.FFmpeg.NVENC.Preset.lossless="Sem perdas" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Alta performance sem perdas" +Encoder.FFmpeg.NVENC.Preset.p1="Mais rápido (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Mais rápido (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Rápido (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Médio (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Lento (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Mais lento (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Mais lento (P7)" +Encoder.FFmpeg.NVENC.Tune="Melodia" +Encoder.FFmpeg.NVENC.Tune.hq="Alta Qualidade" +Encoder.FFmpeg.NVENC.Tune.ll="Baixa latência" +Encoder.FFmpeg.NVENC.Tune.ull="Latência Ultra Baixa" +Encoder.FFmpeg.NVENC.Tune.lossless="Sem perdas" +Encoder.FFmpeg.NVENC.RateControl="Opções de Controlo da Taxa" Encoder.FFmpeg.NVENC.RateControl.Mode="Modo" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parâmetro de Quantização Constante" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Taxa de bits variável" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Bitrate constante" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Dois Passes" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Passe Único" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Dois passes na resolução trimestral" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Dois Passes em Resolução Total" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Olhe em frente" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="I-Frames Adaptativos" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Quadros B Adaptativos" +Encoder.FFmpeg.NVENC.RateControl.Limits="Limites" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Tamanho do tampão" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Qualidade Alvo" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Taxa de bits alvo" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Taxa máxima de bits" +Encoder.FFmpeg.NVENC.RateControl.QP="Parâmetros de Quantização" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="QP mínimo" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Máximo QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="Quadro B QP" +Encoder.FFmpeg.NVENC.AQ="Quantização adaptativa" +Encoder.FFmpeg.NVENC.AQ.Spatial="Quantização Adaptativa Espacial" +Encoder.FFmpeg.NVENC.AQ.Strength="Força Quantitativa Adaptativa Espacial" +Encoder.FFmpeg.NVENC.AQ.Temporal="Quantização Adaptativa Temporal" +Encoder.FFmpeg.NVENC.Other="Outras opções" +Encoder.FFmpeg.NVENC.Other.BFrames="Máximo de Quadros-B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Modo de Referência da Frame B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Não serão utilizados como Referência os Quadros B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Apenas B-Frames/2 serão utilizados como Referência" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Cada Quadro B será utilizado como Referência" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latência Zero" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predição ponderada" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Quadros P sem referência" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Quadros de referência" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Escala de chave de baixo atraso" Blur.Type.Box="Região" Blur.Type.BoxLinear="Caixa Linear" Blur.Type.Gaussian="Gaussiano" +Blur.Type.GaussianLinear="Linear Gaussiano" +Blur.Type.DualFiltering="Filtragem dupla" Blur.Subtype.Area="Área" Blur.Subtype.Directional="Direção" Blur.Subtype.Rotational="Rotação" Blur.Subtype.Zoom="Zoom" Shader="Sombreamento" +Shader.Refresh="Opções e Parâmetros de Actualização" Shader.Shader="Opções de sombreamento" Shader.Shader.File="Arquivo" Shader.Shader.Technique="Técnica" Shader.Shader.Size="Tamanho" Shader.Shader.Size.Width="Largura" Shader.Shader.Size.Height="Altura" +Shader.Shader.Seed="Semente de Randomização" Shader.Parameters="Parâmetros de sombreamento" Shader.Parameter.Texture.Type="Tipo" +Shader.Parameter.Texture.Type.File="Ficheiro" Shader.Parameter.Texture.Type.Source="Fonte" +Shader.Parameter.Texture.File="Ficheiro" Shader.Parameter.Texture.Source="Fonte" Filter.Shader="Sombreamento" Source.Shader="Sombreamento" Transition.Shader="Sombreamento" +Filter.AutoFraming="Auto-Framing" +Filter.AutoFraming.Tracking="Opções de rastreio" Filter.AutoFraming.Tracking.Mode="Modo" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Grupo" +Filter.AutoFraming.Tracking.Frequency="Frequência" +Filter.AutoFraming.Motion="Opções de movimento" +Filter.AutoFraming.Motion.Smoothing="Alisamento" +Filter.AutoFraming.Motion.Prediction="Predição" +Filter.AutoFraming.Framing="Opções de Enquadramento" +Filter.AutoFraming.Framing.Stability="Estabilidade" +Filter.AutoFraming.Framing.Padding="Acolchoamento" Filter.AutoFraming.Framing.Offset="Desvio" +Filter.AutoFraming.Framing.AspectRatio="Rácio de Aspecto" +Filter.AutoFraming.Provider="Fornecedor" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, powered by NVIDIA® Broadcast" Filter.Blur="Desfocar" Filter.Blur.Type="Tipo" @@ -87,6 +275,9 @@ Filter.Blur.Size="Tamanho" Filter.Blur.Angle="Ângulo (graus)" Filter.Blur.Center.X="Centro (X) (Porcentagem)" Filter.Blur.Center.Y="Centro (Y) (porcentagem)" +Filter.Blur.StepScale="Escala de passos" +Filter.Blur.StepScale.X="Escala de degrau X" +Filter.Blur.StepScale.Y="Escala de escalas Y" Filter.Blur.Mask="Aplicar uma Máscara" Filter.Blur.Mask.Type="Tipo de Máscara" Filter.Blur.Mask.Type.Region="Região" @@ -94,6 +285,15 @@ Filter.Blur.Mask.Type.Image="Imagem" Filter.Blur.Mask.Type.Source="Fonte" Filter.Blur.Mask.Region.Left="Borda Esquerda" Filter.Blur.Mask.Region.Top="Borda Superior" +Filter.Blur.Mask.Region.Right="Margem direita" +Filter.Blur.Mask.Region.Bottom="Borda Inferior" +Filter.Blur.Mask.Region.Feather="Área das penas" +Filter.Blur.Mask.Region.Feather.Shift="Turno de Pena" +Filter.Blur.Mask.Region.Invert="Região Inverter" +Filter.Blur.Mask.Image="Máscara de Imagem" +Filter.Blur.Mask.Source="Máscara de origem" +Filter.Blur.Mask.Color="Filtro de cor da máscara" +Filter.Blur.Mask.Alpha="Máscara Alfa Filtro" Filter.Blur.Mask.Multiplier="Multiplicador de máscara" Filter.ColorGrade="Graduação de cor" @@ -102,6 +302,12 @@ Filter.ColorGrade.Lift.Red="Elevar vermelho" Filter.ColorGrade.Lift.Green="Elevar verde" Filter.ColorGrade.Lift.Blue="Elevar azul" Filter.ColorGrade.Lift.All="Elevar todos" +Filter.ColorGrade.Gamma="Gama" +Filter.ColorGrade.Gamma.Red="Gama Vermelha" +Filter.ColorGrade.Gamma.Green="Gama Verde" +Filter.ColorGrade.Gamma.Blue="Gama Azul" +Filter.ColorGrade.Gamma.All="Todos os Gama" +Filter.ColorGrade.Gain="Ganho" Filter.ColorGrade.Gain.Red="Ganho Vermelho" Filter.ColorGrade.Gain.Green="Ganho Verde" Filter.ColorGrade.Gain.Blue="Ganho Azul" @@ -112,29 +318,196 @@ Filter.ColorGrade.Offset.Green="Desvio Verde" Filter.ColorGrade.Offset.Blue="Desvio Azul" Filter.ColorGrade.Offset.All="Desvio de Todas" Filter.ColorGrade.Tint="Tonalidade" +Filter.ColorGrade.Tint.Detection="Método de Detecção de Luma Tint Luma" +Filter.ColorGrade.Tint.Detection.HSV="Valor de Saturação da Tonalidade" +Filter.ColorGrade.Tint.Detection.HSL="Leveza de Saturação da Tonalidade" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Modo Tinta Luma" Filter.ColorGrade.Tint.Mode.Linear="Linear" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Registo" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Tint Luma Exponent" +Filter.ColorGrade.Tint.Shadow.Red="Tinta Vermelha Sombra" +Filter.ColorGrade.Tint.Shadow.Green="Tinta Verde Sombra" +Filter.ColorGrade.Tint.Shadow.Blue="Tonalidade Azul Sombra" +Filter.ColorGrade.Tint.Midtone.Red="Tonalidade vermelha de meio-tom" +Filter.ColorGrade.Tint.Midtone.Green="Tonalidade Verde Meio-tom" +Filter.ColorGrade.Tint.Midtone.Blue="Tonalidade azul meio-tom" +Filter.ColorGrade.Tint.Highlight.Red="Realce Tinta Vermelha" +Filter.ColorGrade.Tint.Highlight.Green="Realce Tinta Verde" +Filter.ColorGrade.Tint.Highlight.Blue="Realce Blue Tint" +Filter.ColorGrade.Correction="Correcção de cor" +Filter.ColorGrade.Correction.Hue="Turno de Tonalidade" +Filter.ColorGrade.Correction.Saturation="Saturação" +Filter.ColorGrade.Correction.Lightness="Ligeireza" +Filter.ColorGrade.Correction.Contrast="Contraste" +Filter.ColorGrade.RenderMode="Modo Renderização" +Filter.ColorGrade.RenderMode.Direct="Renderização directa" +Filter.ColorGrade.RenderMode.LUT.2Bit="Tabela de 2-Bit Look-Up" +Filter.ColorGrade.RenderMode.LUT.4Bit="Tabela de 4-Bit Look-Up" +Filter.ColorGrade.RenderMode.LUT.6Bit="Tabela de 6-Bit Look-Up" +Filter.ColorGrade.RenderMode.LUT.8Bit="Tabela de 8-Bit Look-Up" +Filter.ColorGrade.RenderMode.LUT.10Bit="Tabela de 10-Bit Look-Up" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Fornecedor" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, alimentado por NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Força" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Fraco" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Forte" +Filter.Displacement="Cartografia de Deslocamento" +Filter.Displacement.Deprecated="Este filtro está obsoleto e foi removido. Os utilizadores são instados a migrar para o filtro 'Shader' com o exemplo 'displace.effect' imediatamente." +Filter.Displacement.File="Ficheiro" +Filter.Displacement.Scale="Balança" +Filter.Displacement.Scale.Type="Tipo de Escala" +Filter.DynamicMask="Máscara Dinâmica" +Filter.DynamicMask.Input="Fonte de entrada" +Filter.DynamicMask.Channel="%s Canal" +Filter.DynamicMask.Channel.Value="Valor Base" +Filter.DynamicMask.Channel.Multiplier="Multiplicador" +Filter.DynamicMask.Channel.Input="%s Valor de entrada" +Filter.SDFEffects="Efeitos da SDF" +Filter.SDFEffects.Shadow.Inner="Sombra Interior" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Sombra Interior Distância Mínima" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Sombra Interior Distância Máxima" +Filter.SDFEffects.Shadow.Inner.Offset.X="Offset de Sombra Interior X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Compensação da Sombra Interior Y" +Filter.SDFEffects.Shadow.Inner.Color="Cor da Sombra Interior" +Filter.SDFEffects.Shadow.Inner.Alpha="Sombra Alfa Interior" +Filter.SDFEffects.Shadow.Outer="Sombra exterior" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Sombra exterior Distância mínima" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Sombra Exterior Distância Máxima" +Filter.SDFEffects.Shadow.Outer.Offset.X="Offset Sombra Exterior X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Offset Sombra Exterior Y" +Filter.SDFEffects.Shadow.Outer.Color="Cor da Sombra Exterior" +Filter.SDFEffects.Shadow.Outer.Alpha="Sombra Alfa Exterior" +Filter.SDFEffects.Glow.Outer="Brilho exterior" +Filter.SDFEffects.Glow.Outer.Color="Cor exterior brilhante" +Filter.SDFEffects.Glow.Outer.Alpha="Alfa de brilho exterior" +Filter.SDFEffects.Glow.Outer.Width="Largura de luminosidade exterior" +Filter.SDFEffects.Glow.Outer.Sharpness="Nitidez do Brilho Externo" +Filter.SDFEffects.Glow.Inner="Brilho interior" +Filter.SDFEffects.Glow.Inner.Color="Cor Interior Brilho" +Filter.SDFEffects.Glow.Inner.Alpha="Alfa Interior Glow" +Filter.SDFEffects.Glow.Inner.Width="Largura de brilho interior" +Filter.SDFEffects.Glow.Inner.Sharpness="Nitidez do Brilho Interior" +Filter.SDFEffects.Outline="Esboço" +Filter.SDFEffects.Outline.Color="Cor do esboço" +Filter.SDFEffects.Outline.Alpha="Esboço Alfa" +Filter.SDFEffects.Outline.Width="Largura de contorno" +Filter.SDFEffects.Outline.Offset="Esboço de Offset" +Filter.SDFEffects.Outline.Sharpness="Esboço de nitidez" +Filter.SDFEffects.SDF.Scale="Escala de SDF Textura" +Filter.SDFEffects.SDF.Threshold="Limiar Alfa SDF" +Filter.Transform="Transformação 3D" +Filter.Transform.Camera="Câmara" Filter.Transform.Camera.Mode="Modo" +Filter.Transform.Camera.Mode.CornerPin="Alfinete de canto" +Filter.Transform.Camera.Mode.Orthographic="Ortográfico" +Filter.Transform.Camera.Mode.Perspective="Perspectiva" +Filter.Transform.Camera.FieldOfView="Campo de visão" +Filter.Transform.Position="Posição" Filter.Transform.Position.X="X" Filter.Transform.Position.Y="Y" Filter.Transform.Position.Z="Z" Filter.Transform.Scale="Escala" Filter.Transform.Scale.X="X" Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Cisalhamento" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Rotação" +Filter.Transform.Rotation.X="Breu (X)" +Filter.Transform.Rotation.Y="Yaw (Y)" +Filter.Transform.Rotation.Z="Rolo (Z)" +Filter.Transform.Rotation.Order="Ordem de Rotação" +Filter.Transform.Rotation.Order.XYZ="Breu, Yaw, Rolo" +Filter.Transform.Rotation.Order.XZY="Breu, Rolo, Yaw" +Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" +Filter.Transform.Rotation.Order.ZXY="Rolo, Breu, Yaw" +Filter.Transform.Rotation.Order.ZYX="Role, Yaw, Pitch" +Filter.Transform.Corners="Cantos" +Filter.Transform.Corners.TopLeft="Superior esquerdo" +Filter.Transform.Corners.TopRight="Superior direita" +Filter.Transform.Corners.BottomLeft="Esquerda inferior" +Filter.Transform.Corners.BottomRight="Em baixo à direita" +Filter.Transform.Mipmapping="Activar o Mipmapping" +Filter.Upscaling="Ampliação" +Filter.Upscaling.Provider="Fornecedor" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, alimentado por NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolução" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Balança" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Força" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Fraco" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Forte" +Filter.VirtualGreenscreen="Ecrã verde virtual" +Filter.VirtualGreenscreen.Provider="Fornecedor" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="Ecrã Verde NVIDIA®, alimentado por NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Ecrã Verde" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Modo" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Desempenho" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Qualidade" +Source.Mirror="Espelho de origem" Source.Mirror.Source="Fonte" +Source.Mirror.Source.Audio="Habilitar Audio" +Source.Mirror.Source.Audio.Layout="Disposição de áudio" +Source.Mirror.Source.Audio.Layout.Unknown="Desconhecido" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Estéreo com LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Quadrafónico" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Quadrafónico Com LFE" +Source.Mirror.Source.Audio.Layout.Surround="Cerca" +Source.Mirror.Source.Audio.Layout.FullSurround="Completo" +Codec.AV1="AV1" +Codec.AV1.Profile="Perfil" +Codec.AV1.Profile.Main="Principal" +Codec.AV1.Profile.High="Alto" +Codec.AV1.Profile.Professional="Profissional" +Codec.H264="H264" +Codec.H264.Profile="Perfil" +Codec.H264.Profile.baseline="Linha de base" +Codec.H264.Profile.main="Principal" +Codec.H264.Profile.high="Alto" +Codec.H264.Profile.high444p="Alto 4:4:4 Predictivo" +Codec.H264.Level="Nível" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Perfil" +Codec.HEVC.Profile.main="Principal" +Codec.HEVC.Profile.main10="Principal 10-bit" +Codec.HEVC.Profile.rext="Gama Alargada" +Codec.HEVC.Tier="Tier" +Codec.HEVC.Tier.main="Principal" +Codec.HEVC.Tier.high="Alto" +Codec.HEVC.Level="Nível" +Codec.ProRes.Profile="Perfil" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Norma (APCN)" +Codec.ProRes.Profile.APCH="422 Alta Qualidade/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Alta Qualidade/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Qualidade Extrema/XQ (AP4X)" +Codec.DNxHR.Profile="Perfil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/ro-RO.ini b/data/locale/ro-RO.ini index cda4eace35..4dedaf38a5 100644 --- a/data/locale/ro-RO.ini +++ b/data/locale/ro-RO.ini @@ -57,6 +57,7 @@ UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Setări transparenta" Encoder.AOM.AV1="AOM AV1 (direct)" +Encoder.AOM.AV1.Deprecated="Acest codificator este depreciat și va fi eliminat în curând. Utilizatorii sunt îndemnați să treacă la codificatorul integrat \"SVT-AV1\" sau \"AOM AV1\" cât mai curând posibil." Encoder.AOM.AV1.Encoder="Codificator" Encoder.AOM.AV1.Encoder.Usage="Utilizare" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Calitate bună" @@ -80,12 +81,48 @@ Encoder.AOM.AV1.KeyFrames.IntervalType="Tip Interval" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Cadre" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Secunde" Encoder.AOM.AV1.KeyFrames.Interval="Interval" +Encoder.AOM.AV1.RateControl="Controlul ratei" Encoder.AOM.AV1.RateControl.Mode="Mod" +Encoder.AOM.AV1.RateControl.Mode.CBR="Viteză constantă de biți (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Viteză de transfer variabilă (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Calitatea constrânsă (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Calitate constantă (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Privire în perspectivă" Encoder.AOM.AV1.RateControl.Limits="Limite" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Bitrate Undershoot" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Depășirea debitului de biți" Encoder.AOM.AV1.RateControl.Limits.Quality="Calitate" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Cuantificator minim" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Cuantificator maxim" +Encoder.AOM.AV1.RateControl.Buffer="Tampon" Encoder.AOM.AV1.RateControl.Buffer.Size="Dimensiune" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Dimensiunea inițială" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Dimensiunea optimă" +Encoder.AOM.AV1.Advanced="Avansat" +Encoder.AOM.AV1.Advanced.Threads="Fire" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-Threading pe rând" +Encoder.AOM.AV1.Advanced.Tile.Columns="Coloane de faianță" +Encoder.AOM.AV1.Advanced.Tile.Rows="Rânduri de țiglă" +Encoder.AOM.AV1.Advanced.Tune="Tune" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metric" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (cu preprocesare)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (fără preprocesare)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Conținut" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ecran" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" +Encoder.FFmpeg="FFmpeg Opțiuni" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Setări personalizate" +Encoder.FFmpeg.Threads="Număr de fire" Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Cadre cheie" Encoder.FFmpeg.KeyFrames.IntervalType="Tip Interval" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Cadre" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Secunde" @@ -93,12 +130,17 @@ Encoder.FFmpeg.KeyFrames.Interval="Interval" Encoder.FFmpeg.AMF.Deprecated="Acest codificator este învechit și va fi eliminat în curând. Utilizatorii sunt îndemnați să migreze la 'AMD HW H. Codificator 'AMD H.265 (HEVC)' sau 'AMD H.265 (HEVC)' cât mai curând posibil." Encoder.FFmpeg.AMF.Preset="Presetare" +Encoder.FFmpeg.AMF.Preset.Speed="Viteză" +Encoder.FFmpeg.AMF.Preset.Balanced="Echilibrat" Encoder.FFmpeg.AMF.Preset.Quality="Calitate" Encoder.FFmpeg.AMF.RateControl="Opţiuni de control al ratei" Encoder.FFmpeg.AMF.RateControl.Mode="Mod" Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Parametru de cuantizare constantă" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Bitrate variabil (cu restricție de vârf)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Bitrate variabil (cu restricții de latență)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Debit binar constant" Encoder.FFmpeg.AMF.RateControl.LookAhead="Prognozeaza" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Saltul de cadre" Encoder.FFmpeg.AMF.RateControl.Limits="Limite" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Dimensiune tampon" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Debit binar dorit" @@ -108,7 +150,12 @@ Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" Encoder.FFmpeg.AMF.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.AMF.RateControl.QP.B="B-Frame QP" Encoder.FFmpeg.AMF.Other="Alte opțiuni" +Encoder.FFmpeg.AMF.Other.BFrames="Numărul maxim de cadre B" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B-Frame Referințe" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Cadre de referință" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Aplică DRH" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Delimitatorul unității de acces" Encoder.FFmpeg.NVENC.Preset="Presetare" Encoder.FFmpeg.NVENC.Preset.default="Prestabilit" @@ -140,17 +187,40 @@ Encoder.FFmpeg.NVENC.RateControl.Mode="Mod" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Parametru de cuantizare constantă" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="VBR (Rată de biți variabilă)" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Debit binar constant" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Două treceri" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="O singură trecere" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Două trec la rezoluție sfert" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Două trec la rezoluție maximă" Encoder.FFmpeg.NVENC.RateControl.LookAhead="Prognozeaza" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Cadre I adaptive" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Cadre B adaptive" Encoder.FFmpeg.NVENC.RateControl.Limits="Limite" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Dimensiune tampon" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Calitatea țintă" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Debit binar dorit" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Debit binar maxim" Encoder.FFmpeg.NVENC.RateControl.QP="Parametri de cuantificare" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="QP minim" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="QP maxim" Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Frame QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Frame QP" +Encoder.FFmpeg.NVENC.AQ="Cuantificarea adaptivă" +Encoder.FFmpeg.NVENC.AQ.Spatial="Cuantificarea adaptivă spațială" +Encoder.FFmpeg.NVENC.AQ.Strength="Puterea de cuantificare adaptivă spațială" +Encoder.FFmpeg.NVENC.AQ.Temporal="Cuantificarea adaptivă temporală" Encoder.FFmpeg.NVENC.Other="Alte opțiuni" +Encoder.FFmpeg.NVENC.Other.BFrames="Numărul maxim de cadre B" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Modul de referință B-Frame" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Nu se vor utiliza cadre B ca referință" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Numai cadrele B/2 vor fi utilizate ca referință." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Fiecare cadru B va fi folosit ca referință" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Latență zero" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Predicție ponderată" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Cadre P fără referință" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Cadre de referință" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Scară de întârziere scăzută a cadrelor cheie" Blur.Type.Box="Cutie" Blur.Type.BoxLinear="Cutie liniară" @@ -173,14 +243,30 @@ Shader.Shader.Size.Height="Înălțime" Shader.Shader.Seed="Baza de randomizare" Shader.Parameters="Parametrii Shader-ului" Shader.Parameter.Texture.Type="Tip" +Shader.Parameter.Texture.Type.File="Fișier" Shader.Parameter.Texture.Type.Source="Sursă" +Shader.Parameter.Texture.File="Fișier" Shader.Parameter.Texture.Source="Sursă" Filter.Shader="Efecte de umbrire" Source.Shader="Efecte de umbrire" Transition.Shader="Efecte de umbrire" +Filter.AutoFraming="Auto-Frameing" +Filter.AutoFraming.Tracking="Opțiuni de urmărire" Filter.AutoFraming.Tracking.Mode="Mod" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Grup" +Filter.AutoFraming.Tracking.Frequency="Frecvență" +Filter.AutoFraming.Motion="Opțiuni de mișcare" +Filter.AutoFraming.Motion.Smoothing="Netezire" +Filter.AutoFraming.Motion.Prediction="Predicție" +Filter.AutoFraming.Framing="Opțiuni de încadrare" +Filter.AutoFraming.Framing.Stability="Stabilitate" +Filter.AutoFraming.Framing.Padding="Căptușeală" Filter.AutoFraming.Framing.Offset="Ofset" +Filter.AutoFraming.Framing.AspectRatio="Raportul de aspect" +Filter.AutoFraming.Provider="Furnizor" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, cu ajutorul NVIDIA® Broadcast" Filter.Blur="Voalare" Filter.Blur.Type="Tip" @@ -214,6 +300,7 @@ Filter.ColorGrade="Gradare culoare" Filter.ColorGrade.Lift="Lift" Filter.ColorGrade.Lift.Red="Lift pe componenta Rosu" Filter.ColorGrade.Lift.Green="Lift pe componenta Verde" +Filter.ColorGrade.Lift.Blue="Lift albastru" Filter.ColorGrade.Lift.All="Lift global" Filter.ColorGrade.Gamma="Gamma" Filter.ColorGrade.Gamma.Red="Gamma pe componenta Rosu" @@ -230,11 +317,63 @@ Filter.ColorGrade.Offset.Red="Ofset pe componenta Rosu" Filter.ColorGrade.Offset.Green="Ofset pe componenta Verde" Filter.ColorGrade.Offset.Blue="Ofset pe componenta Albastru" Filter.ColorGrade.Offset.All="Ofset global" +Filter.ColorGrade.Tint="Tentă" +Filter.ColorGrade.Tint.Detection="Metoda de detectare a nuanței Luma" +Filter.ColorGrade.Tint.Detection.HSV="Nuanță Saturație Valoare" +Filter.ColorGrade.Tint.Detection.HSL="Nuanță Saturație Saturație Luminozitate" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Tint Luma Mode" Filter.ColorGrade.Tint.Mode.Linear="Liniar" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Jurnal" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Exponentul Tint Luma" +Filter.ColorGrade.Tint.Shadow.Red="Umbra roșie Tint" +Filter.ColorGrade.Tint.Shadow.Green="Umbra verde Tint" +Filter.ColorGrade.Tint.Shadow.Blue="Albastru de umbră Tint" +Filter.ColorGrade.Tint.Midtone.Red="Nuanță roșie de tonuri medii" +Filter.ColorGrade.Tint.Midtone.Green="Nuanță medie de verde" +Filter.ColorGrade.Tint.Midtone.Blue="Nuanță medie de albastru" +Filter.ColorGrade.Tint.Highlight.Red="Evidențiați Red Tint" +Filter.ColorGrade.Tint.Highlight.Green="Evidențiați nuanța verde" +Filter.ColorGrade.Tint.Highlight.Blue="Evidențiați nuanța albastră" +Filter.ColorGrade.Correction="Corecția culorilor" +Filter.ColorGrade.Correction.Hue="Schimbare de nuanță" +Filter.ColorGrade.Correction.Saturation="Saturație" +Filter.ColorGrade.Correction.Lightness="Luminozitate" +Filter.ColorGrade.Correction.Contrast="Contrast" +Filter.ColorGrade.RenderMode="Modul de redare" +Filter.ColorGrade.RenderMode.Direct="Renderizare directă" +Filter.ColorGrade.RenderMode.LUT.2Bit="Tabel de căutare pe 2 biți" +Filter.ColorGrade.RenderMode.LUT.4Bit="Tabel de căutare pe 4 biți" +Filter.ColorGrade.RenderMode.LUT.6Bit="Tabel de căutare pe 6 biți" +Filter.ColorGrade.RenderMode.LUT.8Bit="Tabel de căutare pe 8 biți" +Filter.ColorGrade.RenderMode.LUT.10Bit="Tabel de căutare de 10 biți" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Furnizor" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, cu ajutorul NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Putere" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Slabă" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Puternic" +Filter.Displacement="Cartografierea deplasărilor" +Filter.Displacement.Deprecated="Acest filtru este depreciat și a fost eliminat. Utilizatorii sunt îndemnați să migreze imediat la filtrul \"Shader\" cu exemplul \"displace.effect\"." +Filter.Displacement.File="Fișier" +Filter.Displacement.Scale="Scară" +Filter.Displacement.Scale.Type="Tip de scalare" +Filter.DynamicMask="Mască dinamică" +Filter.DynamicMask.Input="Sursa de intrare" +Filter.DynamicMask.Channel="%s Canal" +Filter.DynamicMask.Channel.Value="Valoarea de bază" +Filter.DynamicMask.Channel.Multiplier="Multiplicator" +Filter.DynamicMask.Channel.Input="%s Valoarea de intrare" +Filter.SDFEffects="Efectele FSD" +Filter.SDFEffects.Shadow.Inner="Umbra interioară" Filter.SDFEffects.Shadow.Inner.Range.Minimum="Distanță minimă Umbră interioară" Filter.SDFEffects.Shadow.Inner.Range.Maximum="Distanța maximă a umbrei interioare" Filter.SDFEffects.Shadow.Inner.Offset.X="Ofset umbra interioară X" @@ -270,6 +409,9 @@ Filter.SDFEffects.SDF.Threshold="Pragul de Alfa SDF" Filter.Transform="Transformare 3D" Filter.Transform.Camera="Camera" Filter.Transform.Camera.Mode="Mod" +Filter.Transform.Camera.Mode.CornerPin="Pin de colț" +Filter.Transform.Camera.Mode.Orthographic="Ortografic" +Filter.Transform.Camera.Mode.Perspective="Perspectivă" Filter.Transform.Camera.FieldOfView="Câmp vizual" Filter.Transform.Position="Poziţie" Filter.Transform.Position.X="X" @@ -285,16 +427,81 @@ Filter.Transform.Rotation="Rotație" Filter.Transform.Rotation.X="Azimut (X)" Filter.Transform.Rotation.Y="Declinatie (Y)" Filter.Transform.Rotation.Z="Elevatie (Z)" +Filter.Transform.Rotation.Order="Ordine de rotație" +Filter.Transform.Rotation.Order.XYZ="Înclinație, deviație, ruliu" +Filter.Transform.Rotation.Order.XZY="Înclinație, ruliu, balans" +Filter.Transform.Rotation.Order.YXZ="Iad, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Iad, ruliu, tangaj" +Filter.Transform.Rotation.Order.ZXY="Ruliu, tangaj, azvârlire" +Filter.Transform.Rotation.Order.ZYX="Ruliu, Yw, Pitch" +Filter.Transform.Corners="Colțuri" +Filter.Transform.Corners.TopLeft="În stânga sus" +Filter.Transform.Corners.TopRight="Dreapta sus" +Filter.Transform.Corners.BottomLeft="În stânga jos" +Filter.Transform.Corners.BottomRight="Partea de jos dreapta" +Filter.Transform.Mipmapping="Activați Mipmapping" +Filter.Upscaling="Redimensionarea" +Filter.Upscaling.Provider="Furnizor" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, cu ajutorul NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Super Resolution" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Scala" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Putere" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Slabă" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Puternic" +Filter.VirtualGreenscreen="Ecran verde virtual" +Filter.VirtualGreenscreen.Provider="Furnizor" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, cu ajutorul NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Mod" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Performanță" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Calitate" +Source.Mirror="Sursa Oglinda" Source.Mirror.Source="Sursă" +Source.Mirror.Source.Audio="Activează audio" +Source.Mirror.Source.Audio.Layout="Layout audio" +Source.Mirror.Source.Audio.Layout.Unknown="Necunoscut" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Stereo cu LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Quadraphonic" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Cuadrafonic cu LFE" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Full Surround" +Codec.AV1="AV1" +Codec.AV1.Profile="Profil" +Codec.AV1.Profile.Main="Principal" +Codec.AV1.Profile.High="Mare" +Codec.AV1.Profile.Professional="Profesional" +Codec.H264="H264" +Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Linia de bază" +Codec.H264.Profile.main="Principal" +Codec.H264.Profile.high="Mare" +Codec.H264.Profile.high444p="Mare 4:4:4:4 Predictiv" +Codec.H264.Level="Nivel" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Profil" +Codec.HEVC.Profile.main="Principal" +Codec.HEVC.Profile.main10="Principal 10 biți" +Codec.HEVC.Profile.rext="Gama extinsă" +Codec.HEVC.Tier="Nivel" +Codec.HEVC.Tier.main="Principal" +Codec.HEVC.Tier.high="Mare" +Codec.HEVC.Level="Nivel" +Codec.ProRes.Profile="Profil" +Codec.ProRes.Profile.APCO="422 Proxy (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standard (APCN)" +Codec.ProRes.Profile.APCH="422 Calitate înaltă/QC (APCH)" +Codec.ProRes.Profile.AP4H="4444 de înaltă calitate/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" Codec.DNxHR.Profile="Profil" Codec.DNxHR.Profile.dnxhd="DNxHD" diff --git a/data/locale/sv-SE.ini b/data/locale/sv-SE.ini index b2f069a8cb..9078ea9780 100644 --- a/data/locale/sv-SE.ini +++ b/data/locale/sv-SE.ini @@ -1,4 +1,10 @@ +Advanced="Avancerade alternativ" +Manual.Open="Öppna handboken" +Channel.Red="Röd" +Channel.Green="Grön" +Channel.Blue="Blå" +Channel.Alpha="Alpha" FileType.Image="Bild" FileType.Images="Bilder" @@ -10,45 +16,498 @@ FileType.Effect="Effekt" FileType.Effects="Effekter" SourceType.Source="Källa" +SourceType.Scene="Scen" +State.Disabled="Inaktiverad" +State.Enabled="Aktiverad" +State.Manual="Manuell" +State.Automatic="Automatisk" +State.Default="Standard" +UI.Menu="StreamFX" +UI.Menu.Wiki="Läs wikin" +UI.Menu.Support="Hjälp och stöd" +UI.Menu.Website="Besök webbplatsen för StreamFX" +UI.Menu.Discord="Gå med i StreamFX Discord" +UI.Menu.Twitter="Följ StreamFX på Twitter" +UI.Menu.YouTube="Prenumerera på StreamFX på YouTube" +UI.Menu.About="Om StreamFX" +UI.About.Title="Om StreamFX" +UI.About.Text="

StreamFX möjliggörs av alla supportrar på Patreon, på Github Sponsors, och alla som donerar via PayPal. Ytterligare tack går till alla översättare som hjälper till med lokaliseringen på Crowdin. Ni är alla fantastiska!

" +UI.About.Role.Contributor="Bidragsgivare" +UI.About.Role.Translator="Översättare" +UI.About.Role.Supporter="Supporter" +UI.About.Version="Version:" +UI.Updater.Dialog.Title="StreamFX Version %s är nu tillgänglig!" +UI.Updater.Dialog.Text="En ny version av StreamFX kan laddas ner." +UI.Updater.Dialog.Version.Current="Nuvarande version:" +UI.Updater.Dialog.Version.Latest="Senaste versionen:" +UI.Updater.Dialog.Button.Ok="Öppna nedladdningssidan" +UI.Updater.Dialog.Button.Cancel="Påminn mig senare" +UI.Updater.GitHubPermission.Title="StreamFX behöver ditt tillstånd för att ansluta till GitHub!" +UI.Updater.GitHubPermission.Text="För att tillhandahålla manuell eller automatisk uppdateringskontroll förlitar sig StreamFX på GitHub API för att hämta den senaste informationen.
Läs Github Privacy Statement, och klicka på \"OK\" om du godkänner, eller \"Cancel\" om du inte godkänner." +UI.Updater.Menu.CheckForUpdates="Kontrollera om det finns uppdateringar" +UI.Updater.Menu.CheckForUpdates.Automatically="Automatisk kontroll av uppdateringar" +UI.Updater.Menu.Channel="Uppdateringskanal" UI.Updater.Menu.Channel.Stable="Stall" UI.Updater.Menu.Channel.Candidate="Kandidater" UI.Updater.Menu.Channel.Beta="Betaversioner" UI.Updater.Menu.Channel.Alpha="Alfa" +Encoder.AOM.AV1="AOM AV1 (direkt)" +Encoder.AOM.AV1.Deprecated="Den här kodaren är föråldrad och kommer snart att tas bort. Användarna uppmanas att byta till den integrerade kodaren \"SVT-AV1\" eller \"AOM AV1\" så snart som möjligt." +Encoder.AOM.AV1.Encoder="Kodare" +Encoder.AOM.AV1.Encoder.Usage="Användning" +Encoder.AOM.AV1.Encoder.Usage.GoodQuality="Bra kvalitet" +Encoder.AOM.AV1.Encoder.Usage.RealTime="Verklig tid" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Alla inom ramen" +Encoder.AOM.AV1.Encoder.CPUUsage="CPU-användning" +Encoder.AOM.AV1.Encoder.CPUUsage.0="Placebo" +Encoder.AOM.AV1.Encoder.CPUUsage.1="Mycket långsam" +Encoder.AOM.AV1.Encoder.CPUUsage.2="Långsammare" +Encoder.AOM.AV1.Encoder.CPUUsage.3="Långsam" +Encoder.AOM.AV1.Encoder.CPUUsage.4="Medium" +Encoder.AOM.AV1.Encoder.CPUUsage.5="Snabbt" +Encoder.AOM.AV1.Encoder.CPUUsage.6="Snabbare" +Encoder.AOM.AV1.Encoder.CPUUsage.7="Mycket snabbt" +Encoder.AOM.AV1.Encoder.CPUUsage.8="Supersnabbt" +Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultrasnabbt" +Encoder.AOM.AV1.Encoder.CPUUsage.10="Galet snabbt" +Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Nyckelram" +Encoder.AOM.AV1.KeyFrames.IntervalType="Typ av intervall" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Ramar" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Sekunder" +Encoder.AOM.AV1.KeyFrames.Interval="Intervall" +Encoder.AOM.AV1.RateControl="Kontroll av hastighet" +Encoder.AOM.AV1.RateControl.Mode="Läge" +Encoder.AOM.AV1.RateControl.Mode.CBR="Konstant bithastighet (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="Variabel bithastighet (VBR)" +Encoder.AOM.AV1.RateControl.Mode.CQ="Begränsad kvalitet (CQ)" +Encoder.AOM.AV1.RateControl.Mode.Q="Konstant kvalitet (Q)" +Encoder.AOM.AV1.RateControl.LookAhead="Förutseende" +Encoder.AOM.AV1.RateControl.Limits="Begränsningar" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bitrate" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Underskridande av bithastighet" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Överskridande av bithastighet" +Encoder.AOM.AV1.RateControl.Limits.Quality="Kvalitet" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minsta kvantiserare" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maximal kvantisering" +Encoder.AOM.AV1.RateControl.Buffer="Buffert" +Encoder.AOM.AV1.RateControl.Buffer.Size="Storlek" +Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Ursprunglig storlek" +Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Optimal storlek" +Encoder.AOM.AV1.Advanced="Avancerad" +Encoder.AOM.AV1.Advanced.Threads="Trådar" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Multitrådning per rad" +Encoder.AOM.AV1.Advanced.Tile.Columns="Kakelpelare" +Encoder.AOM.AV1.Advanced.Tile.Rows="Rader av kakelplattor" +Encoder.AOM.AV1.Advanced.Tune="Stämma av" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metriskt" +Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" +Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (med förbehandling)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (utan förbehandling)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" +Encoder.AOM.AV1.Advanced.Tune.Content="Innehåll" +Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Skärm" +Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" +Encoder.FFmpeg="FFmpeg-alternativ" +Encoder.FFmpeg.Suffix=" (via FFmpeg)" +Encoder.FFmpeg.CustomSettings="Anpassade inställningar" +Encoder.FFmpeg.Threads="Antal trådar" +Encoder.FFmpeg.GPU="GPU" +Encoder.FFmpeg.KeyFrames="Viktiga ramar" +Encoder.FFmpeg.KeyFrames.IntervalType="Typ av intervall" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Ramar" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunder" +Encoder.FFmpeg.KeyFrames.Interval="Intervall" +Encoder.FFmpeg.AMF.Deprecated="Den här kodaren är föråldrad och kommer snart att tas bort. Användarna uppmanas att övergå till den integrerade kodaren \"AMD HW H.264 (AVC)\" eller \"AMD HW H.265 (HEVC)\" så snart som möjligt." +Encoder.FFmpeg.AMF.Preset="Förinställd" +Encoder.FFmpeg.AMF.Preset.Speed="Hastighet" +Encoder.FFmpeg.AMF.Preset.Balanced="Balanserad" +Encoder.FFmpeg.AMF.Preset.Quality="Kvalitet" +Encoder.FFmpeg.AMF.RateControl="Alternativ för hastighetsstyrning" +Encoder.FFmpeg.AMF.RateControl.Mode="Läge" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Konstant kvantiseringsparameter" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Variabel bithastighet (Peak Constrained)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Variabel bithastighet (begränsad latenstid)" +Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Konstant bithastighet" +Encoder.FFmpeg.AMF.RateControl.LookAhead="Titta framåt" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Överhoppning av ramar" +Encoder.FFmpeg.AMF.RateControl.Limits="Begränsningar" +Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Buffertstorlek" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Målbitrate" +Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maximal bithastighet" +Encoder.FFmpeg.AMF.RateControl.QP="Kvantiseringsparametrar" +Encoder.FFmpeg.AMF.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.AMF.RateControl.QP.P="P-ram QP" +Encoder.FFmpeg.AMF.RateControl.QP.B="B-ram QP" +Encoder.FFmpeg.AMF.Other="Andra alternativ" +Encoder.FFmpeg.AMF.Other.BFrames="Maximalt antal B-ramar" +Encoder.FFmpeg.AMF.Other.BFrameReferences="Referenser för B-ramar" +Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referensramar" +Encoder.FFmpeg.AMF.Other.EnforceHRD="Genomföra HRD" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Delimiter för åtkomstenhet" +Encoder.FFmpeg.NVENC.Preset="Förinställd" +Encoder.FFmpeg.NVENC.Preset.default="Standard" +Encoder.FFmpeg.NVENC.Preset.slow="Långsam" +Encoder.FFmpeg.NVENC.Preset.medium="Medium" +Encoder.FFmpeg.NVENC.Preset.fast="Snabbt" +Encoder.FFmpeg.NVENC.Preset.hp="Hög prestanda" +Encoder.FFmpeg.NVENC.Preset.hq="Hög kvalitet" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay-skiva" +Encoder.FFmpeg.NVENC.Preset.ll="Låg latenstid" +Encoder.FFmpeg.NVENC.Preset.llhq="Låg latenstid Hög kvalitet" +Encoder.FFmpeg.NVENC.Preset.llhp="Låg latenstid Hög prestanda" +Encoder.FFmpeg.NVENC.Preset.lossless="Förlustfri" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Förlustfri hög prestanda" +Encoder.FFmpeg.NVENC.Preset.p1="Snabbast (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Snabbare (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Snabbt (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Medelstor (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Långsam (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Långsammare (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="Långsammaste (P7)" +Encoder.FFmpeg.NVENC.Tune="Stämma av" +Encoder.FFmpeg.NVENC.Tune.hq="Hög kvalitet" +Encoder.FFmpeg.NVENC.Tune.ll="Låg latenstid" +Encoder.FFmpeg.NVENC.Tune.ull="Extremt låg latenstid" +Encoder.FFmpeg.NVENC.Tune.lossless="Förlustfri" +Encoder.FFmpeg.NVENC.RateControl="Alternativ för hastighetsstyrning" +Encoder.FFmpeg.NVENC.RateControl.Mode="Läge" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Konstant kvantiseringsparameter" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variabel bithastighet" +Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Konstant bithastighet" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="Två pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Multi-Pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Enkelt pass" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Två passerar med kvarts upplösning" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Två pass med full upplösning" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="Titta framåt" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Anpassningsbara I-ramar" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Adaptiva B-ramar" +Encoder.FFmpeg.NVENC.RateControl.Limits="Begränsningar" +Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Buffertstorlek" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Målkvalitet" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Målbitrate" +Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maximal bithastighet" +Encoder.FFmpeg.NVENC.RateControl.QP="Kvantiseringsparametrar" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minsta QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Högsta QP" +Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Frame QP" +Encoder.FFmpeg.NVENC.RateControl.QP.P="P-ram QP" +Encoder.FFmpeg.NVENC.RateControl.QP.B="B-ram QP" +Encoder.FFmpeg.NVENC.AQ="Adaptiv kvantisering" +Encoder.FFmpeg.NVENC.AQ.Spatial="Rumslig adaptiv kvantisering" +Encoder.FFmpeg.NVENC.AQ.Strength="Spatial adaptiv kvantiseringsstyrka" +Encoder.FFmpeg.NVENC.AQ.Temporal="Temporell adaptiv kvantisering" +Encoder.FFmpeg.NVENC.Other="Andra alternativ" +Encoder.FFmpeg.NVENC.Other.BFrames="Maximalt antal B-ramar" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="Referensläge för B-Frame" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Inga B-ramar kommer att användas som referens." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Endast B-ramar/2 kommer att användas som referens." +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Varje B-ram kommer att användas som referens." +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Noll latenstid" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Viktad förutsägelse" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="P-ramar som inte är referensramar" +Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referensramar" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Låg fördröjning Key-Frame-skala" +Blur.Type.Box="Box" +Blur.Type.BoxLinear="Box Linear" +Blur.Type.Gaussian="Gaussisk" +Blur.Type.GaussianLinear="Gaussisk Linjär" +Blur.Type.DualFiltering="Dubbel filtrering" +Blur.Subtype.Area="Område" +Blur.Subtype.Directional="Riktningsbestämd" +Blur.Subtype.Rotational="Rotation" +Blur.Subtype.Zoom="Zoom" +Shader="Shader" +Shader.Refresh="Alternativ och parametrar för uppdatering" +Shader.Shader="Shader-alternativ" Shader.Shader.File="Fil" +Shader.Shader.Technique="Teknik" +Shader.Shader.Size="Storlek" +Shader.Shader.Size.Width="Bredd" +Shader.Shader.Size.Height="Höjd" +Shader.Shader.Seed="Randomiseringsfrö" +Shader.Parameters="Shader-parametrar" Shader.Parameter.Texture.Type="Typ" Shader.Parameter.Texture.Type.File="Fil" Shader.Parameter.Texture.Type.Source="Källa" Shader.Parameter.Texture.File="Fil" Shader.Parameter.Texture.Source="Källa" +Filter.Shader="Shader" +Source.Shader="Shader" +Transition.Shader="Shader" +Filter.AutoFraming="Automatisk inramning" +Filter.AutoFraming.Tracking="Alternativ för spårning" +Filter.AutoFraming.Tracking.Mode="Läge" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Grupp" +Filter.AutoFraming.Tracking.Frequency="Frekvens" +Filter.AutoFraming.Motion="Alternativ för rörelser" +Filter.AutoFraming.Motion.Smoothing="Utjämning" +Filter.AutoFraming.Motion.Prediction="Prognos" +Filter.AutoFraming.Framing="Alternativ för inramning" +Filter.AutoFraming.Framing.Stability="Stabilitet" +Filter.AutoFraming.Framing.Padding="Stoppning" +Filter.AutoFraming.Framing.Offset="Offset" +Filter.AutoFraming.Framing.AspectRatio="Bildförhållande" +Filter.AutoFraming.Provider="Leverantör" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Face Detection, som drivs av NVIDIA® Broadcast" +Filter.Blur="Oskärpa" Filter.Blur.Type="Typ" +Filter.Blur.Subtype="Undertyp" +Filter.Blur.Size="Storlek" +Filter.Blur.Angle="Vinkel (grader)" +Filter.Blur.Center.X="Centrum (X) (procent)" +Filter.Blur.Center.Y="Centrum (Y) (procent)" +Filter.Blur.StepScale="Skalning av steg" +Filter.Blur.StepScale.X="Stegskala X" +Filter.Blur.StepScale.Y="Steg Skala Y" +Filter.Blur.Mask="Applicera en mask" +Filter.Blur.Mask.Type="Typ av mask" +Filter.Blur.Mask.Type.Region="Region" +Filter.Blur.Mask.Type.Image="Bild" Filter.Blur.Mask.Type.Source="Källa" +Filter.Blur.Mask.Region.Left="Vänster kant" +Filter.Blur.Mask.Region.Top="Övre kant" +Filter.Blur.Mask.Region.Right="Höger kant" +Filter.Blur.Mask.Region.Bottom="Nedre kant" +Filter.Blur.Mask.Region.Feather="Fjäderområde" +Filter.Blur.Mask.Region.Feather.Shift="Fjäderskifte" +Filter.Blur.Mask.Region.Invert="Invertera regionen" +Filter.Blur.Mask.Image="Bildmask" +Filter.Blur.Mask.Source="Källmask" +Filter.Blur.Mask.Color="Mask Färgfilter" +Filter.Blur.Mask.Alpha="Mask Alpha Filter" +Filter.Blur.Mask.Multiplier="Maskmultiplikator" +Filter.ColorGrade="Färgklassificering" +Filter.ColorGrade.Lift="Lyft" +Filter.ColorGrade.Lift.Red="Rött lyft" +Filter.ColorGrade.Lift.Green="Gröna hissar" +Filter.ColorGrade.Lift.Blue="Blå lyft" +Filter.ColorGrade.Lift.All="Alla hissar" +Filter.ColorGrade.Gamma="Gamma" +Filter.ColorGrade.Gamma.Red="Röd Gamma" +Filter.ColorGrade.Gamma.Green="Grön Gamma" +Filter.ColorGrade.Gamma.Blue="Blå Gamma" +Filter.ColorGrade.Gamma.All="Alla Gamma" +Filter.ColorGrade.Gain="Förstärkning" +Filter.ColorGrade.Gain.Red="Röd förstärkning" +Filter.ColorGrade.Gain.Green="Grön vinst" +Filter.ColorGrade.Gain.Blue="Blå förstärkning" +Filter.ColorGrade.Gain.All="All Gain" +Filter.ColorGrade.Offset="Offset" +Filter.ColorGrade.Offset.Red="Röd offset" +Filter.ColorGrade.Offset.Green="Grön kompensation" +Filter.ColorGrade.Offset.Blue="Blå offset" +Filter.ColorGrade.Offset.All="All Offset" +Filter.ColorGrade.Tint="Tint" +Filter.ColorGrade.Tint.Detection="Tint Luma-detektionsmetod" +Filter.ColorGrade.Tint.Detection.HSV="Färg Mättnad Värde" +Filter.ColorGrade.Tint.Detection.HSL="Färgton Mättnad Ljusstyrka" +Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Tint Luma Mode" Filter.ColorGrade.Tint.Mode.Linear="Linjär" +Filter.ColorGrade.Tint.Mode.Exp="Exp" +Filter.ColorGrade.Tint.Mode.Exp2="Exp2" +Filter.ColorGrade.Tint.Mode.Log="Logg" +Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Tint Luma Exponent" +Filter.ColorGrade.Tint.Shadow.Red="Skuggor röd toning" +Filter.ColorGrade.Tint.Shadow.Green="Skugga grön nyans" +Filter.ColorGrade.Tint.Shadow.Blue="Skuggblå nyans" +Filter.ColorGrade.Tint.Midtone.Red="Mellanton röd ton" +Filter.ColorGrade.Tint.Midtone.Green="Grön färg i mellanton" +Filter.ColorGrade.Tint.Midtone.Blue="Blå ton i mellanton" +Filter.ColorGrade.Tint.Highlight.Red="Highlight Röd nyans" +Filter.ColorGrade.Tint.Highlight.Green="Highlight Grön nyans" +Filter.ColorGrade.Tint.Highlight.Blue="Highlight Blå toning" +Filter.ColorGrade.Correction="Färgkorrigering" +Filter.ColorGrade.Correction.Hue="Skiftning av färgton" +Filter.ColorGrade.Correction.Saturation="Mättnad" +Filter.ColorGrade.Correction.Lightness="Lätthet" +Filter.ColorGrade.Correction.Contrast="Kontrast" +Filter.ColorGrade.RenderMode="Renderläge" +Filter.ColorGrade.RenderMode.Direct="Direkt rendering" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-bitars uppslagstabell" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-bitars uppslagstabell" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-bitars uppslagstabell" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-bitars uppslagstabell" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-bitars uppslagstabell" +Filter.Denoising="Avfärgning" +Filter.Denoising.Provider="Leverantör" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Denoising, som drivs av NVIDIA® Broadcast" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Avlusning" +Filter.Denoising.NVIDIA.Denoising.Strength="Styrka" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Svag" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Stark" +Filter.Displacement="Kartläggning av förskjutningar" +Filter.Displacement.Deprecated="Det här filtret är föråldrat och har tagits bort. Användare uppmanas att omedelbart övergå till filtret \"Shader\" med exemplet \"displace.effect\"." Filter.Displacement.File="Fil" +Filter.Displacement.Scale="Skala" +Filter.Displacement.Scale.Type="Typ av skalning" +Filter.DynamicMask="Dynamisk mask" +Filter.DynamicMask.Input="Ingångskälla" +Filter.DynamicMask.Channel="%s Kanal" +Filter.DynamicMask.Channel.Value="Basvärde" +Filter.DynamicMask.Channel.Multiplier="Multiplikator" +Filter.DynamicMask.Channel.Input="%s Ingångsvärde" +Filter.SDFEffects="SDF-effekter" +Filter.SDFEffects.Shadow.Inner="Inre skugga" +Filter.SDFEffects.Shadow.Inner.Range.Minimum="Inre skugga Minsta avstånd" +Filter.SDFEffects.Shadow.Inner.Range.Maximum="Inre skugga Maximalt avstånd" +Filter.SDFEffects.Shadow.Inner.Offset.X="Förskjutning av den inre skuggan X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="Förskjutning av den inre skuggan Y" +Filter.SDFEffects.Shadow.Inner.Color="Färg för inre skugga" +Filter.SDFEffects.Shadow.Inner.Alpha="Inner Shadow Alpha" +Filter.SDFEffects.Shadow.Outer="Yttre skugga" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Yttre skugga Minsta avstånd" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Yttre skugga Maximalt avstånd" +Filter.SDFEffects.Shadow.Outer.Offset.X="Förskjutning av den yttre skuggan X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Förskjutning av den yttre skuggan Y" +Filter.SDFEffects.Shadow.Outer.Color="Färg på den yttre skuggan" +Filter.SDFEffects.Shadow.Outer.Alpha="Outer Shadow Alpha" +Filter.SDFEffects.Glow.Outer="Yttre glöd" +Filter.SDFEffects.Glow.Outer.Color="Yttre glödfärg" +Filter.SDFEffects.Glow.Outer.Alpha="Yttre glöd Alpha" +Filter.SDFEffects.Glow.Outer.Width="Bredd för yttre glöd" +Filter.SDFEffects.Glow.Outer.Sharpness="Yttre glöd Skärpa" +Filter.SDFEffects.Glow.Inner="Inre glöd" +Filter.SDFEffects.Glow.Inner.Color="Inre glödfärg" +Filter.SDFEffects.Glow.Inner.Alpha="Inner Glow Alpha" +Filter.SDFEffects.Glow.Inner.Width="Inner Glow bredd" +Filter.SDFEffects.Glow.Inner.Sharpness="Inre glöd Skärpa" +Filter.SDFEffects.Outline="Översikt" +Filter.SDFEffects.Outline.Color="Färg på konturerna" +Filter.SDFEffects.Outline.Alpha="Översikt Alpha" +Filter.SDFEffects.Outline.Width="Konturens bredd" +Filter.SDFEffects.Outline.Offset="Konturförskjutning" +Filter.SDFEffects.Outline.Sharpness="Skärpa av konturerna" +Filter.SDFEffects.SDF.Scale="SDF texturskala" +Filter.SDFEffects.SDF.Threshold="SDF Alpha Tröskelvärde" +Filter.Transform="3D-förvandling" +Filter.Transform.Camera="Kamera" +Filter.Transform.Camera.Mode="Läge" +Filter.Transform.Camera.Mode.CornerPin="Hörnpinne" +Filter.Transform.Camera.Mode.Orthographic="Ortografisk" +Filter.Transform.Camera.Mode.Perspective="Perspektiv" +Filter.Transform.Camera.FieldOfView="Synfält" +Filter.Transform.Position="Position" +Filter.Transform.Position.X="X" +Filter.Transform.Position.Y="Y" +Filter.Transform.Position.Z="Z" +Filter.Transform.Scale="Skala" +Filter.Transform.Scale.X="X" +Filter.Transform.Scale.Y="Y" +Filter.Transform.Shear="Skärning" +Filter.Transform.Shear.X="X" +Filter.Transform.Shear.Y="Y" +Filter.Transform.Rotation="Rotation" +Filter.Transform.Rotation.X="Höjd (X)" +Filter.Transform.Rotation.Y="Girad (Y)" +Filter.Transform.Rotation.Z="Rullning (Z)" +Filter.Transform.Rotation.Order="Rotationsordning" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" +Filter.Transform.Rotation.Order.ZXY="Rullning, lutning, gir" +Filter.Transform.Rotation.Order.ZYX="Rullning, gir, stigning" +Filter.Transform.Corners="Hörn" +Filter.Transform.Corners.TopLeft="Överst till vänster" +Filter.Transform.Corners.TopRight="Överst till höger" +Filter.Transform.Corners.BottomLeft="Längst ner till vänster" +Filter.Transform.Corners.BottomRight="Längst ner till höger" +Filter.Transform.Mipmapping="Aktivera Mipmapping" +Filter.Upscaling="Uppskalning" +Filter.Upscaling.Provider="Leverantör" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, drivs av NVIDIA® Broadcast" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® superupplösning" +Filter.Upscaling.NVIDIA.SuperRes.Scale="Skala" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Styrka" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Svag" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Stark" +Filter.VirtualGreenscreen="Virtuell grönskärm" +Filter.VirtualGreenscreen.Provider="Leverantör" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, drivs av NVIDIA® Broadcast" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® grönskärm" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Läge" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Prestanda" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kvalitet" +Source.Mirror="Källa Mirror" Source.Mirror.Source="Källa" +Source.Mirror.Source.Audio="Aktivera ljud" +Source.Mirror.Source.Audio.Layout="Ljudlayout" +Source.Mirror.Source.Audio.Layout.Unknown="Okänd" +Source.Mirror.Source.Audio.Layout.Mono="Mono" +Source.Mirror.Source.Audio.Layout.Stereo="Stereo" +Source.Mirror.Source.Audio.Layout.StereoLFE="Stereo med LFE" +Source.Mirror.Source.Audio.Layout.Quadraphonic="Kvadrafonisk" +Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Quadrafonisk med LFE" +Source.Mirror.Source.Audio.Layout.Surround="Surround" +Source.Mirror.Source.Audio.Layout.FullSurround="Fullständig surround" +Codec.AV1="AV1" +Codec.AV1.Profile="Profil" +Codec.AV1.Profile.Main="Huvudsidan" +Codec.AV1.Profile.High="Hög" +Codec.AV1.Profile.Professional="Professionell" +Codec.H264="H264" +Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Baslinje" +Codec.H264.Profile.main="Huvudsidan" +Codec.H264.Profile.high="Hög" +Codec.H264.Profile.high444p="Hög 4:4:4:4 Förutsägande" +Codec.H264.Level="Nivå" +Codec.HEVC="HEVC" +Codec.HEVC.Profile="Profil" +Codec.HEVC.Profile.main="Huvudsidan" +Codec.HEVC.Profile.main10="Huvud 10-bitars" +Codec.HEVC.Profile.rext="Utökad räckvidd" +Codec.HEVC.Tier="Nivå" +Codec.HEVC.Tier.main="Huvudsidan" +Codec.HEVC.Tier.high="Hög" +Codec.HEVC.Level="Nivå" +Codec.ProRes.Profile="Profil" +Codec.ProRes.Profile.APCO="422 Fullmakt (APCO)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standard (APCN)" +Codec.ProRes.Profile.APCH="422 Hög kvalitet/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 Hög kvalitet/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" +Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4:4)" diff --git a/data/locale/tr-TR.ini b/data/locale/tr-TR.ini index 3a6834ce9e..c0b7c3368b 100644 --- a/data/locale/tr-TR.ini +++ b/data/locale/tr-TR.ini @@ -52,14 +52,17 @@ UI.Updater.Menu.CheckForUpdates="Güncellemeleri Denetle" UI.Updater.Menu.CheckForUpdates.Automatically="Güncellemeleri Otomatik Denetle" UI.Updater.Menu.Channel="Güncelleme Kanalı" UI.Updater.Menu.Channel.Stable="Stabil" +UI.Updater.Menu.Channel.Candidate="Aday" UI.Updater.Menu.Channel.Beta="Beta" UI.Updater.Menu.Channel.Alpha="Alfa" Encoder.AOM.AV1="AOM AV1 (direkt)" +Encoder.AOM.AV1.Deprecated="Bu kodlayıcı kullanımdan kaldırılmıştır ve yakında kaldırılacaktır. Kullanıcıların mümkün olan en kısa sürede entegre 'SVT-AV1' veya 'AOM AV1' kodlayıcıya geçmeleri tavsiye edilir." Encoder.AOM.AV1.Encoder="Kodlayıcı" Encoder.AOM.AV1.Encoder.Usage="Kullanım" Encoder.AOM.AV1.Encoder.Usage.GoodQuality="İyi Kalite" Encoder.AOM.AV1.Encoder.Usage.RealTime="Eş Zamanlı" +Encoder.AOM.AV1.Encoder.Usage.AllIntra="Tüm Çerçeve İçi" Encoder.AOM.AV1.Encoder.CPUUsage="CPU Kullanımı" Encoder.AOM.AV1.Encoder.CPUUsage.0="Plasebo" Encoder.AOM.AV1.Encoder.CPUUsage.1="Çok Yavaş" @@ -73,26 +76,43 @@ Encoder.AOM.AV1.Encoder.CPUUsage.8="Süper Hızlı" Encoder.AOM.AV1.Encoder.CPUUsage.9="Ultra Hızlı" Encoder.AOM.AV1.Encoder.CPUUsage.10="İnanılmaz Hızlı" Encoder.AOM.AV1.Encoder.Profile="Profil" +Encoder.AOM.AV1.KeyFrames="Anahtar Çerçeve" Encoder.AOM.AV1.KeyFrames.IntervalType="Zaman Aralığı Tipi" Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="Kare" Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="Saniye" Encoder.AOM.AV1.KeyFrames.Interval="Zaman Aralığı" +Encoder.AOM.AV1.RateControl="Oran Kontrolü" Encoder.AOM.AV1.RateControl.Mode="Mod" Encoder.AOM.AV1.RateControl.Mode.CBR="Sabit Bit Hızı (CBR)" Encoder.AOM.AV1.RateControl.Mode.VBR="Değişken Bit Hızı (VBR)" Encoder.AOM.AV1.RateControl.Mode.CQ="Kısıtlı Kalite (KK)" Encoder.AOM.AV1.RateControl.Mode.Q="Sabit Kalite (K)" +Encoder.AOM.AV1.RateControl.LookAhead="İleriye Bak" Encoder.AOM.AV1.RateControl.Limits="Sınırlar" Encoder.AOM.AV1.RateControl.Limits.Bitrate="Bit Hızı" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Undershoot="Bit Hızı Aşımı" +Encoder.AOM.AV1.RateControl.Limits.Bitrate.Overshoot="Bit Hızı Aşımı" Encoder.AOM.AV1.RateControl.Limits.Quality="Kaliteli" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Minimum="Minimum Quantizer" +Encoder.AOM.AV1.RateControl.Limits.Quantizer.Maximum="Maksimum Quantizer" Encoder.AOM.AV1.RateControl.Buffer="Arabellek" Encoder.AOM.AV1.RateControl.Buffer.Size="Boyut" Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Başlangıç Boyutu" Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="İdeal Boyut" Encoder.AOM.AV1.Advanced="Gelişmiş" Encoder.AOM.AV1.Advanced.Threads="Konular" +Encoder.AOM.AV1.Advanced.RowMultiThreading="Satır Başına Çoklu İş Parçacığı" +Encoder.AOM.AV1.Advanced.Tile.Columns="Karo Kolonlar" +Encoder.AOM.AV1.Advanced.Tile.Rows="Karo Sıraları" +Encoder.AOM.AV1.Advanced.Tune="Tune" +Encoder.AOM.AV1.Advanced.Tune.Metric="Metrik" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" Encoder.AOM.AV1.Advanced.Tune.Metric.SSIM="SSIM" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithPreprocessing="VMAF (ön işleme ile)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.WithoutPreprocessing="VMAF (ön işleme olmadan)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.MaxGain="VMAF (NegMaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.VMAF.NegMaxGain="VMAF (MaxGain)" +Encoder.AOM.AV1.Advanced.Tune.Metric.Butteraugli="Butteraugli" Encoder.AOM.AV1.Advanced.Tune.Content="İçerik" Encoder.AOM.AV1.Advanced.Tune.Content.Screen="Ekran" Encoder.AOM.AV1.Advanced.Tune.Content.Film="Film" @@ -108,46 +128,99 @@ Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Kare" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Saniye" Encoder.FFmpeg.KeyFrames.Interval="Zaman Aralığı" +Encoder.FFmpeg.AMF.Deprecated="Bu kodlayıcı kullanımdan kaldırılmıştır ve yakında kaldırılacaktır. Kullanıcıların mümkün olan en kısa sürede entegre 'AMD HW H.264 (AVC)' veya 'AMD HW H.265 (HEVC)' kodlayıcıya geçmeleri tavsiye edilir." Encoder.FFmpeg.AMF.Preset="Hazır Ayar" Encoder.FFmpeg.AMF.Preset.Speed="Hız" Encoder.FFmpeg.AMF.Preset.Balanced="Dengeli" Encoder.FFmpeg.AMF.Preset.Quality="Kaliteli" Encoder.FFmpeg.AMF.RateControl="Oran Kontrol Seçenekleri" Encoder.FFmpeg.AMF.RateControl.Mode="Mod" +Encoder.FFmpeg.AMF.RateControl.Mode.CQP="Sabit Kuantizasyon Parametresi" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_PEAK="Değişken Bit Hızı (Peak Kısıtlı)" +Encoder.FFmpeg.AMF.RateControl.Mode.VBR_LATENCY="Değişken Bit Hızı (Gecikme Kısıtlı)" Encoder.FFmpeg.AMF.RateControl.Mode.CBR="Sabit Bit Hızı (CBR)" +Encoder.FFmpeg.AMF.RateControl.LookAhead="İleriye Bakın" +Encoder.FFmpeg.AMF.RateControl.FrameSkipping="Çerçeve Atlama" Encoder.FFmpeg.AMF.RateControl.Limits="Sınırlar" Encoder.FFmpeg.AMF.RateControl.Limits.BufferSize="Ara Bellek Boyutu" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Target="Hedef Bit Hızı" Encoder.FFmpeg.AMF.RateControl.Limits.Bitrate.Maximum="Maksimum Bit Hızı" +Encoder.FFmpeg.AMF.RateControl.QP="Kuantizasyon Parametreleri" Encoder.FFmpeg.AMF.RateControl.QP.I="I-Karesi QP" Encoder.FFmpeg.AMF.RateControl.QP.P="P-Karesi QP" Encoder.FFmpeg.AMF.RateControl.QP.B="B-Karesi QP" Encoder.FFmpeg.AMF.Other="Diğer Ayarlar" Encoder.FFmpeg.AMF.Other.BFrames="Maksimum B-Kareler" +Encoder.FFmpeg.AMF.Other.BFrameReferences="B Çerçeve Referansları" Encoder.FFmpeg.AMF.Other.ReferenceFrames="Referans Kareler" +Encoder.FFmpeg.AMF.Other.EnforceHRD="İKG'yi uygulayın" +Encoder.FFmpeg.AMF.Other.VBAQ="VBAQ" +Encoder.FFmpeg.AMF.Other.AccessUnitDelimiter="Erişim Birimi Sınırlayıcısı" Encoder.FFmpeg.NVENC.Preset="Hazır Ayar" Encoder.FFmpeg.NVENC.Preset.default="Varsayılan" Encoder.FFmpeg.NVENC.Preset.slow="Yavaş" Encoder.FFmpeg.NVENC.Preset.medium="Orta" Encoder.FFmpeg.NVENC.Preset.fast="Hızlı" +Encoder.FFmpeg.NVENC.Preset.hp="Yüksek Performans" +Encoder.FFmpeg.NVENC.Preset.hq="Yüksek Kalite" +Encoder.FFmpeg.NVENC.Preset.bd="BluRay Disk" Encoder.FFmpeg.NVENC.Preset.ll="Düşük Gecikme" Encoder.FFmpeg.NVENC.Preset.llhq="Düşük Gecikme Yüksek Kalite" Encoder.FFmpeg.NVENC.Preset.llhp="Düşük Gecikme Yüksek Performans" +Encoder.FFmpeg.NVENC.Preset.lossless="Kayıpsız" +Encoder.FFmpeg.NVENC.Preset.losslesshp="Kayıpsız Yüksek Performans" +Encoder.FFmpeg.NVENC.Preset.p1="En Hızlı (P1)" +Encoder.FFmpeg.NVENC.Preset.p2="Daha Hızlı (P2)" +Encoder.FFmpeg.NVENC.Preset.p3="Hızlı (P3)" +Encoder.FFmpeg.NVENC.Preset.p4="Orta (P4)" +Encoder.FFmpeg.NVENC.Preset.p5="Yavaş (P5)" +Encoder.FFmpeg.NVENC.Preset.p6="Daha Yavaş (P6)" +Encoder.FFmpeg.NVENC.Preset.p7="En Yavaş (P7)" +Encoder.FFmpeg.NVENC.Tune="Tune" +Encoder.FFmpeg.NVENC.Tune.hq="Yüksek Kalite" Encoder.FFmpeg.NVENC.Tune.ll="Düşük Gecikme" +Encoder.FFmpeg.NVENC.Tune.ull="Ultra Düşük Gecikme" +Encoder.FFmpeg.NVENC.Tune.lossless="Kayıpsız" Encoder.FFmpeg.NVENC.RateControl="Oran Kontrol Seçenekleri" Encoder.FFmpeg.NVENC.RateControl.Mode="Mod" +Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Sabit Kuantizasyon Parametresi" +Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Değişken Bit Hızı" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="Sabit Bit Hızı (CBR)" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="İki Geçiş" +Encoder.FFmpeg.NVENC.RateControl.MultiPass="Çoklu Geçiş" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="Tek Geçiş" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="Çeyrek Çözünürlükte İki Geçiş" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="Tam Çözünürlükte İki Geçiş" +Encoder.FFmpeg.NVENC.RateControl.LookAhead="İleriye Bakın" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="Uyarlanabilir I Çerçeveleri" +Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="Uyarlanabilir B Çerçeveleri" Encoder.FFmpeg.NVENC.RateControl.Limits="Sınırlar" Encoder.FFmpeg.NVENC.RateControl.Limits.BufferSize="Ara Bellek Boyutu" +Encoder.FFmpeg.NVENC.RateControl.Limits.Quality="Hedef Kalite" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Target="Hedef Bit Hızı" Encoder.FFmpeg.NVENC.RateControl.Limits.Bitrate.Maximum="Maksimum Bit Hızı" +Encoder.FFmpeg.NVENC.RateControl.QP="Kuantizasyon Parametreleri" +Encoder.FFmpeg.NVENC.RateControl.QP.Minimum="Minimum QP" +Encoder.FFmpeg.NVENC.RateControl.QP.Maximum="Maksimum QP" Encoder.FFmpeg.NVENC.RateControl.QP.I="I-Karesi QP" Encoder.FFmpeg.NVENC.RateControl.QP.P="P-Karesi QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-Karesi QP" +Encoder.FFmpeg.NVENC.AQ="Uyarlanabilir Kuantizasyon" +Encoder.FFmpeg.NVENC.AQ.Spatial="Uzamsal Uyarlanabilir Niceleme" +Encoder.FFmpeg.NVENC.AQ.Strength="Uzamsal Uyarlanabilir Niceleme Gücü" +Encoder.FFmpeg.NVENC.AQ.Temporal="Zamansal Uyarlanabilir Niceleme" Encoder.FFmpeg.NVENC.Other="Diğer Ayarlar" Encoder.FFmpeg.NVENC.Other.BFrames="Maksimum B-Kareler" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode="B Çerçevesi Referans Modu" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.disabled="Referans olarak B-Frame kullanılmayacaktır" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.middle="Referans olarak yalnızca B-Frame/2 kullanılacaktır" +Encoder.FFmpeg.NVENC.Other.BFrameReferenceMode.each="Her B Çerçevesi Referans olarak kullanılacaktır" +Encoder.FFmpeg.NVENC.Other.ZeroLatency="Sıfır Gecikme" +Encoder.FFmpeg.NVENC.Other.WeightedPrediction="Ağırlıklı Tahmin" +Encoder.FFmpeg.NVENC.Other.NonReferencePFrames="Referans Olmayan P Çerçeveleri" Encoder.FFmpeg.NVENC.Other.ReferenceFrames="Referans Kareler" +Encoder.FFmpeg.NVENC.Other.LowDelayKeyFrameScale="Düşük Gecikmeli Anahtar Çerçeve Ölçeği" Blur.Type.Box="Kutu" Blur.Type.BoxLinear="Doğrusal Kutu" @@ -178,7 +251,22 @@ Filter.Shader="Gölge" Source.Shader="Gölge" Transition.Shader="Gölge" +Filter.AutoFraming="Otomatik Çerçeveleme" +Filter.AutoFraming.Tracking="İzleme Seçenekleri" Filter.AutoFraming.Tracking.Mode="Mod" +Filter.AutoFraming.Tracking.Mode.Solo="Solo" +Filter.AutoFraming.Tracking.Mode.Group="Grup" +Filter.AutoFraming.Tracking.Frequency="Frekans" +Filter.AutoFraming.Motion="Hareket Seçenekleri" +Filter.AutoFraming.Motion.Smoothing="Pürüzsüzleştirme" +Filter.AutoFraming.Motion.Prediction="Tahmin" +Filter.AutoFraming.Framing="Çerçeveleme Seçenekleri" +Filter.AutoFraming.Framing.Stability="İstikrar" +Filter.AutoFraming.Framing.Padding="Dolgu" +Filter.AutoFraming.Framing.Offset="Ofset" +Filter.AutoFraming.Framing.AspectRatio="En Boy Oranı" +Filter.AutoFraming.Provider="Sağlayıcı" +Filter.AutoFraming.Provider.NVIDIA.FaceDetection="NVIDIA® Broadcast tarafından desteklenen NVIDIA® Yüz Algılama" Filter.Blur="Bulanıklaştırma" Filter.Blur.Type="Tür" @@ -187,6 +275,9 @@ Filter.Blur.Size="Boyut" Filter.Blur.Angle="Açı (Derece)" Filter.Blur.Center.X="Merkez (X) (Yüzde)" Filter.Blur.Center.Y="Merkez (Y) (Yüzde)" +Filter.Blur.StepScale="Adım Ölçekleme" +Filter.Blur.StepScale.X="Adım Ölçeği X" +Filter.Blur.StepScale.Y="Adım Ölçeği Y" Filter.Blur.Mask="Maske Uygula" Filter.Blur.Mask.Type="Maske Türü" Filter.Blur.Mask.Type.Region="Bölge" @@ -196,35 +287,86 @@ Filter.Blur.Mask.Region.Left="Sol Kenar" Filter.Blur.Mask.Region.Top="Üst Kenar" Filter.Blur.Mask.Region.Right="Sağ Kenar" Filter.Blur.Mask.Region.Bottom="Alt Kenar" +Filter.Blur.Mask.Region.Feather="Tüy Alanı" +Filter.Blur.Mask.Region.Feather.Shift="Tüy Vardiyası" +Filter.Blur.Mask.Region.Invert="Ters Bölge" Filter.Blur.Mask.Image="Görüntü Maskesi" Filter.Blur.Mask.Source="Maske Kaynağı" Filter.Blur.Mask.Color="Maske Renk Filtresi" +Filter.Blur.Mask.Alpha="Maske Alfa Filtresi" +Filter.Blur.Mask.Multiplier="Maske Çarpanı" +Filter.ColorGrade="Renk Derecelendirmesi" +Filter.ColorGrade.Lift="Asansör" +Filter.ColorGrade.Lift.Red="Kırmızı Asansör" +Filter.ColorGrade.Lift.Green="Yeşil Asansör" +Filter.ColorGrade.Lift.Blue="Mavi Asansör" +Filter.ColorGrade.Lift.All="Tüm Asansörler" Filter.ColorGrade.Gamma="Gama" Filter.ColorGrade.Gamma.Red="Kırmızı Gama" Filter.ColorGrade.Gamma.Green="Yeşil Gama" Filter.ColorGrade.Gamma.Blue="Mavi Gama" Filter.ColorGrade.Gamma.All="Tüm Gama" +Filter.ColorGrade.Gain="Kazanç" +Filter.ColorGrade.Gain.Red="Kırmızı Kazanç" +Filter.ColorGrade.Gain.Green="Yeşil Kazanç" +Filter.ColorGrade.Gain.Blue="Mavi Kazanç" +Filter.ColorGrade.Gain.All="Tüm Kazançlar" +Filter.ColorGrade.Offset="Ofset" +Filter.ColorGrade.Offset.Red="Kırmızı Ofset" +Filter.ColorGrade.Offset.Green="Yeşil Ofset" +Filter.ColorGrade.Offset.Blue="Mavi Ofset" +Filter.ColorGrade.Offset.All="Tüm Ofset" Filter.ColorGrade.Tint="Renk Tonu" +Filter.ColorGrade.Tint.Detection="Renk Tonu Luma Algılama Yöntemi" Filter.ColorGrade.Tint.Detection.HSV="Renk Tonu Doygunluk Değeri" Filter.ColorGrade.Tint.Detection.HSL="Renk Tonu Parlaklığı" Filter.ColorGrade.Tint.Detection.YUV.SDR="Luma Chroma (BT.709 SDR)" +Filter.ColorGrade.Tint.Mode="Renk Tonu Luma Modu" Filter.ColorGrade.Tint.Mode.Linear="Doğrusal" Filter.ColorGrade.Tint.Mode.Exp="Exp" Filter.ColorGrade.Tint.Mode.Exp2="Exp2" Filter.ColorGrade.Tint.Mode.Log="Log" Filter.ColorGrade.Tint.Mode.Log10="Log10" +Filter.ColorGrade.Tint.Exponent="Renk Tonu Luma Üsteli" +Filter.ColorGrade.Tint.Shadow.Red="Gölge Kırmızı Renk Tonu" +Filter.ColorGrade.Tint.Shadow.Green="Gölge Yeşil Renk Tonu" +Filter.ColorGrade.Tint.Shadow.Blue="Gölge Mavi Renk Tonu" +Filter.ColorGrade.Tint.Midtone.Red="Orta Ton Kırmızı Renk Tonu" +Filter.ColorGrade.Tint.Midtone.Green="Orta Ton Yeşil Renk Tonu" +Filter.ColorGrade.Tint.Midtone.Blue="Orta Ton Mavi Renk Tonu" +Filter.ColorGrade.Tint.Highlight.Red="Kırmızı Tonu Vurgula" +Filter.ColorGrade.Tint.Highlight.Green="Yeşil Tonu Vurgula" +Filter.ColorGrade.Tint.Highlight.Blue="Mavi Renk Tonu Vurgula" +Filter.ColorGrade.Correction="Renk Düzeltme" Filter.ColorGrade.Correction.Hue="Ton Kayması" Filter.ColorGrade.Correction.Saturation="Doygunluk" Filter.ColorGrade.Correction.Lightness="Işıklandırma" Filter.ColorGrade.Correction.Contrast="Kontrast" +Filter.ColorGrade.RenderMode="İşleme Modu" +Filter.ColorGrade.RenderMode.Direct="Doğrudan Rendering" +Filter.ColorGrade.RenderMode.LUT.2Bit="2-Bit Look-Up Tablosu" +Filter.ColorGrade.RenderMode.LUT.4Bit="4-Bit Look-Up Tablosu" +Filter.ColorGrade.RenderMode.LUT.6Bit="6-Bit Look-Up Tablosu" +Filter.ColorGrade.RenderMode.LUT.8Bit="8-Bit Look-Up Tablosu" +Filter.ColorGrade.RenderMode.LUT.10Bit="10-Bit Look-Up Tablosu" +Filter.Denoising="Denoising" +Filter.Denoising.Provider="Sağlayıcı" +Filter.Denoising.Provider.NVIDIA.Denoising="NVIDIA® Broadcast tarafından desteklenen NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising="NVIDIA® Denoising" +Filter.Denoising.NVIDIA.Denoising.Strength="Güç" +Filter.Denoising.NVIDIA.Denoising.Strength.Weak="Zayıf" +Filter.Denoising.NVIDIA.Denoising.Strength.Strong="Güçlü" +Filter.Displacement="Deplasman Haritalama" +Filter.Displacement.Deprecated="Bu filtre kullanımdan kaldırılmıştır. Kullanıcıların derhal 'displace.effect' örneği ile 'Shader' filtresine geçmeleri tavsiye edilir." Filter.Displacement.File="Dosya" Filter.Displacement.Scale="Ölçek" Filter.Displacement.Scale.Type="Ölçekleme Türü" Filter.DynamicMask="Dinamik Maske" +Filter.DynamicMask.Input="Giriş Kaynağı" Filter.DynamicMask.Channel="%s Kanalı" Filter.DynamicMask.Channel.Value="Temel Değer" Filter.DynamicMask.Channel.Multiplier="Çarpan" @@ -234,10 +376,42 @@ Filter.SDFEffects="SDF Efektleri" Filter.SDFEffects.Shadow.Inner="İç Gölge" Filter.SDFEffects.Shadow.Inner.Range.Minimum="İç Gölge Minimum Mesafe" Filter.SDFEffects.Shadow.Inner.Range.Maximum="İç Gölge Maksimum Mesafe" +Filter.SDFEffects.Shadow.Inner.Offset.X="İç Gölge Ofseti X" +Filter.SDFEffects.Shadow.Inner.Offset.Y="İç Gölge Ofseti Y" +Filter.SDFEffects.Shadow.Inner.Color="İç Gölge Rengi" +Filter.SDFEffects.Shadow.Inner.Alpha="İç Gölge Alfa" +Filter.SDFEffects.Shadow.Outer="Dış Gölge" +Filter.SDFEffects.Shadow.Outer.Range.Minimum="Dış Gölge Minimum Mesafe" +Filter.SDFEffects.Shadow.Outer.Range.Maximum="Dış Gölge Maksimum Mesafe" +Filter.SDFEffects.Shadow.Outer.Offset.X="Dış Gölge Ofseti X" +Filter.SDFEffects.Shadow.Outer.Offset.Y="Dış Gölge Ofseti Y" +Filter.SDFEffects.Shadow.Outer.Color="Dış Gölge Rengi" +Filter.SDFEffects.Shadow.Outer.Alpha="Dış Gölge Alfa" +Filter.SDFEffects.Glow.Outer="Dış Parıltı" +Filter.SDFEffects.Glow.Outer.Color="Dış Parıltı Rengi" +Filter.SDFEffects.Glow.Outer.Alpha="Dış Parıltı Alfa" +Filter.SDFEffects.Glow.Outer.Width="Dış Kızdırma Genişliği" +Filter.SDFEffects.Glow.Outer.Sharpness="Dış Parıltı Keskinliği" +Filter.SDFEffects.Glow.Inner="İçsel Parıltı" +Filter.SDFEffects.Glow.Inner.Color="İç Parıltı Rengi" +Filter.SDFEffects.Glow.Inner.Alpha="İçsel Parıltı Alfa" +Filter.SDFEffects.Glow.Inner.Width="İç Kızdırma Genişliği" +Filter.SDFEffects.Glow.Inner.Sharpness="İç Parıltı Keskinliği" +Filter.SDFEffects.Outline="Anahatlar" +Filter.SDFEffects.Outline.Color="Anahat Rengi" +Filter.SDFEffects.Outline.Alpha="Anahat Alfa" +Filter.SDFEffects.Outline.Width="Anahat Genişliği" +Filter.SDFEffects.Outline.Offset="Anahat Ofseti" +Filter.SDFEffects.Outline.Sharpness="Anahat Keskinliği" +Filter.SDFEffects.SDF.Scale="SDF Doku Ölçeği" +Filter.SDFEffects.SDF.Threshold="SDF Alfa Eşiği" Filter.Transform="3D Dönüşüm" Filter.Transform.Camera="Kamera" Filter.Transform.Camera.Mode="Mod" +Filter.Transform.Camera.Mode.CornerPin="Köşe Pimi" +Filter.Transform.Camera.Mode.Orthographic="Ortografik" +Filter.Transform.Camera.Mode.Perspective="Perspektif" Filter.Transform.Camera.FieldOfView="Görüş Alanı" Filter.Transform.Position="Turkish: Pozisyon" Filter.Transform.Position.X="X" @@ -250,15 +424,44 @@ Filter.Transform.Shear="Kırpma" Filter.Transform.Shear.X="X" Filter.Transform.Shear.Y="Y" Filter.Transform.Rotation="Döndürme" +Filter.Transform.Rotation.X="Aralık (X)" +Filter.Transform.Rotation.Y="Yaw (Y)" +Filter.Transform.Rotation.Z="Yuvarlanma (Z)" Filter.Transform.Rotation.Order="Rotasyon Sırası" +Filter.Transform.Rotation.Order.XYZ="Pitch, Yaw, Roll" +Filter.Transform.Rotation.Order.XZY="Pitch, Roll, Yaw" +Filter.Transform.Rotation.Order.YXZ="Yaw, Pitch, Roll" +Filter.Transform.Rotation.Order.YZX="Yaw, Roll, Pitch" +Filter.Transform.Rotation.Order.ZXY="Yuvarlanma, Eğim, Sapma" +Filter.Transform.Rotation.Order.ZYX="Yuvarlanma, Yalpalama, Eğim" +Filter.Transform.Corners="Köşeler" +Filter.Transform.Corners.TopLeft="Sol Üst" +Filter.Transform.Corners.TopRight="Üst Sağ" +Filter.Transform.Corners.BottomLeft="Sol Alt" +Filter.Transform.Corners.BottomRight="Sağ Alt" +Filter.Transform.Mipmapping="Mipmapping'i Etkinleştir" +Filter.Upscaling="Yükseltme" +Filter.Upscaling.Provider="Sağlayıcı" +Filter.Upscaling.Provider.NVIDIA.SuperResolution="NVIDIA® Super Resolution, NVIDIA® Broadcast tarafından desteklenmektedir" +Filter.Upscaling.NVIDIA.SuperRes="NVIDIA® Süper Çözünürlük" Filter.Upscaling.NVIDIA.SuperRes.Scale="Ölçek" +Filter.Upscaling.NVIDIA.SuperRes.Strength="Güç" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Weak="Zayıf" +Filter.Upscaling.NVIDIA.SuperRes.Strength.Strong="Güçlü" +Filter.VirtualGreenscreen="Sanal Yeşil Ekran" +Filter.VirtualGreenscreen.Provider="Sağlayıcı" +Filter.VirtualGreenscreen.Provider.NVIDIA.Greenscreen="NVIDIA® Greenscreen, NVIDIA® Broadcast tarafından desteklenmektedir" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen="NVIDIA® Greenscreen" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="Mod" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Performance="Performans" Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode.Quality="Kaliteli" +Source.Mirror="Kaynak Ayna" Source.Mirror.Source="Kaynak" Source.Mirror.Source.Audio="Sesi Etkinleştir" +Source.Mirror.Source.Audio.Layout="Ses Düzeni" Source.Mirror.Source.Audio.Layout.Unknown="Bilinmiyor" Source.Mirror.Source.Audio.Layout.Mono="Tek Hoparlör" Source.Mirror.Source.Audio.Layout.Stereo="Çift Hoparlör" @@ -268,19 +471,25 @@ Source.Mirror.Source.Audio.Layout.QuadraphonicLFE="Düşük Frekanslı 4 Hoparl Source.Mirror.Source.Audio.Layout.Surround="Surround Hoparlör" Source.Mirror.Source.Audio.Layout.FullSurround="Tam Surround Hoparlör" +Codec.AV1="AV1" Codec.AV1.Profile="Profil" Codec.AV1.Profile.Main="Standart" Codec.AV1.Profile.High="Yüksek" +Codec.AV1.Profile.Professional="Profesyonel" Codec.H264="H264" Codec.H264.Profile="Profil" +Codec.H264.Profile.baseline="Başlangıç Noktası" Codec.H264.Profile.main="Standart" Codec.H264.Profile.high="Yüksek" +Codec.H264.Profile.high444p="Yüksek 4:4:4 Öngörülü" Codec.H264.Level="Düzey" Codec.HEVC="HEVC" Codec.HEVC.Profile="Profil" Codec.HEVC.Profile.main="Standart" +Codec.HEVC.Profile.main10="Ana 10 bit" +Codec.HEVC.Profile.rext="Menzil Genişletildi" Codec.HEVC.Tier="Kademe" Codec.HEVC.Tier.main="Standart" Codec.HEVC.Tier.high="Yüksek" @@ -295,4 +504,10 @@ Codec.ProRes.Profile.AP4H="4444 Yüksek Kalite/HQ (AP4H)" Codec.ProRes.Profile.AP4X="4444 Ekstrem Kalite/XQ (AP4X)" Codec.DNxHR.Profile="Profil" +Codec.DNxHR.Profile.dnxhd="DNxHD" +Codec.DNxHR.Profile.dnxhr_lb="DNxHR LB (4:2:2)" +Codec.DNxHR.Profile.dnxhr_sq="DNxHR SQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hq="DNxHR HQ (4:2:2)" +Codec.DNxHR.Profile.dnxhr_hqx="DNxHR HQX (4:2:2)" +Codec.DNxHR.Profile.dnxhr_444="DNxHR 444 (4:4:4)" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index cf0ec4293a..ab998baceb 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -360,6 +360,7 @@ Filter.Denoising.NVIDIA.Denoising.Strength.Weak="弱" Filter.Denoising.NVIDIA.Denoising.Strength.Strong="强" Filter.Displacement="位移贴图" +Filter.Displacement.Deprecated="这个过滤器已经被废弃,并且已经被删除。我们敦促用户立即迁移到使用 \"displace.effect \"例子的 \"Shader \"过滤器。" Filter.Displacement.File="文件" Filter.Displacement.Scale="缩放" Filter.Displacement.Scale.Type="刻度类型" From a66b46965e4baf5a41995d33cf88b81352e0e6b6 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 108/164] cmake: Add media files to IDE projects These files should be ignored as they have the HEADER_FILE_ONLY flag set. --- CMakeLists.txt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa23b80444..01e1ac0591 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -847,9 +847,7 @@ feature_updater(ON) ################################################################################ # Code ################################################################################ -set(PROJECT_DATA_LOCALE ) -set(PROJECT_DATA_EFFECTS ) -set(PROJECT_DATA_SHADERS ) +set(PROJECT_DATA ) set(PROJECT_LIBRARIES ) set(PROJECT_LIBRARIES_DELAYED ) set(PROJECT_INCLUDE_DIRS ) @@ -859,6 +857,10 @@ set(PROJECT_PRIVATE_SOURCE ) set(PROJECT_UI ) set(PROJECT_UI_SOURCE ) set(PROJECT_DEFINITIONS ) +set(PROJECT_MEDIA ) + +# Media +file(GLOB_RECURSE PROJECT_MEDIA "media/*") # Configure Files configure_file( @@ -1659,6 +1661,8 @@ set(PROJECT_FILES # UI-only (empty if not enabled) ${PROJECT_UI} ${PROJECT_UI_SOURCE} + # Media + ${PROJECT_MEDIA} ) # Set source groups for IDE generators. @@ -1667,15 +1671,16 @@ source_group(TREE "${PROJECT_SOURCE_DIR}/source" PREFIX "Source" FILES ${PROJECT source_group(TREE "${PROJECT_BINARY_DIR}/generated" PREFIX "Source" FILES ${PROJECT_PRIVATE_GENERATED}) source_group(TREE "${PROJECT_SOURCE_DIR}/templates" PREFIX "Templates" FILES ${PROJECT_TEMPLATES}) source_group(TREE "${PROJECT_SOURCE_DIR}/ui" PREFIX "User Interface" FILES ${PROJECT_UI}) +source_group(TREE "${PROJECT_SOURCE_DIR}/media" PREFIX "Media" FILES ${PROJECT_MEDIA}) # Prevent unwanted files from being built as source. -set_source_files_properties(${PROJECT_DATA} ${PROJECT_TEMPLATES} ${PROJECT_UI} PROPERTIES +set_source_files_properties(${PROJECT_DATA} ${PROJECT_TEMPLATES} ${PROJECT_UI} ${PROJECT_MEDIA} PROPERTIES HEADER_FILE_ONLY ON ) # Prevent non-UI files from being Qt'd if(Qt5_Found OR Qt6_FOUND) - set_source_files_properties(${PROJECT_DATA} ${PROJECT_TEMPLATES} ${PROJECT_PRIVATE_GENERATED} ${PROJECT_PRIVATE_SOURCE} PROPERTIES + set_source_files_properties(${PROJECT_DATA} ${PROJECT_TEMPLATES} ${PROJECT_MEDIA} ${PROJECT_PRIVATE_GENERATED} ${PROJECT_PRIVATE_SOURCE} PROPERTIES SKIP_AUTOGEN ON SKIP_AUTOMOC ON SKIP_AUTORCC ON From f40c7a990603175a1818366dd3f425d49298693e Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 5 Sep 2022 06:49:07 +0200 Subject: [PATCH 109/164] cmake: Automatically discover data files Prevents missing data due to it not being in the PROJECT_DATA variable. Bit of a hacky solution, but you gotta do what you gotta do to fix it. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01e1ac0591..5d4fe3a06c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -859,6 +859,9 @@ set(PROJECT_UI_SOURCE ) set(PROJECT_DEFINITIONS ) set(PROJECT_MEDIA ) +# Data +file(GLOB_RECURSE PROJECT_DATA "data/*") + # Media file(GLOB_RECURSE PROJECT_MEDIA "media/*") @@ -1130,8 +1133,6 @@ list(APPEND PROJECT_INCLUDE_DIRS "${PROJECT_BINARY_DIR}/generated" "${PROJECT_SOURCE_DIR}/source" ) -file(GLOB_RECURSE PROJECT_EXAMPLES "data/examples/*") -list(APPEND PROJECT_DATA ${PROJECT_EXAMPLES}) # Encoder/FFmpeg is_feature_enabled(ENCODER_FFMPEG T_CHECK) From 7f1ae7f9f16409bba347200e2366011411e9cb50 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 110/164] cmake: Require MacOSX 10.15 or newer --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d4fe3a06c..280a0c95c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,13 @@ else() set(LOGPREFIX "") endif() +# MacOSX: Require at least MacOSX 10.15 for C++17 support. +if(APPLE) + if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.15) + CacheSet(CMAKE_OSX_DEPLOYMENT_TARGET "10.15") + endif() +endif() + ################################################################################ # Modules ################################################################################ From 4382ad469f39bb10df6893255416abe7b27233ee Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 111/164] templates: Move Windows-only files into dedicated folder --- CMakeLists.txt | 33 +++++++++--------- .../{ => windows}/installer-signed.iss.in | 2 +- templates/{ => windows}/installer.iss.in | 2 +- .../{ => windows}/msvc-redist-helper.exe | Bin templates/{ => windows}/version.rc.in | 0 5 files changed, 18 insertions(+), 19 deletions(-) rename templates/{ => windows}/installer-signed.iss.in (98%) rename templates/{ => windows}/installer.iss.in (98%) rename templates/{ => windows}/msvc-redist-helper.exe (100%) rename templates/{ => windows}/version.rc.in (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 280a0c95c7..ae8e93eb4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -902,11 +902,10 @@ if(D_PLATFORM_WINDOWS) # Windows Support set(PROJECT_LEGAL_TRADEMARKS_2 "") configure_file( - "templates/version.rc.in" + "templates/windows/version.rc.in" "generated/version.rc" - @ONLY ) - LIST(APPEND PROJECT_TEMPLATES "templates/version.rc.in") + LIST(APPEND PROJECT_TEMPLATES "templates/windows/version.rc.in") LIST(APPEND PROJECT_PRIVATE_GENERATED "${PROJECT_BINARY_DIR}/generated/version.rc") endif() @@ -1976,18 +1975,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION} ) -# Delay-Loading on Microsoft Visual C++ -if(D_PLATFORM_WINDOWS) - foreach(DELAYLOAD ${PROJECT_LIBRARIES_DELAYED}) - get_target_property(_lf ${PROJECT_NAME} LINK_FLAGS) - if(NOT _lf) - set(_lf "") - endif() - set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "${_lf} /DELAYLOAD:${DELAYLOAD}") - add_link_options("/DELAYLOAD:${DELAYLOAD}") - endforeach() -endif() - # Enable Qt if needed if(Qt5_FOUND OR Qt6_FOUND) set_target_properties(${PROJECT_NAME} PROPERTIES @@ -1999,6 +1986,18 @@ if(Qt5_FOUND OR Qt6_FOUND) ) endif() +# Windows exclusive changes +if(D_PLATFORM_WINDOWS) + foreach(DELAYLOAD ${PROJECT_LIBRARIES_DELAYED}) + get_target_property(_lf ${PROJECT_NAME} LINK_FLAGS) + if(NOT _lf) + set(_lf "") + endif() + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "${_lf} /DELAYLOAD:${DELAYLOAD}") + add_link_options("/DELAYLOAD:${DELAYLOAD}") + endforeach() +endif() + # MacOS: Disable automatic Code Signing in Xcode if(D_PLATFORM_MAC) set_target_properties(${PROJECT_NAME} PROPERTIES @@ -2338,12 +2337,12 @@ if(STANDALONE) list(JOIN ISS_CODESIGN_CMD_SHA2 " " ISS_CODESIGN_CMD_SHA2) configure_file( - "templates/installer-signed.iss.in" + "templates/windows/installer-signed.iss.in" "installer.iss" ) else() configure_file( - "templates/installer.iss.in" + "templates/windows/installer.iss.in" "installer.iss" ) endif() diff --git a/templates/installer-signed.iss.in b/templates/windows/installer-signed.iss.in similarity index 98% rename from templates/installer-signed.iss.in rename to templates/windows/installer-signed.iss.in index a80214b80d..b034a31545 100644 --- a/templates/installer-signed.iss.in +++ b/templates/windows/installer-signed.iss.in @@ -72,7 +72,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" [Files] Source: "@ISS_FILES_DIR@/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "@PROJECT_SOURCE_DIR@/templates/msvc-redist-helper.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy noencryption +Source: "@PROJECT_SOURCE_DIR@/templates/windows/msvc-redist-helper.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy noencryption ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] diff --git a/templates/installer.iss.in b/templates/windows/installer.iss.in similarity index 98% rename from templates/installer.iss.in rename to templates/windows/installer.iss.in index 9b2cc81f75..9250eaa86a 100644 --- a/templates/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -66,7 +66,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" [Files] Source: "@ISS_FILES_DIR@/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "@PROJECT_SOURCE_DIR@/templates/msvc-redist-helper.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy noencryption +Source: "@PROJECT_SOURCE_DIR@/templates/windows/msvc-redist-helper.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy noencryption ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] diff --git a/templates/msvc-redist-helper.exe b/templates/windows/msvc-redist-helper.exe similarity index 100% rename from templates/msvc-redist-helper.exe rename to templates/windows/msvc-redist-helper.exe diff --git a/templates/version.rc.in b/templates/windows/version.rc.in similarity index 100% rename from templates/version.rc.in rename to templates/windows/version.rc.in From 9adc49b16419a6b1b2d0af44a8ff0c40a8913fd2 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 112/164] templates: Move MacOS-only files into dedicated folder --- CMakeLists.txt | 3 +-- templates/{ => macos}/installer.pkgproj.in | 0 2 files changed, 1 insertion(+), 2 deletions(-) rename templates/{ => macos}/installer.pkgproj.in (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae8e93eb4f..6877e8ca68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2352,9 +2352,8 @@ if(STANDALONE) if(D_PLATFORM_MAC) # .pkg Installer configure_file( - "templates/installer.pkgproj.in" + "templates/macos/installer.pkgproj.in" "installer.pkgproj" - @ONLY ) endif() endif() diff --git a/templates/installer.pkgproj.in b/templates/macos/installer.pkgproj.in similarity index 100% rename from templates/installer.pkgproj.in rename to templates/macos/installer.pkgproj.in From c750fa9a5c6c8fc826bbdbb66f092f8dd44b6582 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 113/164] cmake: Use `@rpath` on MacOS This removes the additional patch steps after building, and are more stable across architectures. --- CMakeLists.txt | 77 +++++++------------------------------------------- 1 file changed, 10 insertions(+), 67 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6877e8ca68..d1c06f9b1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1998,12 +1998,21 @@ if(D_PLATFORM_WINDOWS) endforeach() endif() -# MacOS: Disable automatic Code Signing in Xcode +# MacOS exclusive Changes if(D_PLATFORM_MAC) set_target_properties(${PROJECT_NAME} PROPERTIES + # No automatic code signing in XCode XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO" + # @rpath in installed binaries + INSTALL_RPATH "@executable_path/../Frameworks/;@loader_path/../Frameworks/;@loader_path/../Resources/" ) + if(STANDALONE) + set_target_properties(${PROJECT_NAME} PROPERTIES + # @rpath in built binaries + BUILD_WITH_INSTALL_RPATH ON + ) + endif() endif() ################################################################################ @@ -2027,72 +2036,6 @@ if(T_CHECK AND HAVE_CLANG) ) endif() -# Apple otool -if(D_PLATFORM_MAC) - # OBS - mac_get_linker_id(TARGET OBS::libobs OUTPUT T_OBS_LINK) - add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - COMMAND install_name_tool ARGS -change "${T_OBS_LINK}" "@executable_path/../Frameworks/libobs.0.dylib" $ - ) - message(STATUS "${LOGPREFIX}Added post-build step for adjusting libobs linking path.") - - # OBS Front-End API - if(REQUIRE_OBS_FRONTEND_API AND obs-frontend-api_FOUND) - mac_get_linker_id(TARGET OBS::obs-frontend-api OUTPUT T_OBSFE_LINK) - add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - COMMAND install_name_tool ARGS -change "${T_OBSFE_LINK}" "@executable_path/../Frameworks/libobs-frontend-api.dylib" $ - ) - message(STATUS "${LOGPREFIX}Added post-build step for adjusting libobs-frontend-api linking path.") - endif() - - # Qt - if(REQUIRE_QT) - if(Qt5_FOUND) - # Figure out the linker location for Qt5::Core - mac_get_linker_id(TARGET Qt5::Core OUTPUT T_QT5CORE_LINK) - - # Figure out the linker location for Qt5::Gui - mac_get_linker_id(TARGET Qt5::Gui OUTPUT T_QT5GUI_LINK) - - # Figure out the linker location for Qt5::Widsgets - mac_get_linker_id(TARGET Qt5::Widgets OUTPUT T_QT5WIDGETS_LINK) - - add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - # - QtCore - COMMAND install_name_tool ARGS -change "${T_QT5CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore" $ - # - QtGui - COMMAND install_name_tool ARGS -change "${T_QT5GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $ - # - QtWidgets - COMMAND install_name_tool ARGS -change "${T_QT5WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" $ - ) - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Core linking path (Found: ${Qt5_DIR} resolved to ${T_QT5CORE_LINK}).") - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Gui linking path (Found: ${Qt5_DIR} resolved to ${T_QT5GUI_LINK}).") - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt5::Widgets linking path (Found: ${Qt5_DIR} resolved to ${T_QT5WIDGETS_LINK}).") - elseif(Qt6_FOUND) - # Figure out the linker location for Qt6::Core - mac_get_linker_id(TARGET Qt6::Core OUTPUT T_QT6CORE_LINK) - - # Figure out the linker location for Qt6::Gui - mac_get_linker_id(TARGET Qt6::Gui OUTPUT T_QT6GUI_LINK) - - # Figure out the linker location for Qt6::Widsgets - mac_get_linker_id(TARGET Qt6::Widgets OUTPUT T_QT6WIDGETS_LINK) - - add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - # - QtCore - COMMAND install_name_tool ARGS -change "${T_QT6CORE_LINK}" "@executable_path/../Frameworks/QtCore.framework/Versions/A/QtCore" $ - # - QtGui - COMMAND install_name_tool ARGS -change "${T_QT6GUI_LINK}" "@executable_path/../Frameworks/QtGui.framework/Versions/A/QtGui" $ - # - QtWidgets - COMMAND install_name_tool ARGS -change "${T_QT6WIDGETS_LINK}" "@executable_path/../Frameworks/QtWidgets.framework/Versions/A/QtWidgets" $ - ) - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Core linking path (Found: ${Qt6_DIR} resolved to ${T_QT6CORE_LINK}).") - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Gui linking path (Found: ${Qt6_DIR} resolved to ${T_QT6GUI_LINK}).") - message(STATUS "${LOGPREFIX}Added post-build step for adjusting Qt6::Widgets linking path (Found: ${Qt6_DIR} resolved to ${T_QT6WIDGETS_LINK}).") - endif() - endif() -endif() - # Code Sign if(HAVE_CODESIGN) set(_CODESIGN_TIMESTAMP "") From e3d0cabb0929f2e9c271b4eecb129189fb4fb9a9 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 114/164] cmake: Always show templates for all architectures --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1c06f9b1a..78a70477b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -872,6 +872,9 @@ file(GLOB_RECURSE PROJECT_DATA "data/*") # Media file(GLOB_RECURSE PROJECT_MEDIA "media/*") +# Templates +file(GLOB_RECURSE PROJECT_TEMPLATES "templates/*") + # Configure Files configure_file( "templates/config.hpp.in" @@ -905,7 +908,6 @@ if(D_PLATFORM_WINDOWS) # Windows Support "templates/windows/version.rc.in" "generated/version.rc" ) - LIST(APPEND PROJECT_TEMPLATES "templates/windows/version.rc.in") LIST(APPEND PROJECT_PRIVATE_GENERATED "${PROJECT_BINARY_DIR}/generated/version.rc") endif() From d4ef0430430b97e3fee6b9e4e6d57b9cc95d5f0c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 115/164] cmake: Export Loadable Bundles on MacOS With OBS Studio 28.0.0 a new requirement was added to MacOS plugin: Loadable Bundles. These bundles are similar to Application Bundles, and have many of the same features, but are designed to be loaded by Applications instead of being the Application. This allows for almost all of the advantages to persist, with some minimal drawbacks. --- CMakeLists.txt | 78 +++++++++++++++++++---- templates/macos/Info.plist.in | 51 +++++++++++++++ templates/macos/installer.pkgproj.in | 95 +++++++++++++++++++--------- 3 files changed, 180 insertions(+), 44 deletions(-) create mode 100644 templates/macos/Info.plist.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 78a70477b9..8eda960c43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,7 @@ project( DESCRIPTION "Additional sources, filters, transitions and encoders for OBS Studio." HOMEPAGE_URL "https://streamfx.xaymar.com/" ) +set(PROJECT_IDENTIFER "com.xaymar.${PROJECT_NAME}.obs") set(PROJECT_TITLE "StreamFX (for OBS Studio)") set(PROJECT_AUTHORS "Michael Fabian 'Xaymar' Dirks ") set(PROJECT_COPYRIGHT "2017 - 2022, Michael Fabian Dirks. All Rights Reserved") @@ -370,6 +371,8 @@ if(STANDALONE) set(STRUCTURE_UNIFIED CACHE BOOL "Install for use in a Plugin Manager") if(D_PLATFORM_LINUX) set(STRUCTURE_PACKAGEMANAGER CACHE BOOL "Install for use in a Package Manager (system-wide installation)") + elseif(D_PLATFORM_MAC) + set(STRUCTURE_BUNDLE ON CACHE BOOL "Install as a Loadable Bundle (.plugin)") endif() set(PACKAGE_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "Where to place the packages?") @@ -2015,6 +2018,41 @@ if(D_PLATFORM_MAC) BUILD_WITH_INSTALL_RPATH ON ) endif() + + # Bundle exporting + if(STRUCTURE_BUNDLE) + # Proper location for resources in Bundles + foreach(FILE IN LISTS PROJECT_DATA) + cmake_path(ABSOLUTE_PATH FILE OUTPUT_VARIABLE FILE_PATH) + cmake_path(RELATIVE_PATH FILE_PATH BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/data/") + cmake_path(GET FILE_PATH PARENT_PATH FILE_PATH) + set_source_files_properties("${FILE}" PROPERTIES + MACOSX_PACKAGE_LOCATION "Resources/${FILE_PATH}" + ) + endforeach() + + # Bundle Icon + set_source_files_properties("media/icon.png" PROPERTIES + MACOSX_PACKAGE_LOCATION "Resources" + ) + + # Bundle Information + set(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}") + set(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}") + set(MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_IDENTIFER}") + set(MACOSX_BUNDLE_ICON_FILE "icon.png") + set(MACOSX_BUNDLE_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "${_VERSION}") + set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}") + set_target_properties(${PROJECT_NAME} PROPERTIES + BUNDLE ON + BUNDLE_EXTENSION "plugin" + OUTPUT_NAME ${PROJECT_NAME} + MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/templates/macos/Info.plist.in" + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}" + ) + endif() endif() ################################################################################ @@ -2171,19 +2209,29 @@ if(STANDALONE) ) endif() elseif(D_PLATFORM_MAC) - install( - TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION "${PROJECT_NAME}/bin/" COMPONENT StreamFX - LIBRARY DESTINATION "${PROJECT_NAME}/bin/" COMPONENT StreamFX - PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - ) - install( - DIRECTORY "data/" - DESTINATION "${PROJECT_NAME}/data/" - COMPONENT StreamFX - FILE_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - DIRECTORY_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE - ) + if(STRUCTURE_BUNDLE) + install( + TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION "." COMPONENT StreamFX + LIBRARY DESTINATION "." COMPONENT StreamFX + BUNDLE DESTINATION "." COMPONENT StreamFX + PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE + ) + else() + install( + TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION "${PROJECT_NAME}/bin/" COMPONENT StreamFX + LIBRARY DESTINATION "${PROJECT_NAME}/bin/" COMPONENT StreamFX + PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE + ) + install( + DIRECTORY "data/" + DESTINATION "${PROJECT_NAME}/data/" + COMPONENT StreamFX + FILE_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE + DIRECTORY_PERMISSIONS WORLD_EXECUTE;WORLD_READ;OWNER_EXECUTE;OWNER_READ;OWNER_WRITE;GROUP_EXECUTE;GROUP_READ;GROUP_WRITE + ) + endif() endif() else() if(COMMAND setup_plugin_target) @@ -2296,6 +2344,10 @@ if(STANDALONE) # Apple MacOS if(D_PLATFORM_MAC) # .pkg Installer + set(PACKAGES_PATH_NAME "${PROJECT_NAME}") + if(STRUCTURE_BUNDLE) + set(PACKAGES_PATH_NAME "${PACKAGES_PATH_NAME}.plugin") + endif() configure_file( "templates/macos/installer.pkgproj.in" "installer.pkgproj" diff --git a/templates/macos/Info.plist.in b/templates/macos/Info.plist.in new file mode 100644 index 0000000000..66c46b6377 --- /dev/null +++ b/templates/macos/Info.plist.in @@ -0,0 +1,51 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + + CFBundleSupportedPlatforms + + MacOSX + + + CFBundlePackageType + BNDL + + CFBundleDevelopmentRegion + English + + CFBundleIdentifier + ${MACOSX_BUNDLE_GUI_IDENTIFIER} + + CFBundleName + ${MACOSX_PLUGIN_BUNDLE_NAME} + CFBundleDisplayName + ${MACOSX_PLUGIN_BUNDLE_NAME} + + CFBundleIconFile + ${MACOSX_BUNDLE_ICON_FILE} + + CFBundleExecutable + ${MACOSX_PLUGIN_EXECUTABLE_NAME} + + CFBundleVersion + ${MACOSX_BUNDLE_VERSION_STRING} + CFBundleShortVersionString + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} + CFBundleLongVersionString + ${MACOSX_BUNDLE_LONG_VERSION_STRING} + + CSResourcesFileMapped + + + CFBundleGetInfoString + ${MACOSX_BUNDLE_COPYRIGHT} + NSHumanReadableCopyright + ${MACOSX_BUNDLE_COPYRIGHT} + + LSMinimumSystemVersion + ${CMAKE_OSX_DEPLOYMENT_TARGET} + + diff --git a/templates/macos/installer.pkgproj.in b/templates/macos/installer.pkgproj.in index 2c33be46ba..516fa7ed4c 100644 --- a/templates/macos/installer.pkgproj.in +++ b/templates/macos/installer.pkgproj.in @@ -37,14 +37,63 @@ CHILDREN + BUNDLE_CAN_DOWNGRADE + + BUNDLE_POSTINSTALL_PATH + + PATH_TYPE + 0 + + BUNDLE_PREINSTALL_PATH + + PATH_TYPE + 0 + CHILDREN GID 80 + LOCATORS + + + DICTIONARY + + BUNDLE_IDENTIFIER + com.xaymar.StreamFX.obs + DEFAULT_PATH + /Library/Application Support/obs-studio/plugins + PREFER_DEFAULT_PATH + 0 + + IDENTIFIER + fr.whitebox.Packages.locator.standard + NAME + com.xaymar.StreamFX.obs + STATE + + + + DICTIONARY + + BUNDLE_IDENTIFIER + com.xaymar.StreamFX + DEFAULT_PATH + /Library/Application Support/obs-studio/plugins + PREFER_DEFAULT_PATH + 0 + + IDENTIFIER + fr.whitebox.Packages.locator.standard + NAME + com.xaymar.StreamFX + STATE + + + PATH - @CMAKE_INSTALL_PREFIX@/StreamFX + @CMAKE_INSTALL_PREFIX@/@PACKAGES_PATH_NAME@ PATH_TYPE - 3 + 1 PERMISSIONS 493 TYPE @@ -58,9 +107,9 @@ PATH plugins PATH_TYPE - 0 + 2 PERMISSIONS - 493 + 509 TYPE 2 UID @@ -72,9 +121,9 @@ PATH obs-studio PATH_TYPE - 0 + 2 PERMISSIONS - 493 + 509 TYPE 2 UID @@ -445,22 +494,6 @@ UID 0 - - CHILDREN - - GID - 80 - PATH - Applications - PATH_TYPE - 0 - PERMISSIONS - 509 - TYPE - 1 - UID - 0 - GID 0 @@ -506,19 +539,19 @@ PACKAGE_SETTINGS AUTHENTICATION - 1 + 0 CONCLUSION_ACTION 0 FOLLOW_SYMBOLIC_LINKS IDENTIFIER - com.xaymar.@PROJECT_NAME@ + ${PROJECT_IDENTIFER} LOCATION 0 NAME @PROJECT_NAME@ OVERWRITE_PERMISSIONS - + PAYLOAD_SIZE -1 REFERENCE_PATH @@ -526,7 +559,7 @@ RELOCATABLE USE_HFS+_COMPRESSION - + VERSION @PROJECT_VERSION@ @@ -574,7 +607,7 @@ OPTIONS HIDDEN - + STATE 1 @@ -593,7 +626,7 @@ MODE - 1 + 0 INSTALLATION_STEPS @@ -669,7 +702,7 @@ VALUE PATH - @PROJECT_SOURCE_DIR@/license + @PROJECT_SOURCE_DIR@/LICENSE PATH_TYPE 0 @@ -706,14 +739,14 @@ DICTIONARY IC_REQUIREMENT_OS_DISK_TYPE - 0 + 1 IC_REQUIREMENT_OS_DISTRIBUTION_TYPE 0 IC_REQUIREMENT_OS_MINIMUM_VERSION 101500 IC_REQUIREMENT_CHECK_TYPE - 1 + 0 IDENTIFIER fr.whitebox.Packages.requirement.os MESSAGE From 2451c8418e651c8f51ba058a58cb66857a36b74e Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 116/164] templates: Add error message if MacOSX is below 10.15 --- templates/macos/installer.pkgproj.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/macos/installer.pkgproj.in b/templates/macos/installer.pkgproj.in index 516fa7ed4c..2b7f77a55f 100644 --- a/templates/macos/installer.pkgproj.in +++ b/templates/macos/installer.pkgproj.in @@ -750,7 +750,16 @@ IDENTIFIER fr.whitebox.Packages.requirement.os MESSAGE - + + + LANGUAGE + English + SECONDARY_VALUE + + VALUE + StreamFX requires at least MacOSX 10.15, and will not work properly without it. Please update or upgrade your System! + + NAME Operating System STATE From bfd8155ddcc8e7b12744768b136bf6c243fb75ad Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 3 Sep 2022 20:06:33 +0200 Subject: [PATCH 117/164] templates: Prefer per-user installations on MacOSX With OBS Studio 28.0 comes another restriction: Per-User Plugins. This is currently only enforced on ARM64, but may soon be enforced on all architectures. Adjusting the Packages installer to generate the correct files is relatively easy. Unfortunately the MacOS Package Installer has some problems figuring out if it should show the user the correct step or not, and may even ignore our settings entirely. This bug has been first reported in 2010, and has since then been re-reported in 2016, 2017, 2018, 2019, and 2020 where it was finally turned into a community wiki on StackOverflow. --- templates/macos/installer.pkgproj.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/templates/macos/installer.pkgproj.in b/templates/macos/installer.pkgproj.in index 2b7f77a55f..06ccd25e56 100644 --- a/templates/macos/installer.pkgproj.in +++ b/templates/macos/installer.pkgproj.in @@ -773,6 +773,15 @@ PROJECT_SETTINGS + ADVANCED_OPTIONS + + installer-script.domains:enable_anywhere + 1 + installer-script.domains:enable_currentUserHome + 1 + installer-script.domains:enable_localSystem + 0 + BUILD_FORMAT 0 BUILD_PATH From 3d293bac6a976d8a6376a51f3ef37cacc77ee990 Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Mon, 5 Sep 2022 09:21:17 +0200 Subject: [PATCH 118/164] cmake: Require nlohmann-json when building the front-end Nlohmann-json is used in the about dialog, yet wasn't required when building the front-end, leading to failing compilation. This ensures that it is correctly required. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8eda960c43..9fe7672ddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ # Copyright (C) 2017 Michael Fabian Dirks +# Copyright (C) 2022 Romain Vigier # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -653,10 +654,14 @@ function(feature_frontend RESOLVE) elseif(NOT obs-frontend-api_FOUND) message(WARNING "${LOGPREFIX}Front-End requires OBS FrontEnd API. Disabling...") set_feature_disabled(FRONTEND ON) + elseif(NOT HAVE_JSON) + message(WARNING "${LOGPREFIX}Front-End requires nlohmann::json. Disabling...") + set_feature_disabled(FRONTEND ON) endif() elseif(T_CHECK) set(REQUIRE_QT ON PARENT_SCOPE) set(REQUIRE_OBS_FRONTEND_API ON PARENT_SCOPE) + set(REQUIRE_JSON ON PARENT_SCOPE) endif() endfunction() From bbac990644365bb8238776d7280bd0f4926d06fc Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 8 Sep 2022 23:57:18 +0200 Subject: [PATCH 119/164] encoder/ffmpeg: Assume extra data and sei are present on first frame While this may break some unusual encoders that require additional frames for extra data or sei data to be present, it fixes the problem where encoders would never record at all. May need to look into a different solution in the future. Fixes #911 --- source/encoders/encoder-ffmpeg.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 2da6e71a47..3202a7b1a3 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -583,7 +583,7 @@ std::shared_ptr ffmpeg_instance::pop_used_frame() bool ffmpeg_instance::get_extra_data(uint8_t** data, size_t* size) { - if (_extra_data.size() == 0) + if (!_have_first_frame) return false; *data = _extra_data.data(); @@ -593,7 +593,7 @@ bool ffmpeg_instance::get_extra_data(uint8_t** data, size_t* size) bool ffmpeg_instance::get_sei_data(uint8_t** data, size_t* size) { - if (_sei_data.size() == 0) + if (!_have_first_frame) return false; *data = _sei_data.data(); @@ -678,7 +678,10 @@ int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet packet->drop_priority = 3; for (size_t idx = 0, edx = static_cast(_packet->side_data_elems); idx < edx; idx++) { auto& side_data = _packet->side_data[idx]; - if (side_data.type == AV_PKT_DATA_QUALITY_STATS) { + if (side_data.type == AV_PKT_DATA_NEW_EXTRADATA) { + _extra_data.resize(side_data.size); + std::memcpy(_extra_data.data(), side_data.data, side_data.size); + } else if (side_data.type == AV_PKT_DATA_QUALITY_STATS) { // Decisions based on picture type, if present. switch (side_data.data[sizeof(uint32_t)]) { case AV_PICTURE_TYPE_I: // I-Frame From b55e4b283b3cc90249345e7ba189b8f248ec4a74 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 10 Sep 2022 14:45:20 +0200 Subject: [PATCH 120/164] encoder/ffmpeg: Add split framerate with integer fractions It seems to be possible to encode with a different framerate than what libOBS is configured for. While technically any framerate appears to be possible, it is currently limited to integer fractions only in order to make the implementation much easier. Integer fractions only require skipping N frames and multiplying the denominator by N, where N is the configured integer. For sanity reasons, the limit of N is currently 10. This allows power users to split their streaming and recording framerates with relative ease, and opt for things such as: - 30 FPS (1/4) streaming with 120 FPS (1/1) recording. - 30 FPS (1/10) streaming with 300 FPS (1/1) recording. - 30 FPS (1/10) streaming with 100 FPS (1/3) recording. - and so on. While some of these combinations are just stupid, they are now available to power users. --- data/locale/en-US.ini | 1 + source/encoders/encoder-ffmpeg.cpp | 46 ++++++++++++++++++++++++++++-- source/encoders/encoder-ffmpeg.hpp | 3 +- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index e281354b59..beeb8097ff 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -137,6 +137,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Interval Type" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Frames" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Seconds" Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.Framerate="Framerate Override" # Encoder/FFmpeg/AMF Encoder.FFmpeg.AMF.Deprecated="This encoder is deprecated and will be removed soon. Users are urged to migrate to the integrated 'AMD HW H.264 (AVC)' or 'AMD HW H.265 (HEVC)' encoder as soon as possible." diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 3202a7b1a3..8ea383bea5 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -1,5 +1,5 @@ // FFMPEG Video Encoder Integration for OBS Studio -// Copyright (c) 2019 Michael Fabian Dirks +// Copyright (c) 2019-2022 Michael Fabian Dirks // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -74,6 +74,8 @@ extern "C" { #define ST_KEY_FFMPEG_CUSTOMSETTINGS "FFmpeg.CustomSettings" #define ST_I18N_FFMPEG_THREADS ST_I18N_FFMPEG ".Threads" #define ST_KEY_FFMPEG_THREADS "FFmpeg.Threads" +#define ST_I18N_FFMPEG_FRAMERATE ST_I18N_FFMPEG ".Framerate" +#define ST_KEY_FFMPEG_FRAMERATE "FFmpeg.Framerate" #define ST_I18N_FFMPEG_GPU ST_I18N_FFMPEG ".GPU" #define ST_KEY_FFMPEG_GPU "FFmpeg.GPU" @@ -145,6 +147,14 @@ ffmpeg_instance::ffmpeg_instance(obs_data_t* settings, obs_encoder_t* self, bool initialize_sw(settings); } + { // Set up framerate division. + _framerate_divisor = obs_data_get_int(settings, ST_KEY_FFMPEG_FRAMERATE); + + _context->ticks_per_frame = 1; + _context->time_base.num *= _framerate_divisor; + _context->framerate.den *= _framerate_divisor; + } + // Update settings update(settings); @@ -263,8 +273,10 @@ bool ffmpeg_instance::update(obs_data_t* settings) bool is_seconds = (kf_type == 0); if (is_seconds) { - _context->gop_size = static_cast(obs_data_get_double(settings, ST_KEY_KEYFRAMES_INTERVAL_SECONDS) - * (ovi.fps_num / ovi.fps_den)); + double framerate = + static_cast(ovi.fps_num) / (static_cast(ovi.fps_den) * _framerate_divisor); + _context->gop_size = + static_cast(obs_data_get_double(settings, ST_KEY_KEYFRAMES_INTERVAL_SECONDS) * framerate); } else { _context->gop_size = static_cast(obs_data_get_int(settings, ST_KEY_KEYFRAMES_INTERVAL_FRAMES)); } @@ -377,6 +389,10 @@ bool ffmpeg_instance::encode_audio(struct encoder_frame* frame, struct encoder_p bool ffmpeg_instance::encode_video(struct encoder_frame* frame, struct encoder_packet* packet, bool* received_packet) { + if ((_framerate_divisor > 1) && (frame->pts % _framerate_divisor != 0)) { + return true; + } + std::shared_ptr vframe = pop_free_frame(); // Retrieve an empty frame. // Convert frame. @@ -413,6 +429,11 @@ bool ffmpeg_instance::encode_video(struct encoder_frame* frame, struct encoder_p bool ffmpeg_instance::encode_video(uint32_t handle, int64_t pts, uint64_t lock_key, uint64_t* next_key, struct encoder_packet* packet, bool* received_packet) { + if ((_framerate_divisor > 1) && (pts % _framerate_divisor != 0)) { + *next_key = lock_key; + return true; + } + #ifdef D_PLATFORM_WINDOWS if (handle == GS_INVALID_HANDLE) { DLOG_ERROR("Received invalid handle."); @@ -1145,6 +1166,25 @@ obs_properties_t* ffmpeg_factory::get_properties2(instance_t* data) auto p = obs_properties_add_int_slider(grp, ST_KEY_FFMPEG_THREADS, D_TRANSLATE(ST_I18N_FFMPEG_THREADS), 0, static_cast(std::thread::hardware_concurrency()) * 2, 1); } + + { // Frame Skipping + obs_video_info ovi; + if (!obs_get_video_info(&ovi)) { + throw std::runtime_error("obs_get_video_info failed unexpectedly."); + } + + auto p = obs_properties_add_list(grp, ST_KEY_FFMPEG_FRAMERATE, D_TRANSLATE(ST_I18N_FFMPEG_FRAMERATE), + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); + // For now, an arbitrary limit of 1/10th the Framerate should be fine. + std::vector buf{size_t{256}, 0, std::allocator()}; + for (uint32_t divisor = 1; divisor <= 10; divisor++) { + double fps_num = static_cast(ovi.fps_num) / static_cast(divisor); + double fps = fps_num / static_cast(ovi.fps_den); + snprintf(buf.data(), buf.size(), "%8.2f (%" PRIu32 "/%" PRIu32 ")", fps, ovi.fps_num, + ovi.fps_den * divisor); + obs_property_list_add_int(p, buf.data(), divisor); + } + } }; return props; diff --git a/source/encoders/encoder-ffmpeg.hpp b/source/encoders/encoder-ffmpeg.hpp index bd0a5d78f0..96704cb169 100644 --- a/source/encoders/encoder-ffmpeg.hpp +++ b/source/encoders/encoder-ffmpeg.hpp @@ -1,5 +1,5 @@ // FFMPEG Video Encoder Integration for OBS Studio -// Copyright (c) 2019 Michael Fabian Dirks +// Copyright (c) 2019-2022 Michael Fabian Dirks // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -62,6 +62,7 @@ namespace streamfx::encoder::ffmpeg { std::size_t _lag_in_frames; std::size_t _sent_frames; + std::size_t _framerate_divisor; // Extra Data bool _have_first_frame; From 7296bbc16bea5b18eb2f7245bce5d5e1c2ba1102 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 10 Sep 2022 01:34:52 +0200 Subject: [PATCH 121/164] encoder/ffmpeg: Improve software scaling quality Might be better to allow end-users to choose swscale quality, if they deem it necessary. --- source/encoders/encoder-ffmpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 8ea383bea5..949f2e0041 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -498,7 +498,7 @@ void ffmpeg_instance::initialize_sw(obs_data_t* settings) _scaler.set_target_format(pix_fmt_target); // Create Scaler - if (!_scaler.initialize(SWS_POINT)) { + if (!_scaler.initialize(SWS_SINC | SWS_FULL_CHR_H_INT | SWS_FULL_CHR_H_INP | SWS_ACCURATE_RND | SWS_BITEXACT)) { std::stringstream sstr; sstr << "Initializing scaler failed for conversion from '" << ::streamfx::ffmpeg::tools::get_pixel_format_name(_scaler.get_source_format()) << "' to '" From b46e771a8182fbc585aca909e3bd2dff8f75619b Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 10 Sep 2022 00:49:09 +0200 Subject: [PATCH 122/164] ffmpeg/tools: Add support for HDR formats This allows for HDR formats to be encoded by FFmpeg encoders. --- source/ffmpeg/tools.cpp | 50 +++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 9b75b65428..edda1fa73c 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -1,5 +1,5 @@ // FFMPEG Video Encoder Integration for OBS Studio -// Copyright (c) 2019 Michael Fabian Dirks +// Copyright (c) 2019-2022 Michael Fabian Dirks // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -88,22 +88,28 @@ const char* tools::get_error_description(int error) } static std::map const obs_to_av_format_map = { - {VIDEO_FORMAT_I420, AV_PIX_FMT_YUV420P}, // YUV 4:2:0 - {VIDEO_FORMAT_NV12, AV_PIX_FMT_NV12}, // NV12 Packed YUV - {VIDEO_FORMAT_YVYU, AV_PIX_FMT_YVYU422}, // YVYU Packed YUV - {VIDEO_FORMAT_YUY2, AV_PIX_FMT_YUYV422}, // YUYV Packed YUV - {VIDEO_FORMAT_UYVY, AV_PIX_FMT_UYVY422}, // UYVY Packed YUV - {VIDEO_FORMAT_RGBA, AV_PIX_FMT_RGBA}, // - {VIDEO_FORMAT_BGRA, AV_PIX_FMT_BGRA}, // - {VIDEO_FORMAT_BGRX, AV_PIX_FMT_BGR0}, // - {VIDEO_FORMAT_Y800, AV_PIX_FMT_GRAY8}, // - {VIDEO_FORMAT_I444, AV_PIX_FMT_YUV444P}, // - {VIDEO_FORMAT_BGR3, AV_PIX_FMT_BGR24}, // - {VIDEO_FORMAT_I422, AV_PIX_FMT_YUV422P}, // - {VIDEO_FORMAT_I40A, AV_PIX_FMT_YUVA420P}, // - {VIDEO_FORMAT_I42A, AV_PIX_FMT_YUVA422P}, // - {VIDEO_FORMAT_YUVA, AV_PIX_FMT_YUVA444P}, // - //{VIDEO_FORMAT_AYUV, AV_PIX_FMT_AYUV444P}, // + {VIDEO_FORMAT_I420, AV_PIX_FMT_YUV420P}, // 4:2:0 YUV, 8bit, Planar + {VIDEO_FORMAT_NV12, AV_PIX_FMT_NV12}, // 4:2:0 YUV, 8bit, Packed (Y+UV) + {VIDEO_FORMAT_YVYU, AV_PIX_FMT_YVYU422}, // 4:2:0 YUV, 8bit, Packed (Y+UV) + {VIDEO_FORMAT_YUY2, AV_PIX_FMT_YUYV422}, // 4:2:2 YUV, 8bit, Packed (Y+UV) + {VIDEO_FORMAT_UYVY, AV_PIX_FMT_UYVY422}, // 4:2:2 YUV, 8bit, Packed (Y+UV) + {VIDEO_FORMAT_RGBA, AV_PIX_FMT_RGBA}, // 4:4:4:4 RGBA, 8bit, Planar + {VIDEO_FORMAT_BGRA, AV_PIX_FMT_BGRA}, // 4:4:4:4 BGRA, 8bit, Planar + {VIDEO_FORMAT_BGRX, AV_PIX_FMT_BGR0}, // 4:4:4 BGR, 8bit, Planar + {VIDEO_FORMAT_Y800, AV_PIX_FMT_GRAY8}, // 4:0:0 Y, 8bit, Planar + {VIDEO_FORMAT_I444, AV_PIX_FMT_YUV444P}, // 4:4:4 YUV, 8bit, Planar + {VIDEO_FORMAT_BGR3, AV_PIX_FMT_BGR24}, // 4:4:4 BGR, 8bit, Planar + {VIDEO_FORMAT_I422, AV_PIX_FMT_YUV422P}, // 4:2:2 YUV, 8bit, Planar + {VIDEO_FORMAT_I40A, AV_PIX_FMT_YUVA420P}, // 4:2:0:4 YUVA, 8bit, Planar + {VIDEO_FORMAT_I42A, AV_PIX_FMT_YUVA422P}, // 4:2:2:4 YUVA, 8bit, Planar + {VIDEO_FORMAT_YUVA, AV_PIX_FMT_YUVA444P}, // 4:4:4:4 YUVA, 8bit, Planar + {VIDEO_FORMAT_AYUV, AV_PIX_FMT_NONE}, // No compatible format known + {VIDEO_FORMAT_I010, AV_PIX_FMT_YUV420P10}, // 4:2:0, 10bit, Planar + {VIDEO_FORMAT_P010, AV_PIX_FMT_P010}, // 4:2:0, 10bit, Packed (Y+UV) + {VIDEO_FORMAT_I210, AV_PIX_FMT_YUV422P10}, // 4:2:2 YUV, 10bit, Planar + {VIDEO_FORMAT_I412, AV_PIX_FMT_YUV444P12}, // 4:4:4 YUV, 12bit, Planar + {VIDEO_FORMAT_YA2L, AV_PIX_FMT_YUVA444P12}, // 4:4:4:4 YUVA, 12bit, Planar + }; AVPixelFormat tools::obs_videoformat_to_avpixelformat(video_format v) @@ -151,6 +157,9 @@ AVColorSpace tools::obs_to_av_color_space(video_colorspace v) case VIDEO_CS_709: // BT.709 case VIDEO_CS_SRGB: // sRGB return AVCOL_SPC_BT709; + case VIDEO_CS_2100_PQ: + case VIDEO_CS_2100_HLG: + return AVCOL_SPC_ICTCP; default: throw std::invalid_argument("Unknown Color Space"); } @@ -165,6 +174,9 @@ AVColorPrimaries streamfx::ffmpeg::tools::obs_to_av_color_primary(video_colorspa case VIDEO_CS_709: // BT.709 case VIDEO_CS_SRGB: // sRGB return AVCOL_PRI_BT709; + case VIDEO_CS_2100_PQ: + case VIDEO_CS_2100_HLG: + return AVCOL_PRI_BT2020; default: throw std::invalid_argument("Unknown Color Primaries"); } @@ -180,6 +192,10 @@ AVColorTransferCharacteristic streamfx::ffmpeg::tools::obs_to_av_color_transfer_ return AVCOL_TRC_BT709; case VIDEO_CS_SRGB: // sRGB with IEC 61966-2-1 return AVCOL_TRC_IEC61966_2_1; + case VIDEO_CS_2100_PQ: + return AVCOL_TRC_SMPTE2084; + case VIDEO_CS_2100_HLG: + return AVCOL_TRC_ARIB_STD_B67; default: throw std::invalid_argument("Unknown Color Transfer Characteristics"); } From 50919e1a49959e6435cb52f2b446fda88950b23a Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 10 Sep 2022 01:35:17 +0200 Subject: [PATCH 123/164] encoder/handler/prores_aw: Don't enable Key-Frame options --- source/encoders/handlers/prores_aw_handler.cpp | 7 ++++++- source/encoders/handlers/prores_aw_handler.hpp | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/encoders/handlers/prores_aw_handler.cpp b/source/encoders/handlers/prores_aw_handler.cpp index 13d4ee88ac..23ec4e6e5b 100644 --- a/source/encoders/handlers/prores_aw_handler.cpp +++ b/source/encoders/handlers/prores_aw_handler.cpp @@ -1,5 +1,5 @@ // FFMPEG Video Encoder Integration for OBS Studio -// Copyright (c) 2019 Michael Fabian Dirks +// Copyright (c) 2019-2022 Michael Fabian Dirks // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -112,3 +112,8 @@ void prores_aw_handler::log_options(obs_data_t* settings, const AVCodec* codec, return std::string(""); }); } + +bool prores_aw_handler::has_keyframe_support(ffmpeg_factory* instance) +{ + return false; +} diff --git a/source/encoders/handlers/prores_aw_handler.hpp b/source/encoders/handlers/prores_aw_handler.hpp index caffa1d637..5acfbaf724 100644 --- a/source/encoders/handlers/prores_aw_handler.hpp +++ b/source/encoders/handlers/prores_aw_handler.hpp @@ -1,5 +1,5 @@ // FFMPEG Video Encoder Integration for OBS Studio -// Copyright (c) 2019 Michael Fabian Dirks +// Copyright (c) 2019-2022 Michael Fabian Dirks // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -44,6 +44,8 @@ namespace streamfx::encoder::ffmpeg::handler { public /*support tests*/: bool has_pixel_format_support(ffmpeg_factory* instance) override; + bool has_keyframe_support(ffmpeg_factory* instance) override; + public /*settings*/: void get_properties(obs_properties_t* props, const AVCodec* codec, AVCodecContext* context, bool hw_encode) override; From a0d60e751b0f9e659fd552111971243988ff21fd Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 10 Sep 2022 02:01:32 +0200 Subject: [PATCH 124/164] encoder/handler/dnxhd: Use endian-independent formats --- source/encoders/handlers/dnxhd_handler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp index af48d3a177..4348cd980c 100644 --- a/source/encoders/handlers/dnxhd_handler.cpp +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -1,3 +1,5 @@ +// Copyright (c) 2022 Michael Fabian Dirks + #include "dnxhd_handler.hpp" #include "common.hpp" #include "../codecs/dnxhr.hpp" @@ -23,8 +25,8 @@ void dnxhd_handler::override_colorformat(AVPixelFormat& target_format, obs_data_ { static const std::array, static_cast(5)> profile_to_format_map{ std::pair{"dnxhr_lb", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_sq", AV_PIX_FMT_YUV422P}, - std::pair{"dnxhr_hq", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_hqx", AV_PIX_FMT_YUV422P10LE}, - std::pair{"dnxhr_444", AV_PIX_FMT_YUV444P10LE}}; + std::pair{"dnxhr_hq", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_hqx", AV_PIX_FMT_YUV422P10}, + std::pair{"dnxhr_444", AV_PIX_FMT_YUV444P10}}; const char* selected_profile = obs_data_get_string(settings, S_CODEC_DNXHR_PROFILE); for (const auto& kv : profile_to_format_map) { @@ -34,7 +36,7 @@ void dnxhd_handler::override_colorformat(AVPixelFormat& target_format, obs_data_ } } - //Fallback for (yet) unknown formats + // Fallback for (yet) unknown formats target_format = AV_PIX_FMT_YUV422P; } From 588316e3f1f7033a12564fad12e84a8e24ab3b16 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Thu, 15 Sep 2022 01:53:29 +0200 Subject: [PATCH 125/164] locale: New Crowdin updates (#915) * New translations en-US.ini (Danish) * New translations en-US.ini (Chinese Simplified) * New translations en-US.ini (Chinese Simplified) --- data/locale/da-DK.ini | 2 +- data/locale/zh-CN.ini | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/data/locale/da-DK.ini b/data/locale/da-DK.ini index fce1f08a6b..903128c19b 100644 --- a/data/locale/da-DK.ini +++ b/data/locale/da-DK.ini @@ -28,7 +28,7 @@ UI.Menu="StreamFX" UI.Menu.Wiki="Læs Wikien" UI.Menu.Support="Hjælp & Support" UI.Menu.Website="Besøg hjemmesiden StreamFX" -UI.Menu.Discord="Deltag i StreamFX Discord" +UI.Menu.Discord="Tilmeld dig StreamFX Discord" UI.Menu.Twitter="Følg StreamFX på Twitter" UI.Menu.YouTube="Abonner på StreamFX på YouTube" UI.Menu.About="Om StreamFX" diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index ab998baceb..80d3c269bf 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -53,8 +53,8 @@ UI.Updater.Menu.CheckForUpdates.Automatically="自动检查更新" UI.Updater.Menu.Channel="更新通道" UI.Updater.Menu.Channel.Stable="正式版" UI.Updater.Menu.Channel.Candidate="候选版" -UI.Updater.Menu.Channel.Beta="测试版" -UI.Updater.Menu.Channel.Alpha="透明度" +UI.Updater.Menu.Channel.Beta="公开测试版" +UI.Updater.Menu.Channel.Alpha="内部测试版" Encoder.AOM.AV1="AOM AV1 (直接)" Encoder.AOM.AV1.Deprecated="此编码器已废弃,不久将被删除。 请用户尽快切换到集成的 'SVT-AV1' 或 'AOM AV1' 编码器。" @@ -187,11 +187,11 @@ Encoder.FFmpeg.NVENC.RateControl.Mode="模式" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="恒量化参数" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="可变比特率" Encoder.FFmpeg.NVENC.RateControl.Mode.cbr="恒定比特率" -Encoder.FFmpeg.NVENC.RateControl.TwoPass="双通道" +Encoder.FFmpeg.NVENC.RateControl.TwoPass="两次编码" Encoder.FFmpeg.NVENC.RateControl.MultiPass="多次编码" -Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="单次通过" -Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="第一次以四分之一分辨率,第二次以完整分辨率进行二次编码" -Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="以完整分辨率进行二次编码" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.disabled="一次编码" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.qres="第一次以四分之一分辨率,第二次以完整分辨率进行两次编码" +Encoder.FFmpeg.NVENC.RateControl.MultiPass.fullres="以完整分辨率进行两次编码" Encoder.FFmpeg.NVENC.RateControl.LookAhead="预测(Look Ahead)" Encoder.FFmpeg.NVENC.RateControl.AdaptiveI="自适应 I 帧" Encoder.FFmpeg.NVENC.RateControl.AdaptiveB="自适应 B 帧" @@ -493,15 +493,15 @@ Codec.HEVC.Profile.rext="范围扩展" Codec.HEVC.Tier="等级" Codec.HEVC.Tier.main="Main" Codec.HEVC.Tier.high="High" -Codec.HEVC.Level="水平" +Codec.HEVC.Level="级别" Codec.ProRes.Profile="配置" Codec.ProRes.Profile.APCO="422 代理 (APCO)" -Codec.ProRes.Profile.APCS="422 简化/LT (APCS)" -Codec.ProRes.Profile.APCN="422 标准 (APCN)" -Codec.ProRes.Profile.APCH="422 高品质/高清(APCH)" -Codec.ProRes.Profile.AP4H="4444 高品质/高清(AP4H)" -Codec.ProRes.Profile.AP4X="444 超高品质/XQ (AP4X)" +Codec.ProRes.Profile.APCS="422 Lite/LT (APCS)" +Codec.ProRes.Profile.APCN="422 Standard (APCN)" +Codec.ProRes.Profile.APCH="422 High Quality/HQ (APCH)" +Codec.ProRes.Profile.AP4H="4444 High Quality/HQ (AP4H)" +Codec.ProRes.Profile.AP4X="4444 Extreme Quality/XQ (AP4X)" Codec.DNxHR.Profile="配置" Codec.DNxHR.Profile.dnxhd="DNxHD" From 454f8eff839fe641272e73837624929301697c78 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 15 Sep 2022 04:07:57 +0200 Subject: [PATCH 126/164] templates/windows/installer: Check for the correct Mutexes --- templates/windows/installer.iss.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 9250eaa86a..6372f4bdfb 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -21,7 +21,7 @@ AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} -AppMutex={#MyAppName} +AppMutex=@PROJECT_NAME@,Global\@PROJECT_NAME@ ; Versioning VersionInfoProductName={#MyAppName} @@ -46,6 +46,7 @@ PrivilegesRequiredOverridesAllowed=dialog commandline WizardStyle=modern WizardResizable=yes SetupIconFile="@PROJECT_SOURCE_DIR@/media/icon.ico" +SetupMutex=@PROJECT_NAME@-Setup,Global\@PROJECT_NAME@-Setup UninstallDisplayIcon={uninstallexe} ; Other Information From 242a5dcac24f204be5c0eabc856e6035a55fdff5 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 15 Sep 2022 04:38:14 +0200 Subject: [PATCH 127/164] templates/windows/installer: Extract uninstaller to portable installations It is now possible to properly uninstall StreamFX from portable installations, without any registry being necessary. --- templates/windows/installer.iss.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 6372f4bdfb..e0b90d0076 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -51,7 +51,8 @@ UninstallDisplayIcon={uninstallexe} ; Other Information UsePreviousAppDir=no -Uninstallable=not IsPortablePagePortableChoiceChecked() +Uninstallable=yes +CreateUninstallRegKey=not IsPortablePagePortableChoiceChecked() DefaultDirName={code:GetDefaultDirectory} DefaultGroupName={#MyAppName} AllowNoIcons=yes From a15d2d3c892bdc9a8b11078124f69f5811c299ad Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 15 Sep 2022 04:07:57 +0200 Subject: [PATCH 128/164] templates/windows/installer: Always show install directory selection --- templates/windows/installer.iss.in | 8 -------- 1 file changed, 8 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index e0b90d0076..4623db7e6d 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -330,14 +330,6 @@ end; function ShouldSkipPage(PageID: Integer): Boolean; begin Result := False; - if (PageID = wpSelectDir) then begin - if (not IsPortablePagePortableChoiceChecked()) then begin - if (IsUpgrade()) then begin - Result := True; - Exit; - end; - end; - end; end; // ------------------------------------------------------------------------------------------------------------------ // From c9239405e28fbc81be36474f9f581f53824711a0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 15 Sep 2022 04:37:22 +0200 Subject: [PATCH 129/164] templates/windows/installer: Don't warn about existing directories Also don't append default directory name if possible. --- templates/windows/installer.iss.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 4623db7e6d..f4653b8545 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -49,12 +49,18 @@ SetupIconFile="@PROJECT_SOURCE_DIR@/media/icon.ico" SetupMutex=@PROJECT_NAME@-Setup,Global\@PROJECT_NAME@-Setup UninstallDisplayIcon={uninstallexe} -; Other Information +; Directory Choices UsePreviousAppDir=no -Uninstallable=yes -CreateUninstallRegKey=not IsPortablePagePortableChoiceChecked() +DisableDirPage=no +DirExistsWarning=no DefaultDirName={code:GetDefaultDirectory} +AppendDefaultDirName=no DefaultGroupName={#MyAppName} +AppendDefaultGroupName=yes + +; Other Information +Uninstallable=yes +CreateUninstallRegKey=not IsPortablePagePortableChoiceChecked() AllowNoIcons=yes LicenseFile="@ISS_SOURCE_DIR@/LICENSE" OutputDir="@ISS_PACKAGE_DIR@" From 63540faf3df73062959fe6558c2722e2216bdbc7 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 17 Sep 2022 09:48:26 +0200 Subject: [PATCH 130/164] templates/windows/installer: Formatting --- templates/windows/installer.iss.in | 336 +++++++++++++++-------------- 1 file changed, 173 insertions(+), 163 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index f4653b8545..0ecc47c626 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -84,26 +84,57 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" [Code] // ------------------------------------------------------------------------------------------------------------------ // var - oPortablePageStaticChoice: TNewRadioButton; - oPortablePagePortableChoice: TNewRadioButton; + oPortablePageStaticChoice: TNewRadioButton; + oPortablePagePortableChoice: TNewRadioButton; -function FindRegistryKey(): String; forward; +// InnoSetup +procedure InitializeWizard; forward; +function ShouldSkipPage(PageID: Integer): Boolean; forward; +function PrepareToInstall(var NeedsRestart: Boolean): String; forward; function GetDefaultDirectory(Value: String): String; forward; + +// Which installation mode is selected? +function IsPortablePagePortableChoiceChecked(): Boolean; forward; + +// Other Metadata +function FindRegistryKey(): String; forward; function GetUninstallerPath(): String; forward; function IsUpgrade(): Boolean; forward; -function IsPortablePagePortableChoiceChecked(): Boolean; forward; function UninstallOldVersion(): Integer; forward; + +// Mode Page +function CreatePortablePage: TWizardPage; forward; procedure OnPortablePagePortableChoiceClick(Sender: TObject); forward; procedure OnPortablePageStaticChoiceClick(Sender: TObject); forward; -function CreatePortablePage: TWizardPage; forward; -procedure InitializeWizard; forward; -function ShouldSkipPage(PageID: Integer): Boolean; forward; -function PrepareToInstall(var NeedsRestart: Boolean): String; forward; + // ------------------------------------------------------------------------------------------------------------------ // -function FindRegistryKey(): String; +procedure InitializeWizard; +var + oPortablePage: TWizardPage; begin - Result := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting('AppId')}_is1'); + oPortablePage := CreatePortablePage(); +end; + +// ------------------------------------------------------------------------------------------------------------------ // +function ShouldSkipPage(PageID: Integer): Boolean; +begin + Result := False; +end; + +// ------------------------------------------------------------------------------------------------------------------ // +function PrepareToInstall(var NeedsRestart: Boolean): String; +var + iResultCode: Integer; +begin + // Attempt to remove old version if it exists. + if (IsUpgrade()) then begin + UninstallOldVersion(); + end; + + // Also ensure that we have the necessary prerequisites installed to run the program. + ExtractTemporaryFile('msvc-redist-helper.exe'); + Exec(ExpandConstant('{tmp}\msvc-redist-helper.exe'), '2019', '', SW_HIDE, ewWaitUntilTerminated, iResultCode); end; // ------------------------------------------------------------------------------------------------------------------ // @@ -133,6 +164,12 @@ begin Result := sInstallPath end; +// ------------------------------------------------------------------------------------------------------------------ // +function FindRegistryKey(): String; +begin + Result := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting('AppId')}_is1'); +end; + // ------------------------------------------------------------------------------------------------------------------ // function GetUninstallerPath(): String; var @@ -182,18 +219,18 @@ end; // ------------------------------------------------------------------------------------------------------------------ // procedure OnPortablePagePortableChoiceClick(Sender: TObject); begin - oPortablePageStaticChoice.Checked := False; - oPortablePagePortableChoice.Checked := True; + oPortablePageStaticChoice.Checked := False; + oPortablePagePortableChoice.Checked := True; end; procedure OnPortablePageStaticChoiceClick(Sender: TObject); begin - if (not oPortablePageStaticChoice.Enabled) then begin - OnPortablePagePortableChoiceClick(Sender); - end else begin - oPortablePageStaticChoice.Checked := True; - oPortablePagePortableChoice.Checked := False; - end; + if (not oPortablePageStaticChoice.Enabled) then begin + OnPortablePagePortableChoiceClick(Sender); + end else begin + oPortablePageStaticChoice.Checked := True; + oPortablePagePortableChoice.Checked := False; + end; end; function IsPortablePagePortableChoiceChecked(): Boolean; @@ -203,152 +240,125 @@ end; function CreatePortablePage: TWizardPage; var - oPage: TWizardPage; - oStaticPanel: TPanel; - oStaticChoice: TNewRadioButton; - oStaticText: TLabel; - oStaticWarningText: TLabel; - oPortablePanel: TPanel; - oPortableChoice: TNewRadioButton; - oPortableText: TLabel; -begin - // Build a page that asks a user if they want to use Movable or Static installation. - oPage := CreateCustomPage(wpLicense, - 'Installation Type', - 'Select how to install StreamFX on your System'); - - oStaticPanel := TPanel.Create(oPage); - oStaticPanel.Parent := oPage.Surface; - oStaticPanel.ParentBackground := False; - oStaticPanel.Left := ScaleX(5); - oStaticPanel.Top := ScaleY(5); - oStaticPanel.Width := oPage.SurfaceWidth - ScaleX(10); - oStaticPanel.Height := ScaleY(100); - oStaticPanel.Anchors := [akLeft, akTop, akRight]; - oStaticPanel.Color := clWindow; - oStaticPanel.BevelKind := bkTile; - oStaticPanel.BevelInner := bvNone; - oStaticPanel.BevelOuter := bvRaised; - oStaticPanel.BevelWidth := 1; - oStaticPanel.OnClick := @OnPortablePageStaticChoiceClick; - - oStaticChoice := TNewRadioButton.Create(oStaticPanel); - oPortablePageStaticChoice := oStaticChoice; - oStaticChoice.Parent := oStaticPanel; - oStaticChoice.ParentBackground := False; - oStaticChoice.Left := ScaleX(5); - oStaticChoice.Top := ScaleY(5); - oStaticChoice.Width := oStaticPanel.Width - ScaleX(10); - oStaticChoice.Height := ScaleY(20); - oStaticChoice.Anchors := [akLeft, akTop, akRight]; - oStaticChoice.Caption := 'Static'; - oStaticChoice.Font.Style := [fsBold]; - oStaticChoice.OnClick := @OnPortablePageStaticChoiceClick; - - oStaticText := TLabel.Create(oStaticPanel); - oStaticText.Parent := oStaticPanel; - oStaticText.AutoSize := False; - oStaticText.Left := ScaleX(5); - oStaticText.Top := ScaleY(5) + oStaticChoice.Top + oStaticChoice.Height; - oStaticText.Width := oStaticPanel.Width - ScaleX(10); - oStaticText.Height := oStaticPanel.Height - ScaleX(5) - oStaticText.Top; - oStaticText.Anchors := [akLeft, akTop, akRight]; - oStaticText.WordWrap := True - oStaticText.Caption := 'Install for use in a static version of OBS Studio, with all necessary features to support it.'; - oStaticText.OnClick := @OnPortablePageStaticChoiceClick; - - oPortablePanel := TPanel.Create(oPage); - oPortablePanel.Parent := oPage.Surface; - oPortablePanel.ParentBackground := False; - oPortablePanel.Left := ScaleX(5); - oPortablePanel.Top := ScaleY(5) + oStaticPanel.Top + oStaticPanel.Height; - oPortablePanel.Width := oPage.SurfaceWidth - ScaleX(10); - oPortablePanel.Height := ScaleY(100); - oPortablePanel.Anchors := [akLeft, akTop, akRight]; - oPortablePanel.Color := clWindow; - oPortablePanel.BevelKind := bkTile; - oPortablePanel.BevelInner := bvNone; - oPortablePanel.BevelOuter := bvRaised; - oPortablePanel.BevelWidth := 1; - oPortablePanel.OnClick := @OnPortablePagePortableChoiceClick; - - oPortableChoice := TNewRadioButton.Create(oPortablePanel); - oPortablePagePortableChoice := oPortableChoice; - oPortableChoice.Parent := oPortablePanel; - oPortableChoice.ParentBackground := False; - oPortableChoice.Left := ScaleX(5); - oPortableChoice.Top := ScaleY(5); - oPortableChoice.Width := oPortablePanel.Width - ScaleX(10); - oPortableChoice.Height := ScaleY(20); - oPortableChoice.Anchors := [akLeft, akTop, akRight]; - oPortableChoice.Caption := 'Portable'; - oPortableChoice.Font.Style := [fsBold]; - oPortableChoice.OnClick := @OnPortablePagePortableChoiceClick; - - oPortableText := TLabel.Create(oPortablePanel); - oPortableText.Parent := oPortablePanel; - oPortableText.AutoSize := False; - oPortableText.Left := ScaleX(5); - oPortableText.Top := ScaleY(5) + oPortableChoice.Top + oPortableChoice.Height; - oPortableText.Width := oPortablePanel.Width - ScaleX(10); - oPortableText.Height := oPortablePanel.Height - ScaleX(5) - oPortableText.Top; - oPortableText.Anchors := [akLeft, akTop, akRight]; - oPortableText.WordWrap := True - oPortableText.Caption := 'Install for use in portable or multi-environment scenarios, which require StreamFX to not be tied to the System itself. The uninstaller, automatic updates and other system-dependent features will be unavailable.'; - oPortableText.OnClick := @OnPortablePagePortableChoiceClick; - - if (not IsAdmin()) then begin - oStaticWarningText := TLabel.Create(oStaticPanel); - oStaticWarningText.Parent := oStaticPanel; - oStaticWarningText.AutoSize := False; - oStaticWarningText.Left := ScaleX(5); - oStaticWarningText.Top := oPortablePanel.Height - ScaleY(5) - ScaleY(15); - oStaticWarningText.Width := oPortablePanel.Width - ScaleX(10); - oStaticWarningText.Height := ScaleY(15); - oStaticWarningText.Anchors := [akLeft, akBottom, akRight]; - oStaticWarningText.WordWrap := True - oStaticWarningText.Font.Color := clRed; - oStaticWarningText.Font.Style := [fsBold]; - oStaticWarningText.Caption := 'Please launch the Installer as Administrator for static installations.'; - - oStaticPanel.Enabled := False; - oStaticChoice.Enabled := False; - oStaticText.Enabled := False; - - oStaticChoice.Checked := False; - oPortableChoice.Checked := True; - end else begin - oStaticChoice.Checked := True; - oPortableChoice.Checked := False; - end; - - Result := oPage; -end; - -procedure InitializeWizard; -var - oPortablePage: TWizardPage; -begin - oPortablePage := CreatePortablePage(); -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function ShouldSkipPage(PageID: Integer): Boolean; -begin - Result := False; -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function PrepareToInstall(var NeedsRestart: Boolean): String; -var - iResultCode: Integer; + oPage: TWizardPage; + oStaticPanel: TPanel; + oStaticChoice: TNewRadioButton; + oStaticText: TLabel; + oStaticWarningText: TLabel; + oPortablePanel: TPanel; + oPortableChoice: TNewRadioButton; + oPortableText: TLabel; begin - // Attempt to remove old version if it exists. - if (IsUpgrade()) then begin - UninstallOldVersion(); + // Build a page that asks a user if they want to use Movable or Static installation. + oPage := CreateCustomPage(wpLicense, + 'Installation Type', + 'Select how to install StreamFX on your System'); + + oStaticPanel := TPanel.Create(oPage); + oStaticPanel.Parent := oPage.Surface; + oStaticPanel.ParentBackground := False; + oStaticPanel.Left := ScaleX(5); + oStaticPanel.Top := ScaleY(5); + oStaticPanel.Width := oPage.SurfaceWidth - ScaleX(10); + oStaticPanel.Height := ScaleY(100); + oStaticPanel.Anchors := [akLeft, akTop, akRight]; + oStaticPanel.Color := clWindow; + oStaticPanel.BevelKind := bkTile; + oStaticPanel.BevelInner := bvNone; + oStaticPanel.BevelOuter := bvRaised; + oStaticPanel.BevelWidth := 1; + oStaticPanel.OnClick := @OnPortablePageStaticChoiceClick; + + oStaticChoice := TNewRadioButton.Create(oStaticPanel); + oPortablePageStaticChoice := oStaticChoice; + oStaticChoice.Parent := oStaticPanel; + oStaticChoice.ParentBackground := False; + oStaticChoice.Left := ScaleX(5); + oStaticChoice.Top := ScaleY(5); + oStaticChoice.Width := oStaticPanel.Width - ScaleX(10); + oStaticChoice.Height := ScaleY(20); + oStaticChoice.Anchors := [akLeft, akTop, akRight]; + oStaticChoice.Caption := 'Static'; + oStaticChoice.Font.Style := [fsBold]; + oStaticChoice.OnClick := @OnPortablePageStaticChoiceClick; + + oStaticText := TLabel.Create(oStaticPanel); + oStaticText.Parent := oStaticPanel; + oStaticText.AutoSize := False; + oStaticText.Left := ScaleX(5); + oStaticText.Top := ScaleY(5) + oStaticChoice.Top + oStaticChoice.Height; + oStaticText.Width := oStaticPanel.Width - ScaleX(10); + oStaticText.Height := oStaticPanel.Height - ScaleX(5) - oStaticText.Top; + oStaticText.Anchors := [akLeft, akTop, akRight]; + oStaticText.WordWrap := True + oStaticText.Caption := 'Install for use in a static version of OBS Studio, with all necessary features to support it.'; + oStaticText.OnClick := @OnPortablePageStaticChoiceClick; + + oPortablePanel := TPanel.Create(oPage); + oPortablePanel.Parent := oPage.Surface; + oPortablePanel.ParentBackground := False; + oPortablePanel.Left := ScaleX(5); + oPortablePanel.Top := ScaleY(5) + oStaticPanel.Top + oStaticPanel.Height; + oPortablePanel.Width := oPage.SurfaceWidth - ScaleX(10); + oPortablePanel.Height := ScaleY(100); + oPortablePanel.Anchors := [akLeft, akTop, akRight]; + oPortablePanel.Color := clWindow; + oPortablePanel.BevelKind := bkTile; + oPortablePanel.BevelInner := bvNone; + oPortablePanel.BevelOuter := bvRaised; + oPortablePanel.BevelWidth := 1; + oPortablePanel.OnClick := @OnPortablePagePortableChoiceClick; + + oPortableChoice := TNewRadioButton.Create(oPortablePanel); + oPortablePagePortableChoice := oPortableChoice; + oPortableChoice.Parent := oPortablePanel; + oPortableChoice.ParentBackground := False; + oPortableChoice.Left := ScaleX(5); + oPortableChoice.Top := ScaleY(5); + oPortableChoice.Width := oPortablePanel.Width - ScaleX(10); + oPortableChoice.Height := ScaleY(20); + oPortableChoice.Anchors := [akLeft, akTop, akRight]; + oPortableChoice.Caption := 'Portable'; + oPortableChoice.Font.Style := [fsBold]; + oPortableChoice.OnClick := @OnPortablePagePortableChoiceClick; + + oPortableText := TLabel.Create(oPortablePanel); + oPortableText.Parent := oPortablePanel; + oPortableText.AutoSize := False; + oPortableText.Left := ScaleX(5); + oPortableText.Top := ScaleY(5) + oPortableChoice.Top + oPortableChoice.Height; + oPortableText.Width := oPortablePanel.Width - ScaleX(10); + oPortableText.Height := oPortablePanel.Height - ScaleX(5) - oPortableText.Top; + oPortableText.Anchors := [akLeft, akTop, akRight]; + oPortableText.WordWrap := True + oPortableText.Caption := 'Install for use in portable or multi-environment scenarios, which require StreamFX to not be tied to the System itself. The uninstaller, automatic updates and other system-dependent features will be unavailable.'; + oPortableText.OnClick := @OnPortablePagePortableChoiceClick; + + if (not IsAdmin()) then begin + oStaticWarningText := TLabel.Create(oStaticPanel); + oStaticWarningText.Parent := oStaticPanel; + oStaticWarningText.AutoSize := False; + oStaticWarningText.Left := ScaleX(5); + oStaticWarningText.Top := oPortablePanel.Height - ScaleY(5) - ScaleY(15); + oStaticWarningText.Width := oPortablePanel.Width - ScaleX(10); + oStaticWarningText.Height := ScaleY(15); + oStaticWarningText.Anchors := [akLeft, akBottom, akRight]; + oStaticWarningText.WordWrap := True + oStaticWarningText.Font.Color := clRed; + oStaticWarningText.Font.Style := [fsBold]; + oStaticWarningText.Caption := 'Please launch the Installer as Administrator for static installations.'; + + oStaticPanel.Enabled := False; + oStaticChoice.Enabled := False; + oStaticText.Enabled := False; + + oStaticChoice.Checked := False; + oPortableChoice.Checked := True; + end else begin + oStaticChoice.Checked := True; + oPortableChoice.Checked := False; end; - // Also ensure that we have the necessary prerequisites installed to run the program. - ExtractTemporaryFile('msvc-redist-helper.exe'); - Exec(ExpandConstant('{tmp}\msvc-redist-helper.exe'), '2019', '', SW_HIDE, ewWaitUntilTerminated, iResultCode); + Result := oPage; end; + From 12c9fe51fb81a08a7be0cc7eae628e30a4660c21 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 17 Sep 2022 09:55:28 +0200 Subject: [PATCH 131/164] templates/windows/installer: Enable split binary and data installation This is not something InnoSetup is designed for, but hey, it does work! --- templates/windows/installer.iss.in | 49 +++++++++++++++++++----------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 0ecc47c626..f241137d98 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -73,7 +73,8 @@ LZMAAlgorithm=1 Name: "english"; MessagesFile: "compiler:Default.isl" [Files] -Source: "@ISS_FILES_DIR@/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "@ISS_FILES_DIR@/data/obs-plugins/@PROJECT_NAME@/*"; DestDir: "{code:GetOutputDataDir}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "@ISS_FILES_DIR@/obs-plugins/@D_PLATFORM_BITS@bit/*"; DestDir: "{code:GetOutputBinaryDir}"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "@PROJECT_SOURCE_DIR@/templates/windows/msvc-redist-helper.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy noencryption ; NOTE: Don't use "Flags: ignoreversion" on any shared system files @@ -92,6 +93,8 @@ procedure InitializeWizard; forward; function ShouldSkipPage(PageID: Integer): Boolean; forward; function PrepareToInstall(var NeedsRestart: Boolean): String; forward; function GetDefaultDirectory(Value: String): String; forward; +function GetOutputBinaryDir(Value: String): String; forward; +function GetOutputDataDir(Value: String): String; forward; // Which installation mode is selected? function IsPortablePagePortableChoiceChecked(): Boolean; forward; @@ -140,28 +143,38 @@ end; // ------------------------------------------------------------------------------------------------------------------ // function GetDefaultDirectory(Value: String): String; var - sInstallPath: String; + sPath: String; begin - // 1. Use the path we were given on call. - sInstallPath := Value; - - // 2. If that was empty, try and find it ourselves from the registry. - if (sInstallPath = '') then - RegQueryStringValue(HKA64, FindRegistryKey(), 'InstallLocation', sInstallPath); + // Otherwise, try and figure out where the previous installation of the same type went to. + if (RegQueryStringValue(HKA64, FindRegistryKey(), 'InstallLocation', sPath)) then begin + Result := sPath; + exit; + end; - // 2. If empty, try and find the "Local Machine" installation of OBS Studio. - if (sInstallPath = '') then - RegQueryStringValue(HKLM64, 'SOFTWARE\OBS Studio', '', sInstallPath); + // Install to OBS Studio by default. + if (RegQueryStringValue(HKLM64, 'SOFTWARE\OBS Studio', '', sPath)) then begin + Result := sPath; + exit; + end; - // 3. If empty, try and find the "Current User" installation of OBS Studio. - if (sInstallPath = '') then - RegQueryStringValue(HKCU64, 'SOFTWARE\OBS Studio', '', sInstallPath); + exit; +end; - // 6. If empty, just use the default path. - if (sInstallPath = '') then - sInstallPath := ExpandConstant('{commonpf}\obs-studio'); +// ------------------------------------------------------------------------------------------------------------------ // +function GetOutputBinaryDir(Value: String): String; +var + sPath: String; +begin + sPath := ExpandConstant('{app}\obs-plugins\@D_PLATFORM_BITS@bit\'); + Result := sPath; +end; - Result := sInstallPath +function GetOutputDataDir(Value: String): String; +var + sPath: String; +begin + sPath := ExpandConstant('{app}\data\obs-plugins\@PROJECT_NAME@\'); + Result := sPath; end; // ------------------------------------------------------------------------------------------------------------------ // From 3ce695bccc3a0f6239f36aa49fd9eb7fdbb69a7c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 17 Sep 2022 10:06:02 +0200 Subject: [PATCH 132/164] templates/windows/installer: Install System-wide installations to ProgramData With OBS Studio 0.15.0 came a better location for plugins to install to, which solves many of the current issues. While this location still requires Administrator rights to write to, it is a much safer location than writing directly into the OBS Studio installation directory. --- templates/windows/installer.iss.in | 54 +++++++++++++++++------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index f241137d98..6f6fe9e87e 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -60,7 +60,7 @@ AppendDefaultGroupName=yes ; Other Information Uninstallable=yes -CreateUninstallRegKey=not IsPortablePagePortableChoiceChecked() +CreateUninstallRegKey=not IsPortableMode() AllowNoIcons=yes LicenseFile="@ISS_SOURCE_DIR@/LICENSE" OutputDir="@ISS_PACKAGE_DIR@" @@ -97,10 +97,10 @@ function GetOutputBinaryDir(Value: String): String; forward; function GetOutputDataDir(Value: String): String; forward; // Which installation mode is selected? -function IsPortablePagePortableChoiceChecked(): Boolean; forward; +function IsPortableMode(): Boolean; forward; // Other Metadata -function FindRegistryKey(): String; forward; +function AppRegistryKey(): String; forward; function GetUninstallerPath(): String; forward; function IsUpgrade(): Boolean; forward; function UninstallOldVersion(): Integer; forward; @@ -146,16 +146,13 @@ var sPath: String; begin // Otherwise, try and figure out where the previous installation of the same type went to. - if (RegQueryStringValue(HKA64, FindRegistryKey(), 'InstallLocation', sPath)) then begin + if (RegQueryStringValue(HKA64, AppRegistryKey(), 'InstallLocation', sPath)) then begin Result := sPath; exit; end; - // Install to OBS Studio by default. - if (RegQueryStringValue(HKLM64, 'SOFTWARE\OBS Studio', '', sPath)) then begin - Result := sPath; - exit; - end; + // Install to ProgramData. + Result := ExpandConstant('{commonappdata}\obs-studio\plugins\@PROJECT_NAME@'); exit; end; @@ -165,7 +162,11 @@ function GetOutputBinaryDir(Value: String): String; var sPath: String; begin - sPath := ExpandConstant('{app}\obs-plugins\@D_PLATFORM_BITS@bit\'); + if (IsPortableMode()) then begin + sPath := ExpandConstant('{app}\obs-plugins\@D_PLATFORM_BITS@bit\'); + end else begin + sPath := ExpandConstant('{app}\bin\@D_PLATFORM_BITS@bit\'); + end; Result := sPath; end; @@ -173,23 +174,21 @@ function GetOutputDataDir(Value: String): String; var sPath: String; begin - sPath := ExpandConstant('{app}\data\obs-plugins\@PROJECT_NAME@\'); + if (IsPortableMode()) then begin + sPath := ExpandConstant('{app}\data\obs-plugins\@PROJECT_NAME@\'); + end else begin + sPath := ExpandConstant('{app}\data\'); + end; Result := sPath; end; -// ------------------------------------------------------------------------------------------------------------------ // -function FindRegistryKey(): String; -begin - Result := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting('AppId')}_is1'); -end; - // ------------------------------------------------------------------------------------------------------------------ // function GetUninstallerPath(): String; var sRegistryKey: String; sUninstallerPath: String; begin - sRegistryKey := FindRegistryKey(); + sRegistryKey := AppRegistryKey(); RegQueryStringValue(HKLM64, sRegistryKey, 'UninstallString', sUninstallerPath); @@ -205,10 +204,22 @@ begin Result := sUninstallerPath; end; +// ------------------------------------------------------------------------------------------------------------------ // +function IsPortableMode(): Boolean; +begin + Result := oPortablePagePortableChoice.Checked; +end; + +// ------------------------------------------------------------------------------------------------------------------ // +function AppRegistryKey(): String; +begin + Result := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting('AppId')}_is1'); +end; + // ------------------------------------------------------------------------------------------------------------------ // function IsUpgrade(): Boolean; begin - Result := (not IsPortablePagePortableChoiceChecked()) and (GetUninstallerPath() <> ''); + Result := (not IsPortableMode()) and (GetUninstallerPath() <> ''); end; // ------------------------------------------------------------------------------------------------------------------ // @@ -246,11 +257,6 @@ begin end; end; -function IsPortablePagePortableChoiceChecked(): Boolean; -begin - Result := oPortablePagePortableChoice.Checked; -end; - function CreatePortablePage: TWizardPage; var oPage: TWizardPage; From 6701263e1042b080ad6f55f5726f2c3a584eec04 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 15 Sep 2022 04:37:22 +0200 Subject: [PATCH 133/164] templates/windows/installer: Add current user installation method Thanks to the PR by @abcdw (https://github.com/obsproject/obs-studio/pull/4067) we can support 'local user' installations. These will allow end users to install StreamFX without requiring Administrator rights, or learning how to use OBS Studio in portable mode. --- templates/windows/installer.iss.in | 599 ++++++++++++++++++++++------- 1 file changed, 452 insertions(+), 147 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 6f6fe9e87e..67528da150 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -61,6 +61,7 @@ AppendDefaultGroupName=yes ; Other Information Uninstallable=yes CreateUninstallRegKey=not IsPortableMode() +ChangesEnvironment=yes AllowNoIcons=yes LicenseFile="@ISS_SOURCE_DIR@/LICENSE" OutputDir="@ISS_PACKAGE_DIR@" @@ -84,9 +85,77 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" [Code] // ------------------------------------------------------------------------------------------------------------------ // +#ifdef UNICODE + #define AW "W" +#else + #define AW "A" +#endif + +type + WPARAM = UINT_PTR; + LPARAM = INT_PTR; + LRESULT = INT_PTR; + LSTATUS = DWord; + LPCVOID = UINT_PTR; + HKEY = DWord; + PHKEY = UINT_PTR; + +const + SMTO_ABORTIFHUNG = 2; + WM_WININICHANGE = $001A; + WM_SETTINGCHANGE = WM_WININICHANGE; +// HKEY_CURRENT_USER = $80000001; +// HKEY_LOCAL_MACHINE = $80000002; + +function advapi32_RegSetKeyValue( + hKey: HKEY; + lpSubKey: string; + lpValueName: string; + dwType: DWord; + lpData: string; + dwData: DWord +): LRESULT; + external 'RegSetKeyValue{#AW}@advapi32.dll stdcall'; + +function SetRegistryKeyValueString( + Root: HKEY; + Key: string; + Name: string; + Value: string +): BOOL; +begin + advapi32_RegSetKeyValue(Root, Key, Name, 2, Value, Length(Value) * 2); + Result := True; +end; + +function user32_SendTextMessageTimeout( + hWnd: HWND; + Msg: UINT; + wParam: WPARAM; + lParam: PAnsiChar; + fuFlags: UINT; + uTimeout: UINT; + out lpdwResult: DWORD): LRESULT; + external 'SendMessageTimeoutA@user32.dll stdcall'; + +procedure RefreshEnvironment(); var - oPortablePageStaticChoice: TNewRadioButton; - oPortablePagePortableChoice: TNewRadioButton; + S: AnsiString; + MsgResult: DWORD; +begin + S := 'Environment'; + user32_SendTextMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, + PAnsiChar(S), SMTO_ABORTIFHUNG, 5000, MsgResult); +end; + +// ------------------------------------------------------------------------------------------------------------------ // +var + oModePageSystemChoice: TNewRadioButton; + oModePageUserChoice: TNewRadioButton; + oModePagePortableChoice: TNewRadioButton; + bIsPortableMode: Boolean; + bIsUserMode: Boolean; + bIsSystemMode: Boolean; // InnoSetup procedure InitializeWizard; forward; @@ -96,7 +165,15 @@ function GetDefaultDirectory(Value: String): String; forward; function GetOutputBinaryDir(Value: String): String; forward; function GetOutputDataDir(Value: String): String; forward; +// Which installation is present? +function IsSystemInstallPresent(): Boolean; forward; +function GetSystemUninstaller(): String; forward; +function IsUserInstallPresent(): Boolean; forward; +function GetUserUninstaller(): String; forward; + // Which installation mode is selected? +function IsSystemMode(): Boolean; forward; +function IsUserMode(): Boolean; forward; function IsPortableMode(): Boolean; forward; // Other Metadata @@ -106,17 +183,26 @@ function IsUpgrade(): Boolean; forward; function UninstallOldVersion(): Integer; forward; // Mode Page -function CreatePortablePage: TWizardPage; forward; -procedure OnPortablePagePortableChoiceClick(Sender: TObject); forward; -procedure OnPortablePageStaticChoiceClick(Sender: TObject); forward; +function CreateModePage: TWizardPage; forward; +procedure OnModePagePortableChoiceClick(Sender: TObject); forward; +procedure OnModePageSystemChoiceClick(Sender: TObject); forward; +// ------------------------------------------------------------------------------------------------------------------ // +function InitializeSetup(): Boolean; +begin + bIsSystemMode := IsAdmin(); + bIsUsermode := not IsAdmin(); + bIsPortableMode := False; + + Result := True; +end; // ------------------------------------------------------------------------------------------------------------------ // procedure InitializeWizard; var - oPortablePage: TWizardPage; + oModePage: TWizardPage; begin - oPortablePage := CreatePortablePage(); + oModePage := CreateModePage(); end; // ------------------------------------------------------------------------------------------------------------------ // @@ -129,6 +215,8 @@ end; function PrepareToInstall(var NeedsRestart: Boolean): String; var iResultCode: Integer; + sPluginsPath: String; + sPluginsDataPath: String; begin // Attempt to remove old version if it exists. if (IsUpgrade()) then begin @@ -138,6 +226,19 @@ begin // Also ensure that we have the necessary prerequisites installed to run the program. ExtractTemporaryFile('msvc-redist-helper.exe'); Exec(ExpandConstant('{tmp}\msvc-redist-helper.exe'), '2019', '', SW_HIDE, ewWaitUntilTerminated, iResultCode); + + // If this is a User install, register the necessary environment changes. + if (IsUserMode()) then begin + sPluginsPath := ExpandConstant('{userpf}\obs-studio\plugins\%module%\bin\'); + StringChangeEx(sPluginsPath, '\', '/', True); + SetRegistryKeyValueString(HKEY_CURRENT_USER, 'Environment', 'OBS_PLUGINS_PATH', sPluginsPath); + + sPluginsDataPath := ExpandConstant('{userpf}\obs-studio\plugins\%module%\data\'); + StringChangeEx(sPluginsDataPath, '\', '/', True); + SetRegistryKeyValueString(HKEY_CURRENT_USER, 'Environment', 'OBS_PLUGINS_DATA_PATH', sPluginsDataPath); + + RefreshEnvironment(); + end; end; // ------------------------------------------------------------------------------------------------------------------ // @@ -145,14 +246,25 @@ function GetDefaultDirectory(Value: String): String; var sPath: String; begin + // If a path was given as an argument, use it. + if (Value <> '') then begin + Result := Value; + exit; + end; + // Otherwise, try and figure out where the previous installation of the same type went to. if (RegQueryStringValue(HKA64, AppRegistryKey(), 'InstallLocation', sPath)) then begin Result := sPath; exit; end; - // Install to ProgramData. - Result := ExpandConstant('{commonappdata}\obs-studio\plugins\@PROJECT_NAME@'); + // In all other cases, change depending on the chosen install method. + if (IsSystemMode()) then begin + // Default to ProgramData/obs-studio/@PROJECT_NAME@ + Result := ExpandConstant('{commonappdata}\obs-studio\plugins\@PROJECT_NAME@'); + end else begin + Result := ExpandConstant('{userpf}\obs-studio\plugins\@PROJECT_NAME@') + end; exit; end; @@ -162,10 +274,12 @@ function GetOutputBinaryDir(Value: String): String; var sPath: String; begin - if (IsPortableMode()) then begin - sPath := ExpandConstant('{app}\obs-plugins\@D_PLATFORM_BITS@bit\'); - end else begin + if (IsSystemMode()) then begin sPath := ExpandConstant('{app}\bin\@D_PLATFORM_BITS@bit\'); + end else if (IsUserMode()) then begin + sPath := ExpandConstant('{app}\bin\'); + end else if (IsPortableMode()) then begin + sPath := ExpandConstant('{app}\obs-plugins\@D_PLATFORM_BITS@bit\'); end; Result := sPath; end; @@ -174,40 +288,86 @@ function GetOutputDataDir(Value: String): String; var sPath: String; begin - if (IsPortableMode()) then begin - sPath := ExpandConstant('{app}\data\obs-plugins\@PROJECT_NAME@\'); - end else begin + if (IsSystemMode()) then begin sPath := ExpandConstant('{app}\data\'); + end else if (IsUserMode()) then begin + sPath := ExpandConstant('{app}\data\@PROJECT_NAME@\'); + end else if (IsPortableMode()) then begin + sPath := ExpandConstant('{app}\data\obs-plugins\@PROJECT_NAME@\'); end; Result := sPath; end; // ------------------------------------------------------------------------------------------------------------------ // -function GetUninstallerPath(): String; +function GetSystemUninstaller(): String; var - sRegistryKey: String; - sUninstallerPath: String; + sPath : String; begin - sRegistryKey := AppRegistryKey(); - - RegQueryStringValue(HKLM64, sRegistryKey, 'UninstallString', sUninstallerPath); + Result := ''; + if (RegQueryStringValue(HKLM64, AppRegistryKey(), 'UninstallString', sPath)) then begin + Result := sPath; + end; +end; - if (sUninstallerPath = '') then - RegQueryStringValue(HKCU64, sRegistryKey, 'UninstallString', sUninstallerPath); +function IsSystemInstallPresent(): Boolean; +var + sPath : String; +begin + sPath := GetSystemUninstaller(); + if (sPath <> '') then begin + Result := True; + end else begin + Result := False; + end; +end; - if (sUninstallerPath = '') then - RegQueryStringValue(HKLM32, sRegistryKey, 'UninstallString', sUninstallerPath); +function GetUserUninstaller(): String; +var + sPath : String; +begin + Result := ''; + if (RegQueryStringValue(HKCU64, AppRegistryKey(), 'UninstallString', sPath)) then begin + Result := sPath; + end; +end; - if (sUninstallerPath = '') then - RegQueryStringValue(HKCU32, sRegistryKey, 'UninstallString', sUninstallerPath); +function IsUserInstallPresent(): Boolean; +var + sPath : String; +begin + sPath := GetUserUninstaller(); + if (sPath <> '') then begin + Result := True; + end else begin + Result := False; + end; +end; - Result := sUninstallerPath; +function GetUninstallerPath(): String; +begin + if (IsSystemMode()) then begin + Result := GetSystemUninstaller(); + end else if (IsUserMode()) then begin + Result := GetUserUninstaller(); + end else begin + Result := ''; + end; end; // ------------------------------------------------------------------------------------------------------------------ // +function IsSystemMode(): Boolean; +begin + Result := bIsSystemMode; +end; + +function IsUserMode(): Boolean; +begin + Result := bIsUserMode; +end; + function IsPortableMode(): Boolean; begin - Result := oPortablePagePortableChoice.Checked; + Result := bIsPortableMode; end; // ------------------------------------------------------------------------------------------------------------------ // @@ -241,143 +401,288 @@ begin end; // ------------------------------------------------------------------------------------------------------------------ // -procedure OnPortablePagePortableChoiceClick(Sender: TObject); +procedure OnModePageSystemChoiceClick(Sender: TObject); begin - oPortablePageStaticChoice.Checked := False; - oPortablePagePortableChoice.Checked := True; + if (not oModePageSystemChoice.Enabled) then begin + OnModePagePortableChoiceClick(Sender); + end else begin + oModePageSystemChoice.Checked := True; + oModePageUserChoice.Checked := False; + oModePagePortableChoice.Checked := False; + bIsSystemMode := True; + bIsUserMode := False; + bIsPortableMode := False; + end; end; -procedure OnPortablePageStaticChoiceClick(Sender: TObject); +procedure onModePageUserChoiceClick(Sender: TObject); begin - if (not oPortablePageStaticChoice.Enabled) then begin - OnPortablePagePortableChoiceClick(Sender); + if (not oModePageUserChoice.Enabled) then begin + OnModePagePortableChoiceClick(Sender); end else begin - oPortablePageStaticChoice.Checked := True; - oPortablePagePortableChoice.Checked := False; + oModePageSystemChoice.Checked := False; + oModePageUserChoice.Checked := True; + oModePagePortableChoice.Checked := False; + bIsSystemMode := False; + bIsUserMode := True; + bIsPortableMode := False; end; end; -function CreatePortablePage: TWizardPage; +procedure OnModePagePortableChoiceClick(Sender: TObject); +begin + oModePageSystemChoice.Checked := False; + oModePageUserChoice.Checked := False; + oModePagePortableChoice.Checked := True; + bIsSystemMode := False; + bIsUserMode := False; + bIsPortableMode := True; +end; + +function CreateModePage: TWizardPage; var oPage: TWizardPage; - oStaticPanel: TPanel; - oStaticChoice: TNewRadioButton; - oStaticText: TLabel; - oStaticWarningText: TLabel; + oSystemPanel: TPanel; + oSystemChoice: TNewRadioButton; + oSystemText: TLabel; + oSystemWarningText: TLabel; + oUserPanel: TPanel; + oUserChoice: TNewRadioButton; + oUserText: TLabel; + oUserWarningText: TLabel; oPortablePanel: TPanel; oPortableChoice: TNewRadioButton; oPortableText: TLabel; + oPortableWarningText: TLabel; + oFractionalHeight: Integer; begin // Build a page that asks a user if they want to use Movable or Static installation. oPage := CreateCustomPage(wpLicense, - 'Installation Type', + 'Installation Mode', 'Select how to install StreamFX on your System'); + oFractionalHeight := ScaleY((oPage.SurfaceHeight - 10) / 3); + + // System-Wide installation + if (True) then begin + oSystemPanel := TPanel.Create(oPage); + oSystemPanel.Parent := oPage.Surface; + oSystemPanel.ParentBackground := False; + oSystemPanel.Left := ScaleX(5); + oSystemPanel.Top := ScaleY(5); + oSystemPanel.Width := oPage.SurfaceWidth - ScaleX(10); + oSystemPanel.Height := oFractionalHeight; + oSystemPanel.Anchors := [akLeft, akTop, akRight]; + oSystemPanel.Color := clWindow; + oSystemPanel.BevelKind := bkTile; + oSystemPanel.BevelInner := bvNone; + oSystemPanel.BevelOuter := bvRaised; + oSystemPanel.BevelWidth := 1; + oSystemPanel.OnClick := @OnModePageSystemChoiceClick; + + oSystemChoice := TNewRadioButton.Create(oSystemPanel); + oModePageSystemChoice := oSystemChoice; + oSystemChoice.Parent := oSystemPanel; + oSystemChoice.ParentBackground := False; + oSystemChoice.Left := ScaleX(5); + oSystemChoice.Top := ScaleY(5); + oSystemChoice.Width := oSystemPanel.Width - ScaleX(10); + oSystemChoice.Height := ScaleY(20); + oSystemChoice.Anchors := [akLeft, akTop, akRight]; + oSystemChoice.Caption := 'All Users'; + oSystemChoice.Font.Style := [fsBold]; + oSystemChoice.OnClick := @OnModePageSystemChoiceClick; + + oSystemText := TLabel.Create(oSystemPanel); + oSystemText.Parent := oSystemPanel; + oSystemText.AutoSize := False; + oSystemText.Left := ScaleX(5); + oSystemText.Top := ScaleY(5) + oSystemChoice.Top + oSystemChoice.Height; + oSystemText.Width := oSystemPanel.Width - ScaleX(10); + oSystemText.Height := oSystemPanel.Height - ScaleX(5) - oSystemText.Top; + oSystemText.Anchors := [akLeft, akTop, akRight]; + oSystemText.WordWrap := True + oSystemText.Caption := 'Install for all users of this System, which will require Administrator rights for future updates. May cause problems with Portable and Current User installations.'; + oSystemText.OnClick := @OnModePageSystemChoiceClick; + + // Not available without Administrator rights. + if (not IsAdmin()) then begin + oSystemWarningText := TLabel.Create(oSystemPanel); + oSystemWarningText.Parent := oSystemPanel; + oSystemWarningText.AutoSize := False; + oSystemWarningText.Left := ScaleX(5); + oSystemWarningText.Top := oSystemPanel.Height - ScaleY(5) - ScaleY(15); + oSystemWarningText.Width := oSystemPanel.Width - ScaleX(10); + oSystemWarningText.Height := ScaleY(15); + oSystemWarningText.Anchors := [akLeft, akBottom, akRight]; + oSystemWarningText.WordWrap := True + oSystemWarningText.Font.Color := clRed; + oSystemWarningText.Font.Style := [fsBold]; + oSystemWarningText.Caption := 'Please launch the installer with Administrator rights.'; + + oSystemPanel.Enabled := False; + oSystemChoice.Enabled := False; + oSystemChoice.Checked := False; + oSystemText.Enabled := False; + end else if (IsUserInstallPresent()) then begin + oSystemWarningText := TLabel.Create(oSystemPanel); + oSystemWarningText.Parent := oSystemPanel; + oSystemWarningText.AutoSize := False; + oSystemWarningText.Left := ScaleX(5); + oSystemWarningText.Top := oSystemPanel.Height - ScaleY(5) - ScaleY(15); + oSystemWarningText.Width := oSystemPanel.Width - ScaleX(10); + oSystemWarningText.Height := ScaleY(15); + oSystemWarningText.Anchors := [akLeft, akBottom, akRight]; + oSystemWarningText.WordWrap := True + oSystemWarningText.Font.Color := $007EFF; + oSystemWarningText.Font.Style := [fsBold]; + oSystemWarningText.Caption := 'A conflicting installation was detected which may cause issues.'; + end; + end; - oStaticPanel := TPanel.Create(oPage); - oStaticPanel.Parent := oPage.Surface; - oStaticPanel.ParentBackground := False; - oStaticPanel.Left := ScaleX(5); - oStaticPanel.Top := ScaleY(5); - oStaticPanel.Width := oPage.SurfaceWidth - ScaleX(10); - oStaticPanel.Height := ScaleY(100); - oStaticPanel.Anchors := [akLeft, akTop, akRight]; - oStaticPanel.Color := clWindow; - oStaticPanel.BevelKind := bkTile; - oStaticPanel.BevelInner := bvNone; - oStaticPanel.BevelOuter := bvRaised; - oStaticPanel.BevelWidth := 1; - oStaticPanel.OnClick := @OnPortablePageStaticChoiceClick; - - oStaticChoice := TNewRadioButton.Create(oStaticPanel); - oPortablePageStaticChoice := oStaticChoice; - oStaticChoice.Parent := oStaticPanel; - oStaticChoice.ParentBackground := False; - oStaticChoice.Left := ScaleX(5); - oStaticChoice.Top := ScaleY(5); - oStaticChoice.Width := oStaticPanel.Width - ScaleX(10); - oStaticChoice.Height := ScaleY(20); - oStaticChoice.Anchors := [akLeft, akTop, akRight]; - oStaticChoice.Caption := 'Static'; - oStaticChoice.Font.Style := [fsBold]; - oStaticChoice.OnClick := @OnPortablePageStaticChoiceClick; - - oStaticText := TLabel.Create(oStaticPanel); - oStaticText.Parent := oStaticPanel; - oStaticText.AutoSize := False; - oStaticText.Left := ScaleX(5); - oStaticText.Top := ScaleY(5) + oStaticChoice.Top + oStaticChoice.Height; - oStaticText.Width := oStaticPanel.Width - ScaleX(10); - oStaticText.Height := oStaticPanel.Height - ScaleX(5) - oStaticText.Top; - oStaticText.Anchors := [akLeft, akTop, akRight]; - oStaticText.WordWrap := True - oStaticText.Caption := 'Install for use in a static version of OBS Studio, with all necessary features to support it.'; - oStaticText.OnClick := @OnPortablePageStaticChoiceClick; - - oPortablePanel := TPanel.Create(oPage); - oPortablePanel.Parent := oPage.Surface; - oPortablePanel.ParentBackground := False; - oPortablePanel.Left := ScaleX(5); - oPortablePanel.Top := ScaleY(5) + oStaticPanel.Top + oStaticPanel.Height; - oPortablePanel.Width := oPage.SurfaceWidth - ScaleX(10); - oPortablePanel.Height := ScaleY(100); - oPortablePanel.Anchors := [akLeft, akTop, akRight]; - oPortablePanel.Color := clWindow; - oPortablePanel.BevelKind := bkTile; - oPortablePanel.BevelInner := bvNone; - oPortablePanel.BevelOuter := bvRaised; - oPortablePanel.BevelWidth := 1; - oPortablePanel.OnClick := @OnPortablePagePortableChoiceClick; - - oPortableChoice := TNewRadioButton.Create(oPortablePanel); - oPortablePagePortableChoice := oPortableChoice; - oPortableChoice.Parent := oPortablePanel; - oPortableChoice.ParentBackground := False; - oPortableChoice.Left := ScaleX(5); - oPortableChoice.Top := ScaleY(5); - oPortableChoice.Width := oPortablePanel.Width - ScaleX(10); - oPortableChoice.Height := ScaleY(20); - oPortableChoice.Anchors := [akLeft, akTop, akRight]; - oPortableChoice.Caption := 'Portable'; - oPortableChoice.Font.Style := [fsBold]; - oPortableChoice.OnClick := @OnPortablePagePortableChoiceClick; - - oPortableText := TLabel.Create(oPortablePanel); - oPortableText.Parent := oPortablePanel; - oPortableText.AutoSize := False; - oPortableText.Left := ScaleX(5); - oPortableText.Top := ScaleY(5) + oPortableChoice.Top + oPortableChoice.Height; - oPortableText.Width := oPortablePanel.Width - ScaleX(10); - oPortableText.Height := oPortablePanel.Height - ScaleX(5) - oPortableText.Top; - oPortableText.Anchors := [akLeft, akTop, akRight]; - oPortableText.WordWrap := True - oPortableText.Caption := 'Install for use in portable or multi-environment scenarios, which require StreamFX to not be tied to the System itself. The uninstaller, automatic updates and other system-dependent features will be unavailable.'; - oPortableText.OnClick := @OnPortablePagePortableChoiceClick; - - if (not IsAdmin()) then begin - oStaticWarningText := TLabel.Create(oStaticPanel); - oStaticWarningText.Parent := oStaticPanel; - oStaticWarningText.AutoSize := False; - oStaticWarningText.Left := ScaleX(5); - oStaticWarningText.Top := oPortablePanel.Height - ScaleY(5) - ScaleY(15); - oStaticWarningText.Width := oPortablePanel.Width - ScaleX(10); - oStaticWarningText.Height := ScaleY(15); - oStaticWarningText.Anchors := [akLeft, akBottom, akRight]; - oStaticWarningText.WordWrap := True - oStaticWarningText.Font.Color := clRed; - oStaticWarningText.Font.Style := [fsBold]; - oStaticWarningText.Caption := 'Please launch the Installer as Administrator for static installations.'; - - oStaticPanel.Enabled := False; - oStaticChoice.Enabled := False; - oStaticText.Enabled := False; - - oStaticChoice.Checked := False; - oPortableChoice.Checked := True; - end else begin - oStaticChoice.Checked := True; - oPortableChoice.Checked := False; + // Local-User installation + if (True) then begin + oUserPanel := TPanel.Create(oPage); + oUserPanel.Parent := oPage.Surface; + oUserPanel.ParentBackground := False; + oUserPanel.Left := ScaleX(5); + oUserPanel.Top := ScaleY(5) + oSystemPanel.Top + oSystemPanel.Height; + oUserPanel.Width := oPage.SurfaceWidth - ScaleX(10); + oUserPanel.Height := oFractionalHeight; + oUserPanel.Anchors := [akLeft, akTop, akRight]; + oUserPanel.Color := clWindow; + oUserPanel.BevelKind := bkTile; + oUserPanel.BevelInner := bvNone; + oUserPanel.BevelOuter := bvRaised; + oUserPanel.BevelWidth := 1; + oUserPanel.OnClick := @OnModePageUserChoiceClick; + + oUserChoice := TNewRadioButton.Create(oUserPanel); + oModePageUserChoice := oUserChoice; + oUserChoice.Parent := oUserPanel; + oUserChoice.ParentBackground := False; + oUserChoice.Left := ScaleX(5); + oUserChoice.Top := ScaleY(5); + oUserChoice.Width := oUserPanel.Width - ScaleX(10); + oUserChoice.Height := ScaleY(20); + oUserChoice.Anchors := [akLeft, akTop, akRight]; + oUserChoice.Caption := 'Current User'; + oUserChoice.Font.Style := [fsBold]; + oUserChoice.OnClick := @OnModePageUserChoiceClick; + + oUserText := TLabel.Create(oUserPanel); + oUserText.Parent := oUserPanel; + oUserText.AutoSize := False; + oUserText.Left := ScaleX(5); + oUserText.Top := ScaleY(5) + oUserChoice.Top + oUserChoice.Height; + oUserText.Width := oUserPanel.Width - ScaleX(10); + oUserText.Height := oUserPanel.Height - ScaleX(5) - oUserText.Top; + oUserText.Anchors := [akLeft, akTop, akRight]; + oUserText.WordWrap := True + oUserText.Caption := 'Install for the current user only, which will allow you to use @PROJECT_NAME@. Updating will not require Administrator rights.'; + oUserText.OnClick := @OnModePageUserChoiceClick; + + // Not available with Administrator rights. + if (IsAdmin()) then begin + oUserWarningText := TLabel.Create(oUserPanel); + oUserWarningText.Parent := oUserPanel; + oUserWarningText.AutoSize := False; + oUserWarningText.Left := ScaleX(5); + oUserWarningText.Top := oUserPanel.Height - ScaleY(5) - ScaleY(15); + oUserWarningText.Width := oUserPanel.Width - ScaleX(10); + oUserWarningText.Height := ScaleY(15); + oUserWarningText.Anchors := [akLeft, akBottom, akRight]; + oUserWarningText.WordWrap := True + oUserWarningText.Font.Color := clRed; + oUserWarningText.Font.Style := [fsBold]; + oUserWarningText.Caption := 'Please launch the Installer without Administrator rights.'; + + oUserPanel.Enabled := False; + oUserChoice.Enabled := False; + oUserChoice.Checked := False; + oUserText.Enabled := False; + end else if (IsSystemInstallPresent()) then begin + oUserWarningText := TLabel.Create(oUserPanel); + oUserWarningText.Parent := oUserPanel; + oUserWarningText.AutoSize := False; + oUserWarningText.Left := ScaleX(5); + oUserWarningText.Top := oUserPanel.Height - ScaleY(5) - ScaleY(15); + oUserWarningText.Width := oUserPanel.Width - ScaleX(10); + oUserWarningText.Height := ScaleY(15); + oUserWarningText.Anchors := [akLeft, akBottom, akRight]; + oUserWarningText.WordWrap := True + oUserWarningText.Font.Color := $007EFF; + oUserWarningText.Font.Style := [fsBold]; + oUserWarningText.Caption := 'A conflicting system wide installation was detected.'; + + oUserPanel.Enabled := False; + oUserChoice.Enabled := False; + oUserChoice.Checked := False; + oUserText.Enabled := False; + end; + end; + + // Portable + if (True) then begin + oPortablePanel := TPanel.Create(oPage); + oPortablePanel.Parent := oPage.Surface; + oPortablePanel.ParentBackground := False; + oPortablePanel.Left := ScaleX(5); + oPortablePanel.Top := ScaleY(5) + oUserPanel.Top + oUserPanel.Height; + oPortablePanel.Width := oPage.SurfaceWidth - ScaleX(10); + oPortablePanel.Height := oFractionalHeight; + oPortablePanel.Anchors := [akLeft, akTop, akRight]; + oPortablePanel.Color := clWindow; + oPortablePanel.BevelKind := bkTile; + oPortablePanel.BevelInner := bvNone; + oPortablePanel.BevelOuter := bvRaised; + oPortablePanel.BevelWidth := 1; + oPortablePanel.OnClick := @OnModePagePortableChoiceClick; + + oPortableChoice := TNewRadioButton.Create(oPortablePanel); + oModePagePortableChoice := oPortableChoice; + oPortableChoice.Parent := oPortablePanel; + oPortableChoice.ParentBackground := False; + oPortableChoice.Left := ScaleX(5); + oPortableChoice.Top := ScaleY(5); + oPortableChoice.Width := oPortablePanel.Width - ScaleX(10); + oPortableChoice.Height := ScaleY(20); + oPortableChoice.Anchors := [akLeft, akTop, akRight]; + oPortableChoice.Caption := 'Portable'; + oPortableChoice.Font.Style := [fsBold]; + oPortableChoice.OnClick := @OnModePagePortableChoiceClick; + + oPortableText := TLabel.Create(oPortablePanel); + oPortableText.Parent := oPortablePanel; + oPortableText.AutoSize := False; + oPortableText.Left := ScaleX(5); + oPortableText.Top := ScaleY(5) + oPortableChoice.Top + oPortableChoice.Height; + oPortableText.Width := oPortablePanel.Width - ScaleX(10); + oPortableText.Height := oPortablePanel.Height - ScaleX(5) - oPortableText.Top; + oPortableText.Anchors := [akLeft, akTop, akRight]; + oPortableText.WordWrap := True + oPortableText.Caption := 'Install for a portable OBS Studio environment.'; + oPortableText.OnClick := @OnModePagePortableChoiceClick; + + // Warn about Administrator rights + if (IsAdmin()) then begin + oPortableWarningText := TLabel.Create(oPortablePanel); + oPortableWarningText.Parent := oPortablePanel; + oPortableWarningText.AutoSize := False; + oPortableWarningText.Left := ScaleX(5); + oPortableWarningText.Top := oPortablePanel.Height - ScaleY(5) - ScaleY(15); + oPortableWarningText.Width := oPortablePanel.Width - ScaleX(10); + oPortableWarningText.Height := ScaleY(15); + oPortableWarningText.Anchors := [akLeft, akBottom, akRight]; + oPortableWarningText.WordWrap := True + oPortableWarningText.Font.Color := $007EFF; + oPortableWarningText.Font.Style := [fsBold]; + oPortableWarningText.Caption := 'Portable installation with Administrator rights may cause unforeseen consequences. Proceed with caution.'; + end; end; + oSystemChoice.Checked := bIsSystemMode; + oUserChoice.Checked := bIsUserMode; + oPortableChoice.Checked := bIsPortableMode; + Result := oPage; end; - From a7d15c7e600ff7b08682dbcee661d0420472306b Mon Sep 17 00:00:00 2001 From: Xaymar Date: Sat, 17 Sep 2022 11:20:25 +0200 Subject: [PATCH 134/164] locale: New Crowdin updates (#928) * New translations en-US.ini (Russian) * New translations en-US.ini (Italian) * New translations en-US.ini (Russian) * New translations en-US.ini (Danish) * New translations en-US.ini (Polish) * New translations en-US.ini (Portuguese, Brazilian) * New translations en-US.ini (Portuguese, Brazilian) --- data/locale/da-DK.ini | 1 + data/locale/it-IT.ini | 1 + data/locale/pl-PL.ini | 1 + data/locale/pt-BR.ini | 15 ++++++++------- data/locale/ru-RU.ini | 5 +++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/data/locale/da-DK.ini b/data/locale/da-DK.ini index 903128c19b..0e06805657 100644 --- a/data/locale/da-DK.ini +++ b/data/locale/da-DK.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Interval type" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Rammer" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekunder" Encoder.FFmpeg.KeyFrames.Interval="Interval" +Encoder.FFmpeg.Framerate="Overstyring af billedfrekvens" Encoder.FFmpeg.AMF.Deprecated="Denne encoder er forældet og vil snart blive fjernet. Brugere opfordres til at migrere til den integrerede \"AMD HW H.264 (AVC)\" eller \"AMD HW H.265 (HEVC)\" encoder så hurtigt som muligt." Encoder.FFmpeg.AMF.Preset="Forudindstillet" diff --git a/data/locale/it-IT.ini b/data/locale/it-IT.ini index e1d0eed53d..e15506ea6e 100644 --- a/data/locale/it-IT.ini +++ b/data/locale/it-IT.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Tipo di intervallo" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Fotogrammi" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Secondi" Encoder.FFmpeg.KeyFrames.Interval="Intervallo" +Encoder.FFmpeg.Framerate="Sovrascrittura del framerate" Encoder.FFmpeg.AMF.Deprecated="Questo encoder è obsoleto e presto sarà rimosso. Gli utenti sono invitati a migrare all'encoder integrato 'AMD HW H.264 (AVC)' o 'AMD HW H.265 (HEVC) il prima possibile." Encoder.FFmpeg.AMF.Preset="Preimpostazioni" diff --git a/data/locale/pl-PL.ini b/data/locale/pl-PL.ini index ab7a1a4dbf..5c2d38056f 100644 --- a/data/locale/pl-PL.ini +++ b/data/locale/pl-PL.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Typ interwału" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Klatki" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Sekundy" Encoder.FFmpeg.KeyFrames.Interval="Interwał" +Encoder.FFmpeg.Framerate="Nadpisywanie liczby klatek na sekundę" Encoder.FFmpeg.AMF.Deprecated="Ten enkoder jest przestarzały i wkrótce zostanie usunięty. Użytkownicy są proszeni o migrację do zintegrowanego 'AMD HW H. Koder 64 (AVC)” lub „AMD HW H.265 (HEVC) tak szybko, jak to możliwe." Encoder.FFmpeg.AMF.Preset="Preset" diff --git a/data/locale/pt-BR.ini b/data/locale/pt-BR.ini index 6385db899b..231a71c621 100644 --- a/data/locale/pt-BR.ini +++ b/data/locale/pt-BR.ini @@ -30,7 +30,7 @@ UI.Menu.Support="Ajuda & Suporte" UI.Menu.Website="Visite o site StreamFX" UI.Menu.Discord="Junte-se ao Discord do StreamFX" UI.Menu.Twitter="Siga o StreamFX no Twitter" -UI.Menu.YouTube="Assine o StreamFX no YouTube" +UI.Menu.YouTube="Increva-se no canal StreamFX no YouTube" UI.Menu.About="Sobre o StreamFX" UI.About.Title="Sobre o StreamFX" @@ -46,11 +46,11 @@ UI.Updater.Dialog.Version.Current="Versão Atual:" UI.Updater.Dialog.Version.Latest="Ultima Versão:" UI.Updater.Dialog.Button.Ok="Ir para a Página de Download" UI.Updater.Dialog.Button.Cancel="Lembre-me mais tarde" -UI.Updater.GitHubPermission.Title="StreamFX precisá da sua permissão para conectar ao GitHub!" -UI.Updater.GitHubPermission.Text="Para poder checar por Updates Manualmente e Atualmente, StreamFX depende da API do GitHub para conseguir as últimas informações.
Por favor leia a Declaração de Privacidade do GitHub, e clique em \"OK\" se você concorda, ou \"Cancelar\" se você discorda." +UI.Updater.GitHubPermission.Title="StreamFX precisa da sua permissão para conectar ao GitHub!" +UI.Updater.GitHubPermission.Text="Para fornecer verificação de atualização manual ou automatizada, o StreamFX depende da API do GitHub para obter as informações mais recentes.
Por favor, leia a Declaração de Privacidade do Github, e clique em 'OK' se você concordar, ou 'Cancelar' se você discordar." UI.Updater.Menu.CheckForUpdates="Procurar Atualizações" UI.Updater.Menu.CheckForUpdates.Automatically="Verificar por atualizações automaticamente" -UI.Updater.Menu.Channel="Atualizar Canal" +UI.Updater.Menu.Channel="Alterar Canal" UI.Updater.Menu.Channel.Stable="Estável" UI.Updater.Menu.Channel.Candidate="Candidato" UI.Updater.Menu.Channel.Beta="Beta" @@ -100,10 +100,10 @@ Encoder.AOM.AV1.RateControl.Buffer.Size="Tamanho" Encoder.AOM.AV1.RateControl.Buffer.Size.Initial="Tamanho inicial" Encoder.AOM.AV1.RateControl.Buffer.Size.Optimal="Tamanho óptimo" Encoder.AOM.AV1.Advanced="Avançado" -Encoder.AOM.AV1.Advanced.Threads="Tópicos" +Encoder.AOM.AV1.Advanced.Threads="Threads" Encoder.AOM.AV1.Advanced.RowMultiThreading="Multi-fios por fila" -Encoder.AOM.AV1.Advanced.Tile.Columns="Colunas de Ladrilho" -Encoder.AOM.AV1.Advanced.Tile.Rows="Fileiras de Azulejos" +Encoder.AOM.AV1.Advanced.Tile.Columns="Colunas Lado a Lado" +Encoder.AOM.AV1.Advanced.Tile.Rows="Linhas de Blocos" Encoder.AOM.AV1.Advanced.Tune="Melodia" Encoder.AOM.AV1.Advanced.Tune.Metric="Métrica" Encoder.AOM.AV1.Advanced.Tune.Metric.PSNR="PSNR" @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Tipo de Intervalo" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Quadros" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Segundos" Encoder.FFmpeg.KeyFrames.Interval="Intervalo" +Encoder.FFmpeg.Framerate="Substituição de Framerate" Encoder.FFmpeg.AMF.Deprecated="Este codificador é depreciado e será removido em breve. Os utilizadores são instados a migrar para o codificador integrado 'AMD HW H.264 (AVC)' ou 'AMD HW H.265 (HEVC)' o mais cedo possível." Encoder.FFmpeg.AMF.Preset="Modelo" diff --git a/data/locale/ru-RU.ini b/data/locale/ru-RU.ini index 464e40bf6e..b870f2028d 100644 --- a/data/locale/ru-RU.ini +++ b/data/locale/ru-RU.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Тип интервала" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Кадры" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Секунды" Encoder.FFmpeg.KeyFrames.Interval="Интервал" +Encoder.FFmpeg.Framerate="Переопределение частоты кадров" Encoder.FFmpeg.AMF.Deprecated="Данный кодировщик устарел и будет удален в ближайшее время. Рекомендуется перейти на встроенные кодировщики 'AMD HW H.264 (AVC)' или 'AMD HW H.265 (HEVC)' как можно скорее." Encoder.FFmpeg.AMF.Preset="Пресет" @@ -207,8 +208,8 @@ Encoder.FFmpeg.NVENC.RateControl.QP.I="I-кадр QP" Encoder.FFmpeg.NVENC.RateControl.QP.P="P-кадр QP" Encoder.FFmpeg.NVENC.RateControl.QP.B="B-кадр QP" Encoder.FFmpeg.NVENC.AQ="Адаптивное Квантование" -Encoder.FFmpeg.NVENC.AQ.Spatial="Пространственное Адаптивное Квантование" -Encoder.FFmpeg.NVENC.AQ.Strength="Степень Пространственного Адаптивного Квантования" +Encoder.FFmpeg.NVENC.AQ.Spatial="Пространственное адаптивное квантование" +Encoder.FFmpeg.NVENC.AQ.Strength="Сила пространственного адаптивного квантования" Encoder.FFmpeg.NVENC.AQ.Temporal="Временнóе адаптивное квантование" Encoder.FFmpeg.NVENC.Other="Другие настройки" Encoder.FFmpeg.NVENC.Other.BFrames="Максимальное количество B-кадров" From fddf21b8dee309c5b02ebeb02537256f71d5d858 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 18 Sep 2022 18:30:15 +0200 Subject: [PATCH 135/164] util/threadpool: Optimize for dynamic thread pooling While the previous approach of a static thread pool worked, it was sub-optimal in its resource usage. Many of the threads would never see a single task, and simply permanently sleep. This seems like a good idea, except that sleeping threads still end up in the scheduler, and thus waste a tiny amount of resources. It is better to instead dynamically spawn threads when needed and only keeping the bare minimum around all the time. These dynamically spawned threads are also explicitly set to background priority which further reduces scheduling overhead. Finally optimizing the memory layout to prevent unwanted false sharing should also keep sporadic wake ups at a minimum. This new model should be able to handle many more tasks than ever before, but is still not as optimal as it could be. --- source/filters/filter-autoframing.cpp | 2 +- source/filters/filter-autoframing.hpp | 2 +- source/filters/filter-denoising.cpp | 2 +- source/filters/filter-denoising.hpp | 2 +- source/filters/filter-upscaling.cpp | 2 +- source/filters/filter-upscaling.hpp | 2 +- source/filters/filter-virtual-greenscreen.cpp | 2 +- source/filters/filter-virtual-greenscreen.hpp | 2 +- source/plugin.cpp | 12 +- source/plugin.hpp | 2 +- source/updater.cpp | 2 +- source/updater.hpp | 2 +- source/util/util-threadpool.cpp | 302 ++++++++++++------ source/util/util-threadpool.hpp | 169 +++++++--- 14 files changed, 336 insertions(+), 169 deletions(-) diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index c9151ac372..ab54daf684 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -897,7 +897,7 @@ void streamfx::filter::autoframing::autoframing_instance::switch_provider(tracki std::bind(&autoframing_instance::task_switch_provider, this, std::placeholders::_1), spd); } -void streamfx::filter::autoframing::autoframing_instance::task_switch_provider(util::threadpool_data_t data) +void streamfx::filter::autoframing::autoframing_instance::task_switch_provider(util::threadpool::task_data_t data) { std::shared_ptr spd = std::static_pointer_cast(data); diff --git a/source/filters/filter-autoframing.hpp b/source/filters/filter-autoframing.hpp index 29ee24ff43..a4aa50826a 100644 --- a/source/filters/filter-autoframing.hpp +++ b/source/filters/filter-autoframing.hpp @@ -148,7 +148,7 @@ namespace streamfx::filter::autoframing { void tracking_tick(float seconds); void switch_provider(tracking_provider provider); - void task_switch_provider(util::threadpool_data_t data); + void task_switch_provider(util::threadpool::task_data_t data); #ifdef ENABLE_FILTER_AUTOFRAMING_NVIDIA void nvar_facedetection_load(); diff --git a/source/filters/filter-denoising.cpp b/source/filters/filter-denoising.cpp index 7b38cceec9..19b64f5001 100644 --- a/source/filters/filter-denoising.cpp +++ b/source/filters/filter-denoising.cpp @@ -409,7 +409,7 @@ void streamfx::filter::denoising::denoising_instance::switch_provider(denoising_ std::bind(&denoising_instance::task_switch_provider, this, std::placeholders::_1), spd); } -void streamfx::filter::denoising::denoising_instance::task_switch_provider(util::threadpool_data_t data) +void streamfx::filter::denoising::denoising_instance::task_switch_provider(util::threadpool::task_data_t data) { std::shared_ptr spd = std::static_pointer_cast(data); diff --git a/source/filters/filter-denoising.hpp b/source/filters/filter-denoising.hpp index a524e6a9b3..72f67bf685 100644 --- a/source/filters/filter-denoising.hpp +++ b/source/filters/filter-denoising.hpp @@ -85,7 +85,7 @@ namespace streamfx::filter::denoising { private: void switch_provider(denoising_provider provider); - void task_switch_provider(util::threadpool_data_t data); + void task_switch_provider(util::threadpool::task_data_t data); #ifdef ENABLE_FILTER_DENOISING_NVIDIA void nvvfx_denoising_load(); diff --git a/source/filters/filter-upscaling.cpp b/source/filters/filter-upscaling.cpp index cc58f564c8..ab69ed4fad 100644 --- a/source/filters/filter-upscaling.cpp +++ b/source/filters/filter-upscaling.cpp @@ -394,7 +394,7 @@ void streamfx::filter::upscaling::upscaling_instance::switch_provider(upscaling_ std::bind(&upscaling_instance::task_switch_provider, this, std::placeholders::_1), spd); } -void streamfx::filter::upscaling::upscaling_instance::task_switch_provider(util::threadpool_data_t data) +void streamfx::filter::upscaling::upscaling_instance::task_switch_provider(util::threadpool::task_data_t data) { std::shared_ptr spd = std::static_pointer_cast(data); diff --git a/source/filters/filter-upscaling.hpp b/source/filters/filter-upscaling.hpp index 35932bde5c..2491f6e651 100644 --- a/source/filters/filter-upscaling.hpp +++ b/source/filters/filter-upscaling.hpp @@ -86,7 +86,7 @@ namespace streamfx::filter::upscaling { private: void switch_provider(upscaling_provider provider); - void task_switch_provider(util::threadpool_data_t data); + void task_switch_provider(util::threadpool::task_data_t data); #ifdef ENABLE_FILTER_UPSCALING_NVIDIA void nvvfxsr_load(); diff --git a/source/filters/filter-virtual-greenscreen.cpp b/source/filters/filter-virtual-greenscreen.cpp index 62fb96f607..7d664de4bc 100644 --- a/source/filters/filter-virtual-greenscreen.cpp +++ b/source/filters/filter-virtual-greenscreen.cpp @@ -406,7 +406,7 @@ void streamfx::filter::virtual_greenscreen::virtual_greenscreen_instance::switch } void streamfx::filter::virtual_greenscreen::virtual_greenscreen_instance::task_switch_provider( - util::threadpool_data_t data) + util::threadpool::task_data_t data) { std::shared_ptr spd = std::static_pointer_cast(data); diff --git a/source/filters/filter-virtual-greenscreen.hpp b/source/filters/filter-virtual-greenscreen.hpp index c170add7a8..267e1b2004 100644 --- a/source/filters/filter-virtual-greenscreen.hpp +++ b/source/filters/filter-virtual-greenscreen.hpp @@ -86,7 +86,7 @@ namespace streamfx::filter::virtual_greenscreen { private: void switch_provider(virtual_greenscreen_provider provider); - void task_switch_provider(util::threadpool_data_t data); + void task_switch_provider(util::threadpool::task_data_t data); #ifdef ENABLE_FILTER_VIRTUAL_GREENSCREEN_NVIDIA void nvvfxgs_load(); diff --git a/source/plugin.cpp b/source/plugin.cpp index 25dff0c050..2bcf078897 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -94,10 +94,10 @@ #include #include "warning-enable.hpp" -static std::shared_ptr _threadpool; -static std::shared_ptr _gs_fstri_vb; -static std::shared_ptr _streamfx_gfx_opengl; -static std::shared_ptr _source_tracker; +static std::shared_ptr _threadpool; +static std::shared_ptr _gs_fstri_vb; +static std::shared_ptr _streamfx_gfx_opengl; +static std::shared_ptr _source_tracker; MODULE_EXPORT bool obs_module_load(void) { @@ -108,7 +108,7 @@ MODULE_EXPORT bool obs_module_load(void) streamfx::configuration::initialize(); // Initialize global Thread Pool. - _threadpool = std::make_shared(); + _threadpool = std::make_shared(); // Initialize Source Tracker _source_tracker = streamfx::obs::source_tracker::get(); @@ -338,7 +338,7 @@ MODULE_EXPORT void obs_module_unload(void) } } -std::shared_ptr streamfx::threadpool() +std::shared_ptr streamfx::threadpool() { return _threadpool; } diff --git a/source/plugin.hpp b/source/plugin.hpp index 3475bdb4ab..c2f8a7a627 100644 --- a/source/plugin.hpp +++ b/source/plugin.hpp @@ -22,7 +22,7 @@ namespace streamfx { // Threadpool - std::shared_ptr threadpool(); + std::shared_ptr threadpool(); void gs_draw_fullscreen_tri(); diff --git a/source/updater.cpp b/source/updater.cpp index 98b5924b31..1144bbc8e3 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -228,7 +228,7 @@ streamfx::version_info::operator std::string() } } -void streamfx::updater::task(streamfx::util::threadpool_data_t) +void streamfx::updater::task(streamfx::util::threadpool::task_data_t) { try { auto query_fn = [](std::vector& buffer) { diff --git a/source/updater.hpp b/source/updater.hpp index 7b8a8fdcb7..7e53278630 100644 --- a/source/updater.hpp +++ b/source/updater.hpp @@ -82,7 +82,7 @@ namespace streamfx { bool _dirty; private: - void task(streamfx::util::threadpool_data_t); + void task(streamfx::util::threadpool::task_data_t); bool can_check(); diff --git a/source/util/util-threadpool.cpp b/source/util/util-threadpool.cpp index 5e719a42c6..cb67add3a8 100644 --- a/source/util/util-threadpool.cpp +++ b/source/util/util-threadpool.cpp @@ -1,21 +1,18 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2020 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ +// Copyright (C) 2020-2022 Michael Fabian Dirks +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "util-threadpool.hpp" #include "common.hpp" @@ -25,6 +22,14 @@ #include #include "warning-enable.hpp" +#include "warning-disable.hpp" +#if defined(D_PLATFORM_WINDOWS) +#include +#elif defined(D_PLATFORM_LINUX) +#include +#endif +#include "warning-enable.hpp" + #ifdef _DEBUG #define ST_PREFIX "<%s> " #define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) @@ -39,125 +44,214 @@ #define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) #endif -// Most Tasks likely wait for IO, so we can use that time for other tasks. -#define ST_CONCURRENCY_MULTIPLIER 2 +streamfx::util::threadpool::task::task(task_callback_t callback, task_data_t data) + : _callback(callback), _data(data), _lock(), _status_changed(), _cancelled(false), _completed(false), _failed(false) +{} -streamfx::util::threadpool::threadpool() - : _workers(), _worker_stop(false), _worker_idx(0), _tasks(), _tasks_lock(), _tasks_cv() +streamfx::util::threadpool::task::~task() {} + +void streamfx::util::threadpool::task::run() { - std::size_t concurrency = static_cast(std::thread::hardware_concurrency() * ST_CONCURRENCY_MULTIPLIER); - for (std::size_t n = 0; n < concurrency; n++) { - _workers.emplace_back(std::bind(&streamfx::util::threadpool::work, this)); + std::lock_guard lg(_lock); + if (!_cancelled) { + try { + _callback(_data); + } catch (const std::exception& ex) { + D_LOG_ERROR("Unhandled exception in Task: %s.", ex.what()); + _failed = false; + } catch (...) { + D_LOG_ERROR("Unhandled exception in Task.", nullptr); + _failed = true; + } } + _completed = true; + _status_changed.notify_all(); +} + +void streamfx::util::threadpool::task::cancel() +{ + std::lock_guard lg(_lock); + _cancelled = true; + _completed = true; + _status_changed.notify_all(); } -streamfx::util::threadpool::~threadpool() +bool streamfx::util::threadpool::task::is_cancelled() { - _worker_stop = true; - _tasks_cv.notify_all(); - for (auto& thread : _workers) { - _tasks_cv.notify_all(); - if (thread.joinable()) { - thread.join(); + return _cancelled; +} + +bool streamfx::util::threadpool::task::is_completed() +{ + return _completed; +} + +bool streamfx::util::threadpool::task::has_failed() +{ + return _failed; +} + +void streamfx::util::threadpool::task::wait() +{ + std::unique_lock ul(_lock); + if (!_cancelled && !_completed && !_failed) { + _status_changed.wait(ul, + [this]() { return this->is_completed() || this->is_cancelled() || this->has_failed(); }); + } +} + +void streamfx::util::threadpool::task::await_completion() +{ + wait(); +} + +streamfx::util::threadpool::threadpool::~threadpool() +{ + { // Terminate all remaining tasks. + std::lock_guard lg(_tasks_lock); + for (auto task : _tasks) { + task->cancel(); + } + _tasks.clear(); + } + + { // Notify workers to stop working. + { + std::lock_guard lg(_workers_lock); + for (auto worker : _workers) { + worker->stop = true; + } + } + { + std::lock_guard lg(_tasks_lock); + _tasks_cv.notify_all(); + } + for (auto worker : _workers) { + std::lock_guard lg(worker->lifeline); } } } -std::shared_ptr<::streamfx::util::threadpool::task> streamfx::util::threadpool::push(threadpool_callback_t fn, - threadpool_data_t data) +streamfx::util::threadpool::threadpool::threadpool(size_t minimum, size_t maximum) + : _limits{minimum, maximum}, _workers_lock(), _workers(), _tasks_lock(), _tasks_cv(), _tasks() { - auto task = std::make_shared(fn, data); + // Spawn the minimum number of threads. + spawn(_limits.first); +} + +std::shared_ptr + streamfx::util::threadpool::threadpool::push(task_callback_t callback, task_data_t data /*= nullptr*/) +{ + std::lock_guard lg(_tasks_lock); + constexpr size_t threshold = 3; - // Append the task to the queue. - std::unique_lock lock(_tasks_lock); + // Enqueue the new task. + auto task = std::make_shared(callback, data); _tasks.emplace_back(task); - _tasks_cv.notify_one(); + // Spawn additional workers if the number of queued tasks exceeds a threshold. + if (_tasks.size() > (threshold * _worker_count)) { + spawn(_tasks.size() / threshold); + } + + // Return handle to caller. return task; } -void streamfx::util::threadpool::pop(std::shared_ptr<::streamfx::util::threadpool::task> work) +void streamfx::util::threadpool::threadpool::pop(std::shared_ptr task) { - if (work) { - { - std::unique_lock lock(work->_mutex); - work->_is_dead = true; - } - work->_is_complete.notify_all(); + if (task) { + task->cancel(); } + std::lock_guard lg(_tasks_lock); + _tasks.remove(task); } -void streamfx::util::threadpool::work() +void streamfx::util::threadpool::threadpool::spawn(size_t count) { - std::shared_ptr local_work{}; - uint32_t local_number = _worker_idx.fetch_add(1); + std::lock_guard lg(_workers_lock); + for (size_t n = 0; (n < count) && (_worker_count < _limits.second); n++) { + auto wi = std::make_shared(); + wi->stop = false; + wi->last_work_time = std::chrono::high_resolution_clock::now(); + wi->thread = std::thread(std::bind(&streamfx::util::threadpool::threadpool::work, this, wi)); + wi->thread.detach(); + _workers.emplace_back(wi); + ++_worker_count; + D_LOG_DEBUG("Spawning new worker thread (%zu < %zu < %zu).", _limits.first, _worker_count.load(), + _limits.second); + } +} - while (!_worker_stop) { - // Wait for more work, or immediately continue if there is still work to do. - { - // Lock the tasks mutex to check for work. - std::unique_lock lock(_tasks_lock); +bool streamfx::util::threadpool::threadpool::die(std::shared_ptr wi) +{ + constexpr std::chrono::seconds delay{1}; - // If there are currently no tasks queued, wait on the condition variable. - // This temporarily unlocks the mutex until it is woken up. - if (_tasks.size() == 0) { - _tasks_cv.wait(lock, [this]() { return _worker_stop || _tasks.size() > 0; }); - } + std::lock_guard lg(_workers_lock); + bool result = false; - // If there is either no tasks or we were asked to stop, skip everything. - if (_worker_stop || (_tasks.size() == 0)) { - continue; - } + if (_worker_count > _limits.first) { + auto now = std::chrono::high_resolution_clock::now(); + result = ((wi->last_work_time + delay) <= now) && ((_last_worker_death + delay) <= now); - // Grab the latest task and immediately remove it from the queue. - local_work = _tasks.front(); - _tasks.pop_front(); + if (result) { + _last_worker_death = now; + --_worker_count; + _workers.remove(wi); + D_LOG_DEBUG("Terminated idle worker thread (%zu < %zu < %zu).", _limits.first, _worker_count.load(), + _limits.second); } + } - // If the task was killed, skip everything again. - if (local_work->_is_dead.load()) { - continue; - } + return result; +} - // Try to execute work, but don't crash on catchable exceptions. - if (local_work->_callback) { - try { - local_work->_callback(local_work->_data); - } catch (std::exception const& ex) { - D_LOG_WARNING("Worker %" PRIx32 " caught exception from task (%" PRIxPTR ", %" PRIxPTR - ") with message: %s", - local_number, reinterpret_cast(local_work->_callback.target()), - reinterpret_cast(local_work->_data.get()), ex.what()); - } catch (...) { - D_LOG_WARNING("Worker %" PRIx32 " caught exception of unknown type from task (%" PRIxPTR ", %" PRIxPTR - ").", - local_number, reinterpret_cast(local_work->_callback.target()), - reinterpret_cast(local_work->_data.get())); - } - { - std::unique_lock lock(local_work->_mutex); - local_work->_is_dead.store(true); - } - local_work->_is_complete.notify_all(); - } +void streamfx::util::threadpool::threadpool::work(std::shared_ptr wi) +{ + std::shared_ptr task{}; + std::lock_guard lg(wi->lifeline); - // Remove our reference to the work unit. - local_work.reset(); - } +#if defined(D_PLATFORM_WINDOWS) + SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN | THREAD_PRIORITY_BELOW_NORMAL); + SetThreadDescription(GetCurrentThread(), L"StreamFX Worker Thread"); +#elif defined(D_PLATFORM_LINUX) + struct sched_param param; + param.sched_priority = 0; + pthread_setschedparam(pthread_self(), SCHED_IDLE, ¶m); + pthread_setname_np(pthread_self(), "StreamFX Worker Thread"); +#endif - _worker_idx.fetch_sub(1); -} + while (!wi->stop) { + { // Try and acquire new work. + std::unique_lock ul(_tasks_lock); -streamfx::util::threadpool::task::task() = default; + // Is there any work available right now? + if (_tasks.size() == 0) { // If not: + // Block this thread until it is notified of a change. + _tasks_cv.wait_until( + ul, + std::chrono::time_point(std::chrono::high_resolution_clock::now() + std::chrono::milliseconds(250)), + [this, wi]() { return wi->stop || _tasks.size() > 0; }); + } -streamfx::util::threadpool::task::task(threadpool_callback_t fn, threadpool_data_t dt) - : _mutex(), _is_complete(), _is_dead(false), _callback(fn), _data(dt) -{} + // If we were asked to stop, skip everything. + if (wi->stop) { + continue; + } -void streamfx::util::threadpool::task::await_completion() -{ - if (!_is_dead) { - std::unique_lock lock(_mutex); - _is_complete.wait(lock, [this]() { return this->_is_dead.load(); }); + // If there is work to be done, take it. + if (_tasks.size() > 0) { + wi->last_work_time = std::chrono::high_resolution_clock::now(); + task = _tasks.front(); + _tasks.pop_front(); + } else if (die(wi)) { // Is the threadpool requesting less threads? + break; + } + } + + if (task) { + task->run(); + task.reset(); + } } } diff --git a/source/util/util-threadpool.hpp b/source/util/util-threadpool.hpp index a003a17059..89152ef440 100644 --- a/source/util/util-threadpool.hpp +++ b/source/util/util-threadpool.hpp @@ -1,75 +1,148 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2020 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (C) 2020-2022 Michael Fabian Dirks +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #pragma once #include "warning-disable.hpp" #include +#include +#include #include +#include #include #include #include #include +#include #include #include #include "warning-enable.hpp" -namespace streamfx::util { - typedef std::shared_ptr threadpool_data_t; - typedef std::function threadpool_callback_t; +namespace streamfx::util::threadpool { + typedef std::shared_ptr task_data_t; + typedef std::function task_callback_t; + + struct worker_info { +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::atomic stop; + +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::mutex lifeline; + + std::chrono::high_resolution_clock::time_point last_work_time; + + std::thread thread; + }; + + class task { + task_callback_t _callback; + task_data_t _data; + std::mutex _lock; + +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::condition_variable _status_changed; +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::atomic _cancelled; +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::atomic _completed; +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::atomic _failed; - class threadpool { public: - class task { - protected: - std::mutex _mutex; - std::condition_variable _is_complete; - std::atomic _is_dead; - threadpool_callback_t _callback; - threadpool_data_t _data; + task(task_callback_t callback, task_data_t data); - public: - task(); - task(threadpool_callback_t callback_function, threadpool_data_t data); + public: + ~task(); - void await_completion(); + public: + void run(); - friend class streamfx::util::threadpool; - }; + public: + void cancel(); - private: - std::list _workers; - std::atomic _worker_stop; - std::atomic _worker_idx; - std::list> _tasks; - std::mutex _tasks_lock; - std::condition_variable _tasks_cv; + public: + bool is_cancelled(); + + public: + bool is_completed(); + + public: + bool has_failed(); + + public: + void wait(); + + public: + void await_completion(); + }; + + class threadpool { + std::pair _limits; + +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::mutex _workers_lock; + std::list> _workers; +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::atomic _worker_count; + std::chrono::high_resolution_clock::time_point _last_worker_death; + +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::mutex _tasks_lock; +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::condition_variable _tasks_cv; + std::list> _tasks; public: - threadpool(); ~threadpool(); - std::shared_ptr<::streamfx::util::threadpool::task> push(threadpool_callback_t callback_function, - threadpool_data_t data); + public: + threadpool(size_t minimum = 2, size_t maximum = std::thread::hardware_concurrency()); + + public: + std::shared_ptr push(task_callback_t callback, task_data_t data = nullptr); + + public: + void pop(std::shared_ptr task); + + private: + void spawn(size_t count = 1); - void pop(std::shared_ptr<::streamfx::util::threadpool::task> work); + private: + bool die(std::shared_ptr); private: - void work(); + void work(std::shared_ptr); }; -} // namespace streamfx::util +} // namespace streamfx::util::threadpool From 825f93fb242d476f524175738a36a6aa520504b0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 18 Sep 2022 18:30:41 +0200 Subject: [PATCH 136/164] cmake: Disable pointless structure padding warning --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fe7672ddd..1f83aebcee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Michael Fabian Dirks +# Copyright (C) 2017-2022 Michael Fabian Dirks # Copyright (C) 2022 Romain Vigier # # This program is free software; you can redistribute it and/or modify @@ -1780,6 +1780,8 @@ if(D_PLATFORM_WINDOWS AND ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX "4710" # Ignore Spectre mitigation insertions "5045" + # Ignore inserted padding. + "4324" ) foreach(WARN ${DISABLED_WARNINGS}) target_compile_options(${PROJECT_NAME} PRIVATE "/wd${WARN}") From 589f6c4018581a1effc6efa35cca9d37235be5dc Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 18 Sep 2022 19:51:59 +0200 Subject: [PATCH 137/164] plugin: Finalize threadpool after configuration --- source/plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/plugin.cpp b/source/plugin.cpp index 2bcf078897..e8885881ca 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -324,12 +324,12 @@ MODULE_EXPORT void obs_module_unload(void) // _updater.reset(); //#endif - // Finalize Thread Pool - _threadpool.reset(); - // Finalize Configuration streamfx::configuration::finalize(); + // Finalize Thread Pool + _threadpool.reset(); + DLOG_INFO("Unloaded Version %s", STREAMFX_VERSION_STRING); } catch (std::exception const& ex) { DLOG_ERROR("Unexpected exception in function '%s': %s", __FUNCTION_NAME__, ex.what()); From 39dc1fa5e14573c3cfcb6f5318d199ad3ab66b10 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 18 Sep 2022 19:53:11 +0200 Subject: [PATCH 138/164] configuration: Save after some time has passed Prevents data loss after 100ms have passed, which should improve the saving situation. Fixes #805 --- source/configuration.cpp | 83 ++++++++++++++++++++++++++-------------- source/configuration.hpp | 46 +++++++++++++--------- source/ui/ui.cpp | 1 + source/updater.cpp | 2 + 4 files changed, 85 insertions(+), 47 deletions(-) diff --git a/source/configuration.cpp b/source/configuration.cpp index 6bcd8e39e6..acd2648855 100644 --- a/source/configuration.cpp +++ b/source/configuration.cpp @@ -1,47 +1,52 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2020 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (C) 2020-2022 Michael Fabian Dirks +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "configuration.hpp" #include "obs/obs-tools.hpp" #include "plugin.hpp" +#include "util/util-logging.hpp" + +#ifdef _DEBUG +#define ST_PREFIX "<%s> " +#define D_LOG_ERROR(x, ...) P_LOG_ERROR(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#define D_LOG_WARNING(x, ...) P_LOG_WARN(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#define D_LOG_INFO(x, ...) P_LOG_INFO(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#define D_LOG_DEBUG(x, ...) P_LOG_DEBUG(ST_PREFIX##x, __FUNCTION_SIG__, __VA_ARGS__) +#else +#define ST_PREFIX " " +#define D_LOG_ERROR(...) P_LOG_ERROR(ST_PREFIX __VA_ARGS__) +#define D_LOG_WARNING(...) P_LOG_WARN(ST_PREFIX __VA_ARGS__) +#define D_LOG_INFO(...) P_LOG_INFO(ST_PREFIX __VA_ARGS__) +#define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) +#endif constexpr std::string_view version_tag_name = "Version"; constexpr std::string_view path_backup_ext = ".bk"; streamfx::configuration::~configuration() { - // Update version tag. - obs_data_set_int(_data.get(), version_tag_name.data(), STREAMFX_VERSION); - try { - if (_config_path.has_parent_path()) { - std::filesystem::create_directories(_config_path.parent_path()); - } - if (!obs_data_save_json_safe(_data.get(), _config_path.u8string().c_str(), ".tmp", path_backup_ext.data())) { - throw std::exception(); - } + save(); + _save_task->wait(); } catch (std::exception const& ex) { DLOG_ERROR("Failed to save configuration: %s", ex.what()); } } -streamfx::configuration::configuration() : _data(), _config_path() +streamfx::configuration::configuration() : _config_path(), _data(), _task_lock(), _save_task() { // Retrieve global configuration path. _config_path = streamfx::config_file_path("config.json"); @@ -63,6 +68,28 @@ streamfx::configuration::configuration() : _data(), _config_path() } } +void streamfx::configuration::save() +{ + std::lock_guard lg(_task_lock); + if (!_save_task || _save_task->is_completed()) { + _save_task = streamfx::threadpool()->push([this](streamfx::util::threadpool::task_data_t) { + // ToDo: Implement delayed tasks in ::threadpool. + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + + // Update version tag. + obs_data_set_int(_data.get(), version_tag_name.data(), STREAMFX_VERSION); + + if (_config_path.has_parent_path()) { + std::filesystem::create_directories(_config_path.parent_path()); + } + if (!obs_data_save_json_safe(_data.get(), _config_path.u8string().c_str(), ".tmp", + path_backup_ext.data())) { + D_LOG_ERROR("Failed to save configuration file.", nullptr); + } + }); + } +} + std::shared_ptr streamfx::configuration::get() { obs_data_addref(_data.get()); diff --git a/source/configuration.hpp b/source/configuration.hpp index 5b9f1b772d..b49219ee35 100644 --- a/source/configuration.hpp +++ b/source/configuration.hpp @@ -1,21 +1,18 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2020 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (C) 2020-2022 Michael Fabian Dirks +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #pragma once #include "common.hpp" @@ -23,18 +20,29 @@ #include "warning-disable.hpp" #include #include +#include #include "warning-enable.hpp" namespace streamfx { class configuration { + std::filesystem::path _config_path; + std::shared_ptr _data; - std::filesystem::path _config_path; +#if __cpp_lib_hardware_interference_size >= 201603 + alignas(std::hardware_destructive_interference_size) +#endif + std::mutex _task_lock; + + std::shared_ptr _save_task; public: ~configuration(); configuration(); + public: + void save(); + public: std::shared_ptr get(); diff --git a/source/ui/ui.cpp b/source/ui/ui.cpp index c8d21d22f5..ac29ec81b8 100644 --- a/source/ui/ui.cpp +++ b/source/ui/ui.cpp @@ -67,6 +67,7 @@ bool streamfx::ui::handler::have_shown_about_streamfx(bool shown) auto data = config->get(); if (shown) { obs_data_set_bool(data.get(), _cfg_have_shown_about.data(), true); + config->save(); } if (config->is_different_version()) { return false; diff --git a/source/updater.cpp b/source/updater.cpp index 1144bbc8e3..1b3d02ef2f 100644 --- a/source/updater.cpp +++ b/source/updater.cpp @@ -402,6 +402,8 @@ void streamfx::updater::save() obs_data_set_bool(dataptr.get(), ST_CFG_AUTOMATION, _automation); obs_data_set_int(dataptr.get(), ST_CFG_CHANNEL, static_cast(_channel)); obs_data_set_int(dataptr.get(), ST_CFG_LASTCHECKEDAT, static_cast(_lastcheckedat.count())); + + config->save(); } } From 761f741c56181c3e1b3f94f324a910612e77a860 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 20 Sep 2022 00:47:20 +0200 Subject: [PATCH 139/164] templates/windows/installer: Don't create Icons in Portable mode --- templates/windows/installer.iss.in | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 67528da150..5663704e13 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -38,6 +38,9 @@ ArchitecturesInstallIn64BitMode=x64 arm64 ia64 ArchitecturesAllowed=@ARCH@ ; Installation Modes +AlwaysShowComponentsList=no +UsePreviousTasks=no +UsePreviousSetupType=no UsePreviousPrivileges=no PrivilegesRequired=admin PrivilegesRequiredOverridesAllowed=dialog commandline @@ -73,6 +76,9 @@ LZMAAlgorithm=1 [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" +[Components] +name: "startmenu"; Description: "Start Menu Entries" + [Files] Source: "@ISS_FILES_DIR@/data/obs-plugins/@PROJECT_NAME@/*"; DestDir: "{code:GetOutputDataDir}"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "@ISS_FILES_DIR@/obs-plugins/@D_PLATFORM_BITS@bit/*"; DestDir: "{code:GetOutputBinaryDir}"; Flags: ignoreversion recursesubdirs createallsubdirs @@ -80,8 +86,8 @@ Source: "@PROJECT_SOURCE_DIR@/templates/windows/msvc-redist-helper.exe"; DestDir ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] -Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"; Components: startmenu +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Components: startmenu [Code] // ------------------------------------------------------------------------------------------------------------------ // @@ -203,12 +209,23 @@ var oModePage: TWizardPage; begin oModePage := CreateModePage(); + + if (IsPortableMode()) then begin + WizardSelectComponents('!startmenu'); + end else begin + WizardSelectComponents('startmenu'); + end; end; // ------------------------------------------------------------------------------------------------------------------ // function ShouldSkipPage(PageID: Integer): Boolean; begin Result := False; + if (PageID = wpSelectComponents) then begin + Result := True; + end else if (PageID = wpSelectProgramGroup) then begin + Result := not WizardIsComponentSelected('startmenu'); + end; end; // ------------------------------------------------------------------------------------------------------------------ // @@ -412,6 +429,8 @@ begin bIsSystemMode := True; bIsUserMode := False; bIsPortableMode := False; + + WizardSelectComponents('startmenu'); end; end; @@ -426,6 +445,8 @@ begin bIsSystemMode := False; bIsUserMode := True; bIsPortableMode := False; + + WizardSelectComponents('startmenu'); end; end; @@ -437,6 +458,8 @@ begin bIsSystemMode := False; bIsUserMode := False; bIsPortableMode := True; + + WizardSelectComponents('!startmenu'); end; function CreateModePage: TWizardPage; From df12d2fb8081a37a5bea5cf8570cb400af69b30e Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 19 Sep 2022 23:40:50 +0200 Subject: [PATCH 140/164] templates/windows/installer: Add command line flag for portable installation Users of the Installer can now specify the `/Portable` flag in addition to other flags to install as Portable. --- templates/windows/installer.iss.in | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 5663704e13..2a3819222f 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -154,6 +154,24 @@ begin PAnsiChar(S), SMTO_ABORTIFHUNG, 5000, MsgResult); end; +// ------------------------------------------------------------------------------------------------------------------ // +function ParamExists(Name: String): Boolean; +var + Idx: Integer; + Limit: Integer; + Param: String; +begin + Limit := ParamCount() + for Idx := 1 to Limit do begin + Param := ParamStr(Idx); + if SameText(Param, '/' + Name) then begin + Result := True; + exit; + end; + end; + Result := False; +end; + // ------------------------------------------------------------------------------------------------------------------ // var oModePageSystemChoice: TNewRadioButton; @@ -196,9 +214,15 @@ procedure OnModePageSystemChoiceClick(Sender: TObject); forward; // ------------------------------------------------------------------------------------------------------------------ // function InitializeSetup(): Boolean; begin - bIsSystemMode := IsAdmin(); - bIsUsermode := not IsAdmin(); - bIsPortableMode := False; + if ParamExists('Portable') then begin + bIsSystemMode := False; + bIsUserMode := False; + bIsPortableMode := True; + end else begin + bIsSystemMode := IsAdmin(); + bIsUserMode := not IsAdmin(); + bIsPortableMode := False; + end; Result := True; end; From 53ceddd7845259367e794657880a1e9bcc0a40bb Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 20 Sep 2022 01:59:39 +0200 Subject: [PATCH 141/164] cmake, templates: Remove code signing integration Time has unfortunately broken this integration beyond the point of usefulness. --- .gitmodules | 3 - CMakeLists.txt | 82 +---- cmake/codesign | 1 - templates/windows/installer-signed.iss.in | 360 ---------------------- 4 files changed, 4 insertions(+), 442 deletions(-) delete mode 160000 cmake/codesign delete mode 100644 templates/windows/installer-signed.iss.in diff --git a/.gitmodules b/.gitmodules index 151ff140b5..bd028f051d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "cmake/clang"] path = cmake/clang url = https://github.com/Xaymar/cmake-clang.git -[submodule "cmake/codesign"] - path = cmake/codesign - url = https://github.com/Xaymar/cmake-codesign.git [submodule "cmake/version"] path = cmake/version url = https://github.com/Xaymar/cmake-version.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f83aebcee..ea0107348e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ endif() set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang" - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/codesign" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/version" "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ) @@ -350,7 +349,6 @@ set(${PREFIX}ENABLE_UPDATER ON CACHE BOOL "Enable automatic update checks.") ## Code Related set(${PREFIX}ENABLE_CLANG OFF CACHE BOOL "Enable Clang integration for supported compilers.") -set(${PREFIX}ENABLE_CODESIGN OFF CACHE BOOL "Enable Code Signing integration for supported environments.") set(${PREFIX}ENABLE_PROFILING OFF CACHE BOOL "Enable CPU and GPU performance tracking, which has a non-zero overhead at all times. Do not enable this for release builds.") ## Compile/Link Related @@ -390,35 +388,6 @@ if(${PREFIX}ENABLE_CLANG AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang/Cl set(HAVE_CLANG ON) endif() -################################################################################ -# Codesign -################################################################################ - -if(${PREFIX}ENABLE_CODESIGN AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/codesign/CodeSign.cmake")) - include("cmake/codesign/CodeSign.cmake") - set(HAVE_CODESIGN ON) - - set(${PREFIX}CODESIGN_FILE "" CACHE FILEPATH "Path to Code-Signing certificate.") - if(WIN32) - set(${PREFIX}CODESIGN_NAME "" CACHE STRING "Name of Code-Signing certificate in Windows's certificate storage.") - endif() - set(${PREFIX}CODESIGN_PASS "" CACHE STRING "Password for Code-Signing certificate.") - set(${PREFIX}CODESIGN_TIMESTAMPS ON CACHE BOOL "Should the resulting binary be timestamped?") - - set(_CODESIGN_FILE "$ENV{${PREFIX}CODESIGN_FILE}") - if(${PREFIX}CODESIGN_FILE) - set(_CODESIGN_FILE "${${PREFIX}CODESIGN_FILE}") - endif() - set(_CODESIGN_NAME "$ENV{${PREFIX}CODESIGN_NAME}") - if(${PREFIX}CODESIGN_NAME) - set(_CODESIGN_NAME "${${PREFIX}CODESIGN_NAME}") - endif() - set(_CODESIGN_PASS "$ENV{${PREFIX}CODESIGN_PASS}") - if(${PREFIX}CODESIGN_PASS) - set(_CODESIGN_PASS "${${PREFIX}CODESIGN_PASS}") - endif() -endif() - ################################################################################ # Component search paths ################################################################################ @@ -2083,21 +2052,6 @@ if(T_CHECK AND HAVE_CLANG) ) endif() -# Code Sign -if(HAVE_CODESIGN) - set(_CODESIGN_TIMESTAMP "") - if(${PREFIX}CODESIGN_TIMESTAMPS) - set(_CODESIGN_TIMESTAMP "TIMESTAMPS") - endif() - codesign( - TARGETS ${PROJECT_NAME} - CERTIFICATE_FILE "${_CODESIGN_FILE}" - CERTIFICATE_NAME "${_CODESIGN_NAME}" - CERTIFICATE_PASS "${_CODESIGN_PASS}" - ${_CODESIGN_TIMESTAMP} - ) -endif() - ################################################################################ # Installation ################################################################################ @@ -2314,38 +2268,10 @@ if(STANDALONE) get_filename_component(ISS_MSVCHELPER_PATH "${msvc-redist-helper_BUILD_DIR}" ABSOLUTE) file(TO_NATIVE_PATH "${ISS_MSVCHELPER_PATH}" ISS_MSVCHELPER_PATH) - if(HAVE_CODESIGN) - codesign_command_win32( - SHA1 - RETURN_BIN ISS_CODESIGN_BIN_SHA1 - RETURN_ARGS ISS_CODESIGN_CMD_SHA1 - CERTIFICATE_FILE "${_CODESIGN_FILE}" - CERTIFICATE_NAME "${_CODESIGN_NAME}" - CERTIFICATE_PASS "${_CODESIGN_PASS}" - ${_CODESIGN_TIMESTAMP} - ) - codesign_command_win32( - SHA2 APPEND - RETURN_BIN ISS_CODESIGN_BIN_SHA2 - RETURN_ARGS ISS_CODESIGN_CMD_SHA2 - CERTIFICATE_FILE "${_CODESIGN_FILE}" - CERTIFICATE_NAME "${_CODESIGN_NAME}" - CERTIFICATE_PASS "${_CODESIGN_PASS}" - ${_CODESIGN_TIMESTAMP} - ) - list(JOIN ISS_CODESIGN_CMD_SHA1 " " ISS_CODESIGN_CMD_SHA1) - list(JOIN ISS_CODESIGN_CMD_SHA2 " " ISS_CODESIGN_CMD_SHA2) - - configure_file( - "templates/windows/installer-signed.iss.in" - "installer.iss" - ) - else() - configure_file( - "templates/windows/installer.iss.in" - "installer.iss" - ) - endif() + configure_file( + "templates/windows/installer.iss.in" + "installer.iss" + ) endif() # Apple MacOS diff --git a/cmake/codesign b/cmake/codesign deleted file mode 160000 index d02ee94cb9..0000000000 --- a/cmake/codesign +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d02ee94cb9c47ef6f8d2e9a5d67473b7e5cfc5bf diff --git a/templates/windows/installer-signed.iss.in b/templates/windows/installer-signed.iss.in deleted file mode 100644 index b034a31545..0000000000 --- a/templates/windows/installer-signed.iss.in +++ /dev/null @@ -1,360 +0,0 @@ -; Script generated by the Inno Setup Script Wizard. -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - -#define MyAppName "@PROJECT_TITLE@" -#define MyAppVersion "@PROJECT_VERSION@" -#define MyAppVersionText "@_VERSION@" -#define MyAppPublisher "Xaymars Technology Workshop" -#define MyAppURL "https://xaymar.com/" -#define MyAppCopyright "@PROJECT_COPYRIGHT@" - -[Setup] -; NOTE: The value of AppId uniquely identifies this application. -; Do not use the same AppId value in installers for other applications. -; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) - -; Application Information -AppId={{DE56A03A-C8A4-474B-83B0-CFD270262D38}} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -AppMutex={#MyAppName} - -; Versioning -VersionInfoProductName={#MyAppName} -VersionInfoProductVersion={#MyAppVersion} -VersionInfoVersion={#MyAppVersion} -VersionInfoProductTextVersion={#MyAppVersionText} -VersionInfoTextVersion={#MyAppVersionText} -VersionInfoCompany={#MyAppPublisher} -VersionInfoCopyright={#MyAppCopyright} -VersionInfoDescription={#MyAppName} Setup - -; Architecture (Platform is always Windows) -ArchitecturesInstallIn64BitMode=x64 arm64 ia64 -ArchitecturesAllowed=@ARCH@ - -; Installation Modes -UsePreviousPrivileges=no -PrivilegesRequired=admin -PrivilegesRequiredOverridesAllowed=dialog commandline - -; Wizard Information -WizardStyle=modern -WizardResizable=yes -SetupIconFile="@PROJECT_SOURCE_DIR@/media/icon.ico" -UninstallDisplayIcon={uninstallexe} - -; Code Signing -;signtool=@ISS_CODESIGN_BIN_SHA1@ -SignTool=signtool @ISS_CODESIGN_CMD_SHA1@ $f -SignTool=signtool @ISS_CODESIGN_CMD_SHA2@ $f -SignedUninstaller=yes - -; Other Information -UsePreviousAppDir=no -Uninstallable=not IsPortablePagePortableChoiceChecked() -DefaultDirName={code:GetDefaultDirectory} -DefaultGroupName={#MyAppName} -AllowNoIcons=yes -LicenseFile="@ISS_SOURCE_DIR@/LICENSE" -OutputDir="@ISS_PACKAGE_DIR@" -OutputBaseFilename=@PACKAGE_NAME@-@_PACKAGE_SUFFIX_OVERRIDE@ -Compression=lzma2/ultra64 -SolidCompression=yes -LZMAAlgorithm=1 - -[Languages] -Name: "english"; MessagesFile: "compiler:Default.isl" - -[Files] -Source: "@ISS_FILES_DIR@/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "@PROJECT_SOURCE_DIR@/templates/windows/msvc-redist-helper.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy noencryption -; NOTE: Don't use "Flags: ignoreversion" on any shared system files - -[Icons] -Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" - -[Code] -// ------------------------------------------------------------------------------------------------------------------ // -var - oPortablePageStaticChoice: TNewRadioButton; - oPortablePagePortableChoice: TNewRadioButton; - -function FindRegistryKey(): String; forward; -function GetDefaultDirectory(Value: String): String; forward; -function GetUninstallerPath(): String; forward; -function IsUpgrade(): Boolean; forward; -function IsPortablePagePortableChoiceChecked(): Boolean; forward; -function UninstallOldVersion(): Integer; forward; -procedure OnPortablePagePortableChoiceClick(Sender: TObject); forward; -procedure OnPortablePageStaticChoiceClick(Sender: TObject); forward; -function CreatePortablePage: TWizardPage; forward; -procedure InitializeWizard; forward; -function ShouldSkipPage(PageID: Integer): Boolean; forward; -function PrepareToInstall(var NeedsRestart: Boolean): String; forward; - -// ------------------------------------------------------------------------------------------------------------------ // -function FindRegistryKey(): String; -begin - Result := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting('AppId')}_is1'); -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function GetDefaultDirectory(Value: String): String; -var - sInstallPath: String; -begin - // 1. Use the path we were given on call. - sInstallPath := Value; - - // 2. If that was empty, try and find it ourselves from the registry. - if (sInstallPath = '') then - RegQueryStringValue(HKA64, FindRegistryKey(), 'InstallLocation', sInstallPath); - - // 2. If empty, try and find the "Local Machine" installation of OBS Studio. - if (sInstallPath = '') then - RegQueryStringValue(HKLM64, 'SOFTWARE\OBS Studio', '', sInstallPath); - - // 3. If empty, try and find the "Current User" installation of OBS Studio. - if (sInstallPath = '') then - RegQueryStringValue(HKCU64, 'SOFTWARE\OBS Studio', '', sInstallPath); - - // 6. If empty, just use the default path. - if (sInstallPath = '') then - sInstallPath := ExpandConstant('{commonpf}\obs-studio'); - - Result := sInstallPath -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function GetUninstallerPath(): String; -var - sRegistryKey: String; - sUninstallerPath: String; -begin - sRegistryKey := FindRegistryKey(); - - RegQueryStringValue(HKLM64, sRegistryKey, 'UninstallString', sUninstallerPath); - - if (sUninstallerPath = '') then - RegQueryStringValue(HKCU64, sRegistryKey, 'UninstallString', sUninstallerPath); - - if (sUninstallerPath = '') then - RegQueryStringValue(HKLM32, sRegistryKey, 'UninstallString', sUninstallerPath); - - if (sUninstallerPath = '') then - RegQueryStringValue(HKCU32, sRegistryKey, 'UninstallString', sUninstallerPath); - - Result := sUninstallerPath; -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function IsUpgrade(): Boolean; -begin - Result := (not IsPortablePagePortableChoiceChecked()) and (GetUninstallerPath() <> ''); -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function UninstallOldVersion(): Integer; -var - sUninstallerPath: String; - iResultCode: Integer; -begin - Result := 0; - sUninstallerPath := GetUninstallerPath(); - if (sUninstallerPath <> '') then begin - sUninstallerPath := RemoveQuotes(sUninstallerPath); - if Exec(sUninstallerPath, '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin - Result := iResultCode - end else begin - Result := 1 - end; - end; -end; - -// ------------------------------------------------------------------------------------------------------------------ // -procedure OnPortablePagePortableChoiceClick(Sender: TObject); -begin - oPortablePageStaticChoice.Checked := False; - oPortablePagePortableChoice.Checked := True; -end; - -procedure OnPortablePageStaticChoiceClick(Sender: TObject); -begin - if (not oPortablePageStaticChoice.Enabled) then begin - OnPortablePagePortableChoiceClick(Sender); - end else begin - oPortablePageStaticChoice.Checked := True; - oPortablePagePortableChoice.Checked := False; - end; -end; - -function IsPortablePagePortableChoiceChecked(): Boolean; -begin - Result := oPortablePagePortableChoice.Checked; -end; - -function CreatePortablePage: TWizardPage; -var - oPage: TWizardPage; - oStaticPanel: TPanel; - oStaticChoice: TNewRadioButton; - oStaticText: TLabel; - oStaticWarningText: TLabel; - oPortablePanel: TPanel; - oPortableChoice: TNewRadioButton; - oPortableText: TLabel; -begin - // Build a page that asks a user if they want to use Movable or Static installation. - oPage := CreateCustomPage(wpLicense, - 'Installation Type', - 'Select how to install StreamFX on your System'); - - oStaticPanel := TPanel.Create(oPage); - oStaticPanel.Parent := oPage.Surface; - oStaticPanel.ParentBackground := False; - oStaticPanel.Left := ScaleX(5); - oStaticPanel.Top := ScaleY(5); - oStaticPanel.Width := oPage.SurfaceWidth - ScaleX(10); - oStaticPanel.Height := ScaleY(100); - oStaticPanel.Anchors := [akLeft, akTop, akRight]; - oStaticPanel.Color := clWindow; - oStaticPanel.BevelKind := bkTile; - oStaticPanel.BevelInner := bvNone; - oStaticPanel.BevelOuter := bvRaised; - oStaticPanel.BevelWidth := 1; - oStaticPanel.OnClick := @OnPortablePageStaticChoiceClick; - - oStaticChoice := TNewRadioButton.Create(oStaticPanel); - oPortablePageStaticChoice := oStaticChoice; - oStaticChoice.Parent := oStaticPanel; - oStaticChoice.ParentBackground := False; - oStaticChoice.Left := ScaleX(5); - oStaticChoice.Top := ScaleY(5); - oStaticChoice.Width := oStaticPanel.Width - ScaleX(10); - oStaticChoice.Height := ScaleY(20); - oStaticChoice.Anchors := [akLeft, akTop, akRight]; - oStaticChoice.Caption := 'Static'; - oStaticChoice.Font.Style := [fsBold]; - oStaticChoice.OnClick := @OnPortablePageStaticChoiceClick; - - oStaticText := TLabel.Create(oStaticPanel); - oStaticText.Parent := oStaticPanel; - oStaticText.AutoSize := False; - oStaticText.Left := ScaleX(5); - oStaticText.Top := ScaleY(5) + oStaticChoice.Top + oStaticChoice.Height; - oStaticText.Width := oStaticPanel.Width - ScaleX(10); - oStaticText.Height := oStaticPanel.Height - ScaleX(5) - oStaticText.Top; - oStaticText.Anchors := [akLeft, akTop, akRight]; - oStaticText.WordWrap := True - oStaticText.Caption := 'Install for use in a static version of OBS Studio, with all necessary features to support it.'; - oStaticText.OnClick := @OnPortablePageStaticChoiceClick; - - oPortablePanel := TPanel.Create(oPage); - oPortablePanel.Parent := oPage.Surface; - oPortablePanel.ParentBackground := False; - oPortablePanel.Left := ScaleX(5); - oPortablePanel.Top := ScaleY(5) + oStaticPanel.Top + oStaticPanel.Height; - oPortablePanel.Width := oPage.SurfaceWidth - ScaleX(10); - oPortablePanel.Height := ScaleY(100); - oPortablePanel.Anchors := [akLeft, akTop, akRight]; - oPortablePanel.Color := clWindow; - oPortablePanel.BevelKind := bkTile; - oPortablePanel.BevelInner := bvNone; - oPortablePanel.BevelOuter := bvRaised; - oPortablePanel.BevelWidth := 1; - oPortablePanel.OnClick := @OnPortablePagePortableChoiceClick; - - oPortableChoice := TNewRadioButton.Create(oPortablePanel); - oPortablePagePortableChoice := oPortableChoice; - oPortableChoice.Parent := oPortablePanel; - oPortableChoice.ParentBackground := False; - oPortableChoice.Left := ScaleX(5); - oPortableChoice.Top := ScaleY(5); - oPortableChoice.Width := oPortablePanel.Width - ScaleX(10); - oPortableChoice.Height := ScaleY(20); - oPortableChoice.Anchors := [akLeft, akTop, akRight]; - oPortableChoice.Caption := 'Portable'; - oPortableChoice.Font.Style := [fsBold]; - oPortableChoice.OnClick := @OnPortablePagePortableChoiceClick; - - oPortableText := TLabel.Create(oPortablePanel); - oPortableText.Parent := oPortablePanel; - oPortableText.AutoSize := False; - oPortableText.Left := ScaleX(5); - oPortableText.Top := ScaleY(5) + oPortableChoice.Top + oPortableChoice.Height; - oPortableText.Width := oPortablePanel.Width - ScaleX(10); - oPortableText.Height := oPortablePanel.Height - ScaleX(5) - oPortableText.Top; - oPortableText.Anchors := [akLeft, akTop, akRight]; - oPortableText.WordWrap := True - oPortableText.Caption := 'Install for use in portable or multi-environment scenarios, which require StreamFX to not be tied to the System itself. The uninstaller, automatic updates and other system-dependent features will be unavailable.'; - oPortableText.OnClick := @OnPortablePagePortableChoiceClick; - - if (not IsAdmin()) then begin - oStaticWarningText := TLabel.Create(oStaticPanel); - oStaticWarningText.Parent := oStaticPanel; - oStaticWarningText.AutoSize := False; - oStaticWarningText.Left := ScaleX(5); - oStaticWarningText.Top := oPortablePanel.Height - ScaleY(5) - ScaleY(15); - oStaticWarningText.Width := oPortablePanel.Width - ScaleX(10); - oStaticWarningText.Height := ScaleY(15); - oStaticWarningText.Anchors := [akLeft, akBottom, akRight]; - oStaticWarningText.WordWrap := True - oStaticWarningText.Font.Color := clRed; - oStaticWarningText.Font.Style := [fsBold]; - oStaticWarningText.Caption := 'Please launch the Installer as Administrator for static installations.'; - - oStaticPanel.Enabled := False; - oStaticChoice.Enabled := False; - oStaticText.Enabled := False; - - oStaticChoice.Checked := False; - oPortableChoice.Checked := True; - end else begin - oStaticChoice.Checked := True; - oPortableChoice.Checked := False; - end; - - Result := oPage; -end; - -procedure InitializeWizard; -var - oPortablePage: TWizardPage; -begin - oPortablePage := CreatePortablePage(); -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function ShouldSkipPage(PageID: Integer): Boolean; -begin - Result := False; - if (PageID = wpSelectDir) then begin - if (not IsPortablePagePortableChoiceChecked()) then begin - if (IsUpgrade()) then begin - Result := True; - Exit; - end; - end; - end; -end; - -// ------------------------------------------------------------------------------------------------------------------ // -function PrepareToInstall(var NeedsRestart: Boolean): String; -var - iResultCode: Integer; -begin - // Attempt to remove old version if it exists. - if (IsUpgrade()) then begin - UninstallOldVersion(); - end; - - // Also ensure that we have the necessary prerequisites installed to run the program. - ExtractTemporaryFile('msvc-redist-helper.exe'); - Exec(ExpandConstant('{tmp}\msvc-redist-helper.exe'), '2019', '', SW_HIDE, ewWaitUntilTerminated, iResultCode); -end; From 79e736bc75f5a517e18fe4592f290216f0dd99d7 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 19 Sep 2022 23:50:38 +0200 Subject: [PATCH 142/164] templates/windows/installer: Opt for built-in Registry functions --- templates/windows/installer.iss.in | 35 ++++-------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 2a3819222f..3c239d7715 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -101,40 +101,13 @@ type WPARAM = UINT_PTR; LPARAM = INT_PTR; LRESULT = INT_PTR; - LSTATUS = DWord; - LPCVOID = UINT_PTR; - HKEY = DWord; - PHKEY = UINT_PTR; const SMTO_ABORTIFHUNG = 2; WM_WININICHANGE = $001A; WM_SETTINGCHANGE = WM_WININICHANGE; -// HKEY_CURRENT_USER = $80000001; -// HKEY_LOCAL_MACHINE = $80000002; - -function advapi32_RegSetKeyValue( - hKey: HKEY; - lpSubKey: string; - lpValueName: string; - dwType: DWord; - lpData: string; - dwData: DWord -): LRESULT; - external 'RegSetKeyValue{#AW}@advapi32.dll stdcall'; - -function SetRegistryKeyValueString( - Root: HKEY; - Key: string; - Name: string; - Value: string -): BOOL; -begin - advapi32_RegSetKeyValue(Root, Key, Name, 2, Value, Length(Value) * 2); - Result := True; -end; -function user32_SendTextMessageTimeout( +function user32_SendTextMessageTimeoutA( hWnd: HWND; Msg: UINT; wParam: WPARAM; @@ -150,7 +123,7 @@ var MsgResult: DWORD; begin S := 'Environment'; - user32_SendTextMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, + user32_SendTextMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE, 0, PAnsiChar(S), SMTO_ABORTIFHUNG, 5000, MsgResult); end; @@ -272,11 +245,11 @@ begin if (IsUserMode()) then begin sPluginsPath := ExpandConstant('{userpf}\obs-studio\plugins\%module%\bin\'); StringChangeEx(sPluginsPath, '\', '/', True); - SetRegistryKeyValueString(HKEY_CURRENT_USER, 'Environment', 'OBS_PLUGINS_PATH', sPluginsPath); + RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'OBS_PLUGINS_PATH', sPluginsPath); sPluginsDataPath := ExpandConstant('{userpf}\obs-studio\plugins\%module%\data\'); StringChangeEx(sPluginsDataPath, '\', '/', True); - SetRegistryKeyValueString(HKEY_CURRENT_USER, 'Environment', 'OBS_PLUGINS_DATA_PATH', sPluginsDataPath); + RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'OBS_PLUGINS_DATA_PATH', sPluginsDataPath); RefreshEnvironment(); end; From 0390fbb05f2e03d8e388b73045272707d9a72342 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 19 Sep 2022 23:53:12 +0200 Subject: [PATCH 143/164] templates/windows/installer: Default to appending default directory name --- templates/windows/installer.iss.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 3c239d7715..5306985ef4 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -57,7 +57,8 @@ UsePreviousAppDir=no DisableDirPage=no DirExistsWarning=no DefaultDirName={code:GetDefaultDirectory} -AppendDefaultDirName=no +AppendDefaultDirName=yes +DisableProgramGroupPage=no DefaultGroupName={#MyAppName} AppendDefaultGroupName=yes From 79bd3879722bd51d7ecd307830c8604f03fc4ce3 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 20 Sep 2022 00:47:20 +0200 Subject: [PATCH 144/164] templates/windows/installer: Don't offer path selection for System & User mode The location for System-wide and User-only installation depend on Windows-managed locations, which means that they will never require a user to select the correct location. Therefore it is best to hide the page in all modes except for Portable, which should still offer a path to extract to. --- templates/windows/installer.iss.in | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/templates/windows/installer.iss.in b/templates/windows/installer.iss.in index 5306985ef4..cd9a317f35 100644 --- a/templates/windows/installer.iss.in +++ b/templates/windows/installer.iss.in @@ -219,7 +219,9 @@ end; function ShouldSkipPage(PageID: Integer): Boolean; begin Result := False; - if (PageID = wpSelectComponents) then begin + if (PageID = wpSelectDir) then begin + Result := not IsPortableMode(); + end else if (PageID = wpSelectComponents) then begin Result := True; end else if (PageID = wpSelectProgramGroup) then begin Result := not WizardIsComponentSelected('startmenu'); @@ -261,27 +263,21 @@ function GetDefaultDirectory(Value: String): String; var sPath: String; begin - // If a path was given as an argument, use it. - if (Value <> '') then begin - Result := Value; - exit; - end; - - // Otherwise, try and figure out where the previous installation of the same type went to. - if (RegQueryStringValue(HKA64, AppRegistryKey(), 'InstallLocation', sPath)) then begin - Result := sPath; - exit; - end; - // In all other cases, change depending on the chosen install method. if (IsSystemMode()) then begin // Default to ProgramData/obs-studio/@PROJECT_NAME@ Result := ExpandConstant('{commonappdata}\obs-studio\plugins\@PROJECT_NAME@'); - end else begin - Result := ExpandConstant('{userpf}\obs-studio\plugins\@PROJECT_NAME@') - end; + end else if (IsUserMode()) then begin + Result := ExpandConstant('{userpf}\obs-studio\plugins\@PROJECT_NAME@'); + end else begin + // If a path was given as an argument, use it. + if (Value <> '') then begin + Result := Value; + exit; + end; - exit; + Result := ExpandConstant('{userdesktop}\obs-studio'); + end; end; // ------------------------------------------------------------------------------------------------------------------ // From 0b23d28164eafba370dffec4227828689607e611 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 23 Sep 2022 02:17:04 +0200 Subject: [PATCH 145/164] ffmpeg/hwapi/d3d11: Remove double unref --- source/ffmpeg/hwapi/d3d11.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index 16b6677bce..1d2bb38ce7 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -188,10 +188,7 @@ std::shared_ptr d3d11_instance::allocate_frame(AVBufferRef* frames) auto gctx = streamfx::obs::gs::context(); // Allocate a frame. - auto frame = std::shared_ptr(av_frame_alloc(), [](AVFrame* frame) { - av_frame_unref(frame); - av_frame_free(&frame); - }); + auto frame = std::shared_ptr(av_frame_alloc(), [](AVFrame* frame) { av_frame_free(&frame); }); // Create the necessary buffers. if (av_hwframe_get_buffer(frames, frame.get(), 0) < 0) { From 4236c28c580941c456eb904591260d73816d7f32 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 23 Sep 2022 02:56:04 +0200 Subject: [PATCH 146/164] ffmpeg/hwapi/d3d11: Only Release() the immediate ID3D11DeviceContext once While this had no actual effect due to the immediate ID3D11DeviceContext being tied to the ID3D11Device itself, it shouldn't have occured at all. With this there should now only be a single Release() call for every AddRef() call. --- source/ffmpeg/hwapi/d3d11.cpp | 48 ++++++++++++++++++----------------- source/ffmpeg/hwapi/d3d11.hpp | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index 1d2bb38ce7..5f80a61a95 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -102,10 +102,9 @@ std::list d3d11::enumerate_adapters() std::shared_ptr d3d11::create(const device& target) { - std::shared_ptr inst; - ATL::CComPtr device; - ATL::CComPtr context; - IDXGIAdapter1* adapter = nullptr; + std::shared_ptr inst; + ATL::CComPtr device; + IDXGIAdapter1* adapter = nullptr; // Find the correct "Adapter" (device). IDXGIAdapter1* dxgi_adapter = nullptr; @@ -125,12 +124,11 @@ std::shared_ptr d3d11::create(const device& target) D3D_FEATURE_LEVEL_11_1}; if (FAILED(_D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_HARDWARE, NULL, device_flags, feature_levels.data(), - static_cast(feature_levels.size()), D3D11_SDK_VERSION, &device, NULL, - &context))) { + static_cast(feature_levels.size()), D3D11_SDK_VERSION, &device, NULL, NULL))) { throw std::runtime_error("Failed to create D3D11 device for target."); } - return std::make_shared(device, context); + return std::make_shared(device); } std::shared_ptr d3d11::create_from_obs() @@ -143,21 +141,24 @@ std::shared_ptr d3d11::create_from_obs() ATL::CComPtr device = ATL::CComPtr(reinterpret_cast(gs_get_device_obj())); - ATL::CComPtr context; - device->GetImmediateContext(&context); - return std::make_shared(device, context); + return std::make_shared(device); } struct D3D11AVFrame { ATL::CComPtr handle; }; -d3d11_instance::d3d11_instance(ATL::CComPtr device, ATL::CComPtr context) - : _device(device), _context(context) -{} +d3d11_instance::d3d11_instance(ATL::CComPtr device) : _device(device) +{ + // Acquire immediate rendering context. + device->GetImmediateContext(&_context); +} -d3d11_instance::~d3d11_instance() {} +d3d11_instance::~d3d11_instance() +{ + //_context.Release(); // Automatically performed by ATL::CComPtr. +} AVBufferRef* d3d11_instance::create_device_context() { @@ -165,17 +166,18 @@ AVBufferRef* d3d11_instance::create_device_context() if (!dctx_ref) throw std::runtime_error("Failed to allocate AVHWDeviceContext."); - AVHWDeviceContext* dctx = reinterpret_cast(dctx_ref->data); - AVD3D11VADeviceContext* d3d11va = reinterpret_cast(dctx->hwctx); + AVHWDeviceContext* hwdev = reinterpret_cast(dctx_ref->data); + AVD3D11VADeviceContext* device_hwctx = reinterpret_cast(hwdev->hwctx); + + // Provide the base device information only. + device_hwctx->device = _device; + device_hwctx->device->AddRef(); - // TODO: Determine if these need an additional reference. - d3d11va->device = _device; - d3d11va->device->AddRef(); - d3d11va->device_context = _context; - d3d11va->device_context->AddRef(); - d3d11va->lock = [](void*) { obs_enter_graphics(); }; - d3d11va->unlock = [](void*) { obs_leave_graphics(); }; + // And a way to lock/unlock the device. + device_hwctx->lock = [](void*) { obs_enter_graphics(); }; + device_hwctx->unlock = [](void*) { obs_leave_graphics(); }; + // Then let FFmpeg do the rest for us. int ret = av_hwdevice_ctx_init(dctx_ref); if (ret < 0) throw std::runtime_error("Failed to initialize AVHWDeviceContext."); diff --git a/source/ffmpeg/hwapi/d3d11.hpp b/source/ffmpeg/hwapi/d3d11.hpp index b7b36f8923..44a5ec1611 100644 --- a/source/ffmpeg/hwapi/d3d11.hpp +++ b/source/ffmpeg/hwapi/d3d11.hpp @@ -62,7 +62,7 @@ namespace streamfx::ffmpeg::hwapi { ATL::CComPtr _context; public: - d3d11_instance(ATL::CComPtr device, ATL::CComPtr context); + d3d11_instance(ATL::CComPtr device); virtual ~d3d11_instance(); virtual AVBufferRef* create_device_context() override; From c0967e9252cb5da82d228193f41ceb019ddab7f4 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 23 Sep 2022 01:51:41 +0200 Subject: [PATCH 147/164] encoder/ffmpeg: Remove usage of `avcodec_close` This functionality has been deprecated by FFmpeg. --- source/encoders/encoder-ffmpeg.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/encoders/encoder-ffmpeg.cpp b/source/encoders/encoder-ffmpeg.cpp index 949f2e0041..ee3fade0a2 100644 --- a/source/encoders/encoder-ffmpeg.cpp +++ b/source/encoders/encoder-ffmpeg.cpp @@ -180,7 +180,6 @@ ffmpeg_instance::~ffmpeg_instance() } // Close and free context. - avcodec_close(_context); avcodec_free_context(&_context); } From 596841e6f8ca58b120dad1f568a542d187be08db Mon Sep 17 00:00:00 2001 From: Xaymar Date: Sun, 9 Oct 2022 02:14:26 +0200 Subject: [PATCH 148/164] locale: New Crowdin updates (#932) * New translations en-US.ini (Danish) * New translations en-US.ini (Spanish) * New translations en-US.ini (Korean) * New translations en-US.ini (Korean) * New translations en-US.ini (Japanese) --- data/locale/da-DK.ini | 10 +++++----- data/locale/es-ES.ini | 1 + data/locale/ja-JP.ini | 1 + data/locale/ko-KR.ini | 24 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/data/locale/da-DK.ini b/data/locale/da-DK.ini index 0e06805657..a3ee6a5059 100644 --- a/data/locale/da-DK.ini +++ b/data/locale/da-DK.ini @@ -130,7 +130,7 @@ Encoder.FFmpeg.KeyFrames.Interval="Interval" Encoder.FFmpeg.Framerate="Overstyring af billedfrekvens" Encoder.FFmpeg.AMF.Deprecated="Denne encoder er forældet og vil snart blive fjernet. Brugere opfordres til at migrere til den integrerede \"AMD HW H.264 (AVC)\" eller \"AMD HW H.265 (HEVC)\" encoder så hurtigt som muligt." -Encoder.FFmpeg.AMF.Preset="Forudindstillet" +Encoder.FFmpeg.AMF.Preset="Forudindstilling" Encoder.FFmpeg.AMF.Preset.Speed="Hastighed" Encoder.FFmpeg.AMF.Preset.Balanced="Balanceret" Encoder.FFmpeg.AMF.Preset.Quality="Kvalitet" @@ -169,7 +169,7 @@ Encoder.FFmpeg.NVENC.Preset.bd="BluRay-disk" Encoder.FFmpeg.NVENC.Preset.ll="Lav latenstid" Encoder.FFmpeg.NVENC.Preset.llhq="Lav latenstid Høj kvalitet" Encoder.FFmpeg.NVENC.Preset.llhp="Lav latenstid Høj ydeevne" -Encoder.FFmpeg.NVENC.Preset.lossless="Lossless" +Encoder.FFmpeg.NVENC.Preset.lossless="Tabsfri" Encoder.FFmpeg.NVENC.Preset.losslesshp="Tabsfri høj ydeevne" Encoder.FFmpeg.NVENC.Preset.p1="Hurtigste (P1)" Encoder.FFmpeg.NVENC.Preset.p2="Hurtigere (P2)" @@ -178,12 +178,12 @@ Encoder.FFmpeg.NVENC.Preset.p4="Medium (P4)" Encoder.FFmpeg.NVENC.Preset.p5="Langsom (P5)" Encoder.FFmpeg.NVENC.Preset.p6="Langsommere (P6)" Encoder.FFmpeg.NVENC.Preset.p7="Langsomste (P7)" -Encoder.FFmpeg.NVENC.Tune="Afstemning" +Encoder.FFmpeg.NVENC.Tune="Tune" Encoder.FFmpeg.NVENC.Tune.hq="Høj kvalitet" Encoder.FFmpeg.NVENC.Tune.ll="Lav latenstid" Encoder.FFmpeg.NVENC.Tune.ull="Ultra lav latenstid" -Encoder.FFmpeg.NVENC.Tune.lossless="Lossless" -Encoder.FFmpeg.NVENC.RateControl="Valgmuligheder for styring af hastighed" +Encoder.FFmpeg.NVENC.Tune.lossless="Tabsfri" +Encoder.FFmpeg.NVENC.RateControl="Tempokontrol Indstillinger" Encoder.FFmpeg.NVENC.RateControl.Mode="Tilstand" Encoder.FFmpeg.NVENC.RateControl.Mode.constqp="Konstant kvantiseringsparameter" Encoder.FFmpeg.NVENC.RateControl.Mode.vbr="Variabel bitrate" diff --git a/data/locale/es-ES.ini b/data/locale/es-ES.ini index 608cfdae18..3e49599ff6 100644 --- a/data/locale/es-ES.ini +++ b/data/locale/es-ES.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="Tipo de intervalo" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="Fotogramas" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="Segundos" Encoder.FFmpeg.KeyFrames.Interval="Intervalo" +Encoder.FFmpeg.Framerate="Anulación de la velocidad de fotogramas" Encoder.FFmpeg.AMF.Deprecated="Este codificador está obsoleto y se eliminará pronto. Se insta a los usuarios a migrar al codificador integrado 'AMD HW H.264 (AVC)' o 'AMD HW H.265 (HEVC)' tan pronto como sea posible." Encoder.FFmpeg.AMF.Preset="Preajuste" diff --git a/data/locale/ja-JP.ini b/data/locale/ja-JP.ini index 7471a663a3..5817164f19 100644 --- a/data/locale/ja-JP.ini +++ b/data/locale/ja-JP.ini @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="インターバルタイプ" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="フレーム" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="秒" Encoder.FFmpeg.KeyFrames.Interval="インターバル" +Encoder.FFmpeg.Framerate="フレームレートオーバーライド" Encoder.FFmpeg.AMF.Deprecated="このエンコーダーは非推奨で、まもなく削除される予定です。ユーザーは、できるだけ早く統合された 'AMD HW H.264 (AVC)' または 'AMD HW H.265 (HEVC)' エンコーダーに移行することが推奨されます。" Encoder.FFmpeg.AMF.Preset="プリセット" diff --git a/data/locale/ko-KR.ini b/data/locale/ko-KR.ini index d0c1b58cbd..8433b32ff8 100644 --- a/data/locale/ko-KR.ini +++ b/data/locale/ko-KR.ini @@ -72,14 +72,35 @@ Encoder.AOM.AV1.Encoder.CPUUsage.7="매우 빠름" Encoder.AOM.AV1.Encoder.CPUUsage.8="엄청 빠름" Encoder.AOM.AV1.Encoder.CPUUsage.9="정말 빠름" Encoder.AOM.AV1.Encoder.CPUUsage.10="미치도록 빠름" +Encoder.AOM.AV1.Encoder.Profile="프로파일" +Encoder.AOM.AV1.KeyFrames="키프레임" +Encoder.AOM.AV1.KeyFrames.IntervalType.Frames="프레임" +Encoder.AOM.AV1.KeyFrames.IntervalType.Seconds="초" +Encoder.AOM.AV1.KeyFrames.Interval="간격" +Encoder.AOM.AV1.RateControl="데이터율 제어" +Encoder.AOM.AV1.RateControl.Mode="모드" +Encoder.AOM.AV1.RateControl.Mode.CBR="고정 비트레이트 (CBR)" +Encoder.AOM.AV1.RateControl.Mode.VBR="동적 비트레이트 (VBR)" +Encoder.AOM.AV1.RateControl.Limits="제한" +Encoder.AOM.AV1.RateControl.Limits.Bitrate="비트레이트" +Encoder.AOM.AV1.RateControl.Buffer="버퍼" Encoder.AOM.AV1.RateControl.Buffer.Size="크기" +Encoder.AOM.AV1.Advanced="고급" +Encoder.FFmpeg.KeyFrames="키프레임" +Encoder.FFmpeg.KeyFrames.IntervalType.Frames="프레임" +Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="초" +Encoder.FFmpeg.KeyFrames.Interval="간격" +Encoder.FFmpeg.AMF.RateControl.Mode="모드" +Encoder.FFmpeg.AMF.RateControl.Limits="제한" Encoder.FFmpeg.NVENC.Preset.default="기본값" Encoder.FFmpeg.NVENC.Preset.slow="느림" Encoder.FFmpeg.NVENC.Preset.medium="중간" Encoder.FFmpeg.NVENC.Preset.fast="빠름" +Encoder.FFmpeg.NVENC.RateControl.Mode="모드" +Encoder.FFmpeg.NVENC.RateControl.Limits="제한" Blur.Type.Box="박스" Blur.Type.BoxLinear="박스 선형" @@ -108,6 +129,7 @@ Filter.Shader="셰이더" Source.Shader="셰이더" Transition.Shader="셰이더" +Filter.AutoFraming.Tracking.Mode="모드" Filter.Blur="흐림" Filter.Blur.Type="유형" @@ -149,8 +171,10 @@ Filter.ColorGrade.Tint.Mode.Linear="선형" +Filter.Transform.Camera.Mode="모드" +Filter.VirtualGreenscreen.NVIDIA.Greenscreen.Mode="모드" Source.Mirror.Source="소스" From 15eaec2e0938562bde0f646a51394dc2ddcaba8c Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 30 Oct 2022 02:09:33 +0100 Subject: [PATCH 149/164] obs/gs/rendertarget: Add support for color spaces --- source/obs/gs/gs-rendertarget.cpp | 60 +++++++++++++++++++++---------- source/obs/gs/gs-rendertarget.hpp | 41 +++++++++++---------- 2 files changed, 65 insertions(+), 36 deletions(-) diff --git a/source/obs/gs/gs-rendertarget.cpp b/source/obs/gs/gs-rendertarget.cpp index 5a3a6d8457..729f2ee16d 100644 --- a/source/obs/gs/gs-rendertarget.cpp +++ b/source/obs/gs/gs-rendertarget.cpp @@ -1,21 +1,22 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2017 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (c) 2017-2022 Michael Fabian Dirks +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. #include "gs-rendertarget.hpp" #include "obs/gs/gs-helper.hpp" @@ -46,6 +47,12 @@ streamfx::obs::gs::rendertarget_op streamfx::obs::gs::rendertarget::render(uint3 return {this, width, height}; } +streamfx::obs::gs::rendertarget_op streamfx::obs::gs::rendertarget::render(uint32_t width, uint32_t height, + gs_color_space cs) +{ + return {this, width, height, cs}; +} + gs_texture_t* streamfx::obs::gs::rendertarget::get_object() { auto gctx = streamfx::obs::gs::context(); @@ -100,6 +107,23 @@ streamfx::obs::gs::rendertarget_op::rendertarget_op(streamfx::obs::gs::rendertar parent->_is_being_rendered = true; } +streamfx::obs::gs::rendertarget_op::rendertarget_op(streamfx::obs::gs::rendertarget* rt, uint32_t width, + uint32_t height, gs_color_space cs) + : parent(rt) +{ + if (parent == nullptr) + throw std::invalid_argument("rt"); + if (parent->_is_being_rendered) + throw std::logic_error("Can't start rendering to the same render target twice."); + + auto gctx = streamfx::obs::gs::context(); + gs_texrender_reset(parent->_render_target); + if (!gs_texrender_begin_with_color_space(parent->_render_target, width, height, cs)) { + throw std::runtime_error("Failed to begin rendering to render target."); + } + parent->_is_being_rendered = true; +} + streamfx::obs::gs::rendertarget_op::rendertarget_op(streamfx::obs::gs::rendertarget_op&& r) noexcept { this->parent = r.parent; diff --git a/source/obs/gs/gs-rendertarget.hpp b/source/obs/gs/gs-rendertarget.hpp index d736cdd4ee..9467446742 100644 --- a/source/obs/gs/gs-rendertarget.hpp +++ b/source/obs/gs/gs-rendertarget.hpp @@ -1,21 +1,22 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2017 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (c) 2017-2022 Michael Fabian Dirks +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. #pragma once #include "common.hpp" @@ -54,6 +55,8 @@ namespace streamfx::obs::gs { gs_zstencil_format get_zstencil_format(); streamfx::obs::gs::rendertarget_op render(uint32_t width, uint32_t height); + + streamfx::obs::gs::rendertarget_op render(uint32_t width, uint32_t height, gs_color_space cs); }; class rendertarget_op { @@ -64,6 +67,8 @@ namespace streamfx::obs::gs { rendertarget_op(streamfx::obs::gs::rendertarget* rt, uint32_t width, uint32_t height); + rendertarget_op(streamfx::obs::gs::rendertarget* rt, uint32_t width, uint32_t height, gs_color_space cs); + // Move Constructor rendertarget_op(streamfx::obs::gs::rendertarget_op&&) noexcept; From 5b978a20e0a326c2ff6d3e319283f16ce6e75f50 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 30 Oct 2022 02:09:45 +0100 Subject: [PATCH 150/164] obs/source-factory: Add support for color spaces --- source/obs/obs-source-factory.cpp | 37 ++++++++--------- source/obs/obs-source-factory.hpp | 66 ++++++++++++++++++++++--------- 2 files changed, 67 insertions(+), 36 deletions(-) diff --git a/source/obs/obs-source-factory.cpp b/source/obs/obs-source-factory.cpp index be07b0e9d6..1ba973f8c1 100644 --- a/source/obs/obs-source-factory.cpp +++ b/source/obs/obs-source-factory.cpp @@ -1,20 +1,21 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2018 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (c) 2018 Michael Fabian Dirks +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. #include "obs-source-factory.hpp" diff --git a/source/obs/obs-source-factory.hpp b/source/obs/obs-source-factory.hpp index e5c2bf2b37..2f38406916 100644 --- a/source/obs/obs-source-factory.hpp +++ b/source/obs/obs-source-factory.hpp @@ -1,21 +1,22 @@ -/* - * Modern effects for a modern Streamer - * Copyright (C) 2018 Michael Fabian Dirks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ +// Copyright (c) 2018-2022 Michael Fabian Dirks +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. #pragma once #include "common.hpp" @@ -223,6 +224,30 @@ namespace streamfx::obs { } public /* Instance > Video */: + void support_color_space(bool v) + { + if (v) { + _info.video_get_color_space = _video_get_color_space; + } else { + _info.video_get_color_space = nullptr; + } + } + + static gs_color_space _video_get_color_space(void* data, size_t count, const gs_color_space* preferred_spaces) + { + try { + if (data) + return reinterpret_cast<_instance*>(data)->video_get_color_space(count, preferred_spaces); + return GS_CS_SRGB; + } catch (const std::exception& ex) { + DLOG_ERROR("Unexpected exception in function '%s': %s.", __FUNCTION_NAME__, ex.what()); + return GS_CS_SRGB; + } catch (...) { + DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__); + return GS_CS_SRGB; + } + } + static void _video_tick(void* data, float seconds) noexcept { try { @@ -839,6 +864,11 @@ namespace streamfx::obs { virtual void filter_remove(obs_source_t* source) {} public /* Instance > Video */: + virtual gs_color_space video_get_color_space(size_t count, const gs_color_space* preferred_spaces) + { + return GS_CS_SRGB; + } + virtual void video_tick(float_t seconds) {} virtual void video_render(gs_effect_t* effect) {} From 2577622dbefabcec461b69074c2971f82140b250 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 30 Oct 2022 02:15:41 +0100 Subject: [PATCH 151/164] filter/dynamic-mask: Replace rendering code and optimize storage The rendering code here was one of the older code bases, which was riddled with bugs and leaks. The new code doesn't look pretty, but it works for the time being until a better solution is found or made. It should be able to handle HDR inputs now, but it may not be completely correct yet. This also fixes the double-free bug. As an additional improvement, I've moved the allocation of the effect to a shared class which should reduce the memory usage slightly when multiple effects are in play. And now selecting nothing selects the filter target itself without infinitely adding references to the filter. Good enough in my eyes. Fixes #819 --- data/locale/en-US.ini | 3 + source/filters/filter-dynamic-mask.cpp | 520 +++++++++++++++++++------ source/filters/filter-dynamic-mask.hpp | 61 ++- 3 files changed, 441 insertions(+), 143 deletions(-) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index beeb8097ff..5ac5ff33e3 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -392,6 +392,9 @@ Filter.DynamicMask.Channel="%s Channel" Filter.DynamicMask.Channel.Value="Base Value" Filter.DynamicMask.Channel.Multiplier="Multiplier" Filter.DynamicMask.Channel.Input="%s Input Value" +Filter.DynamicMask.Debug.Texture="Debug Texture" +Filter.DynamicMask.Debug.Texture.Base="Base" +Filter.DynamicMask.Debug.Texture.Input="Input" # Filter - SDF Effects Filter.SDFEffects="SDF Effects" diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 51156dc3df..2f6f0d49e8 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -23,6 +23,7 @@ #include "util/util-logging.hpp" #include "warning-disable.hpp" +#include #include #include #include @@ -63,6 +64,10 @@ #define ST_KEY_CHANNEL_MULTIPLIER "Filter.DynamicMask.Channel.Multiplier" #define ST_I18N_CHANNEL_INPUT "Filter.DynamicMask.Channel.Input" #define ST_KEY_CHANNEL_INPUT "Filter.DynamicMask.Channel.Input" +#define ST_KEY_DEBUG_TEXTURE "Debug.Texture" +#define ST_I18N_DEBUG_TEXTURE ST_I18N ".Debug.Texture" +#define ST_I18N_DEBUG_TEXTURE_BASE ST_I18N_DEBUG_TEXTURE ".Base" +#define ST_I18N_DEBUG_TEXTURE_INPUT ST_I18N_DEBUG_TEXTURE ".Input" using namespace streamfx::filter::dynamic_mask; @@ -75,28 +80,59 @@ static std::pair channel_translations[] = { {channel::Alpha, S_CHANNEL_ALPHA}, }; -dynamic_mask_instance::dynamic_mask_instance(obs_data_t* settings, obs_source_t* self) - : obs::source_instance(settings, self), _translation_map(), _effect(), _have_filter_texture(false), _filter_rt(), - _filter_texture(), _have_input_texture(false), _input(), _input_capture(), _input_texture(), - _have_final_texture(false), _final_rt(), _final_texture(), _channels(), _precalc() +data::data() { - { - auto gctx = streamfx::obs::gs::context(); + auto gctx = streamfx::obs::gs::context(); - _filter_rt = std::make_shared(GS_RGBA, GS_ZS_NONE); - _final_rt = std::make_shared(GS_RGBA, GS_ZS_NONE); + _channel_mask_fx = streamfx::obs::gs::effect::create(streamfx::data_file_path("effects/channel-mask.effect")); +} - { - auto file = streamfx::data_file_path("effects/channel-mask.effect"); - try { - _effect = streamfx::obs::gs::effect::create(file); - } catch (std::exception& ex) { - D_LOG_ERROR("Error loading '%s': %s", file.u8string().c_str(), ex.what()); - throw; - } - } +data::~data() {} + +streamfx::obs::gs::effect data::channel_mask_fx() +{ + return _channel_mask_fx; +} + +std::shared_ptr data::get() +{ + static std::mutex instance_lock; + static std::weak_ptr weak_instance; + + std::lock_guard lock(instance_lock); + auto instance = weak_instance.lock(); + if (!instance) { + instance = std::shared_ptr{new streamfx::filter::dynamic_mask::data()}; + weak_instance = instance; } + return instance; +} +dynamic_mask_instance::dynamic_mask_instance(obs_data_t* settings, obs_source_t* self) + : obs::source_instance(settings, self), // + _data(streamfx::filter::dynamic_mask::data::get()), // + _translation_map(), // + _input(), // + _input_child(), // + _input_vs(), // + _input_ac(), // + _have_base(false), // + _base_rt(), // + _base_tex(), // + _base_color_space(GS_CS_SRGB), // + _base_color_format(GS_RGBA), // + _have_input(false), // + _input_rt(), // + _input_tex(), // + _input_color_space(GS_CS_SRGB), // + _input_color_format(GS_RGBA), // + _have_final(false), // + _final_rt(), // + _final_tex(), // + _channels(), // + _precalc(), // + _debug_texture(-1) // +{ update(settings); } @@ -167,12 +203,14 @@ void dynamic_mask_instance::update(obs_data_t* settings) ch->ptr[static_cast(kv2.first)] = found->second.values.ptr[static_cast(kv2.first)]; } } + + _debug_texture = obs_data_get_int(settings, ST_KEY_DEBUG_TEXTURE); } void dynamic_mask_instance::save(obs_data_t* settings) { - if (_input) { - obs_data_set_string(settings, ST_KEY_INPUT, _input.lock().name().data()); + if (auto source = _input.lock(); source) { + obs_data_set_string(settings, ST_KEY_INPUT, source.name().data()); } for (auto kv1 : channel_translations) { @@ -200,136 +238,349 @@ void dynamic_mask_instance::save(obs_data_t* settings) } } -void dynamic_mask_instance::video_tick(float) +gs_color_space dynamic_mask_instance::video_get_color_space(size_t count, const gs_color_space* preferred_spaces) { - _have_input_texture = false; - _have_filter_texture = false; - _have_final_texture = false; + return _base_color_space; } -void dynamic_mask_instance::video_render(gs_effect_t* in_effect) +void dynamic_mask_instance::video_tick(float time) { - obs_source_t* parent = obs_filter_get_parent(_self); - obs_source_t* target = obs_filter_get_target(_self); - uint32_t width = obs_source_get_base_width(target); - uint32_t height = obs_source_get_base_height(target); - auto input = _input.lock(); + { // Base Information + _have_base = false; + + std::array preferred_formats = {GS_CS_SRGB}; + _base_color_space = obs_source_get_color_space(obs_filter_get_target(_self), preferred_formats.size(), + preferred_formats.data()); + switch (_base_color_space) { + case GS_CS_SRGB: + _base_color_format = GS_RGBA; + break; + case GS_CS_SRGB_16F: + case GS_CS_709_EXTENDED: + case GS_CS_709_SCRGB: + _base_color_format = GS_RGBA16F; + break; + default: + _base_color_format = GS_RGBA_UNORM; + } - if (!_self || !parent || !target || !width || !height || !_input || !_input_capture || !_effect) { - obs_source_skip_video_filter(_self); - return; - } else if (!input.width() || !input.height()) { - obs_source_skip_video_filter(_self); - return; + if ((obs_source_get_output_flags(obs_filter_get_target(_self)) & OBS_SOURCE_SRGB) == OBS_SOURCE_SRGB) { + _base_srgb = (_base_color_space <= GS_CS_SRGB_16F); + } else { + _base_srgb = false; + } } + if (auto input = _input.lock(); input) { // Input Information + _have_input = false; + + std::array preferred_formats = {GS_CS_SRGB}; + _input_color_space = obs_source_get_color_space(input, preferred_formats.size(), preferred_formats.data()); + switch (_input_color_space) { + case GS_CS_SRGB: + _input_color_format = GS_RGBA; + break; + case GS_CS_SRGB_16F: + case GS_CS_709_EXTENDED: + case GS_CS_709_SCRGB: + _input_color_format = GS_RGBA16F; + break; + default: + _input_color_format = GS_RGBA_UNORM; + } + + if ((input.output_flags() & OBS_SOURCE_SRGB) == OBS_SOURCE_SRGB) { + _input_srgb = (_base_color_space <= GS_CS_SRGB_16F); + } else { + _input_srgb = false; + } + } else { + _have_input = false; + } + + _have_final = false; + _final_srgb = _base_srgb; +} + +void dynamic_mask_instance::video_render(gs_effect_t* in_effect) +{ + gs_effect_t* default_effect = obs_get_base_effect(obs_base_effect::OBS_EFFECT_DEFAULT); + auto effect = _data->channel_mask_fx(); + obs_source_t* parent = obs_filter_get_parent(_self); + obs_source_t* target = obs_filter_get_target(_self); + uint32_t width = obs_source_get_base_width(target); + uint32_t height = obs_source_get_base_height(target); + auto input = _input.lock(); + #ifdef ENABLE_PROFILING streamfx::obs::gs::debug_marker gdmp{streamfx::obs::gs::debug_color_source, "Dynamic Mask '%s' on '%s'", obs_source_get_name(_self), obs_source_get_name(obs_filter_get_parent(_self))}; #endif - gs_effect_t* default_effect = obs_get_base_effect(obs_base_effect::OBS_EFFECT_DEFAULT); + // If there's some issue acquiring information, skip rendering entirely. + if (!_self || !parent || !target || !width || !height) { + _self.skip_video_filter(); + return; + } else if (input && (!input.width() || !input.height())) { + _self.skip_video_filter(); + return; + } - try { // Capture filter and input - if (!_have_filter_texture) { + // Capture the base texture for later rendering. + if (!_have_base) { #ifdef ENABLE_PROFILING - streamfx::obs::gs::debug_marker gdm{streamfx::obs::gs::debug_color_cache, "Cache"}; + streamfx::obs::gs::debug_marker gdm{streamfx::obs::gs::debug_color_cache, "Base Texture"}; #endif + // Ensure the Render Target matches the expected format. + if (!_base_rt || (_base_rt->get_color_format() != _base_color_format)) { + _base_rt = std::make_shared(_base_color_format, GS_ZS_NONE); + } - if (obs_source_process_filter_begin(_self, GS_RGBA, OBS_ALLOW_DIRECT_RENDERING)) { - auto op = _filter_rt->render(width, height); + bool previous_srgb = gs_framebuffer_srgb_enabled(); + auto previous_lsrgb = gs_get_linear_srgb(); + gs_set_linear_srgb(_base_srgb); + gs_enable_framebuffer_srgb(false); - gs_blend_state_push(); - gs_reset_blend_state(); - gs_enable_blending(false); - gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO); + // Begin rendering the source with a certain color space. + if (obs_source_process_filter_begin_with_color_space(_self, _base_color_format, _base_color_space, + OBS_ALLOW_DIRECT_RENDERING)) { + try { + { + auto op = _base_rt->render(width, height, _base_color_space); + + // Push a new blend state to stack. + gs_blend_state_push(); + gs_reset_blend_state(); + gs_enable_blending(false); + gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO); + try { + // Enable all channels. + gs_enable_color(true, true, true, true); + + // Disable culling. + gs_set_cull_mode(GS_NEITHER); + + // Disable depth testing. + gs_enable_depth_test(false); + gs_depth_function(GS_ALWAYS); + + // Disable stencil testing + gs_enable_stencil_test(false); + gs_enable_stencil_write(false); + gs_stencil_function(GS_STENCIL_BOTH, GS_ALWAYS); + gs_stencil_op(GS_STENCIL_BOTH, GS_KEEP, GS_KEEP, GS_KEEP); + + // Set up rendering matrix. + gs_ortho(0, static_cast(width), 0, static_cast(height), -1., 1.); + + { // Clear to black. + vec4 clr = {0., 0., 0., 0.}; + gs_clear(GS_CLEAR_COLOR, &clr, 0., 0); + } + + // Render the source. + _self.process_filter_end(default_effect, width, height); + + // Pop the old blend state. + gs_blend_state_pop(); + + } catch (...) { + gs_blend_state_pop(); + throw; + } + } - gs_set_cull_mode(GS_NEITHER); - gs_enable_color(true, true, true, true); + _have_base = true; + _base_rt->get_texture(_base_tex); + } catch (const std::exception& ex) { + _self.process_filter_end(default_effect, width, height); + DLOG_ERROR("Failed to capture base texture: %s", ex.what()); + } catch (...) { + _self.process_filter_end(default_effect, width, height); + DLOG_ERROR("Failed to capture base texture.", nullptr); + } + } - gs_enable_depth_test(false); - gs_depth_function(GS_ALWAYS); + gs_set_linear_srgb(previous_lsrgb); + gs_enable_framebuffer_srgb(previous_srgb); + } - gs_enable_stencil_test(false); - gs_enable_stencil_write(false); - gs_stencil_function(GS_STENCIL_BOTH, GS_ALWAYS); - gs_stencil_op(GS_STENCIL_BOTH, GS_KEEP, GS_KEEP, GS_KEEP); - gs_ortho(0, static_cast(width), 0, static_cast(height), -1., 1.); + // Capture the input texture for later rendering. + if (!_have_input) { + if (!input) { + // Treat no selection as selecting the target filter. + _have_input = _have_base; + _input_tex = _base_tex; + _input_color_format = _base_color_format; + _input_color_space = _base_color_space; + } else { +#ifdef ENABLE_PROFILING + streamfx::obs::gs::debug_marker gdm{streamfx::obs::gs::debug_color_source, "Input '%s'", + input.name().data()}; +#endif + // Ensure the Render Target matches the expected format. + if (!_input_rt || (_input_rt->get_color_format() != _input_color_format)) { + _input_rt = std::make_shared(_input_color_format, GS_ZS_NONE); + } - obs_source_process_filter_end(_self, default_effect, width, height); + auto previous_lsrgb = gs_get_linear_srgb(); + gs_set_linear_srgb(_input_srgb); + bool previous_srgb = gs_framebuffer_srgb_enabled(); + gs_enable_framebuffer_srgb(false); - gs_blend_state_pop(); - } else { - throw std::runtime_error("Failed to render filter."); + try { + { + auto op = _input_rt->render(input.width(), input.height(), _input_color_space); + + // Push a new blend state to stack. + gs_blend_state_push(); + gs_reset_blend_state(); + gs_enable_blending(false); + gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO); + try { + // Enable all channels. + gs_enable_color(true, true, true, true); + + // Disable culling. + gs_set_cull_mode(GS_NEITHER); + + // Disable depth testing. + gs_enable_depth_test(false); + gs_depth_function(GS_ALWAYS); + + // Disable stencil testing + gs_enable_stencil_test(false); + gs_enable_stencil_write(false); + gs_stencil_function(GS_STENCIL_BOTH, GS_ALWAYS); + gs_stencil_op(GS_STENCIL_BOTH, GS_KEEP, GS_KEEP, GS_KEEP); + + // Set up rendering matrix. + gs_ortho(0, static_cast(input.width()), 0, static_cast(input.height()), -1., 1.); + + { // Clear to black. + vec4 clr = {0., 0., 0., 0.}; + gs_clear(GS_CLEAR_COLOR, &clr, 0., 0); + } + + // Render the source. + obs_source_video_render(input); + + // Pop the old blend state. + gs_blend_state_pop(); + } catch (...) { + gs_blend_state_pop(); + throw; + } + } + + _have_input = true; + _input_rt->get_texture(_input_tex); + } catch (const std::exception& ex) { + DLOG_ERROR("Failed to capture input texture: %s", ex.what()); + } catch (...) { + DLOG_ERROR("Failed to capture input texture.", nullptr); } - _filter_texture = _filter_rt->get_texture(); - _have_filter_texture = true; + gs_enable_framebuffer_srgb(previous_srgb); + gs_set_linear_srgb(previous_lsrgb); } + } - if (!_have_input_texture) { + // Capture the final texture. + if (!_have_final && _have_base) { #ifdef ENABLE_PROFILING - streamfx::obs::gs::debug_marker gdm{streamfx::obs::gs::debug_color_capture, "Capture '%s'", - obs_source_get_name(_input_capture->get_object())}; + streamfx::obs::gs::debug_marker gdm{streamfx::obs::gs::debug_color_render, "Final Calculation"}; #endif - _input_texture = _input_capture->render(input.width(), input.height()); - _have_input_texture = true; + // Ensure the Render Target matches the expected format. + if (!_final_rt || (_final_rt->get_color_format() != _base_color_format)) { + _final_rt = std::make_shared(_base_color_format, GS_ZS_NONE); } - // Draw source - if (!_have_final_texture) { -#ifdef ENABLE_PROFILING - streamfx::obs::gs::debug_marker gdm{streamfx::obs::gs::debug_color_convert, "Masking"}; -#endif + bool previous_srgb = gs_framebuffer_srgb_enabled(); + auto previous_lsrgb = gs_get_linear_srgb(); + gs_enable_framebuffer_srgb(_final_srgb); + gs_set_linear_srgb(_final_srgb); + try { { auto op = _final_rt->render(width, height); + // Push a new blend state to stack. gs_blend_state_push(); gs_reset_blend_state(); gs_enable_blending(false); gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO); - - gs_set_cull_mode(GS_NEITHER); - gs_enable_color(true, true, true, true); - - gs_enable_depth_test(false); - gs_depth_function(GS_ALWAYS); - - gs_enable_stencil_test(false); - gs_enable_stencil_write(false); - gs_stencil_function(GS_STENCIL_BOTH, GS_ALWAYS); - gs_stencil_op(GS_STENCIL_BOTH, GS_KEEP, GS_KEEP, GS_KEEP); - gs_ortho(0, 1, 0, 1, -1., 1.); - - _effect.get_parameter("pMaskInputA").set_texture(_filter_texture); - _effect.get_parameter("pMaskInputB").set_texture(_input_texture); - - _effect.get_parameter("pMaskBase").set_float4(_precalc.base); - _effect.get_parameter("pMaskMatrix").set_matrix(_precalc.matrix); - _effect.get_parameter("pMaskMultiplier").set_float4(_precalc.scale); - - while (gs_effect_loop(_effect.get(), "Mask")) { - streamfx::gs_draw_fullscreen_tri(); + try { + // Enable all channels. + gs_enable_color(true, true, true, true); + + // Disable culling. + gs_set_cull_mode(GS_NEITHER); + + // Disable depth testing. + gs_enable_depth_test(false); + gs_depth_function(GS_ALWAYS); + + // Disable stencil testing + gs_enable_stencil_test(false); + gs_enable_stencil_write(false); + gs_stencil_function(GS_STENCIL_BOTH, GS_ALWAYS); + gs_stencil_op(GS_STENCIL_BOTH, GS_KEEP, GS_KEEP, GS_KEEP); + + // Set up rendering matrix. + gs_ortho(0, 1, 0, 1, -1., 1.); + + { // Clear to black. + vec4 clr = {0., 0., 0., 0.}; + gs_clear(GS_CLEAR_COLOR, &clr, 0., 0); + } + + effect.get_parameter("pMaskInputA").set_texture(_base_tex, _base_srgb); + effect.get_parameter("pMaskInputB").set_texture(_input_tex, _input_srgb); + + effect.get_parameter("pMaskBase").set_float4(_precalc.base); + effect.get_parameter("pMaskMatrix").set_matrix(_precalc.matrix); + effect.get_parameter("pMaskMultiplier").set_float4(_precalc.scale); + + while (gs_effect_loop(effect.get(), "Mask")) { + streamfx::gs_draw_fullscreen_tri(); + } + + // Pop the old blend state. + gs_blend_state_pop(); + } catch (...) { + gs_blend_state_pop(); + throw; } - - gs_blend_state_pop(); } - _final_texture = _final_rt->get_texture(); - _have_final_texture = true; + _final_tex = _final_rt->get_texture(); + _have_final = true; + } catch (const std::exception& ex) { + DLOG_ERROR("Failed to render final texture: %s", ex.what()); + } catch (...) { + DLOG_ERROR("Failed to render final texture.", nullptr); } - } catch (...) { - obs_source_skip_video_filter(_self); - return; + + gs_set_linear_srgb(previous_lsrgb); + gs_enable_framebuffer_srgb(previous_srgb); } - if (!_have_filter_texture || !_have_input_texture || !_have_final_texture) { - obs_source_skip_video_filter(_self); - return; + // Enable texture debugging + switch (_debug_texture) { + case 0: + _have_final = _have_base; + _final_tex = _base_tex; + break; + case 1: + _have_final = _have_input; + _final_tex = _input_tex; + break; } - if (!_filter_texture->get_object() || !_input_texture->get_object() || !_final_texture->get_object()) { + + // Abort if we don't have a final render. + if (!_have_final || !_final_tex->get_object()) { obs_source_skip_video_filter(_self); return; } @@ -350,18 +601,28 @@ void dynamic_mask_instance::video_render(gs_effect_t* in_effect) gs_stencil_function(GS_STENCIL_BOTH, GS_ALWAYS); gs_stencil_op(GS_STENCIL_BOTH, GS_ZERO, GS_ZERO, GS_ZERO); + const bool previous_srgb = gs_framebuffer_srgb_enabled(); + gs_enable_framebuffer_srgb(gs_get_linear_srgb()); + gs_effect_t* final_effect = in_effect ? in_effect : default_effect; gs_eparam_t* param = gs_effect_get_param_by_name(final_effect, "image"); if (!param) { DLOG_ERROR(" Failed to set image param.", obs_source_get_name(_self)); + gs_enable_framebuffer_srgb(previous_srgb); obs_source_skip_video_filter(_self); return; } else { - gs_effect_set_texture(param, _final_texture->get_object()); + if (gs_get_linear_srgb()) { + gs_effect_set_texture_srgb(param, _final_tex->get_object()); + } else { + gs_effect_set_texture(param, _final_tex->get_object()); + } } while (gs_effect_loop(final_effect, "Draw")) { gs_draw_sprite(0, 0, width, height); } + + gs_enable_framebuffer_srgb(previous_srgb); } } @@ -383,7 +644,7 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::show() return; auto input = _input.lock(); - _input_vs = ::streamfx::obs::source_showing_reference::add_showing_reference(input); + _input_vs = streamfx::obs::source_showing_reference::add_showing_reference(input); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::hide() @@ -397,7 +658,7 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::activate() return; auto input = _input.lock(); - _input_ac = ::streamfx::obs::source_active_reference::add_active_reference(input); + _input_ac = streamfx::obs::source_active_reference::add_active_reference(input); } void streamfx::filter::dynamic_mask::dynamic_mask_instance::deactivate() @@ -408,29 +669,17 @@ void streamfx::filter::dynamic_mask::dynamic_mask_instance::deactivate() bool dynamic_mask_instance::acquire(std::string_view name) { try { - // Prevent us from creating a circle. - if (auto v = obs_source_get_name(obs_filter_get_parent(_self)); (v != nullptr) && (name == v)) { - return false; - } + // Try and acquire the source. + _input = streamfx::obs::weak_source(name); - // Acquire a reference to the actual source. - ::streamfx::obs::source input = name; + // Ensure that this wouldn't cause recursion. + _input_child = std::make_unique(_self, _input.lock()); - // Acquire a texture renderer for the source, with the parent source as the parent. - auto capture = std::make_shared(input, obs_filter_get_parent(_self)); - - // Update our local storage. - _input = input; - _input_capture = capture; - - // Do the necessary things. + // Handle the active and showing stuff. activate(); show(); return true; - } catch (const std::exception&) { - release(); - return false; } catch (...) { release(); return false; @@ -439,24 +688,27 @@ bool dynamic_mask_instance::acquire(std::string_view name) void dynamic_mask_instance::release() { - _input.reset(); - _input_capture.reset(); - + // Handle the active and showing stuff. deactivate(); hide(); + + // Release any references. + _input_child.reset(); + _input.reset(); } dynamic_mask_factory::dynamic_mask_factory() { _info.id = S_PREFIX "filter-dynamic-mask"; _info.type = OBS_SOURCE_TYPE_FILTER; - _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; + _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_SRGB; support_active_child_sources(true); support_child_sources(true); support_size(false); support_activity_tracking(true); support_visibility_tracking(true); + support_color_space(true); finish_setup(); register_proxy("obs-stream-effects-filter-dynamic-mask"); } @@ -479,6 +731,7 @@ void dynamic_mask_factory::get_defaults2(obs_data_t* data) data, (std::string(ST_KEY_CHANNEL_INPUT) + "." + kv.second + "." + kv2.second).c_str(), 0.0); } } + obs_data_set_default_int(data, ST_KEY_DEBUG_TEXTURE, -1); } obs_properties_t* dynamic_mask_factory::get_properties2(dynamic_mask_instance* data) @@ -555,6 +808,19 @@ obs_properties_t* dynamic_mask_factory::get_properties2(dynamic_mask_instance* d } } + { + auto grp = obs_properties_create(); + obs_properties_add_group(props, "Debug", D_TRANSLATE(S_ADVANCED), OBS_GROUP_NORMAL, grp); + + { + auto p = obs_properties_add_list(grp, ST_KEY_DEBUG_TEXTURE, D_TRANSLATE(ST_I18N_DEBUG_TEXTURE), + OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT); + obs_property_list_add_int(p, D_TRANSLATE(S_STATE_DISABLED), -1); + obs_property_list_add_int(p, D_TRANSLATE(ST_I18N_DEBUG_TEXTURE_BASE), 0); + obs_property_list_add_int(p, D_TRANSLATE(ST_I18N_DEBUG_TEXTURE_INPUT), 1); + } + } + return props; } diff --git a/source/filters/filter-dynamic-mask.hpp b/source/filters/filter-dynamic-mask.hpp index 60c7b3c3a4..49610b18e3 100644 --- a/source/filters/filter-dynamic-mask.hpp +++ b/source/filters/filter-dynamic-mask.hpp @@ -21,6 +21,7 @@ #include "common.hpp" #include "gfx/gfx-source-texture.hpp" #include "obs/gs/gs-effect.hpp" +#include "obs/obs-source-active-child.hpp" #include "obs/obs-source-active-reference.hpp" #include "obs/obs-source-factory.hpp" #include "obs/obs-source-showing-reference.hpp" @@ -36,25 +37,52 @@ namespace streamfx::filter::dynamic_mask { enum class channel : int8_t { Invalid = -1, Red, Green, Blue, Alpha }; - class dynamic_mask_instance : public obs::source_instance { - std::map, std::string> _translation_map; + class data { + streamfx::obs::gs::effect _channel_mask_fx; + + private: + data(); - streamfx::obs::gs::effect _effect; + public: + ~data(); - bool _have_filter_texture; - std::shared_ptr _filter_rt; - std::shared_ptr _filter_texture; + streamfx::obs::gs::effect channel_mask_fx(); - bool _have_input_texture; - ::streamfx::obs::weak_source _input; - std::shared_ptr _input_capture; - std::shared_ptr _input_texture; - std::shared_ptr<::streamfx::obs::source_showing_reference> _input_vs; - std::shared_ptr<::streamfx::obs::source_active_reference> _input_ac; + public: + static std::shared_ptr get(); + }; - bool _have_final_texture; + class dynamic_mask_instance : public obs::source_instance { + std::shared_ptr _data; + + std::map, std::string> _translation_map; + + streamfx::obs::weak_source _input; + std::unique_ptr _input_child; + std::shared_ptr _input_vs; + std::shared_ptr _input_ac; + + // Base texture for filtering + bool _have_base; + std::shared_ptr _base_rt; + std::shared_ptr _base_tex; + gs_color_space _base_color_space; + gs_color_format _base_color_format; + bool _base_srgb; + + bool _have_input; + std::shared_ptr _input_rt; + std::shared_ptr _input_tex; + gs_color_space _input_color_space; + gs_color_format _input_color_format; + bool _input_srgb; + + bool _have_final; std::shared_ptr _final_rt; - std::shared_ptr _final_texture; + std::shared_ptr _final_tex; + bool _final_srgb; + + int64_t _debug_texture; struct channel_data { float_t value = 0.0; @@ -78,8 +106,9 @@ namespace streamfx::filter::dynamic_mask { virtual void update(obs_data_t* settings) override; virtual void save(obs_data_t* settings) override; - virtual void video_tick(float_t _time) override; - virtual void video_render(gs_effect_t* effect) override; + virtual gs_color_space video_get_color_space(size_t count, const gs_color_space* preferred_spaces) override; + virtual void video_tick(float_t time) override; + virtual void video_render(gs_effect_t* effect) override; void enum_active_sources(obs_source_enum_proc_t enum_callback, void* param) override; void enum_all_sources(obs_source_enum_proc_t enum_callback, void* param) override; From 6f742da52414ca02093a24fe5c0e1b9eb4402cd9 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 28 Nov 2022 07:43:46 +0100 Subject: [PATCH 152/164] plugin: Only initialize GLAD on OpenGL graphics backend --- source/plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/plugin.cpp b/source/plugin.cpp index e8885881ca..2eab5d0c34 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -116,7 +116,9 @@ MODULE_EXPORT bool obs_module_load(void) // Initialize GLAD (OpenGL) { streamfx::obs::gs::context gctx{}; - _streamfx_gfx_opengl = streamfx::gfx::opengl::get(); + if (gs_get_device_type() == GS_DEVICE_OPENGL) { + _streamfx_gfx_opengl = streamfx::gfx::opengl::get(); + } } #ifdef ENABLE_NVIDIA_CUDA From c18c5e457a076be6e1d1d417d446fbef92c5c820 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 28 Nov 2022 09:54:02 +0100 Subject: [PATCH 153/164] project: Improve templates and UX --- .github/ISSUE_TEMPLATE/config.yml | 16 +++++++---- .github/ISSUE_TEMPLATE/feature.yml | 14 +++------- .github/ISSUE_TEMPLATE/issue.yml | 43 +++++------------------------- .github/pull_request_template.md | 7 ++--- 4 files changed, 26 insertions(+), 54 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 28b02cc29b..880822f9b5 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,17 @@ blank_issues_enabled: false contact_links: - - name: Got an idea or feedback for StreamFX? - url: https://github.com/Xaymar/obs-StreamFX/discussions/categories/ideas-feedback - about: We're always open to new ideas and constructive feedback, as long as they have been discussed before. - - name: Having trouble using StreamFX? + - name: Looking for Help & Support? (Discord-style) + about: Join the Discord to get help and support! (Provided by volunteers only) url: https://s.xaymar.com/streamfx-dc - about: Join the official Discord and head to support-hub to get all the support necessary. + - name: Looking for Help & Support? (Forum-style) + about: For more detailed support, create a discussion thread! + url: https://github.com/Xaymar/obs-StreamFX/discussions/categories/general + - name: Got a question about functionality? + about: Consider using the Q&A discussion board! + url: https://github.com/Xaymar/obs-StreamFX/discussions/categories/q-a + - name: Share feedback and ideas for features on the forum! + about: We're open to ideas and suggestions, as well as constructive feedback. + url: https://github.com/Xaymar/obs-StreamFX/discussions/categories/ideas-feedback - name: OBS Studio Support url: https://obsproject.com/help about: Unsure if your Issue fits the StreamFX plugin? Consider the OBS Studio Support instead! diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 1c066c9334..70f208ef85 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,18 +1,12 @@ --- -name: "File an Improvement Request" -title: "Replace Me Or Have Your Request Closed" -description: "Requests without an accompanying discussion thread will be closed and locked." +name: "File an Feature or Improvement request" +title: "REPLACE ME" +description: "This form is for developers only. Abuse of this form will be met with a permanent interaction ban." labels: ["enhancement"] body: - type: input attributes: label: "Discussion Thread" - description: "Please paste the direct link to the discussion thread" - validations: - required: true -- type: textarea - attributes: - label: "Provide a summary of the Improvement" - description: "This should only include parts that were agreed upon." + description: "Please paste the direct link to the discussion thread discussing this feature or improvement." validations: required: true diff --git a/.github/ISSUE_TEMPLATE/issue.yml b/.github/ISSUE_TEMPLATE/issue.yml index 34b08f8ddc..1e300e1bc2 100644 --- a/.github/ISSUE_TEMPLATE/issue.yml +++ b/.github/ISSUE_TEMPLATE/issue.yml @@ -1,43 +1,15 @@ -name: "File an Issue Report" -title: "Replace Me Or Have Your Report Closed" -description: "Use this if you've encountered a Bug, Crash or Freeze with StreamFX." +--- +name: "File an Bug or Crash report" +title: "REPLACE ME" +description: "This form is for bug and crash reports only, primarily used by developers. Abuse of this form will lead to a permanent interaction ban." labels: ["bug"] body: -- type: dropdown - attributes: - label: "Operating System" - description: "What Operating System do you use for OBS Studio and StreamFX? Select 'Other' if your Operating System is not listed" - options: - - "Windows 10 1903 and higher" - - "MacOS 10.15 and higher" - - "Linux (like Debian/Ubuntu)" - - "Linux (like Arch Linux)" - - "Linux (like FreeBSD)" - - "(Other)" - validations: - required: true -- type: input - attributes: - label: "OBS Studio Version" - description: "Which OBS Studio version are you using to run StreamFX? Versions include all patches (the third element in 'A.B.C'), and release candidates for that version. Select 'Other' if you are using a custom build." - validations: - required: true -- type: input - attributes: - label: "StreamFX Version" - description: "On which StreamFX version did you first encounter this issue?" - validations: - required: true -- type: input +- type: textarea attributes: - label: "OBS Studio Log" - description: "Upload a normal log file that showcases the issue happening. If you encountered a crash, also fill out the next field." + label: "OBS Studio Logs" + description: "Paste the content or attach the log files from OBS Studio here. In the event of a crash, paste or attach both the crash log and the normal log file." validations: required: true -- type: textarea - attributes: - label: "OBS Studio Crash Log" - description: "If OBS Studio crashed (not froze) paste the crash log here, or upload it somewhere and paste the link here." - type: textarea attributes: label: "Current and Expected Behavior" @@ -53,4 +25,3 @@ body: - type: textarea attributes: label: "Any additional Information we need to know?" - description: "If you answered '(Other)' to any system relevant information, explain what you mean by that here." diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 78e7a44685..d38eb14494 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,9 +2,8 @@ #### Completion Checklist -- [ ] I have added myself to the Copyright and License headers and files. -- [ ] I will maintain this code in the future and have added myself to `CODEOWNERS`. -- I have tested this change on the following platforms: + +- [ ] This has been tested on the following platforms: - [ ] MacOS 10.15 - [ ] MacOS 11 - [ ] MacOS 12 @@ -12,3 +11,5 @@ - [ ] Ubuntu 22.04 - [ ] Windows 10 - [ ] Windows 11 +- [ ] The copyright headers and license files have been updated. +- [ ] I will maintain this for the forseeable future, and have added myself to `CODEOWNERS`. From 9b8ef5ac74f7df86c38e6bf46a352cc6d0041e86 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 28 Nov 2022 08:13:31 +0100 Subject: [PATCH 154/164] gfx/util: Rename debug to util(ity) They may be useful for debugging, but they are still utilities. --- CMakeLists.txt | 4 +-- source/filters/filter-autoframing.cpp | 2 +- source/filters/filter-autoframing.hpp | 4 +-- source/gfx/{gfx-debug.cpp => gfx-util.cpp} | 26 +++++++++---------- source/gfx/{gfx-debug.hpp => gfx-util.hpp} | 8 +++--- .../gfx/shader/gfx-shader-param-texture.cpp | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) rename source/gfx/{gfx-debug.cpp => gfx-util.cpp} (89%) rename source/gfx/{gfx-debug.hpp => gfx-util.hpp} (95%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0107348e..2db60dd421 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1046,8 +1046,8 @@ list(APPEND PROJECT_PRIVATE_SOURCE "source/util/util-platform.cpp" "source/util/util-threadpool.cpp" "source/util/util-threadpool.hpp" - "source/gfx/gfx-debug.hpp" - "source/gfx/gfx-debug.cpp" + "source/gfx/gfx-util.hpp" + "source/gfx/gfx-util.cpp" "source/gfx/gfx-opengl.hpp" "source/gfx/gfx-opengl.cpp" "source/gfx/gfx-source-texture.hpp" diff --git a/source/filters/filter-autoframing.cpp b/source/filters/filter-autoframing.cpp index ab54daf684..1ca393adcc 100644 --- a/source/filters/filter-autoframing.cpp +++ b/source/filters/filter-autoframing.cpp @@ -201,7 +201,7 @@ autoframing_instance::autoframing_instance(obs_data_t* data, obs_source_t* self) ::streamfx::obs::gs::context gctx; // Get debug renderer. - _gfx_debug = ::streamfx::gfx::debug::get(); + _gfx_debug = ::streamfx::gfx::util::get(); // Create the render target for the input buffering. _input = std::make_shared<::streamfx::obs::gs::rendertarget>(GS_RGBA_UNORM, GS_ZS_NONE); diff --git a/source/filters/filter-autoframing.hpp b/source/filters/filter-autoframing.hpp index a4aa50826a..478f9c0ef3 100644 --- a/source/filters/filter-autoframing.hpp +++ b/source/filters/filter-autoframing.hpp @@ -18,7 +18,7 @@ */ #pragma once -#include "gfx/gfx-debug.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" #include "obs/gs/gs-vertexbuffer.hpp" @@ -85,7 +85,7 @@ namespace streamfx::filter::autoframing { std::pair _size; std::pair _out_size; - std::shared_ptr<::streamfx::gfx::debug> _gfx_debug; + std::shared_ptr<::streamfx::gfx::util> _gfx_debug; std::shared_ptr<::streamfx::obs::gs::effect> _standard_effect; std::shared_ptr<::streamfx::obs::gs::rendertarget> _input; std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _vb; diff --git a/source/gfx/gfx-debug.cpp b/source/gfx/gfx-util.cpp similarity index 89% rename from source/gfx/gfx-debug.cpp rename to source/gfx/gfx-util.cpp index 9c174b2587..6e66b0c173 100644 --- a/source/gfx/gfx-debug.cpp +++ b/source/gfx/gfx-util.cpp @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include "gfx-debug.hpp" +#include "gfx-util.hpp" #include "graphics/matrix4.h" #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" @@ -42,21 +42,21 @@ #define D_LOG_DEBUG(...) P_LOG_DEBUG(ST_PREFIX __VA_ARGS__) #endif -std::shared_ptr streamfx::gfx::debug::get() +std::shared_ptr streamfx::gfx::util::get() { - static std::weak_ptr instance; - static std::mutex lock; + static std::weak_ptr instance; + static std::mutex lock; std::unique_lock ul(lock); if (instance.expired()) { - auto hard_instance = std::shared_ptr(new streamfx::gfx::debug()); + auto hard_instance = std::shared_ptr(new streamfx::gfx::util()); instance = hard_instance; return hard_instance; } return instance.lock(); } -streamfx::gfx::debug::debug() +streamfx::gfx::util::util() { { std::filesystem::path file = ::streamfx::data_file_path("effects/standard.effect"); @@ -68,7 +68,7 @@ streamfx::gfx::debug::debug() } } -streamfx::gfx::debug::~debug() +streamfx::gfx::util::~util() { obs::gs::context gctx{}; @@ -78,7 +78,7 @@ streamfx::gfx::debug::~debug() _quad_vb.reset(); } -void streamfx::gfx::debug::draw_point(float x, float y, uint32_t color) +void streamfx::gfx::util::draw_point(float x, float y, uint32_t color) { obs::gs::context gctx{}; @@ -100,7 +100,7 @@ void streamfx::gfx::debug::draw_point(float x, float y, uint32_t color) gs_load_vertexbuffer(nullptr); } -void streamfx::gfx::debug::draw_line(float x, float y, float x2, float y2, uint32_t color /*= 0xFFFFFFFF*/) +void streamfx::gfx::util::draw_line(float x, float y, float x2, float y2, uint32_t color /*= 0xFFFFFFFF*/) { obs::gs::context gctx{}; @@ -127,8 +127,8 @@ void streamfx::gfx::debug::draw_line(float x, float y, float x2, float y2, uint3 gs_load_vertexbuffer(nullptr); } -void streamfx::gfx::debug::draw_arrow(float x, float y, float x2, float y2, float w /*= 0.*/, - uint32_t color /*= 0xFFFFFFFF*/) +void streamfx::gfx::util::draw_arrow(float x, float y, float x2, float y2, float w /*= 0.*/, + uint32_t color /*= 0xFFFFFFFF*/) { obs::gs::context gctx{}; @@ -195,8 +195,8 @@ void streamfx::gfx::debug::draw_arrow(float x, float y, float x2, float y2, floa gs_load_vertexbuffer(nullptr); } -void streamfx::gfx::debug::draw_rectangle(float x, float y, float w, float h, bool frame, - uint32_t color /*= 0xFFFFFFFF*/) +void streamfx::gfx::util::draw_rectangle(float x, float y, float w, float h, bool frame, + uint32_t color /*= 0xFFFFFFFF*/) { obs::gs::context gctx{}; diff --git a/source/gfx/gfx-debug.hpp b/source/gfx/gfx-util.hpp similarity index 95% rename from source/gfx/gfx-debug.hpp rename to source/gfx/gfx-util.hpp index 0476c05ea6..5291099c03 100644 --- a/source/gfx/gfx-debug.hpp +++ b/source/gfx/gfx-util.hpp @@ -26,7 +26,7 @@ #include "warning-enable.hpp" namespace streamfx::gfx { - class debug { + class util { std::shared_ptr<::streamfx::obs::gs::effect> _effect; std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _point_vb; std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _line_vb; @@ -34,13 +34,13 @@ namespace streamfx::gfx { std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _quad_vb; public /* Singleton */: - static std::shared_ptr get(); + static std::shared_ptr get(); private: - debug(); + util(); public: - ~debug(); + ~util(); void draw_point(float x, float y, uint32_t color = 0xFFFFFFFF); diff --git a/source/gfx/shader/gfx-shader-param-texture.cpp b/source/gfx/shader/gfx-shader-param-texture.cpp index c16f5b8fab..3640f00870 100644 --- a/source/gfx/shader/gfx-shader-param-texture.cpp +++ b/source/gfx/shader/gfx-shader-param-texture.cpp @@ -18,7 +18,7 @@ #include "gfx-shader-param-texture.hpp" #include "strings.hpp" #include "gfx-shader.hpp" -#include "gfx/gfx-debug.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-helper.hpp" #include "obs/obs-source-tracker.hpp" #include "util/util-platform.hpp" From 8aa8745a3acda37e0ecf56578f4b88fe93804cdf Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 28 Nov 2022 09:11:55 +0100 Subject: [PATCH 155/164] gfx/util: Move draw_fullscreen_triangle here for consistency --- source/filters/filter-blur.cpp | 5 +-- source/filters/filter-blur.hpp | 4 ++- source/filters/filter-color-grade.cpp | 16 +++++----- source/filters/filter-color-grade.hpp | 3 +- source/filters/filter-dynamic-mask.cpp | 3 +- source/filters/filter-dynamic-mask.hpp | 2 ++ source/filters/filter-sdf-effects.cpp | 30 +++++++++--------- source/filters/filter-sdf-effects.hpp | 6 ++-- source/filters/filter-transform.cpp | 8 ++--- source/filters/filter-transform.hpp | 3 ++ source/gfx/blur/gfx-blur-box-linear.cpp | 13 +++++--- source/gfx/blur/gfx-blur-box-linear.hpp | 6 +++- source/gfx/blur/gfx-blur-box.cpp | 15 ++++++--- source/gfx/blur/gfx-blur-box.hpp | 6 +++- source/gfx/blur/gfx-blur-dual-filtering.cpp | 11 +++++-- source/gfx/blur/gfx-blur-dual-filtering.hpp | 6 +++- source/gfx/blur/gfx-blur-gaussian-linear.cpp | 13 +++++--- source/gfx/blur/gfx-blur-gaussian-linear.hpp | 8 +++-- source/gfx/blur/gfx-blur-gaussian.cpp | 18 +++++++---- source/gfx/blur/gfx-blur-gaussian.hpp | 4 +++ source/gfx/gfx-util.cpp | 28 +++++++++++++++++ source/gfx/gfx-util.hpp | 4 +++ source/gfx/lut/gfx-lut-producer.cpp | 4 +-- source/gfx/lut/gfx-lut-producer.hpp | 2 ++ source/gfx/shader/gfx-shader.cpp | 4 +-- source/gfx/shader/gfx-shader.hpp | 3 ++ source/obs/gs/gs-mipmapper.cpp | 4 +-- source/obs/gs/gs-mipmapper.hpp | 2 ++ source/plugin.cpp | 33 -------------------- source/plugin.hpp | 2 -- 30 files changed, 165 insertions(+), 101 deletions(-) diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 4250585dd6..ad3059a47b 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -140,7 +140,8 @@ static std::map list_of_subtypes = { }; blur_instance::blur_instance(obs_data_t* settings, obs_source_t* self) - : obs::source_instance(settings, self), _source_rendered(false), _output_rendered(false) + : obs::source_instance(settings, self), _gfx_util(::streamfx::gfx::util::get()), _source_rendered(false), + _output_rendered(false) { { auto gctx = streamfx::obs::gs::context(); @@ -546,7 +547,7 @@ void blur_instance::video_render(gs_effect_t* effect) // Render while (gs_effect_loop(_effect_mask.get_object(), technique.c_str())) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } catch (const std::exception&) { gs_blend_state_pop(); diff --git a/source/filters/filter-blur.hpp b/source/filters/filter-blur.hpp index f2ee74f962..81292f74d8 100644 --- a/source/filters/filter-blur.hpp +++ b/source/filters/filter-blur.hpp @@ -21,6 +21,7 @@ #include "common.hpp" #include "gfx/blur/gfx-blur-base.hpp" #include "gfx/gfx-source-texture.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-helper.hpp" #include "obs/gs/gs-rendertarget.hpp" @@ -43,7 +44,8 @@ namespace streamfx::filter::blur { class blur_instance : public obs::source_instance { // Effects - streamfx::obs::gs::effect _effect_mask; + streamfx::obs::gs::effect _effect_mask; + std::shared_ptr _gfx_util; // Input std::shared_ptr _source_rt; diff --git a/source/filters/filter-color-grade.cpp b/source/filters/filter-color-grade.cpp index 9bdf929fe5..c919c78851 100644 --- a/source/filters/filter-color-grade.cpp +++ b/source/filters/filter-color-grade.cpp @@ -19,6 +19,7 @@ #include "filter-color-grade.hpp" #include "strings.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-helper.hpp" #include "util/util-logging.hpp" @@ -128,10 +129,11 @@ static constexpr std::string_view HELP_URL = "https://github.com/Xaymar/obs-Stre color_grade_instance::~color_grade_instance() {} color_grade_instance::color_grade_instance(obs_data_t* data, obs_source_t* self) - : obs::source_instance(data, self), _effect(), _lift(), _gamma(), _gain(), _offset(), _tint_detection(), - _tint_luma(), _tint_exponent(), _tint_low(), _tint_mid(), _tint_hig(), _correction(), _lut_enabled(true), - _lut_depth(), _ccache_rt(), _ccache_texture(), _ccache_fresh(false), _lut_initialized(false), _lut_dirty(true), - _lut_producer(), _lut_consumer(), _lut_rt(), _lut_texture(), _cache_rt(), _cache_texture(), _cache_fresh(false) + : obs::source_instance(data, self), _effect(), _gfx_util(::streamfx::gfx::util::get()), _lift(), _gamma(), _gain(), + _offset(), _tint_detection(), _tint_luma(), _tint_exponent(), _tint_low(), _tint_mid(), _tint_hig(), + _correction(), _lut_enabled(true), _lut_depth(), _ccache_rt(), _ccache_texture(), _ccache_fresh(false), + _lut_initialized(false), _lut_dirty(true), _lut_producer(), _lut_consumer(), _lut_rt(), _lut_texture(), + _cache_rt(), _cache_texture(), _cache_fresh(false) { { auto gctx = streamfx::obs::gs::context(); @@ -330,7 +332,7 @@ void color_grade_instance::rebuild_lut() gs_enable_stencil_write(false); while (gs_effect_loop(_effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } gs_blend_state_pop(); @@ -479,7 +481,7 @@ void color_grade_instance::video_render(gs_effect_t* shader) auto effect = _lut_consumer->prepare(_lut_depth, _lut_texture); effect->get_parameter("image").set_texture(_ccache_texture); while (gs_effect_loop(effect->get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } // Restore original blend mode. @@ -538,7 +540,7 @@ void color_grade_instance::video_render(gs_effect_t* shader) // Render the effect. _effect.get_parameter("image").set_texture(_ccache_texture); while (gs_effect_loop(_effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } // Restore original blend mode. diff --git a/source/filters/filter-color-grade.hpp b/source/filters/filter-color-grade.hpp index fcdc887df2..8a6f401173 100644 --- a/source/filters/filter-color-grade.hpp +++ b/source/filters/filter-color-grade.hpp @@ -48,7 +48,8 @@ namespace streamfx::filter::color_grade { }; class color_grade_instance : public obs::source_instance { - streamfx::obs::gs::effect _effect; + streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; // User Configuration vec4 _lift; diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 2f6f0d49e8..d53f0ae1c7 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -111,6 +111,7 @@ std::shared_ptr data::get() dynamic_mask_instance::dynamic_mask_instance(obs_data_t* settings, obs_source_t* self) : obs::source_instance(settings, self), // _data(streamfx::filter::dynamic_mask::data::get()), // + _gfx_util(::streamfx::gfx::util::get()), // _translation_map(), // _input(), // _input_child(), // @@ -544,7 +545,7 @@ void dynamic_mask_instance::video_render(gs_effect_t* in_effect) effect.get_parameter("pMaskMultiplier").set_float4(_precalc.scale); while (gs_effect_loop(effect.get(), "Mask")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } // Pop the old blend state. diff --git a/source/filters/filter-dynamic-mask.hpp b/source/filters/filter-dynamic-mask.hpp index 49610b18e3..5e6bda9644 100644 --- a/source/filters/filter-dynamic-mask.hpp +++ b/source/filters/filter-dynamic-mask.hpp @@ -20,6 +20,7 @@ #pragma once #include "common.hpp" #include "gfx/gfx-source-texture.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/obs-source-active-child.hpp" #include "obs/obs-source-active-reference.hpp" @@ -54,6 +55,7 @@ namespace streamfx::filter::dynamic_mask { class dynamic_mask_instance : public obs::source_instance { std::shared_ptr _data; + std::shared_ptr _gfx_util; std::map, std::string> _translation_map; diff --git a/source/filters/filter-sdf-effects.cpp b/source/filters/filter-sdf-effects.cpp index 3b73af7f22..945146b9c1 100644 --- a/source/filters/filter-sdf-effects.cpp +++ b/source/filters/filter-sdf-effects.cpp @@ -118,14 +118,14 @@ using namespace streamfx::filter::sdf_effects; static constexpr std::string_view HELP_URL = "https://github.com/Xaymar/obs-StreamFX/wiki/Filter-SDF-Effects"; sdf_effects_instance::sdf_effects_instance(obs_data_t* settings, obs_source_t* self) - : obs::source_instance(settings, self), _source_rendered(false), _sdf_scale(1.0), _sdf_threshold(), - _output_rendered(false), _inner_shadow(false), _inner_shadow_color(), _inner_shadow_range_min(), - _inner_shadow_range_max(), _inner_shadow_offset_x(), _inner_shadow_offset_y(), _outer_shadow(false), - _outer_shadow_color(), _outer_shadow_range_min(), _outer_shadow_range_max(), _outer_shadow_offset_x(), - _outer_shadow_offset_y(), _inner_glow(false), _inner_glow_color(), _inner_glow_width(), _inner_glow_sharpness(), - _inner_glow_sharpness_inv(), _outer_glow(false), _outer_glow_color(), _outer_glow_width(), - _outer_glow_sharpness(), _outer_glow_sharpness_inv(), _outline(false), _outline_color(), _outline_width(), - _outline_offset(), _outline_sharpness(), _outline_sharpness_inv() + : obs::source_instance(settings, self), _gfx_util(::streamfx::gfx::util::get()), _source_rendered(false), + _sdf_scale(1.0), _sdf_threshold(), _output_rendered(false), _inner_shadow(false), _inner_shadow_color(), + _inner_shadow_range_min(), _inner_shadow_range_max(), _inner_shadow_offset_x(), _inner_shadow_offset_y(), + _outer_shadow(false), _outer_shadow_color(), _outer_shadow_range_min(), _outer_shadow_range_max(), + _outer_shadow_offset_x(), _outer_shadow_offset_y(), _inner_glow(false), _inner_glow_color(), _inner_glow_width(), + _inner_glow_sharpness(), _inner_glow_sharpness_inv(), _outer_glow(false), _outer_glow_color(), + _outer_glow_width(), _outer_glow_sharpness(), _outer_glow_sharpness_inv(), _outline(false), _outline_color(), + _outline_width(), _outline_offset(), _outline_sharpness(), _outline_sharpness_inv() { { auto gctx = streamfx::obs::gs::context(); @@ -412,7 +412,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) _sdf_producer_effect.get_parameter("_threshold").set_float(_sdf_threshold); while (gs_effect_loop(_sdf_producer_effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } std::swap(_sdf_read, _sdf_write); @@ -470,7 +470,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) gs_effect_set_texture(param, _output_texture->get_object()); } while (gs_effect_loop(default_effect, "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } gs_enable_blending(true); @@ -485,7 +485,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) _sdf_consumer_effect.get_parameter("pShadowOffset") .set_float2(_outer_shadow_offset_x / float_t(baseW), _outer_shadow_offset_y / float_t(baseH)); while (gs_effect_loop(_sdf_consumer_effect.get_object(), "ShadowOuter")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } if (_inner_shadow) { @@ -498,7 +498,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) _sdf_consumer_effect.get_parameter("pShadowOffset") .set_float2(_inner_shadow_offset_x / float_t(baseW), _inner_shadow_offset_y / float_t(baseH)); while (gs_effect_loop(_sdf_consumer_effect.get_object(), "ShadowInner")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } if (_outer_glow) { @@ -510,7 +510,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) _sdf_consumer_effect.get_parameter("pGlowSharpness").set_float(_outer_glow_sharpness); _sdf_consumer_effect.get_parameter("pGlowSharpnessInverse").set_float(_outer_glow_sharpness_inv); while (gs_effect_loop(_sdf_consumer_effect.get_object(), "GlowOuter")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } if (_inner_glow) { @@ -522,7 +522,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) _sdf_consumer_effect.get_parameter("pGlowSharpness").set_float(_inner_glow_sharpness); _sdf_consumer_effect.get_parameter("pGlowSharpnessInverse").set_float(_inner_glow_sharpness_inv); while (gs_effect_loop(_sdf_consumer_effect.get_object(), "GlowInner")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } if (_outline) { @@ -535,7 +535,7 @@ void sdf_effects_instance::video_render(gs_effect_t* effect) _sdf_consumer_effect.get_parameter("pOutlineSharpness").set_float(_outline_sharpness); _sdf_consumer_effect.get_parameter("pOutlineSharpnessInverse").set_float(_outline_sharpness_inv); while (gs_effect_loop(_sdf_consumer_effect.get_object(), "Outline")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } } catch (...) { diff --git a/source/filters/filter-sdf-effects.hpp b/source/filters/filter-sdf-effects.hpp index 3abc8b1b49..084716ca9f 100644 --- a/source/filters/filter-sdf-effects.hpp +++ b/source/filters/filter-sdf-effects.hpp @@ -19,6 +19,7 @@ #pragma once #include "common.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-sampler.hpp" @@ -28,8 +29,9 @@ namespace streamfx::filter::sdf_effects { class sdf_effects_instance : public obs::source_instance { - streamfx::obs::gs::effect _sdf_producer_effect; - streamfx::obs::gs::effect _sdf_consumer_effect; + streamfx::obs::gs::effect _sdf_producer_effect; + streamfx::obs::gs::effect _sdf_consumer_effect; + std::shared_ptr _gfx_util; // Input std::shared_ptr _source_rt; diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index ac61f74aa2..1af38f9a32 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -108,9 +108,9 @@ enum RotationOrder : int64_t { }; transform_instance::transform_instance(obs_data_t* data, obs_source_t* context) - : obs::source_instance(data, context), _camera_mode(), _camera_fov(), _params(), _corners(), _standard_effect(), - _transform_effect(), _sampler(), _cache_rendered(), _mipmap_enabled(), _source_rendered(), _source_size(), - _update_mesh(true) + : obs::source_instance(data, context), _gfx_util(::streamfx::gfx::util::get()), _camera_mode(), _camera_fov(), + _params(), _corners(), _standard_effect(), _transform_effect(), _sampler(), _cache_rendered(), _mipmap_enabled(), + _source_rendered(), _source_size(), _update_mesh(true) { { auto gctx = obs::gs::context(); @@ -565,7 +565,7 @@ void transform_instance::video_render(gs_effect_t* effect) v.set_float2(_corners.br); } while (gs_effect_loop(_transform_effect.get_object(), "CornerPin")) { - ::streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } } diff --git a/source/filters/filter-transform.hpp b/source/filters/filter-transform.hpp index 3d3f46b005..ccac8d5a11 100644 --- a/source/filters/filter-transform.hpp +++ b/source/filters/filter-transform.hpp @@ -19,6 +19,7 @@ #pragma once #include "common.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-mipmapper.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -37,6 +38,8 @@ namespace streamfx::filter::transform { }; class transform_instance : public obs::source_instance { + std::shared_ptr _gfx_util; + // Settings transform_mode _camera_mode; float _camera_fov; diff --git a/source/gfx/blur/gfx-blur-box-linear.cpp b/source/gfx/blur/gfx-blur-box-linear.cpp index 59f5306aee..efd98f3ff8 100644 --- a/source/gfx/blur/gfx-blur-box-linear.cpp +++ b/source/gfx/blur/gfx-blur-box-linear.cpp @@ -28,7 +28,7 @@ #define ST_MAX_BLUR_SIZE 128 // Also change this in box-linear.effect if modified. -streamfx::gfx::blur::box_linear_data::box_linear_data() +streamfx::gfx::blur::box_linear_data::box_linear_data() : _gfx_util(::streamfx::gfx::util::get()) { auto gctx = streamfx::obs::gs::context(); { @@ -47,6 +47,11 @@ streamfx::gfx::blur::box_linear_data::~box_linear_data() _effect.reset(); } +std::shared_ptr streamfx::gfx::blur::box_linear_data::get_gfx_util() +{ + return _gfx_util; +} + streamfx::obs::gs::effect streamfx::gfx::blur::box_linear_data::get_effect() { return _effect; @@ -279,7 +284,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box_linear::r auto op = _rendertarget2->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -295,7 +300,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box_linear::r auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } @@ -366,7 +371,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box_linear_di auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } diff --git a/source/gfx/blur/gfx-blur-box-linear.hpp b/source/gfx/blur/gfx-blur-box-linear.hpp index 031604ede3..f2416ee92f 100644 --- a/source/gfx/blur/gfx-blur-box-linear.hpp +++ b/source/gfx/blur/gfx-blur-box-linear.hpp @@ -18,6 +18,7 @@ #pragma once #include "common.hpp" #include "gfx-blur-base.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -29,12 +30,15 @@ namespace streamfx::gfx { namespace blur { class box_linear_data { - streamfx::obs::gs::effect _effect; + streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; public: box_linear_data(); virtual ~box_linear_data(); + std::shared_ptr get_gfx_util(); + streamfx::obs::gs::effect get_effect(); }; diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 369c68c47d..415e9e4c8d 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -47,6 +47,11 @@ streamfx::gfx::blur::box_data::~box_data() _effect.reset(); } +std::shared_ptr streamfx::gfx::blur::box_data::get_gfx_util() +{ + return _gfx_util; +} + streamfx::obs::gs::effect streamfx::gfx::blur::box_data::get_effect() { return _effect; @@ -289,7 +294,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box::render() auto op = _rendertarget2->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -305,7 +310,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box::render() auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } @@ -375,7 +380,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box_direction auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } @@ -451,7 +456,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box_rotationa auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Rotate")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } @@ -516,7 +521,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::box_zoom::ren auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Zoom")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } diff --git a/source/gfx/blur/gfx-blur-box.hpp b/source/gfx/blur/gfx-blur-box.hpp index 6e489ace7d..d353c0e04a 100644 --- a/source/gfx/blur/gfx-blur-box.hpp +++ b/source/gfx/blur/gfx-blur-box.hpp @@ -18,6 +18,7 @@ #pragma once #include "common.hpp" #include "gfx-blur-base.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -29,12 +30,15 @@ namespace streamfx::gfx { namespace blur { class box_data { - streamfx::obs::gs::effect _effect; + streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; public: box_data(); virtual ~box_data(); + std::shared_ptr get_gfx_util(); + streamfx::obs::gs::effect get_effect(); }; diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index 40ae3dba6f..402d441d1e 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -45,7 +45,7 @@ #define ST_MAX_LEVELS 16 -streamfx::gfx::blur::dual_filtering_data::dual_filtering_data() +streamfx::gfx::blur::dual_filtering_data::dual_filtering_data() : _gfx_util(::streamfx::gfx::util::get()) { auto gctx = streamfx::obs::gs::context(); { @@ -64,6 +64,11 @@ streamfx::gfx::blur::dual_filtering_data::~dual_filtering_data() _effect.reset(); } +std::shared_ptr streamfx::gfx::blur::dual_filtering_data::get_gfx_util() +{ + return _gfx_util; +} + streamfx::obs::gs::effect streamfx::gfx::blur::dual_filtering_data::get_effect() { return _effect; @@ -281,7 +286,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::dual_filterin auto op = _rts[n]->render(owidth, oheight); gs_ortho(0., 1., 0., 1., 0., 1.); while (gs_effect_loop(effect.get_object(), "Down")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } @@ -311,7 +316,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::dual_filterin auto op = _rts[n - 1]->render(owidth, oheight); gs_ortho(0., 1., 0., 1., 0., 1.); while (gs_effect_loop(effect.get_object(), "Up")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } } diff --git a/source/gfx/blur/gfx-blur-dual-filtering.hpp b/source/gfx/blur/gfx-blur-dual-filtering.hpp index 2afb8942c5..fa262698de 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.hpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.hpp @@ -18,6 +18,7 @@ #pragma once #include "common.hpp" #include "gfx-blur-base.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -30,12 +31,15 @@ namespace streamfx::gfx { namespace blur { class dual_filtering_data { - streamfx::obs::gs::effect _effect; + streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; public: dual_filtering_data(); virtual ~dual_filtering_data(); + std::shared_ptr get_gfx_util(); + streamfx::obs::gs::effect get_effect(); }; diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.cpp b/source/gfx/blur/gfx-blur-gaussian-linear.cpp index d9a11312bd..dadaddbcb9 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.cpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.cpp @@ -34,7 +34,7 @@ #define ST_SEARCH_EXTENSION 1 #define ST_SEARCH_RANGE ST_MAX_KERNEL_SIZE * 2 -streamfx::gfx::blur::gaussian_linear_data::gaussian_linear_data() +streamfx::gfx::blur::gaussian_linear_data::gaussian_linear_data() : _gfx_util(::streamfx::gfx::util::get()) { { auto gctx = streamfx::obs::gs::context(); @@ -101,6 +101,11 @@ std::vector const& streamfx::gfx::blur::gaussian_linear_data::get_kerne return _kernels[width]; } +std::shared_ptr streamfx::gfx::blur::gaussian_linear_data::get_gfx_util() +{ + return _gfx_util; +} + streamfx::gfx::blur::gaussian_linear_factory::gaussian_linear_factory() {} streamfx::gfx::blur::gaussian_linear_factory::~gaussian_linear_factory() {} @@ -337,7 +342,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian_line auto op = _rendertarget2->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -357,7 +362,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian_line auto op = _rendertarget2->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -438,7 +443,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian_line auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.hpp b/source/gfx/blur/gfx-blur-gaussian-linear.hpp index e3f356d0dc..b849c443b2 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.hpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.hpp @@ -18,6 +18,7 @@ #pragma once #include "common.hpp" #include "gfx-blur-base.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -30,13 +31,16 @@ namespace streamfx::gfx { namespace blur { class gaussian_linear_data { - streamfx::obs::gs::effect _effect; - std::vector> _kernels; + streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; + std::vector> _kernels; public: gaussian_linear_data(); virtual ~gaussian_linear_data(); + std::shared_ptr get_gfx_util(); + streamfx::obs::gs::effect get_effect(); std::vector const& get_kernel(std::size_t width); diff --git a/source/gfx/blur/gfx-blur-gaussian.cpp b/source/gfx/blur/gfx-blur-gaussian.cpp index 6cc447a667..e18bdf5337 100644 --- a/source/gfx/blur/gfx-blur-gaussian.cpp +++ b/source/gfx/blur/gfx-blur-gaussian.cpp @@ -17,6 +17,7 @@ #include "gfx-blur-gaussian.hpp" #include "common.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-helper.hpp" #include "plugin.hpp" @@ -31,7 +32,7 @@ #define ST_OVERSAMPLE_MULTIPLIER 2 #define ST_MAX_BLUR_SIZE ST_KERNEL_SIZE / ST_OVERSAMPLE_MULTIPLIER -streamfx::gfx::blur::gaussian_data::gaussian_data() +streamfx::gfx::blur::gaussian_data::gaussian_data() : _gfx_util(::streamfx::gfx::util::get()) { using namespace streamfx::util; @@ -114,6 +115,11 @@ streamfx::obs::gs::effect streamfx::gfx::blur::gaussian_data::get_effect() return _effect; } +std::shared_ptr streamfx::gfx::blur::gaussian_data::get_gfx_util() +{ + return _gfx_util; +} + std::vector const& streamfx::gfx::blur::gaussian_data::get_kernel(std::size_t width) { width = std::clamp(width, 1, ST_MAX_BLUR_SIZE); @@ -364,7 +370,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian::ren auto op = _rendertarget2->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -384,7 +390,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian::ren auto op = _rendertarget2->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -464,7 +470,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian_dire auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -524,7 +530,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian_rota auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Rotate")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } @@ -604,7 +610,7 @@ std::shared_ptr<::streamfx::obs::gs::texture> streamfx::gfx::blur::gaussian_zoom auto op = _rendertarget->render(uint32_t(width), uint32_t(height)); gs_ortho(0, 1., 0, 1., 0, 1.); while (gs_effect_loop(effect.get_object(), "Zoom")) { - streamfx::gs_draw_fullscreen_tri(); + _data->get_gfx_util()->draw_fullscreen_triangle(); } } diff --git a/source/gfx/blur/gfx-blur-gaussian.hpp b/source/gfx/blur/gfx-blur-gaussian.hpp index 07ae847778..baea366f0a 100644 --- a/source/gfx/blur/gfx-blur-gaussian.hpp +++ b/source/gfx/blur/gfx-blur-gaussian.hpp @@ -18,6 +18,7 @@ #pragma once #include "common.hpp" #include "gfx-blur-base.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" @@ -31,6 +32,7 @@ namespace streamfx::gfx { namespace blur { class gaussian_data { streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; std::map> _kernels; public: @@ -39,6 +41,8 @@ namespace streamfx::gfx { streamfx::obs::gs::effect get_effect(); + std::shared_ptr get_gfx_util(); + std::vector const& get_kernel(std::size_t width); }; diff --git a/source/gfx/gfx-util.cpp b/source/gfx/gfx-util.cpp index 6e66b0c173..b5d44c9724 100644 --- a/source/gfx/gfx-util.cpp +++ b/source/gfx/gfx-util.cpp @@ -267,3 +267,31 @@ void streamfx::gfx::util::draw_rectangle(float x, float y, float w, float h, boo gs_load_vertexbuffer(nullptr); } } + +void streamfx::gfx::util::draw_fullscreen_triangle() +{ + if (!_fstri_vb) { + _fstri_vb = std::make_shared(uint32_t(3), uint8_t(1)); + { + auto vtx = _fstri_vb->at(0); + vec3_set(vtx.position, 0, 0, 0); + vec4_set(vtx.uv[0], 0, 0, 0, 0); + } + { + auto vtx = _fstri_vb->at(1); + vec3_set(vtx.position, 2, 0, 0); + vec4_set(vtx.uv[0], 2, 0, 0, 0); + } + { + auto vtx = _fstri_vb->at(2); + vec3_set(vtx.position, 0, 2, 0); + vec4_set(vtx.uv[0], 0, 2, 0, 0); + } + _fstri_vb->update(); + } + + gs_load_indexbuffer(nullptr); + gs_load_vertexbuffer(_fstri_vb->update(false)); + gs_draw(GS_TRIS, 0, 3); //_gs_fstri_vb->size()); + gs_load_vertexbuffer(nullptr); +} diff --git a/source/gfx/gfx-util.hpp b/source/gfx/gfx-util.hpp index 5291099c03..16da66eb0d 100644 --- a/source/gfx/gfx-util.hpp +++ b/source/gfx/gfx-util.hpp @@ -18,6 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +#pragma once #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-vertexbuffer.hpp" @@ -32,6 +33,7 @@ namespace streamfx::gfx { std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _line_vb; std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _arrow_vb; std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _quad_vb; + std::shared_ptr<::streamfx::obs::gs::vertex_buffer> _fstri_vb; public /* Singleton */: static std::shared_ptr get(); @@ -49,5 +51,7 @@ namespace streamfx::gfx { void draw_arrow(float x, float y, float x2, float y2, float w = 0., uint32_t color = 0xFFFFFFFF); void draw_rectangle(float x, float y, float w, float h, bool frame, uint32_t color = 0xFFFFFFFF); + + void draw_fullscreen_triangle(); }; } // namespace streamfx::gfx diff --git a/source/gfx/lut/gfx-lut-producer.cpp b/source/gfx/lut/gfx-lut-producer.cpp index 60f2057475..3a06517628 100644 --- a/source/gfx/lut/gfx-lut-producer.cpp +++ b/source/gfx/lut/gfx-lut-producer.cpp @@ -41,7 +41,7 @@ gs_color_format format_from_depth(streamfx::gfx::lut::color_depth depth) } } -streamfx::gfx::lut::producer::producer() +streamfx::gfx::lut::producer::producer() : _gfx_util(::streamfx::gfx::util::get()) { _data = streamfx::gfx::lut::data::instance(); if (!_data->producer_effect()) @@ -80,7 +80,7 @@ std::shared_ptr streamfx::gfx::lut::producer::produc } while (gs_effect_loop(effect->get_object(), "Draw")) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } gs_enable_color(true, true, true, true); diff --git a/source/gfx/lut/gfx-lut-producer.hpp b/source/gfx/lut/gfx-lut-producer.hpp index 50b6444698..69e0637100 100644 --- a/source/gfx/lut/gfx-lut-producer.hpp +++ b/source/gfx/lut/gfx-lut-producer.hpp @@ -22,6 +22,7 @@ #include "warning-disable.hpp" #include #include "gfx-lut.hpp" +#include "gfx/gfx-util.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "warning-enable.hpp" @@ -30,6 +31,7 @@ namespace streamfx::gfx::lut { class producer { std::shared_ptr _data; std::shared_ptr _rt; + std::shared_ptr _gfx_util; public: producer(); diff --git a/source/gfx/shader/gfx-shader.cpp b/source/gfx/shader/gfx-shader.cpp index a40d57194b..d9b973cd94 100644 --- a/source/gfx/shader/gfx-shader.cpp +++ b/source/gfx/shader/gfx-shader.cpp @@ -47,7 +47,7 @@ #define ST_KEY_PARAMETERS "Shader.Parameters" streamfx::gfx::shader::shader::shader(obs_source_t* self, shader_mode mode) - : _self(self), _mode(mode), _base_width(1), _base_height(1), _active(true), + : _self(self), _gfx_util(::streamfx::gfx::util::get()), _mode(mode), _base_width(1), _base_height(1), _active(true), _shader(), _shader_file(), _shader_tech("Draw"), _shader_file_mt(), _shader_file_sz(), _shader_file_tick(0), @@ -534,7 +534,7 @@ void streamfx::gfx::shader::shader::render(gs_effect* effect) gs_enable_framebuffer_srgb(false); while (gs_effect_loop(_shader.get_object(), _shader_tech.c_str())) { - streamfx::gs_draw_fullscreen_tri(); + _gfx_util->draw_fullscreen_triangle(); } // Restore sRGB Status diff --git a/source/gfx/shader/gfx-shader.hpp b/source/gfx/shader/gfx-shader.hpp index 06a2c33c5e..b3d26c7414 100644 --- a/source/gfx/shader/gfx-shader.hpp +++ b/source/gfx/shader/gfx-shader.hpp @@ -17,6 +17,7 @@ #pragma once #include "common.hpp" +#include "gfx/gfx-util.hpp" #include "gfx/shader/gfx-shader-param.hpp" #include "obs/gs/gs-effect.hpp" #include "obs/gs/gs-rendertarget.hpp" @@ -46,6 +47,8 @@ namespace streamfx::gfx { class shader { obs_source_t* _self; + std::shared_ptr _gfx_util; + // Inputs shader_mode _mode; uint32_t _base_width; diff --git a/source/obs/gs/gs-mipmapper.cpp b/source/obs/gs/gs-mipmapper.cpp index fd4df3cbf2..7911d56803 100644 --- a/source/obs/gs/gs-mipmapper.cpp +++ b/source/obs/gs/gs-mipmapper.cpp @@ -191,7 +191,7 @@ streamfx::obs::gs::mipmapper::~mipmapper() _effect.reset(); } -streamfx::obs::gs::mipmapper::mipmapper() +streamfx::obs::gs::mipmapper::mipmapper() : _gfx_util(::streamfx::gfx::util::get()) { auto gctx = streamfx::obs::gs::context(); @@ -315,7 +315,7 @@ void streamfx::obs::gs::mipmapper::rebuild(std::shared_ptrdraw_fullscreen_triangle(); } } catch (...) { } diff --git a/source/obs/gs/gs-mipmapper.hpp b/source/obs/gs/gs-mipmapper.hpp index 8f7354f6d5..f4f17b4d80 100644 --- a/source/obs/gs/gs-mipmapper.hpp +++ b/source/obs/gs/gs-mipmapper.hpp @@ -19,6 +19,7 @@ #pragma once #include "common.hpp" +#include "gfx/gfx-util.hpp" #include "gs-effect.hpp" #include "gs-rendertarget.hpp" #include "gs-texture.hpp" @@ -40,6 +41,7 @@ namespace streamfx::obs::gs { class mipmapper { std::unique_ptr _rt; streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; public: ~mipmapper(); diff --git a/source/plugin.cpp b/source/plugin.cpp index 2eab5d0c34..0b062ee513 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -95,7 +95,6 @@ #include "warning-enable.hpp" static std::shared_ptr _threadpool; -static std::shared_ptr _gs_fstri_vb; static std::shared_ptr _streamfx_gfx_opengl; static std::shared_ptr _source_tracker; @@ -131,27 +130,6 @@ MODULE_EXPORT bool obs_module_load(void) } #endif - // GS Stuff - { - _gs_fstri_vb = std::make_shared(uint32_t(3), uint8_t(1)); - { - auto vtx = _gs_fstri_vb->at(0); - vec3_set(vtx.position, 0, 0, 0); - vec4_set(vtx.uv[0], 0, 0, 0, 0); - } - { - auto vtx = _gs_fstri_vb->at(1); - vec3_set(vtx.position, 2, 0, 0); - vec4_set(vtx.uv[0], 2, 0, 0, 0); - } - { - auto vtx = _gs_fstri_vb->at(2); - vec3_set(vtx.position, 0, 2, 0); - vec4_set(vtx.uv[0], 0, 2, 0, 0); - } - _gs_fstri_vb->update(); - } - // Encoders { #ifdef ENABLE_ENCODER_AOM_AV1 @@ -307,11 +285,6 @@ MODULE_EXPORT void obs_module_unload(void) #endif } - // GS Stuff - { - _gs_fstri_vb.reset(); - } - // Finalize GLAD (OpenGL) { streamfx::obs::gs::context gctx{}; @@ -345,12 +318,6 @@ std::shared_ptr streamfx::threadpool() return _threadpool; } -void streamfx::gs_draw_fullscreen_tri() -{ - gs_load_vertexbuffer(_gs_fstri_vb->update(false)); - gs_draw(GS_TRIS, 0, 3); //_gs_fstri_vb->size()); -} - std::filesystem::path streamfx::data_file_path(std::string_view file) { const char* root_path = obs_get_module_data_path(obs_current_module()); diff --git a/source/plugin.hpp b/source/plugin.hpp index c2f8a7a627..01c1a5fac6 100644 --- a/source/plugin.hpp +++ b/source/plugin.hpp @@ -24,8 +24,6 @@ namespace streamfx { // Threadpool std::shared_ptr threadpool(); - void gs_draw_fullscreen_tri(); - std::filesystem::path data_file_path(std::string_view file); std::filesystem::path config_file_path(std::string_view file); From 52afca38aab1411cc0973565fda026e74c64d1af Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 03:59:25 +0100 Subject: [PATCH 156/164] gfx/mipmapper: Move gs-mipmapper into proper directory This is not an obs feature, so it shouldn't be in the obs directory. --- CMakeLists.txt | 4 +- source/filters/filter-color-grade.hpp | 2 +- source/filters/filter-transform.hpp | 4 +- source/gfx/gfx-mipmapper.cpp | 351 ++++++++++++++++++++++++++ source/gfx/gfx-mipmapper.hpp | 55 ++++ 5 files changed, 411 insertions(+), 5 deletions(-) create mode 100644 source/gfx/gfx-mipmapper.cpp create mode 100644 source/gfx/gfx-mipmapper.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 2db60dd421..609b1d0127 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1048,6 +1048,8 @@ list(APPEND PROJECT_PRIVATE_SOURCE "source/util/util-threadpool.hpp" "source/gfx/gfx-util.hpp" "source/gfx/gfx-util.cpp" + "source/gfx/gfx-mipmapper.hpp" + "source/gfx/gfx-mipmapper.cpp" "source/gfx/gfx-opengl.hpp" "source/gfx/gfx-opengl.cpp" "source/gfx/gfx-source-texture.hpp" @@ -1065,8 +1067,6 @@ list(APPEND PROJECT_PRIVATE_SOURCE "source/obs/gs/gs-indexbuffer.hpp" "source/obs/gs/gs-indexbuffer.cpp" "source/obs/gs/gs-limits.hpp" - "source/obs/gs/gs-mipmapper.hpp" - "source/obs/gs/gs-mipmapper.cpp" "source/obs/gs/gs-rendertarget.hpp" "source/obs/gs/gs-rendertarget.cpp" "source/obs/gs/gs-sampler.hpp" diff --git a/source/filters/filter-color-grade.hpp b/source/filters/filter-color-grade.hpp index 8a6f401173..7c6e2a0ad1 100644 --- a/source/filters/filter-color-grade.hpp +++ b/source/filters/filter-color-grade.hpp @@ -18,10 +18,10 @@ */ #pragma once +#include "gfx/gfx-mipmapper.hpp" #include "gfx/lut/gfx-lut-consumer.hpp" #include "gfx/lut/gfx-lut-producer.hpp" #include "gfx/lut/gfx-lut.hpp" -#include "obs/gs/gs-mipmapper.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" #include "obs/gs/gs-vertexbuffer.hpp" diff --git a/source/filters/filter-transform.hpp b/source/filters/filter-transform.hpp index ccac8d5a11..080e9ff7de 100644 --- a/source/filters/filter-transform.hpp +++ b/source/filters/filter-transform.hpp @@ -19,8 +19,8 @@ #pragma once #include "common.hpp" +#include "gfx/gfx-mipmapper.hpp" #include "gfx/gfx-util.hpp" -#include "obs/gs/gs-mipmapper.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" #include "obs/gs/gs-vertexbuffer.hpp" @@ -70,7 +70,7 @@ namespace streamfx::filter::transform { // Mip-mapping bool _mipmap_enabled; bool _mipmap_rendered; - streamfx::obs::gs::mipmapper _mipmapper; + streamfx::gfx::mipmapper _mipmapper; std::shared_ptr _mipmap_texture; // Input diff --git a/source/gfx/gfx-mipmapper.cpp b/source/gfx/gfx-mipmapper.cpp new file mode 100644 index 0000000000..75bfcd61ea --- /dev/null +++ b/source/gfx/gfx-mipmapper.cpp @@ -0,0 +1,351 @@ +/* + * Modern effects for a modern Streamer + * Copyright (C) 2017 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "gfx-mipmapper.hpp" +#include "obs/gs/gs-helper.hpp" +#include "plugin.hpp" + +#include "warning-disable.hpp" +#include +#include +// Direct3D 11 +#ifdef _WIN32 +#include +#include +#include +#include +#endif +// OpenGL +#include "glad/gl.h" +#include "warning-enable.hpp" + +#ifdef _WIN32 +struct d3d_info { + ID3D11Device* device = nullptr; + ID3D11DeviceContext* context = nullptr; + ID3D11Resource* target = nullptr; +}; + +void d3d_initialize(d3d_info& info, std::shared_ptr source, + std::shared_ptr target) +{ + info.target = reinterpret_cast(gs_texture_get_obj(target->get_object())); + info.device = reinterpret_cast(gs_get_device_obj()); + info.device->GetImmediateContext(&info.context); +} + +void d3d_copy_subregion(d3d_info& info, std::shared_ptr source, uint32_t mip_level, + uint32_t width, uint32_t height) +{ + D3D11_BOX box = {0, 0, 0, width, height, 1}; + auto source_ref = reinterpret_cast(gs_texture_get_obj(source->get_object())); + info.context->CopySubresourceRegion(info.target, mip_level, 0, 0, 0, source_ref, 0, &box); +} + +#endif + +struct opengl_info { + GLuint target = 0; + GLuint fbo = 0; +}; + +std::string opengl_translate_error(GLenum error) +{ +#define TRANSLATE_CASE(X) \ + case X: \ + return #X; + + switch (error) { + TRANSLATE_CASE(GL_NO_ERROR); + TRANSLATE_CASE(GL_INVALID_ENUM); + TRANSLATE_CASE(GL_INVALID_VALUE); + TRANSLATE_CASE(GL_INVALID_OPERATION); + TRANSLATE_CASE(GL_STACK_OVERFLOW); + TRANSLATE_CASE(GL_STACK_UNDERFLOW); + TRANSLATE_CASE(GL_OUT_OF_MEMORY); + TRANSLATE_CASE(GL_INVALID_FRAMEBUFFER_OPERATION); + } + + return std::to_string(error); +#undef TRANSLATE_CASE +} + +std::string opengl_translate_framebuffer_status(GLenum error) +{ +#define TRANSLATE_CASE(X) \ + case X: \ + return #X; + + switch (error) { + TRANSLATE_CASE(GL_FRAMEBUFFER_COMPLETE); + TRANSLATE_CASE(GL_FRAMEBUFFER_UNDEFINED); + TRANSLATE_CASE(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT); + TRANSLATE_CASE(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT); + TRANSLATE_CASE(GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER); + TRANSLATE_CASE(GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER); + TRANSLATE_CASE(GL_FRAMEBUFFER_UNSUPPORTED); + TRANSLATE_CASE(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE); + TRANSLATE_CASE(GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS); + } + + return std::to_string(error); +#undef TRANSLATE_CASE +} + +#define D_OPENGL_CHECK_ERROR(FUNCTION) \ + if (auto err = glGetError(); err != GL_NO_ERROR) { \ + std::stringstream sstr; \ + sstr << opengl_translate_error(err) << " = " << FUNCTION; \ + throw std::runtime_error(sstr.str()); \ + } + +#define D_OPENGL_CHECK_FRAMEBUFFERSTATUS(BUFFER, FUNCTION) \ + if (auto err = glCheckFramebufferStatus(BUFFER); err != GL_FRAMEBUFFER_COMPLETE) { \ + std::stringstream sstr; \ + sstr << opengl_translate_framebuffer_status(err) << " = " << FUNCTION; \ + throw std::runtime_error(sstr.str()); \ + } + +void opengl_initialize(opengl_info& info, std::shared_ptr source, + std::shared_ptr target) +{ + info.target = *reinterpret_cast(gs_texture_get_obj(target->get_object())); + + glGenFramebuffers(1, &info.fbo); +} + +void opengl_finalize(opengl_info& info) +{ + glDeleteFramebuffers(1, &info.fbo); +} + +void opengl_copy_subregion(opengl_info& info, std::shared_ptr source, uint32_t mip_level, + uint32_t width, uint32_t height) +{ + GLuint source_ref = *reinterpret_cast(gs_texture_get_obj(source->get_object())); + + // Source -> Texture Unit 0, Read Color Framebuffer + glActiveTexture(GL_TEXTURE0); + D_OPENGL_CHECK_ERROR("glActiveTexture(GL_TEXTURE0);"); + glBindTexture(GL_TEXTURE_2D, source_ref); + D_OPENGL_CHECK_ERROR("glBindTexture(GL_TEXTURE_2D, origin);"); + glBindFramebuffer(GL_READ_FRAMEBUFFER, info.fbo); + D_OPENGL_CHECK_ERROR("glBindFramebuffer(GL_READ_FRAMEBUFFER, info.fbo);"); + glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, source_ref, + 0); // Origin is a render target, not a texture + D_OPENGL_CHECK_ERROR( + "glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, origin, mip_level);"); + D_OPENGL_CHECK_FRAMEBUFFERSTATUS( + GL_READ_FRAMEBUFFER, + "glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, origin, mip_level);"); + + // Target -> Texture Unit 1 + glActiveTexture(GL_TEXTURE1); + D_OPENGL_CHECK_ERROR("glActiveTexture(GL_TEXTURE1);"); + glBindTexture(GL_TEXTURE_2D, info.target); + D_OPENGL_CHECK_ERROR("glBindTexture(GL_TEXTURE_2D, info.target);"); + + // Copy Data + glCopyTexSubImage2D(GL_TEXTURE_2D, static_cast(mip_level), 0, 0, 0, 0, static_cast(width), + static_cast(height)); + D_OPENGL_CHECK_ERROR("glCopyTexSubImage2D(GL_TEXTURE_2D, mip_level, 0, 0, 0, 0, width, height);"); + + // Target -/-> Texture Unit 1 + glActiveTexture(GL_TEXTURE1); + D_OPENGL_CHECK_ERROR("glActiveTexture(GL_TEXTURE1);"); + glBindTexture(GL_TEXTURE_2D, 0); + D_OPENGL_CHECK_ERROR("glBindTexture(GL_TEXTURE_2D, 0);"); + + // Source -/-> Texture Unit 0, Read Color Framebuffer + glActiveTexture(GL_TEXTURE0); + D_OPENGL_CHECK_ERROR("glActiveTexture(GL_TEXTURE0);"); + glBindTexture(GL_TEXTURE_2D, 0); + D_OPENGL_CHECK_ERROR("glBindTexture(GL_TEXTURE_2D, 0);"); + glBindFramebuffer(GL_READ_FRAMEBUFFER, info.fbo); + D_OPENGL_CHECK_ERROR("glBindFramebuffer(GL_READ_FRAMEBUFFER, info.fbo);"); + glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0); + D_OPENGL_CHECK_ERROR("glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);"); + glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); + D_OPENGL_CHECK_ERROR("glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);"); +} + +streamfx::gfx::mipmapper::~mipmapper() +{ + _rt.reset(); + _effect.reset(); +} + +streamfx::gfx::mipmapper::mipmapper() : _gfx_util(::streamfx::gfx::util::get()) +{ + auto gctx = streamfx::obs::gs::context(); + + { + auto file = streamfx::data_file_path("effects/mipgen.effect"); + try { + _effect = streamfx::obs::gs::effect::create(file); + } catch (const std::exception& ex) { + DLOG_ERROR("Error loading '%s': %s", file.generic_u8string().c_str(), ex.what()); + } + } +} + +uint32_t streamfx::gfx::mipmapper::calculate_max_mip_level(uint32_t width, uint32_t height) +{ + return static_cast( + 1 + std::lroundl(floor(log2(std::max(static_cast(width), static_cast(height)))))); +} + +void streamfx::gfx::mipmapper::rebuild(std::shared_ptr source, + std::shared_ptr target) +{ + { // Validate arguments and structure. + if (!source || !target) + return; // Do nothing if source or target are missing. + + if (!_effect) + return; // Do nothing if the necessary data failed to load. + + // Ensure texture sizes match + if ((source->get_width() != target->get_width()) || (source->get_height() != target->get_height())) { + throw std::invalid_argument("source and target must have same size"); + } + + // Ensure texture types match + if ((source->get_type() != target->get_type())) { + throw std::invalid_argument("source and target must have same type"); + } + + // Ensure texture formats match + if ((source->get_color_format() != target->get_color_format())) { + throw std::invalid_argument("source and target must have same format"); + } + } + + // Get a unique lock on the graphics context. + auto gctx = streamfx::obs::gs::context(); + + // Do we need to recreate the render target for a different format? + if ((!_rt) || (source->get_color_format() != _rt->get_color_format())) { + _rt = std::make_unique(source->get_color_format(), GS_ZS_NONE); + } + + // Initialize API Handlers. + opengl_info oglinfo; + if (gs_get_device_type() == GS_DEVICE_OPENGL) { + opengl_initialize(oglinfo, source, target); + } +#ifdef _WIN32 + d3d_info d3dinfo; + if (gs_get_device_type() == GS_DEVICE_DIRECT3D_11) { + d3d_initialize(d3dinfo, source, target); + } +#endif + + // Use different methods for different types of textures. + if (source->get_type() == streamfx::obs::gs::texture::type::Normal) { + uint32_t width = source->get_width(); + uint32_t height = source->get_height(); + size_t max_mip_level = calculate_max_mip_level(width, height); + + { +#ifdef ENABLE_PROFILING + auto cctr = streamfx::obs::gs::debug_marker(streamfx::obs::gs::debug_color_azure_radiance, + "Mip Level %" PRId64 "", 0); +#endif + + // Retrieve maximum mip map level. +#ifdef _WIN32 + if (gs_get_device_type() == GS_DEVICE_DIRECT3D_11) { + d3d_copy_subregion(d3dinfo, source, 0, width, height); + } +#endif + if (gs_get_device_type() == GS_DEVICE_OPENGL) { + opengl_copy_subregion(oglinfo, source, 0, width, height); + } + } + + // Set up rendering state. + gs_blend_state_push(); + gs_reset_blend_state(); + gs_enable_blending(false); + gs_blend_function(GS_BLEND_ONE, GS_BLEND_ZERO); + gs_enable_color(true, true, true, true); + gs_enable_depth_test(false); + gs_enable_stencil_test(false); + gs_enable_stencil_write(false); + gs_set_cull_mode(GS_NEITHER); + + // sRGB support. + bool old_srgb = gs_framebuffer_srgb_enabled(); + gs_enable_framebuffer_srgb(gs_get_linear_srgb()); + + // Render each mip map level. + for (size_t mip = 1; mip < max_mip_level; mip++) { +#ifdef ENABLE_PROFILING + auto cctr = streamfx::obs::gs::debug_marker(streamfx::obs::gs::debug_color_azure_radiance, + "Mip Level %" PRIuMAX, mip); +#endif + + uint32_t cwidth = std::max(width >> mip, 1); + uint32_t cheight = std::max(height >> mip, 1); + float_t iwidth = 1.f / static_cast(cwidth); + float_t iheight = 1.f / static_cast(cheight); + + try { + auto op = _rt->render(cwidth, cheight); + gs_ortho(0, 1, 0, 1, 0, 1); + + _effect.get_parameter("image").set_texture(target, gs_get_linear_srgb()); + _effect.get_parameter("imageTexel").set_float2(iwidth, iheight); + _effect.get_parameter("level").set_int(int32_t(mip - 1)); + while (gs_effect_loop(_effect.get_object(), "Draw")) { + _gfx_util->draw_fullscreen_triangle(); + } + } catch (...) { + } + + // Copy from the render target to the target mip level. +#ifdef _WIN32 + if (gs_get_device_type() == GS_DEVICE_DIRECT3D_11) { + d3d_copy_subregion(d3dinfo, _rt->get_texture(), static_cast(mip), cwidth, cheight); + } +#endif + if (gs_get_device_type() == GS_DEVICE_OPENGL) { + opengl_copy_subregion(oglinfo, _rt->get_texture(), static_cast(mip), cwidth, cheight); + } + } + + // Clean up rendering state. + gs_enable_framebuffer_srgb(old_srgb); + gs_blend_state_pop(); + + } else { + throw std::runtime_error("Only 2D Textures support Mip-mapping."); + } + + // Finalize API handlers. + if (gs_get_device_type() == GS_DEVICE_OPENGL) { + opengl_finalize(oglinfo); + } +#ifdef _WIN32 + if (gs_get_device_type() == GS_DEVICE_DIRECT3D_11) { + //d3d_finalize(d3dinfo); + } +#endif +} diff --git a/source/gfx/gfx-mipmapper.hpp b/source/gfx/gfx-mipmapper.hpp new file mode 100644 index 0000000000..4f13745c3c --- /dev/null +++ b/source/gfx/gfx-mipmapper.hpp @@ -0,0 +1,55 @@ +/* + * Modern effects for a modern Streamer + * Copyright (C) 2017 Michael Fabian Dirks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma once +#include "common.hpp" +#include "gfx/gfx-util.hpp" +#include "obs/gs/gs-effect.hpp" +#include "obs/gs/gs-rendertarget.hpp" +#include "obs/gs/gs-texture.hpp" +#include "obs/gs/gs-vertexbuffer.hpp" + +/* gs::mipmapper is an attempt at adding dynamic mip-map generation to a software + * which only supports static mip-maps. It is effectively an incredibly bad hack + * instead of a proper solution - can break any time and likely already has. + * + * Needless to say, dynamic mip-map generation costs a lot of GPU time, especially + * when things need to be synchronized. In the ideal case we would just render + * straight to the mip level, but this is not possible in DirectX 11 and OpenGL. + * + * So instead we render to a render target and copy from there to the actual + * resource. Super wasteful, but what else can we actually do? + */ + +namespace streamfx::gfx { + class mipmapper { + std::unique_ptr _rt; + streamfx::obs::gs::effect _effect; + std::shared_ptr _gfx_util; + + public: + ~mipmapper(); + mipmapper(); + + uint32_t calculate_max_mip_level(uint32_t width, uint32_t height); + + void rebuild(std::shared_ptr source, + std::shared_ptr target); + }; +} // namespace streamfx::gfx From 7226fe7046d2add07f4e318a56336574056814ad Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 04:27:06 +0100 Subject: [PATCH 157/164] gfx/blur/box: Initialize streamfx::gfx::util --- source/gfx/blur/gfx-blur-box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 415e9e4c8d..663162d09a 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -28,7 +28,7 @@ #define ST_MAX_BLUR_SIZE 128 // Also change this in box.effect if modified. -streamfx::gfx::blur::box_data::box_data() +streamfx::gfx::blur::box_data::box_data() : _gfx_util(::streamfx::gfx::util::get()) { auto gctx = streamfx::obs::gs::context(); { From 0f4f6d04858ef2d5ce6e8a3c48282219ef92267a Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 04:39:06 +0100 Subject: [PATCH 158/164] gfx/source-texture: Don't use weak_source for strong references --- source/gfx/gfx-source-texture.cpp | 8 ++++---- source/gfx/gfx-source-texture.hpp | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/gfx/gfx-source-texture.cpp b/source/gfx/gfx-source-texture.cpp index 1066f11752..56b63e2562 100644 --- a/source/gfx/gfx-source-texture.cpp +++ b/source/gfx/gfx-source-texture.cpp @@ -30,8 +30,8 @@ streamfx::gfx::source_texture::~source_texture() } } -streamfx::gfx::source_texture::source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent) - : _parent(parent.lock()), _child(child.lock()) +streamfx::gfx::source_texture::source_texture(streamfx::obs::source child, streamfx::obs::source parent) + : _parent(parent), _child(child) { // Verify that 'child' and 'parent' exist. if (!_child || !_parent) { @@ -39,9 +39,9 @@ streamfx::gfx::source_texture::source_texture(streamfx::obs::weak_source child, } // Verify that 'child' does not contain 'parent'. - if (::streamfx::obs::tools::source_find_source(_child, _parent)) { + if (::streamfx::obs::tools::source_find_source(child, parent)) { throw std::runtime_error("Child contains Parent"); - } else if (!obs_source_add_active_child(_parent.get(), _child.get())) { + } else if (!obs_source_add_active_child(parent, child)) { throw std::runtime_error("Child contains Parent"); } diff --git a/source/gfx/gfx-source-texture.hpp b/source/gfx/gfx-source-texture.hpp index 5eae0fc28a..dd09f623aa 100644 --- a/source/gfx/gfx-source-texture.hpp +++ b/source/gfx/gfx-source-texture.hpp @@ -19,6 +19,7 @@ #include "common.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" +#include "obs/obs-source.hpp" #include "obs/obs-weak-source.hpp" #include "warning-disable.hpp" @@ -34,7 +35,7 @@ namespace streamfx::gfx { public: ~source_texture(); - source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent); + source_texture(streamfx::obs::source child, streamfx::obs::source parent); public /*copy*/: source_texture(source_texture const& other) = delete; From bc7f949c7b2b9932d718ff605df0d24616aa8e50 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 04:39:29 +0100 Subject: [PATCH 159/164] filter/blur: Don't increment your own reference count Fixes #818 --- source/filters/filter-blur.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index ad3059a47b..50dcb0a129 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -377,7 +377,7 @@ void blur_instance::video_tick(float) if (_mask.source.name_old != _mask.source.name) { try { _mask.source.source_texture = std::make_shared( - ::streamfx::obs::weak_source(_mask.source.name), ::streamfx::obs::weak_source(_self)); + ::streamfx::obs::source{_mask.source.name}, ::streamfx::obs::source{_self, false}); _mask.source.is_scene = (obs_scene_from_source(_mask.source.source_texture->get_object()) != nullptr); _mask.source.name_old = _mask.source.name; } catch (...) { From ec182c2daf58d333b578f45b2007251d2c3a671d Mon Sep 17 00:00:00 2001 From: Xaymar Date: Fri, 2 Dec 2022 05:21:37 +0100 Subject: [PATCH 160/164] locale: New translations en-US.ini (Chinese Simplified) (#959) --- data/locale/zh-CN.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/locale/zh-CN.ini b/data/locale/zh-CN.ini index 80d3c269bf..6df1ab6e6a 100644 --- a/data/locale/zh-CN.ini +++ b/data/locale/zh-CN.ini @@ -4,7 +4,7 @@ Manual.Open="阅读说明" Channel.Red="红色" Channel.Green="绿色" Channel.Blue="蓝色" -Channel.Alpha="透明度" +Channel.Alpha="Alpha 通道" FileType.Image="图像" FileType.Images="图像" @@ -127,6 +127,7 @@ Encoder.FFmpeg.KeyFrames.IntervalType="间隔类型" Encoder.FFmpeg.KeyFrames.IntervalType.Frames="帧" Encoder.FFmpeg.KeyFrames.IntervalType.Seconds="秒" Encoder.FFmpeg.KeyFrames.Interval="间隔" +Encoder.FFmpeg.Framerate="帧率覆盖" Encoder.FFmpeg.AMF.Deprecated="此编码器已弃用并很快将被删除。请尽快迁移到集成的 “AMD HW H.264 (AVC)” 或 “AMD HW H.265 (HEVC)” 编码器。" Encoder.FFmpeg.AMF.Preset="预设" From 77ecfda070f01c588b7d9ebf52d783a2f4c36bbf Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 05:05:12 +0100 Subject: [PATCH 161/164] ci: Run on push to all branches --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fecf4a8d4..d241caafbc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: Build on: push: branches: - - 'master' + - '*' tags: - '*' pull_request: @@ -15,7 +15,7 @@ concurrency: cancel-in-progress: true env: - CACHE_VERSION: "2022-08-19" + CACHE_VERSION: "2022-12-02" jobs: build: From b6d99dc23e50083b0bb2c042d806c04126274b38 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 05:05:42 +0100 Subject: [PATCH 162/164] third-party: Update NVIDIA Maxine Augmented Reality SDK --- third-party/nvidia-maxine-ar-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/nvidia-maxine-ar-sdk b/third-party/nvidia-maxine-ar-sdk index 3bd2be62a4..cf68600c4f 160000 --- a/third-party/nvidia-maxine-ar-sdk +++ b/third-party/nvidia-maxine-ar-sdk @@ -1 +1 @@ -Subproject commit 3bd2be62a4b309d56e270bbf05a622395ce95f04 +Subproject commit cf68600c4f4da81425f8a7e706951fbb681d0e2f From b88598a3138fd0d63254368bd0a462d68d2a8789 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 05:06:16 +0100 Subject: [PATCH 163/164] third-party: Update NVIDIA Maxine Video Effects SDK --- third-party/nvidia-maxine-vfx-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/nvidia-maxine-vfx-sdk b/third-party/nvidia-maxine-vfx-sdk index 7f69da2ee4..3058988f6f 160000 --- a/third-party/nvidia-maxine-vfx-sdk +++ b/third-party/nvidia-maxine-vfx-sdk @@ -1 +1 @@ -Subproject commit 7f69da2ee4dcb02e6b024b3f40c5892de84fcb45 +Subproject commit 3058988f6fec767d935d1632715f705a9c6da108 From 77ffb713bddedb70507824ee5801d1d2088af619 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 2 Dec 2022 05:07:15 +0100 Subject: [PATCH 164/164] third-party: Update OBS Studio to 29.0.0-beta2 --- third-party/obs-studio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/obs-studio b/third-party/obs-studio index 09da3ac439..47f4c18a95 160000 --- a/third-party/obs-studio +++ b/third-party/obs-studio @@ -1 +1 @@ -Subproject commit 09da3ac4397ee9b1431c9c97cd2c71484b240382 +Subproject commit 47f4c18a95c333e60c488cdb2682b5d202f9d2db