{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

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

-- |
-- Module      : Amazonka.MediaConvert.Types.CmafPtsOffsetHandlingForBFrames
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.CmafPtsOffsetHandlingForBFrames
  ( CmafPtsOffsetHandlingForBFrames
      ( ..,
        CmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS,
        CmafPtsOffsetHandlingForBFrames_ZERO_BASED
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Use this setting only when your output video stream has B-frames, which
-- causes the initial presentation time stamp (PTS) to be offset from the
-- initial decode time stamp (DTS). Specify how MediaConvert handles PTS
-- when writing time stamps in output DASH manifests. Choose Match initial
-- PTS (MATCH_INITIAL_PTS) when you want MediaConvert to use the initial
-- PTS as the first time stamp in the manifest. Choose Zero-based
-- (ZERO_BASED) to have MediaConvert ignore the initial PTS in the video
-- stream and instead write the initial time stamp as zero in the manifest.
-- For outputs that don\'t have B-frames, the time stamps in your DASH
-- manifests start at zero regardless of your choice here.
newtype CmafPtsOffsetHandlingForBFrames = CmafPtsOffsetHandlingForBFrames'
  { CmafPtsOffsetHandlingForBFrames -> Text
fromCmafPtsOffsetHandlingForBFrames ::
      Data.Text
  }
  deriving stock
    ( Int -> CmafPtsOffsetHandlingForBFrames -> ShowS
[CmafPtsOffsetHandlingForBFrames] -> ShowS
CmafPtsOffsetHandlingForBFrames -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CmafPtsOffsetHandlingForBFrames] -> ShowS
$cshowList :: [CmafPtsOffsetHandlingForBFrames] -> ShowS
show :: CmafPtsOffsetHandlingForBFrames -> String
$cshow :: CmafPtsOffsetHandlingForBFrames -> String
showsPrec :: Int -> CmafPtsOffsetHandlingForBFrames -> ShowS
$cshowsPrec :: Int -> CmafPtsOffsetHandlingForBFrames -> ShowS
Prelude.Show,
      ReadPrec [CmafPtsOffsetHandlingForBFrames]
ReadPrec CmafPtsOffsetHandlingForBFrames
Int -> ReadS CmafPtsOffsetHandlingForBFrames
ReadS [CmafPtsOffsetHandlingForBFrames]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CmafPtsOffsetHandlingForBFrames]
$creadListPrec :: ReadPrec [CmafPtsOffsetHandlingForBFrames]
readPrec :: ReadPrec CmafPtsOffsetHandlingForBFrames
$creadPrec :: ReadPrec CmafPtsOffsetHandlingForBFrames
readList :: ReadS [CmafPtsOffsetHandlingForBFrames]
$creadList :: ReadS [CmafPtsOffsetHandlingForBFrames]
readsPrec :: Int -> ReadS CmafPtsOffsetHandlingForBFrames
$creadsPrec :: Int -> ReadS CmafPtsOffsetHandlingForBFrames
Prelude.Read,
      CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
$c/= :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
== :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
$c== :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
Prelude.Eq,
      Eq CmafPtsOffsetHandlingForBFrames
CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Ordering
CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
$cmin :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
max :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
$cmax :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames
>= :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
$c>= :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
> :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
$c> :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
<= :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
$c<= :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
< :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
$c< :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Bool
compare :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Ordering
$ccompare :: CmafPtsOffsetHandlingForBFrames
-> CmafPtsOffsetHandlingForBFrames -> Ordering
Prelude.Ord,
      forall x.
Rep CmafPtsOffsetHandlingForBFrames x
-> CmafPtsOffsetHandlingForBFrames
forall x.
CmafPtsOffsetHandlingForBFrames
-> Rep CmafPtsOffsetHandlingForBFrames x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CmafPtsOffsetHandlingForBFrames x
-> CmafPtsOffsetHandlingForBFrames
$cfrom :: forall x.
CmafPtsOffsetHandlingForBFrames
-> Rep CmafPtsOffsetHandlingForBFrames x
Prelude.Generic
    )
  deriving newtype
    ( Eq CmafPtsOffsetHandlingForBFrames
Int -> CmafPtsOffsetHandlingForBFrames -> Int
CmafPtsOffsetHandlingForBFrames -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CmafPtsOffsetHandlingForBFrames -> Int
$chash :: CmafPtsOffsetHandlingForBFrames -> Int
hashWithSalt :: Int -> CmafPtsOffsetHandlingForBFrames -> Int
$chashWithSalt :: Int -> CmafPtsOffsetHandlingForBFrames -> Int
Prelude.Hashable,
      CmafPtsOffsetHandlingForBFrames -> ()
forall a. (a -> ()) -> NFData a
rnf :: CmafPtsOffsetHandlingForBFrames -> ()
$crnf :: CmafPtsOffsetHandlingForBFrames -> ()
Prelude.NFData,
      Text -> Either String CmafPtsOffsetHandlingForBFrames
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CmafPtsOffsetHandlingForBFrames
$cfromText :: Text -> Either String CmafPtsOffsetHandlingForBFrames
Data.FromText,
      CmafPtsOffsetHandlingForBFrames -> Text
forall a. (a -> Text) -> ToText a
toText :: CmafPtsOffsetHandlingForBFrames -> Text
$ctoText :: CmafPtsOffsetHandlingForBFrames -> Text
Data.ToText,
      CmafPtsOffsetHandlingForBFrames -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: CmafPtsOffsetHandlingForBFrames -> ByteString
$ctoBS :: CmafPtsOffsetHandlingForBFrames -> ByteString
Data.ToByteString,
      CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder
$cbuild :: CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder
Data.ToLog,
      HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header]
$ctoHeader :: HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header]
Data.ToHeader,
      CmafPtsOffsetHandlingForBFrames -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CmafPtsOffsetHandlingForBFrames -> QueryString
$ctoQuery :: CmafPtsOffsetHandlingForBFrames -> QueryString
Data.ToQuery,
      Value -> Parser [CmafPtsOffsetHandlingForBFrames]
Value -> Parser CmafPtsOffsetHandlingForBFrames
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CmafPtsOffsetHandlingForBFrames]
$cparseJSONList :: Value -> Parser [CmafPtsOffsetHandlingForBFrames]
parseJSON :: Value -> Parser CmafPtsOffsetHandlingForBFrames
$cparseJSON :: Value -> Parser CmafPtsOffsetHandlingForBFrames
Data.FromJSON,
      FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
$cfromJSONKeyList :: FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
fromJSONKey :: FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
$cfromJSONKey :: FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
Data.FromJSONKey,
      [CmafPtsOffsetHandlingForBFrames] -> Encoding
[CmafPtsOffsetHandlingForBFrames] -> Value
CmafPtsOffsetHandlingForBFrames -> Encoding
CmafPtsOffsetHandlingForBFrames -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CmafPtsOffsetHandlingForBFrames] -> Encoding
$ctoEncodingList :: [CmafPtsOffsetHandlingForBFrames] -> Encoding
toJSONList :: [CmafPtsOffsetHandlingForBFrames] -> Value
$ctoJSONList :: [CmafPtsOffsetHandlingForBFrames] -> Value
toEncoding :: CmafPtsOffsetHandlingForBFrames -> Encoding
$ctoEncoding :: CmafPtsOffsetHandlingForBFrames -> Encoding
toJSON :: CmafPtsOffsetHandlingForBFrames -> Value
$ctoJSON :: CmafPtsOffsetHandlingForBFrames -> Value
Data.ToJSON,
      ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
$ctoJSONKeyList :: ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
toJSONKey :: ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
$ctoJSONKey :: ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
Data.ToJSONKey,
      [Node] -> Either String CmafPtsOffsetHandlingForBFrames
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CmafPtsOffsetHandlingForBFrames
$cparseXML :: [Node] -> Either String CmafPtsOffsetHandlingForBFrames
Data.FromXML,
      CmafPtsOffsetHandlingForBFrames -> XML
forall a. (a -> XML) -> ToXML a
toXML :: CmafPtsOffsetHandlingForBFrames -> XML
$ctoXML :: CmafPtsOffsetHandlingForBFrames -> XML
Data.ToXML
    )

pattern CmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS :: CmafPtsOffsetHandlingForBFrames
pattern $bCmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS :: CmafPtsOffsetHandlingForBFrames
$mCmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS :: forall {r}.
CmafPtsOffsetHandlingForBFrames
-> ((# #) -> r) -> ((# #) -> r) -> r
CmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS = CmafPtsOffsetHandlingForBFrames' "MATCH_INITIAL_PTS"

pattern CmafPtsOffsetHandlingForBFrames_ZERO_BASED :: CmafPtsOffsetHandlingForBFrames
pattern $bCmafPtsOffsetHandlingForBFrames_ZERO_BASED :: CmafPtsOffsetHandlingForBFrames
$mCmafPtsOffsetHandlingForBFrames_ZERO_BASED :: forall {r}.
CmafPtsOffsetHandlingForBFrames
-> ((# #) -> r) -> ((# #) -> r) -> r
CmafPtsOffsetHandlingForBFrames_ZERO_BASED = CmafPtsOffsetHandlingForBFrames' "ZERO_BASED"

{-# COMPLETE
  CmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS,
  CmafPtsOffsetHandlingForBFrames_ZERO_BASED,
  CmafPtsOffsetHandlingForBFrames'
  #-}