{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaLive.Types.Ac3Settings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Types.Ac3Settings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.Ac3BitstreamMode
import Amazonka.MediaLive.Types.Ac3CodingMode
import Amazonka.MediaLive.Types.Ac3DrcProfile
import Amazonka.MediaLive.Types.Ac3LfeFilter
import Amazonka.MediaLive.Types.Ac3MetadataControl
import qualified Amazonka.Prelude as Prelude

-- | Ac3 Settings
--
-- /See:/ 'newAc3Settings' smart constructor.
data Ac3Settings = Ac3Settings'
  { -- | When set to enabled, applies a 120Hz lowpass filter to the LFE channel
    -- prior to encoding. Only valid in codingMode32Lfe mode.
    Ac3Settings -> Maybe Ac3LfeFilter
lfeFilter :: Prelude.Maybe Ac3LfeFilter,
    -- | When set to \"followInput\", encoder metadata will be sourced from the
    -- DD, DD+, or DolbyE decoder that supplied this audio data. If audio was
    -- not supplied from one of these streams, then the static metadata
    -- settings will be used.
    Ac3Settings -> Maybe Ac3MetadataControl
metadataControl :: Prelude.Maybe Ac3MetadataControl,
    -- | Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. See
    -- ATSC A\/52-2012 for background on these values.
    Ac3Settings -> Maybe Ac3BitstreamMode
bitstreamMode :: Prelude.Maybe Ac3BitstreamMode,
    -- | Dolby Digital coding mode. Determines number of channels.
    Ac3Settings -> Maybe Ac3CodingMode
codingMode :: Prelude.Maybe Ac3CodingMode,
    -- | Average bitrate in bits\/second. Valid bitrates depend on the coding
    -- mode.
    Ac3Settings -> Maybe Double
bitrate :: Prelude.Maybe Prelude.Double,
    -- | Sets the dialnorm for the output. If excluded and input audio is Dolby
    -- Digital, dialnorm will be passed through.
    Ac3Settings -> Maybe Natural
dialnorm :: Prelude.Maybe Prelude.Natural,
    -- | If set to filmStandard, adds dynamic range compression signaling to the
    -- output bitstream as defined in the Dolby Digital specification.
    Ac3Settings -> Maybe Ac3DrcProfile
drcProfile :: Prelude.Maybe Ac3DrcProfile
  }
  deriving (Ac3Settings -> Ac3Settings -> Bool
(Ac3Settings -> Ac3Settings -> Bool)
-> (Ac3Settings -> Ac3Settings -> Bool) -> Eq Ac3Settings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ac3Settings -> Ac3Settings -> Bool
$c/= :: Ac3Settings -> Ac3Settings -> Bool
== :: Ac3Settings -> Ac3Settings -> Bool
$c== :: Ac3Settings -> Ac3Settings -> Bool
Prelude.Eq, ReadPrec [Ac3Settings]
ReadPrec Ac3Settings
Int -> ReadS Ac3Settings
ReadS [Ac3Settings]
(Int -> ReadS Ac3Settings)
-> ReadS [Ac3Settings]
-> ReadPrec Ac3Settings
-> ReadPrec [Ac3Settings]
-> Read Ac3Settings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ac3Settings]
$creadListPrec :: ReadPrec [Ac3Settings]
readPrec :: ReadPrec Ac3Settings
$creadPrec :: ReadPrec Ac3Settings
readList :: ReadS [Ac3Settings]
$creadList :: ReadS [Ac3Settings]
readsPrec :: Int -> ReadS Ac3Settings
$creadsPrec :: Int -> ReadS Ac3Settings
Prelude.Read, Int -> Ac3Settings -> ShowS
[Ac3Settings] -> ShowS
Ac3Settings -> String
(Int -> Ac3Settings -> ShowS)
-> (Ac3Settings -> String)
-> ([Ac3Settings] -> ShowS)
-> Show Ac3Settings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ac3Settings] -> ShowS
$cshowList :: [Ac3Settings] -> ShowS
show :: Ac3Settings -> String
$cshow :: Ac3Settings -> String
showsPrec :: Int -> Ac3Settings -> ShowS
$cshowsPrec :: Int -> Ac3Settings -> ShowS
Prelude.Show, (forall x. Ac3Settings -> Rep Ac3Settings x)
-> (forall x. Rep Ac3Settings x -> Ac3Settings)
-> Generic Ac3Settings
forall x. Rep Ac3Settings x -> Ac3Settings
forall x. Ac3Settings -> Rep Ac3Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Ac3Settings x -> Ac3Settings
$cfrom :: forall x. Ac3Settings -> Rep Ac3Settings x
Prelude.Generic)

-- |
-- Create a value of 'Ac3Settings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'lfeFilter', 'ac3Settings_lfeFilter' - When set to enabled, applies a 120Hz lowpass filter to the LFE channel
-- prior to encoding. Only valid in codingMode32Lfe mode.
--
-- 'metadataControl', 'ac3Settings_metadataControl' - When set to \"followInput\", encoder metadata will be sourced from the
-- DD, DD+, or DolbyE decoder that supplied this audio data. If audio was
-- not supplied from one of these streams, then the static metadata
-- settings will be used.
--
-- 'bitstreamMode', 'ac3Settings_bitstreamMode' - Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. See
-- ATSC A\/52-2012 for background on these values.
--
-- 'codingMode', 'ac3Settings_codingMode' - Dolby Digital coding mode. Determines number of channels.
--
-- 'bitrate', 'ac3Settings_bitrate' - Average bitrate in bits\/second. Valid bitrates depend on the coding
-- mode.
--
-- 'dialnorm', 'ac3Settings_dialnorm' - Sets the dialnorm for the output. If excluded and input audio is Dolby
-- Digital, dialnorm will be passed through.
--
-- 'drcProfile', 'ac3Settings_drcProfile' - If set to filmStandard, adds dynamic range compression signaling to the
-- output bitstream as defined in the Dolby Digital specification.
newAc3Settings ::
  Ac3Settings
newAc3Settings :: Ac3Settings
newAc3Settings =
  Ac3Settings' :: Maybe Ac3LfeFilter
-> Maybe Ac3MetadataControl
-> Maybe Ac3BitstreamMode
-> Maybe Ac3CodingMode
-> Maybe Double
-> Maybe Natural
-> Maybe Ac3DrcProfile
-> Ac3Settings
Ac3Settings'
    { $sel:lfeFilter:Ac3Settings' :: Maybe Ac3LfeFilter
lfeFilter = Maybe Ac3LfeFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:metadataControl:Ac3Settings' :: Maybe Ac3MetadataControl
metadataControl = Maybe Ac3MetadataControl
forall a. Maybe a
Prelude.Nothing,
      $sel:bitstreamMode:Ac3Settings' :: Maybe Ac3BitstreamMode
bitstreamMode = Maybe Ac3BitstreamMode
forall a. Maybe a
Prelude.Nothing,
      $sel:codingMode:Ac3Settings' :: Maybe Ac3CodingMode
codingMode = Maybe Ac3CodingMode
forall a. Maybe a
Prelude.Nothing,
      $sel:bitrate:Ac3Settings' :: Maybe Double
bitrate = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:dialnorm:Ac3Settings' :: Maybe Natural
dialnorm = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:drcProfile:Ac3Settings' :: Maybe Ac3DrcProfile
drcProfile = Maybe Ac3DrcProfile
forall a. Maybe a
Prelude.Nothing
    }

-- | When set to enabled, applies a 120Hz lowpass filter to the LFE channel
-- prior to encoding. Only valid in codingMode32Lfe mode.
ac3Settings_lfeFilter :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3LfeFilter)
ac3Settings_lfeFilter :: (Maybe Ac3LfeFilter -> f (Maybe Ac3LfeFilter))
-> Ac3Settings -> f Ac3Settings
ac3Settings_lfeFilter = (Ac3Settings -> Maybe Ac3LfeFilter)
-> (Ac3Settings -> Maybe Ac3LfeFilter -> Ac3Settings)
-> Lens
     Ac3Settings Ac3Settings (Maybe Ac3LfeFilter) (Maybe Ac3LfeFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3LfeFilter
lfeFilter :: Maybe Ac3LfeFilter
$sel:lfeFilter:Ac3Settings' :: Ac3Settings -> Maybe Ac3LfeFilter
lfeFilter} -> Maybe Ac3LfeFilter
lfeFilter) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3LfeFilter
a -> Ac3Settings
s {$sel:lfeFilter:Ac3Settings' :: Maybe Ac3LfeFilter
lfeFilter = Maybe Ac3LfeFilter
a} :: Ac3Settings)

-- | When set to \"followInput\", encoder metadata will be sourced from the
-- DD, DD+, or DolbyE decoder that supplied this audio data. If audio was
-- not supplied from one of these streams, then the static metadata
-- settings will be used.
ac3Settings_metadataControl :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3MetadataControl)
ac3Settings_metadataControl :: (Maybe Ac3MetadataControl -> f (Maybe Ac3MetadataControl))
-> Ac3Settings -> f Ac3Settings
ac3Settings_metadataControl = (Ac3Settings -> Maybe Ac3MetadataControl)
-> (Ac3Settings -> Maybe Ac3MetadataControl -> Ac3Settings)
-> Lens
     Ac3Settings
     Ac3Settings
     (Maybe Ac3MetadataControl)
     (Maybe Ac3MetadataControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3MetadataControl
metadataControl :: Maybe Ac3MetadataControl
$sel:metadataControl:Ac3Settings' :: Ac3Settings -> Maybe Ac3MetadataControl
metadataControl} -> Maybe Ac3MetadataControl
metadataControl) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3MetadataControl
a -> Ac3Settings
s {$sel:metadataControl:Ac3Settings' :: Maybe Ac3MetadataControl
metadataControl = Maybe Ac3MetadataControl
a} :: Ac3Settings)

-- | Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. See
-- ATSC A\/52-2012 for background on these values.
ac3Settings_bitstreamMode :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3BitstreamMode)
ac3Settings_bitstreamMode :: (Maybe Ac3BitstreamMode -> f (Maybe Ac3BitstreamMode))
-> Ac3Settings -> f Ac3Settings
ac3Settings_bitstreamMode = (Ac3Settings -> Maybe Ac3BitstreamMode)
-> (Ac3Settings -> Maybe Ac3BitstreamMode -> Ac3Settings)
-> Lens
     Ac3Settings
     Ac3Settings
     (Maybe Ac3BitstreamMode)
     (Maybe Ac3BitstreamMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3BitstreamMode
bitstreamMode :: Maybe Ac3BitstreamMode
$sel:bitstreamMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3BitstreamMode
bitstreamMode} -> Maybe Ac3BitstreamMode
bitstreamMode) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3BitstreamMode
a -> Ac3Settings
s {$sel:bitstreamMode:Ac3Settings' :: Maybe Ac3BitstreamMode
bitstreamMode = Maybe Ac3BitstreamMode
a} :: Ac3Settings)

-- | Dolby Digital coding mode. Determines number of channels.
ac3Settings_codingMode :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3CodingMode)
ac3Settings_codingMode :: (Maybe Ac3CodingMode -> f (Maybe Ac3CodingMode))
-> Ac3Settings -> f Ac3Settings
ac3Settings_codingMode = (Ac3Settings -> Maybe Ac3CodingMode)
-> (Ac3Settings -> Maybe Ac3CodingMode -> Ac3Settings)
-> Lens
     Ac3Settings Ac3Settings (Maybe Ac3CodingMode) (Maybe Ac3CodingMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3CodingMode
codingMode :: Maybe Ac3CodingMode
$sel:codingMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3CodingMode
codingMode} -> Maybe Ac3CodingMode
codingMode) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3CodingMode
a -> Ac3Settings
s {$sel:codingMode:Ac3Settings' :: Maybe Ac3CodingMode
codingMode = Maybe Ac3CodingMode
a} :: Ac3Settings)

-- | Average bitrate in bits\/second. Valid bitrates depend on the coding
-- mode.
ac3Settings_bitrate :: Lens.Lens' Ac3Settings (Prelude.Maybe Prelude.Double)
ac3Settings_bitrate :: (Maybe Double -> f (Maybe Double)) -> Ac3Settings -> f Ac3Settings
ac3Settings_bitrate = (Ac3Settings -> Maybe Double)
-> (Ac3Settings -> Maybe Double -> Ac3Settings)
-> Lens Ac3Settings Ac3Settings (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Double
bitrate :: Maybe Double
$sel:bitrate:Ac3Settings' :: Ac3Settings -> Maybe Double
bitrate} -> Maybe Double
bitrate) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Double
a -> Ac3Settings
s {$sel:bitrate:Ac3Settings' :: Maybe Double
bitrate = Maybe Double
a} :: Ac3Settings)

-- | Sets the dialnorm for the output. If excluded and input audio is Dolby
-- Digital, dialnorm will be passed through.
ac3Settings_dialnorm :: Lens.Lens' Ac3Settings (Prelude.Maybe Prelude.Natural)
ac3Settings_dialnorm :: (Maybe Natural -> f (Maybe Natural))
-> Ac3Settings -> f Ac3Settings
ac3Settings_dialnorm = (Ac3Settings -> Maybe Natural)
-> (Ac3Settings -> Maybe Natural -> Ac3Settings)
-> Lens Ac3Settings Ac3Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Natural
dialnorm :: Maybe Natural
$sel:dialnorm:Ac3Settings' :: Ac3Settings -> Maybe Natural
dialnorm} -> Maybe Natural
dialnorm) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Natural
a -> Ac3Settings
s {$sel:dialnorm:Ac3Settings' :: Maybe Natural
dialnorm = Maybe Natural
a} :: Ac3Settings)

-- | If set to filmStandard, adds dynamic range compression signaling to the
-- output bitstream as defined in the Dolby Digital specification.
ac3Settings_drcProfile :: Lens.Lens' Ac3Settings (Prelude.Maybe Ac3DrcProfile)
ac3Settings_drcProfile :: (Maybe Ac3DrcProfile -> f (Maybe Ac3DrcProfile))
-> Ac3Settings -> f Ac3Settings
ac3Settings_drcProfile = (Ac3Settings -> Maybe Ac3DrcProfile)
-> (Ac3Settings -> Maybe Ac3DrcProfile -> Ac3Settings)
-> Lens
     Ac3Settings Ac3Settings (Maybe Ac3DrcProfile) (Maybe Ac3DrcProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ac3Settings' {Maybe Ac3DrcProfile
drcProfile :: Maybe Ac3DrcProfile
$sel:drcProfile:Ac3Settings' :: Ac3Settings -> Maybe Ac3DrcProfile
drcProfile} -> Maybe Ac3DrcProfile
drcProfile) (\s :: Ac3Settings
s@Ac3Settings' {} Maybe Ac3DrcProfile
a -> Ac3Settings
s {$sel:drcProfile:Ac3Settings' :: Maybe Ac3DrcProfile
drcProfile = Maybe Ac3DrcProfile
a} :: Ac3Settings)

instance Core.FromJSON Ac3Settings where
  parseJSON :: Value -> Parser Ac3Settings
parseJSON =
    String
-> (Object -> Parser Ac3Settings) -> Value -> Parser Ac3Settings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Ac3Settings"
      ( \Object
x ->
          Maybe Ac3LfeFilter
-> Maybe Ac3MetadataControl
-> Maybe Ac3BitstreamMode
-> Maybe Ac3CodingMode
-> Maybe Double
-> Maybe Natural
-> Maybe Ac3DrcProfile
-> Ac3Settings
Ac3Settings'
            (Maybe Ac3LfeFilter
 -> Maybe Ac3MetadataControl
 -> Maybe Ac3BitstreamMode
 -> Maybe Ac3CodingMode
 -> Maybe Double
 -> Maybe Natural
 -> Maybe Ac3DrcProfile
 -> Ac3Settings)
-> Parser (Maybe Ac3LfeFilter)
-> Parser
     (Maybe Ac3MetadataControl
      -> Maybe Ac3BitstreamMode
      -> Maybe Ac3CodingMode
      -> Maybe Double
      -> Maybe Natural
      -> Maybe Ac3DrcProfile
      -> Ac3Settings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Ac3LfeFilter)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lfeFilter")
            Parser
  (Maybe Ac3MetadataControl
   -> Maybe Ac3BitstreamMode
   -> Maybe Ac3CodingMode
   -> Maybe Double
   -> Maybe Natural
   -> Maybe Ac3DrcProfile
   -> Ac3Settings)
-> Parser (Maybe Ac3MetadataControl)
-> Parser
     (Maybe Ac3BitstreamMode
      -> Maybe Ac3CodingMode
      -> Maybe Double
      -> Maybe Natural
      -> Maybe Ac3DrcProfile
      -> Ac3Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Ac3MetadataControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"metadataControl")
            Parser
  (Maybe Ac3BitstreamMode
   -> Maybe Ac3CodingMode
   -> Maybe Double
   -> Maybe Natural
   -> Maybe Ac3DrcProfile
   -> Ac3Settings)
-> Parser (Maybe Ac3BitstreamMode)
-> Parser
     (Maybe Ac3CodingMode
      -> Maybe Double
      -> Maybe Natural
      -> Maybe Ac3DrcProfile
      -> Ac3Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Ac3BitstreamMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bitstreamMode")
            Parser
  (Maybe Ac3CodingMode
   -> Maybe Double
   -> Maybe Natural
   -> Maybe Ac3DrcProfile
   -> Ac3Settings)
-> Parser (Maybe Ac3CodingMode)
-> Parser
     (Maybe Double
      -> Maybe Natural -> Maybe Ac3DrcProfile -> Ac3Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Ac3CodingMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"codingMode")
            Parser
  (Maybe Double
   -> Maybe Natural -> Maybe Ac3DrcProfile -> Ac3Settings)
-> Parser (Maybe Double)
-> Parser (Maybe Natural -> Maybe Ac3DrcProfile -> Ac3Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bitrate")
            Parser (Maybe Natural -> Maybe Ac3DrcProfile -> Ac3Settings)
-> Parser (Maybe Natural)
-> Parser (Maybe Ac3DrcProfile -> Ac3Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dialnorm")
            Parser (Maybe Ac3DrcProfile -> Ac3Settings)
-> Parser (Maybe Ac3DrcProfile) -> Parser Ac3Settings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Ac3DrcProfile)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"drcProfile")
      )

instance Prelude.Hashable Ac3Settings

instance Prelude.NFData Ac3Settings

instance Core.ToJSON Ac3Settings where
  toJSON :: Ac3Settings -> Value
toJSON Ac3Settings' {Maybe Double
Maybe Natural
Maybe Ac3BitstreamMode
Maybe Ac3CodingMode
Maybe Ac3DrcProfile
Maybe Ac3LfeFilter
Maybe Ac3MetadataControl
drcProfile :: Maybe Ac3DrcProfile
dialnorm :: Maybe Natural
bitrate :: Maybe Double
codingMode :: Maybe Ac3CodingMode
bitstreamMode :: Maybe Ac3BitstreamMode
metadataControl :: Maybe Ac3MetadataControl
lfeFilter :: Maybe Ac3LfeFilter
$sel:drcProfile:Ac3Settings' :: Ac3Settings -> Maybe Ac3DrcProfile
$sel:dialnorm:Ac3Settings' :: Ac3Settings -> Maybe Natural
$sel:bitrate:Ac3Settings' :: Ac3Settings -> Maybe Double
$sel:codingMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3CodingMode
$sel:bitstreamMode:Ac3Settings' :: Ac3Settings -> Maybe Ac3BitstreamMode
$sel:metadataControl:Ac3Settings' :: Ac3Settings -> Maybe Ac3MetadataControl
$sel:lfeFilter:Ac3Settings' :: Ac3Settings -> Maybe Ac3LfeFilter
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"lfeFilter" Text -> Ac3LfeFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Ac3LfeFilter -> Pair) -> Maybe Ac3LfeFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ac3LfeFilter
lfeFilter,
            (Text
"metadataControl" Text -> Ac3MetadataControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Ac3MetadataControl -> Pair)
-> Maybe Ac3MetadataControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ac3MetadataControl
metadataControl,
            (Text
"bitstreamMode" Text -> Ac3BitstreamMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Ac3BitstreamMode -> Pair) -> Maybe Ac3BitstreamMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ac3BitstreamMode
bitstreamMode,
            (Text
"codingMode" Text -> Ac3CodingMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Ac3CodingMode -> Pair) -> Maybe Ac3CodingMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ac3CodingMode
codingMode,
            (Text
"bitrate" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
bitrate,
            (Text
"dialnorm" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
dialnorm,
            (Text
"drcProfile" Text -> Ac3DrcProfile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Ac3DrcProfile -> Pair) -> Maybe Ac3DrcProfile -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Ac3DrcProfile
drcProfile
          ]
      )