{-# 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.MediaConvert.Types.VideoSelector
-- 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.VideoSelector where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.AlphaBehavior
import Amazonka.MediaConvert.Types.ColorSpace
import Amazonka.MediaConvert.Types.ColorSpaceUsage
import Amazonka.MediaConvert.Types.EmbeddedTimecodeOverride
import Amazonka.MediaConvert.Types.Hdr10Metadata
import Amazonka.MediaConvert.Types.InputRotate
import Amazonka.MediaConvert.Types.InputSampleRange
import Amazonka.MediaConvert.Types.PadVideo
import qualified Amazonka.Prelude as Prelude

-- | Input video selectors contain the video settings for the input. Each of
-- your inputs can have up to one video selector.
--
-- /See:/ 'newVideoSelector' smart constructor.
data VideoSelector = VideoSelector'
  { -- | Ignore this setting unless this input is a QuickTime animation with an
    -- alpha channel. Use this setting to create separate Key and Fill outputs.
    -- In each output, specify which part of the input MediaConvert uses. Leave
    -- this setting at the default value DISCARD to delete the alpha channel
    -- and preserve the video. Set it to REMAP_TO_LUMA to delete the video and
    -- map the alpha channel to the luma channel of your outputs.
    VideoSelector -> Maybe AlphaBehavior
alphaBehavior :: Prelude.Maybe AlphaBehavior,
    -- | If your input video has accurate color space metadata, or if you don\'t
    -- know about color space, leave this set to the default value Follow. The
    -- service will automatically detect your input color space. If your input
    -- video has metadata indicating the wrong color space, specify the
    -- accurate color space here. If your input video is HDR 10 and the SMPTE
    -- ST 2086 Mastering Display Color Volume static metadata isn\'t present in
    -- your video stream, or if that metadata is present but not accurate,
    -- choose Force HDR 10 here and specify correct values in the input HDR 10
    -- metadata settings. For more information about MediaConvert HDR jobs, see
    -- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr. Select P3D65
    -- (SDR) to set the input color space metadata to the following: * Color
    -- primaries: Display P3 * Transfer characteristics: SMPTE 428M * Matrix
    -- coefficients: BT.709
    VideoSelector -> Maybe ColorSpace
colorSpace :: Prelude.Maybe ColorSpace,
    -- | There are two sources for color metadata, the input file and the job
    -- input settings Color space (ColorSpace) and HDR master display
    -- information settings(Hdr10Metadata). The Color space usage setting
    -- determines which takes precedence. Choose Force (FORCE) to use color
    -- metadata from the input job settings. If you don\'t specify values for
    -- those settings, the service defaults to using metadata from your input.
    -- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
    -- source when it is present. If there\'s no color metadata in your input
    -- file, the service defaults to using values you specify in the input
    -- settings.
    VideoSelector -> Maybe ColorSpaceUsage
colorSpaceUsage :: Prelude.Maybe ColorSpaceUsage,
    -- | Set Embedded timecode override (embeddedTimecodeOverride) to Use MDPM
    -- (USE_MDPM) when your AVCHD input contains timecode tag data in the
    -- Modified Digital Video Pack Metadata (MDPM). When you do, we recommend
    -- you also set Timecode source (inputTimecodeSource) to Embedded
    -- (EMBEDDED). Leave Embedded timecode override blank, or set to None
    -- (NONE), when your input does not contain MDPM timecode.
    VideoSelector -> Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride :: Prelude.Maybe EmbeddedTimecodeOverride,
    -- | Use these settings to provide HDR 10 metadata that is missing or
    -- inaccurate in your input video. Appropriate values vary depending on the
    -- input video and must be provided by a color grader. The color grader
    -- generates these values during the HDR 10 mastering process. The valid
    -- range for each of these settings is 0 to 50,000. Each increment
    -- represents 0.00002 in CIE1931 color coordinate. Related settings - When
    -- you specify these values, you must also set Color space (ColorSpace) to
    -- HDR 10 (HDR10). To specify whether the the values you specify here take
    -- precedence over the values in the metadata of your input file, set Color
    -- space usage (ColorSpaceUsage). To specify whether color metadata is
    -- included in an output, set Color metadata (ColorMetadata). For more
    -- information about MediaConvert HDR jobs, see
    -- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
    VideoSelector -> Maybe Hdr10Metadata
hdr10Metadata :: Prelude.Maybe Hdr10Metadata,
    -- | Use this setting if your input has video and audio durations that don\'t
    -- align, and your output or player has strict alignment requirements.
    -- Examples: Input audio track has a delayed start. Input video track ends
    -- before audio ends. When you set Pad video (padVideo) to Black (BLACK),
    -- MediaConvert generates black video frames so that output video and audio
    -- durations match. Black video frames are added at the beginning or end,
    -- depending on your input. To keep the default behavior and not generate
    -- black video, set Pad video to Disabled (DISABLED) or leave blank.
    VideoSelector -> Maybe PadVideo
padVideo :: Prelude.Maybe PadVideo,
    -- | Use PID (Pid) to select specific video data from an input file. Specify
    -- this value as an integer; the system automatically converts it to the
    -- hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet
    -- identifier, is an identifier for a set of data in an MPEG-2 transport
    -- stream container.
    VideoSelector -> Maybe Natural
pid :: Prelude.Maybe Prelude.Natural,
    -- | Selects a specific program from within a multi-program transport stream.
    -- Note that Quad 4K is not currently supported.
    VideoSelector -> Maybe Int
programNumber :: Prelude.Maybe Prelude.Int,
    -- | Use Rotate (InputRotate) to specify how the service rotates your video.
    -- You can choose automatic rotation or specify a rotation. You can specify
    -- a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video
    -- container is .mov or .mp4 and your input has rotation metadata, you can
    -- choose Automatic to have the service rotate your video according to the
    -- rotation specified in the metadata. The rotation must be within one
    -- degree of 90, 180, or 270 degrees. If the rotation metadata specifies
    -- any other rotation, the service will default to no rotation. By default,
    -- the service does no rotation, even if your input video has rotation
    -- metadata. The service doesn\'t pass through rotation metadata.
    VideoSelector -> Maybe InputRotate
rotate :: Prelude.Maybe InputRotate,
    -- | If the sample range metadata in your input video is accurate, or if you
    -- don\'t know about sample range, keep the default value, Follow (FOLLOW),
    -- for this setting. When you do, the service automatically detects your
    -- input sample range. If your input video has metadata indicating the
    -- wrong sample range, specify the accurate sample range here. When you do,
    -- MediaConvert ignores any sample range information in the input metadata.
    -- Regardless of whether MediaConvert uses the input sample range or the
    -- sample range that you specify, MediaConvert uses the sample range for
    -- transcoding and also writes it to the output metadata.
    VideoSelector -> Maybe InputSampleRange
sampleRange :: Prelude.Maybe InputSampleRange
  }
  deriving (VideoSelector -> VideoSelector -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoSelector -> VideoSelector -> Bool
$c/= :: VideoSelector -> VideoSelector -> Bool
== :: VideoSelector -> VideoSelector -> Bool
$c== :: VideoSelector -> VideoSelector -> Bool
Prelude.Eq, ReadPrec [VideoSelector]
ReadPrec VideoSelector
Int -> ReadS VideoSelector
ReadS [VideoSelector]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoSelector]
$creadListPrec :: ReadPrec [VideoSelector]
readPrec :: ReadPrec VideoSelector
$creadPrec :: ReadPrec VideoSelector
readList :: ReadS [VideoSelector]
$creadList :: ReadS [VideoSelector]
readsPrec :: Int -> ReadS VideoSelector
$creadsPrec :: Int -> ReadS VideoSelector
Prelude.Read, Int -> VideoSelector -> ShowS
[VideoSelector] -> ShowS
VideoSelector -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoSelector] -> ShowS
$cshowList :: [VideoSelector] -> ShowS
show :: VideoSelector -> String
$cshow :: VideoSelector -> String
showsPrec :: Int -> VideoSelector -> ShowS
$cshowsPrec :: Int -> VideoSelector -> ShowS
Prelude.Show, forall x. Rep VideoSelector x -> VideoSelector
forall x. VideoSelector -> Rep VideoSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoSelector x -> VideoSelector
$cfrom :: forall x. VideoSelector -> Rep VideoSelector x
Prelude.Generic)

-- |
-- Create a value of 'VideoSelector' 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:
--
-- 'alphaBehavior', 'videoSelector_alphaBehavior' - Ignore this setting unless this input is a QuickTime animation with an
-- alpha channel. Use this setting to create separate Key and Fill outputs.
-- In each output, specify which part of the input MediaConvert uses. Leave
-- this setting at the default value DISCARD to delete the alpha channel
-- and preserve the video. Set it to REMAP_TO_LUMA to delete the video and
-- map the alpha channel to the luma channel of your outputs.
--
-- 'colorSpace', 'videoSelector_colorSpace' - If your input video has accurate color space metadata, or if you don\'t
-- know about color space, leave this set to the default value Follow. The
-- service will automatically detect your input color space. If your input
-- video has metadata indicating the wrong color space, specify the
-- accurate color space here. If your input video is HDR 10 and the SMPTE
-- ST 2086 Mastering Display Color Volume static metadata isn\'t present in
-- your video stream, or if that metadata is present but not accurate,
-- choose Force HDR 10 here and specify correct values in the input HDR 10
-- metadata settings. For more information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr. Select P3D65
-- (SDR) to set the input color space metadata to the following: * Color
-- primaries: Display P3 * Transfer characteristics: SMPTE 428M * Matrix
-- coefficients: BT.709
--
-- 'colorSpaceUsage', 'videoSelector_colorSpaceUsage' - There are two sources for color metadata, the input file and the job
-- input settings Color space (ColorSpace) and HDR master display
-- information settings(Hdr10Metadata). The Color space usage setting
-- determines which takes precedence. Choose Force (FORCE) to use color
-- metadata from the input job settings. If you don\'t specify values for
-- those settings, the service defaults to using metadata from your input.
-- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
-- source when it is present. If there\'s no color metadata in your input
-- file, the service defaults to using values you specify in the input
-- settings.
--
-- 'embeddedTimecodeOverride', 'videoSelector_embeddedTimecodeOverride' - Set Embedded timecode override (embeddedTimecodeOverride) to Use MDPM
-- (USE_MDPM) when your AVCHD input contains timecode tag data in the
-- Modified Digital Video Pack Metadata (MDPM). When you do, we recommend
-- you also set Timecode source (inputTimecodeSource) to Embedded
-- (EMBEDDED). Leave Embedded timecode override blank, or set to None
-- (NONE), when your input does not contain MDPM timecode.
--
-- 'hdr10Metadata', 'videoSelector_hdr10Metadata' - Use these settings to provide HDR 10 metadata that is missing or
-- inaccurate in your input video. Appropriate values vary depending on the
-- input video and must be provided by a color grader. The color grader
-- generates these values during the HDR 10 mastering process. The valid
-- range for each of these settings is 0 to 50,000. Each increment
-- represents 0.00002 in CIE1931 color coordinate. Related settings - When
-- you specify these values, you must also set Color space (ColorSpace) to
-- HDR 10 (HDR10). To specify whether the the values you specify here take
-- precedence over the values in the metadata of your input file, set Color
-- space usage (ColorSpaceUsage). To specify whether color metadata is
-- included in an output, set Color metadata (ColorMetadata). For more
-- information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
--
-- 'padVideo', 'videoSelector_padVideo' - Use this setting if your input has video and audio durations that don\'t
-- align, and your output or player has strict alignment requirements.
-- Examples: Input audio track has a delayed start. Input video track ends
-- before audio ends. When you set Pad video (padVideo) to Black (BLACK),
-- MediaConvert generates black video frames so that output video and audio
-- durations match. Black video frames are added at the beginning or end,
-- depending on your input. To keep the default behavior and not generate
-- black video, set Pad video to Disabled (DISABLED) or leave blank.
--
-- 'pid', 'videoSelector_pid' - Use PID (Pid) to select specific video data from an input file. Specify
-- this value as an integer; the system automatically converts it to the
-- hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet
-- identifier, is an identifier for a set of data in an MPEG-2 transport
-- stream container.
--
-- 'programNumber', 'videoSelector_programNumber' - Selects a specific program from within a multi-program transport stream.
-- Note that Quad 4K is not currently supported.
--
-- 'rotate', 'videoSelector_rotate' - Use Rotate (InputRotate) to specify how the service rotates your video.
-- You can choose automatic rotation or specify a rotation. You can specify
-- a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video
-- container is .mov or .mp4 and your input has rotation metadata, you can
-- choose Automatic to have the service rotate your video according to the
-- rotation specified in the metadata. The rotation must be within one
-- degree of 90, 180, or 270 degrees. If the rotation metadata specifies
-- any other rotation, the service will default to no rotation. By default,
-- the service does no rotation, even if your input video has rotation
-- metadata. The service doesn\'t pass through rotation metadata.
--
-- 'sampleRange', 'videoSelector_sampleRange' - If the sample range metadata in your input video is accurate, or if you
-- don\'t know about sample range, keep the default value, Follow (FOLLOW),
-- for this setting. When you do, the service automatically detects your
-- input sample range. If your input video has metadata indicating the
-- wrong sample range, specify the accurate sample range here. When you do,
-- MediaConvert ignores any sample range information in the input metadata.
-- Regardless of whether MediaConvert uses the input sample range or the
-- sample range that you specify, MediaConvert uses the sample range for
-- transcoding and also writes it to the output metadata.
newVideoSelector ::
  VideoSelector
newVideoSelector :: VideoSelector
newVideoSelector =
  VideoSelector'
    { $sel:alphaBehavior:VideoSelector' :: Maybe AlphaBehavior
alphaBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:colorSpace:VideoSelector' :: Maybe ColorSpace
colorSpace = forall a. Maybe a
Prelude.Nothing,
      $sel:colorSpaceUsage:VideoSelector' :: Maybe ColorSpaceUsage
colorSpaceUsage = forall a. Maybe a
Prelude.Nothing,
      $sel:embeddedTimecodeOverride:VideoSelector' :: Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride = forall a. Maybe a
Prelude.Nothing,
      $sel:hdr10Metadata:VideoSelector' :: Maybe Hdr10Metadata
hdr10Metadata = forall a. Maybe a
Prelude.Nothing,
      $sel:padVideo:VideoSelector' :: Maybe PadVideo
padVideo = forall a. Maybe a
Prelude.Nothing,
      $sel:pid:VideoSelector' :: Maybe Natural
pid = forall a. Maybe a
Prelude.Nothing,
      $sel:programNumber:VideoSelector' :: Maybe Int
programNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:rotate:VideoSelector' :: Maybe InputRotate
rotate = forall a. Maybe a
Prelude.Nothing,
      $sel:sampleRange:VideoSelector' :: Maybe InputSampleRange
sampleRange = forall a. Maybe a
Prelude.Nothing
    }

-- | Ignore this setting unless this input is a QuickTime animation with an
-- alpha channel. Use this setting to create separate Key and Fill outputs.
-- In each output, specify which part of the input MediaConvert uses. Leave
-- this setting at the default value DISCARD to delete the alpha channel
-- and preserve the video. Set it to REMAP_TO_LUMA to delete the video and
-- map the alpha channel to the luma channel of your outputs.
videoSelector_alphaBehavior :: Lens.Lens' VideoSelector (Prelude.Maybe AlphaBehavior)
videoSelector_alphaBehavior :: Lens' VideoSelector (Maybe AlphaBehavior)
videoSelector_alphaBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe AlphaBehavior
alphaBehavior :: Maybe AlphaBehavior
$sel:alphaBehavior:VideoSelector' :: VideoSelector -> Maybe AlphaBehavior
alphaBehavior} -> Maybe AlphaBehavior
alphaBehavior) (\s :: VideoSelector
s@VideoSelector' {} Maybe AlphaBehavior
a -> VideoSelector
s {$sel:alphaBehavior:VideoSelector' :: Maybe AlphaBehavior
alphaBehavior = Maybe AlphaBehavior
a} :: VideoSelector)

-- | If your input video has accurate color space metadata, or if you don\'t
-- know about color space, leave this set to the default value Follow. The
-- service will automatically detect your input color space. If your input
-- video has metadata indicating the wrong color space, specify the
-- accurate color space here. If your input video is HDR 10 and the SMPTE
-- ST 2086 Mastering Display Color Volume static metadata isn\'t present in
-- your video stream, or if that metadata is present but not accurate,
-- choose Force HDR 10 here and specify correct values in the input HDR 10
-- metadata settings. For more information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr. Select P3D65
-- (SDR) to set the input color space metadata to the following: * Color
-- primaries: Display P3 * Transfer characteristics: SMPTE 428M * Matrix
-- coefficients: BT.709
videoSelector_colorSpace :: Lens.Lens' VideoSelector (Prelude.Maybe ColorSpace)
videoSelector_colorSpace :: Lens' VideoSelector (Maybe ColorSpace)
videoSelector_colorSpace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe ColorSpace
colorSpace :: Maybe ColorSpace
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe ColorSpace
colorSpace} -> Maybe ColorSpace
colorSpace) (\s :: VideoSelector
s@VideoSelector' {} Maybe ColorSpace
a -> VideoSelector
s {$sel:colorSpace:VideoSelector' :: Maybe ColorSpace
colorSpace = Maybe ColorSpace
a} :: VideoSelector)

-- | There are two sources for color metadata, the input file and the job
-- input settings Color space (ColorSpace) and HDR master display
-- information settings(Hdr10Metadata). The Color space usage setting
-- determines which takes precedence. Choose Force (FORCE) to use color
-- metadata from the input job settings. If you don\'t specify values for
-- those settings, the service defaults to using metadata from your input.
-- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
-- source when it is present. If there\'s no color metadata in your input
-- file, the service defaults to using values you specify in the input
-- settings.
videoSelector_colorSpaceUsage :: Lens.Lens' VideoSelector (Prelude.Maybe ColorSpaceUsage)
videoSelector_colorSpaceUsage :: Lens' VideoSelector (Maybe ColorSpaceUsage)
videoSelector_colorSpaceUsage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe ColorSpaceUsage
colorSpaceUsage :: Maybe ColorSpaceUsage
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe ColorSpaceUsage
colorSpaceUsage} -> Maybe ColorSpaceUsage
colorSpaceUsage) (\s :: VideoSelector
s@VideoSelector' {} Maybe ColorSpaceUsage
a -> VideoSelector
s {$sel:colorSpaceUsage:VideoSelector' :: Maybe ColorSpaceUsage
colorSpaceUsage = Maybe ColorSpaceUsage
a} :: VideoSelector)

-- | Set Embedded timecode override (embeddedTimecodeOverride) to Use MDPM
-- (USE_MDPM) when your AVCHD input contains timecode tag data in the
-- Modified Digital Video Pack Metadata (MDPM). When you do, we recommend
-- you also set Timecode source (inputTimecodeSource) to Embedded
-- (EMBEDDED). Leave Embedded timecode override blank, or set to None
-- (NONE), when your input does not contain MDPM timecode.
videoSelector_embeddedTimecodeOverride :: Lens.Lens' VideoSelector (Prelude.Maybe EmbeddedTimecodeOverride)
videoSelector_embeddedTimecodeOverride :: Lens' VideoSelector (Maybe EmbeddedTimecodeOverride)
videoSelector_embeddedTimecodeOverride = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride :: Maybe EmbeddedTimecodeOverride
$sel:embeddedTimecodeOverride:VideoSelector' :: VideoSelector -> Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride} -> Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride) (\s :: VideoSelector
s@VideoSelector' {} Maybe EmbeddedTimecodeOverride
a -> VideoSelector
s {$sel:embeddedTimecodeOverride:VideoSelector' :: Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride = Maybe EmbeddedTimecodeOverride
a} :: VideoSelector)

-- | Use these settings to provide HDR 10 metadata that is missing or
-- inaccurate in your input video. Appropriate values vary depending on the
-- input video and must be provided by a color grader. The color grader
-- generates these values during the HDR 10 mastering process. The valid
-- range for each of these settings is 0 to 50,000. Each increment
-- represents 0.00002 in CIE1931 color coordinate. Related settings - When
-- you specify these values, you must also set Color space (ColorSpace) to
-- HDR 10 (HDR10). To specify whether the the values you specify here take
-- precedence over the values in the metadata of your input file, set Color
-- space usage (ColorSpaceUsage). To specify whether color metadata is
-- included in an output, set Color metadata (ColorMetadata). For more
-- information about MediaConvert HDR jobs, see
-- https:\/\/docs.aws.amazon.com\/console\/mediaconvert\/hdr.
videoSelector_hdr10Metadata :: Lens.Lens' VideoSelector (Prelude.Maybe Hdr10Metadata)
videoSelector_hdr10Metadata :: Lens' VideoSelector (Maybe Hdr10Metadata)
videoSelector_hdr10Metadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe Hdr10Metadata
hdr10Metadata :: Maybe Hdr10Metadata
$sel:hdr10Metadata:VideoSelector' :: VideoSelector -> Maybe Hdr10Metadata
hdr10Metadata} -> Maybe Hdr10Metadata
hdr10Metadata) (\s :: VideoSelector
s@VideoSelector' {} Maybe Hdr10Metadata
a -> VideoSelector
s {$sel:hdr10Metadata:VideoSelector' :: Maybe Hdr10Metadata
hdr10Metadata = Maybe Hdr10Metadata
a} :: VideoSelector)

-- | Use this setting if your input has video and audio durations that don\'t
-- align, and your output or player has strict alignment requirements.
-- Examples: Input audio track has a delayed start. Input video track ends
-- before audio ends. When you set Pad video (padVideo) to Black (BLACK),
-- MediaConvert generates black video frames so that output video and audio
-- durations match. Black video frames are added at the beginning or end,
-- depending on your input. To keep the default behavior and not generate
-- black video, set Pad video to Disabled (DISABLED) or leave blank.
videoSelector_padVideo :: Lens.Lens' VideoSelector (Prelude.Maybe PadVideo)
videoSelector_padVideo :: Lens' VideoSelector (Maybe PadVideo)
videoSelector_padVideo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe PadVideo
padVideo :: Maybe PadVideo
$sel:padVideo:VideoSelector' :: VideoSelector -> Maybe PadVideo
padVideo} -> Maybe PadVideo
padVideo) (\s :: VideoSelector
s@VideoSelector' {} Maybe PadVideo
a -> VideoSelector
s {$sel:padVideo:VideoSelector' :: Maybe PadVideo
padVideo = Maybe PadVideo
a} :: VideoSelector)

-- | Use PID (Pid) to select specific video data from an input file. Specify
-- this value as an integer; the system automatically converts it to the
-- hexidecimal value. For example, 257 selects PID 0x101. A PID, or packet
-- identifier, is an identifier for a set of data in an MPEG-2 transport
-- stream container.
videoSelector_pid :: Lens.Lens' VideoSelector (Prelude.Maybe Prelude.Natural)
videoSelector_pid :: Lens' VideoSelector (Maybe Natural)
videoSelector_pid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe Natural
pid :: Maybe Natural
$sel:pid:VideoSelector' :: VideoSelector -> Maybe Natural
pid} -> Maybe Natural
pid) (\s :: VideoSelector
s@VideoSelector' {} Maybe Natural
a -> VideoSelector
s {$sel:pid:VideoSelector' :: Maybe Natural
pid = Maybe Natural
a} :: VideoSelector)

-- | Selects a specific program from within a multi-program transport stream.
-- Note that Quad 4K is not currently supported.
videoSelector_programNumber :: Lens.Lens' VideoSelector (Prelude.Maybe Prelude.Int)
videoSelector_programNumber :: Lens' VideoSelector (Maybe Int)
videoSelector_programNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe Int
programNumber :: Maybe Int
$sel:programNumber:VideoSelector' :: VideoSelector -> Maybe Int
programNumber} -> Maybe Int
programNumber) (\s :: VideoSelector
s@VideoSelector' {} Maybe Int
a -> VideoSelector
s {$sel:programNumber:VideoSelector' :: Maybe Int
programNumber = Maybe Int
a} :: VideoSelector)

-- | Use Rotate (InputRotate) to specify how the service rotates your video.
-- You can choose automatic rotation or specify a rotation. You can specify
-- a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video
-- container is .mov or .mp4 and your input has rotation metadata, you can
-- choose Automatic to have the service rotate your video according to the
-- rotation specified in the metadata. The rotation must be within one
-- degree of 90, 180, or 270 degrees. If the rotation metadata specifies
-- any other rotation, the service will default to no rotation. By default,
-- the service does no rotation, even if your input video has rotation
-- metadata. The service doesn\'t pass through rotation metadata.
videoSelector_rotate :: Lens.Lens' VideoSelector (Prelude.Maybe InputRotate)
videoSelector_rotate :: Lens' VideoSelector (Maybe InputRotate)
videoSelector_rotate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe InputRotate
rotate :: Maybe InputRotate
$sel:rotate:VideoSelector' :: VideoSelector -> Maybe InputRotate
rotate} -> Maybe InputRotate
rotate) (\s :: VideoSelector
s@VideoSelector' {} Maybe InputRotate
a -> VideoSelector
s {$sel:rotate:VideoSelector' :: Maybe InputRotate
rotate = Maybe InputRotate
a} :: VideoSelector)

-- | If the sample range metadata in your input video is accurate, or if you
-- don\'t know about sample range, keep the default value, Follow (FOLLOW),
-- for this setting. When you do, the service automatically detects your
-- input sample range. If your input video has metadata indicating the
-- wrong sample range, specify the accurate sample range here. When you do,
-- MediaConvert ignores any sample range information in the input metadata.
-- Regardless of whether MediaConvert uses the input sample range or the
-- sample range that you specify, MediaConvert uses the sample range for
-- transcoding and also writes it to the output metadata.
videoSelector_sampleRange :: Lens.Lens' VideoSelector (Prelude.Maybe InputSampleRange)
videoSelector_sampleRange :: Lens' VideoSelector (Maybe InputSampleRange)
videoSelector_sampleRange = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoSelector' {Maybe InputSampleRange
sampleRange :: Maybe InputSampleRange
$sel:sampleRange:VideoSelector' :: VideoSelector -> Maybe InputSampleRange
sampleRange} -> Maybe InputSampleRange
sampleRange) (\s :: VideoSelector
s@VideoSelector' {} Maybe InputSampleRange
a -> VideoSelector
s {$sel:sampleRange:VideoSelector' :: Maybe InputSampleRange
sampleRange = Maybe InputSampleRange
a} :: VideoSelector)

instance Data.FromJSON VideoSelector where
  parseJSON :: Value -> Parser VideoSelector
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"VideoSelector"
      ( \Object
x ->
          Maybe AlphaBehavior
-> Maybe ColorSpace
-> Maybe ColorSpaceUsage
-> Maybe EmbeddedTimecodeOverride
-> Maybe Hdr10Metadata
-> Maybe PadVideo
-> Maybe Natural
-> Maybe Int
-> Maybe InputRotate
-> Maybe InputSampleRange
-> VideoSelector
VideoSelector'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"alphaBehavior")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"colorSpace")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"colorSpaceUsage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"embeddedTimecodeOverride")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hdr10Metadata")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"padVideo")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pid")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"programNumber")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"rotate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sampleRange")
      )

instance Prelude.Hashable VideoSelector where
  hashWithSalt :: Int -> VideoSelector -> Int
hashWithSalt Int
_salt VideoSelector' {Maybe Int
Maybe Natural
Maybe AlphaBehavior
Maybe ColorSpace
Maybe ColorSpaceUsage
Maybe EmbeddedTimecodeOverride
Maybe Hdr10Metadata
Maybe InputRotate
Maybe InputSampleRange
Maybe PadVideo
sampleRange :: Maybe InputSampleRange
rotate :: Maybe InputRotate
programNumber :: Maybe Int
pid :: Maybe Natural
padVideo :: Maybe PadVideo
hdr10Metadata :: Maybe Hdr10Metadata
embeddedTimecodeOverride :: Maybe EmbeddedTimecodeOverride
colorSpaceUsage :: Maybe ColorSpaceUsage
colorSpace :: Maybe ColorSpace
alphaBehavior :: Maybe AlphaBehavior
$sel:sampleRange:VideoSelector' :: VideoSelector -> Maybe InputSampleRange
$sel:rotate:VideoSelector' :: VideoSelector -> Maybe InputRotate
$sel:programNumber:VideoSelector' :: VideoSelector -> Maybe Int
$sel:pid:VideoSelector' :: VideoSelector -> Maybe Natural
$sel:padVideo:VideoSelector' :: VideoSelector -> Maybe PadVideo
$sel:hdr10Metadata:VideoSelector' :: VideoSelector -> Maybe Hdr10Metadata
$sel:embeddedTimecodeOverride:VideoSelector' :: VideoSelector -> Maybe EmbeddedTimecodeOverride
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe ColorSpaceUsage
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe ColorSpace
$sel:alphaBehavior:VideoSelector' :: VideoSelector -> Maybe AlphaBehavior
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AlphaBehavior
alphaBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ColorSpace
colorSpace
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ColorSpaceUsage
colorSpaceUsage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Hdr10Metadata
hdr10Metadata
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PadVideo
padVideo
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pid
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
programNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputRotate
rotate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputSampleRange
sampleRange

instance Prelude.NFData VideoSelector where
  rnf :: VideoSelector -> ()
rnf VideoSelector' {Maybe Int
Maybe Natural
Maybe AlphaBehavior
Maybe ColorSpace
Maybe ColorSpaceUsage
Maybe EmbeddedTimecodeOverride
Maybe Hdr10Metadata
Maybe InputRotate
Maybe InputSampleRange
Maybe PadVideo
sampleRange :: Maybe InputSampleRange
rotate :: Maybe InputRotate
programNumber :: Maybe Int
pid :: Maybe Natural
padVideo :: Maybe PadVideo
hdr10Metadata :: Maybe Hdr10Metadata
embeddedTimecodeOverride :: Maybe EmbeddedTimecodeOverride
colorSpaceUsage :: Maybe ColorSpaceUsage
colorSpace :: Maybe ColorSpace
alphaBehavior :: Maybe AlphaBehavior
$sel:sampleRange:VideoSelector' :: VideoSelector -> Maybe InputSampleRange
$sel:rotate:VideoSelector' :: VideoSelector -> Maybe InputRotate
$sel:programNumber:VideoSelector' :: VideoSelector -> Maybe Int
$sel:pid:VideoSelector' :: VideoSelector -> Maybe Natural
$sel:padVideo:VideoSelector' :: VideoSelector -> Maybe PadVideo
$sel:hdr10Metadata:VideoSelector' :: VideoSelector -> Maybe Hdr10Metadata
$sel:embeddedTimecodeOverride:VideoSelector' :: VideoSelector -> Maybe EmbeddedTimecodeOverride
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe ColorSpaceUsage
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe ColorSpace
$sel:alphaBehavior:VideoSelector' :: VideoSelector -> Maybe AlphaBehavior
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AlphaBehavior
alphaBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ColorSpace
colorSpace
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ColorSpaceUsage
colorSpaceUsage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Hdr10Metadata
hdr10Metadata
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PadVideo
padVideo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
pid
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
programNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputRotate
rotate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputSampleRange
sampleRange

instance Data.ToJSON VideoSelector where
  toJSON :: VideoSelector -> Value
toJSON VideoSelector' {Maybe Int
Maybe Natural
Maybe AlphaBehavior
Maybe ColorSpace
Maybe ColorSpaceUsage
Maybe EmbeddedTimecodeOverride
Maybe Hdr10Metadata
Maybe InputRotate
Maybe InputSampleRange
Maybe PadVideo
sampleRange :: Maybe InputSampleRange
rotate :: Maybe InputRotate
programNumber :: Maybe Int
pid :: Maybe Natural
padVideo :: Maybe PadVideo
hdr10Metadata :: Maybe Hdr10Metadata
embeddedTimecodeOverride :: Maybe EmbeddedTimecodeOverride
colorSpaceUsage :: Maybe ColorSpaceUsage
colorSpace :: Maybe ColorSpace
alphaBehavior :: Maybe AlphaBehavior
$sel:sampleRange:VideoSelector' :: VideoSelector -> Maybe InputSampleRange
$sel:rotate:VideoSelector' :: VideoSelector -> Maybe InputRotate
$sel:programNumber:VideoSelector' :: VideoSelector -> Maybe Int
$sel:pid:VideoSelector' :: VideoSelector -> Maybe Natural
$sel:padVideo:VideoSelector' :: VideoSelector -> Maybe PadVideo
$sel:hdr10Metadata:VideoSelector' :: VideoSelector -> Maybe Hdr10Metadata
$sel:embeddedTimecodeOverride:VideoSelector' :: VideoSelector -> Maybe EmbeddedTimecodeOverride
$sel:colorSpaceUsage:VideoSelector' :: VideoSelector -> Maybe ColorSpaceUsage
$sel:colorSpace:VideoSelector' :: VideoSelector -> Maybe ColorSpace
$sel:alphaBehavior:VideoSelector' :: VideoSelector -> Maybe AlphaBehavior
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"alphaBehavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AlphaBehavior
alphaBehavior,
            (Key
"colorSpace" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorSpace
colorSpace,
            (Key
"colorSpaceUsage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ColorSpaceUsage
colorSpaceUsage,
            (Key
"embeddedTimecodeOverride" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EmbeddedTimecodeOverride
embeddedTimecodeOverride,
            (Key
"hdr10Metadata" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Hdr10Metadata
hdr10Metadata,
            (Key
"padVideo" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PadVideo
padVideo,
            (Key
"pid" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pid,
            (Key
"programNumber" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
programNumber,
            (Key
"rotate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputRotate
rotate,
            (Key
"sampleRange" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputSampleRange
sampleRange
          ]
      )