{-# 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-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.MediaConvert.Types.CmafPtsOffsetHandlingForBFrames
  ( CmafPtsOffsetHandlingForBFrames
      ( ..,
        CmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS,
        CmafPtsOffsetHandlingForBFrames_ZERO_BASED
      ),
  )
where

import qualified Amazonka.Core as Core
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 ::
      Core.Text
  }
  deriving stock
    ( Int -> CmafPtsOffsetHandlingForBFrames -> ShowS
[CmafPtsOffsetHandlingForBFrames] -> ShowS
CmafPtsOffsetHandlingForBFrames -> String
(Int -> CmafPtsOffsetHandlingForBFrames -> ShowS)
-> (CmafPtsOffsetHandlingForBFrames -> String)
-> ([CmafPtsOffsetHandlingForBFrames] -> ShowS)
-> Show CmafPtsOffsetHandlingForBFrames
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]
(Int -> ReadS CmafPtsOffsetHandlingForBFrames)
-> ReadS [CmafPtsOffsetHandlingForBFrames]
-> ReadPrec CmafPtsOffsetHandlingForBFrames
-> ReadPrec [CmafPtsOffsetHandlingForBFrames]
-> Read 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
(CmafPtsOffsetHandlingForBFrames
 -> CmafPtsOffsetHandlingForBFrames -> Bool)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames -> Bool)
-> Eq CmafPtsOffsetHandlingForBFrames
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
Eq CmafPtsOffsetHandlingForBFrames
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames -> Ordering)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames -> Bool)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames -> Bool)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames -> Bool)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames -> Bool)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames)
-> (CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames
    -> CmafPtsOffsetHandlingForBFrames)
-> Ord 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
$cp1Ord :: Eq CmafPtsOffsetHandlingForBFrames
Prelude.Ord,
      (forall x.
 CmafPtsOffsetHandlingForBFrames
 -> Rep CmafPtsOffsetHandlingForBFrames x)
-> (forall x.
    Rep CmafPtsOffsetHandlingForBFrames x
    -> CmafPtsOffsetHandlingForBFrames)
-> Generic CmafPtsOffsetHandlingForBFrames
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
    ( Int -> CmafPtsOffsetHandlingForBFrames -> Int
CmafPtsOffsetHandlingForBFrames -> Int
(Int -> CmafPtsOffsetHandlingForBFrames -> Int)
-> (CmafPtsOffsetHandlingForBFrames -> Int)
-> Hashable CmafPtsOffsetHandlingForBFrames
forall 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 -> ()
(CmafPtsOffsetHandlingForBFrames -> ())
-> NFData CmafPtsOffsetHandlingForBFrames
forall a. (a -> ()) -> NFData a
rnf :: CmafPtsOffsetHandlingForBFrames -> ()
$crnf :: CmafPtsOffsetHandlingForBFrames -> ()
Prelude.NFData,
      Text -> Either String CmafPtsOffsetHandlingForBFrames
(Text -> Either String CmafPtsOffsetHandlingForBFrames)
-> FromText CmafPtsOffsetHandlingForBFrames
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CmafPtsOffsetHandlingForBFrames
$cfromText :: Text -> Either String CmafPtsOffsetHandlingForBFrames
Core.FromText,
      CmafPtsOffsetHandlingForBFrames -> Text
(CmafPtsOffsetHandlingForBFrames -> Text)
-> ToText CmafPtsOffsetHandlingForBFrames
forall a. (a -> Text) -> ToText a
toText :: CmafPtsOffsetHandlingForBFrames -> Text
$ctoText :: CmafPtsOffsetHandlingForBFrames -> Text
Core.ToText,
      CmafPtsOffsetHandlingForBFrames -> ByteString
(CmafPtsOffsetHandlingForBFrames -> ByteString)
-> ToByteString CmafPtsOffsetHandlingForBFrames
forall a. (a -> ByteString) -> ToByteString a
toBS :: CmafPtsOffsetHandlingForBFrames -> ByteString
$ctoBS :: CmafPtsOffsetHandlingForBFrames -> ByteString
Core.ToByteString,
      CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder
(CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder)
-> ToLog CmafPtsOffsetHandlingForBFrames
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder
$cbuild :: CmafPtsOffsetHandlingForBFrames -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header]
(HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header])
-> ToHeader CmafPtsOffsetHandlingForBFrames
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header]
$ctoHeader :: HeaderName -> CmafPtsOffsetHandlingForBFrames -> [Header]
Core.ToHeader,
      CmafPtsOffsetHandlingForBFrames -> QueryString
(CmafPtsOffsetHandlingForBFrames -> QueryString)
-> ToQuery CmafPtsOffsetHandlingForBFrames
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CmafPtsOffsetHandlingForBFrames -> QueryString
$ctoQuery :: CmafPtsOffsetHandlingForBFrames -> QueryString
Core.ToQuery,
      Value -> Parser [CmafPtsOffsetHandlingForBFrames]
Value -> Parser CmafPtsOffsetHandlingForBFrames
(Value -> Parser CmafPtsOffsetHandlingForBFrames)
-> (Value -> Parser [CmafPtsOffsetHandlingForBFrames])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
-> FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
-> FromJSONKey CmafPtsOffsetHandlingForBFrames
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
$cfromJSONKeyList :: FromJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
fromJSONKey :: FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
$cfromJSONKey :: FromJSONKeyFunction CmafPtsOffsetHandlingForBFrames
Core.FromJSONKey,
      [CmafPtsOffsetHandlingForBFrames] -> Encoding
[CmafPtsOffsetHandlingForBFrames] -> Value
CmafPtsOffsetHandlingForBFrames -> Encoding
CmafPtsOffsetHandlingForBFrames -> Value
(CmafPtsOffsetHandlingForBFrames -> Value)
-> (CmafPtsOffsetHandlingForBFrames -> Encoding)
-> ([CmafPtsOffsetHandlingForBFrames] -> Value)
-> ([CmafPtsOffsetHandlingForBFrames] -> Encoding)
-> ToJSON CmafPtsOffsetHandlingForBFrames
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
Core.ToJSON,
      ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
-> ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
-> ToJSONKey CmafPtsOffsetHandlingForBFrames
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
$ctoJSONKeyList :: ToJSONKeyFunction [CmafPtsOffsetHandlingForBFrames]
toJSONKey :: ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
$ctoJSONKey :: ToJSONKeyFunction CmafPtsOffsetHandlingForBFrames
Core.ToJSONKey,
      [Node] -> Either String CmafPtsOffsetHandlingForBFrames
([Node] -> Either String CmafPtsOffsetHandlingForBFrames)
-> FromXML CmafPtsOffsetHandlingForBFrames
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CmafPtsOffsetHandlingForBFrames
$cparseXML :: [Node] -> Either String CmafPtsOffsetHandlingForBFrames
Core.FromXML,
      CmafPtsOffsetHandlingForBFrames -> XML
(CmafPtsOffsetHandlingForBFrames -> XML)
-> ToXML CmafPtsOffsetHandlingForBFrames
forall a. (a -> XML) -> ToXML a
toXML :: CmafPtsOffsetHandlingForBFrames -> XML
$ctoXML :: CmafPtsOffsetHandlingForBFrames -> XML
Core.ToXML
    )

pattern CmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS :: CmafPtsOffsetHandlingForBFrames
pattern $bCmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS :: CmafPtsOffsetHandlingForBFrames
$mCmafPtsOffsetHandlingForBFrames_MATCH_INITIAL_PTS :: forall r.
CmafPtsOffsetHandlingForBFrames
-> (Void# -> r) -> (Void# -> 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
-> (Void# -> r) -> (Void# -> r) -> r
CmafPtsOffsetHandlingForBFrames_ZERO_BASED = CmafPtsOffsetHandlingForBFrames' "ZERO_BASED"

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