// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// You can use queues to manage the resources that are available to your AWS account for running multiple transcoding jobs at the same time. If you don't specify a queue, the service sends all jobs through the default queue. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Queue {
/// An identifier for this resource that is unique within all of AWS.
pub arn: std::option::Option<std::string::String>,
/// The timestamp in epoch seconds for when you created the queue.
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
/// An optional description that you create for each queue.
pub description: std::option::Option<std::string::String>,
/// The timestamp in epoch seconds for when you most recently updated the queue.
pub last_updated: std::option::Option<aws_smithy_types::DateTime>,
/// A name that you create for each queue. Each name must be unique within your account.
pub name: std::option::Option<std::string::String>,
/// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
pub pricing_plan: std::option::Option<crate::model::PricingPlan>,
/// The estimated number of jobs with a PROGRESSING status.
pub progressing_jobs_count: i32,
/// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
pub reservation_plan: std::option::Option<crate::model::ReservationPlan>,
/// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
pub status: std::option::Option<crate::model::QueueStatus>,
/// The estimated number of jobs with a SUBMITTED status.
pub submitted_jobs_count: i32,
/// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
pub r#type: std::option::Option<crate::model::Type>,
}
impl Queue {
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// The timestamp in epoch seconds for when you created the queue.
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// An optional description that you create for each queue.
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// The timestamp in epoch seconds for when you most recently updated the queue.
pub fn last_updated(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated.as_ref()
}
/// A name that you create for each queue. Each name must be unique within your account.
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
pub fn pricing_plan(&self) -> std::option::Option<&crate::model::PricingPlan> {
self.pricing_plan.as_ref()
}
/// The estimated number of jobs with a PROGRESSING status.
pub fn progressing_jobs_count(&self) -> i32 {
self.progressing_jobs_count
}
/// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
pub fn reservation_plan(&self) -> std::option::Option<&crate::model::ReservationPlan> {
self.reservation_plan.as_ref()
}
/// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
pub fn status(&self) -> std::option::Option<&crate::model::QueueStatus> {
self.status.as_ref()
}
/// The estimated number of jobs with a SUBMITTED status.
pub fn submitted_jobs_count(&self) -> i32 {
self.submitted_jobs_count
}
/// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for Queue {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Queue");
formatter.field("arn", &self.arn);
formatter.field("created_at", &self.created_at);
formatter.field("description", &self.description);
formatter.field("last_updated", &self.last_updated);
formatter.field("name", &self.name);
formatter.field("pricing_plan", &self.pricing_plan);
formatter.field("progressing_jobs_count", &self.progressing_jobs_count);
formatter.field("reservation_plan", &self.reservation_plan);
formatter.field("status", &self.status);
formatter.field("submitted_jobs_count", &self.submitted_jobs_count);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`Queue`](crate::model::Queue)
pub mod queue {
/// A builder for [`Queue`](crate::model::Queue)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) last_updated: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) pricing_plan: std::option::Option<crate::model::PricingPlan>,
pub(crate) progressing_jobs_count: std::option::Option<i32>,
pub(crate) reservation_plan: std::option::Option<crate::model::ReservationPlan>,
pub(crate) status: std::option::Option<crate::model::QueueStatus>,
pub(crate) submitted_jobs_count: std::option::Option<i32>,
pub(crate) r#type: std::option::Option<crate::model::Type>,
}
impl Builder {
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// An identifier for this resource that is unique within all of AWS.
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// The timestamp in epoch seconds for when you created the queue.
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
/// The timestamp in epoch seconds for when you created the queue.
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
/// An optional description that you create for each queue.
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// An optional description that you create for each queue.
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// The timestamp in epoch seconds for when you most recently updated the queue.
pub fn last_updated(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated = Some(input);
self
}
/// The timestamp in epoch seconds for when you most recently updated the queue.
pub fn set_last_updated(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated = input;
self
}
/// A name that you create for each queue. Each name must be unique within your account.
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// A name that you create for each queue. Each name must be unique within your account.
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
pub fn pricing_plan(mut self, input: crate::model::PricingPlan) -> Self {
self.pricing_plan = Some(input);
self
}
/// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
pub fn set_pricing_plan(
mut self,
input: std::option::Option<crate::model::PricingPlan>,
) -> Self {
self.pricing_plan = input;
self
}
/// The estimated number of jobs with a PROGRESSING status.
pub fn progressing_jobs_count(mut self, input: i32) -> Self {
self.progressing_jobs_count = Some(input);
self
}
/// The estimated number of jobs with a PROGRESSING status.
pub fn set_progressing_jobs_count(mut self, input: std::option::Option<i32>) -> Self {
self.progressing_jobs_count = input;
self
}
/// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
pub fn reservation_plan(mut self, input: crate::model::ReservationPlan) -> Self {
self.reservation_plan = Some(input);
self
}
/// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
pub fn set_reservation_plan(
mut self,
input: std::option::Option<crate::model::ReservationPlan>,
) -> Self {
self.reservation_plan = input;
self
}
/// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
pub fn status(mut self, input: crate::model::QueueStatus) -> Self {
self.status = Some(input);
self
}
/// Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
pub fn set_status(mut self, input: std::option::Option<crate::model::QueueStatus>) -> Self {
self.status = input;
self
}
/// The estimated number of jobs with a SUBMITTED status.
pub fn submitted_jobs_count(mut self, input: i32) -> Self {
self.submitted_jobs_count = Some(input);
self
}
/// The estimated number of jobs with a SUBMITTED status.
pub fn set_submitted_jobs_count(mut self, input: std::option::Option<i32>) -> Self {
self.submitted_jobs_count = input;
self
}
/// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
pub fn r#type(mut self, input: crate::model::Type) -> Self {
self.r#type = Some(input);
self
}
/// Specifies whether this on-demand queue is system or custom. System queues are built in. You can't modify or delete system queues. You can create and modify custom queues.
pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`Queue`](crate::model::Queue)
pub fn build(self) -> crate::model::Queue {
crate::model::Queue {
arn: self.arn,
created_at: self.created_at,
description: self.description,
last_updated: self.last_updated,
name: self.name,
pricing_plan: self.pricing_plan,
progressing_jobs_count: self.progressing_jobs_count.unwrap_or_default(),
reservation_plan: self.reservation_plan,
status: self.status,
submitted_jobs_count: self.submitted_jobs_count.unwrap_or_default(),
r#type: self.r#type,
}
}
}
}
impl Queue {
/// Creates a new builder-style object to manufacture [`Queue`](crate::model::Queue)
pub fn builder() -> crate::model::queue::Builder {
crate::model::queue::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Type {
#[allow(missing_docs)] // documentation missing in model
Custom,
#[allow(missing_docs)] // documentation missing in model
System,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Type {
fn from(s: &str) -> Self {
match s {
"CUSTOM" => Type::Custom,
"SYSTEM" => Type::System,
other => Type::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Type {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Type::from(s))
}
}
impl Type {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Type::Custom => "CUSTOM",
Type::System => "SYSTEM",
Type::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CUSTOM", "SYSTEM"]
}
}
impl AsRef<str> for Type {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Queues can be ACTIVE or PAUSED. If you pause a queue, jobs in that queue won't begin. Jobs that are running when you pause a queue continue to run until they finish or result in an error.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum QueueStatus {
#[allow(missing_docs)] // documentation missing in model
Active,
#[allow(missing_docs)] // documentation missing in model
Paused,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for QueueStatus {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => QueueStatus::Active,
"PAUSED" => QueueStatus::Paused,
other => QueueStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for QueueStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(QueueStatus::from(s))
}
}
impl QueueStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
QueueStatus::Active => "ACTIVE",
QueueStatus::Paused => "PAUSED",
QueueStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "PAUSED"]
}
}
impl AsRef<str> for QueueStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReservationPlan {
/// The length of the term of your reserved queue pricing plan commitment.
pub commitment: std::option::Option<crate::model::Commitment>,
/// The timestamp in epoch seconds for when the current pricing plan term for this reserved queue expires.
pub expires_at: std::option::Option<aws_smithy_types::DateTime>,
/// The timestamp in epoch seconds for when you set up the current pricing plan for this reserved queue.
pub purchased_at: std::option::Option<aws_smithy_types::DateTime>,
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term.
pub renewal_type: std::option::Option<crate::model::RenewalType>,
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. When you increase this number, you extend your existing commitment with a new 12-month commitment for a larger number of RTS. The new commitment begins when you purchase the additional capacity. You can't decrease the number of RTS in your reserved queue.
pub reserved_slots: i32,
/// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED.
pub status: std::option::Option<crate::model::ReservationPlanStatus>,
}
impl ReservationPlan {
/// The length of the term of your reserved queue pricing plan commitment.
pub fn commitment(&self) -> std::option::Option<&crate::model::Commitment> {
self.commitment.as_ref()
}
/// The timestamp in epoch seconds for when the current pricing plan term for this reserved queue expires.
pub fn expires_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.expires_at.as_ref()
}
/// The timestamp in epoch seconds for when you set up the current pricing plan for this reserved queue.
pub fn purchased_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.purchased_at.as_ref()
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term.
pub fn renewal_type(&self) -> std::option::Option<&crate::model::RenewalType> {
self.renewal_type.as_ref()
}
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. When you increase this number, you extend your existing commitment with a new 12-month commitment for a larger number of RTS. The new commitment begins when you purchase the additional capacity. You can't decrease the number of RTS in your reserved queue.
pub fn reserved_slots(&self) -> i32 {
self.reserved_slots
}
/// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED.
pub fn status(&self) -> std::option::Option<&crate::model::ReservationPlanStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for ReservationPlan {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReservationPlan");
formatter.field("commitment", &self.commitment);
formatter.field("expires_at", &self.expires_at);
formatter.field("purchased_at", &self.purchased_at);
formatter.field("renewal_type", &self.renewal_type);
formatter.field("reserved_slots", &self.reserved_slots);
formatter.field("status", &self.status);
formatter.finish()
}
}
/// See [`ReservationPlan`](crate::model::ReservationPlan)
pub mod reservation_plan {
/// A builder for [`ReservationPlan`](crate::model::ReservationPlan)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) commitment: std::option::Option<crate::model::Commitment>,
pub(crate) expires_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) purchased_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) renewal_type: std::option::Option<crate::model::RenewalType>,
pub(crate) reserved_slots: std::option::Option<i32>,
pub(crate) status: std::option::Option<crate::model::ReservationPlanStatus>,
}
impl Builder {
/// The length of the term of your reserved queue pricing plan commitment.
pub fn commitment(mut self, input: crate::model::Commitment) -> Self {
self.commitment = Some(input);
self
}
/// The length of the term of your reserved queue pricing plan commitment.
pub fn set_commitment(
mut self,
input: std::option::Option<crate::model::Commitment>,
) -> Self {
self.commitment = input;
self
}
/// The timestamp in epoch seconds for when the current pricing plan term for this reserved queue expires.
pub fn expires_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.expires_at = Some(input);
self
}
/// The timestamp in epoch seconds for when the current pricing plan term for this reserved queue expires.
pub fn set_expires_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.expires_at = input;
self
}
/// The timestamp in epoch seconds for when you set up the current pricing plan for this reserved queue.
pub fn purchased_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.purchased_at = Some(input);
self
}
/// The timestamp in epoch seconds for when you set up the current pricing plan for this reserved queue.
pub fn set_purchased_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.purchased_at = input;
self
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term.
pub fn renewal_type(mut self, input: crate::model::RenewalType) -> Self {
self.renewal_type = Some(input);
self
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term.
pub fn set_renewal_type(
mut self,
input: std::option::Option<crate::model::RenewalType>,
) -> Self {
self.renewal_type = input;
self
}
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. When you increase this number, you extend your existing commitment with a new 12-month commitment for a larger number of RTS. The new commitment begins when you purchase the additional capacity. You can't decrease the number of RTS in your reserved queue.
pub fn reserved_slots(mut self, input: i32) -> Self {
self.reserved_slots = Some(input);
self
}
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. When you increase this number, you extend your existing commitment with a new 12-month commitment for a larger number of RTS. The new commitment begins when you purchase the additional capacity. You can't decrease the number of RTS in your reserved queue.
pub fn set_reserved_slots(mut self, input: std::option::Option<i32>) -> Self {
self.reserved_slots = input;
self
}
/// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED.
pub fn status(mut self, input: crate::model::ReservationPlanStatus) -> Self {
self.status = Some(input);
self
}
/// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED.
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ReservationPlanStatus>,
) -> Self {
self.status = input;
self
}
/// Consumes the builder and constructs a [`ReservationPlan`](crate::model::ReservationPlan)
pub fn build(self) -> crate::model::ReservationPlan {
crate::model::ReservationPlan {
commitment: self.commitment,
expires_at: self.expires_at,
purchased_at: self.purchased_at,
renewal_type: self.renewal_type,
reserved_slots: self.reserved_slots.unwrap_or_default(),
status: self.status,
}
}
}
}
impl ReservationPlan {
/// Creates a new builder-style object to manufacture [`ReservationPlan`](crate::model::ReservationPlan)
pub fn builder() -> crate::model::reservation_plan::Builder {
crate::model::reservation_plan::Builder::default()
}
}
/// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ReservationPlanStatus {
#[allow(missing_docs)] // documentation missing in model
Active,
#[allow(missing_docs)] // documentation missing in model
Expired,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ReservationPlanStatus {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => ReservationPlanStatus::Active,
"EXPIRED" => ReservationPlanStatus::Expired,
other => ReservationPlanStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ReservationPlanStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReservationPlanStatus::from(s))
}
}
impl ReservationPlanStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ReservationPlanStatus::Active => "ACTIVE",
ReservationPlanStatus::Expired => "EXPIRED",
ReservationPlanStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "EXPIRED"]
}
}
impl AsRef<str> for ReservationPlanStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum RenewalType {
#[allow(missing_docs)] // documentation missing in model
AutoRenew,
#[allow(missing_docs)] // documentation missing in model
Expire,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for RenewalType {
fn from(s: &str) -> Self {
match s {
"AUTO_RENEW" => RenewalType::AutoRenew,
"EXPIRE" => RenewalType::Expire,
other => RenewalType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RenewalType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RenewalType::from(s))
}
}
impl RenewalType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
RenewalType::AutoRenew => "AUTO_RENEW",
RenewalType::Expire => "EXPIRE",
RenewalType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO_RENEW", "EXPIRE"]
}
}
impl AsRef<str> for RenewalType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The length of the term of your reserved queue pricing plan commitment.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Commitment {
#[allow(missing_docs)] // documentation missing in model
OneYear,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Commitment {
fn from(s: &str) -> Self {
match s {
"ONE_YEAR" => Commitment::OneYear,
other => Commitment::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Commitment {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Commitment::from(s))
}
}
impl Commitment {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Commitment::OneYear => "ONE_YEAR",
Commitment::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ONE_YEAR"]
}
}
impl AsRef<str> for Commitment {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specifies whether the pricing plan for the queue is on-demand or reserved. For on-demand, you pay per minute, billed in increments of .01 minute. For reserved, you pay for the transcoding capacity of the entire queue, regardless of how much or how little you use it. Reserved pricing requires a 12-month commitment.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PricingPlan {
#[allow(missing_docs)] // documentation missing in model
OnDemand,
#[allow(missing_docs)] // documentation missing in model
Reserved,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for PricingPlan {
fn from(s: &str) -> Self {
match s {
"ON_DEMAND" => PricingPlan::OnDemand,
"RESERVED" => PricingPlan::Reserved,
other => PricingPlan::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PricingPlan {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PricingPlan::from(s))
}
}
impl PricingPlan {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
PricingPlan::OnDemand => "ON_DEMAND",
PricingPlan::Reserved => "RESERVED",
PricingPlan::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ON_DEMAND", "RESERVED"]
}
}
impl AsRef<str> for PricingPlan {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Details about the pricing plan for your reserved queue. Required for reserved queues and not applicable to on-demand queues.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReservationPlanSettings {
/// The length of the term of your reserved queue pricing plan commitment.
pub commitment: std::option::Option<crate::model::Commitment>,
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. When your term is auto renewed, you extend your commitment by 12 months from the auto renew date. You can cancel this commitment.
pub renewal_type: std::option::Option<crate::model::RenewalType>,
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. You can't decrease the number of RTS in your reserved queue. You can increase the number of RTS by extending your existing commitment with a new 12-month commitment for the larger number. The new commitment begins when you purchase the additional capacity. You can't cancel your commitment or revert to your original commitment after you increase the capacity.
pub reserved_slots: i32,
}
impl ReservationPlanSettings {
/// The length of the term of your reserved queue pricing plan commitment.
pub fn commitment(&self) -> std::option::Option<&crate::model::Commitment> {
self.commitment.as_ref()
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. When your term is auto renewed, you extend your commitment by 12 months from the auto renew date. You can cancel this commitment.
pub fn renewal_type(&self) -> std::option::Option<&crate::model::RenewalType> {
self.renewal_type.as_ref()
}
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. You can't decrease the number of RTS in your reserved queue. You can increase the number of RTS by extending your existing commitment with a new 12-month commitment for the larger number. The new commitment begins when you purchase the additional capacity. You can't cancel your commitment or revert to your original commitment after you increase the capacity.
pub fn reserved_slots(&self) -> i32 {
self.reserved_slots
}
}
impl std::fmt::Debug for ReservationPlanSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReservationPlanSettings");
formatter.field("commitment", &self.commitment);
formatter.field("renewal_type", &self.renewal_type);
formatter.field("reserved_slots", &self.reserved_slots);
formatter.finish()
}
}
/// See [`ReservationPlanSettings`](crate::model::ReservationPlanSettings)
pub mod reservation_plan_settings {
/// A builder for [`ReservationPlanSettings`](crate::model::ReservationPlanSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) commitment: std::option::Option<crate::model::Commitment>,
pub(crate) renewal_type: std::option::Option<crate::model::RenewalType>,
pub(crate) reserved_slots: std::option::Option<i32>,
}
impl Builder {
/// The length of the term of your reserved queue pricing plan commitment.
pub fn commitment(mut self, input: crate::model::Commitment) -> Self {
self.commitment = Some(input);
self
}
/// The length of the term of your reserved queue pricing plan commitment.
pub fn set_commitment(
mut self,
input: std::option::Option<crate::model::Commitment>,
) -> Self {
self.commitment = input;
self
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. When your term is auto renewed, you extend your commitment by 12 months from the auto renew date. You can cancel this commitment.
pub fn renewal_type(mut self, input: crate::model::RenewalType) -> Self {
self.renewal_type = Some(input);
self
}
/// Specifies whether the term of your reserved queue pricing plan is automatically extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. When your term is auto renewed, you extend your commitment by 12 months from the auto renew date. You can cancel this commitment.
pub fn set_renewal_type(
mut self,
input: std::option::Option<crate::model::RenewalType>,
) -> Self {
self.renewal_type = input;
self
}
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. You can't decrease the number of RTS in your reserved queue. You can increase the number of RTS by extending your existing commitment with a new 12-month commitment for the larger number. The new commitment begins when you purchase the additional capacity. You can't cancel your commitment or revert to your original commitment after you increase the capacity.
pub fn reserved_slots(mut self, input: i32) -> Self {
self.reserved_slots = Some(input);
self
}
/// Specifies the number of reserved transcode slots (RTS) for this queue. The number of RTS determines how many jobs the queue can process in parallel; each RTS can process one job at a time. You can't decrease the number of RTS in your reserved queue. You can increase the number of RTS by extending your existing commitment with a new 12-month commitment for the larger number. The new commitment begins when you purchase the additional capacity. You can't cancel your commitment or revert to your original commitment after you increase the capacity.
pub fn set_reserved_slots(mut self, input: std::option::Option<i32>) -> Self {
self.reserved_slots = input;
self
}
/// Consumes the builder and constructs a [`ReservationPlanSettings`](crate::model::ReservationPlanSettings)
pub fn build(self) -> crate::model::ReservationPlanSettings {
crate::model::ReservationPlanSettings {
commitment: self.commitment,
renewal_type: self.renewal_type,
reserved_slots: self.reserved_slots.unwrap_or_default(),
}
}
}
}
impl ReservationPlanSettings {
/// Creates a new builder-style object to manufacture [`ReservationPlanSettings`](crate::model::ReservationPlanSettings)
pub fn builder() -> crate::model::reservation_plan_settings::Builder {
crate::model::reservation_plan_settings::Builder::default()
}
}
/// A preset is a collection of preconfigured media conversion settings that you want MediaConvert to apply to the output during the conversion process.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Preset {
/// An identifier for this resource that is unique within all of AWS.
pub arn: std::option::Option<std::string::String>,
/// An optional category you create to organize your presets.
pub category: std::option::Option<std::string::String>,
/// The timestamp in epoch seconds for preset creation.
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
/// An optional description you create for each preset.
pub description: std::option::Option<std::string::String>,
/// The timestamp in epoch seconds when the preset was last updated.
pub last_updated: std::option::Option<aws_smithy_types::DateTime>,
/// A name you create for each preset. Each name must be unique within your account.
pub name: std::option::Option<std::string::String>,
/// Settings for preset
pub settings: std::option::Option<crate::model::PresetSettings>,
/// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
pub r#type: std::option::Option<crate::model::Type>,
}
impl Preset {
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// An optional category you create to organize your presets.
pub fn category(&self) -> std::option::Option<&str> {
self.category.as_deref()
}
/// The timestamp in epoch seconds for preset creation.
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// An optional description you create for each preset.
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// The timestamp in epoch seconds when the preset was last updated.
pub fn last_updated(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated.as_ref()
}
/// A name you create for each preset. Each name must be unique within your account.
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// Settings for preset
pub fn settings(&self) -> std::option::Option<&crate::model::PresetSettings> {
self.settings.as_ref()
}
/// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for Preset {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Preset");
formatter.field("arn", &self.arn);
formatter.field("category", &self.category);
formatter.field("created_at", &self.created_at);
formatter.field("description", &self.description);
formatter.field("last_updated", &self.last_updated);
formatter.field("name", &self.name);
formatter.field("settings", &self.settings);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`Preset`](crate::model::Preset)
pub mod preset {
/// A builder for [`Preset`](crate::model::Preset)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) category: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) last_updated: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) settings: std::option::Option<crate::model::PresetSettings>,
pub(crate) r#type: std::option::Option<crate::model::Type>,
}
impl Builder {
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// An identifier for this resource that is unique within all of AWS.
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// An optional category you create to organize your presets.
pub fn category(mut self, input: impl Into<std::string::String>) -> Self {
self.category = Some(input.into());
self
}
/// An optional category you create to organize your presets.
pub fn set_category(mut self, input: std::option::Option<std::string::String>) -> Self {
self.category = input;
self
}
/// The timestamp in epoch seconds for preset creation.
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
/// The timestamp in epoch seconds for preset creation.
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
/// An optional description you create for each preset.
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// An optional description you create for each preset.
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// The timestamp in epoch seconds when the preset was last updated.
pub fn last_updated(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated = Some(input);
self
}
/// The timestamp in epoch seconds when the preset was last updated.
pub fn set_last_updated(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated = input;
self
}
/// A name you create for each preset. Each name must be unique within your account.
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// A name you create for each preset. Each name must be unique within your account.
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Settings for preset
pub fn settings(mut self, input: crate::model::PresetSettings) -> Self {
self.settings = Some(input);
self
}
/// Settings for preset
pub fn set_settings(
mut self,
input: std::option::Option<crate::model::PresetSettings>,
) -> Self {
self.settings = input;
self
}
/// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
pub fn r#type(mut self, input: crate::model::Type) -> Self {
self.r#type = Some(input);
self
}
/// A preset can be of two types: system or custom. System or built-in preset can't be modified or deleted by the user.
pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`Preset`](crate::model::Preset)
pub fn build(self) -> crate::model::Preset {
crate::model::Preset {
arn: self.arn,
category: self.category,
created_at: self.created_at,
description: self.description,
last_updated: self.last_updated,
name: self.name,
settings: self.settings,
r#type: self.r#type,
}
}
}
}
impl Preset {
/// Creates a new builder-style object to manufacture [`Preset`](crate::model::Preset)
pub fn builder() -> crate::model::preset::Builder {
crate::model::preset::Builder::default()
}
}
/// Settings for preset
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PresetSettings {
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub audio_descriptions: std::option::Option<std::vec::Vec<crate::model::AudioDescription>>,
/// This object holds groups of settings related to captions for one output. For each output that has captions, include one instance of CaptionDescriptions.
pub caption_descriptions:
std::option::Option<std::vec::Vec<crate::model::CaptionDescriptionPreset>>,
/// Container specific settings.
pub container_settings: std::option::Option<crate::model::ContainerSettings>,
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub video_description: std::option::Option<crate::model::VideoDescription>,
}
impl PresetSettings {
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub fn audio_descriptions(&self) -> std::option::Option<&[crate::model::AudioDescription]> {
self.audio_descriptions.as_deref()
}
/// This object holds groups of settings related to captions for one output. For each output that has captions, include one instance of CaptionDescriptions.
pub fn caption_descriptions(
&self,
) -> std::option::Option<&[crate::model::CaptionDescriptionPreset]> {
self.caption_descriptions.as_deref()
}
/// Container specific settings.
pub fn container_settings(&self) -> std::option::Option<&crate::model::ContainerSettings> {
self.container_settings.as_ref()
}
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub fn video_description(&self) -> std::option::Option<&crate::model::VideoDescription> {
self.video_description.as_ref()
}
}
impl std::fmt::Debug for PresetSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PresetSettings");
formatter.field("audio_descriptions", &self.audio_descriptions);
formatter.field("caption_descriptions", &self.caption_descriptions);
formatter.field("container_settings", &self.container_settings);
formatter.field("video_description", &self.video_description);
formatter.finish()
}
}
/// See [`PresetSettings`](crate::model::PresetSettings)
pub mod preset_settings {
/// A builder for [`PresetSettings`](crate::model::PresetSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_descriptions:
std::option::Option<std::vec::Vec<crate::model::AudioDescription>>,
pub(crate) caption_descriptions:
std::option::Option<std::vec::Vec<crate::model::CaptionDescriptionPreset>>,
pub(crate) container_settings: std::option::Option<crate::model::ContainerSettings>,
pub(crate) video_description: std::option::Option<crate::model::VideoDescription>,
}
impl Builder {
/// Appends an item to `audio_descriptions`.
///
/// To override the contents of this collection use [`set_audio_descriptions`](Self::set_audio_descriptions).
///
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub fn audio_descriptions(mut self, input: crate::model::AudioDescription) -> Self {
let mut v = self.audio_descriptions.unwrap_or_default();
v.push(input);
self.audio_descriptions = Some(v);
self
}
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub fn set_audio_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AudioDescription>>,
) -> Self {
self.audio_descriptions = input;
self
}
/// Appends an item to `caption_descriptions`.
///
/// To override the contents of this collection use [`set_caption_descriptions`](Self::set_caption_descriptions).
///
/// This object holds groups of settings related to captions for one output. For each output that has captions, include one instance of CaptionDescriptions.
pub fn caption_descriptions(
mut self,
input: crate::model::CaptionDescriptionPreset,
) -> Self {
let mut v = self.caption_descriptions.unwrap_or_default();
v.push(input);
self.caption_descriptions = Some(v);
self
}
/// This object holds groups of settings related to captions for one output. For each output that has captions, include one instance of CaptionDescriptions.
pub fn set_caption_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CaptionDescriptionPreset>>,
) -> Self {
self.caption_descriptions = input;
self
}
/// Container specific settings.
pub fn container_settings(mut self, input: crate::model::ContainerSettings) -> Self {
self.container_settings = Some(input);
self
}
/// Container specific settings.
pub fn set_container_settings(
mut self,
input: std::option::Option<crate::model::ContainerSettings>,
) -> Self {
self.container_settings = input;
self
}
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub fn video_description(mut self, input: crate::model::VideoDescription) -> Self {
self.video_description = Some(input);
self
}
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub fn set_video_description(
mut self,
input: std::option::Option<crate::model::VideoDescription>,
) -> Self {
self.video_description = input;
self
}
/// Consumes the builder and constructs a [`PresetSettings`](crate::model::PresetSettings)
pub fn build(self) -> crate::model::PresetSettings {
crate::model::PresetSettings {
audio_descriptions: self.audio_descriptions,
caption_descriptions: self.caption_descriptions,
container_settings: self.container_settings,
video_description: self.video_description,
}
}
}
}
impl PresetSettings {
/// Creates a new builder-style object to manufacture [`PresetSettings`](crate::model::PresetSettings)
pub fn builder() -> crate::model::preset_settings::Builder {
crate::model::preset_settings::Builder::default()
}
}
/// Settings related to video encoding of your output. The specific video settings depend on the video codec that you choose. When you work directly in your JSON job specification, include one instance of Video description (VideoDescription) per output.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VideoDescription {
/// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling (AfdSignaling) to specify whether the service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
pub afd_signaling: std::option::Option<crate::model::AfdSignaling>,
/// The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
pub anti_alias: std::option::Option<crate::model::AntiAlias>,
/// Video codec settings, (CodecSettings) under (VideoDescription), contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec (Codec). For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
pub codec_settings: std::option::Option<crate::model::VideoCodecSettings>,
/// Choose Insert (INSERT) for this setting to include color metadata in this output. Choose Ignore (IGNORE) to exclude color metadata from this output. If you don't specify a value, the service sets this to Insert by default.
pub color_metadata: std::option::Option<crate::model::ColorMetadata>,
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame.
pub crop: std::option::Option<crate::model::Rectangle>,
/// Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is enabled by default when Timecode insertion (TimecodeInsertion) is enabled.
pub drop_frame_timecode: std::option::Option<crate::model::DropFrameTimecode>,
/// Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED). Use Fixed (FixedAfd) to specify a four-bit AFD value which the service will write on all frames of this video output.
pub fixed_afd: i32,
/// Use the Height (Height) setting to define the video resolution height for this output. Specify in pixels. If you don't provide a value here, the service will use the input height.
pub height: i32,
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black.
pub position: std::option::Option<crate::model::Rectangle>,
/// Use Respond to AFD (RespondToAfd) to specify how the service changes the video itself in response to AFD values in the input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling is set to (NONE). A preferred implementation of this workflow is to set RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values from this output.
pub respond_to_afd: std::option::Option<crate::model::RespondToAfd>,
/// Specify how the service handles outputs that have a different aspect ratio from the input aspect ratio. Choose Stretch to output (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit. Keep the setting Default (DEFAULT) to have the service letterbox your video instead. This setting overrides any value that you specify for the setting Selection placement (position) in this output.
pub scaling_behavior: std::option::Option<crate::model::ScalingBehavior>,
/// Use Sharpness (Sharpness) setting to specify the strength of anti-aliasing. This setting changes the width of the anti-alias filter kernel used for scaling. Sharpness only applies if your output resolution is different from your input resolution. 0 is the softest setting, 100 the sharpest, and 50 recommended for most content.
pub sharpness: i32,
/// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set the timecode for the first output frame to zero. To change this default behavior, adjust the settings under Timecode configuration (TimecodeConfig). In the console, these settings are located under Job > Job settings > Timecode configuration. Note - Timecode source under input settings (InputTimecodeSource) does not affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration (TimecodeSource) does.
pub timecode_insertion: std::option::Option<crate::model::VideoTimecodeInsertion>,
/// Find additional transcoding features under Preprocessors (VideoPreprocessors). Enable the features at each output individually. These features are disabled by default.
pub video_preprocessors: std::option::Option<crate::model::VideoPreprocessor>,
/// Use Width (Width) to define the video resolution width, in pixels, for this output. If you don't provide a value here, the service will use the input width.
pub width: i32,
}
impl VideoDescription {
/// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling (AfdSignaling) to specify whether the service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
pub fn afd_signaling(&self) -> std::option::Option<&crate::model::AfdSignaling> {
self.afd_signaling.as_ref()
}
/// The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
pub fn anti_alias(&self) -> std::option::Option<&crate::model::AntiAlias> {
self.anti_alias.as_ref()
}
/// Video codec settings, (CodecSettings) under (VideoDescription), contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec (Codec). For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
pub fn codec_settings(&self) -> std::option::Option<&crate::model::VideoCodecSettings> {
self.codec_settings.as_ref()
}
/// Choose Insert (INSERT) for this setting to include color metadata in this output. Choose Ignore (IGNORE) to exclude color metadata from this output. If you don't specify a value, the service sets this to Insert by default.
pub fn color_metadata(&self) -> std::option::Option<&crate::model::ColorMetadata> {
self.color_metadata.as_ref()
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame.
pub fn crop(&self) -> std::option::Option<&crate::model::Rectangle> {
self.crop.as_ref()
}
/// Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is enabled by default when Timecode insertion (TimecodeInsertion) is enabled.
pub fn drop_frame_timecode(&self) -> std::option::Option<&crate::model::DropFrameTimecode> {
self.drop_frame_timecode.as_ref()
}
/// Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED). Use Fixed (FixedAfd) to specify a four-bit AFD value which the service will write on all frames of this video output.
pub fn fixed_afd(&self) -> i32 {
self.fixed_afd
}
/// Use the Height (Height) setting to define the video resolution height for this output. Specify in pixels. If you don't provide a value here, the service will use the input height.
pub fn height(&self) -> i32 {
self.height
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black.
pub fn position(&self) -> std::option::Option<&crate::model::Rectangle> {
self.position.as_ref()
}
/// Use Respond to AFD (RespondToAfd) to specify how the service changes the video itself in response to AFD values in the input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling is set to (NONE). A preferred implementation of this workflow is to set RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values from this output.
pub fn respond_to_afd(&self) -> std::option::Option<&crate::model::RespondToAfd> {
self.respond_to_afd.as_ref()
}
/// Specify how the service handles outputs that have a different aspect ratio from the input aspect ratio. Choose Stretch to output (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit. Keep the setting Default (DEFAULT) to have the service letterbox your video instead. This setting overrides any value that you specify for the setting Selection placement (position) in this output.
pub fn scaling_behavior(&self) -> std::option::Option<&crate::model::ScalingBehavior> {
self.scaling_behavior.as_ref()
}
/// Use Sharpness (Sharpness) setting to specify the strength of anti-aliasing. This setting changes the width of the anti-alias filter kernel used for scaling. Sharpness only applies if your output resolution is different from your input resolution. 0 is the softest setting, 100 the sharpest, and 50 recommended for most content.
pub fn sharpness(&self) -> i32 {
self.sharpness
}
/// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set the timecode for the first output frame to zero. To change this default behavior, adjust the settings under Timecode configuration (TimecodeConfig). In the console, these settings are located under Job > Job settings > Timecode configuration. Note - Timecode source under input settings (InputTimecodeSource) does not affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration (TimecodeSource) does.
pub fn timecode_insertion(&self) -> std::option::Option<&crate::model::VideoTimecodeInsertion> {
self.timecode_insertion.as_ref()
}
/// Find additional transcoding features under Preprocessors (VideoPreprocessors). Enable the features at each output individually. These features are disabled by default.
pub fn video_preprocessors(&self) -> std::option::Option<&crate::model::VideoPreprocessor> {
self.video_preprocessors.as_ref()
}
/// Use Width (Width) to define the video resolution width, in pixels, for this output. If you don't provide a value here, the service will use the input width.
pub fn width(&self) -> i32 {
self.width
}
}
impl std::fmt::Debug for VideoDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VideoDescription");
formatter.field("afd_signaling", &self.afd_signaling);
formatter.field("anti_alias", &self.anti_alias);
formatter.field("codec_settings", &self.codec_settings);
formatter.field("color_metadata", &self.color_metadata);
formatter.field("crop", &self.crop);
formatter.field("drop_frame_timecode", &self.drop_frame_timecode);
formatter.field("fixed_afd", &self.fixed_afd);
formatter.field("height", &self.height);
formatter.field("position", &self.position);
formatter.field("respond_to_afd", &self.respond_to_afd);
formatter.field("scaling_behavior", &self.scaling_behavior);
formatter.field("sharpness", &self.sharpness);
formatter.field("timecode_insertion", &self.timecode_insertion);
formatter.field("video_preprocessors", &self.video_preprocessors);
formatter.field("width", &self.width);
formatter.finish()
}
}
/// See [`VideoDescription`](crate::model::VideoDescription)
pub mod video_description {
/// A builder for [`VideoDescription`](crate::model::VideoDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) afd_signaling: std::option::Option<crate::model::AfdSignaling>,
pub(crate) anti_alias: std::option::Option<crate::model::AntiAlias>,
pub(crate) codec_settings: std::option::Option<crate::model::VideoCodecSettings>,
pub(crate) color_metadata: std::option::Option<crate::model::ColorMetadata>,
pub(crate) crop: std::option::Option<crate::model::Rectangle>,
pub(crate) drop_frame_timecode: std::option::Option<crate::model::DropFrameTimecode>,
pub(crate) fixed_afd: std::option::Option<i32>,
pub(crate) height: std::option::Option<i32>,
pub(crate) position: std::option::Option<crate::model::Rectangle>,
pub(crate) respond_to_afd: std::option::Option<crate::model::RespondToAfd>,
pub(crate) scaling_behavior: std::option::Option<crate::model::ScalingBehavior>,
pub(crate) sharpness: std::option::Option<i32>,
pub(crate) timecode_insertion: std::option::Option<crate::model::VideoTimecodeInsertion>,
pub(crate) video_preprocessors: std::option::Option<crate::model::VideoPreprocessor>,
pub(crate) width: std::option::Option<i32>,
}
impl Builder {
/// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling (AfdSignaling) to specify whether the service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
pub fn afd_signaling(mut self, input: crate::model::AfdSignaling) -> Self {
self.afd_signaling = Some(input);
self
}
/// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling (AfdSignaling) to specify whether the service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
pub fn set_afd_signaling(
mut self,
input: std::option::Option<crate::model::AfdSignaling>,
) -> Self {
self.afd_signaling = input;
self
}
/// The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
pub fn anti_alias(mut self, input: crate::model::AntiAlias) -> Self {
self.anti_alias = Some(input);
self
}
/// The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
pub fn set_anti_alias(
mut self,
input: std::option::Option<crate::model::AntiAlias>,
) -> Self {
self.anti_alias = input;
self
}
/// Video codec settings, (CodecSettings) under (VideoDescription), contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec (Codec). For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
pub fn codec_settings(mut self, input: crate::model::VideoCodecSettings) -> Self {
self.codec_settings = Some(input);
self
}
/// Video codec settings, (CodecSettings) under (VideoDescription), contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec (Codec). For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
pub fn set_codec_settings(
mut self,
input: std::option::Option<crate::model::VideoCodecSettings>,
) -> Self {
self.codec_settings = input;
self
}
/// Choose Insert (INSERT) for this setting to include color metadata in this output. Choose Ignore (IGNORE) to exclude color metadata from this output. If you don't specify a value, the service sets this to Insert by default.
pub fn color_metadata(mut self, input: crate::model::ColorMetadata) -> Self {
self.color_metadata = Some(input);
self
}
/// Choose Insert (INSERT) for this setting to include color metadata in this output. Choose Ignore (IGNORE) to exclude color metadata from this output. If you don't specify a value, the service sets this to Insert by default.
pub fn set_color_metadata(
mut self,
input: std::option::Option<crate::model::ColorMetadata>,
) -> Self {
self.color_metadata = input;
self
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame.
pub fn crop(mut self, input: crate::model::Rectangle) -> Self {
self.crop = Some(input);
self
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame.
pub fn set_crop(mut self, input: std::option::Option<crate::model::Rectangle>) -> Self {
self.crop = input;
self
}
/// Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is enabled by default when Timecode insertion (TimecodeInsertion) is enabled.
pub fn drop_frame_timecode(mut self, input: crate::model::DropFrameTimecode) -> Self {
self.drop_frame_timecode = Some(input);
self
}
/// Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is enabled by default when Timecode insertion (TimecodeInsertion) is enabled.
pub fn set_drop_frame_timecode(
mut self,
input: std::option::Option<crate::model::DropFrameTimecode>,
) -> Self {
self.drop_frame_timecode = input;
self
}
/// Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED). Use Fixed (FixedAfd) to specify a four-bit AFD value which the service will write on all frames of this video output.
pub fn fixed_afd(mut self, input: i32) -> Self {
self.fixed_afd = Some(input);
self
}
/// Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED). Use Fixed (FixedAfd) to specify a four-bit AFD value which the service will write on all frames of this video output.
pub fn set_fixed_afd(mut self, input: std::option::Option<i32>) -> Self {
self.fixed_afd = input;
self
}
/// Use the Height (Height) setting to define the video resolution height for this output. Specify in pixels. If you don't provide a value here, the service will use the input height.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Use the Height (Height) setting to define the video resolution height for this output. Specify in pixels. If you don't provide a value here, the service will use the input height.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black.
pub fn position(mut self, input: crate::model::Rectangle) -> Self {
self.position = Some(input);
self
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black.
pub fn set_position(mut self, input: std::option::Option<crate::model::Rectangle>) -> Self {
self.position = input;
self
}
/// Use Respond to AFD (RespondToAfd) to specify how the service changes the video itself in response to AFD values in the input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling is set to (NONE). A preferred implementation of this workflow is to set RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values from this output.
pub fn respond_to_afd(mut self, input: crate::model::RespondToAfd) -> Self {
self.respond_to_afd = Some(input);
self
}
/// Use Respond to AFD (RespondToAfd) to specify how the service changes the video itself in response to AFD values in the input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling is set to (NONE). A preferred implementation of this workflow is to set RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values from this output.
pub fn set_respond_to_afd(
mut self,
input: std::option::Option<crate::model::RespondToAfd>,
) -> Self {
self.respond_to_afd = input;
self
}
/// Specify how the service handles outputs that have a different aspect ratio from the input aspect ratio. Choose Stretch to output (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit. Keep the setting Default (DEFAULT) to have the service letterbox your video instead. This setting overrides any value that you specify for the setting Selection placement (position) in this output.
pub fn scaling_behavior(mut self, input: crate::model::ScalingBehavior) -> Self {
self.scaling_behavior = Some(input);
self
}
/// Specify how the service handles outputs that have a different aspect ratio from the input aspect ratio. Choose Stretch to output (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit. Keep the setting Default (DEFAULT) to have the service letterbox your video instead. This setting overrides any value that you specify for the setting Selection placement (position) in this output.
pub fn set_scaling_behavior(
mut self,
input: std::option::Option<crate::model::ScalingBehavior>,
) -> Self {
self.scaling_behavior = input;
self
}
/// Use Sharpness (Sharpness) setting to specify the strength of anti-aliasing. This setting changes the width of the anti-alias filter kernel used for scaling. Sharpness only applies if your output resolution is different from your input resolution. 0 is the softest setting, 100 the sharpest, and 50 recommended for most content.
pub fn sharpness(mut self, input: i32) -> Self {
self.sharpness = Some(input);
self
}
/// Use Sharpness (Sharpness) setting to specify the strength of anti-aliasing. This setting changes the width of the anti-alias filter kernel used for scaling. Sharpness only applies if your output resolution is different from your input resolution. 0 is the softest setting, 100 the sharpest, and 50 recommended for most content.
pub fn set_sharpness(mut self, input: std::option::Option<i32>) -> Self {
self.sharpness = input;
self
}
/// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set the timecode for the first output frame to zero. To change this default behavior, adjust the settings under Timecode configuration (TimecodeConfig). In the console, these settings are located under Job > Job settings > Timecode configuration. Note - Timecode source under input settings (InputTimecodeSource) does not affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration (TimecodeSource) does.
pub fn timecode_insertion(mut self, input: crate::model::VideoTimecodeInsertion) -> Self {
self.timecode_insertion = Some(input);
self
}
/// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set the timecode for the first output frame to zero. To change this default behavior, adjust the settings under Timecode configuration (TimecodeConfig). In the console, these settings are located under Job > Job settings > Timecode configuration. Note - Timecode source under input settings (InputTimecodeSource) does not affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration (TimecodeSource) does.
pub fn set_timecode_insertion(
mut self,
input: std::option::Option<crate::model::VideoTimecodeInsertion>,
) -> Self {
self.timecode_insertion = input;
self
}
/// Find additional transcoding features under Preprocessors (VideoPreprocessors). Enable the features at each output individually. These features are disabled by default.
pub fn video_preprocessors(mut self, input: crate::model::VideoPreprocessor) -> Self {
self.video_preprocessors = Some(input);
self
}
/// Find additional transcoding features under Preprocessors (VideoPreprocessors). Enable the features at each output individually. These features are disabled by default.
pub fn set_video_preprocessors(
mut self,
input: std::option::Option<crate::model::VideoPreprocessor>,
) -> Self {
self.video_preprocessors = input;
self
}
/// Use Width (Width) to define the video resolution width, in pixels, for this output. If you don't provide a value here, the service will use the input width.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Use Width (Width) to define the video resolution width, in pixels, for this output. If you don't provide a value here, the service will use the input width.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Consumes the builder and constructs a [`VideoDescription`](crate::model::VideoDescription)
pub fn build(self) -> crate::model::VideoDescription {
crate::model::VideoDescription {
afd_signaling: self.afd_signaling,
anti_alias: self.anti_alias,
codec_settings: self.codec_settings,
color_metadata: self.color_metadata,
crop: self.crop,
drop_frame_timecode: self.drop_frame_timecode,
fixed_afd: self.fixed_afd.unwrap_or_default(),
height: self.height.unwrap_or_default(),
position: self.position,
respond_to_afd: self.respond_to_afd,
scaling_behavior: self.scaling_behavior,
sharpness: self.sharpness.unwrap_or_default(),
timecode_insertion: self.timecode_insertion,
video_preprocessors: self.video_preprocessors,
width: self.width.unwrap_or_default(),
}
}
}
}
impl VideoDescription {
/// Creates a new builder-style object to manufacture [`VideoDescription`](crate::model::VideoDescription)
pub fn builder() -> crate::model::video_description::Builder {
crate::model::video_description::Builder::default()
}
}
/// Find additional transcoding features under Preprocessors (VideoPreprocessors). Enable the features at each output individually. These features are disabled by default.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VideoPreprocessor {
/// Use these settings to convert the color space or to modify properties such as hue and contrast for this output. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/converting-the-color-space.html.
pub color_corrector: std::option::Option<crate::model::ColorCorrector>,
/// Use the deinterlacer to produce smoother motion and a clearer picture. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-scan-type.html.
pub deinterlacer: std::option::Option<crate::model::Deinterlacer>,
/// Enable Dolby Vision feature to produce Dolby Vision compatible video output.
pub dolby_vision: std::option::Option<crate::model::DolbyVision>,
/// Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
pub hdr10_plus: std::option::Option<crate::model::Hdr10Plus>,
/// Enable the Image inserter (ImageInserter) feature to include a graphic overlay on your video. Enable or disable this feature for each output individually. This setting is disabled by default.
pub image_inserter: std::option::Option<crate::model::ImageInserter>,
/// Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default.
pub noise_reducer: std::option::Option<crate::model::NoiseReducer>,
/// If you work with a third party video watermarking partner, use the group of settings that correspond with your watermarking partner to include watermarks in your output.
pub partner_watermarking: std::option::Option<crate::model::PartnerWatermarking>,
/// Settings for burning the output timecode and specified prefix into the output.
pub timecode_burnin: std::option::Option<crate::model::TimecodeBurnin>,
}
impl VideoPreprocessor {
/// Use these settings to convert the color space or to modify properties such as hue and contrast for this output. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/converting-the-color-space.html.
pub fn color_corrector(&self) -> std::option::Option<&crate::model::ColorCorrector> {
self.color_corrector.as_ref()
}
/// Use the deinterlacer to produce smoother motion and a clearer picture. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-scan-type.html.
pub fn deinterlacer(&self) -> std::option::Option<&crate::model::Deinterlacer> {
self.deinterlacer.as_ref()
}
/// Enable Dolby Vision feature to produce Dolby Vision compatible video output.
pub fn dolby_vision(&self) -> std::option::Option<&crate::model::DolbyVision> {
self.dolby_vision.as_ref()
}
/// Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
pub fn hdr10_plus(&self) -> std::option::Option<&crate::model::Hdr10Plus> {
self.hdr10_plus.as_ref()
}
/// Enable the Image inserter (ImageInserter) feature to include a graphic overlay on your video. Enable or disable this feature for each output individually. This setting is disabled by default.
pub fn image_inserter(&self) -> std::option::Option<&crate::model::ImageInserter> {
self.image_inserter.as_ref()
}
/// Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default.
pub fn noise_reducer(&self) -> std::option::Option<&crate::model::NoiseReducer> {
self.noise_reducer.as_ref()
}
/// If you work with a third party video watermarking partner, use the group of settings that correspond with your watermarking partner to include watermarks in your output.
pub fn partner_watermarking(&self) -> std::option::Option<&crate::model::PartnerWatermarking> {
self.partner_watermarking.as_ref()
}
/// Settings for burning the output timecode and specified prefix into the output.
pub fn timecode_burnin(&self) -> std::option::Option<&crate::model::TimecodeBurnin> {
self.timecode_burnin.as_ref()
}
}
impl std::fmt::Debug for VideoPreprocessor {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VideoPreprocessor");
formatter.field("color_corrector", &self.color_corrector);
formatter.field("deinterlacer", &self.deinterlacer);
formatter.field("dolby_vision", &self.dolby_vision);
formatter.field("hdr10_plus", &self.hdr10_plus);
formatter.field("image_inserter", &self.image_inserter);
formatter.field("noise_reducer", &self.noise_reducer);
formatter.field("partner_watermarking", &self.partner_watermarking);
formatter.field("timecode_burnin", &self.timecode_burnin);
formatter.finish()
}
}
/// See [`VideoPreprocessor`](crate::model::VideoPreprocessor)
pub mod video_preprocessor {
/// A builder for [`VideoPreprocessor`](crate::model::VideoPreprocessor)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) color_corrector: std::option::Option<crate::model::ColorCorrector>,
pub(crate) deinterlacer: std::option::Option<crate::model::Deinterlacer>,
pub(crate) dolby_vision: std::option::Option<crate::model::DolbyVision>,
pub(crate) hdr10_plus: std::option::Option<crate::model::Hdr10Plus>,
pub(crate) image_inserter: std::option::Option<crate::model::ImageInserter>,
pub(crate) noise_reducer: std::option::Option<crate::model::NoiseReducer>,
pub(crate) partner_watermarking: std::option::Option<crate::model::PartnerWatermarking>,
pub(crate) timecode_burnin: std::option::Option<crate::model::TimecodeBurnin>,
}
impl Builder {
/// Use these settings to convert the color space or to modify properties such as hue and contrast for this output. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/converting-the-color-space.html.
pub fn color_corrector(mut self, input: crate::model::ColorCorrector) -> Self {
self.color_corrector = Some(input);
self
}
/// Use these settings to convert the color space or to modify properties such as hue and contrast for this output. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/converting-the-color-space.html.
pub fn set_color_corrector(
mut self,
input: std::option::Option<crate::model::ColorCorrector>,
) -> Self {
self.color_corrector = input;
self
}
/// Use the deinterlacer to produce smoother motion and a clearer picture. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-scan-type.html.
pub fn deinterlacer(mut self, input: crate::model::Deinterlacer) -> Self {
self.deinterlacer = Some(input);
self
}
/// Use the deinterlacer to produce smoother motion and a clearer picture. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-scan-type.html.
pub fn set_deinterlacer(
mut self,
input: std::option::Option<crate::model::Deinterlacer>,
) -> Self {
self.deinterlacer = input;
self
}
/// Enable Dolby Vision feature to produce Dolby Vision compatible video output.
pub fn dolby_vision(mut self, input: crate::model::DolbyVision) -> Self {
self.dolby_vision = Some(input);
self
}
/// Enable Dolby Vision feature to produce Dolby Vision compatible video output.
pub fn set_dolby_vision(
mut self,
input: std::option::Option<crate::model::DolbyVision>,
) -> Self {
self.dolby_vision = input;
self
}
/// Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
pub fn hdr10_plus(mut self, input: crate::model::Hdr10Plus) -> Self {
self.hdr10_plus = Some(input);
self
}
/// Enable HDR10+ analyis and metadata injection. Compatible with HEVC only.
pub fn set_hdr10_plus(
mut self,
input: std::option::Option<crate::model::Hdr10Plus>,
) -> Self {
self.hdr10_plus = input;
self
}
/// Enable the Image inserter (ImageInserter) feature to include a graphic overlay on your video. Enable or disable this feature for each output individually. This setting is disabled by default.
pub fn image_inserter(mut self, input: crate::model::ImageInserter) -> Self {
self.image_inserter = Some(input);
self
}
/// Enable the Image inserter (ImageInserter) feature to include a graphic overlay on your video. Enable or disable this feature for each output individually. This setting is disabled by default.
pub fn set_image_inserter(
mut self,
input: std::option::Option<crate::model::ImageInserter>,
) -> Self {
self.image_inserter = input;
self
}
/// Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default.
pub fn noise_reducer(mut self, input: crate::model::NoiseReducer) -> Self {
self.noise_reducer = Some(input);
self
}
/// Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default.
pub fn set_noise_reducer(
mut self,
input: std::option::Option<crate::model::NoiseReducer>,
) -> Self {
self.noise_reducer = input;
self
}
/// If you work with a third party video watermarking partner, use the group of settings that correspond with your watermarking partner to include watermarks in your output.
pub fn partner_watermarking(mut self, input: crate::model::PartnerWatermarking) -> Self {
self.partner_watermarking = Some(input);
self
}
/// If you work with a third party video watermarking partner, use the group of settings that correspond with your watermarking partner to include watermarks in your output.
pub fn set_partner_watermarking(
mut self,
input: std::option::Option<crate::model::PartnerWatermarking>,
) -> Self {
self.partner_watermarking = input;
self
}
/// Settings for burning the output timecode and specified prefix into the output.
pub fn timecode_burnin(mut self, input: crate::model::TimecodeBurnin) -> Self {
self.timecode_burnin = Some(input);
self
}
/// Settings for burning the output timecode and specified prefix into the output.
pub fn set_timecode_burnin(
mut self,
input: std::option::Option<crate::model::TimecodeBurnin>,
) -> Self {
self.timecode_burnin = input;
self
}
/// Consumes the builder and constructs a [`VideoPreprocessor`](crate::model::VideoPreprocessor)
pub fn build(self) -> crate::model::VideoPreprocessor {
crate::model::VideoPreprocessor {
color_corrector: self.color_corrector,
deinterlacer: self.deinterlacer,
dolby_vision: self.dolby_vision,
hdr10_plus: self.hdr10_plus,
image_inserter: self.image_inserter,
noise_reducer: self.noise_reducer,
partner_watermarking: self.partner_watermarking,
timecode_burnin: self.timecode_burnin,
}
}
}
}
impl VideoPreprocessor {
/// Creates a new builder-style object to manufacture [`VideoPreprocessor`](crate::model::VideoPreprocessor)
pub fn builder() -> crate::model::video_preprocessor::Builder {
crate::model::video_preprocessor::Builder::default()
}
}
/// Settings for burning the output timecode and specified prefix into the output.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TimecodeBurnin {
/// Use Font Size (FontSize) to set the font size of any burned-in timecode. Valid values are 10, 16, 32, 48.
pub font_size: i32,
/// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to specify the location the burned-in timecode on output video.
pub position: std::option::Option<crate::model::TimecodeBurninPosition>,
/// Use Prefix (Prefix) to place ASCII characters before any burned-in timecode. For example, a prefix of "EZ-" will result in the timecode "EZ-00:00:00:00". Provide either the characters themselves or the ASCII code equivalents. The supported range of characters is 0x20 through 0x7e. This includes letters, numbers, and all special characters represented on a standard English keyboard.
pub prefix: std::option::Option<std::string::String>,
}
impl TimecodeBurnin {
/// Use Font Size (FontSize) to set the font size of any burned-in timecode. Valid values are 10, 16, 32, 48.
pub fn font_size(&self) -> i32 {
self.font_size
}
/// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to specify the location the burned-in timecode on output video.
pub fn position(&self) -> std::option::Option<&crate::model::TimecodeBurninPosition> {
self.position.as_ref()
}
/// Use Prefix (Prefix) to place ASCII characters before any burned-in timecode. For example, a prefix of "EZ-" will result in the timecode "EZ-00:00:00:00". Provide either the characters themselves or the ASCII code equivalents. The supported range of characters is 0x20 through 0x7e. This includes letters, numbers, and all special characters represented on a standard English keyboard.
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
}
impl std::fmt::Debug for TimecodeBurnin {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TimecodeBurnin");
formatter.field("font_size", &self.font_size);
formatter.field("position", &self.position);
formatter.field("prefix", &self.prefix);
formatter.finish()
}
}
/// See [`TimecodeBurnin`](crate::model::TimecodeBurnin)
pub mod timecode_burnin {
/// A builder for [`TimecodeBurnin`](crate::model::TimecodeBurnin)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) font_size: std::option::Option<i32>,
pub(crate) position: std::option::Option<crate::model::TimecodeBurninPosition>,
pub(crate) prefix: std::option::Option<std::string::String>,
}
impl Builder {
/// Use Font Size (FontSize) to set the font size of any burned-in timecode. Valid values are 10, 16, 32, 48.
pub fn font_size(mut self, input: i32) -> Self {
self.font_size = Some(input);
self
}
/// Use Font Size (FontSize) to set the font size of any burned-in timecode. Valid values are 10, 16, 32, 48.
pub fn set_font_size(mut self, input: std::option::Option<i32>) -> Self {
self.font_size = input;
self
}
/// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to specify the location the burned-in timecode on output video.
pub fn position(mut self, input: crate::model::TimecodeBurninPosition) -> Self {
self.position = Some(input);
self
}
/// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to specify the location the burned-in timecode on output video.
pub fn set_position(
mut self,
input: std::option::Option<crate::model::TimecodeBurninPosition>,
) -> Self {
self.position = input;
self
}
/// Use Prefix (Prefix) to place ASCII characters before any burned-in timecode. For example, a prefix of "EZ-" will result in the timecode "EZ-00:00:00:00". Provide either the characters themselves or the ASCII code equivalents. The supported range of characters is 0x20 through 0x7e. This includes letters, numbers, and all special characters represented on a standard English keyboard.
pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.prefix = Some(input.into());
self
}
/// Use Prefix (Prefix) to place ASCII characters before any burned-in timecode. For example, a prefix of "EZ-" will result in the timecode "EZ-00:00:00:00". Provide either the characters themselves or the ASCII code equivalents. The supported range of characters is 0x20 through 0x7e. This includes letters, numbers, and all special characters represented on a standard English keyboard.
pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.prefix = input;
self
}
/// Consumes the builder and constructs a [`TimecodeBurnin`](crate::model::TimecodeBurnin)
pub fn build(self) -> crate::model::TimecodeBurnin {
crate::model::TimecodeBurnin {
font_size: self.font_size.unwrap_or_default(),
position: self.position,
prefix: self.prefix,
}
}
}
}
impl TimecodeBurnin {
/// Creates a new builder-style object to manufacture [`TimecodeBurnin`](crate::model::TimecodeBurnin)
pub fn builder() -> crate::model::timecode_burnin::Builder {
crate::model::timecode_burnin::Builder::default()
}
}
/// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to specify the location the burned-in timecode on output video.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TimecodeBurninPosition {
#[allow(missing_docs)] // documentation missing in model
BottomCenter,
#[allow(missing_docs)] // documentation missing in model
BottomLeft,
#[allow(missing_docs)] // documentation missing in model
BottomRight,
#[allow(missing_docs)] // documentation missing in model
MiddleCenter,
#[allow(missing_docs)] // documentation missing in model
MiddleLeft,
#[allow(missing_docs)] // documentation missing in model
MiddleRight,
#[allow(missing_docs)] // documentation missing in model
TopCenter,
#[allow(missing_docs)] // documentation missing in model
TopLeft,
#[allow(missing_docs)] // documentation missing in model
TopRight,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for TimecodeBurninPosition {
fn from(s: &str) -> Self {
match s {
"BOTTOM_CENTER" => TimecodeBurninPosition::BottomCenter,
"BOTTOM_LEFT" => TimecodeBurninPosition::BottomLeft,
"BOTTOM_RIGHT" => TimecodeBurninPosition::BottomRight,
"MIDDLE_CENTER" => TimecodeBurninPosition::MiddleCenter,
"MIDDLE_LEFT" => TimecodeBurninPosition::MiddleLeft,
"MIDDLE_RIGHT" => TimecodeBurninPosition::MiddleRight,
"TOP_CENTER" => TimecodeBurninPosition::TopCenter,
"TOP_LEFT" => TimecodeBurninPosition::TopLeft,
"TOP_RIGHT" => TimecodeBurninPosition::TopRight,
other => TimecodeBurninPosition::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TimecodeBurninPosition {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TimecodeBurninPosition::from(s))
}
}
impl TimecodeBurninPosition {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TimecodeBurninPosition::BottomCenter => "BOTTOM_CENTER",
TimecodeBurninPosition::BottomLeft => "BOTTOM_LEFT",
TimecodeBurninPosition::BottomRight => "BOTTOM_RIGHT",
TimecodeBurninPosition::MiddleCenter => "MIDDLE_CENTER",
TimecodeBurninPosition::MiddleLeft => "MIDDLE_LEFT",
TimecodeBurninPosition::MiddleRight => "MIDDLE_RIGHT",
TimecodeBurninPosition::TopCenter => "TOP_CENTER",
TimecodeBurninPosition::TopLeft => "TOP_LEFT",
TimecodeBurninPosition::TopRight => "TOP_RIGHT",
TimecodeBurninPosition::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_CENTER",
"BOTTOM_LEFT",
"BOTTOM_RIGHT",
"MIDDLE_CENTER",
"MIDDLE_LEFT",
"MIDDLE_RIGHT",
"TOP_CENTER",
"TOP_LEFT",
"TOP_RIGHT",
]
}
}
impl AsRef<str> for TimecodeBurninPosition {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you work with a third party video watermarking partner, use the group of settings that correspond with your watermarking partner to include watermarks in your output.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PartnerWatermarking {
/// For forensic video watermarking, MediaConvert supports Nagra NexGuard File Marker watermarking. MediaConvert supports both PreRelease Content (NGPR/G2) and OTT Streaming workflows.
pub nexguard_file_marker_settings:
std::option::Option<crate::model::NexGuardFileMarkerSettings>,
}
impl PartnerWatermarking {
/// For forensic video watermarking, MediaConvert supports Nagra NexGuard File Marker watermarking. MediaConvert supports both PreRelease Content (NGPR/G2) and OTT Streaming workflows.
pub fn nexguard_file_marker_settings(
&self,
) -> std::option::Option<&crate::model::NexGuardFileMarkerSettings> {
self.nexguard_file_marker_settings.as_ref()
}
}
impl std::fmt::Debug for PartnerWatermarking {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PartnerWatermarking");
formatter.field(
"nexguard_file_marker_settings",
&self.nexguard_file_marker_settings,
);
formatter.finish()
}
}
/// See [`PartnerWatermarking`](crate::model::PartnerWatermarking)
pub mod partner_watermarking {
/// A builder for [`PartnerWatermarking`](crate::model::PartnerWatermarking)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) nexguard_file_marker_settings:
std::option::Option<crate::model::NexGuardFileMarkerSettings>,
}
impl Builder {
/// For forensic video watermarking, MediaConvert supports Nagra NexGuard File Marker watermarking. MediaConvert supports both PreRelease Content (NGPR/G2) and OTT Streaming workflows.
pub fn nexguard_file_marker_settings(
mut self,
input: crate::model::NexGuardFileMarkerSettings,
) -> Self {
self.nexguard_file_marker_settings = Some(input);
self
}
/// For forensic video watermarking, MediaConvert supports Nagra NexGuard File Marker watermarking. MediaConvert supports both PreRelease Content (NGPR/G2) and OTT Streaming workflows.
pub fn set_nexguard_file_marker_settings(
mut self,
input: std::option::Option<crate::model::NexGuardFileMarkerSettings>,
) -> Self {
self.nexguard_file_marker_settings = input;
self
}
/// Consumes the builder and constructs a [`PartnerWatermarking`](crate::model::PartnerWatermarking)
pub fn build(self) -> crate::model::PartnerWatermarking {
crate::model::PartnerWatermarking {
nexguard_file_marker_settings: self.nexguard_file_marker_settings,
}
}
}
}
impl PartnerWatermarking {
/// Creates a new builder-style object to manufacture [`PartnerWatermarking`](crate::model::PartnerWatermarking)
pub fn builder() -> crate::model::partner_watermarking::Builder {
crate::model::partner_watermarking::Builder::default()
}
}
/// For forensic video watermarking, MediaConvert supports Nagra NexGuard File Marker watermarking. MediaConvert supports both PreRelease Content (NGPR/G2) and OTT Streaming workflows.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NexGuardFileMarkerSettings {
/// Use the base64 license string that Nagra provides you. Enter it directly in your JSON job specification or in the console. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub license: std::option::Option<std::string::String>,
/// Specify the payload ID that you want associated with this output. Valid values vary depending on your Nagra NexGuard forensic watermarking workflow. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job. For PreRelease Content (NGPR/G2), specify an integer from 1 through 4,194,303. You must generate a unique ID for each asset you watermark, and keep a record of which ID you have assigned to each asset. Neither Nagra nor MediaConvert keep track of the relationship between output files and your IDs. For OTT Streaming, create two adaptive bitrate (ABR) stacks for each asset. Do this by setting up two output groups. For one output group, set the value of Payload ID (payload) to 0 in every output. For the other output group, set Payload ID (payload) to 1 in every output.
pub payload: i32,
/// Enter one of the watermarking preset strings that Nagra provides you. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub preset: std::option::Option<std::string::String>,
/// Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value here, the Nagra NexGuard library uses its default value.
pub strength: std::option::Option<crate::model::WatermarkingStrength>,
}
impl NexGuardFileMarkerSettings {
/// Use the base64 license string that Nagra provides you. Enter it directly in your JSON job specification or in the console. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub fn license(&self) -> std::option::Option<&str> {
self.license.as_deref()
}
/// Specify the payload ID that you want associated with this output. Valid values vary depending on your Nagra NexGuard forensic watermarking workflow. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job. For PreRelease Content (NGPR/G2), specify an integer from 1 through 4,194,303. You must generate a unique ID for each asset you watermark, and keep a record of which ID you have assigned to each asset. Neither Nagra nor MediaConvert keep track of the relationship between output files and your IDs. For OTT Streaming, create two adaptive bitrate (ABR) stacks for each asset. Do this by setting up two output groups. For one output group, set the value of Payload ID (payload) to 0 in every output. For the other output group, set Payload ID (payload) to 1 in every output.
pub fn payload(&self) -> i32 {
self.payload
}
/// Enter one of the watermarking preset strings that Nagra provides you. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub fn preset(&self) -> std::option::Option<&str> {
self.preset.as_deref()
}
/// Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value here, the Nagra NexGuard library uses its default value.
pub fn strength(&self) -> std::option::Option<&crate::model::WatermarkingStrength> {
self.strength.as_ref()
}
}
impl std::fmt::Debug for NexGuardFileMarkerSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NexGuardFileMarkerSettings");
formatter.field("license", &self.license);
formatter.field("payload", &self.payload);
formatter.field("preset", &self.preset);
formatter.field("strength", &self.strength);
formatter.finish()
}
}
/// See [`NexGuardFileMarkerSettings`](crate::model::NexGuardFileMarkerSettings)
pub mod nex_guard_file_marker_settings {
/// A builder for [`NexGuardFileMarkerSettings`](crate::model::NexGuardFileMarkerSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) license: std::option::Option<std::string::String>,
pub(crate) payload: std::option::Option<i32>,
pub(crate) preset: std::option::Option<std::string::String>,
pub(crate) strength: std::option::Option<crate::model::WatermarkingStrength>,
}
impl Builder {
/// Use the base64 license string that Nagra provides you. Enter it directly in your JSON job specification or in the console. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub fn license(mut self, input: impl Into<std::string::String>) -> Self {
self.license = Some(input.into());
self
}
/// Use the base64 license string that Nagra provides you. Enter it directly in your JSON job specification or in the console. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub fn set_license(mut self, input: std::option::Option<std::string::String>) -> Self {
self.license = input;
self
}
/// Specify the payload ID that you want associated with this output. Valid values vary depending on your Nagra NexGuard forensic watermarking workflow. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job. For PreRelease Content (NGPR/G2), specify an integer from 1 through 4,194,303. You must generate a unique ID for each asset you watermark, and keep a record of which ID you have assigned to each asset. Neither Nagra nor MediaConvert keep track of the relationship between output files and your IDs. For OTT Streaming, create two adaptive bitrate (ABR) stacks for each asset. Do this by setting up two output groups. For one output group, set the value of Payload ID (payload) to 0 in every output. For the other output group, set Payload ID (payload) to 1 in every output.
pub fn payload(mut self, input: i32) -> Self {
self.payload = Some(input);
self
}
/// Specify the payload ID that you want associated with this output. Valid values vary depending on your Nagra NexGuard forensic watermarking workflow. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job. For PreRelease Content (NGPR/G2), specify an integer from 1 through 4,194,303. You must generate a unique ID for each asset you watermark, and keep a record of which ID you have assigned to each asset. Neither Nagra nor MediaConvert keep track of the relationship between output files and your IDs. For OTT Streaming, create two adaptive bitrate (ABR) stacks for each asset. Do this by setting up two output groups. For one output group, set the value of Payload ID (payload) to 0 in every output. For the other output group, set Payload ID (payload) to 1 in every output.
pub fn set_payload(mut self, input: std::option::Option<i32>) -> Self {
self.payload = input;
self
}
/// Enter one of the watermarking preset strings that Nagra provides you. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub fn preset(mut self, input: impl Into<std::string::String>) -> Self {
self.preset = Some(input.into());
self
}
/// Enter one of the watermarking preset strings that Nagra provides you. Required when you include Nagra NexGuard File Marker watermarking (NexGuardWatermarkingSettings) in your job.
pub fn set_preset(mut self, input: std::option::Option<std::string::String>) -> Self {
self.preset = input;
self
}
/// Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value here, the Nagra NexGuard library uses its default value.
pub fn strength(mut self, input: crate::model::WatermarkingStrength) -> Self {
self.strength = Some(input);
self
}
/// Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value here, the Nagra NexGuard library uses its default value.
pub fn set_strength(
mut self,
input: std::option::Option<crate::model::WatermarkingStrength>,
) -> Self {
self.strength = input;
self
}
/// Consumes the builder and constructs a [`NexGuardFileMarkerSettings`](crate::model::NexGuardFileMarkerSettings)
pub fn build(self) -> crate::model::NexGuardFileMarkerSettings {
crate::model::NexGuardFileMarkerSettings {
license: self.license,
payload: self.payload.unwrap_or_default(),
preset: self.preset,
strength: self.strength,
}
}
}
}
impl NexGuardFileMarkerSettings {
/// Creates a new builder-style object to manufacture [`NexGuardFileMarkerSettings`](crate::model::NexGuardFileMarkerSettings)
pub fn builder() -> crate::model::nex_guard_file_marker_settings::Builder {
crate::model::nex_guard_file_marker_settings::Builder::default()
}
}
/// Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value here, the Nagra NexGuard library uses its default value.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum WatermarkingStrength {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
Lighter,
#[allow(missing_docs)] // documentation missing in model
Lightest,
#[allow(missing_docs)] // documentation missing in model
Stronger,
#[allow(missing_docs)] // documentation missing in model
Strongest,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for WatermarkingStrength {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => WatermarkingStrength::Default,
"LIGHTER" => WatermarkingStrength::Lighter,
"LIGHTEST" => WatermarkingStrength::Lightest,
"STRONGER" => WatermarkingStrength::Stronger,
"STRONGEST" => WatermarkingStrength::Strongest,
other => WatermarkingStrength::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for WatermarkingStrength {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(WatermarkingStrength::from(s))
}
}
impl WatermarkingStrength {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
WatermarkingStrength::Default => "DEFAULT",
WatermarkingStrength::Lighter => "LIGHTER",
WatermarkingStrength::Lightest => "LIGHTEST",
WatermarkingStrength::Stronger => "STRONGER",
WatermarkingStrength::Strongest => "STRONGEST",
WatermarkingStrength::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "LIGHTER", "LIGHTEST", "STRONGER", "STRONGEST"]
}
}
impl AsRef<str> for WatermarkingStrength {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable the Noise reducer (NoiseReducer) feature to remove noise from your video output if necessary. Enable or disable this feature for each output individually. This setting is disabled by default. When you enable Noise reducer (NoiseReducer), you must also select a value for Noise reducer filter (NoiseReducerFilter).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NoiseReducer {
/// Use Noise reducer filter (NoiseReducerFilter) to select one of the following spatial image filtering functions. To use this setting, you must also enable Noise reducer (NoiseReducer). * Bilateral preserves edges while reducing noise. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) do convolution filtering. * Conserve does min/max noise reduction. * Spatial does frequency-domain filtering based on JND principles. * Temporal optimizes video quality for complex motion.
pub filter: std::option::Option<crate::model::NoiseReducerFilter>,
/// Settings for a noise reducer filter
pub filter_settings: std::option::Option<crate::model::NoiseReducerFilterSettings>,
/// Noise reducer filter settings for spatial filter.
pub spatial_filter_settings:
std::option::Option<crate::model::NoiseReducerSpatialFilterSettings>,
/// Noise reducer filter settings for temporal filter.
pub temporal_filter_settings:
std::option::Option<crate::model::NoiseReducerTemporalFilterSettings>,
}
impl NoiseReducer {
/// Use Noise reducer filter (NoiseReducerFilter) to select one of the following spatial image filtering functions. To use this setting, you must also enable Noise reducer (NoiseReducer). * Bilateral preserves edges while reducing noise. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) do convolution filtering. * Conserve does min/max noise reduction. * Spatial does frequency-domain filtering based on JND principles. * Temporal optimizes video quality for complex motion.
pub fn filter(&self) -> std::option::Option<&crate::model::NoiseReducerFilter> {
self.filter.as_ref()
}
/// Settings for a noise reducer filter
pub fn filter_settings(
&self,
) -> std::option::Option<&crate::model::NoiseReducerFilterSettings> {
self.filter_settings.as_ref()
}
/// Noise reducer filter settings for spatial filter.
pub fn spatial_filter_settings(
&self,
) -> std::option::Option<&crate::model::NoiseReducerSpatialFilterSettings> {
self.spatial_filter_settings.as_ref()
}
/// Noise reducer filter settings for temporal filter.
pub fn temporal_filter_settings(
&self,
) -> std::option::Option<&crate::model::NoiseReducerTemporalFilterSettings> {
self.temporal_filter_settings.as_ref()
}
}
impl std::fmt::Debug for NoiseReducer {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NoiseReducer");
formatter.field("filter", &self.filter);
formatter.field("filter_settings", &self.filter_settings);
formatter.field("spatial_filter_settings", &self.spatial_filter_settings);
formatter.field("temporal_filter_settings", &self.temporal_filter_settings);
formatter.finish()
}
}
/// See [`NoiseReducer`](crate::model::NoiseReducer)
pub mod noise_reducer {
/// A builder for [`NoiseReducer`](crate::model::NoiseReducer)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::NoiseReducerFilter>,
pub(crate) filter_settings: std::option::Option<crate::model::NoiseReducerFilterSettings>,
pub(crate) spatial_filter_settings:
std::option::Option<crate::model::NoiseReducerSpatialFilterSettings>,
pub(crate) temporal_filter_settings:
std::option::Option<crate::model::NoiseReducerTemporalFilterSettings>,
}
impl Builder {
/// Use Noise reducer filter (NoiseReducerFilter) to select one of the following spatial image filtering functions. To use this setting, you must also enable Noise reducer (NoiseReducer). * Bilateral preserves edges while reducing noise. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) do convolution filtering. * Conserve does min/max noise reduction. * Spatial does frequency-domain filtering based on JND principles. * Temporal optimizes video quality for complex motion.
pub fn filter(mut self, input: crate::model::NoiseReducerFilter) -> Self {
self.filter = Some(input);
self
}
/// Use Noise reducer filter (NoiseReducerFilter) to select one of the following spatial image filtering functions. To use this setting, you must also enable Noise reducer (NoiseReducer). * Bilateral preserves edges while reducing noise. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) do convolution filtering. * Conserve does min/max noise reduction. * Spatial does frequency-domain filtering based on JND principles. * Temporal optimizes video quality for complex motion.
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::NoiseReducerFilter>,
) -> Self {
self.filter = input;
self
}
/// Settings for a noise reducer filter
pub fn filter_settings(mut self, input: crate::model::NoiseReducerFilterSettings) -> Self {
self.filter_settings = Some(input);
self
}
/// Settings for a noise reducer filter
pub fn set_filter_settings(
mut self,
input: std::option::Option<crate::model::NoiseReducerFilterSettings>,
) -> Self {
self.filter_settings = input;
self
}
/// Noise reducer filter settings for spatial filter.
pub fn spatial_filter_settings(
mut self,
input: crate::model::NoiseReducerSpatialFilterSettings,
) -> Self {
self.spatial_filter_settings = Some(input);
self
}
/// Noise reducer filter settings for spatial filter.
pub fn set_spatial_filter_settings(
mut self,
input: std::option::Option<crate::model::NoiseReducerSpatialFilterSettings>,
) -> Self {
self.spatial_filter_settings = input;
self
}
/// Noise reducer filter settings for temporal filter.
pub fn temporal_filter_settings(
mut self,
input: crate::model::NoiseReducerTemporalFilterSettings,
) -> Self {
self.temporal_filter_settings = Some(input);
self
}
/// Noise reducer filter settings for temporal filter.
pub fn set_temporal_filter_settings(
mut self,
input: std::option::Option<crate::model::NoiseReducerTemporalFilterSettings>,
) -> Self {
self.temporal_filter_settings = input;
self
}
/// Consumes the builder and constructs a [`NoiseReducer`](crate::model::NoiseReducer)
pub fn build(self) -> crate::model::NoiseReducer {
crate::model::NoiseReducer {
filter: self.filter,
filter_settings: self.filter_settings,
spatial_filter_settings: self.spatial_filter_settings,
temporal_filter_settings: self.temporal_filter_settings,
}
}
}
}
impl NoiseReducer {
/// Creates a new builder-style object to manufacture [`NoiseReducer`](crate::model::NoiseReducer)
pub fn builder() -> crate::model::noise_reducer::Builder {
crate::model::noise_reducer::Builder::default()
}
}
/// Noise reducer filter settings for temporal filter.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NoiseReducerTemporalFilterSettings {
/// Use Aggressive mode for content that has complex motion. Higher values produce stronger temporal filtering. This filters highly complex scenes more aggressively and creates better VQ for low bitrate outputs.
pub aggressive_mode: i32,
/// When you set Noise reducer (noiseReducer) to Temporal (TEMPORAL), the bandwidth and sharpness of your output is reduced. You can optionally use Post temporal sharpening (postTemporalSharpening) to apply sharpening to the edges of your output. Note that Post temporal sharpening will also make the bandwidth reduction from the Noise reducer smaller. The default behavior, Auto (AUTO), allows the transcoder to determine whether to apply sharpening, depending on your input type and quality. When you set Post temporal sharpening to Enabled (ENABLED), specify how much sharpening is applied using Post temporal sharpening strength (postTemporalSharpeningStrength). Set Post temporal sharpening to Disabled (DISABLED) to not apply sharpening.
pub post_temporal_sharpening:
std::option::Option<crate::model::NoiseFilterPostTemporalSharpening>,
/// Use Post temporal sharpening strength (postTemporalSharpeningStrength) to define the amount of sharpening the transcoder applies to your output. Set Post temporal sharpening strength to Low (LOW), Medium (MEDIUM), or High (HIGH) to indicate the amount of sharpening.
pub post_temporal_sharpening_strength:
std::option::Option<crate::model::NoiseFilterPostTemporalSharpeningStrength>,
/// The speed of the filter (higher number is faster). Low setting reduces bit rate at the cost of transcode time, high setting improves transcode time at the cost of bit rate.
pub speed: i32,
/// Specify the strength of the noise reducing filter on this output. Higher values produce stronger filtering. We recommend the following value ranges, depending on the result that you want: * 0-2 for complexity reduction with minimal sharpness loss * 2-8 for complexity reduction with image preservation * 8-16 for a high level of complexity reduction
pub strength: i32,
}
impl NoiseReducerTemporalFilterSettings {
/// Use Aggressive mode for content that has complex motion. Higher values produce stronger temporal filtering. This filters highly complex scenes more aggressively and creates better VQ for low bitrate outputs.
pub fn aggressive_mode(&self) -> i32 {
self.aggressive_mode
}
/// When you set Noise reducer (noiseReducer) to Temporal (TEMPORAL), the bandwidth and sharpness of your output is reduced. You can optionally use Post temporal sharpening (postTemporalSharpening) to apply sharpening to the edges of your output. Note that Post temporal sharpening will also make the bandwidth reduction from the Noise reducer smaller. The default behavior, Auto (AUTO), allows the transcoder to determine whether to apply sharpening, depending on your input type and quality. When you set Post temporal sharpening to Enabled (ENABLED), specify how much sharpening is applied using Post temporal sharpening strength (postTemporalSharpeningStrength). Set Post temporal sharpening to Disabled (DISABLED) to not apply sharpening.
pub fn post_temporal_sharpening(
&self,
) -> std::option::Option<&crate::model::NoiseFilterPostTemporalSharpening> {
self.post_temporal_sharpening.as_ref()
}
/// Use Post temporal sharpening strength (postTemporalSharpeningStrength) to define the amount of sharpening the transcoder applies to your output. Set Post temporal sharpening strength to Low (LOW), Medium (MEDIUM), or High (HIGH) to indicate the amount of sharpening.
pub fn post_temporal_sharpening_strength(
&self,
) -> std::option::Option<&crate::model::NoiseFilterPostTemporalSharpeningStrength> {
self.post_temporal_sharpening_strength.as_ref()
}
/// The speed of the filter (higher number is faster). Low setting reduces bit rate at the cost of transcode time, high setting improves transcode time at the cost of bit rate.
pub fn speed(&self) -> i32 {
self.speed
}
/// Specify the strength of the noise reducing filter on this output. Higher values produce stronger filtering. We recommend the following value ranges, depending on the result that you want: * 0-2 for complexity reduction with minimal sharpness loss * 2-8 for complexity reduction with image preservation * 8-16 for a high level of complexity reduction
pub fn strength(&self) -> i32 {
self.strength
}
}
impl std::fmt::Debug for NoiseReducerTemporalFilterSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NoiseReducerTemporalFilterSettings");
formatter.field("aggressive_mode", &self.aggressive_mode);
formatter.field("post_temporal_sharpening", &self.post_temporal_sharpening);
formatter.field(
"post_temporal_sharpening_strength",
&self.post_temporal_sharpening_strength,
);
formatter.field("speed", &self.speed);
formatter.field("strength", &self.strength);
formatter.finish()
}
}
/// See [`NoiseReducerTemporalFilterSettings`](crate::model::NoiseReducerTemporalFilterSettings)
pub mod noise_reducer_temporal_filter_settings {
/// A builder for [`NoiseReducerTemporalFilterSettings`](crate::model::NoiseReducerTemporalFilterSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) aggressive_mode: std::option::Option<i32>,
pub(crate) post_temporal_sharpening:
std::option::Option<crate::model::NoiseFilterPostTemporalSharpening>,
pub(crate) post_temporal_sharpening_strength:
std::option::Option<crate::model::NoiseFilterPostTemporalSharpeningStrength>,
pub(crate) speed: std::option::Option<i32>,
pub(crate) strength: std::option::Option<i32>,
}
impl Builder {
/// Use Aggressive mode for content that has complex motion. Higher values produce stronger temporal filtering. This filters highly complex scenes more aggressively and creates better VQ for low bitrate outputs.
pub fn aggressive_mode(mut self, input: i32) -> Self {
self.aggressive_mode = Some(input);
self
}
/// Use Aggressive mode for content that has complex motion. Higher values produce stronger temporal filtering. This filters highly complex scenes more aggressively and creates better VQ for low bitrate outputs.
pub fn set_aggressive_mode(mut self, input: std::option::Option<i32>) -> Self {
self.aggressive_mode = input;
self
}
/// When you set Noise reducer (noiseReducer) to Temporal (TEMPORAL), the bandwidth and sharpness of your output is reduced. You can optionally use Post temporal sharpening (postTemporalSharpening) to apply sharpening to the edges of your output. Note that Post temporal sharpening will also make the bandwidth reduction from the Noise reducer smaller. The default behavior, Auto (AUTO), allows the transcoder to determine whether to apply sharpening, depending on your input type and quality. When you set Post temporal sharpening to Enabled (ENABLED), specify how much sharpening is applied using Post temporal sharpening strength (postTemporalSharpeningStrength). Set Post temporal sharpening to Disabled (DISABLED) to not apply sharpening.
pub fn post_temporal_sharpening(
mut self,
input: crate::model::NoiseFilterPostTemporalSharpening,
) -> Self {
self.post_temporal_sharpening = Some(input);
self
}
/// When you set Noise reducer (noiseReducer) to Temporal (TEMPORAL), the bandwidth and sharpness of your output is reduced. You can optionally use Post temporal sharpening (postTemporalSharpening) to apply sharpening to the edges of your output. Note that Post temporal sharpening will also make the bandwidth reduction from the Noise reducer smaller. The default behavior, Auto (AUTO), allows the transcoder to determine whether to apply sharpening, depending on your input type and quality. When you set Post temporal sharpening to Enabled (ENABLED), specify how much sharpening is applied using Post temporal sharpening strength (postTemporalSharpeningStrength). Set Post temporal sharpening to Disabled (DISABLED) to not apply sharpening.
pub fn set_post_temporal_sharpening(
mut self,
input: std::option::Option<crate::model::NoiseFilterPostTemporalSharpening>,
) -> Self {
self.post_temporal_sharpening = input;
self
}
/// Use Post temporal sharpening strength (postTemporalSharpeningStrength) to define the amount of sharpening the transcoder applies to your output. Set Post temporal sharpening strength to Low (LOW), Medium (MEDIUM), or High (HIGH) to indicate the amount of sharpening.
pub fn post_temporal_sharpening_strength(
mut self,
input: crate::model::NoiseFilterPostTemporalSharpeningStrength,
) -> Self {
self.post_temporal_sharpening_strength = Some(input);
self
}
/// Use Post temporal sharpening strength (postTemporalSharpeningStrength) to define the amount of sharpening the transcoder applies to your output. Set Post temporal sharpening strength to Low (LOW), Medium (MEDIUM), or High (HIGH) to indicate the amount of sharpening.
pub fn set_post_temporal_sharpening_strength(
mut self,
input: std::option::Option<crate::model::NoiseFilterPostTemporalSharpeningStrength>,
) -> Self {
self.post_temporal_sharpening_strength = input;
self
}
/// The speed of the filter (higher number is faster). Low setting reduces bit rate at the cost of transcode time, high setting improves transcode time at the cost of bit rate.
pub fn speed(mut self, input: i32) -> Self {
self.speed = Some(input);
self
}
/// The speed of the filter (higher number is faster). Low setting reduces bit rate at the cost of transcode time, high setting improves transcode time at the cost of bit rate.
pub fn set_speed(mut self, input: std::option::Option<i32>) -> Self {
self.speed = input;
self
}
/// Specify the strength of the noise reducing filter on this output. Higher values produce stronger filtering. We recommend the following value ranges, depending on the result that you want: * 0-2 for complexity reduction with minimal sharpness loss * 2-8 for complexity reduction with image preservation * 8-16 for a high level of complexity reduction
pub fn strength(mut self, input: i32) -> Self {
self.strength = Some(input);
self
}
/// Specify the strength of the noise reducing filter on this output. Higher values produce stronger filtering. We recommend the following value ranges, depending on the result that you want: * 0-2 for complexity reduction with minimal sharpness loss * 2-8 for complexity reduction with image preservation * 8-16 for a high level of complexity reduction
pub fn set_strength(mut self, input: std::option::Option<i32>) -> Self {
self.strength = input;
self
}
/// Consumes the builder and constructs a [`NoiseReducerTemporalFilterSettings`](crate::model::NoiseReducerTemporalFilterSettings)
pub fn build(self) -> crate::model::NoiseReducerTemporalFilterSettings {
crate::model::NoiseReducerTemporalFilterSettings {
aggressive_mode: self.aggressive_mode.unwrap_or_default(),
post_temporal_sharpening: self.post_temporal_sharpening,
post_temporal_sharpening_strength: self.post_temporal_sharpening_strength,
speed: self.speed.unwrap_or_default(),
strength: self.strength.unwrap_or_default(),
}
}
}
}
impl NoiseReducerTemporalFilterSettings {
/// Creates a new builder-style object to manufacture [`NoiseReducerTemporalFilterSettings`](crate::model::NoiseReducerTemporalFilterSettings)
pub fn builder() -> crate::model::noise_reducer_temporal_filter_settings::Builder {
crate::model::noise_reducer_temporal_filter_settings::Builder::default()
}
}
/// Use Post temporal sharpening strength (postTemporalSharpeningStrength) to define the amount of sharpening the transcoder applies to your output. Set Post temporal sharpening strength to Low (LOW), Medium (MEDIUM), or High (HIGH) to indicate the amount of sharpening.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NoiseFilterPostTemporalSharpeningStrength {
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Medium,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NoiseFilterPostTemporalSharpeningStrength {
fn from(s: &str) -> Self {
match s {
"HIGH" => NoiseFilterPostTemporalSharpeningStrength::High,
"LOW" => NoiseFilterPostTemporalSharpeningStrength::Low,
"MEDIUM" => NoiseFilterPostTemporalSharpeningStrength::Medium,
other => NoiseFilterPostTemporalSharpeningStrength::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NoiseFilterPostTemporalSharpeningStrength {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NoiseFilterPostTemporalSharpeningStrength::from(s))
}
}
impl NoiseFilterPostTemporalSharpeningStrength {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NoiseFilterPostTemporalSharpeningStrength::High => "HIGH",
NoiseFilterPostTemporalSharpeningStrength::Low => "LOW",
NoiseFilterPostTemporalSharpeningStrength::Medium => "MEDIUM",
NoiseFilterPostTemporalSharpeningStrength::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HIGH", "LOW", "MEDIUM"]
}
}
impl AsRef<str> for NoiseFilterPostTemporalSharpeningStrength {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you set Noise reducer (noiseReducer) to Temporal (TEMPORAL), the bandwidth and sharpness of your output is reduced. You can optionally use Post temporal sharpening (postTemporalSharpening) to apply sharpening to the edges of your output. Note that Post temporal sharpening will also make the bandwidth reduction from the Noise reducer smaller. The default behavior, Auto (AUTO), allows the transcoder to determine whether to apply sharpening, depending on your input type and quality. When you set Post temporal sharpening to Enabled (ENABLED), specify how much sharpening is applied using Post temporal sharpening strength (postTemporalSharpeningStrength). Set Post temporal sharpening to Disabled (DISABLED) to not apply sharpening.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NoiseFilterPostTemporalSharpening {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NoiseFilterPostTemporalSharpening {
fn from(s: &str) -> Self {
match s {
"AUTO" => NoiseFilterPostTemporalSharpening::Auto,
"DISABLED" => NoiseFilterPostTemporalSharpening::Disabled,
"ENABLED" => NoiseFilterPostTemporalSharpening::Enabled,
other => NoiseFilterPostTemporalSharpening::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NoiseFilterPostTemporalSharpening {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NoiseFilterPostTemporalSharpening::from(s))
}
}
impl NoiseFilterPostTemporalSharpening {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NoiseFilterPostTemporalSharpening::Auto => "AUTO",
NoiseFilterPostTemporalSharpening::Disabled => "DISABLED",
NoiseFilterPostTemporalSharpening::Enabled => "ENABLED",
NoiseFilterPostTemporalSharpening::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "DISABLED", "ENABLED"]
}
}
impl AsRef<str> for NoiseFilterPostTemporalSharpening {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Noise reducer filter settings for spatial filter.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NoiseReducerSpatialFilterSettings {
/// Specify strength of post noise reduction sharpening filter, with 0 disabling the filter and 3 enabling it at maximum strength.
pub post_filter_sharpen_strength: i32,
/// The speed of the filter, from -2 (lower speed) to 3 (higher speed), with 0 being the nominal value.
pub speed: i32,
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub strength: i32,
}
impl NoiseReducerSpatialFilterSettings {
/// Specify strength of post noise reduction sharpening filter, with 0 disabling the filter and 3 enabling it at maximum strength.
pub fn post_filter_sharpen_strength(&self) -> i32 {
self.post_filter_sharpen_strength
}
/// The speed of the filter, from -2 (lower speed) to 3 (higher speed), with 0 being the nominal value.
pub fn speed(&self) -> i32 {
self.speed
}
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub fn strength(&self) -> i32 {
self.strength
}
}
impl std::fmt::Debug for NoiseReducerSpatialFilterSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NoiseReducerSpatialFilterSettings");
formatter.field(
"post_filter_sharpen_strength",
&self.post_filter_sharpen_strength,
);
formatter.field("speed", &self.speed);
formatter.field("strength", &self.strength);
formatter.finish()
}
}
/// See [`NoiseReducerSpatialFilterSettings`](crate::model::NoiseReducerSpatialFilterSettings)
pub mod noise_reducer_spatial_filter_settings {
/// A builder for [`NoiseReducerSpatialFilterSettings`](crate::model::NoiseReducerSpatialFilterSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) post_filter_sharpen_strength: std::option::Option<i32>,
pub(crate) speed: std::option::Option<i32>,
pub(crate) strength: std::option::Option<i32>,
}
impl Builder {
/// Specify strength of post noise reduction sharpening filter, with 0 disabling the filter and 3 enabling it at maximum strength.
pub fn post_filter_sharpen_strength(mut self, input: i32) -> Self {
self.post_filter_sharpen_strength = Some(input);
self
}
/// Specify strength of post noise reduction sharpening filter, with 0 disabling the filter and 3 enabling it at maximum strength.
pub fn set_post_filter_sharpen_strength(mut self, input: std::option::Option<i32>) -> Self {
self.post_filter_sharpen_strength = input;
self
}
/// The speed of the filter, from -2 (lower speed) to 3 (higher speed), with 0 being the nominal value.
pub fn speed(mut self, input: i32) -> Self {
self.speed = Some(input);
self
}
/// The speed of the filter, from -2 (lower speed) to 3 (higher speed), with 0 being the nominal value.
pub fn set_speed(mut self, input: std::option::Option<i32>) -> Self {
self.speed = input;
self
}
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub fn strength(mut self, input: i32) -> Self {
self.strength = Some(input);
self
}
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub fn set_strength(mut self, input: std::option::Option<i32>) -> Self {
self.strength = input;
self
}
/// Consumes the builder and constructs a [`NoiseReducerSpatialFilterSettings`](crate::model::NoiseReducerSpatialFilterSettings)
pub fn build(self) -> crate::model::NoiseReducerSpatialFilterSettings {
crate::model::NoiseReducerSpatialFilterSettings {
post_filter_sharpen_strength: self.post_filter_sharpen_strength.unwrap_or_default(),
speed: self.speed.unwrap_or_default(),
strength: self.strength.unwrap_or_default(),
}
}
}
}
impl NoiseReducerSpatialFilterSettings {
/// Creates a new builder-style object to manufacture [`NoiseReducerSpatialFilterSettings`](crate::model::NoiseReducerSpatialFilterSettings)
pub fn builder() -> crate::model::noise_reducer_spatial_filter_settings::Builder {
crate::model::noise_reducer_spatial_filter_settings::Builder::default()
}
}
/// Settings for a noise reducer filter
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NoiseReducerFilterSettings {
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub strength: i32,
}
impl NoiseReducerFilterSettings {
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub fn strength(&self) -> i32 {
self.strength
}
}
impl std::fmt::Debug for NoiseReducerFilterSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NoiseReducerFilterSettings");
formatter.field("strength", &self.strength);
formatter.finish()
}
}
/// See [`NoiseReducerFilterSettings`](crate::model::NoiseReducerFilterSettings)
pub mod noise_reducer_filter_settings {
/// A builder for [`NoiseReducerFilterSettings`](crate::model::NoiseReducerFilterSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) strength: std::option::Option<i32>,
}
impl Builder {
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub fn strength(mut self, input: i32) -> Self {
self.strength = Some(input);
self
}
/// Relative strength of noise reducing filter. Higher values produce stronger filtering.
pub fn set_strength(mut self, input: std::option::Option<i32>) -> Self {
self.strength = input;
self
}
/// Consumes the builder and constructs a [`NoiseReducerFilterSettings`](crate::model::NoiseReducerFilterSettings)
pub fn build(self) -> crate::model::NoiseReducerFilterSettings {
crate::model::NoiseReducerFilterSettings {
strength: self.strength.unwrap_or_default(),
}
}
}
}
impl NoiseReducerFilterSettings {
/// Creates a new builder-style object to manufacture [`NoiseReducerFilterSettings`](crate::model::NoiseReducerFilterSettings)
pub fn builder() -> crate::model::noise_reducer_filter_settings::Builder {
crate::model::noise_reducer_filter_settings::Builder::default()
}
}
/// Use Noise reducer filter (NoiseReducerFilter) to select one of the following spatial image filtering functions. To use this setting, you must also enable Noise reducer (NoiseReducer). * Bilateral preserves edges while reducing noise. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) do convolution filtering. * Conserve does min/max noise reduction. * Spatial does frequency-domain filtering based on JND principles. * Temporal optimizes video quality for complex motion.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NoiseReducerFilter {
#[allow(missing_docs)] // documentation missing in model
Bilateral,
#[allow(missing_docs)] // documentation missing in model
Conserve,
#[allow(missing_docs)] // documentation missing in model
Gaussian,
#[allow(missing_docs)] // documentation missing in model
Lanczos,
#[allow(missing_docs)] // documentation missing in model
Mean,
#[allow(missing_docs)] // documentation missing in model
Sharpen,
#[allow(missing_docs)] // documentation missing in model
Spatial,
#[allow(missing_docs)] // documentation missing in model
Temporal,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NoiseReducerFilter {
fn from(s: &str) -> Self {
match s {
"BILATERAL" => NoiseReducerFilter::Bilateral,
"CONSERVE" => NoiseReducerFilter::Conserve,
"GAUSSIAN" => NoiseReducerFilter::Gaussian,
"LANCZOS" => NoiseReducerFilter::Lanczos,
"MEAN" => NoiseReducerFilter::Mean,
"SHARPEN" => NoiseReducerFilter::Sharpen,
"SPATIAL" => NoiseReducerFilter::Spatial,
"TEMPORAL" => NoiseReducerFilter::Temporal,
other => NoiseReducerFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NoiseReducerFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NoiseReducerFilter::from(s))
}
}
impl NoiseReducerFilter {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NoiseReducerFilter::Bilateral => "BILATERAL",
NoiseReducerFilter::Conserve => "CONSERVE",
NoiseReducerFilter::Gaussian => "GAUSSIAN",
NoiseReducerFilter::Lanczos => "LANCZOS",
NoiseReducerFilter::Mean => "MEAN",
NoiseReducerFilter::Sharpen => "SHARPEN",
NoiseReducerFilter::Spatial => "SPATIAL",
NoiseReducerFilter::Temporal => "TEMPORAL",
NoiseReducerFilter::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BILATERAL",
"CONSERVE",
"GAUSSIAN",
"LANCZOS",
"MEAN",
"SHARPEN",
"SPATIAL",
"TEMPORAL",
]
}
}
impl AsRef<str> for NoiseReducerFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input or output individually. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/graphic-overlay.html. This setting is disabled by default.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ImageInserter {
/// Specify the images that you want to overlay on your video. The images must be PNG or TGA files.
pub insertable_images: std::option::Option<std::vec::Vec<crate::model::InsertableImage>>,
}
impl ImageInserter {
/// Specify the images that you want to overlay on your video. The images must be PNG or TGA files.
pub fn insertable_images(&self) -> std::option::Option<&[crate::model::InsertableImage]> {
self.insertable_images.as_deref()
}
}
impl std::fmt::Debug for ImageInserter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ImageInserter");
formatter.field("insertable_images", &self.insertable_images);
formatter.finish()
}
}
/// See [`ImageInserter`](crate::model::ImageInserter)
pub mod image_inserter {
/// A builder for [`ImageInserter`](crate::model::ImageInserter)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) insertable_images:
std::option::Option<std::vec::Vec<crate::model::InsertableImage>>,
}
impl Builder {
/// Appends an item to `insertable_images`.
///
/// To override the contents of this collection use [`set_insertable_images`](Self::set_insertable_images).
///
/// Specify the images that you want to overlay on your video. The images must be PNG or TGA files.
pub fn insertable_images(mut self, input: crate::model::InsertableImage) -> Self {
let mut v = self.insertable_images.unwrap_or_default();
v.push(input);
self.insertable_images = Some(v);
self
}
/// Specify the images that you want to overlay on your video. The images must be PNG or TGA files.
pub fn set_insertable_images(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InsertableImage>>,
) -> Self {
self.insertable_images = input;
self
}
/// Consumes the builder and constructs a [`ImageInserter`](crate::model::ImageInserter)
pub fn build(self) -> crate::model::ImageInserter {
crate::model::ImageInserter {
insertable_images: self.insertable_images,
}
}
}
}
impl ImageInserter {
/// Creates a new builder-style object to manufacture [`ImageInserter`](crate::model::ImageInserter)
pub fn builder() -> crate::model::image_inserter::Builder {
crate::model::image_inserter::Builder::default()
}
}
/// These settings apply to a specific graphic overlay. You can include multiple overlays in your job.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InsertableImage {
/// Specify the time, in milliseconds, for the image to remain on the output video. This duration includes fade-in time but not fade-out time.
pub duration: i32,
/// Specify the length of time, in milliseconds, between the Start time that you specify for the image insertion and the time that the image appears at full opacity. Full opacity is the level that you specify for the opacity setting. If you don't specify a value for Fade-in, the image will appear abruptly at the overlay start time.
pub fade_in: i32,
/// Specify the length of time, in milliseconds, between the end of the time that you have specified for the image overlay Duration and when the overlaid image has faded to total transparency. If you don't specify a value for Fade-out, the image will disappear abruptly at the end of the inserted image duration.
pub fade_out: i32,
/// Specify the height of the inserted image in pixels. If you specify a value that's larger than the video resolution height, the service will crop your overlaid image to fit. To use the native height of the image, keep this setting blank.
pub height: i32,
/// Specify the HTTP, HTTPS, or Amazon S3 location of the image that you want to overlay on the video. Use a PNG or TGA file.
pub image_inserter_input: std::option::Option<std::string::String>,
/// Specify the distance, in pixels, between the inserted image and the left edge of the video frame. Required for any image overlay that you specify.
pub image_x: i32,
/// Specify the distance, in pixels, between the overlaid image and the top edge of the video frame. Required for any image overlay that you specify.
pub image_y: i32,
/// Specify how overlapping inserted images appear. Images with higher values for Layer appear on top of images with lower values for Layer.
pub layer: i32,
/// Use Opacity (Opacity) to specify how much of the underlying video shows through the inserted image. 0 is transparent and 100 is fully opaque. Default is 50.
pub opacity: i32,
/// Specify the timecode of the frame that you want the overlay to first appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format. Remember to take into account your timecode source settings.
pub start_time: std::option::Option<std::string::String>,
/// Specify the width of the inserted image in pixels. If you specify a value that's larger than the video resolution width, the service will crop your overlaid image to fit. To use the native width of the image, keep this setting blank.
pub width: i32,
}
impl InsertableImage {
/// Specify the time, in milliseconds, for the image to remain on the output video. This duration includes fade-in time but not fade-out time.
pub fn duration(&self) -> i32 {
self.duration
}
/// Specify the length of time, in milliseconds, between the Start time that you specify for the image insertion and the time that the image appears at full opacity. Full opacity is the level that you specify for the opacity setting. If you don't specify a value for Fade-in, the image will appear abruptly at the overlay start time.
pub fn fade_in(&self) -> i32 {
self.fade_in
}
/// Specify the length of time, in milliseconds, between the end of the time that you have specified for the image overlay Duration and when the overlaid image has faded to total transparency. If you don't specify a value for Fade-out, the image will disappear abruptly at the end of the inserted image duration.
pub fn fade_out(&self) -> i32 {
self.fade_out
}
/// Specify the height of the inserted image in pixels. If you specify a value that's larger than the video resolution height, the service will crop your overlaid image to fit. To use the native height of the image, keep this setting blank.
pub fn height(&self) -> i32 {
self.height
}
/// Specify the HTTP, HTTPS, or Amazon S3 location of the image that you want to overlay on the video. Use a PNG or TGA file.
pub fn image_inserter_input(&self) -> std::option::Option<&str> {
self.image_inserter_input.as_deref()
}
/// Specify the distance, in pixels, between the inserted image and the left edge of the video frame. Required for any image overlay that you specify.
pub fn image_x(&self) -> i32 {
self.image_x
}
/// Specify the distance, in pixels, between the overlaid image and the top edge of the video frame. Required for any image overlay that you specify.
pub fn image_y(&self) -> i32 {
self.image_y
}
/// Specify how overlapping inserted images appear. Images with higher values for Layer appear on top of images with lower values for Layer.
pub fn layer(&self) -> i32 {
self.layer
}
/// Use Opacity (Opacity) to specify how much of the underlying video shows through the inserted image. 0 is transparent and 100 is fully opaque. Default is 50.
pub fn opacity(&self) -> i32 {
self.opacity
}
/// Specify the timecode of the frame that you want the overlay to first appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format. Remember to take into account your timecode source settings.
pub fn start_time(&self) -> std::option::Option<&str> {
self.start_time.as_deref()
}
/// Specify the width of the inserted image in pixels. If you specify a value that's larger than the video resolution width, the service will crop your overlaid image to fit. To use the native width of the image, keep this setting blank.
pub fn width(&self) -> i32 {
self.width
}
}
impl std::fmt::Debug for InsertableImage {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InsertableImage");
formatter.field("duration", &self.duration);
formatter.field("fade_in", &self.fade_in);
formatter.field("fade_out", &self.fade_out);
formatter.field("height", &self.height);
formatter.field("image_inserter_input", &self.image_inserter_input);
formatter.field("image_x", &self.image_x);
formatter.field("image_y", &self.image_y);
formatter.field("layer", &self.layer);
formatter.field("opacity", &self.opacity);
formatter.field("start_time", &self.start_time);
formatter.field("width", &self.width);
formatter.finish()
}
}
/// See [`InsertableImage`](crate::model::InsertableImage)
pub mod insertable_image {
/// A builder for [`InsertableImage`](crate::model::InsertableImage)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) duration: std::option::Option<i32>,
pub(crate) fade_in: std::option::Option<i32>,
pub(crate) fade_out: std::option::Option<i32>,
pub(crate) height: std::option::Option<i32>,
pub(crate) image_inserter_input: std::option::Option<std::string::String>,
pub(crate) image_x: std::option::Option<i32>,
pub(crate) image_y: std::option::Option<i32>,
pub(crate) layer: std::option::Option<i32>,
pub(crate) opacity: std::option::Option<i32>,
pub(crate) start_time: std::option::Option<std::string::String>,
pub(crate) width: std::option::Option<i32>,
}
impl Builder {
/// Specify the time, in milliseconds, for the image to remain on the output video. This duration includes fade-in time but not fade-out time.
pub fn duration(mut self, input: i32) -> Self {
self.duration = Some(input);
self
}
/// Specify the time, in milliseconds, for the image to remain on the output video. This duration includes fade-in time but not fade-out time.
pub fn set_duration(mut self, input: std::option::Option<i32>) -> Self {
self.duration = input;
self
}
/// Specify the length of time, in milliseconds, between the Start time that you specify for the image insertion and the time that the image appears at full opacity. Full opacity is the level that you specify for the opacity setting. If you don't specify a value for Fade-in, the image will appear abruptly at the overlay start time.
pub fn fade_in(mut self, input: i32) -> Self {
self.fade_in = Some(input);
self
}
/// Specify the length of time, in milliseconds, between the Start time that you specify for the image insertion and the time that the image appears at full opacity. Full opacity is the level that you specify for the opacity setting. If you don't specify a value for Fade-in, the image will appear abruptly at the overlay start time.
pub fn set_fade_in(mut self, input: std::option::Option<i32>) -> Self {
self.fade_in = input;
self
}
/// Specify the length of time, in milliseconds, between the end of the time that you have specified for the image overlay Duration and when the overlaid image has faded to total transparency. If you don't specify a value for Fade-out, the image will disappear abruptly at the end of the inserted image duration.
pub fn fade_out(mut self, input: i32) -> Self {
self.fade_out = Some(input);
self
}
/// Specify the length of time, in milliseconds, between the end of the time that you have specified for the image overlay Duration and when the overlaid image has faded to total transparency. If you don't specify a value for Fade-out, the image will disappear abruptly at the end of the inserted image duration.
pub fn set_fade_out(mut self, input: std::option::Option<i32>) -> Self {
self.fade_out = input;
self
}
/// Specify the height of the inserted image in pixels. If you specify a value that's larger than the video resolution height, the service will crop your overlaid image to fit. To use the native height of the image, keep this setting blank.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Specify the height of the inserted image in pixels. If you specify a value that's larger than the video resolution height, the service will crop your overlaid image to fit. To use the native height of the image, keep this setting blank.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Specify the HTTP, HTTPS, or Amazon S3 location of the image that you want to overlay on the video. Use a PNG or TGA file.
pub fn image_inserter_input(mut self, input: impl Into<std::string::String>) -> Self {
self.image_inserter_input = Some(input.into());
self
}
/// Specify the HTTP, HTTPS, or Amazon S3 location of the image that you want to overlay on the video. Use a PNG or TGA file.
pub fn set_image_inserter_input(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_inserter_input = input;
self
}
/// Specify the distance, in pixels, between the inserted image and the left edge of the video frame. Required for any image overlay that you specify.
pub fn image_x(mut self, input: i32) -> Self {
self.image_x = Some(input);
self
}
/// Specify the distance, in pixels, between the inserted image and the left edge of the video frame. Required for any image overlay that you specify.
pub fn set_image_x(mut self, input: std::option::Option<i32>) -> Self {
self.image_x = input;
self
}
/// Specify the distance, in pixels, between the overlaid image and the top edge of the video frame. Required for any image overlay that you specify.
pub fn image_y(mut self, input: i32) -> Self {
self.image_y = Some(input);
self
}
/// Specify the distance, in pixels, between the overlaid image and the top edge of the video frame. Required for any image overlay that you specify.
pub fn set_image_y(mut self, input: std::option::Option<i32>) -> Self {
self.image_y = input;
self
}
/// Specify how overlapping inserted images appear. Images with higher values for Layer appear on top of images with lower values for Layer.
pub fn layer(mut self, input: i32) -> Self {
self.layer = Some(input);
self
}
/// Specify how overlapping inserted images appear. Images with higher values for Layer appear on top of images with lower values for Layer.
pub fn set_layer(mut self, input: std::option::Option<i32>) -> Self {
self.layer = input;
self
}
/// Use Opacity (Opacity) to specify how much of the underlying video shows through the inserted image. 0 is transparent and 100 is fully opaque. Default is 50.
pub fn opacity(mut self, input: i32) -> Self {
self.opacity = Some(input);
self
}
/// Use Opacity (Opacity) to specify how much of the underlying video shows through the inserted image. 0 is transparent and 100 is fully opaque. Default is 50.
pub fn set_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.opacity = input;
self
}
/// Specify the timecode of the frame that you want the overlay to first appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format. Remember to take into account your timecode source settings.
pub fn start_time(mut self, input: impl Into<std::string::String>) -> Self {
self.start_time = Some(input.into());
self
}
/// Specify the timecode of the frame that you want the overlay to first appear on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format. Remember to take into account your timecode source settings.
pub fn set_start_time(mut self, input: std::option::Option<std::string::String>) -> Self {
self.start_time = input;
self
}
/// Specify the width of the inserted image in pixels. If you specify a value that's larger than the video resolution width, the service will crop your overlaid image to fit. To use the native width of the image, keep this setting blank.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Specify the width of the inserted image in pixels. If you specify a value that's larger than the video resolution width, the service will crop your overlaid image to fit. To use the native width of the image, keep this setting blank.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Consumes the builder and constructs a [`InsertableImage`](crate::model::InsertableImage)
pub fn build(self) -> crate::model::InsertableImage {
crate::model::InsertableImage {
duration: self.duration.unwrap_or_default(),
fade_in: self.fade_in.unwrap_or_default(),
fade_out: self.fade_out.unwrap_or_default(),
height: self.height.unwrap_or_default(),
image_inserter_input: self.image_inserter_input,
image_x: self.image_x.unwrap_or_default(),
image_y: self.image_y.unwrap_or_default(),
layer: self.layer.unwrap_or_default(),
opacity: self.opacity.unwrap_or_default(),
start_time: self.start_time,
width: self.width.unwrap_or_default(),
}
}
}
}
impl InsertableImage {
/// Creates a new builder-style object to manufacture [`InsertableImage`](crate::model::InsertableImage)
pub fn builder() -> crate::model::insertable_image::Builder {
crate::model::insertable_image::Builder::default()
}
}
/// Setting for HDR10+ metadata insertion
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Hdr10Plus {
/// Specify the HDR10+ mastering display normalized peak luminance, in nits. This is the normalized actual peak luminance of the mastering display, as defined by ST 2094-40.
pub mastering_monitor_nits: i32,
/// Specify the HDR10+ target display nominal peak luminance, in nits. This is the nominal maximum luminance of the target display as defined by ST 2094-40.
pub target_monitor_nits: i32,
}
impl Hdr10Plus {
/// Specify the HDR10+ mastering display normalized peak luminance, in nits. This is the normalized actual peak luminance of the mastering display, as defined by ST 2094-40.
pub fn mastering_monitor_nits(&self) -> i32 {
self.mastering_monitor_nits
}
/// Specify the HDR10+ target display nominal peak luminance, in nits. This is the nominal maximum luminance of the target display as defined by ST 2094-40.
pub fn target_monitor_nits(&self) -> i32 {
self.target_monitor_nits
}
}
impl std::fmt::Debug for Hdr10Plus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Hdr10Plus");
formatter.field("mastering_monitor_nits", &self.mastering_monitor_nits);
formatter.field("target_monitor_nits", &self.target_monitor_nits);
formatter.finish()
}
}
/// See [`Hdr10Plus`](crate::model::Hdr10Plus)
pub mod hdr10_plus {
/// A builder for [`Hdr10Plus`](crate::model::Hdr10Plus)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mastering_monitor_nits: std::option::Option<i32>,
pub(crate) target_monitor_nits: std::option::Option<i32>,
}
impl Builder {
/// Specify the HDR10+ mastering display normalized peak luminance, in nits. This is the normalized actual peak luminance of the mastering display, as defined by ST 2094-40.
pub fn mastering_monitor_nits(mut self, input: i32) -> Self {
self.mastering_monitor_nits = Some(input);
self
}
/// Specify the HDR10+ mastering display normalized peak luminance, in nits. This is the normalized actual peak luminance of the mastering display, as defined by ST 2094-40.
pub fn set_mastering_monitor_nits(mut self, input: std::option::Option<i32>) -> Self {
self.mastering_monitor_nits = input;
self
}
/// Specify the HDR10+ target display nominal peak luminance, in nits. This is the nominal maximum luminance of the target display as defined by ST 2094-40.
pub fn target_monitor_nits(mut self, input: i32) -> Self {
self.target_monitor_nits = Some(input);
self
}
/// Specify the HDR10+ target display nominal peak luminance, in nits. This is the nominal maximum luminance of the target display as defined by ST 2094-40.
pub fn set_target_monitor_nits(mut self, input: std::option::Option<i32>) -> Self {
self.target_monitor_nits = input;
self
}
/// Consumes the builder and constructs a [`Hdr10Plus`](crate::model::Hdr10Plus)
pub fn build(self) -> crate::model::Hdr10Plus {
crate::model::Hdr10Plus {
mastering_monitor_nits: self.mastering_monitor_nits.unwrap_or_default(),
target_monitor_nits: self.target_monitor_nits.unwrap_or_default(),
}
}
}
}
impl Hdr10Plus {
/// Creates a new builder-style object to manufacture [`Hdr10Plus`](crate::model::Hdr10Plus)
pub fn builder() -> crate::model::hdr10_plus::Builder {
crate::model::hdr10_plus::Builder::default()
}
}
/// With AWS Elemental MediaConvert, you can create profile 5 or 8.1 Dolby Vision outputs from MXF and IMF sources.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DolbyVision {
/// Use these settings when you set DolbyVisionLevel6Mode to SPECIFY to override the MaxCLL and MaxFALL values in your input with new values.
pub l6_metadata: std::option::Option<crate::model::DolbyVisionLevel6Metadata>,
/// Use Dolby Vision Mode to choose how the service will handle Dolby Vision MaxCLL and MaxFALL properies.
pub l6_mode: std::option::Option<crate::model::DolbyVisionLevel6Mode>,
/// Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.
pub mapping: std::option::Option<crate::model::DolbyVisionMapping>,
/// Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.
pub profile: std::option::Option<crate::model::DolbyVisionProfile>,
}
impl DolbyVision {
/// Use these settings when you set DolbyVisionLevel6Mode to SPECIFY to override the MaxCLL and MaxFALL values in your input with new values.
pub fn l6_metadata(&self) -> std::option::Option<&crate::model::DolbyVisionLevel6Metadata> {
self.l6_metadata.as_ref()
}
/// Use Dolby Vision Mode to choose how the service will handle Dolby Vision MaxCLL and MaxFALL properies.
pub fn l6_mode(&self) -> std::option::Option<&crate::model::DolbyVisionLevel6Mode> {
self.l6_mode.as_ref()
}
/// Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.
pub fn mapping(&self) -> std::option::Option<&crate::model::DolbyVisionMapping> {
self.mapping.as_ref()
}
/// Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.
pub fn profile(&self) -> std::option::Option<&crate::model::DolbyVisionProfile> {
self.profile.as_ref()
}
}
impl std::fmt::Debug for DolbyVision {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DolbyVision");
formatter.field("l6_metadata", &self.l6_metadata);
formatter.field("l6_mode", &self.l6_mode);
formatter.field("mapping", &self.mapping);
formatter.field("profile", &self.profile);
formatter.finish()
}
}
/// See [`DolbyVision`](crate::model::DolbyVision)
pub mod dolby_vision {
/// A builder for [`DolbyVision`](crate::model::DolbyVision)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) l6_metadata: std::option::Option<crate::model::DolbyVisionLevel6Metadata>,
pub(crate) l6_mode: std::option::Option<crate::model::DolbyVisionLevel6Mode>,
pub(crate) mapping: std::option::Option<crate::model::DolbyVisionMapping>,
pub(crate) profile: std::option::Option<crate::model::DolbyVisionProfile>,
}
impl Builder {
/// Use these settings when you set DolbyVisionLevel6Mode to SPECIFY to override the MaxCLL and MaxFALL values in your input with new values.
pub fn l6_metadata(mut self, input: crate::model::DolbyVisionLevel6Metadata) -> Self {
self.l6_metadata = Some(input);
self
}
/// Use these settings when you set DolbyVisionLevel6Mode to SPECIFY to override the MaxCLL and MaxFALL values in your input with new values.
pub fn set_l6_metadata(
mut self,
input: std::option::Option<crate::model::DolbyVisionLevel6Metadata>,
) -> Self {
self.l6_metadata = input;
self
}
/// Use Dolby Vision Mode to choose how the service will handle Dolby Vision MaxCLL and MaxFALL properies.
pub fn l6_mode(mut self, input: crate::model::DolbyVisionLevel6Mode) -> Self {
self.l6_mode = Some(input);
self
}
/// Use Dolby Vision Mode to choose how the service will handle Dolby Vision MaxCLL and MaxFALL properies.
pub fn set_l6_mode(
mut self,
input: std::option::Option<crate::model::DolbyVisionLevel6Mode>,
) -> Self {
self.l6_mode = input;
self
}
/// Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.
pub fn mapping(mut self, input: crate::model::DolbyVisionMapping) -> Self {
self.mapping = Some(input);
self
}
/// Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.
pub fn set_mapping(
mut self,
input: std::option::Option<crate::model::DolbyVisionMapping>,
) -> Self {
self.mapping = input;
self
}
/// Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.
pub fn profile(mut self, input: crate::model::DolbyVisionProfile) -> Self {
self.profile = Some(input);
self
}
/// Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.
pub fn set_profile(
mut self,
input: std::option::Option<crate::model::DolbyVisionProfile>,
) -> Self {
self.profile = input;
self
}
/// Consumes the builder and constructs a [`DolbyVision`](crate::model::DolbyVision)
pub fn build(self) -> crate::model::DolbyVision {
crate::model::DolbyVision {
l6_metadata: self.l6_metadata,
l6_mode: self.l6_mode,
mapping: self.mapping,
profile: self.profile,
}
}
}
}
impl DolbyVision {
/// Creates a new builder-style object to manufacture [`DolbyVision`](crate::model::DolbyVision)
pub fn builder() -> crate::model::dolby_vision::Builder {
crate::model::dolby_vision::Builder::default()
}
}
/// Required when you use Dolby Vision processing. Set Profile to Profile 5 to only include frame-interleaved Dolby Vision metadata in your output. Set Profile to Profile 8.1 to include both frame-interleaved Dolby Vision metadata and HDR10 metadata in your output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DolbyVisionProfile {
#[allow(missing_docs)] // documentation missing in model
Profile5,
#[allow(missing_docs)] // documentation missing in model
Profile81,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DolbyVisionProfile {
fn from(s: &str) -> Self {
match s {
"PROFILE_5" => DolbyVisionProfile::Profile5,
"PROFILE_8_1" => DolbyVisionProfile::Profile81,
other => DolbyVisionProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DolbyVisionProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DolbyVisionProfile::from(s))
}
}
impl DolbyVisionProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DolbyVisionProfile::Profile5 => "PROFILE_5",
DolbyVisionProfile::Profile81 => "PROFILE_8_1",
DolbyVisionProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["PROFILE_5", "PROFILE_8_1"]
}
}
impl AsRef<str> for DolbyVisionProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set Dolby Vision Profile to Profile 8.1. When you set Content mapping to None, content mapping is not applied to the HDR10-compatible signal. Depending on the source peak nit level, clipping might occur on HDR devices without Dolby Vision. When you set Content mapping to HDR10 1000, the transcoder creates a 1,000 nits peak HDR10-compatible signal by applying static content mapping to the source. This mode is speed-optimized for PQ10 sources with metadata that is created from analysis. For graded Dolby Vision content, be aware that creative intent might not be guaranteed with extreme 1,000 nits trims.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DolbyVisionMapping {
#[allow(missing_docs)] // documentation missing in model
Hdr101000,
#[allow(missing_docs)] // documentation missing in model
Hdr10Nomap,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DolbyVisionMapping {
fn from(s: &str) -> Self {
match s {
"HDR10_1000" => DolbyVisionMapping::Hdr101000,
"HDR10_NOMAP" => DolbyVisionMapping::Hdr10Nomap,
other => DolbyVisionMapping::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DolbyVisionMapping {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DolbyVisionMapping::from(s))
}
}
impl DolbyVisionMapping {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DolbyVisionMapping::Hdr101000 => "HDR10_1000",
DolbyVisionMapping::Hdr10Nomap => "HDR10_NOMAP",
DolbyVisionMapping::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HDR10_1000", "HDR10_NOMAP"]
}
}
impl AsRef<str> for DolbyVisionMapping {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Dolby Vision Mode to choose how the service will handle Dolby Vision MaxCLL and MaxFALL properies.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DolbyVisionLevel6Mode {
#[allow(missing_docs)] // documentation missing in model
Passthrough,
#[allow(missing_docs)] // documentation missing in model
Recalculate,
#[allow(missing_docs)] // documentation missing in model
Specify,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DolbyVisionLevel6Mode {
fn from(s: &str) -> Self {
match s {
"PASSTHROUGH" => DolbyVisionLevel6Mode::Passthrough,
"RECALCULATE" => DolbyVisionLevel6Mode::Recalculate,
"SPECIFY" => DolbyVisionLevel6Mode::Specify,
other => DolbyVisionLevel6Mode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DolbyVisionLevel6Mode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DolbyVisionLevel6Mode::from(s))
}
}
impl DolbyVisionLevel6Mode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DolbyVisionLevel6Mode::Passthrough => "PASSTHROUGH",
DolbyVisionLevel6Mode::Recalculate => "RECALCULATE",
DolbyVisionLevel6Mode::Specify => "SPECIFY",
DolbyVisionLevel6Mode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["PASSTHROUGH", "RECALCULATE", "SPECIFY"]
}
}
impl AsRef<str> for DolbyVisionLevel6Mode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use these settings when you set DolbyVisionLevel6Mode to SPECIFY to override the MaxCLL and MaxFALL values in your input with new values.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DolbyVisionLevel6Metadata {
/// Maximum Content Light Level. Static HDR metadata that corresponds to the brightest pixel in the entire stream. Measured in nits.
pub max_cll: i32,
/// Maximum Frame-Average Light Level. Static HDR metadata that corresponds to the highest frame-average brightness in the entire stream. Measured in nits.
pub max_fall: i32,
}
impl DolbyVisionLevel6Metadata {
/// Maximum Content Light Level. Static HDR metadata that corresponds to the brightest pixel in the entire stream. Measured in nits.
pub fn max_cll(&self) -> i32 {
self.max_cll
}
/// Maximum Frame-Average Light Level. Static HDR metadata that corresponds to the highest frame-average brightness in the entire stream. Measured in nits.
pub fn max_fall(&self) -> i32 {
self.max_fall
}
}
impl std::fmt::Debug for DolbyVisionLevel6Metadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DolbyVisionLevel6Metadata");
formatter.field("max_cll", &self.max_cll);
formatter.field("max_fall", &self.max_fall);
formatter.finish()
}
}
/// See [`DolbyVisionLevel6Metadata`](crate::model::DolbyVisionLevel6Metadata)
pub mod dolby_vision_level6_metadata {
/// A builder for [`DolbyVisionLevel6Metadata`](crate::model::DolbyVisionLevel6Metadata)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_cll: std::option::Option<i32>,
pub(crate) max_fall: std::option::Option<i32>,
}
impl Builder {
/// Maximum Content Light Level. Static HDR metadata that corresponds to the brightest pixel in the entire stream. Measured in nits.
pub fn max_cll(mut self, input: i32) -> Self {
self.max_cll = Some(input);
self
}
/// Maximum Content Light Level. Static HDR metadata that corresponds to the brightest pixel in the entire stream. Measured in nits.
pub fn set_max_cll(mut self, input: std::option::Option<i32>) -> Self {
self.max_cll = input;
self
}
/// Maximum Frame-Average Light Level. Static HDR metadata that corresponds to the highest frame-average brightness in the entire stream. Measured in nits.
pub fn max_fall(mut self, input: i32) -> Self {
self.max_fall = Some(input);
self
}
/// Maximum Frame-Average Light Level. Static HDR metadata that corresponds to the highest frame-average brightness in the entire stream. Measured in nits.
pub fn set_max_fall(mut self, input: std::option::Option<i32>) -> Self {
self.max_fall = input;
self
}
/// Consumes the builder and constructs a [`DolbyVisionLevel6Metadata`](crate::model::DolbyVisionLevel6Metadata)
pub fn build(self) -> crate::model::DolbyVisionLevel6Metadata {
crate::model::DolbyVisionLevel6Metadata {
max_cll: self.max_cll.unwrap_or_default(),
max_fall: self.max_fall.unwrap_or_default(),
}
}
}
}
impl DolbyVisionLevel6Metadata {
/// Creates a new builder-style object to manufacture [`DolbyVisionLevel6Metadata`](crate::model::DolbyVisionLevel6Metadata)
pub fn builder() -> crate::model::dolby_vision_level6_metadata::Builder {
crate::model::dolby_vision_level6_metadata::Builder::default()
}
}
/// Settings for deinterlacer
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Deinterlacer {
/// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling headline at the bottom of the frame.
pub algorithm: std::option::Option<crate::model::DeinterlaceAlgorithm>,
/// - When set to NORMAL (default), the deinterlacer does not convert frames that are tagged in metadata as progressive. It will only convert those that are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer converts every frame to progressive - even those that are already tagged as progressive. Turn Force mode on only if there is a good chance that the metadata has tagged frames as progressive when they are not progressive. Do not turn on otherwise; processing frames that are already progressive into progressive will probably result in lower quality video.
pub control: std::option::Option<crate::model::DeinterlacerControl>,
/// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. Default is Deinterlace. - Deinterlace converts interlaced to progressive. - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. - Adaptive auto-detects and converts to progressive.
pub mode: std::option::Option<crate::model::DeinterlacerMode>,
}
impl Deinterlacer {
/// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling headline at the bottom of the frame.
pub fn algorithm(&self) -> std::option::Option<&crate::model::DeinterlaceAlgorithm> {
self.algorithm.as_ref()
}
/// - When set to NORMAL (default), the deinterlacer does not convert frames that are tagged in metadata as progressive. It will only convert those that are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer converts every frame to progressive - even those that are already tagged as progressive. Turn Force mode on only if there is a good chance that the metadata has tagged frames as progressive when they are not progressive. Do not turn on otherwise; processing frames that are already progressive into progressive will probably result in lower quality video.
pub fn control(&self) -> std::option::Option<&crate::model::DeinterlacerControl> {
self.control.as_ref()
}
/// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. Default is Deinterlace. - Deinterlace converts interlaced to progressive. - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. - Adaptive auto-detects and converts to progressive.
pub fn mode(&self) -> std::option::Option<&crate::model::DeinterlacerMode> {
self.mode.as_ref()
}
}
impl std::fmt::Debug for Deinterlacer {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Deinterlacer");
formatter.field("algorithm", &self.algorithm);
formatter.field("control", &self.control);
formatter.field("mode", &self.mode);
formatter.finish()
}
}
/// See [`Deinterlacer`](crate::model::Deinterlacer)
pub mod deinterlacer {
/// A builder for [`Deinterlacer`](crate::model::Deinterlacer)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) algorithm: std::option::Option<crate::model::DeinterlaceAlgorithm>,
pub(crate) control: std::option::Option<crate::model::DeinterlacerControl>,
pub(crate) mode: std::option::Option<crate::model::DeinterlacerMode>,
}
impl Builder {
/// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling headline at the bottom of the frame.
pub fn algorithm(mut self, input: crate::model::DeinterlaceAlgorithm) -> Self {
self.algorithm = Some(input);
self
}
/// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling headline at the bottom of the frame.
pub fn set_algorithm(
mut self,
input: std::option::Option<crate::model::DeinterlaceAlgorithm>,
) -> Self {
self.algorithm = input;
self
}
/// - When set to NORMAL (default), the deinterlacer does not convert frames that are tagged in metadata as progressive. It will only convert those that are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer converts every frame to progressive - even those that are already tagged as progressive. Turn Force mode on only if there is a good chance that the metadata has tagged frames as progressive when they are not progressive. Do not turn on otherwise; processing frames that are already progressive into progressive will probably result in lower quality video.
pub fn control(mut self, input: crate::model::DeinterlacerControl) -> Self {
self.control = Some(input);
self
}
/// - When set to NORMAL (default), the deinterlacer does not convert frames that are tagged in metadata as progressive. It will only convert those that are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer converts every frame to progressive - even those that are already tagged as progressive. Turn Force mode on only if there is a good chance that the metadata has tagged frames as progressive when they are not progressive. Do not turn on otherwise; processing frames that are already progressive into progressive will probably result in lower quality video.
pub fn set_control(
mut self,
input: std::option::Option<crate::model::DeinterlacerControl>,
) -> Self {
self.control = input;
self
}
/// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. Default is Deinterlace. - Deinterlace converts interlaced to progressive. - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. - Adaptive auto-detects and converts to progressive.
pub fn mode(mut self, input: crate::model::DeinterlacerMode) -> Self {
self.mode = Some(input);
self
}
/// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. Default is Deinterlace. - Deinterlace converts interlaced to progressive. - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. - Adaptive auto-detects and converts to progressive.
pub fn set_mode(
mut self,
input: std::option::Option<crate::model::DeinterlacerMode>,
) -> Self {
self.mode = input;
self
}
/// Consumes the builder and constructs a [`Deinterlacer`](crate::model::Deinterlacer)
pub fn build(self) -> crate::model::Deinterlacer {
crate::model::Deinterlacer {
algorithm: self.algorithm,
control: self.control,
mode: self.mode,
}
}
}
}
impl Deinterlacer {
/// Creates a new builder-style object to manufacture [`Deinterlacer`](crate::model::Deinterlacer)
pub fn builder() -> crate::model::deinterlacer::Builder {
crate::model::deinterlacer::Builder::default()
}
}
/// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. Default is Deinterlace. - Deinterlace converts interlaced to progressive. - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. - Adaptive auto-detects and converts to progressive.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DeinterlacerMode {
#[allow(missing_docs)] // documentation missing in model
Adaptive,
#[allow(missing_docs)] // documentation missing in model
Deinterlace,
#[allow(missing_docs)] // documentation missing in model
InverseTelecine,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DeinterlacerMode {
fn from(s: &str) -> Self {
match s {
"ADAPTIVE" => DeinterlacerMode::Adaptive,
"DEINTERLACE" => DeinterlacerMode::Deinterlace,
"INVERSE_TELECINE" => DeinterlacerMode::InverseTelecine,
other => DeinterlacerMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeinterlacerMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeinterlacerMode::from(s))
}
}
impl DeinterlacerMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DeinterlacerMode::Adaptive => "ADAPTIVE",
DeinterlacerMode::Deinterlace => "DEINTERLACE",
DeinterlacerMode::InverseTelecine => "INVERSE_TELECINE",
DeinterlacerMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADAPTIVE", "DEINTERLACE", "INVERSE_TELECINE"]
}
}
impl AsRef<str> for DeinterlacerMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// - When set to NORMAL (default), the deinterlacer does not convert frames that are tagged in metadata as progressive. It will only convert those that are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer converts every frame to progressive - even those that are already tagged as progressive. Turn Force mode on only if there is a good chance that the metadata has tagged frames as progressive when they are not progressive. Do not turn on otherwise; processing frames that are already progressive into progressive will probably result in lower quality video.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DeinterlacerControl {
#[allow(missing_docs)] // documentation missing in model
ForceAllFrames,
#[allow(missing_docs)] // documentation missing in model
Normal,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DeinterlacerControl {
fn from(s: &str) -> Self {
match s {
"FORCE_ALL_FRAMES" => DeinterlacerControl::ForceAllFrames,
"NORMAL" => DeinterlacerControl::Normal,
other => DeinterlacerControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeinterlacerControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeinterlacerControl::from(s))
}
}
impl DeinterlacerControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DeinterlacerControl::ForceAllFrames => "FORCE_ALL_FRAMES",
DeinterlacerControl::Normal => "NORMAL",
DeinterlacerControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FORCE_ALL_FRAMES", "NORMAL"]
}
}
impl AsRef<str> for DeinterlacerControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling headline at the bottom of the frame.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DeinterlaceAlgorithm {
#[allow(missing_docs)] // documentation missing in model
Blend,
#[allow(missing_docs)] // documentation missing in model
BlendTicker,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
#[allow(missing_docs)] // documentation missing in model
InterpolateTicker,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DeinterlaceAlgorithm {
fn from(s: &str) -> Self {
match s {
"BLEND" => DeinterlaceAlgorithm::Blend,
"BLEND_TICKER" => DeinterlaceAlgorithm::BlendTicker,
"INTERPOLATE" => DeinterlaceAlgorithm::Interpolate,
"INTERPOLATE_TICKER" => DeinterlaceAlgorithm::InterpolateTicker,
other => DeinterlaceAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DeinterlaceAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeinterlaceAlgorithm::from(s))
}
}
impl DeinterlaceAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DeinterlaceAlgorithm::Blend => "BLEND",
DeinterlaceAlgorithm::BlendTicker => "BLEND_TICKER",
DeinterlaceAlgorithm::Interpolate => "INTERPOLATE",
DeinterlaceAlgorithm::InterpolateTicker => "INTERPOLATE_TICKER",
DeinterlaceAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["BLEND", "BLEND_TICKER", "INTERPOLATE", "INTERPOLATE_TICKER"]
}
}
impl AsRef<str> for DeinterlaceAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for color correction.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ColorCorrector {
/// Brightness level.
pub brightness: i32,
/// Specify the color space you want for this output. The service supports conversion between HDR formats, between SDR formats, from SDR to HDR, and from HDR to SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted video has an HDR format, but visually appears the same as an unconverted output. HDR to SDR conversion uses Elemental tone mapping technology to approximate the outcome of manually regrading from HDR to SDR.
pub color_space_conversion: std::option::Option<crate::model::ColorSpaceConversion>,
/// Contrast level.
pub contrast: i32,
/// Use these settings when you convert to the HDR 10 color space. Specify the SMPTE ST 2086 Mastering Display Color Volume static metadata that you want signaled in the output. These values don't affect the pixel values that are encoded in the video stream. They are intended to help the downstream video player display content in a way that reflects the intentions of the the content creator. When you set Color space conversion (ColorSpaceConversion) to HDR 10 (FORCE_HDR10), these settings are required. You must set values for Max frame average light level (maxFrameAverageLightLevel) and Max content light level (maxContentLightLevel); these settings don't have a default value. The default values for the other HDR 10 metadata settings are defined by the P3D65 color space. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub hdr10_metadata: std::option::Option<crate::model::Hdr10Metadata>,
/// Hue in degrees.
pub hue: i32,
/// Specify the video color sample range for this output. To create a full range output, you must start with a full range YUV input and keep the default value, None (NONE). To create a limited range output from a full range input, choose Limited range (LIMITED_RANGE_SQUEEZE). With RGB inputs, your output is always limited range, regardless of your choice here. When you create a limited range output from a full range input, MediaConvert limits the active pixel values in a way that depends on the output's bit depth: 8-bit outputs contain only values from 16 through 235 and 10-bit outputs contain only values from 64 through 940. With this conversion, MediaConvert also changes the output metadata to note the limited range.
pub sample_range_conversion: std::option::Option<crate::model::SampleRangeConversion>,
/// Saturation level.
pub saturation: i32,
}
impl ColorCorrector {
/// Brightness level.
pub fn brightness(&self) -> i32 {
self.brightness
}
/// Specify the color space you want for this output. The service supports conversion between HDR formats, between SDR formats, from SDR to HDR, and from HDR to SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted video has an HDR format, but visually appears the same as an unconverted output. HDR to SDR conversion uses Elemental tone mapping technology to approximate the outcome of manually regrading from HDR to SDR.
pub fn color_space_conversion(
&self,
) -> std::option::Option<&crate::model::ColorSpaceConversion> {
self.color_space_conversion.as_ref()
}
/// Contrast level.
pub fn contrast(&self) -> i32 {
self.contrast
}
/// Use these settings when you convert to the HDR 10 color space. Specify the SMPTE ST 2086 Mastering Display Color Volume static metadata that you want signaled in the output. These values don't affect the pixel values that are encoded in the video stream. They are intended to help the downstream video player display content in a way that reflects the intentions of the the content creator. When you set Color space conversion (ColorSpaceConversion) to HDR 10 (FORCE_HDR10), these settings are required. You must set values for Max frame average light level (maxFrameAverageLightLevel) and Max content light level (maxContentLightLevel); these settings don't have a default value. The default values for the other HDR 10 metadata settings are defined by the P3D65 color space. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub fn hdr10_metadata(&self) -> std::option::Option<&crate::model::Hdr10Metadata> {
self.hdr10_metadata.as_ref()
}
/// Hue in degrees.
pub fn hue(&self) -> i32 {
self.hue
}
/// Specify the video color sample range for this output. To create a full range output, you must start with a full range YUV input and keep the default value, None (NONE). To create a limited range output from a full range input, choose Limited range (LIMITED_RANGE_SQUEEZE). With RGB inputs, your output is always limited range, regardless of your choice here. When you create a limited range output from a full range input, MediaConvert limits the active pixel values in a way that depends on the output's bit depth: 8-bit outputs contain only values from 16 through 235 and 10-bit outputs contain only values from 64 through 940. With this conversion, MediaConvert also changes the output metadata to note the limited range.
pub fn sample_range_conversion(
&self,
) -> std::option::Option<&crate::model::SampleRangeConversion> {
self.sample_range_conversion.as_ref()
}
/// Saturation level.
pub fn saturation(&self) -> i32 {
self.saturation
}
}
impl std::fmt::Debug for ColorCorrector {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ColorCorrector");
formatter.field("brightness", &self.brightness);
formatter.field("color_space_conversion", &self.color_space_conversion);
formatter.field("contrast", &self.contrast);
formatter.field("hdr10_metadata", &self.hdr10_metadata);
formatter.field("hue", &self.hue);
formatter.field("sample_range_conversion", &self.sample_range_conversion);
formatter.field("saturation", &self.saturation);
formatter.finish()
}
}
/// See [`ColorCorrector`](crate::model::ColorCorrector)
pub mod color_corrector {
/// A builder for [`ColorCorrector`](crate::model::ColorCorrector)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) brightness: std::option::Option<i32>,
pub(crate) color_space_conversion: std::option::Option<crate::model::ColorSpaceConversion>,
pub(crate) contrast: std::option::Option<i32>,
pub(crate) hdr10_metadata: std::option::Option<crate::model::Hdr10Metadata>,
pub(crate) hue: std::option::Option<i32>,
pub(crate) sample_range_conversion:
std::option::Option<crate::model::SampleRangeConversion>,
pub(crate) saturation: std::option::Option<i32>,
}
impl Builder {
/// Brightness level.
pub fn brightness(mut self, input: i32) -> Self {
self.brightness = Some(input);
self
}
/// Brightness level.
pub fn set_brightness(mut self, input: std::option::Option<i32>) -> Self {
self.brightness = input;
self
}
/// Specify the color space you want for this output. The service supports conversion between HDR formats, between SDR formats, from SDR to HDR, and from HDR to SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted video has an HDR format, but visually appears the same as an unconverted output. HDR to SDR conversion uses Elemental tone mapping technology to approximate the outcome of manually regrading from HDR to SDR.
pub fn color_space_conversion(mut self, input: crate::model::ColorSpaceConversion) -> Self {
self.color_space_conversion = Some(input);
self
}
/// Specify the color space you want for this output. The service supports conversion between HDR formats, between SDR formats, from SDR to HDR, and from HDR to SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted video has an HDR format, but visually appears the same as an unconverted output. HDR to SDR conversion uses Elemental tone mapping technology to approximate the outcome of manually regrading from HDR to SDR.
pub fn set_color_space_conversion(
mut self,
input: std::option::Option<crate::model::ColorSpaceConversion>,
) -> Self {
self.color_space_conversion = input;
self
}
/// Contrast level.
pub fn contrast(mut self, input: i32) -> Self {
self.contrast = Some(input);
self
}
/// Contrast level.
pub fn set_contrast(mut self, input: std::option::Option<i32>) -> Self {
self.contrast = input;
self
}
/// Use these settings when you convert to the HDR 10 color space. Specify the SMPTE ST 2086 Mastering Display Color Volume static metadata that you want signaled in the output. These values don't affect the pixel values that are encoded in the video stream. They are intended to help the downstream video player display content in a way that reflects the intentions of the the content creator. When you set Color space conversion (ColorSpaceConversion) to HDR 10 (FORCE_HDR10), these settings are required. You must set values for Max frame average light level (maxFrameAverageLightLevel) and Max content light level (maxContentLightLevel); these settings don't have a default value. The default values for the other HDR 10 metadata settings are defined by the P3D65 color space. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub fn hdr10_metadata(mut self, input: crate::model::Hdr10Metadata) -> Self {
self.hdr10_metadata = Some(input);
self
}
/// Use these settings when you convert to the HDR 10 color space. Specify the SMPTE ST 2086 Mastering Display Color Volume static metadata that you want signaled in the output. These values don't affect the pixel values that are encoded in the video stream. They are intended to help the downstream video player display content in a way that reflects the intentions of the the content creator. When you set Color space conversion (ColorSpaceConversion) to HDR 10 (FORCE_HDR10), these settings are required. You must set values for Max frame average light level (maxFrameAverageLightLevel) and Max content light level (maxContentLightLevel); these settings don't have a default value. The default values for the other HDR 10 metadata settings are defined by the P3D65 color space. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub fn set_hdr10_metadata(
mut self,
input: std::option::Option<crate::model::Hdr10Metadata>,
) -> Self {
self.hdr10_metadata = input;
self
}
/// Hue in degrees.
pub fn hue(mut self, input: i32) -> Self {
self.hue = Some(input);
self
}
/// Hue in degrees.
pub fn set_hue(mut self, input: std::option::Option<i32>) -> Self {
self.hue = input;
self
}
/// Specify the video color sample range for this output. To create a full range output, you must start with a full range YUV input and keep the default value, None (NONE). To create a limited range output from a full range input, choose Limited range (LIMITED_RANGE_SQUEEZE). With RGB inputs, your output is always limited range, regardless of your choice here. When you create a limited range output from a full range input, MediaConvert limits the active pixel values in a way that depends on the output's bit depth: 8-bit outputs contain only values from 16 through 235 and 10-bit outputs contain only values from 64 through 940. With this conversion, MediaConvert also changes the output metadata to note the limited range.
pub fn sample_range_conversion(
mut self,
input: crate::model::SampleRangeConversion,
) -> Self {
self.sample_range_conversion = Some(input);
self
}
/// Specify the video color sample range for this output. To create a full range output, you must start with a full range YUV input and keep the default value, None (NONE). To create a limited range output from a full range input, choose Limited range (LIMITED_RANGE_SQUEEZE). With RGB inputs, your output is always limited range, regardless of your choice here. When you create a limited range output from a full range input, MediaConvert limits the active pixel values in a way that depends on the output's bit depth: 8-bit outputs contain only values from 16 through 235 and 10-bit outputs contain only values from 64 through 940. With this conversion, MediaConvert also changes the output metadata to note the limited range.
pub fn set_sample_range_conversion(
mut self,
input: std::option::Option<crate::model::SampleRangeConversion>,
) -> Self {
self.sample_range_conversion = input;
self
}
/// Saturation level.
pub fn saturation(mut self, input: i32) -> Self {
self.saturation = Some(input);
self
}
/// Saturation level.
pub fn set_saturation(mut self, input: std::option::Option<i32>) -> Self {
self.saturation = input;
self
}
/// Consumes the builder and constructs a [`ColorCorrector`](crate::model::ColorCorrector)
pub fn build(self) -> crate::model::ColorCorrector {
crate::model::ColorCorrector {
brightness: self.brightness.unwrap_or_default(),
color_space_conversion: self.color_space_conversion,
contrast: self.contrast.unwrap_or_default(),
hdr10_metadata: self.hdr10_metadata,
hue: self.hue.unwrap_or_default(),
sample_range_conversion: self.sample_range_conversion,
saturation: self.saturation.unwrap_or_default(),
}
}
}
}
impl ColorCorrector {
/// Creates a new builder-style object to manufacture [`ColorCorrector`](crate::model::ColorCorrector)
pub fn builder() -> crate::model::color_corrector::Builder {
crate::model::color_corrector::Builder::default()
}
}
/// Specify the video color sample range for this output. To create a full range output, you must start with a full range YUV input and keep the default value, None (NONE). To create a limited range output from a full range input, choose Limited range (LIMITED_RANGE_SQUEEZE). With RGB inputs, your output is always limited range, regardless of your choice here. When you create a limited range output from a full range input, MediaConvert limits the active pixel values in a way that depends on the output's bit depth: 8-bit outputs contain only values from 16 through 235 and 10-bit outputs contain only values from 64 through 940. With this conversion, MediaConvert also changes the output metadata to note the limited range.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SampleRangeConversion {
#[allow(missing_docs)] // documentation missing in model
LimitedRangeSqueeze,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for SampleRangeConversion {
fn from(s: &str) -> Self {
match s {
"LIMITED_RANGE_SQUEEZE" => SampleRangeConversion::LimitedRangeSqueeze,
"NONE" => SampleRangeConversion::None,
other => SampleRangeConversion::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SampleRangeConversion {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SampleRangeConversion::from(s))
}
}
impl SampleRangeConversion {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
SampleRangeConversion::LimitedRangeSqueeze => "LIMITED_RANGE_SQUEEZE",
SampleRangeConversion::None => "NONE",
SampleRangeConversion::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["LIMITED_RANGE_SQUEEZE", "NONE"]
}
}
impl AsRef<str> for SampleRangeConversion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use these settings to specify static color calibration metadata, as defined by SMPTE ST 2086. These values don't affect the pixel values that are encoded in the video stream. They are intended to help the downstream video player display content in a way that reflects the intentions of the the content creator.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Hdr10Metadata {
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub blue_primary_x: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub blue_primary_y: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub green_primary_x: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub green_primary_y: i32,
/// Maximum light level among all samples in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub max_content_light_level: i32,
/// Maximum average light level of any frame in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub max_frame_average_light_level: i32,
/// Nominal maximum mastering display luminance in units of of 0.0001 candelas per square meter.
pub max_luminance: i32,
/// Nominal minimum mastering display luminance in units of of 0.0001 candelas per square meter
pub min_luminance: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub red_primary_x: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub red_primary_y: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub white_point_x: i32,
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub white_point_y: i32,
}
impl Hdr10Metadata {
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn blue_primary_x(&self) -> i32 {
self.blue_primary_x
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn blue_primary_y(&self) -> i32 {
self.blue_primary_y
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn green_primary_x(&self) -> i32 {
self.green_primary_x
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn green_primary_y(&self) -> i32 {
self.green_primary_y
}
/// Maximum light level among all samples in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub fn max_content_light_level(&self) -> i32 {
self.max_content_light_level
}
/// Maximum average light level of any frame in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub fn max_frame_average_light_level(&self) -> i32 {
self.max_frame_average_light_level
}
/// Nominal maximum mastering display luminance in units of of 0.0001 candelas per square meter.
pub fn max_luminance(&self) -> i32 {
self.max_luminance
}
/// Nominal minimum mastering display luminance in units of of 0.0001 candelas per square meter
pub fn min_luminance(&self) -> i32 {
self.min_luminance
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn red_primary_x(&self) -> i32 {
self.red_primary_x
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn red_primary_y(&self) -> i32 {
self.red_primary_y
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn white_point_x(&self) -> i32 {
self.white_point_x
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn white_point_y(&self) -> i32 {
self.white_point_y
}
}
impl std::fmt::Debug for Hdr10Metadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Hdr10Metadata");
formatter.field("blue_primary_x", &self.blue_primary_x);
formatter.field("blue_primary_y", &self.blue_primary_y);
formatter.field("green_primary_x", &self.green_primary_x);
formatter.field("green_primary_y", &self.green_primary_y);
formatter.field("max_content_light_level", &self.max_content_light_level);
formatter.field(
"max_frame_average_light_level",
&self.max_frame_average_light_level,
);
formatter.field("max_luminance", &self.max_luminance);
formatter.field("min_luminance", &self.min_luminance);
formatter.field("red_primary_x", &self.red_primary_x);
formatter.field("red_primary_y", &self.red_primary_y);
formatter.field("white_point_x", &self.white_point_x);
formatter.field("white_point_y", &self.white_point_y);
formatter.finish()
}
}
/// See [`Hdr10Metadata`](crate::model::Hdr10Metadata)
pub mod hdr10_metadata {
/// A builder for [`Hdr10Metadata`](crate::model::Hdr10Metadata)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) blue_primary_x: std::option::Option<i32>,
pub(crate) blue_primary_y: std::option::Option<i32>,
pub(crate) green_primary_x: std::option::Option<i32>,
pub(crate) green_primary_y: std::option::Option<i32>,
pub(crate) max_content_light_level: std::option::Option<i32>,
pub(crate) max_frame_average_light_level: std::option::Option<i32>,
pub(crate) max_luminance: std::option::Option<i32>,
pub(crate) min_luminance: std::option::Option<i32>,
pub(crate) red_primary_x: std::option::Option<i32>,
pub(crate) red_primary_y: std::option::Option<i32>,
pub(crate) white_point_x: std::option::Option<i32>,
pub(crate) white_point_y: std::option::Option<i32>,
}
impl Builder {
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn blue_primary_x(mut self, input: i32) -> Self {
self.blue_primary_x = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_blue_primary_x(mut self, input: std::option::Option<i32>) -> Self {
self.blue_primary_x = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn blue_primary_y(mut self, input: i32) -> Self {
self.blue_primary_y = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_blue_primary_y(mut self, input: std::option::Option<i32>) -> Self {
self.blue_primary_y = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn green_primary_x(mut self, input: i32) -> Self {
self.green_primary_x = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_green_primary_x(mut self, input: std::option::Option<i32>) -> Self {
self.green_primary_x = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn green_primary_y(mut self, input: i32) -> Self {
self.green_primary_y = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_green_primary_y(mut self, input: std::option::Option<i32>) -> Self {
self.green_primary_y = input;
self
}
/// Maximum light level among all samples in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub fn max_content_light_level(mut self, input: i32) -> Self {
self.max_content_light_level = Some(input);
self
}
/// Maximum light level among all samples in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub fn set_max_content_light_level(mut self, input: std::option::Option<i32>) -> Self {
self.max_content_light_level = input;
self
}
/// Maximum average light level of any frame in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub fn max_frame_average_light_level(mut self, input: i32) -> Self {
self.max_frame_average_light_level = Some(input);
self
}
/// Maximum average light level of any frame in the coded video sequence, in units of candelas per square meter. This setting doesn't have a default value; you must specify a value that is suitable for the content.
pub fn set_max_frame_average_light_level(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.max_frame_average_light_level = input;
self
}
/// Nominal maximum mastering display luminance in units of of 0.0001 candelas per square meter.
pub fn max_luminance(mut self, input: i32) -> Self {
self.max_luminance = Some(input);
self
}
/// Nominal maximum mastering display luminance in units of of 0.0001 candelas per square meter.
pub fn set_max_luminance(mut self, input: std::option::Option<i32>) -> Self {
self.max_luminance = input;
self
}
/// Nominal minimum mastering display luminance in units of of 0.0001 candelas per square meter
pub fn min_luminance(mut self, input: i32) -> Self {
self.min_luminance = Some(input);
self
}
/// Nominal minimum mastering display luminance in units of of 0.0001 candelas per square meter
pub fn set_min_luminance(mut self, input: std::option::Option<i32>) -> Self {
self.min_luminance = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn red_primary_x(mut self, input: i32) -> Self {
self.red_primary_x = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_red_primary_x(mut self, input: std::option::Option<i32>) -> Self {
self.red_primary_x = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn red_primary_y(mut self, input: i32) -> Self {
self.red_primary_y = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_red_primary_y(mut self, input: std::option::Option<i32>) -> Self {
self.red_primary_y = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn white_point_x(mut self, input: i32) -> Self {
self.white_point_x = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_white_point_x(mut self, input: std::option::Option<i32>) -> Self {
self.white_point_x = input;
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn white_point_y(mut self, input: i32) -> Self {
self.white_point_y = Some(input);
self
}
/// HDR Master Display Information must be provided by a color grader, using color grading tools. Range is 0 to 50,000, each increment represents 0.00002 in CIE1931 color coordinate. Note that this setting is not for color correction.
pub fn set_white_point_y(mut self, input: std::option::Option<i32>) -> Self {
self.white_point_y = input;
self
}
/// Consumes the builder and constructs a [`Hdr10Metadata`](crate::model::Hdr10Metadata)
pub fn build(self) -> crate::model::Hdr10Metadata {
crate::model::Hdr10Metadata {
blue_primary_x: self.blue_primary_x.unwrap_or_default(),
blue_primary_y: self.blue_primary_y.unwrap_or_default(),
green_primary_x: self.green_primary_x.unwrap_or_default(),
green_primary_y: self.green_primary_y.unwrap_or_default(),
max_content_light_level: self.max_content_light_level.unwrap_or_default(),
max_frame_average_light_level: self
.max_frame_average_light_level
.unwrap_or_default(),
max_luminance: self.max_luminance.unwrap_or_default(),
min_luminance: self.min_luminance.unwrap_or_default(),
red_primary_x: self.red_primary_x.unwrap_or_default(),
red_primary_y: self.red_primary_y.unwrap_or_default(),
white_point_x: self.white_point_x.unwrap_or_default(),
white_point_y: self.white_point_y.unwrap_or_default(),
}
}
}
}
impl Hdr10Metadata {
/// Creates a new builder-style object to manufacture [`Hdr10Metadata`](crate::model::Hdr10Metadata)
pub fn builder() -> crate::model::hdr10_metadata::Builder {
crate::model::hdr10_metadata::Builder::default()
}
}
/// Specify the color space you want for this output. The service supports conversion between HDR formats, between SDR formats, from SDR to HDR, and from HDR to SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted video has an HDR format, but visually appears the same as an unconverted output. HDR to SDR conversion uses Elemental tone mapping technology to approximate the outcome of manually regrading from HDR to SDR.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ColorSpaceConversion {
#[allow(missing_docs)] // documentation missing in model
Force601,
#[allow(missing_docs)] // documentation missing in model
Force709,
#[allow(missing_docs)] // documentation missing in model
ForceHdr10,
#[allow(missing_docs)] // documentation missing in model
ForceHlg2020,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ColorSpaceConversion {
fn from(s: &str) -> Self {
match s {
"FORCE_601" => ColorSpaceConversion::Force601,
"FORCE_709" => ColorSpaceConversion::Force709,
"FORCE_HDR10" => ColorSpaceConversion::ForceHdr10,
"FORCE_HLG_2020" => ColorSpaceConversion::ForceHlg2020,
"NONE" => ColorSpaceConversion::None,
other => ColorSpaceConversion::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ColorSpaceConversion {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ColorSpaceConversion::from(s))
}
}
impl ColorSpaceConversion {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ColorSpaceConversion::Force601 => "FORCE_601",
ColorSpaceConversion::Force709 => "FORCE_709",
ColorSpaceConversion::ForceHdr10 => "FORCE_HDR10",
ColorSpaceConversion::ForceHlg2020 => "FORCE_HLG_2020",
ColorSpaceConversion::None => "NONE",
ColorSpaceConversion::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FORCE_601",
"FORCE_709",
"FORCE_HDR10",
"FORCE_HLG_2020",
"NONE",
]
}
}
impl AsRef<str> for ColorSpaceConversion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set the timecode for the first output frame to zero. To change this default behavior, adjust the settings under Timecode configuration (TimecodeConfig). In the console, these settings are located under Job > Job settings > Timecode configuration. Note - Timecode source under input settings (InputTimecodeSource) does not affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration (TimecodeSource) does.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum VideoTimecodeInsertion {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
PicTimingSei,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for VideoTimecodeInsertion {
fn from(s: &str) -> Self {
match s {
"DISABLED" => VideoTimecodeInsertion::Disabled,
"PIC_TIMING_SEI" => VideoTimecodeInsertion::PicTimingSei,
other => VideoTimecodeInsertion::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for VideoTimecodeInsertion {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(VideoTimecodeInsertion::from(s))
}
}
impl VideoTimecodeInsertion {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
VideoTimecodeInsertion::Disabled => "DISABLED",
VideoTimecodeInsertion::PicTimingSei => "PIC_TIMING_SEI",
VideoTimecodeInsertion::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "PIC_TIMING_SEI"]
}
}
impl AsRef<str> for VideoTimecodeInsertion {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how the service handles outputs that have a different aspect ratio from the input aspect ratio. Choose Stretch to output (STRETCH_TO_OUTPUT) to have the service stretch your video image to fit. Keep the setting Default (DEFAULT) to have the service letterbox your video instead. This setting overrides any value that you specify for the setting Selection placement (position) in this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ScalingBehavior {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
StretchToOutput,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ScalingBehavior {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => ScalingBehavior::Default,
"STRETCH_TO_OUTPUT" => ScalingBehavior::StretchToOutput,
other => ScalingBehavior::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ScalingBehavior {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ScalingBehavior::from(s))
}
}
impl ScalingBehavior {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ScalingBehavior::Default => "DEFAULT",
ScalingBehavior::StretchToOutput => "STRETCH_TO_OUTPUT",
ScalingBehavior::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "STRETCH_TO_OUTPUT"]
}
}
impl AsRef<str> for ScalingBehavior {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Respond to AFD (RespondToAfd) to specify how the service changes the video itself in response to AFD values in the input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling is set to (NONE). A preferred implementation of this workflow is to set RespondToAfd to (NONE) and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values from this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum RespondToAfd {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
#[allow(missing_docs)] // documentation missing in model
Respond,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for RespondToAfd {
fn from(s: &str) -> Self {
match s {
"NONE" => RespondToAfd::None,
"PASSTHROUGH" => RespondToAfd::Passthrough,
"RESPOND" => RespondToAfd::Respond,
other => RespondToAfd::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RespondToAfd {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RespondToAfd::from(s))
}
}
impl RespondToAfd {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
RespondToAfd::None => "NONE",
RespondToAfd::Passthrough => "PASSTHROUGH",
RespondToAfd::Respond => "RESPOND",
RespondToAfd::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH", "RESPOND"]
}
}
impl AsRef<str> for RespondToAfd {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Rectangle to identify a specific area of the video frame.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Rectangle {
/// Height of rectangle in pixels. Specify only even numbers.
pub height: i32,
/// Width of rectangle in pixels. Specify only even numbers.
pub width: i32,
/// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
pub x: i32,
/// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
pub y: i32,
}
impl Rectangle {
/// Height of rectangle in pixels. Specify only even numbers.
pub fn height(&self) -> i32 {
self.height
}
/// Width of rectangle in pixels. Specify only even numbers.
pub fn width(&self) -> i32 {
self.width
}
/// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
pub fn x(&self) -> i32 {
self.x
}
/// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
pub fn y(&self) -> i32 {
self.y
}
}
impl std::fmt::Debug for Rectangle {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Rectangle");
formatter.field("height", &self.height);
formatter.field("width", &self.width);
formatter.field("x", &self.x);
formatter.field("y", &self.y);
formatter.finish()
}
}
/// See [`Rectangle`](crate::model::Rectangle)
pub mod rectangle {
/// A builder for [`Rectangle`](crate::model::Rectangle)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) height: std::option::Option<i32>,
pub(crate) width: std::option::Option<i32>,
pub(crate) x: std::option::Option<i32>,
pub(crate) y: std::option::Option<i32>,
}
impl Builder {
/// Height of rectangle in pixels. Specify only even numbers.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Height of rectangle in pixels. Specify only even numbers.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Width of rectangle in pixels. Specify only even numbers.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Width of rectangle in pixels. Specify only even numbers.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
pub fn x(mut self, input: i32) -> Self {
self.x = Some(input);
self
}
/// The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
pub fn set_x(mut self, input: std::option::Option<i32>) -> Self {
self.x = input;
self
}
/// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
pub fn y(mut self, input: i32) -> Self {
self.y = Some(input);
self
}
/// The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
pub fn set_y(mut self, input: std::option::Option<i32>) -> Self {
self.y = input;
self
}
/// Consumes the builder and constructs a [`Rectangle`](crate::model::Rectangle)
pub fn build(self) -> crate::model::Rectangle {
crate::model::Rectangle {
height: self.height.unwrap_or_default(),
width: self.width.unwrap_or_default(),
x: self.x.unwrap_or_default(),
y: self.y.unwrap_or_default(),
}
}
}
}
impl Rectangle {
/// Creates a new builder-style object to manufacture [`Rectangle`](crate::model::Rectangle)
pub fn builder() -> crate::model::rectangle::Builder {
crate::model::rectangle::Builder::default()
}
}
/// Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is enabled by default when Timecode insertion (TimecodeInsertion) is enabled.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DropFrameTimecode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DropFrameTimecode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => DropFrameTimecode::Disabled,
"ENABLED" => DropFrameTimecode::Enabled,
other => DropFrameTimecode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DropFrameTimecode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DropFrameTimecode::from(s))
}
}
impl DropFrameTimecode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DropFrameTimecode::Disabled => "DISABLED",
DropFrameTimecode::Enabled => "ENABLED",
DropFrameTimecode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for DropFrameTimecode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose Insert (INSERT) for this setting to include color metadata in this output. Choose Ignore (IGNORE) to exclude color metadata from this output. If you don't specify a value, the service sets this to Insert by default.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ColorMetadata {
#[allow(missing_docs)] // documentation missing in model
Ignore,
#[allow(missing_docs)] // documentation missing in model
Insert,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ColorMetadata {
fn from(s: &str) -> Self {
match s {
"IGNORE" => ColorMetadata::Ignore,
"INSERT" => ColorMetadata::Insert,
other => ColorMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ColorMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ColorMetadata::from(s))
}
}
impl ColorMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ColorMetadata::Ignore => "IGNORE",
ColorMetadata::Insert => "INSERT",
ColorMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["IGNORE", "INSERT"]
}
}
impl AsRef<str> for ColorMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Video codec settings, (CodecSettings) under (VideoDescription), contains the group of settings related to video encoding. The settings in this group vary depending on the value that you choose for Video codec (Codec). For each codec enum that you choose, define the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VideoCodecSettings {
/// Required when you set Codec, under VideoDescription>CodecSettings to the value AV1.
pub av1_settings: std::option::Option<crate::model::Av1Settings>,
/// Required when you choose AVC-Intra for your output video codec. For more information about the AVC-Intra settings, see the relevant specification. For detailed information about SD and HD in AVC-Intra, see https://ieeexplore.ieee.org/document/7290936. For information about 4K/2K in AVC-Intra, see https://pro-av.panasonic.net/en/avc-ultra/AVC-ULTRAoverview.pdf.
pub avc_intra_settings: std::option::Option<crate::model::AvcIntraSettings>,
/// Specifies the video codec. This must be equal to one of the enum values defined by the object VideoCodec.
pub codec: std::option::Option<crate::model::VideoCodec>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value FRAME_CAPTURE.
pub frame_capture_settings: std::option::Option<crate::model::FrameCaptureSettings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value H_264.
pub h264_settings: std::option::Option<crate::model::H264Settings>,
/// Settings for H265 codec
pub h265_settings: std::option::Option<crate::model::H265Settings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value MPEG2.
pub mpeg2_settings: std::option::Option<crate::model::Mpeg2Settings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value PRORES.
pub prores_settings: std::option::Option<crate::model::ProresSettings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VC3
pub vc3_settings: std::option::Option<crate::model::Vc3Settings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP8.
pub vp8_settings: std::option::Option<crate::model::Vp8Settings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP9.
pub vp9_settings: std::option::Option<crate::model::Vp9Settings>,
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value XAVC.
pub xavc_settings: std::option::Option<crate::model::XavcSettings>,
}
impl VideoCodecSettings {
/// Required when you set Codec, under VideoDescription>CodecSettings to the value AV1.
pub fn av1_settings(&self) -> std::option::Option<&crate::model::Av1Settings> {
self.av1_settings.as_ref()
}
/// Required when you choose AVC-Intra for your output video codec. For more information about the AVC-Intra settings, see the relevant specification. For detailed information about SD and HD in AVC-Intra, see https://ieeexplore.ieee.org/document/7290936. For information about 4K/2K in AVC-Intra, see https://pro-av.panasonic.net/en/avc-ultra/AVC-ULTRAoverview.pdf.
pub fn avc_intra_settings(&self) -> std::option::Option<&crate::model::AvcIntraSettings> {
self.avc_intra_settings.as_ref()
}
/// Specifies the video codec. This must be equal to one of the enum values defined by the object VideoCodec.
pub fn codec(&self) -> std::option::Option<&crate::model::VideoCodec> {
self.codec.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value FRAME_CAPTURE.
pub fn frame_capture_settings(
&self,
) -> std::option::Option<&crate::model::FrameCaptureSettings> {
self.frame_capture_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value H_264.
pub fn h264_settings(&self) -> std::option::Option<&crate::model::H264Settings> {
self.h264_settings.as_ref()
}
/// Settings for H265 codec
pub fn h265_settings(&self) -> std::option::Option<&crate::model::H265Settings> {
self.h265_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value MPEG2.
pub fn mpeg2_settings(&self) -> std::option::Option<&crate::model::Mpeg2Settings> {
self.mpeg2_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value PRORES.
pub fn prores_settings(&self) -> std::option::Option<&crate::model::ProresSettings> {
self.prores_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VC3
pub fn vc3_settings(&self) -> std::option::Option<&crate::model::Vc3Settings> {
self.vc3_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP8.
pub fn vp8_settings(&self) -> std::option::Option<&crate::model::Vp8Settings> {
self.vp8_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP9.
pub fn vp9_settings(&self) -> std::option::Option<&crate::model::Vp9Settings> {
self.vp9_settings.as_ref()
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value XAVC.
pub fn xavc_settings(&self) -> std::option::Option<&crate::model::XavcSettings> {
self.xavc_settings.as_ref()
}
}
impl std::fmt::Debug for VideoCodecSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VideoCodecSettings");
formatter.field("av1_settings", &self.av1_settings);
formatter.field("avc_intra_settings", &self.avc_intra_settings);
formatter.field("codec", &self.codec);
formatter.field("frame_capture_settings", &self.frame_capture_settings);
formatter.field("h264_settings", &self.h264_settings);
formatter.field("h265_settings", &self.h265_settings);
formatter.field("mpeg2_settings", &self.mpeg2_settings);
formatter.field("prores_settings", &self.prores_settings);
formatter.field("vc3_settings", &self.vc3_settings);
formatter.field("vp8_settings", &self.vp8_settings);
formatter.field("vp9_settings", &self.vp9_settings);
formatter.field("xavc_settings", &self.xavc_settings);
formatter.finish()
}
}
/// See [`VideoCodecSettings`](crate::model::VideoCodecSettings)
pub mod video_codec_settings {
/// A builder for [`VideoCodecSettings`](crate::model::VideoCodecSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) av1_settings: std::option::Option<crate::model::Av1Settings>,
pub(crate) avc_intra_settings: std::option::Option<crate::model::AvcIntraSettings>,
pub(crate) codec: std::option::Option<crate::model::VideoCodec>,
pub(crate) frame_capture_settings: std::option::Option<crate::model::FrameCaptureSettings>,
pub(crate) h264_settings: std::option::Option<crate::model::H264Settings>,
pub(crate) h265_settings: std::option::Option<crate::model::H265Settings>,
pub(crate) mpeg2_settings: std::option::Option<crate::model::Mpeg2Settings>,
pub(crate) prores_settings: std::option::Option<crate::model::ProresSettings>,
pub(crate) vc3_settings: std::option::Option<crate::model::Vc3Settings>,
pub(crate) vp8_settings: std::option::Option<crate::model::Vp8Settings>,
pub(crate) vp9_settings: std::option::Option<crate::model::Vp9Settings>,
pub(crate) xavc_settings: std::option::Option<crate::model::XavcSettings>,
}
impl Builder {
/// Required when you set Codec, under VideoDescription>CodecSettings to the value AV1.
pub fn av1_settings(mut self, input: crate::model::Av1Settings) -> Self {
self.av1_settings = Some(input);
self
}
/// Required when you set Codec, under VideoDescription>CodecSettings to the value AV1.
pub fn set_av1_settings(
mut self,
input: std::option::Option<crate::model::Av1Settings>,
) -> Self {
self.av1_settings = input;
self
}
/// Required when you choose AVC-Intra for your output video codec. For more information about the AVC-Intra settings, see the relevant specification. For detailed information about SD and HD in AVC-Intra, see https://ieeexplore.ieee.org/document/7290936. For information about 4K/2K in AVC-Intra, see https://pro-av.panasonic.net/en/avc-ultra/AVC-ULTRAoverview.pdf.
pub fn avc_intra_settings(mut self, input: crate::model::AvcIntraSettings) -> Self {
self.avc_intra_settings = Some(input);
self
}
/// Required when you choose AVC-Intra for your output video codec. For more information about the AVC-Intra settings, see the relevant specification. For detailed information about SD and HD in AVC-Intra, see https://ieeexplore.ieee.org/document/7290936. For information about 4K/2K in AVC-Intra, see https://pro-av.panasonic.net/en/avc-ultra/AVC-ULTRAoverview.pdf.
pub fn set_avc_intra_settings(
mut self,
input: std::option::Option<crate::model::AvcIntraSettings>,
) -> Self {
self.avc_intra_settings = input;
self
}
/// Specifies the video codec. This must be equal to one of the enum values defined by the object VideoCodec.
pub fn codec(mut self, input: crate::model::VideoCodec) -> Self {
self.codec = Some(input);
self
}
/// Specifies the video codec. This must be equal to one of the enum values defined by the object VideoCodec.
pub fn set_codec(mut self, input: std::option::Option<crate::model::VideoCodec>) -> Self {
self.codec = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value FRAME_CAPTURE.
pub fn frame_capture_settings(mut self, input: crate::model::FrameCaptureSettings) -> Self {
self.frame_capture_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value FRAME_CAPTURE.
pub fn set_frame_capture_settings(
mut self,
input: std::option::Option<crate::model::FrameCaptureSettings>,
) -> Self {
self.frame_capture_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value H_264.
pub fn h264_settings(mut self, input: crate::model::H264Settings) -> Self {
self.h264_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value H_264.
pub fn set_h264_settings(
mut self,
input: std::option::Option<crate::model::H264Settings>,
) -> Self {
self.h264_settings = input;
self
}
/// Settings for H265 codec
pub fn h265_settings(mut self, input: crate::model::H265Settings) -> Self {
self.h265_settings = Some(input);
self
}
/// Settings for H265 codec
pub fn set_h265_settings(
mut self,
input: std::option::Option<crate::model::H265Settings>,
) -> Self {
self.h265_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value MPEG2.
pub fn mpeg2_settings(mut self, input: crate::model::Mpeg2Settings) -> Self {
self.mpeg2_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value MPEG2.
pub fn set_mpeg2_settings(
mut self,
input: std::option::Option<crate::model::Mpeg2Settings>,
) -> Self {
self.mpeg2_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value PRORES.
pub fn prores_settings(mut self, input: crate::model::ProresSettings) -> Self {
self.prores_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value PRORES.
pub fn set_prores_settings(
mut self,
input: std::option::Option<crate::model::ProresSettings>,
) -> Self {
self.prores_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VC3
pub fn vc3_settings(mut self, input: crate::model::Vc3Settings) -> Self {
self.vc3_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VC3
pub fn set_vc3_settings(
mut self,
input: std::option::Option<crate::model::Vc3Settings>,
) -> Self {
self.vc3_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP8.
pub fn vp8_settings(mut self, input: crate::model::Vp8Settings) -> Self {
self.vp8_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP8.
pub fn set_vp8_settings(
mut self,
input: std::option::Option<crate::model::Vp8Settings>,
) -> Self {
self.vp8_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP9.
pub fn vp9_settings(mut self, input: crate::model::Vp9Settings) -> Self {
self.vp9_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP9.
pub fn set_vp9_settings(
mut self,
input: std::option::Option<crate::model::Vp9Settings>,
) -> Self {
self.vp9_settings = input;
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value XAVC.
pub fn xavc_settings(mut self, input: crate::model::XavcSettings) -> Self {
self.xavc_settings = Some(input);
self
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value XAVC.
pub fn set_xavc_settings(
mut self,
input: std::option::Option<crate::model::XavcSettings>,
) -> Self {
self.xavc_settings = input;
self
}
/// Consumes the builder and constructs a [`VideoCodecSettings`](crate::model::VideoCodecSettings)
pub fn build(self) -> crate::model::VideoCodecSettings {
crate::model::VideoCodecSettings {
av1_settings: self.av1_settings,
avc_intra_settings: self.avc_intra_settings,
codec: self.codec,
frame_capture_settings: self.frame_capture_settings,
h264_settings: self.h264_settings,
h265_settings: self.h265_settings,
mpeg2_settings: self.mpeg2_settings,
prores_settings: self.prores_settings,
vc3_settings: self.vc3_settings,
vp8_settings: self.vp8_settings,
vp9_settings: self.vp9_settings,
xavc_settings: self.xavc_settings,
}
}
}
}
impl VideoCodecSettings {
/// Creates a new builder-style object to manufacture [`VideoCodecSettings`](crate::model::VideoCodecSettings)
pub fn builder() -> crate::model::video_codec_settings::Builder {
crate::model::video_codec_settings::Builder::default()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value XAVC.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct XavcSettings {
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set Adaptive quantization (adaptiveQuantization) to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization to Off (OFF). Related settings: The value that you choose here applies to the following settings: Flicker adaptive quantization (flickerAdaptiveQuantization), Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub adaptive_quantization: std::option::Option<crate::model::XavcAdaptiveQuantization>,
/// Optional. Choose a specific entropy encoding mode only when you want to override XAVC recommendations. If you choose the value auto, MediaConvert uses the mode that the XAVC file format specifies given this output's operating point.
pub entropy_encoding: std::option::Option<crate::model::XavcEntropyEncoding>,
/// If you are using the console, use the Frame rate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list. The framerates shown in the dropdown list are decimal approximations of fractions. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate that you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::XavcFramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::XavcFramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Frame rate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// Specify the XAVC profile for this output. For more information, see the Sony documentation at https://www.xavc-info.org/. Note that MediaConvert doesn't support the interlaced video XAVC operating points for XAVC_HD_INTRA_CBG. To create an interlaced XAVC output, choose the profile XAVC_HD.
pub profile: std::option::Option<crate::model::XavcProfile>,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Frame rate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::XavcSlowPal>,
/// Ignore this setting unless your downstream workflow requires that you specify it explicitly. Otherwise, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub softness: i32,
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub spatial_adaptive_quantization:
std::option::Option<crate::model::XavcSpatialAdaptiveQuantization>,
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal adaptive quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub temporal_adaptive_quantization:
std::option::Option<crate::model::XavcTemporalAdaptiveQuantization>,
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_CBG.
pub xavc4k_intra_cbg_profile_settings:
std::option::Option<crate::model::Xavc4kIntraCbgProfileSettings>,
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_VBR.
pub xavc4k_intra_vbr_profile_settings:
std::option::Option<crate::model::Xavc4kIntraVbrProfileSettings>,
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K.
pub xavc4k_profile_settings: std::option::Option<crate::model::Xavc4kProfileSettings>,
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD_INTRA_CBG.
pub xavc_hd_intra_cbg_profile_settings:
std::option::Option<crate::model::XavcHdIntraCbgProfileSettings>,
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD.
pub xavc_hd_profile_settings: std::option::Option<crate::model::XavcHdProfileSettings>,
}
impl XavcSettings {
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set Adaptive quantization (adaptiveQuantization) to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization to Off (OFF). Related settings: The value that you choose here applies to the following settings: Flicker adaptive quantization (flickerAdaptiveQuantization), Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub fn adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::XavcAdaptiveQuantization> {
self.adaptive_quantization.as_ref()
}
/// Optional. Choose a specific entropy encoding mode only when you want to override XAVC recommendations. If you choose the value auto, MediaConvert uses the mode that the XAVC file format specifies given this output's operating point.
pub fn entropy_encoding(&self) -> std::option::Option<&crate::model::XavcEntropyEncoding> {
self.entropy_encoding.as_ref()
}
/// If you are using the console, use the Frame rate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list. The framerates shown in the dropdown list are decimal approximations of fractions. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate that you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::XavcFramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::XavcFramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Frame rate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Specify the XAVC profile for this output. For more information, see the Sony documentation at https://www.xavc-info.org/. Note that MediaConvert doesn't support the interlaced video XAVC operating points for XAVC_HD_INTRA_CBG. To create an interlaced XAVC output, choose the profile XAVC_HD.
pub fn profile(&self) -> std::option::Option<&crate::model::XavcProfile> {
self.profile.as_ref()
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Frame rate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::XavcSlowPal> {
self.slow_pal.as_ref()
}
/// Ignore this setting unless your downstream workflow requires that you specify it explicitly. Otherwise, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn softness(&self) -> i32 {
self.softness
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::XavcSpatialAdaptiveQuantization> {
self.spatial_adaptive_quantization.as_ref()
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal adaptive quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn temporal_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::XavcTemporalAdaptiveQuantization> {
self.temporal_adaptive_quantization.as_ref()
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_CBG.
pub fn xavc4k_intra_cbg_profile_settings(
&self,
) -> std::option::Option<&crate::model::Xavc4kIntraCbgProfileSettings> {
self.xavc4k_intra_cbg_profile_settings.as_ref()
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_VBR.
pub fn xavc4k_intra_vbr_profile_settings(
&self,
) -> std::option::Option<&crate::model::Xavc4kIntraVbrProfileSettings> {
self.xavc4k_intra_vbr_profile_settings.as_ref()
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K.
pub fn xavc4k_profile_settings(
&self,
) -> std::option::Option<&crate::model::Xavc4kProfileSettings> {
self.xavc4k_profile_settings.as_ref()
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD_INTRA_CBG.
pub fn xavc_hd_intra_cbg_profile_settings(
&self,
) -> std::option::Option<&crate::model::XavcHdIntraCbgProfileSettings> {
self.xavc_hd_intra_cbg_profile_settings.as_ref()
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD.
pub fn xavc_hd_profile_settings(
&self,
) -> std::option::Option<&crate::model::XavcHdProfileSettings> {
self.xavc_hd_profile_settings.as_ref()
}
}
impl std::fmt::Debug for XavcSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("XavcSettings");
formatter.field("adaptive_quantization", &self.adaptive_quantization);
formatter.field("entropy_encoding", &self.entropy_encoding);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("profile", &self.profile);
formatter.field("slow_pal", &self.slow_pal);
formatter.field("softness", &self.softness);
formatter.field(
"spatial_adaptive_quantization",
&self.spatial_adaptive_quantization,
);
formatter.field(
"temporal_adaptive_quantization",
&self.temporal_adaptive_quantization,
);
formatter.field(
"xavc4k_intra_cbg_profile_settings",
&self.xavc4k_intra_cbg_profile_settings,
);
formatter.field(
"xavc4k_intra_vbr_profile_settings",
&self.xavc4k_intra_vbr_profile_settings,
);
formatter.field("xavc4k_profile_settings", &self.xavc4k_profile_settings);
formatter.field(
"xavc_hd_intra_cbg_profile_settings",
&self.xavc_hd_intra_cbg_profile_settings,
);
formatter.field("xavc_hd_profile_settings", &self.xavc_hd_profile_settings);
formatter.finish()
}
}
/// See [`XavcSettings`](crate::model::XavcSettings)
pub mod xavc_settings {
/// A builder for [`XavcSettings`](crate::model::XavcSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) adaptive_quantization:
std::option::Option<crate::model::XavcAdaptiveQuantization>,
pub(crate) entropy_encoding: std::option::Option<crate::model::XavcEntropyEncoding>,
pub(crate) framerate_control: std::option::Option<crate::model::XavcFramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::XavcFramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) profile: std::option::Option<crate::model::XavcProfile>,
pub(crate) slow_pal: std::option::Option<crate::model::XavcSlowPal>,
pub(crate) softness: std::option::Option<i32>,
pub(crate) spatial_adaptive_quantization:
std::option::Option<crate::model::XavcSpatialAdaptiveQuantization>,
pub(crate) temporal_adaptive_quantization:
std::option::Option<crate::model::XavcTemporalAdaptiveQuantization>,
pub(crate) xavc4k_intra_cbg_profile_settings:
std::option::Option<crate::model::Xavc4kIntraCbgProfileSettings>,
pub(crate) xavc4k_intra_vbr_profile_settings:
std::option::Option<crate::model::Xavc4kIntraVbrProfileSettings>,
pub(crate) xavc4k_profile_settings:
std::option::Option<crate::model::Xavc4kProfileSettings>,
pub(crate) xavc_hd_intra_cbg_profile_settings:
std::option::Option<crate::model::XavcHdIntraCbgProfileSettings>,
pub(crate) xavc_hd_profile_settings:
std::option::Option<crate::model::XavcHdProfileSettings>,
}
impl Builder {
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set Adaptive quantization (adaptiveQuantization) to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization to Off (OFF). Related settings: The value that you choose here applies to the following settings: Flicker adaptive quantization (flickerAdaptiveQuantization), Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub fn adaptive_quantization(
mut self,
input: crate::model::XavcAdaptiveQuantization,
) -> Self {
self.adaptive_quantization = Some(input);
self
}
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set Adaptive quantization (adaptiveQuantization) to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization to Off (OFF). Related settings: The value that you choose here applies to the following settings: Flicker adaptive quantization (flickerAdaptiveQuantization), Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub fn set_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::XavcAdaptiveQuantization>,
) -> Self {
self.adaptive_quantization = input;
self
}
/// Optional. Choose a specific entropy encoding mode only when you want to override XAVC recommendations. If you choose the value auto, MediaConvert uses the mode that the XAVC file format specifies given this output's operating point.
pub fn entropy_encoding(mut self, input: crate::model::XavcEntropyEncoding) -> Self {
self.entropy_encoding = Some(input);
self
}
/// Optional. Choose a specific entropy encoding mode only when you want to override XAVC recommendations. If you choose the value auto, MediaConvert uses the mode that the XAVC file format specifies given this output's operating point.
pub fn set_entropy_encoding(
mut self,
input: std::option::Option<crate::model::XavcEntropyEncoding>,
) -> Self {
self.entropy_encoding = input;
self
}
/// If you are using the console, use the Frame rate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list. The framerates shown in the dropdown list are decimal approximations of fractions. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate that you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::XavcFramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Frame rate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list. The framerates shown in the dropdown list are decimal approximations of fractions. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate that you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::XavcFramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::XavcFramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::XavcFramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Frame rate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Frame rate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Specify the XAVC profile for this output. For more information, see the Sony documentation at https://www.xavc-info.org/. Note that MediaConvert doesn't support the interlaced video XAVC operating points for XAVC_HD_INTRA_CBG. To create an interlaced XAVC output, choose the profile XAVC_HD.
pub fn profile(mut self, input: crate::model::XavcProfile) -> Self {
self.profile = Some(input);
self
}
/// Specify the XAVC profile for this output. For more information, see the Sony documentation at https://www.xavc-info.org/. Note that MediaConvert doesn't support the interlaced video XAVC operating points for XAVC_HD_INTRA_CBG. To create an interlaced XAVC output, choose the profile XAVC_HD.
pub fn set_profile(
mut self,
input: std::option::Option<crate::model::XavcProfile>,
) -> Self {
self.profile = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Frame rate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::XavcSlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Frame rate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::XavcSlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// Ignore this setting unless your downstream workflow requires that you specify it explicitly. Otherwise, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn softness(mut self, input: i32) -> Self {
self.softness = Some(input);
self
}
/// Ignore this setting unless your downstream workflow requires that you specify it explicitly. Otherwise, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn set_softness(mut self, input: std::option::Option<i32>) -> Self {
self.softness = input;
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
mut self,
input: crate::model::XavcSpatialAdaptiveQuantization,
) -> Self {
self.spatial_adaptive_quantization = Some(input);
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn set_spatial_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::XavcSpatialAdaptiveQuantization>,
) -> Self {
self.spatial_adaptive_quantization = input;
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal adaptive quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn temporal_adaptive_quantization(
mut self,
input: crate::model::XavcTemporalAdaptiveQuantization,
) -> Self {
self.temporal_adaptive_quantization = Some(input);
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal adaptive quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn set_temporal_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::XavcTemporalAdaptiveQuantization>,
) -> Self {
self.temporal_adaptive_quantization = input;
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_CBG.
pub fn xavc4k_intra_cbg_profile_settings(
mut self,
input: crate::model::Xavc4kIntraCbgProfileSettings,
) -> Self {
self.xavc4k_intra_cbg_profile_settings = Some(input);
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_CBG.
pub fn set_xavc4k_intra_cbg_profile_settings(
mut self,
input: std::option::Option<crate::model::Xavc4kIntraCbgProfileSettings>,
) -> Self {
self.xavc4k_intra_cbg_profile_settings = input;
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_VBR.
pub fn xavc4k_intra_vbr_profile_settings(
mut self,
input: crate::model::Xavc4kIntraVbrProfileSettings,
) -> Self {
self.xavc4k_intra_vbr_profile_settings = Some(input);
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_VBR.
pub fn set_xavc4k_intra_vbr_profile_settings(
mut self,
input: std::option::Option<crate::model::Xavc4kIntraVbrProfileSettings>,
) -> Self {
self.xavc4k_intra_vbr_profile_settings = input;
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K.
pub fn xavc4k_profile_settings(
mut self,
input: crate::model::Xavc4kProfileSettings,
) -> Self {
self.xavc4k_profile_settings = Some(input);
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K.
pub fn set_xavc4k_profile_settings(
mut self,
input: std::option::Option<crate::model::Xavc4kProfileSettings>,
) -> Self {
self.xavc4k_profile_settings = input;
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD_INTRA_CBG.
pub fn xavc_hd_intra_cbg_profile_settings(
mut self,
input: crate::model::XavcHdIntraCbgProfileSettings,
) -> Self {
self.xavc_hd_intra_cbg_profile_settings = Some(input);
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD_INTRA_CBG.
pub fn set_xavc_hd_intra_cbg_profile_settings(
mut self,
input: std::option::Option<crate::model::XavcHdIntraCbgProfileSettings>,
) -> Self {
self.xavc_hd_intra_cbg_profile_settings = input;
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD.
pub fn xavc_hd_profile_settings(
mut self,
input: crate::model::XavcHdProfileSettings,
) -> Self {
self.xavc_hd_profile_settings = Some(input);
self
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD.
pub fn set_xavc_hd_profile_settings(
mut self,
input: std::option::Option<crate::model::XavcHdProfileSettings>,
) -> Self {
self.xavc_hd_profile_settings = input;
self
}
/// Consumes the builder and constructs a [`XavcSettings`](crate::model::XavcSettings)
pub fn build(self) -> crate::model::XavcSettings {
crate::model::XavcSettings {
adaptive_quantization: self.adaptive_quantization,
entropy_encoding: self.entropy_encoding,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
profile: self.profile,
slow_pal: self.slow_pal,
softness: self.softness.unwrap_or_default(),
spatial_adaptive_quantization: self.spatial_adaptive_quantization,
temporal_adaptive_quantization: self.temporal_adaptive_quantization,
xavc4k_intra_cbg_profile_settings: self.xavc4k_intra_cbg_profile_settings,
xavc4k_intra_vbr_profile_settings: self.xavc4k_intra_vbr_profile_settings,
xavc4k_profile_settings: self.xavc4k_profile_settings,
xavc_hd_intra_cbg_profile_settings: self.xavc_hd_intra_cbg_profile_settings,
xavc_hd_profile_settings: self.xavc_hd_profile_settings,
}
}
}
}
impl XavcSettings {
/// Creates a new builder-style object to manufacture [`XavcSettings`](crate::model::XavcSettings)
pub fn builder() -> crate::model::xavc_settings::Builder {
crate::model::xavc_settings::Builder::default()
}
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct XavcHdProfileSettings {
/// Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub bitrate_class: std::option::Option<crate::model::XavcHdProfileBitrateClass>,
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub flicker_adaptive_quantization:
std::option::Option<crate::model::XavcFlickerAdaptiveQuantization>,
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub gop_b_reference: std::option::Option<crate::model::XavcGopBReference>,
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub gop_closed_cadence: i32,
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub hrd_buffer_size: i32,
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub interlace_mode: std::option::Option<crate::model::XavcInterlaceMode>,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::XavcHdProfileQualityTuningLevel>,
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub slices: i32,
/// Ignore this setting unless you set Frame rate (framerateNumerator divided by framerateDenominator) to 29.970. If your input framerate is 23.976, choose Hard (HARD). Otherwise, keep the default value None (NONE). For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-telecine-and-inverse-telecine.html.
pub telecine: std::option::Option<crate::model::XavcHdProfileTelecine>,
}
impl XavcHdProfileSettings {
/// Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn bitrate_class(&self) -> std::option::Option<&crate::model::XavcHdProfileBitrateClass> {
self.bitrate_class.as_ref()
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub fn flicker_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::XavcFlickerAdaptiveQuantization> {
self.flicker_adaptive_quantization.as_ref()
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub fn gop_b_reference(&self) -> std::option::Option<&crate::model::XavcGopBReference> {
self.gop_b_reference.as_ref()
}
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub fn gop_closed_cadence(&self) -> i32 {
self.gop_closed_cadence
}
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::XavcInterlaceMode> {
self.interlace_mode.as_ref()
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::XavcHdProfileQualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(&self) -> i32 {
self.slices
}
/// Ignore this setting unless you set Frame rate (framerateNumerator divided by framerateDenominator) to 29.970. If your input framerate is 23.976, choose Hard (HARD). Otherwise, keep the default value None (NONE). For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-telecine-and-inverse-telecine.html.
pub fn telecine(&self) -> std::option::Option<&crate::model::XavcHdProfileTelecine> {
self.telecine.as_ref()
}
}
impl std::fmt::Debug for XavcHdProfileSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("XavcHdProfileSettings");
formatter.field("bitrate_class", &self.bitrate_class);
formatter.field(
"flicker_adaptive_quantization",
&self.flicker_adaptive_quantization,
);
formatter.field("gop_b_reference", &self.gop_b_reference);
formatter.field("gop_closed_cadence", &self.gop_closed_cadence);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("slices", &self.slices);
formatter.field("telecine", &self.telecine);
formatter.finish()
}
}
/// See [`XavcHdProfileSettings`](crate::model::XavcHdProfileSettings)
pub mod xavc_hd_profile_settings {
/// A builder for [`XavcHdProfileSettings`](crate::model::XavcHdProfileSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate_class: std::option::Option<crate::model::XavcHdProfileBitrateClass>,
pub(crate) flicker_adaptive_quantization:
std::option::Option<crate::model::XavcFlickerAdaptiveQuantization>,
pub(crate) gop_b_reference: std::option::Option<crate::model::XavcGopBReference>,
pub(crate) gop_closed_cadence: std::option::Option<i32>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::XavcInterlaceMode>,
pub(crate) quality_tuning_level:
std::option::Option<crate::model::XavcHdProfileQualityTuningLevel>,
pub(crate) slices: std::option::Option<i32>,
pub(crate) telecine: std::option::Option<crate::model::XavcHdProfileTelecine>,
}
impl Builder {
/// Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn bitrate_class(mut self, input: crate::model::XavcHdProfileBitrateClass) -> Self {
self.bitrate_class = Some(input);
self
}
/// Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn set_bitrate_class(
mut self,
input: std::option::Option<crate::model::XavcHdProfileBitrateClass>,
) -> Self {
self.bitrate_class = input;
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub fn flicker_adaptive_quantization(
mut self,
input: crate::model::XavcFlickerAdaptiveQuantization,
) -> Self {
self.flicker_adaptive_quantization = Some(input);
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub fn set_flicker_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::XavcFlickerAdaptiveQuantization>,
) -> Self {
self.flicker_adaptive_quantization = input;
self
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub fn gop_b_reference(mut self, input: crate::model::XavcGopBReference) -> Self {
self.gop_b_reference = Some(input);
self
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub fn set_gop_b_reference(
mut self,
input: std::option::Option<crate::model::XavcGopBReference>,
) -> Self {
self.gop_b_reference = input;
self
}
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub fn gop_closed_cadence(mut self, input: i32) -> Self {
self.gop_closed_cadence = Some(input);
self
}
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub fn set_gop_closed_cadence(mut self, input: std::option::Option<i32>) -> Self {
self.gop_closed_cadence = input;
self
}
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(mut self, input: crate::model::XavcInterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::XavcInterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
mut self,
input: crate::model::XavcHdProfileQualityTuningLevel,
) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::XavcHdProfileQualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(mut self, input: i32) -> Self {
self.slices = Some(input);
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn set_slices(mut self, input: std::option::Option<i32>) -> Self {
self.slices = input;
self
}
/// Ignore this setting unless you set Frame rate (framerateNumerator divided by framerateDenominator) to 29.970. If your input framerate is 23.976, choose Hard (HARD). Otherwise, keep the default value None (NONE). For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-telecine-and-inverse-telecine.html.
pub fn telecine(mut self, input: crate::model::XavcHdProfileTelecine) -> Self {
self.telecine = Some(input);
self
}
/// Ignore this setting unless you set Frame rate (framerateNumerator divided by framerateDenominator) to 29.970. If your input framerate is 23.976, choose Hard (HARD). Otherwise, keep the default value None (NONE). For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-telecine-and-inverse-telecine.html.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::XavcHdProfileTelecine>,
) -> Self {
self.telecine = input;
self
}
/// Consumes the builder and constructs a [`XavcHdProfileSettings`](crate::model::XavcHdProfileSettings)
pub fn build(self) -> crate::model::XavcHdProfileSettings {
crate::model::XavcHdProfileSettings {
bitrate_class: self.bitrate_class,
flicker_adaptive_quantization: self.flicker_adaptive_quantization,
gop_b_reference: self.gop_b_reference,
gop_closed_cadence: self.gop_closed_cadence.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
interlace_mode: self.interlace_mode,
quality_tuning_level: self.quality_tuning_level,
slices: self.slices.unwrap_or_default(),
telecine: self.telecine,
}
}
}
}
impl XavcHdProfileSettings {
/// Creates a new builder-style object to manufacture [`XavcHdProfileSettings`](crate::model::XavcHdProfileSettings)
pub fn builder() -> crate::model::xavc_hd_profile_settings::Builder {
crate::model::xavc_hd_profile_settings::Builder::default()
}
}
/// Ignore this setting unless you set Frame rate (framerateNumerator divided by framerateDenominator) to 29.970. If your input framerate is 23.976, choose Hard (HARD). Otherwise, keep the default value None (NONE). For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-telecine-and-inverse-telecine.html.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcHdProfileTelecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcHdProfileTelecine {
fn from(s: &str) -> Self {
match s {
"HARD" => XavcHdProfileTelecine::Hard,
"NONE" => XavcHdProfileTelecine::None,
other => XavcHdProfileTelecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcHdProfileTelecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcHdProfileTelecine::from(s))
}
}
impl XavcHdProfileTelecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcHdProfileTelecine::Hard => "HARD",
XavcHdProfileTelecine::None => "NONE",
XavcHdProfileTelecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE"]
}
}
impl AsRef<str> for XavcHdProfileTelecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcHdProfileQualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPassHq,
#[allow(missing_docs)] // documentation missing in model
SinglePass,
#[allow(missing_docs)] // documentation missing in model
SinglePassHq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcHdProfileQualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS_HQ" => XavcHdProfileQualityTuningLevel::MultiPassHq,
"SINGLE_PASS" => XavcHdProfileQualityTuningLevel::SinglePass,
"SINGLE_PASS_HQ" => XavcHdProfileQualityTuningLevel::SinglePassHq,
other => XavcHdProfileQualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcHdProfileQualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcHdProfileQualityTuningLevel::from(s))
}
}
impl XavcHdProfileQualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcHdProfileQualityTuningLevel::MultiPassHq => "MULTI_PASS_HQ",
XavcHdProfileQualityTuningLevel::SinglePass => "SINGLE_PASS",
XavcHdProfileQualityTuningLevel::SinglePassHq => "SINGLE_PASS_HQ",
XavcHdProfileQualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS_HQ", "SINGLE_PASS", "SINGLE_PASS_HQ"]
}
}
impl AsRef<str> for XavcHdProfileQualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcInterlaceMode {
#[allow(missing_docs)] // documentation missing in model
BottomField,
#[allow(missing_docs)] // documentation missing in model
FollowBottomField,
#[allow(missing_docs)] // documentation missing in model
FollowTopField,
#[allow(missing_docs)] // documentation missing in model
Progressive,
#[allow(missing_docs)] // documentation missing in model
TopField,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcInterlaceMode {
fn from(s: &str) -> Self {
match s {
"BOTTOM_FIELD" => XavcInterlaceMode::BottomField,
"FOLLOW_BOTTOM_FIELD" => XavcInterlaceMode::FollowBottomField,
"FOLLOW_TOP_FIELD" => XavcInterlaceMode::FollowTopField,
"PROGRESSIVE" => XavcInterlaceMode::Progressive,
"TOP_FIELD" => XavcInterlaceMode::TopField,
other => XavcInterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcInterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcInterlaceMode::from(s))
}
}
impl XavcInterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcInterlaceMode::BottomField => "BOTTOM_FIELD",
XavcInterlaceMode::FollowBottomField => "FOLLOW_BOTTOM_FIELD",
XavcInterlaceMode::FollowTopField => "FOLLOW_TOP_FIELD",
XavcInterlaceMode::Progressive => "PROGRESSIVE",
XavcInterlaceMode::TopField => "TOP_FIELD",
XavcInterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_FIELD",
"FOLLOW_BOTTOM_FIELD",
"FOLLOW_TOP_FIELD",
"PROGRESSIVE",
"TOP_FIELD",
]
}
}
impl AsRef<str> for XavcInterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcGopBReference {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcGopBReference {
fn from(s: &str) -> Self {
match s {
"DISABLED" => XavcGopBReference::Disabled,
"ENABLED" => XavcGopBReference::Enabled,
other => XavcGopBReference::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcGopBReference {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcGopBReference::from(s))
}
}
impl XavcGopBReference {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcGopBReference::Disabled => "DISABLED",
XavcGopBReference::Enabled => "ENABLED",
XavcGopBReference::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for XavcGopBReference {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcFlickerAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcFlickerAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => XavcFlickerAdaptiveQuantization::Disabled,
"ENABLED" => XavcFlickerAdaptiveQuantization::Enabled,
other => XavcFlickerAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcFlickerAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcFlickerAdaptiveQuantization::from(s))
}
}
impl XavcFlickerAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcFlickerAdaptiveQuantization::Disabled => "DISABLED",
XavcFlickerAdaptiveQuantization::Enabled => "ENABLED",
XavcFlickerAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for XavcFlickerAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the XAVC HD (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcHdProfileBitrateClass {
#[allow(missing_docs)] // documentation missing in model
BitrateClass25,
#[allow(missing_docs)] // documentation missing in model
BitrateClass35,
#[allow(missing_docs)] // documentation missing in model
BitrateClass50,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcHdProfileBitrateClass {
fn from(s: &str) -> Self {
match s {
"BITRATE_CLASS_25" => XavcHdProfileBitrateClass::BitrateClass25,
"BITRATE_CLASS_35" => XavcHdProfileBitrateClass::BitrateClass35,
"BITRATE_CLASS_50" => XavcHdProfileBitrateClass::BitrateClass50,
other => XavcHdProfileBitrateClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcHdProfileBitrateClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcHdProfileBitrateClass::from(s))
}
}
impl XavcHdProfileBitrateClass {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcHdProfileBitrateClass::BitrateClass25 => "BITRATE_CLASS_25",
XavcHdProfileBitrateClass::BitrateClass35 => "BITRATE_CLASS_35",
XavcHdProfileBitrateClass::BitrateClass50 => "BITRATE_CLASS_50",
XavcHdProfileBitrateClass::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["BITRATE_CLASS_25", "BITRATE_CLASS_35", "BITRATE_CLASS_50"]
}
}
impl AsRef<str> for XavcHdProfileBitrateClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_HD_INTRA_CBG.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct XavcHdIntraCbgProfileSettings {
/// Specify the XAVC Intra HD (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub xavc_class: std::option::Option<crate::model::XavcHdIntraCbgProfileClass>,
}
impl XavcHdIntraCbgProfileSettings {
/// Specify the XAVC Intra HD (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn xavc_class(&self) -> std::option::Option<&crate::model::XavcHdIntraCbgProfileClass> {
self.xavc_class.as_ref()
}
}
impl std::fmt::Debug for XavcHdIntraCbgProfileSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("XavcHdIntraCbgProfileSettings");
formatter.field("xavc_class", &self.xavc_class);
formatter.finish()
}
}
/// See [`XavcHdIntraCbgProfileSettings`](crate::model::XavcHdIntraCbgProfileSettings)
pub mod xavc_hd_intra_cbg_profile_settings {
/// A builder for [`XavcHdIntraCbgProfileSettings`](crate::model::XavcHdIntraCbgProfileSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) xavc_class: std::option::Option<crate::model::XavcHdIntraCbgProfileClass>,
}
impl Builder {
/// Specify the XAVC Intra HD (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn xavc_class(mut self, input: crate::model::XavcHdIntraCbgProfileClass) -> Self {
self.xavc_class = Some(input);
self
}
/// Specify the XAVC Intra HD (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn set_xavc_class(
mut self,
input: std::option::Option<crate::model::XavcHdIntraCbgProfileClass>,
) -> Self {
self.xavc_class = input;
self
}
/// Consumes the builder and constructs a [`XavcHdIntraCbgProfileSettings`](crate::model::XavcHdIntraCbgProfileSettings)
pub fn build(self) -> crate::model::XavcHdIntraCbgProfileSettings {
crate::model::XavcHdIntraCbgProfileSettings {
xavc_class: self.xavc_class,
}
}
}
}
impl XavcHdIntraCbgProfileSettings {
/// Creates a new builder-style object to manufacture [`XavcHdIntraCbgProfileSettings`](crate::model::XavcHdIntraCbgProfileSettings)
pub fn builder() -> crate::model::xavc_hd_intra_cbg_profile_settings::Builder {
crate::model::xavc_hd_intra_cbg_profile_settings::Builder::default()
}
}
/// Specify the XAVC Intra HD (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcHdIntraCbgProfileClass {
#[allow(missing_docs)] // documentation missing in model
Class100,
#[allow(missing_docs)] // documentation missing in model
Class200,
#[allow(missing_docs)] // documentation missing in model
Class50,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcHdIntraCbgProfileClass {
fn from(s: &str) -> Self {
match s {
"CLASS_100" => XavcHdIntraCbgProfileClass::Class100,
"CLASS_200" => XavcHdIntraCbgProfileClass::Class200,
"CLASS_50" => XavcHdIntraCbgProfileClass::Class50,
other => XavcHdIntraCbgProfileClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcHdIntraCbgProfileClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcHdIntraCbgProfileClass::from(s))
}
}
impl XavcHdIntraCbgProfileClass {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcHdIntraCbgProfileClass::Class100 => "CLASS_100",
XavcHdIntraCbgProfileClass::Class200 => "CLASS_200",
XavcHdIntraCbgProfileClass::Class50 => "CLASS_50",
XavcHdIntraCbgProfileClass::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CLASS_100", "CLASS_200", "CLASS_50"]
}
}
impl AsRef<str> for XavcHdIntraCbgProfileClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Xavc4kProfileSettings {
/// Specify the XAVC 4k (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub bitrate_class: std::option::Option<crate::model::Xavc4kProfileBitrateClass>,
/// Specify the codec profile for this output. Choose High, 8-bit, 4:2:0 (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified in ITU-T H.264.
pub codec_profile: std::option::Option<crate::model::Xavc4kProfileCodecProfile>,
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub flicker_adaptive_quantization:
std::option::Option<crate::model::XavcFlickerAdaptiveQuantization>,
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub gop_b_reference: std::option::Option<crate::model::XavcGopBReference>,
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub gop_closed_cadence: i32,
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub hrd_buffer_size: i32,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::Xavc4kProfileQualityTuningLevel>,
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub slices: i32,
}
impl Xavc4kProfileSettings {
/// Specify the XAVC 4k (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn bitrate_class(&self) -> std::option::Option<&crate::model::Xavc4kProfileBitrateClass> {
self.bitrate_class.as_ref()
}
/// Specify the codec profile for this output. Choose High, 8-bit, 4:2:0 (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified in ITU-T H.264.
pub fn codec_profile(&self) -> std::option::Option<&crate::model::Xavc4kProfileCodecProfile> {
self.codec_profile.as_ref()
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub fn flicker_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::XavcFlickerAdaptiveQuantization> {
self.flicker_adaptive_quantization.as_ref()
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub fn gop_b_reference(&self) -> std::option::Option<&crate::model::XavcGopBReference> {
self.gop_b_reference.as_ref()
}
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub fn gop_closed_cadence(&self) -> i32 {
self.gop_closed_cadence
}
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::Xavc4kProfileQualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(&self) -> i32 {
self.slices
}
}
impl std::fmt::Debug for Xavc4kProfileSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Xavc4kProfileSettings");
formatter.field("bitrate_class", &self.bitrate_class);
formatter.field("codec_profile", &self.codec_profile);
formatter.field(
"flicker_adaptive_quantization",
&self.flicker_adaptive_quantization,
);
formatter.field("gop_b_reference", &self.gop_b_reference);
formatter.field("gop_closed_cadence", &self.gop_closed_cadence);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("slices", &self.slices);
formatter.finish()
}
}
/// See [`Xavc4kProfileSettings`](crate::model::Xavc4kProfileSettings)
pub mod xavc4k_profile_settings {
/// A builder for [`Xavc4kProfileSettings`](crate::model::Xavc4kProfileSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate_class: std::option::Option<crate::model::Xavc4kProfileBitrateClass>,
pub(crate) codec_profile: std::option::Option<crate::model::Xavc4kProfileCodecProfile>,
pub(crate) flicker_adaptive_quantization:
std::option::Option<crate::model::XavcFlickerAdaptiveQuantization>,
pub(crate) gop_b_reference: std::option::Option<crate::model::XavcGopBReference>,
pub(crate) gop_closed_cadence: std::option::Option<i32>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) quality_tuning_level:
std::option::Option<crate::model::Xavc4kProfileQualityTuningLevel>,
pub(crate) slices: std::option::Option<i32>,
}
impl Builder {
/// Specify the XAVC 4k (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn bitrate_class(mut self, input: crate::model::Xavc4kProfileBitrateClass) -> Self {
self.bitrate_class = Some(input);
self
}
/// Specify the XAVC 4k (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn set_bitrate_class(
mut self,
input: std::option::Option<crate::model::Xavc4kProfileBitrateClass>,
) -> Self {
self.bitrate_class = input;
self
}
/// Specify the codec profile for this output. Choose High, 8-bit, 4:2:0 (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified in ITU-T H.264.
pub fn codec_profile(mut self, input: crate::model::Xavc4kProfileCodecProfile) -> Self {
self.codec_profile = Some(input);
self
}
/// Specify the codec profile for this output. Choose High, 8-bit, 4:2:0 (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified in ITU-T H.264.
pub fn set_codec_profile(
mut self,
input: std::option::Option<crate::model::Xavc4kProfileCodecProfile>,
) -> Self {
self.codec_profile = input;
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub fn flicker_adaptive_quantization(
mut self,
input: crate::model::XavcFlickerAdaptiveQuantization,
) -> Self {
self.flicker_adaptive_quantization = Some(input);
self
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (XavcAdaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set Adaptive quantization (adaptiveQuantization) to a value other than Off (OFF) or Auto (AUTO). Use Adaptive quantization to adjust the degree of smoothing that Flicker adaptive quantization provides.
pub fn set_flicker_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::XavcFlickerAdaptiveQuantization>,
) -> Self {
self.flicker_adaptive_quantization = input;
self
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub fn gop_b_reference(mut self, input: crate::model::XavcGopBReference) -> Self {
self.gop_b_reference = Some(input);
self
}
/// Specify whether the encoder uses B-frames as reference frames for other pictures in the same GOP. Choose Allow (ENABLED) to allow the encoder to use B-frames as reference frames. Choose Don't allow (DISABLED) to prevent the encoder from using B-frames as reference frames.
pub fn set_gop_b_reference(
mut self,
input: std::option::Option<crate::model::XavcGopBReference>,
) -> Self {
self.gop_b_reference = input;
self
}
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub fn gop_closed_cadence(mut self, input: i32) -> Self {
self.gop_closed_cadence = Some(input);
self
}
/// Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.
pub fn set_gop_closed_cadence(mut self, input: std::option::Option<i32>) -> Self {
self.gop_closed_cadence = input;
self
}
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Specify the size of the buffer that MediaConvert uses in the HRD buffer model for this output. Specify this value in bits; for example, enter five megabits as 5000000. When you don't set this value, or you set it to zero, MediaConvert calculates the default by doubling the bitrate of this output point.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
mut self,
input: crate::model::Xavc4kProfileQualityTuningLevel,
) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::Xavc4kProfileQualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(mut self, input: i32) -> Self {
self.slices = Some(input);
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn set_slices(mut self, input: std::option::Option<i32>) -> Self {
self.slices = input;
self
}
/// Consumes the builder and constructs a [`Xavc4kProfileSettings`](crate::model::Xavc4kProfileSettings)
pub fn build(self) -> crate::model::Xavc4kProfileSettings {
crate::model::Xavc4kProfileSettings {
bitrate_class: self.bitrate_class,
codec_profile: self.codec_profile,
flicker_adaptive_quantization: self.flicker_adaptive_quantization,
gop_b_reference: self.gop_b_reference,
gop_closed_cadence: self.gop_closed_cadence.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
quality_tuning_level: self.quality_tuning_level,
slices: self.slices.unwrap_or_default(),
}
}
}
}
impl Xavc4kProfileSettings {
/// Creates a new builder-style object to manufacture [`Xavc4kProfileSettings`](crate::model::Xavc4kProfileSettings)
pub fn builder() -> crate::model::xavc4k_profile_settings::Builder {
crate::model::xavc4k_profile_settings::Builder::default()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Xavc4kProfileQualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPassHq,
#[allow(missing_docs)] // documentation missing in model
SinglePass,
#[allow(missing_docs)] // documentation missing in model
SinglePassHq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Xavc4kProfileQualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS_HQ" => Xavc4kProfileQualityTuningLevel::MultiPassHq,
"SINGLE_PASS" => Xavc4kProfileQualityTuningLevel::SinglePass,
"SINGLE_PASS_HQ" => Xavc4kProfileQualityTuningLevel::SinglePassHq,
other => Xavc4kProfileQualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Xavc4kProfileQualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Xavc4kProfileQualityTuningLevel::from(s))
}
}
impl Xavc4kProfileQualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Xavc4kProfileQualityTuningLevel::MultiPassHq => "MULTI_PASS_HQ",
Xavc4kProfileQualityTuningLevel::SinglePass => "SINGLE_PASS",
Xavc4kProfileQualityTuningLevel::SinglePassHq => "SINGLE_PASS_HQ",
Xavc4kProfileQualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS_HQ", "SINGLE_PASS", "SINGLE_PASS_HQ"]
}
}
impl AsRef<str> for Xavc4kProfileQualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the codec profile for this output. Choose High, 8-bit, 4:2:0 (HIGH) or High, 10-bit, 4:2:2 (HIGH_422). These profiles are specified in ITU-T H.264.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Xavc4kProfileCodecProfile {
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
High422,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Xavc4kProfileCodecProfile {
fn from(s: &str) -> Self {
match s {
"HIGH" => Xavc4kProfileCodecProfile::High,
"HIGH_422" => Xavc4kProfileCodecProfile::High422,
other => Xavc4kProfileCodecProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Xavc4kProfileCodecProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Xavc4kProfileCodecProfile::from(s))
}
}
impl Xavc4kProfileCodecProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Xavc4kProfileCodecProfile::High => "HIGH",
Xavc4kProfileCodecProfile::High422 => "HIGH_422",
Xavc4kProfileCodecProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HIGH", "HIGH_422"]
}
}
impl AsRef<str> for Xavc4kProfileCodecProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the XAVC 4k (Long GOP) Bitrate Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Xavc4kProfileBitrateClass {
#[allow(missing_docs)] // documentation missing in model
BitrateClass100,
#[allow(missing_docs)] // documentation missing in model
BitrateClass140,
#[allow(missing_docs)] // documentation missing in model
BitrateClass200,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Xavc4kProfileBitrateClass {
fn from(s: &str) -> Self {
match s {
"BITRATE_CLASS_100" => Xavc4kProfileBitrateClass::BitrateClass100,
"BITRATE_CLASS_140" => Xavc4kProfileBitrateClass::BitrateClass140,
"BITRATE_CLASS_200" => Xavc4kProfileBitrateClass::BitrateClass200,
other => Xavc4kProfileBitrateClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Xavc4kProfileBitrateClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Xavc4kProfileBitrateClass::from(s))
}
}
impl Xavc4kProfileBitrateClass {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Xavc4kProfileBitrateClass::BitrateClass100 => "BITRATE_CLASS_100",
Xavc4kProfileBitrateClass::BitrateClass140 => "BITRATE_CLASS_140",
Xavc4kProfileBitrateClass::BitrateClass200 => "BITRATE_CLASS_200",
Xavc4kProfileBitrateClass::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BITRATE_CLASS_100",
"BITRATE_CLASS_140",
"BITRATE_CLASS_200",
]
}
}
impl AsRef<str> for Xavc4kProfileBitrateClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_VBR.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Xavc4kIntraVbrProfileSettings {
/// Specify the XAVC Intra 4k (VBR) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub xavc_class: std::option::Option<crate::model::Xavc4kIntraVbrProfileClass>,
}
impl Xavc4kIntraVbrProfileSettings {
/// Specify the XAVC Intra 4k (VBR) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn xavc_class(&self) -> std::option::Option<&crate::model::Xavc4kIntraVbrProfileClass> {
self.xavc_class.as_ref()
}
}
impl std::fmt::Debug for Xavc4kIntraVbrProfileSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Xavc4kIntraVbrProfileSettings");
formatter.field("xavc_class", &self.xavc_class);
formatter.finish()
}
}
/// See [`Xavc4kIntraVbrProfileSettings`](crate::model::Xavc4kIntraVbrProfileSettings)
pub mod xavc4k_intra_vbr_profile_settings {
/// A builder for [`Xavc4kIntraVbrProfileSettings`](crate::model::Xavc4kIntraVbrProfileSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) xavc_class: std::option::Option<crate::model::Xavc4kIntraVbrProfileClass>,
}
impl Builder {
/// Specify the XAVC Intra 4k (VBR) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn xavc_class(mut self, input: crate::model::Xavc4kIntraVbrProfileClass) -> Self {
self.xavc_class = Some(input);
self
}
/// Specify the XAVC Intra 4k (VBR) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn set_xavc_class(
mut self,
input: std::option::Option<crate::model::Xavc4kIntraVbrProfileClass>,
) -> Self {
self.xavc_class = input;
self
}
/// Consumes the builder and constructs a [`Xavc4kIntraVbrProfileSettings`](crate::model::Xavc4kIntraVbrProfileSettings)
pub fn build(self) -> crate::model::Xavc4kIntraVbrProfileSettings {
crate::model::Xavc4kIntraVbrProfileSettings {
xavc_class: self.xavc_class,
}
}
}
}
impl Xavc4kIntraVbrProfileSettings {
/// Creates a new builder-style object to manufacture [`Xavc4kIntraVbrProfileSettings`](crate::model::Xavc4kIntraVbrProfileSettings)
pub fn builder() -> crate::model::xavc4k_intra_vbr_profile_settings::Builder {
crate::model::xavc4k_intra_vbr_profile_settings::Builder::default()
}
}
/// Specify the XAVC Intra 4k (VBR) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Xavc4kIntraVbrProfileClass {
#[allow(missing_docs)] // documentation missing in model
Class100,
#[allow(missing_docs)] // documentation missing in model
Class300,
#[allow(missing_docs)] // documentation missing in model
Class480,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Xavc4kIntraVbrProfileClass {
fn from(s: &str) -> Self {
match s {
"CLASS_100" => Xavc4kIntraVbrProfileClass::Class100,
"CLASS_300" => Xavc4kIntraVbrProfileClass::Class300,
"CLASS_480" => Xavc4kIntraVbrProfileClass::Class480,
other => Xavc4kIntraVbrProfileClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Xavc4kIntraVbrProfileClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Xavc4kIntraVbrProfileClass::from(s))
}
}
impl Xavc4kIntraVbrProfileClass {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Xavc4kIntraVbrProfileClass::Class100 => "CLASS_100",
Xavc4kIntraVbrProfileClass::Class300 => "CLASS_300",
Xavc4kIntraVbrProfileClass::Class480 => "CLASS_480",
Xavc4kIntraVbrProfileClass::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CLASS_100", "CLASS_300", "CLASS_480"]
}
}
impl AsRef<str> for Xavc4kIntraVbrProfileClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Profile) under (VideoDescription)>(CodecSettings)>(XavcSettings) to the value XAVC_4K_INTRA_CBG.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Xavc4kIntraCbgProfileSettings {
/// Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub xavc_class: std::option::Option<crate::model::Xavc4kIntraCbgProfileClass>,
}
impl Xavc4kIntraCbgProfileSettings {
/// Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn xavc_class(&self) -> std::option::Option<&crate::model::Xavc4kIntraCbgProfileClass> {
self.xavc_class.as_ref()
}
}
impl std::fmt::Debug for Xavc4kIntraCbgProfileSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Xavc4kIntraCbgProfileSettings");
formatter.field("xavc_class", &self.xavc_class);
formatter.finish()
}
}
/// See [`Xavc4kIntraCbgProfileSettings`](crate::model::Xavc4kIntraCbgProfileSettings)
pub mod xavc4k_intra_cbg_profile_settings {
/// A builder for [`Xavc4kIntraCbgProfileSettings`](crate::model::Xavc4kIntraCbgProfileSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) xavc_class: std::option::Option<crate::model::Xavc4kIntraCbgProfileClass>,
}
impl Builder {
/// Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn xavc_class(mut self, input: crate::model::Xavc4kIntraCbgProfileClass) -> Self {
self.xavc_class = Some(input);
self
}
/// Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
pub fn set_xavc_class(
mut self,
input: std::option::Option<crate::model::Xavc4kIntraCbgProfileClass>,
) -> Self {
self.xavc_class = input;
self
}
/// Consumes the builder and constructs a [`Xavc4kIntraCbgProfileSettings`](crate::model::Xavc4kIntraCbgProfileSettings)
pub fn build(self) -> crate::model::Xavc4kIntraCbgProfileSettings {
crate::model::Xavc4kIntraCbgProfileSettings {
xavc_class: self.xavc_class,
}
}
}
}
impl Xavc4kIntraCbgProfileSettings {
/// Creates a new builder-style object to manufacture [`Xavc4kIntraCbgProfileSettings`](crate::model::Xavc4kIntraCbgProfileSettings)
pub fn builder() -> crate::model::xavc4k_intra_cbg_profile_settings::Builder {
crate::model::xavc4k_intra_cbg_profile_settings::Builder::default()
}
}
/// Specify the XAVC Intra 4k (CBG) Class to set the bitrate of your output. Outputs of the same class have similar image quality over the operating points that are valid for that class.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Xavc4kIntraCbgProfileClass {
#[allow(missing_docs)] // documentation missing in model
Class100,
#[allow(missing_docs)] // documentation missing in model
Class300,
#[allow(missing_docs)] // documentation missing in model
Class480,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Xavc4kIntraCbgProfileClass {
fn from(s: &str) -> Self {
match s {
"CLASS_100" => Xavc4kIntraCbgProfileClass::Class100,
"CLASS_300" => Xavc4kIntraCbgProfileClass::Class300,
"CLASS_480" => Xavc4kIntraCbgProfileClass::Class480,
other => Xavc4kIntraCbgProfileClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Xavc4kIntraCbgProfileClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Xavc4kIntraCbgProfileClass::from(s))
}
}
impl Xavc4kIntraCbgProfileClass {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Xavc4kIntraCbgProfileClass::Class100 => "CLASS_100",
Xavc4kIntraCbgProfileClass::Class300 => "CLASS_300",
Xavc4kIntraCbgProfileClass::Class480 => "CLASS_480",
Xavc4kIntraCbgProfileClass::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CLASS_100", "CLASS_300", "CLASS_480"]
}
}
impl AsRef<str> for Xavc4kIntraCbgProfileClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal adaptive quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcTemporalAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcTemporalAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => XavcTemporalAdaptiveQuantization::Disabled,
"ENABLED" => XavcTemporalAdaptiveQuantization::Enabled,
other => XavcTemporalAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcTemporalAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcTemporalAdaptiveQuantization::from(s))
}
}
impl XavcTemporalAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcTemporalAdaptiveQuantization::Disabled => "DISABLED",
XavcTemporalAdaptiveQuantization::Enabled => "ENABLED",
XavcTemporalAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for XavcTemporalAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The best way to set up adaptive quantization is to keep the default value, Auto (AUTO), for the setting Adaptive quantization (adaptiveQuantization). When you do so, MediaConvert automatically applies the best types of quantization for your video content. Include this setting in your JSON job specification only when you choose to change the default value for Adaptive quantization. For this setting, keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcSpatialAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcSpatialAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => XavcSpatialAdaptiveQuantization::Disabled,
"ENABLED" => XavcSpatialAdaptiveQuantization::Enabled,
other => XavcSpatialAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcSpatialAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcSpatialAdaptiveQuantization::from(s))
}
}
impl XavcSpatialAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcSpatialAdaptiveQuantization::Disabled => "DISABLED",
XavcSpatialAdaptiveQuantization::Enabled => "ENABLED",
XavcSpatialAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for XavcSpatialAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Frame rate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcSlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcSlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => XavcSlowPal::Disabled,
"ENABLED" => XavcSlowPal::Enabled,
other => XavcSlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcSlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcSlowPal::from(s))
}
}
impl XavcSlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcSlowPal::Disabled => "DISABLED",
XavcSlowPal::Enabled => "ENABLED",
XavcSlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for XavcSlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the XAVC profile for this output. For more information, see the Sony documentation at https://www.xavc-info.org/. Note that MediaConvert doesn't support the interlaced video XAVC operating points for XAVC_HD_INTRA_CBG. To create an interlaced XAVC output, choose the profile XAVC_HD.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcProfile {
#[allow(missing_docs)] // documentation missing in model
Xavc4K,
#[allow(missing_docs)] // documentation missing in model
Xavc4KIntraCbg,
#[allow(missing_docs)] // documentation missing in model
Xavc4KIntraVbr,
#[allow(missing_docs)] // documentation missing in model
XavcHd,
#[allow(missing_docs)] // documentation missing in model
XavcHdIntraCbg,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcProfile {
fn from(s: &str) -> Self {
match s {
"XAVC_4K" => XavcProfile::Xavc4K,
"XAVC_4K_INTRA_CBG" => XavcProfile::Xavc4KIntraCbg,
"XAVC_4K_INTRA_VBR" => XavcProfile::Xavc4KIntraVbr,
"XAVC_HD" => XavcProfile::XavcHd,
"XAVC_HD_INTRA_CBG" => XavcProfile::XavcHdIntraCbg,
other => XavcProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcProfile::from(s))
}
}
impl XavcProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcProfile::Xavc4K => "XAVC_4K",
XavcProfile::Xavc4KIntraCbg => "XAVC_4K_INTRA_CBG",
XavcProfile::Xavc4KIntraVbr => "XAVC_4K_INTRA_VBR",
XavcProfile::XavcHd => "XAVC_HD",
XavcProfile::XavcHdIntraCbg => "XAVC_HD_INTRA_CBG",
XavcProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"XAVC_4K",
"XAVC_4K_INTRA_CBG",
"XAVC_4K_INTRA_VBR",
"XAVC_HD",
"XAVC_HD_INTRA_CBG",
]
}
}
impl AsRef<str> for XavcProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcFramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcFramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => XavcFramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => XavcFramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => XavcFramerateConversionAlgorithm::Interpolate,
other => XavcFramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcFramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcFramerateConversionAlgorithm::from(s))
}
}
impl XavcFramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcFramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
XavcFramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
XavcFramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
XavcFramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for XavcFramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Frame rate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list. The framerates shown in the dropdown list are decimal approximations of fractions. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate that you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcFramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcFramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => XavcFramerateControl::InitializeFromSource,
"SPECIFIED" => XavcFramerateControl::Specified,
other => XavcFramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcFramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcFramerateControl::from(s))
}
}
impl XavcFramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcFramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
XavcFramerateControl::Specified => "SPECIFIED",
XavcFramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for XavcFramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Choose a specific entropy encoding mode only when you want to override XAVC recommendations. If you choose the value auto, MediaConvert uses the mode that the XAVC file format specifies given this output's operating point.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcEntropyEncoding {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Cabac,
#[allow(missing_docs)] // documentation missing in model
Cavlc,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcEntropyEncoding {
fn from(s: &str) -> Self {
match s {
"AUTO" => XavcEntropyEncoding::Auto,
"CABAC" => XavcEntropyEncoding::Cabac,
"CAVLC" => XavcEntropyEncoding::Cavlc,
other => XavcEntropyEncoding::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcEntropyEncoding {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcEntropyEncoding::from(s))
}
}
impl XavcEntropyEncoding {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcEntropyEncoding::Auto => "AUTO",
XavcEntropyEncoding::Cabac => "CABAC",
XavcEntropyEncoding::Cavlc => "CAVLC",
XavcEntropyEncoding::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "CABAC", "CAVLC"]
}
}
impl AsRef<str> for XavcEntropyEncoding {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set Adaptive quantization (adaptiveQuantization) to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization to Off (OFF). Related settings: The value that you choose here applies to the following settings: Flicker adaptive quantization (flickerAdaptiveQuantization), Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum XavcAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Higher,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Max,
#[allow(missing_docs)] // documentation missing in model
Medium,
#[allow(missing_docs)] // documentation missing in model
Off,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for XavcAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"AUTO" => XavcAdaptiveQuantization::Auto,
"HIGH" => XavcAdaptiveQuantization::High,
"HIGHER" => XavcAdaptiveQuantization::Higher,
"LOW" => XavcAdaptiveQuantization::Low,
"MAX" => XavcAdaptiveQuantization::Max,
"MEDIUM" => XavcAdaptiveQuantization::Medium,
"OFF" => XavcAdaptiveQuantization::Off,
other => XavcAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for XavcAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(XavcAdaptiveQuantization::from(s))
}
}
impl XavcAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
XavcAdaptiveQuantization::Auto => "AUTO",
XavcAdaptiveQuantization::High => "HIGH",
XavcAdaptiveQuantization::Higher => "HIGHER",
XavcAdaptiveQuantization::Low => "LOW",
XavcAdaptiveQuantization::Max => "MAX",
XavcAdaptiveQuantization::Medium => "MEDIUM",
XavcAdaptiveQuantization::Off => "OFF",
XavcAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "HIGH", "HIGHER", "LOW", "MAX", "MEDIUM", "OFF"]
}
}
impl AsRef<str> for XavcAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP9.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Vp9Settings {
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub bitrate: i32,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::Vp9FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::Vp9FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub gop_size: f64,
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub hrd_buffer_size: i32,
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub max_bitrate: i32,
/// Optional. Specify how the service determines the pixel aspect ratio for this output. The default behavior is to use the same pixel aspect ratio as your input video.
pub par_control: std::option::Option<crate::model::Vp9ParControl>,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub par_denominator: i32,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub par_numerator: i32,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::Vp9QualityTuningLevel>,
/// With the VP9 codec, you can use only the variable bitrate (VBR) rate control mode.
pub rate_control_mode: std::option::Option<crate::model::Vp9RateControlMode>,
}
impl Vp9Settings {
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::Vp9FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::Vp9FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub fn gop_size(&self) -> f64 {
self.gop_size
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub fn max_bitrate(&self) -> i32 {
self.max_bitrate
}
/// Optional. Specify how the service determines the pixel aspect ratio for this output. The default behavior is to use the same pixel aspect ratio as your input video.
pub fn par_control(&self) -> std::option::Option<&crate::model::Vp9ParControl> {
self.par_control.as_ref()
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(&self) -> i32 {
self.par_denominator
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(&self) -> i32 {
self.par_numerator
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::Vp9QualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// With the VP9 codec, you can use only the variable bitrate (VBR) rate control mode.
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::Vp9RateControlMode> {
self.rate_control_mode.as_ref()
}
}
impl std::fmt::Debug for Vp9Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Vp9Settings");
formatter.field("bitrate", &self.bitrate);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("gop_size", &self.gop_size);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("max_bitrate", &self.max_bitrate);
formatter.field("par_control", &self.par_control);
formatter.field("par_denominator", &self.par_denominator);
formatter.field("par_numerator", &self.par_numerator);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.finish()
}
}
/// See [`Vp9Settings`](crate::model::Vp9Settings)
pub mod vp9_settings {
/// A builder for [`Vp9Settings`](crate::model::Vp9Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) framerate_control: std::option::Option<crate::model::Vp9FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::Vp9FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) gop_size: std::option::Option<f64>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) max_bitrate: std::option::Option<i32>,
pub(crate) par_control: std::option::Option<crate::model::Vp9ParControl>,
pub(crate) par_denominator: std::option::Option<i32>,
pub(crate) par_numerator: std::option::Option<i32>,
pub(crate) quality_tuning_level: std::option::Option<crate::model::Vp9QualityTuningLevel>,
pub(crate) rate_control_mode: std::option::Option<crate::model::Vp9RateControlMode>,
}
impl Builder {
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::Vp9FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::Vp9FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::Vp9FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::Vp9FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub fn gop_size(mut self, input: f64) -> Self {
self.gop_size = Some(input);
self
}
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub fn set_gop_size(mut self, input: std::option::Option<f64>) -> Self {
self.gop_size = input;
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub fn max_bitrate(mut self, input: i32) -> Self {
self.max_bitrate = Some(input);
self
}
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub fn set_max_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_bitrate = input;
self
}
/// Optional. Specify how the service determines the pixel aspect ratio for this output. The default behavior is to use the same pixel aspect ratio as your input video.
pub fn par_control(mut self, input: crate::model::Vp9ParControl) -> Self {
self.par_control = Some(input);
self
}
/// Optional. Specify how the service determines the pixel aspect ratio for this output. The default behavior is to use the same pixel aspect ratio as your input video.
pub fn set_par_control(
mut self,
input: std::option::Option<crate::model::Vp9ParControl>,
) -> Self {
self.par_control = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(mut self, input: i32) -> Self {
self.par_denominator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn set_par_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.par_denominator = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(mut self, input: i32) -> Self {
self.par_numerator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn set_par_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.par_numerator = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub fn quality_tuning_level(mut self, input: crate::model::Vp9QualityTuningLevel) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::Vp9QualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// With the VP9 codec, you can use only the variable bitrate (VBR) rate control mode.
pub fn rate_control_mode(mut self, input: crate::model::Vp9RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// With the VP9 codec, you can use only the variable bitrate (VBR) rate control mode.
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::Vp9RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Consumes the builder and constructs a [`Vp9Settings`](crate::model::Vp9Settings)
pub fn build(self) -> crate::model::Vp9Settings {
crate::model::Vp9Settings {
bitrate: self.bitrate.unwrap_or_default(),
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
gop_size: self.gop_size.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
max_bitrate: self.max_bitrate.unwrap_or_default(),
par_control: self.par_control,
par_denominator: self.par_denominator.unwrap_or_default(),
par_numerator: self.par_numerator.unwrap_or_default(),
quality_tuning_level: self.quality_tuning_level,
rate_control_mode: self.rate_control_mode,
}
}
}
}
impl Vp9Settings {
/// Creates a new builder-style object to manufacture [`Vp9Settings`](crate::model::Vp9Settings)
pub fn builder() -> crate::model::vp9_settings::Builder {
crate::model::vp9_settings::Builder::default()
}
}
/// With the VP9 codec, you can use only the variable bitrate (VBR) rate control mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp9RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp9RateControlMode {
fn from(s: &str) -> Self {
match s {
"VBR" => Vp9RateControlMode::Vbr,
other => Vp9RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp9RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp9RateControlMode::from(s))
}
}
impl Vp9RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp9RateControlMode::Vbr => "VBR",
Vp9RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["VBR"]
}
}
impl AsRef<str> for Vp9RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp9QualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPass,
#[allow(missing_docs)] // documentation missing in model
MultiPassHq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp9QualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS" => Vp9QualityTuningLevel::MultiPass,
"MULTI_PASS_HQ" => Vp9QualityTuningLevel::MultiPassHq,
other => Vp9QualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp9QualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp9QualityTuningLevel::from(s))
}
}
impl Vp9QualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp9QualityTuningLevel::MultiPass => "MULTI_PASS",
Vp9QualityTuningLevel::MultiPassHq => "MULTI_PASS_HQ",
Vp9QualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS", "MULTI_PASS_HQ"]
}
}
impl AsRef<str> for Vp9QualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp9ParControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp9ParControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Vp9ParControl::InitializeFromSource,
"SPECIFIED" => Vp9ParControl::Specified,
other => Vp9ParControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp9ParControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp9ParControl::from(s))
}
}
impl Vp9ParControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp9ParControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Vp9ParControl::Specified => "SPECIFIED",
Vp9ParControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Vp9ParControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp9FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp9FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => Vp9FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => Vp9FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => Vp9FramerateConversionAlgorithm::Interpolate,
other => Vp9FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp9FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp9FramerateConversionAlgorithm::from(s))
}
}
impl Vp9FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp9FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
Vp9FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
Vp9FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
Vp9FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for Vp9FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp9FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp9FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Vp9FramerateControl::InitializeFromSource,
"SPECIFIED" => Vp9FramerateControl::Specified,
other => Vp9FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp9FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp9FramerateControl::from(s))
}
}
impl Vp9FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp9FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Vp9FramerateControl::Specified => "SPECIFIED",
Vp9FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Vp9FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VP8.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Vp8Settings {
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub bitrate: i32,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::Vp8FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::Vp8FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub gop_size: f64,
/// Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub hrd_buffer_size: i32,
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub max_bitrate: i32,
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub par_control: std::option::Option<crate::model::Vp8ParControl>,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub par_denominator: i32,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub par_numerator: i32,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::Vp8QualityTuningLevel>,
/// With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
pub rate_control_mode: std::option::Option<crate::model::Vp8RateControlMode>,
}
impl Vp8Settings {
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::Vp8FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::Vp8FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub fn gop_size(&self) -> f64 {
self.gop_size
}
/// Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub fn max_bitrate(&self) -> i32 {
self.max_bitrate
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(&self) -> std::option::Option<&crate::model::Vp8ParControl> {
self.par_control.as_ref()
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(&self) -> i32 {
self.par_denominator
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(&self) -> i32 {
self.par_numerator
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::Vp8QualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::Vp8RateControlMode> {
self.rate_control_mode.as_ref()
}
}
impl std::fmt::Debug for Vp8Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Vp8Settings");
formatter.field("bitrate", &self.bitrate);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("gop_size", &self.gop_size);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("max_bitrate", &self.max_bitrate);
formatter.field("par_control", &self.par_control);
formatter.field("par_denominator", &self.par_denominator);
formatter.field("par_numerator", &self.par_numerator);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.finish()
}
}
/// See [`Vp8Settings`](crate::model::Vp8Settings)
pub mod vp8_settings {
/// A builder for [`Vp8Settings`](crate::model::Vp8Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) framerate_control: std::option::Option<crate::model::Vp8FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::Vp8FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) gop_size: std::option::Option<f64>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) max_bitrate: std::option::Option<i32>,
pub(crate) par_control: std::option::Option<crate::model::Vp8ParControl>,
pub(crate) par_denominator: std::option::Option<i32>,
pub(crate) par_numerator: std::option::Option<i32>,
pub(crate) quality_tuning_level: std::option::Option<crate::model::Vp8QualityTuningLevel>,
pub(crate) rate_control_mode: std::option::Option<crate::model::Vp8RateControlMode>,
}
impl Builder {
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::Vp8FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::Vp8FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::Vp8FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::Vp8FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub fn gop_size(mut self, input: f64) -> Self {
self.gop_size = Some(input);
self
}
/// GOP Length (keyframe interval) in frames. Must be greater than zero.
pub fn set_gop_size(mut self, input: std::option::Option<f64>) -> Self {
self.gop_size = input;
self
}
/// Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub fn max_bitrate(mut self, input: i32) -> Self {
self.max_bitrate = Some(input);
self
}
/// Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target bitrate as the maximum bitrate.
pub fn set_max_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_bitrate = input;
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(mut self, input: crate::model::Vp8ParControl) -> Self {
self.par_control = Some(input);
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn set_par_control(
mut self,
input: std::option::Option<crate::model::Vp8ParControl>,
) -> Self {
self.par_control = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(mut self, input: i32) -> Self {
self.par_denominator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn set_par_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.par_denominator = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(mut self, input: i32) -> Self {
self.par_numerator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn set_par_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.par_numerator = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub fn quality_tuning_level(mut self, input: crate::model::Vp8QualityTuningLevel) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::Vp8QualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
pub fn rate_control_mode(mut self, input: crate::model::Vp8RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::Vp8RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Consumes the builder and constructs a [`Vp8Settings`](crate::model::Vp8Settings)
pub fn build(self) -> crate::model::Vp8Settings {
crate::model::Vp8Settings {
bitrate: self.bitrate.unwrap_or_default(),
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
gop_size: self.gop_size.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
max_bitrate: self.max_bitrate.unwrap_or_default(),
par_control: self.par_control,
par_denominator: self.par_denominator.unwrap_or_default(),
par_numerator: self.par_numerator.unwrap_or_default(),
quality_tuning_level: self.quality_tuning_level,
rate_control_mode: self.rate_control_mode,
}
}
}
}
impl Vp8Settings {
/// Creates a new builder-style object to manufacture [`Vp8Settings`](crate::model::Vp8Settings)
pub fn builder() -> crate::model::vp8_settings::Builder {
crate::model::vp8_settings::Builder::default()
}
}
/// With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp8RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp8RateControlMode {
fn from(s: &str) -> Self {
match s {
"VBR" => Vp8RateControlMode::Vbr,
other => Vp8RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp8RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp8RateControlMode::from(s))
}
}
impl Vp8RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp8RateControlMode::Vbr => "VBR",
Vp8RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["VBR"]
}
}
impl AsRef<str> for Vp8RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, multi-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp8QualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPass,
#[allow(missing_docs)] // documentation missing in model
MultiPassHq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp8QualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS" => Vp8QualityTuningLevel::MultiPass,
"MULTI_PASS_HQ" => Vp8QualityTuningLevel::MultiPassHq,
other => Vp8QualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp8QualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp8QualityTuningLevel::from(s))
}
}
impl Vp8QualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp8QualityTuningLevel::MultiPass => "MULTI_PASS",
Vp8QualityTuningLevel::MultiPassHq => "MULTI_PASS_HQ",
Vp8QualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS", "MULTI_PASS_HQ"]
}
}
impl AsRef<str> for Vp8QualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp8ParControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp8ParControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Vp8ParControl::InitializeFromSource,
"SPECIFIED" => Vp8ParControl::Specified,
other => Vp8ParControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp8ParControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp8ParControl::from(s))
}
}
impl Vp8ParControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp8ParControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Vp8ParControl::Specified => "SPECIFIED",
Vp8ParControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Vp8ParControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp8FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp8FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => Vp8FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => Vp8FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => Vp8FramerateConversionAlgorithm::Interpolate,
other => Vp8FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp8FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp8FramerateConversionAlgorithm::from(s))
}
}
impl Vp8FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp8FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
Vp8FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
Vp8FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
Vp8FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for Vp8FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vp8FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vp8FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Vp8FramerateControl::InitializeFromSource,
"SPECIFIED" => Vp8FramerateControl::Specified,
other => Vp8FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vp8FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vp8FramerateControl::from(s))
}
}
impl Vp8FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vp8FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Vp8FramerateControl::Specified => "SPECIFIED",
Vp8FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Vp8FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value VC3
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Vc3Settings {
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::Vc3FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::Vc3FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output.
pub interlace_mode: std::option::Option<crate::model::Vc3InterlaceMode>,
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub scan_type_conversion_mode: std::option::Option<crate::model::Vc3ScanTypeConversionMode>,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::Vc3SlowPal>,
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub telecine: std::option::Option<crate::model::Vc3Telecine>,
/// Specify the VC3 class to choose the quality characteristics for this output. VC3 class, together with the settings Framerate (framerateNumerator and framerateDenominator) and Resolution (height and width), determine your output bitrate. For example, say that your video resolution is 1920x1080 and your framerate is 29.97. Then Class 145 (CLASS_145) gives you an output with a bitrate of approximately 145 Mbps and Class 220 (CLASS_220) gives you and output with a bitrate of approximately 220 Mbps. VC3 class also specifies the color bit depth of your output.
pub vc3_class: std::option::Option<crate::model::Vc3Class>,
}
impl Vc3Settings {
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::Vc3FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::Vc3FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::Vc3InterlaceMode> {
self.interlace_mode.as_ref()
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
&self,
) -> std::option::Option<&crate::model::Vc3ScanTypeConversionMode> {
self.scan_type_conversion_mode.as_ref()
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::Vc3SlowPal> {
self.slow_pal.as_ref()
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(&self) -> std::option::Option<&crate::model::Vc3Telecine> {
self.telecine.as_ref()
}
/// Specify the VC3 class to choose the quality characteristics for this output. VC3 class, together with the settings Framerate (framerateNumerator and framerateDenominator) and Resolution (height and width), determine your output bitrate. For example, say that your video resolution is 1920x1080 and your framerate is 29.97. Then Class 145 (CLASS_145) gives you an output with a bitrate of approximately 145 Mbps and Class 220 (CLASS_220) gives you and output with a bitrate of approximately 220 Mbps. VC3 class also specifies the color bit depth of your output.
pub fn vc3_class(&self) -> std::option::Option<&crate::model::Vc3Class> {
self.vc3_class.as_ref()
}
}
impl std::fmt::Debug for Vc3Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Vc3Settings");
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("scan_type_conversion_mode", &self.scan_type_conversion_mode);
formatter.field("slow_pal", &self.slow_pal);
formatter.field("telecine", &self.telecine);
formatter.field("vc3_class", &self.vc3_class);
formatter.finish()
}
}
/// See [`Vc3Settings`](crate::model::Vc3Settings)
pub mod vc3_settings {
/// A builder for [`Vc3Settings`](crate::model::Vc3Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framerate_control: std::option::Option<crate::model::Vc3FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::Vc3FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::Vc3InterlaceMode>,
pub(crate) scan_type_conversion_mode:
std::option::Option<crate::model::Vc3ScanTypeConversionMode>,
pub(crate) slow_pal: std::option::Option<crate::model::Vc3SlowPal>,
pub(crate) telecine: std::option::Option<crate::model::Vc3Telecine>,
pub(crate) vc3_class: std::option::Option<crate::model::Vc3Class>,
}
impl Builder {
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::Vc3FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::Vc3FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::Vc3FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::Vc3FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output.
pub fn interlace_mode(mut self, input: crate::model::Vc3InterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::Vc3InterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
mut self,
input: crate::model::Vc3ScanTypeConversionMode,
) -> Self {
self.scan_type_conversion_mode = Some(input);
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn set_scan_type_conversion_mode(
mut self,
input: std::option::Option<crate::model::Vc3ScanTypeConversionMode>,
) -> Self {
self.scan_type_conversion_mode = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::Vc3SlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::Vc3SlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(mut self, input: crate::model::Vc3Telecine) -> Self {
self.telecine = Some(input);
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::Vc3Telecine>,
) -> Self {
self.telecine = input;
self
}
/// Specify the VC3 class to choose the quality characteristics for this output. VC3 class, together with the settings Framerate (framerateNumerator and framerateDenominator) and Resolution (height and width), determine your output bitrate. For example, say that your video resolution is 1920x1080 and your framerate is 29.97. Then Class 145 (CLASS_145) gives you an output with a bitrate of approximately 145 Mbps and Class 220 (CLASS_220) gives you and output with a bitrate of approximately 220 Mbps. VC3 class also specifies the color bit depth of your output.
pub fn vc3_class(mut self, input: crate::model::Vc3Class) -> Self {
self.vc3_class = Some(input);
self
}
/// Specify the VC3 class to choose the quality characteristics for this output. VC3 class, together with the settings Framerate (framerateNumerator and framerateDenominator) and Resolution (height and width), determine your output bitrate. For example, say that your video resolution is 1920x1080 and your framerate is 29.97. Then Class 145 (CLASS_145) gives you an output with a bitrate of approximately 145 Mbps and Class 220 (CLASS_220) gives you and output with a bitrate of approximately 220 Mbps. VC3 class also specifies the color bit depth of your output.
pub fn set_vc3_class(mut self, input: std::option::Option<crate::model::Vc3Class>) -> Self {
self.vc3_class = input;
self
}
/// Consumes the builder and constructs a [`Vc3Settings`](crate::model::Vc3Settings)
pub fn build(self) -> crate::model::Vc3Settings {
crate::model::Vc3Settings {
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
interlace_mode: self.interlace_mode,
scan_type_conversion_mode: self.scan_type_conversion_mode,
slow_pal: self.slow_pal,
telecine: self.telecine,
vc3_class: self.vc3_class,
}
}
}
}
impl Vc3Settings {
/// Creates a new builder-style object to manufacture [`Vc3Settings`](crate::model::Vc3Settings)
pub fn builder() -> crate::model::vc3_settings::Builder {
crate::model::vc3_settings::Builder::default()
}
}
/// Specify the VC3 class to choose the quality characteristics for this output. VC3 class, together with the settings Framerate (framerateNumerator and framerateDenominator) and Resolution (height and width), determine your output bitrate. For example, say that your video resolution is 1920x1080 and your framerate is 29.97. Then Class 145 (CLASS_145) gives you an output with a bitrate of approximately 145 Mbps and Class 220 (CLASS_220) gives you and output with a bitrate of approximately 220 Mbps. VC3 class also specifies the color bit depth of your output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3Class {
#[allow(missing_docs)] // documentation missing in model
Class1458Bit,
#[allow(missing_docs)] // documentation missing in model
Class22010Bit,
#[allow(missing_docs)] // documentation missing in model
Class2208Bit,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3Class {
fn from(s: &str) -> Self {
match s {
"CLASS_145_8BIT" => Vc3Class::Class1458Bit,
"CLASS_220_10BIT" => Vc3Class::Class22010Bit,
"CLASS_220_8BIT" => Vc3Class::Class2208Bit,
other => Vc3Class::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3Class {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3Class::from(s))
}
}
impl Vc3Class {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3Class::Class1458Bit => "CLASS_145_8BIT",
Vc3Class::Class22010Bit => "CLASS_220_10BIT",
Vc3Class::Class2208Bit => "CLASS_220_8BIT",
Vc3Class::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CLASS_145_8BIT", "CLASS_220_10BIT", "CLASS_220_8BIT"]
}
}
impl AsRef<str> for Vc3Class {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3Telecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3Telecine {
fn from(s: &str) -> Self {
match s {
"HARD" => Vc3Telecine::Hard,
"NONE" => Vc3Telecine::None,
other => Vc3Telecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3Telecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3Telecine::from(s))
}
}
impl Vc3Telecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3Telecine::Hard => "HARD",
Vc3Telecine::None => "NONE",
Vc3Telecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE"]
}
}
impl AsRef<str> for Vc3Telecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output by relabeling the video frames and resampling your audio. Note that enabling this setting will slightly reduce the duration of your video. Related settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3SlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3SlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Vc3SlowPal::Disabled,
"ENABLED" => Vc3SlowPal::Enabled,
other => Vc3SlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3SlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3SlowPal::from(s))
}
}
impl Vc3SlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3SlowPal::Disabled => "DISABLED",
Vc3SlowPal::Enabled => "ENABLED",
Vc3SlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Vc3SlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3ScanTypeConversionMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
InterlacedOptimize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3ScanTypeConversionMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => Vc3ScanTypeConversionMode::Interlaced,
"INTERLACED_OPTIMIZE" => Vc3ScanTypeConversionMode::InterlacedOptimize,
other => Vc3ScanTypeConversionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3ScanTypeConversionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3ScanTypeConversionMode::from(s))
}
}
impl Vc3ScanTypeConversionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3ScanTypeConversionMode::Interlaced => "INTERLACED",
Vc3ScanTypeConversionMode::InterlacedOptimize => "INTERLACED_OPTIMIZE",
Vc3ScanTypeConversionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "INTERLACED_OPTIMIZE"]
}
}
impl AsRef<str> for Vc3ScanTypeConversionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Choose the scan line type for this output. If you don't specify a value, MediaConvert will create a progressive output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3InterlaceMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
Progressive,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3InterlaceMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => Vc3InterlaceMode::Interlaced,
"PROGRESSIVE" => Vc3InterlaceMode::Progressive,
other => Vc3InterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3InterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3InterlaceMode::from(s))
}
}
impl Vc3InterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3InterlaceMode::Interlaced => "INTERLACED",
Vc3InterlaceMode::Progressive => "PROGRESSIVE",
Vc3InterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "PROGRESSIVE"]
}
}
impl AsRef<str> for Vc3InterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => Vc3FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => Vc3FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => Vc3FramerateConversionAlgorithm::Interpolate,
other => Vc3FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3FramerateConversionAlgorithm::from(s))
}
}
impl Vc3FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
Vc3FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
Vc3FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
Vc3FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for Vc3FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Vc3FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Vc3FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Vc3FramerateControl::InitializeFromSource,
"SPECIFIED" => Vc3FramerateControl::Specified,
other => Vc3FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Vc3FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Vc3FramerateControl::from(s))
}
}
impl Vc3FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Vc3FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Vc3FramerateControl::Specified => "SPECIFIED",
Vc3FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Vc3FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value PRORES.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProresSettings {
/// This setting applies only to ProRes 4444 and ProRes 4444 XQ outputs that you create from inputs that use 4:4:4 chroma sampling. Set Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING) to allow outputs to also use 4:4:4 chroma sampling. You must specify a value for this setting when your output codec profile supports 4:4:4 chroma sampling. Related Settings: When you set Chroma sampling to Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING), you must choose an output codec profile that supports 4:4:4 chroma sampling. These values for Profile (CodecProfile) support 4:4:4 chroma sampling: Apple ProRes 4444 (APPLE_PRORES_4444) or Apple ProRes 4444 XQ (APPLE_PRORES_4444_XQ). When you set Chroma sampling to Preserve 4:4:4 sampling, you must disable all video preprocessors except for Nexguard file marker (PartnerWatermarking). When you set Chroma sampling to Preserve 4:4:4 sampling and use framerate conversion, you must set Frame rate conversion algorithm (FramerateConversionAlgorithm) to Drop duplicate (DUPLICATE_DROP).
pub chroma_sampling: std::option::Option<crate::model::ProresChromaSampling>,
/// Use Profile (ProResCodecProfile) to specify the type of Apple ProRes codec to use for this output.
pub codec_profile: std::option::Option<crate::model::ProresCodecProfile>,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::ProresFramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::ProresFramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub interlace_mode: std::option::Option<crate::model::ProresInterlaceMode>,
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub par_control: std::option::Option<crate::model::ProresParControl>,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub par_denominator: i32,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub par_numerator: i32,
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub scan_type_conversion_mode: std::option::Option<crate::model::ProresScanTypeConversionMode>,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::ProresSlowPal>,
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub telecine: std::option::Option<crate::model::ProresTelecine>,
}
impl ProresSettings {
/// This setting applies only to ProRes 4444 and ProRes 4444 XQ outputs that you create from inputs that use 4:4:4 chroma sampling. Set Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING) to allow outputs to also use 4:4:4 chroma sampling. You must specify a value for this setting when your output codec profile supports 4:4:4 chroma sampling. Related Settings: When you set Chroma sampling to Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING), you must choose an output codec profile that supports 4:4:4 chroma sampling. These values for Profile (CodecProfile) support 4:4:4 chroma sampling: Apple ProRes 4444 (APPLE_PRORES_4444) or Apple ProRes 4444 XQ (APPLE_PRORES_4444_XQ). When you set Chroma sampling to Preserve 4:4:4 sampling, you must disable all video preprocessors except for Nexguard file marker (PartnerWatermarking). When you set Chroma sampling to Preserve 4:4:4 sampling and use framerate conversion, you must set Frame rate conversion algorithm (FramerateConversionAlgorithm) to Drop duplicate (DUPLICATE_DROP).
pub fn chroma_sampling(&self) -> std::option::Option<&crate::model::ProresChromaSampling> {
self.chroma_sampling.as_ref()
}
/// Use Profile (ProResCodecProfile) to specify the type of Apple ProRes codec to use for this output.
pub fn codec_profile(&self) -> std::option::Option<&crate::model::ProresCodecProfile> {
self.codec_profile.as_ref()
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::ProresFramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::ProresFramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::ProresInterlaceMode> {
self.interlace_mode.as_ref()
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(&self) -> std::option::Option<&crate::model::ProresParControl> {
self.par_control.as_ref()
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(&self) -> i32 {
self.par_denominator
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(&self) -> i32 {
self.par_numerator
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
&self,
) -> std::option::Option<&crate::model::ProresScanTypeConversionMode> {
self.scan_type_conversion_mode.as_ref()
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::ProresSlowPal> {
self.slow_pal.as_ref()
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(&self) -> std::option::Option<&crate::model::ProresTelecine> {
self.telecine.as_ref()
}
}
impl std::fmt::Debug for ProresSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ProresSettings");
formatter.field("chroma_sampling", &self.chroma_sampling);
formatter.field("codec_profile", &self.codec_profile);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("par_control", &self.par_control);
formatter.field("par_denominator", &self.par_denominator);
formatter.field("par_numerator", &self.par_numerator);
formatter.field("scan_type_conversion_mode", &self.scan_type_conversion_mode);
formatter.field("slow_pal", &self.slow_pal);
formatter.field("telecine", &self.telecine);
formatter.finish()
}
}
/// See [`ProresSettings`](crate::model::ProresSettings)
pub mod prores_settings {
/// A builder for [`ProresSettings`](crate::model::ProresSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) chroma_sampling: std::option::Option<crate::model::ProresChromaSampling>,
pub(crate) codec_profile: std::option::Option<crate::model::ProresCodecProfile>,
pub(crate) framerate_control: std::option::Option<crate::model::ProresFramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::ProresFramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::ProresInterlaceMode>,
pub(crate) par_control: std::option::Option<crate::model::ProresParControl>,
pub(crate) par_denominator: std::option::Option<i32>,
pub(crate) par_numerator: std::option::Option<i32>,
pub(crate) scan_type_conversion_mode:
std::option::Option<crate::model::ProresScanTypeConversionMode>,
pub(crate) slow_pal: std::option::Option<crate::model::ProresSlowPal>,
pub(crate) telecine: std::option::Option<crate::model::ProresTelecine>,
}
impl Builder {
/// This setting applies only to ProRes 4444 and ProRes 4444 XQ outputs that you create from inputs that use 4:4:4 chroma sampling. Set Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING) to allow outputs to also use 4:4:4 chroma sampling. You must specify a value for this setting when your output codec profile supports 4:4:4 chroma sampling. Related Settings: When you set Chroma sampling to Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING), you must choose an output codec profile that supports 4:4:4 chroma sampling. These values for Profile (CodecProfile) support 4:4:4 chroma sampling: Apple ProRes 4444 (APPLE_PRORES_4444) or Apple ProRes 4444 XQ (APPLE_PRORES_4444_XQ). When you set Chroma sampling to Preserve 4:4:4 sampling, you must disable all video preprocessors except for Nexguard file marker (PartnerWatermarking). When you set Chroma sampling to Preserve 4:4:4 sampling and use framerate conversion, you must set Frame rate conversion algorithm (FramerateConversionAlgorithm) to Drop duplicate (DUPLICATE_DROP).
pub fn chroma_sampling(mut self, input: crate::model::ProresChromaSampling) -> Self {
self.chroma_sampling = Some(input);
self
}
/// This setting applies only to ProRes 4444 and ProRes 4444 XQ outputs that you create from inputs that use 4:4:4 chroma sampling. Set Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING) to allow outputs to also use 4:4:4 chroma sampling. You must specify a value for this setting when your output codec profile supports 4:4:4 chroma sampling. Related Settings: When you set Chroma sampling to Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING), you must choose an output codec profile that supports 4:4:4 chroma sampling. These values for Profile (CodecProfile) support 4:4:4 chroma sampling: Apple ProRes 4444 (APPLE_PRORES_4444) or Apple ProRes 4444 XQ (APPLE_PRORES_4444_XQ). When you set Chroma sampling to Preserve 4:4:4 sampling, you must disable all video preprocessors except for Nexguard file marker (PartnerWatermarking). When you set Chroma sampling to Preserve 4:4:4 sampling and use framerate conversion, you must set Frame rate conversion algorithm (FramerateConversionAlgorithm) to Drop duplicate (DUPLICATE_DROP).
pub fn set_chroma_sampling(
mut self,
input: std::option::Option<crate::model::ProresChromaSampling>,
) -> Self {
self.chroma_sampling = input;
self
}
/// Use Profile (ProResCodecProfile) to specify the type of Apple ProRes codec to use for this output.
pub fn codec_profile(mut self, input: crate::model::ProresCodecProfile) -> Self {
self.codec_profile = Some(input);
self
}
/// Use Profile (ProResCodecProfile) to specify the type of Apple ProRes codec to use for this output.
pub fn set_codec_profile(
mut self,
input: std::option::Option<crate::model::ProresCodecProfile>,
) -> Self {
self.codec_profile = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::ProresFramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::ProresFramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::ProresFramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::ProresFramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(mut self, input: crate::model::ProresInterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::ProresInterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(mut self, input: crate::model::ProresParControl) -> Self {
self.par_control = Some(input);
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn set_par_control(
mut self,
input: std::option::Option<crate::model::ProresParControl>,
) -> Self {
self.par_control = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(mut self, input: i32) -> Self {
self.par_denominator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn set_par_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.par_denominator = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(mut self, input: i32) -> Self {
self.par_numerator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn set_par_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.par_numerator = input;
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
mut self,
input: crate::model::ProresScanTypeConversionMode,
) -> Self {
self.scan_type_conversion_mode = Some(input);
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn set_scan_type_conversion_mode(
mut self,
input: std::option::Option<crate::model::ProresScanTypeConversionMode>,
) -> Self {
self.scan_type_conversion_mode = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::ProresSlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::ProresSlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(mut self, input: crate::model::ProresTelecine) -> Self {
self.telecine = Some(input);
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::ProresTelecine>,
) -> Self {
self.telecine = input;
self
}
/// Consumes the builder and constructs a [`ProresSettings`](crate::model::ProresSettings)
pub fn build(self) -> crate::model::ProresSettings {
crate::model::ProresSettings {
chroma_sampling: self.chroma_sampling,
codec_profile: self.codec_profile,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
interlace_mode: self.interlace_mode,
par_control: self.par_control,
par_denominator: self.par_denominator.unwrap_or_default(),
par_numerator: self.par_numerator.unwrap_or_default(),
scan_type_conversion_mode: self.scan_type_conversion_mode,
slow_pal: self.slow_pal,
telecine: self.telecine,
}
}
}
}
impl ProresSettings {
/// Creates a new builder-style object to manufacture [`ProresSettings`](crate::model::ProresSettings)
pub fn builder() -> crate::model::prores_settings::Builder {
crate::model::prores_settings::Builder::default()
}
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresTelecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresTelecine {
fn from(s: &str) -> Self {
match s {
"HARD" => ProresTelecine::Hard,
"NONE" => ProresTelecine::None,
other => ProresTelecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresTelecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresTelecine::from(s))
}
}
impl ProresTelecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresTelecine::Hard => "HARD",
ProresTelecine::None => "NONE",
ProresTelecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE"]
}
}
impl AsRef<str> for ProresTelecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresSlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresSlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => ProresSlowPal::Disabled,
"ENABLED" => ProresSlowPal::Enabled,
other => ProresSlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresSlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresSlowPal::from(s))
}
}
impl ProresSlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresSlowPal::Disabled => "DISABLED",
ProresSlowPal::Enabled => "ENABLED",
ProresSlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for ProresSlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresScanTypeConversionMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
InterlacedOptimize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresScanTypeConversionMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => ProresScanTypeConversionMode::Interlaced,
"INTERLACED_OPTIMIZE" => ProresScanTypeConversionMode::InterlacedOptimize,
other => ProresScanTypeConversionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresScanTypeConversionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresScanTypeConversionMode::from(s))
}
}
impl ProresScanTypeConversionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresScanTypeConversionMode::Interlaced => "INTERLACED",
ProresScanTypeConversionMode::InterlacedOptimize => "INTERLACED_OPTIMIZE",
ProresScanTypeConversionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "INTERLACED_OPTIMIZE"]
}
}
impl AsRef<str> for ProresScanTypeConversionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresParControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresParControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => ProresParControl::InitializeFromSource,
"SPECIFIED" => ProresParControl::Specified,
other => ProresParControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresParControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresParControl::from(s))
}
}
impl ProresParControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresParControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
ProresParControl::Specified => "SPECIFIED",
ProresParControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for ProresParControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresInterlaceMode {
#[allow(missing_docs)] // documentation missing in model
BottomField,
#[allow(missing_docs)] // documentation missing in model
FollowBottomField,
#[allow(missing_docs)] // documentation missing in model
FollowTopField,
#[allow(missing_docs)] // documentation missing in model
Progressive,
#[allow(missing_docs)] // documentation missing in model
TopField,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresInterlaceMode {
fn from(s: &str) -> Self {
match s {
"BOTTOM_FIELD" => ProresInterlaceMode::BottomField,
"FOLLOW_BOTTOM_FIELD" => ProresInterlaceMode::FollowBottomField,
"FOLLOW_TOP_FIELD" => ProresInterlaceMode::FollowTopField,
"PROGRESSIVE" => ProresInterlaceMode::Progressive,
"TOP_FIELD" => ProresInterlaceMode::TopField,
other => ProresInterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresInterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresInterlaceMode::from(s))
}
}
impl ProresInterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresInterlaceMode::BottomField => "BOTTOM_FIELD",
ProresInterlaceMode::FollowBottomField => "FOLLOW_BOTTOM_FIELD",
ProresInterlaceMode::FollowTopField => "FOLLOW_TOP_FIELD",
ProresInterlaceMode::Progressive => "PROGRESSIVE",
ProresInterlaceMode::TopField => "TOP_FIELD",
ProresInterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_FIELD",
"FOLLOW_BOTTOM_FIELD",
"FOLLOW_TOP_FIELD",
"PROGRESSIVE",
"TOP_FIELD",
]
}
}
impl AsRef<str> for ProresInterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresFramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresFramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => ProresFramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => ProresFramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => ProresFramerateConversionAlgorithm::Interpolate,
other => ProresFramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresFramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresFramerateConversionAlgorithm::from(s))
}
}
impl ProresFramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresFramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
ProresFramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
ProresFramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
ProresFramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for ProresFramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresFramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresFramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => ProresFramerateControl::InitializeFromSource,
"SPECIFIED" => ProresFramerateControl::Specified,
other => ProresFramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresFramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresFramerateControl::from(s))
}
}
impl ProresFramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresFramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
ProresFramerateControl::Specified => "SPECIFIED",
ProresFramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for ProresFramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Profile (ProResCodecProfile) to specify the type of Apple ProRes codec to use for this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresCodecProfile {
#[allow(missing_docs)] // documentation missing in model
AppleProres422,
#[allow(missing_docs)] // documentation missing in model
AppleProres422Hq,
#[allow(missing_docs)] // documentation missing in model
AppleProres422Lt,
#[allow(missing_docs)] // documentation missing in model
AppleProres422Proxy,
#[allow(missing_docs)] // documentation missing in model
AppleProres4444,
#[allow(missing_docs)] // documentation missing in model
AppleProres4444Xq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresCodecProfile {
fn from(s: &str) -> Self {
match s {
"APPLE_PRORES_422" => ProresCodecProfile::AppleProres422,
"APPLE_PRORES_422_HQ" => ProresCodecProfile::AppleProres422Hq,
"APPLE_PRORES_422_LT" => ProresCodecProfile::AppleProres422Lt,
"APPLE_PRORES_422_PROXY" => ProresCodecProfile::AppleProres422Proxy,
"APPLE_PRORES_4444" => ProresCodecProfile::AppleProres4444,
"APPLE_PRORES_4444_XQ" => ProresCodecProfile::AppleProres4444Xq,
other => ProresCodecProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresCodecProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresCodecProfile::from(s))
}
}
impl ProresCodecProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresCodecProfile::AppleProres422 => "APPLE_PRORES_422",
ProresCodecProfile::AppleProres422Hq => "APPLE_PRORES_422_HQ",
ProresCodecProfile::AppleProres422Lt => "APPLE_PRORES_422_LT",
ProresCodecProfile::AppleProres422Proxy => "APPLE_PRORES_422_PROXY",
ProresCodecProfile::AppleProres4444 => "APPLE_PRORES_4444",
ProresCodecProfile::AppleProres4444Xq => "APPLE_PRORES_4444_XQ",
ProresCodecProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"APPLE_PRORES_422",
"APPLE_PRORES_422_HQ",
"APPLE_PRORES_422_LT",
"APPLE_PRORES_422_PROXY",
"APPLE_PRORES_4444",
"APPLE_PRORES_4444_XQ",
]
}
}
impl AsRef<str> for ProresCodecProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// This setting applies only to ProRes 4444 and ProRes 4444 XQ outputs that you create from inputs that use 4:4:4 chroma sampling. Set Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING) to allow outputs to also use 4:4:4 chroma sampling. You must specify a value for this setting when your output codec profile supports 4:4:4 chroma sampling. Related Settings: When you set Chroma sampling to Preserve 4:4:4 sampling (PRESERVE_444_SAMPLING), you must choose an output codec profile that supports 4:4:4 chroma sampling. These values for Profile (CodecProfile) support 4:4:4 chroma sampling: Apple ProRes 4444 (APPLE_PRORES_4444) or Apple ProRes 4444 XQ (APPLE_PRORES_4444_XQ). When you set Chroma sampling to Preserve 4:4:4 sampling, you must disable all video preprocessors except for Nexguard file marker (PartnerWatermarking). When you set Chroma sampling to Preserve 4:4:4 sampling and use framerate conversion, you must set Frame rate conversion algorithm (FramerateConversionAlgorithm) to Drop duplicate (DUPLICATE_DROP).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ProresChromaSampling {
#[allow(missing_docs)] // documentation missing in model
Preserve444Sampling,
#[allow(missing_docs)] // documentation missing in model
SubsampleTo422,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ProresChromaSampling {
fn from(s: &str) -> Self {
match s {
"PRESERVE_444_SAMPLING" => ProresChromaSampling::Preserve444Sampling,
"SUBSAMPLE_TO_422" => ProresChromaSampling::SubsampleTo422,
other => ProresChromaSampling::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ProresChromaSampling {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ProresChromaSampling::from(s))
}
}
impl ProresChromaSampling {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ProresChromaSampling::Preserve444Sampling => "PRESERVE_444_SAMPLING",
ProresChromaSampling::SubsampleTo422 => "SUBSAMPLE_TO_422",
ProresChromaSampling::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["PRESERVE_444_SAMPLING", "SUBSAMPLE_TO_422"]
}
}
impl AsRef<str> for ProresChromaSampling {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value MPEG2.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Mpeg2Settings {
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to the following settings: Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub adaptive_quantization: std::option::Option<crate::model::Mpeg2AdaptiveQuantization>,
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub bitrate: i32,
/// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output.
pub codec_level: std::option::Option<crate::model::Mpeg2CodecLevel>,
/// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output.
pub codec_profile: std::option::Option<crate::model::Mpeg2CodecProfile>,
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub dynamic_sub_gop: std::option::Option<crate::model::Mpeg2DynamicSubGop>,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::Mpeg2FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::Mpeg2FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. When you create a streaming output, we recommend that you keep the default value, 1, so that players starting mid-stream receive an IDR frame as quickly as possible. Don't set this value to 0; that would break output segmenting.
pub gop_closed_cadence: i32,
/// Specify the interval between keyframes, in seconds or frames, for this output. Default: 12 Related settings: When you specify the GOP size in seconds, set GOP mode control (GopSizeUnits) to Specified, seconds (SECONDS). The default value for GOP mode control (GopSizeUnits) is Frames (FRAMES).
pub gop_size: f64,
/// Specify the units for GOP size (GopSize). If you don't specify a value here, by default the encoder measures GOP size in frames.
pub gop_size_units: std::option::Option<crate::model::Mpeg2GopSizeUnits>,
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub hrd_buffer_initial_fill_percentage: i32,
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub hrd_buffer_size: i32,
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub interlace_mode: std::option::Option<crate::model::Mpeg2InterlaceMode>,
/// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision for intra-block DC coefficients. If you choose the value auto, the service will automatically select the precision based on the per-frame compression ratio.
pub intra_dc_precision: std::option::Option<crate::model::Mpeg2IntraDcPrecision>,
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub max_bitrate: i32,
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub min_i_interval: i32,
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub number_b_frames_between_reference_frames: i32,
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub par_control: std::option::Option<crate::model::Mpeg2ParControl>,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub par_denominator: i32,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub par_numerator: i32,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::Mpeg2QualityTuningLevel>,
/// Use Rate control mode (Mpeg2RateControlMode) to specify whether the bitrate is variable (vbr) or constant (cbr).
pub rate_control_mode: std::option::Option<crate::model::Mpeg2RateControlMode>,
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub scan_type_conversion_mode: std::option::Option<crate::model::Mpeg2ScanTypeConversionMode>,
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default.
pub scene_change_detect: std::option::Option<crate::model::Mpeg2SceneChangeDetect>,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::Mpeg2SlowPal>,
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, to use the AWS Elemental default matrices. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub softness: i32,
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub spatial_adaptive_quantization:
std::option::Option<crate::model::Mpeg2SpatialAdaptiveQuantization>,
/// Specify whether this output's video uses the D10 syntax. Keep the default value to not use the syntax. Related settings: When you choose D10 (D_10) for your MXF profile (profile), you must also set this value to to D10 (D_10).
pub syntax: std::option::Option<crate::model::Mpeg2Syntax>,
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub telecine: std::option::Option<crate::model::Mpeg2Telecine>,
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub temporal_adaptive_quantization:
std::option::Option<crate::model::Mpeg2TemporalAdaptiveQuantization>,
}
impl Mpeg2Settings {
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to the following settings: Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub fn adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::Mpeg2AdaptiveQuantization> {
self.adaptive_quantization.as_ref()
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output.
pub fn codec_level(&self) -> std::option::Option<&crate::model::Mpeg2CodecLevel> {
self.codec_level.as_ref()
}
/// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output.
pub fn codec_profile(&self) -> std::option::Option<&crate::model::Mpeg2CodecProfile> {
self.codec_profile.as_ref()
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn dynamic_sub_gop(&self) -> std::option::Option<&crate::model::Mpeg2DynamicSubGop> {
self.dynamic_sub_gop.as_ref()
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::Mpeg2FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::Mpeg2FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. When you create a streaming output, we recommend that you keep the default value, 1, so that players starting mid-stream receive an IDR frame as quickly as possible. Don't set this value to 0; that would break output segmenting.
pub fn gop_closed_cadence(&self) -> i32 {
self.gop_closed_cadence
}
/// Specify the interval between keyframes, in seconds or frames, for this output. Default: 12 Related settings: When you specify the GOP size in seconds, set GOP mode control (GopSizeUnits) to Specified, seconds (SECONDS). The default value for GOP mode control (GopSizeUnits) is Frames (FRAMES).
pub fn gop_size(&self) -> f64 {
self.gop_size
}
/// Specify the units for GOP size (GopSize). If you don't specify a value here, by default the encoder measures GOP size in frames.
pub fn gop_size_units(&self) -> std::option::Option<&crate::model::Mpeg2GopSizeUnits> {
self.gop_size_units.as_ref()
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn hrd_buffer_initial_fill_percentage(&self) -> i32 {
self.hrd_buffer_initial_fill_percentage
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::Mpeg2InterlaceMode> {
self.interlace_mode.as_ref()
}
/// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision for intra-block DC coefficients. If you choose the value auto, the service will automatically select the precision based on the per-frame compression ratio.
pub fn intra_dc_precision(&self) -> std::option::Option<&crate::model::Mpeg2IntraDcPrecision> {
self.intra_dc_precision.as_ref()
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn max_bitrate(&self) -> i32 {
self.max_bitrate
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn min_i_interval(&self) -> i32 {
self.min_i_interval
}
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub fn number_b_frames_between_reference_frames(&self) -> i32 {
self.number_b_frames_between_reference_frames
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(&self) -> std::option::Option<&crate::model::Mpeg2ParControl> {
self.par_control.as_ref()
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(&self) -> i32 {
self.par_denominator
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(&self) -> i32 {
self.par_numerator
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::Mpeg2QualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// Use Rate control mode (Mpeg2RateControlMode) to specify whether the bitrate is variable (vbr) or constant (cbr).
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::Mpeg2RateControlMode> {
self.rate_control_mode.as_ref()
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
&self,
) -> std::option::Option<&crate::model::Mpeg2ScanTypeConversionMode> {
self.scan_type_conversion_mode.as_ref()
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default.
pub fn scene_change_detect(
&self,
) -> std::option::Option<&crate::model::Mpeg2SceneChangeDetect> {
self.scene_change_detect.as_ref()
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::Mpeg2SlowPal> {
self.slow_pal.as_ref()
}
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, to use the AWS Elemental default matrices. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn softness(&self) -> i32 {
self.softness
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::Mpeg2SpatialAdaptiveQuantization> {
self.spatial_adaptive_quantization.as_ref()
}
/// Specify whether this output's video uses the D10 syntax. Keep the default value to not use the syntax. Related settings: When you choose D10 (D_10) for your MXF profile (profile), you must also set this value to to D10 (D_10).
pub fn syntax(&self) -> std::option::Option<&crate::model::Mpeg2Syntax> {
self.syntax.as_ref()
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(&self) -> std::option::Option<&crate::model::Mpeg2Telecine> {
self.telecine.as_ref()
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn temporal_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::Mpeg2TemporalAdaptiveQuantization> {
self.temporal_adaptive_quantization.as_ref()
}
}
impl std::fmt::Debug for Mpeg2Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Mpeg2Settings");
formatter.field("adaptive_quantization", &self.adaptive_quantization);
formatter.field("bitrate", &self.bitrate);
formatter.field("codec_level", &self.codec_level);
formatter.field("codec_profile", &self.codec_profile);
formatter.field("dynamic_sub_gop", &self.dynamic_sub_gop);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("gop_closed_cadence", &self.gop_closed_cadence);
formatter.field("gop_size", &self.gop_size);
formatter.field("gop_size_units", &self.gop_size_units);
formatter.field(
"hrd_buffer_initial_fill_percentage",
&self.hrd_buffer_initial_fill_percentage,
);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("intra_dc_precision", &self.intra_dc_precision);
formatter.field("max_bitrate", &self.max_bitrate);
formatter.field("min_i_interval", &self.min_i_interval);
formatter.field(
"number_b_frames_between_reference_frames",
&self.number_b_frames_between_reference_frames,
);
formatter.field("par_control", &self.par_control);
formatter.field("par_denominator", &self.par_denominator);
formatter.field("par_numerator", &self.par_numerator);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.field("scan_type_conversion_mode", &self.scan_type_conversion_mode);
formatter.field("scene_change_detect", &self.scene_change_detect);
formatter.field("slow_pal", &self.slow_pal);
formatter.field("softness", &self.softness);
formatter.field(
"spatial_adaptive_quantization",
&self.spatial_adaptive_quantization,
);
formatter.field("syntax", &self.syntax);
formatter.field("telecine", &self.telecine);
formatter.field(
"temporal_adaptive_quantization",
&self.temporal_adaptive_quantization,
);
formatter.finish()
}
}
/// See [`Mpeg2Settings`](crate::model::Mpeg2Settings)
pub mod mpeg2_settings {
/// A builder for [`Mpeg2Settings`](crate::model::Mpeg2Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) adaptive_quantization:
std::option::Option<crate::model::Mpeg2AdaptiveQuantization>,
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) codec_level: std::option::Option<crate::model::Mpeg2CodecLevel>,
pub(crate) codec_profile: std::option::Option<crate::model::Mpeg2CodecProfile>,
pub(crate) dynamic_sub_gop: std::option::Option<crate::model::Mpeg2DynamicSubGop>,
pub(crate) framerate_control: std::option::Option<crate::model::Mpeg2FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::Mpeg2FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) gop_closed_cadence: std::option::Option<i32>,
pub(crate) gop_size: std::option::Option<f64>,
pub(crate) gop_size_units: std::option::Option<crate::model::Mpeg2GopSizeUnits>,
pub(crate) hrd_buffer_initial_fill_percentage: std::option::Option<i32>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::Mpeg2InterlaceMode>,
pub(crate) intra_dc_precision: std::option::Option<crate::model::Mpeg2IntraDcPrecision>,
pub(crate) max_bitrate: std::option::Option<i32>,
pub(crate) min_i_interval: std::option::Option<i32>,
pub(crate) number_b_frames_between_reference_frames: std::option::Option<i32>,
pub(crate) par_control: std::option::Option<crate::model::Mpeg2ParControl>,
pub(crate) par_denominator: std::option::Option<i32>,
pub(crate) par_numerator: std::option::Option<i32>,
pub(crate) quality_tuning_level: std::option::Option<crate::model::Mpeg2QualityTuningLevel>,
pub(crate) rate_control_mode: std::option::Option<crate::model::Mpeg2RateControlMode>,
pub(crate) scan_type_conversion_mode:
std::option::Option<crate::model::Mpeg2ScanTypeConversionMode>,
pub(crate) scene_change_detect: std::option::Option<crate::model::Mpeg2SceneChangeDetect>,
pub(crate) slow_pal: std::option::Option<crate::model::Mpeg2SlowPal>,
pub(crate) softness: std::option::Option<i32>,
pub(crate) spatial_adaptive_quantization:
std::option::Option<crate::model::Mpeg2SpatialAdaptiveQuantization>,
pub(crate) syntax: std::option::Option<crate::model::Mpeg2Syntax>,
pub(crate) telecine: std::option::Option<crate::model::Mpeg2Telecine>,
pub(crate) temporal_adaptive_quantization:
std::option::Option<crate::model::Mpeg2TemporalAdaptiveQuantization>,
}
impl Builder {
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to the following settings: Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub fn adaptive_quantization(
mut self,
input: crate::model::Mpeg2AdaptiveQuantization,
) -> Self {
self.adaptive_quantization = Some(input);
self
}
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to the following settings: Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
pub fn set_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::Mpeg2AdaptiveQuantization>,
) -> Self {
self.adaptive_quantization = input;
self
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output.
pub fn codec_level(mut self, input: crate::model::Mpeg2CodecLevel) -> Self {
self.codec_level = Some(input);
self
}
/// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output.
pub fn set_codec_level(
mut self,
input: std::option::Option<crate::model::Mpeg2CodecLevel>,
) -> Self {
self.codec_level = input;
self
}
/// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output.
pub fn codec_profile(mut self, input: crate::model::Mpeg2CodecProfile) -> Self {
self.codec_profile = Some(input);
self
}
/// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output.
pub fn set_codec_profile(
mut self,
input: std::option::Option<crate::model::Mpeg2CodecProfile>,
) -> Self {
self.codec_profile = input;
self
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn dynamic_sub_gop(mut self, input: crate::model::Mpeg2DynamicSubGop) -> Self {
self.dynamic_sub_gop = Some(input);
self
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn set_dynamic_sub_gop(
mut self,
input: std::option::Option<crate::model::Mpeg2DynamicSubGop>,
) -> Self {
self.dynamic_sub_gop = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::Mpeg2FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::Mpeg2FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::Mpeg2FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::Mpeg2FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. When you create a streaming output, we recommend that you keep the default value, 1, so that players starting mid-stream receive an IDR frame as quickly as possible. Don't set this value to 0; that would break output segmenting.
pub fn gop_closed_cadence(mut self, input: i32) -> Self {
self.gop_closed_cadence = Some(input);
self
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. When you create a streaming output, we recommend that you keep the default value, 1, so that players starting mid-stream receive an IDR frame as quickly as possible. Don't set this value to 0; that would break output segmenting.
pub fn set_gop_closed_cadence(mut self, input: std::option::Option<i32>) -> Self {
self.gop_closed_cadence = input;
self
}
/// Specify the interval between keyframes, in seconds or frames, for this output. Default: 12 Related settings: When you specify the GOP size in seconds, set GOP mode control (GopSizeUnits) to Specified, seconds (SECONDS). The default value for GOP mode control (GopSizeUnits) is Frames (FRAMES).
pub fn gop_size(mut self, input: f64) -> Self {
self.gop_size = Some(input);
self
}
/// Specify the interval between keyframes, in seconds or frames, for this output. Default: 12 Related settings: When you specify the GOP size in seconds, set GOP mode control (GopSizeUnits) to Specified, seconds (SECONDS). The default value for GOP mode control (GopSizeUnits) is Frames (FRAMES).
pub fn set_gop_size(mut self, input: std::option::Option<f64>) -> Self {
self.gop_size = input;
self
}
/// Specify the units for GOP size (GopSize). If you don't specify a value here, by default the encoder measures GOP size in frames.
pub fn gop_size_units(mut self, input: crate::model::Mpeg2GopSizeUnits) -> Self {
self.gop_size_units = Some(input);
self
}
/// Specify the units for GOP size (GopSize). If you don't specify a value here, by default the encoder measures GOP size in frames.
pub fn set_gop_size_units(
mut self,
input: std::option::Option<crate::model::Mpeg2GopSizeUnits>,
) -> Self {
self.gop_size_units = input;
self
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn hrd_buffer_initial_fill_percentage(mut self, input: i32) -> Self {
self.hrd_buffer_initial_fill_percentage = Some(input);
self
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn set_hrd_buffer_initial_fill_percentage(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.hrd_buffer_initial_fill_percentage = input;
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(mut self, input: crate::model::Mpeg2InterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::Mpeg2InterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision for intra-block DC coefficients. If you choose the value auto, the service will automatically select the precision based on the per-frame compression ratio.
pub fn intra_dc_precision(mut self, input: crate::model::Mpeg2IntraDcPrecision) -> Self {
self.intra_dc_precision = Some(input);
self
}
/// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision for intra-block DC coefficients. If you choose the value auto, the service will automatically select the precision based on the per-frame compression ratio.
pub fn set_intra_dc_precision(
mut self,
input: std::option::Option<crate::model::Mpeg2IntraDcPrecision>,
) -> Self {
self.intra_dc_precision = input;
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn max_bitrate(mut self, input: i32) -> Self {
self.max_bitrate = Some(input);
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000.
pub fn set_max_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_bitrate = input;
self
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn min_i_interval(mut self, input: i32) -> Self {
self.min_i_interval = Some(input);
self
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn set_min_i_interval(mut self, input: std::option::Option<i32>) -> Self {
self.min_i_interval = input;
self
}
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub fn number_b_frames_between_reference_frames(mut self, input: i32) -> Self {
self.number_b_frames_between_reference_frames = Some(input);
self
}
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub fn set_number_b_frames_between_reference_frames(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.number_b_frames_between_reference_frames = input;
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(mut self, input: crate::model::Mpeg2ParControl) -> Self {
self.par_control = Some(input);
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn set_par_control(
mut self,
input: std::option::Option<crate::model::Mpeg2ParControl>,
) -> Self {
self.par_control = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(mut self, input: i32) -> Self {
self.par_denominator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn set_par_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.par_denominator = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(mut self, input: i32) -> Self {
self.par_numerator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn set_par_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.par_numerator = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
mut self,
input: crate::model::Mpeg2QualityTuningLevel,
) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::Mpeg2QualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// Use Rate control mode (Mpeg2RateControlMode) to specify whether the bitrate is variable (vbr) or constant (cbr).
pub fn rate_control_mode(mut self, input: crate::model::Mpeg2RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// Use Rate control mode (Mpeg2RateControlMode) to specify whether the bitrate is variable (vbr) or constant (cbr).
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::Mpeg2RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
mut self,
input: crate::model::Mpeg2ScanTypeConversionMode,
) -> Self {
self.scan_type_conversion_mode = Some(input);
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn set_scan_type_conversion_mode(
mut self,
input: std::option::Option<crate::model::Mpeg2ScanTypeConversionMode>,
) -> Self {
self.scan_type_conversion_mode = input;
self
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default.
pub fn scene_change_detect(mut self, input: crate::model::Mpeg2SceneChangeDetect) -> Self {
self.scene_change_detect = Some(input);
self
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default.
pub fn set_scene_change_detect(
mut self,
input: std::option::Option<crate::model::Mpeg2SceneChangeDetect>,
) -> Self {
self.scene_change_detect = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::Mpeg2SlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::Mpeg2SlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, to use the AWS Elemental default matrices. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn softness(mut self, input: i32) -> Self {
self.softness = Some(input);
self
}
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, to use the AWS Elemental default matrices. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn set_softness(mut self, input: std::option::Option<i32>) -> Self {
self.softness = input;
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
mut self,
input: crate::model::Mpeg2SpatialAdaptiveQuantization,
) -> Self {
self.spatial_adaptive_quantization = Some(input);
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn set_spatial_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::Mpeg2SpatialAdaptiveQuantization>,
) -> Self {
self.spatial_adaptive_quantization = input;
self
}
/// Specify whether this output's video uses the D10 syntax. Keep the default value to not use the syntax. Related settings: When you choose D10 (D_10) for your MXF profile (profile), you must also set this value to to D10 (D_10).
pub fn syntax(mut self, input: crate::model::Mpeg2Syntax) -> Self {
self.syntax = Some(input);
self
}
/// Specify whether this output's video uses the D10 syntax. Keep the default value to not use the syntax. Related settings: When you choose D10 (D_10) for your MXF profile (profile), you must also set this value to to D10 (D_10).
pub fn set_syntax(mut self, input: std::option::Option<crate::model::Mpeg2Syntax>) -> Self {
self.syntax = input;
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(mut self, input: crate::model::Mpeg2Telecine) -> Self {
self.telecine = Some(input);
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::Mpeg2Telecine>,
) -> Self {
self.telecine = input;
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn temporal_adaptive_quantization(
mut self,
input: crate::model::Mpeg2TemporalAdaptiveQuantization,
) -> Self {
self.temporal_adaptive_quantization = Some(input);
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn set_temporal_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::Mpeg2TemporalAdaptiveQuantization>,
) -> Self {
self.temporal_adaptive_quantization = input;
self
}
/// Consumes the builder and constructs a [`Mpeg2Settings`](crate::model::Mpeg2Settings)
pub fn build(self) -> crate::model::Mpeg2Settings {
crate::model::Mpeg2Settings {
adaptive_quantization: self.adaptive_quantization,
bitrate: self.bitrate.unwrap_or_default(),
codec_level: self.codec_level,
codec_profile: self.codec_profile,
dynamic_sub_gop: self.dynamic_sub_gop,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
gop_closed_cadence: self.gop_closed_cadence.unwrap_or_default(),
gop_size: self.gop_size.unwrap_or_default(),
gop_size_units: self.gop_size_units,
hrd_buffer_initial_fill_percentage: self
.hrd_buffer_initial_fill_percentage
.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
interlace_mode: self.interlace_mode,
intra_dc_precision: self.intra_dc_precision,
max_bitrate: self.max_bitrate.unwrap_or_default(),
min_i_interval: self.min_i_interval.unwrap_or_default(),
number_b_frames_between_reference_frames: self
.number_b_frames_between_reference_frames
.unwrap_or_default(),
par_control: self.par_control,
par_denominator: self.par_denominator.unwrap_or_default(),
par_numerator: self.par_numerator.unwrap_or_default(),
quality_tuning_level: self.quality_tuning_level,
rate_control_mode: self.rate_control_mode,
scan_type_conversion_mode: self.scan_type_conversion_mode,
scene_change_detect: self.scene_change_detect,
slow_pal: self.slow_pal,
softness: self.softness.unwrap_or_default(),
spatial_adaptive_quantization: self.spatial_adaptive_quantization,
syntax: self.syntax,
telecine: self.telecine,
temporal_adaptive_quantization: self.temporal_adaptive_quantization,
}
}
}
}
impl Mpeg2Settings {
/// Creates a new builder-style object to manufacture [`Mpeg2Settings`](crate::model::Mpeg2Settings)
pub fn builder() -> crate::model::mpeg2_settings::Builder {
crate::model::mpeg2_settings::Builder::default()
}
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2TemporalAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2TemporalAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Mpeg2TemporalAdaptiveQuantization::Disabled,
"ENABLED" => Mpeg2TemporalAdaptiveQuantization::Enabled,
other => Mpeg2TemporalAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2TemporalAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2TemporalAdaptiveQuantization::from(s))
}
}
impl Mpeg2TemporalAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2TemporalAdaptiveQuantization::Disabled => "DISABLED",
Mpeg2TemporalAdaptiveQuantization::Enabled => "ENABLED",
Mpeg2TemporalAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Mpeg2TemporalAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2Telecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Soft,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2Telecine {
fn from(s: &str) -> Self {
match s {
"HARD" => Mpeg2Telecine::Hard,
"NONE" => Mpeg2Telecine::None,
"SOFT" => Mpeg2Telecine::Soft,
other => Mpeg2Telecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2Telecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2Telecine::from(s))
}
}
impl Mpeg2Telecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2Telecine::Hard => "HARD",
Mpeg2Telecine::None => "NONE",
Mpeg2Telecine::Soft => "SOFT",
Mpeg2Telecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE", "SOFT"]
}
}
impl AsRef<str> for Mpeg2Telecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether this output's video uses the D10 syntax. Keep the default value to not use the syntax. Related settings: When you choose D10 (D_10) for your MXF profile (profile), you must also set this value to to D10 (D_10).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2Syntax {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
D10,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2Syntax {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => Mpeg2Syntax::Default,
"D_10" => Mpeg2Syntax::D10,
other => Mpeg2Syntax::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2Syntax {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2Syntax::from(s))
}
}
impl Mpeg2Syntax {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2Syntax::Default => "DEFAULT",
Mpeg2Syntax::D10 => "D_10",
Mpeg2Syntax::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "D_10"]
}
}
impl AsRef<str> for Mpeg2Syntax {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2SpatialAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2SpatialAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Mpeg2SpatialAdaptiveQuantization::Disabled,
"ENABLED" => Mpeg2SpatialAdaptiveQuantization::Enabled,
other => Mpeg2SpatialAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2SpatialAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2SpatialAdaptiveQuantization::from(s))
}
}
impl Mpeg2SpatialAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2SpatialAdaptiveQuantization::Disabled => "DISABLED",
Mpeg2SpatialAdaptiveQuantization::Enabled => "ENABLED",
Mpeg2SpatialAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Mpeg2SpatialAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2SlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2SlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Mpeg2SlowPal::Disabled,
"ENABLED" => Mpeg2SlowPal::Enabled,
other => Mpeg2SlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2SlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2SlowPal::from(s))
}
}
impl Mpeg2SlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2SlowPal::Disabled => "DISABLED",
Mpeg2SlowPal::Enabled => "ENABLED",
Mpeg2SlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Mpeg2SlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2SceneChangeDetect {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2SceneChangeDetect {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Mpeg2SceneChangeDetect::Disabled,
"ENABLED" => Mpeg2SceneChangeDetect::Enabled,
other => Mpeg2SceneChangeDetect::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2SceneChangeDetect {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2SceneChangeDetect::from(s))
}
}
impl Mpeg2SceneChangeDetect {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2SceneChangeDetect::Disabled => "DISABLED",
Mpeg2SceneChangeDetect::Enabled => "ENABLED",
Mpeg2SceneChangeDetect::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Mpeg2SceneChangeDetect {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2ScanTypeConversionMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
InterlacedOptimize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2ScanTypeConversionMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => Mpeg2ScanTypeConversionMode::Interlaced,
"INTERLACED_OPTIMIZE" => Mpeg2ScanTypeConversionMode::InterlacedOptimize,
other => Mpeg2ScanTypeConversionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2ScanTypeConversionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2ScanTypeConversionMode::from(s))
}
}
impl Mpeg2ScanTypeConversionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2ScanTypeConversionMode::Interlaced => "INTERLACED",
Mpeg2ScanTypeConversionMode::InterlacedOptimize => "INTERLACED_OPTIMIZE",
Mpeg2ScanTypeConversionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "INTERLACED_OPTIMIZE"]
}
}
impl AsRef<str> for Mpeg2ScanTypeConversionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Rate control mode (Mpeg2RateControlMode) to specify whether the bitrate is variable (vbr) or constant (cbr).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Cbr,
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2RateControlMode {
fn from(s: &str) -> Self {
match s {
"CBR" => Mpeg2RateControlMode::Cbr,
"VBR" => Mpeg2RateControlMode::Vbr,
other => Mpeg2RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2RateControlMode::from(s))
}
}
impl Mpeg2RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2RateControlMode::Cbr => "CBR",
Mpeg2RateControlMode::Vbr => "VBR",
Mpeg2RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBR", "VBR"]
}
}
impl AsRef<str> for Mpeg2RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2QualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPass,
#[allow(missing_docs)] // documentation missing in model
SinglePass,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2QualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS" => Mpeg2QualityTuningLevel::MultiPass,
"SINGLE_PASS" => Mpeg2QualityTuningLevel::SinglePass,
other => Mpeg2QualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2QualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2QualityTuningLevel::from(s))
}
}
impl Mpeg2QualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2QualityTuningLevel::MultiPass => "MULTI_PASS",
Mpeg2QualityTuningLevel::SinglePass => "SINGLE_PASS",
Mpeg2QualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS", "SINGLE_PASS"]
}
}
impl AsRef<str> for Mpeg2QualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2ParControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2ParControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Mpeg2ParControl::InitializeFromSource,
"SPECIFIED" => Mpeg2ParControl::Specified,
other => Mpeg2ParControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2ParControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2ParControl::from(s))
}
}
impl Mpeg2ParControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2ParControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Mpeg2ParControl::Specified => "SPECIFIED",
Mpeg2ParControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Mpeg2ParControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision for intra-block DC coefficients. If you choose the value auto, the service will automatically select the precision based on the per-frame compression ratio.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2IntraDcPrecision {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
IntraDcPrecision10,
#[allow(missing_docs)] // documentation missing in model
IntraDcPrecision11,
#[allow(missing_docs)] // documentation missing in model
IntraDcPrecision8,
#[allow(missing_docs)] // documentation missing in model
IntraDcPrecision9,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2IntraDcPrecision {
fn from(s: &str) -> Self {
match s {
"AUTO" => Mpeg2IntraDcPrecision::Auto,
"INTRA_DC_PRECISION_10" => Mpeg2IntraDcPrecision::IntraDcPrecision10,
"INTRA_DC_PRECISION_11" => Mpeg2IntraDcPrecision::IntraDcPrecision11,
"INTRA_DC_PRECISION_8" => Mpeg2IntraDcPrecision::IntraDcPrecision8,
"INTRA_DC_PRECISION_9" => Mpeg2IntraDcPrecision::IntraDcPrecision9,
other => Mpeg2IntraDcPrecision::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2IntraDcPrecision {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2IntraDcPrecision::from(s))
}
}
impl Mpeg2IntraDcPrecision {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2IntraDcPrecision::Auto => "AUTO",
Mpeg2IntraDcPrecision::IntraDcPrecision10 => "INTRA_DC_PRECISION_10",
Mpeg2IntraDcPrecision::IntraDcPrecision11 => "INTRA_DC_PRECISION_11",
Mpeg2IntraDcPrecision::IntraDcPrecision8 => "INTRA_DC_PRECISION_8",
Mpeg2IntraDcPrecision::IntraDcPrecision9 => "INTRA_DC_PRECISION_9",
Mpeg2IntraDcPrecision::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTO",
"INTRA_DC_PRECISION_10",
"INTRA_DC_PRECISION_11",
"INTRA_DC_PRECISION_8",
"INTRA_DC_PRECISION_9",
]
}
}
impl AsRef<str> for Mpeg2IntraDcPrecision {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2InterlaceMode {
#[allow(missing_docs)] // documentation missing in model
BottomField,
#[allow(missing_docs)] // documentation missing in model
FollowBottomField,
#[allow(missing_docs)] // documentation missing in model
FollowTopField,
#[allow(missing_docs)] // documentation missing in model
Progressive,
#[allow(missing_docs)] // documentation missing in model
TopField,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2InterlaceMode {
fn from(s: &str) -> Self {
match s {
"BOTTOM_FIELD" => Mpeg2InterlaceMode::BottomField,
"FOLLOW_BOTTOM_FIELD" => Mpeg2InterlaceMode::FollowBottomField,
"FOLLOW_TOP_FIELD" => Mpeg2InterlaceMode::FollowTopField,
"PROGRESSIVE" => Mpeg2InterlaceMode::Progressive,
"TOP_FIELD" => Mpeg2InterlaceMode::TopField,
other => Mpeg2InterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2InterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2InterlaceMode::from(s))
}
}
impl Mpeg2InterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2InterlaceMode::BottomField => "BOTTOM_FIELD",
Mpeg2InterlaceMode::FollowBottomField => "FOLLOW_BOTTOM_FIELD",
Mpeg2InterlaceMode::FollowTopField => "FOLLOW_TOP_FIELD",
Mpeg2InterlaceMode::Progressive => "PROGRESSIVE",
Mpeg2InterlaceMode::TopField => "TOP_FIELD",
Mpeg2InterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_FIELD",
"FOLLOW_BOTTOM_FIELD",
"FOLLOW_TOP_FIELD",
"PROGRESSIVE",
"TOP_FIELD",
]
}
}
impl AsRef<str> for Mpeg2InterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the units for GOP size (GopSize). If you don't specify a value here, by default the encoder measures GOP size in frames.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2GopSizeUnits {
#[allow(missing_docs)] // documentation missing in model
Frames,
#[allow(missing_docs)] // documentation missing in model
Seconds,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2GopSizeUnits {
fn from(s: &str) -> Self {
match s {
"FRAMES" => Mpeg2GopSizeUnits::Frames,
"SECONDS" => Mpeg2GopSizeUnits::Seconds,
other => Mpeg2GopSizeUnits::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2GopSizeUnits {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2GopSizeUnits::from(s))
}
}
impl Mpeg2GopSizeUnits {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2GopSizeUnits::Frames => "FRAMES",
Mpeg2GopSizeUnits::Seconds => "SECONDS",
Mpeg2GopSizeUnits::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FRAMES", "SECONDS"]
}
}
impl AsRef<str> for Mpeg2GopSizeUnits {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => Mpeg2FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => Mpeg2FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => Mpeg2FramerateConversionAlgorithm::Interpolate,
other => Mpeg2FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2FramerateConversionAlgorithm::from(s))
}
}
impl Mpeg2FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
Mpeg2FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
Mpeg2FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
Mpeg2FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for Mpeg2FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Mpeg2FramerateControl::InitializeFromSource,
"SPECIFIED" => Mpeg2FramerateControl::Specified,
other => Mpeg2FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2FramerateControl::from(s))
}
}
impl Mpeg2FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Mpeg2FramerateControl::Specified => "SPECIFIED",
Mpeg2FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Mpeg2FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2DynamicSubGop {
#[allow(missing_docs)] // documentation missing in model
Adaptive,
#[allow(missing_docs)] // documentation missing in model
Static,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2DynamicSubGop {
fn from(s: &str) -> Self {
match s {
"ADAPTIVE" => Mpeg2DynamicSubGop::Adaptive,
"STATIC" => Mpeg2DynamicSubGop::Static,
other => Mpeg2DynamicSubGop::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2DynamicSubGop {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2DynamicSubGop::from(s))
}
}
impl Mpeg2DynamicSubGop {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2DynamicSubGop::Adaptive => "ADAPTIVE",
Mpeg2DynamicSubGop::Static => "STATIC",
Mpeg2DynamicSubGop::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADAPTIVE", "STATIC"]
}
}
impl AsRef<str> for Mpeg2DynamicSubGop {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2CodecProfile {
#[allow(missing_docs)] // documentation missing in model
Main,
#[allow(missing_docs)] // documentation missing in model
Profile422,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2CodecProfile {
fn from(s: &str) -> Self {
match s {
"MAIN" => Mpeg2CodecProfile::Main,
"PROFILE_422" => Mpeg2CodecProfile::Profile422,
other => Mpeg2CodecProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2CodecProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2CodecProfile::from(s))
}
}
impl Mpeg2CodecProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2CodecProfile::Main => "MAIN",
Mpeg2CodecProfile::Profile422 => "PROFILE_422",
Mpeg2CodecProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MAIN", "PROFILE_422"]
}
}
impl AsRef<str> for Mpeg2CodecProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2CodecLevel {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
High1440,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Main,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2CodecLevel {
fn from(s: &str) -> Self {
match s {
"AUTO" => Mpeg2CodecLevel::Auto,
"HIGH" => Mpeg2CodecLevel::High,
"HIGH1440" => Mpeg2CodecLevel::High1440,
"LOW" => Mpeg2CodecLevel::Low,
"MAIN" => Mpeg2CodecLevel::Main,
other => Mpeg2CodecLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2CodecLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2CodecLevel::from(s))
}
}
impl Mpeg2CodecLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2CodecLevel::Auto => "AUTO",
Mpeg2CodecLevel::High => "HIGH",
Mpeg2CodecLevel::High1440 => "HIGH1440",
Mpeg2CodecLevel::Low => "LOW",
Mpeg2CodecLevel::Main => "MAIN",
Mpeg2CodecLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "HIGH", "HIGH1440", "LOW", "MAIN"]
}
}
impl AsRef<str> for Mpeg2CodecLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to the following settings: Spatial adaptive quantization (spatialAdaptiveQuantization), and Temporal adaptive quantization (temporalAdaptiveQuantization).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mpeg2AdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Medium,
#[allow(missing_docs)] // documentation missing in model
Off,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mpeg2AdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"HIGH" => Mpeg2AdaptiveQuantization::High,
"LOW" => Mpeg2AdaptiveQuantization::Low,
"MEDIUM" => Mpeg2AdaptiveQuantization::Medium,
"OFF" => Mpeg2AdaptiveQuantization::Off,
other => Mpeg2AdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mpeg2AdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mpeg2AdaptiveQuantization::from(s))
}
}
impl Mpeg2AdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mpeg2AdaptiveQuantization::High => "HIGH",
Mpeg2AdaptiveQuantization::Low => "LOW",
Mpeg2AdaptiveQuantization::Medium => "MEDIUM",
Mpeg2AdaptiveQuantization::Off => "OFF",
Mpeg2AdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HIGH", "LOW", "MEDIUM", "OFF"]
}
}
impl AsRef<str> for Mpeg2AdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for H265 codec
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct H265Settings {
/// When you set Adaptive Quantization (H265AdaptiveQuantization) to Auto (AUTO), or leave blank, MediaConvert automatically applies quantization to improve the video quality of your output. Set Adaptive Quantization to Low (LOW), Medium (MEDIUM), High (HIGH), Higher (HIGHER), or Max (MAX) to manually control the strength of the quantization filter. When you do, you can specify a value for Spatial Adaptive Quantization (H265SpatialAdaptiveQuantization), Temporal Adaptive Quantization (H265TemporalAdaptiveQuantization), and Flicker Adaptive Quantization (H265FlickerAdaptiveQuantization), to further control the quantization filter. Set Adaptive Quantization to Off (OFF) to apply no quantization to your output.
pub adaptive_quantization: std::option::Option<crate::model::H265AdaptiveQuantization>,
/// Enables Alternate Transfer Function SEI message for outputs using Hybrid Log Gamma (HLG) Electro-Optical Transfer Function (EOTF).
pub alternate_transfer_function_sei:
std::option::Option<crate::model::H265AlternateTransferFunctionSei>,
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub bitrate: i32,
/// H.265 Level.
pub codec_level: std::option::Option<crate::model::H265CodecLevel>,
/// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License.
pub codec_profile: std::option::Option<crate::model::H265CodecProfile>,
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub dynamic_sub_gop: std::option::Option<crate::model::H265DynamicSubGop>,
/// Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set adaptiveQuantization to a value other than Off (OFF).
pub flicker_adaptive_quantization:
std::option::Option<crate::model::H265FlickerAdaptiveQuantization>,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::H265FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::H265FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub gop_b_reference: std::option::Option<crate::model::H265GopBReference>,
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub gop_closed_cadence: i32,
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub gop_size: f64,
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub gop_size_units: std::option::Option<crate::model::H265GopSizeUnits>,
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub hrd_buffer_initial_fill_percentage: i32,
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub hrd_buffer_size: i32,
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub interlace_mode: std::option::Option<crate::model::H265InterlaceMode>,
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub max_bitrate: i32,
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub min_i_interval: i32,
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub number_b_frames_between_reference_frames: i32,
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub number_reference_frames: i32,
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub par_control: std::option::Option<crate::model::H265ParControl>,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub par_denominator: i32,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub par_numerator: i32,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::H265QualityTuningLevel>,
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub qvbr_settings: std::option::Option<crate::model::H265QvbrSettings>,
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub rate_control_mode: std::option::Option<crate::model::H265RateControlMode>,
/// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically selects best strength based on content
pub sample_adaptive_offset_filter_mode:
std::option::Option<crate::model::H265SampleAdaptiveOffsetFilterMode>,
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub scan_type_conversion_mode: std::option::Option<crate::model::H265ScanTypeConversionMode>,
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub scene_change_detect: std::option::Option<crate::model::H265SceneChangeDetect>,
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub slices: i32,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::H265SlowPal>,
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub spatial_adaptive_quantization:
std::option::Option<crate::model::H265SpatialAdaptiveQuantization>,
/// This field applies only if the Streams > Advanced > Framerate (framerate) field is set to 29.970. This field works with the Streams > Advanced > Preprocessors > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced Mode field (interlace_mode) to identify the scan type for the output: Progressive, Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output from 23.976 input. - Soft: produces 23.976; the player converts this output to 29.97i.
pub telecine: std::option::Option<crate::model::H265Telecine>,
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub temporal_adaptive_quantization:
std::option::Option<crate::model::H265TemporalAdaptiveQuantization>,
/// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers are supported depending on GOP structure: I- and P-frames form one layer, reference B-frames can form a second layer and non-reference b-frames can form a third layer. Decoders can optionally decode only the lower temporal layers to generate a lower frame rate output. For example, given a bitstream with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder could decode all the frames for full frame rate output or only the I and P frames (lowest temporal layer) for a half frame rate output.
pub temporal_ids: std::option::Option<crate::model::H265TemporalIds>,
/// Enable use of tiles, allowing horizontal as well as vertical subdivision of the encoded pictures.
pub tiles: std::option::Option<crate::model::H265Tiles>,
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub unregistered_sei_timecode: std::option::Option<crate::model::H265UnregisteredSeiTimecode>,
/// If the location of parameter set NAL units doesn't matter in your workflow, ignore this setting. Use this setting only with CMAF or DASH outputs, or with standalone file outputs in an MPEG-4 container (MP4 outputs). Choose HVC1 to mark your output as HVC1. This makes your output compliant with the following specification: ISO IECJTC1 SC29 N13798 Text ISO/IEC FDIS 14496-15 3rd Edition. For these outputs, the service stores parameter set NAL units in the sample headers but not in the samples directly. For MP4 outputs, when you choose HVC1, your output video might not work properly with some downstream systems and video players. The service defaults to marking your output as HEV1. For these outputs, the service writes parameter set NAL units directly into the samples.
pub write_mp4_packaging_type: std::option::Option<crate::model::H265WriteMp4PackagingType>,
}
impl H265Settings {
/// When you set Adaptive Quantization (H265AdaptiveQuantization) to Auto (AUTO), or leave blank, MediaConvert automatically applies quantization to improve the video quality of your output. Set Adaptive Quantization to Low (LOW), Medium (MEDIUM), High (HIGH), Higher (HIGHER), or Max (MAX) to manually control the strength of the quantization filter. When you do, you can specify a value for Spatial Adaptive Quantization (H265SpatialAdaptiveQuantization), Temporal Adaptive Quantization (H265TemporalAdaptiveQuantization), and Flicker Adaptive Quantization (H265FlickerAdaptiveQuantization), to further control the quantization filter. Set Adaptive Quantization to Off (OFF) to apply no quantization to your output.
pub fn adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H265AdaptiveQuantization> {
self.adaptive_quantization.as_ref()
}
/// Enables Alternate Transfer Function SEI message for outputs using Hybrid Log Gamma (HLG) Electro-Optical Transfer Function (EOTF).
pub fn alternate_transfer_function_sei(
&self,
) -> std::option::Option<&crate::model::H265AlternateTransferFunctionSei> {
self.alternate_transfer_function_sei.as_ref()
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// H.265 Level.
pub fn codec_level(&self) -> std::option::Option<&crate::model::H265CodecLevel> {
self.codec_level.as_ref()
}
/// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License.
pub fn codec_profile(&self) -> std::option::Option<&crate::model::H265CodecProfile> {
self.codec_profile.as_ref()
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn dynamic_sub_gop(&self) -> std::option::Option<&crate::model::H265DynamicSubGop> {
self.dynamic_sub_gop.as_ref()
}
/// Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set adaptiveQuantization to a value other than Off (OFF).
pub fn flicker_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H265FlickerAdaptiveQuantization> {
self.flicker_adaptive_quantization.as_ref()
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::H265FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::H265FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub fn gop_b_reference(&self) -> std::option::Option<&crate::model::H265GopBReference> {
self.gop_b_reference.as_ref()
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub fn gop_closed_cadence(&self) -> i32 {
self.gop_closed_cadence
}
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub fn gop_size(&self) -> f64 {
self.gop_size
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub fn gop_size_units(&self) -> std::option::Option<&crate::model::H265GopSizeUnits> {
self.gop_size_units.as_ref()
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn hrd_buffer_initial_fill_percentage(&self) -> i32 {
self.hrd_buffer_initial_fill_percentage
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::H265InterlaceMode> {
self.interlace_mode.as_ref()
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn max_bitrate(&self) -> i32 {
self.max_bitrate
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn min_i_interval(&self) -> i32 {
self.min_i_interval
}
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub fn number_b_frames_between_reference_frames(&self) -> i32 {
self.number_b_frames_between_reference_frames
}
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub fn number_reference_frames(&self) -> i32 {
self.number_reference_frames
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(&self) -> std::option::Option<&crate::model::H265ParControl> {
self.par_control.as_ref()
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(&self) -> i32 {
self.par_denominator
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(&self) -> i32 {
self.par_numerator
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::H265QualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn qvbr_settings(&self) -> std::option::Option<&crate::model::H265QvbrSettings> {
self.qvbr_settings.as_ref()
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::H265RateControlMode> {
self.rate_control_mode.as_ref()
}
/// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically selects best strength based on content
pub fn sample_adaptive_offset_filter_mode(
&self,
) -> std::option::Option<&crate::model::H265SampleAdaptiveOffsetFilterMode> {
self.sample_adaptive_offset_filter_mode.as_ref()
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
&self,
) -> std::option::Option<&crate::model::H265ScanTypeConversionMode> {
self.scan_type_conversion_mode.as_ref()
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub fn scene_change_detect(&self) -> std::option::Option<&crate::model::H265SceneChangeDetect> {
self.scene_change_detect.as_ref()
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(&self) -> i32 {
self.slices
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::H265SlowPal> {
self.slow_pal.as_ref()
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H265SpatialAdaptiveQuantization> {
self.spatial_adaptive_quantization.as_ref()
}
/// This field applies only if the Streams > Advanced > Framerate (framerate) field is set to 29.970. This field works with the Streams > Advanced > Preprocessors > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced Mode field (interlace_mode) to identify the scan type for the output: Progressive, Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output from 23.976 input. - Soft: produces 23.976; the player converts this output to 29.97i.
pub fn telecine(&self) -> std::option::Option<&crate::model::H265Telecine> {
self.telecine.as_ref()
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn temporal_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H265TemporalAdaptiveQuantization> {
self.temporal_adaptive_quantization.as_ref()
}
/// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers are supported depending on GOP structure: I- and P-frames form one layer, reference B-frames can form a second layer and non-reference b-frames can form a third layer. Decoders can optionally decode only the lower temporal layers to generate a lower frame rate output. For example, given a bitstream with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder could decode all the frames for full frame rate output or only the I and P frames (lowest temporal layer) for a half frame rate output.
pub fn temporal_ids(&self) -> std::option::Option<&crate::model::H265TemporalIds> {
self.temporal_ids.as_ref()
}
/// Enable use of tiles, allowing horizontal as well as vertical subdivision of the encoded pictures.
pub fn tiles(&self) -> std::option::Option<&crate::model::H265Tiles> {
self.tiles.as_ref()
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub fn unregistered_sei_timecode(
&self,
) -> std::option::Option<&crate::model::H265UnregisteredSeiTimecode> {
self.unregistered_sei_timecode.as_ref()
}
/// If the location of parameter set NAL units doesn't matter in your workflow, ignore this setting. Use this setting only with CMAF or DASH outputs, or with standalone file outputs in an MPEG-4 container (MP4 outputs). Choose HVC1 to mark your output as HVC1. This makes your output compliant with the following specification: ISO IECJTC1 SC29 N13798 Text ISO/IEC FDIS 14496-15 3rd Edition. For these outputs, the service stores parameter set NAL units in the sample headers but not in the samples directly. For MP4 outputs, when you choose HVC1, your output video might not work properly with some downstream systems and video players. The service defaults to marking your output as HEV1. For these outputs, the service writes parameter set NAL units directly into the samples.
pub fn write_mp4_packaging_type(
&self,
) -> std::option::Option<&crate::model::H265WriteMp4PackagingType> {
self.write_mp4_packaging_type.as_ref()
}
}
impl std::fmt::Debug for H265Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("H265Settings");
formatter.field("adaptive_quantization", &self.adaptive_quantization);
formatter.field(
"alternate_transfer_function_sei",
&self.alternate_transfer_function_sei,
);
formatter.field("bitrate", &self.bitrate);
formatter.field("codec_level", &self.codec_level);
formatter.field("codec_profile", &self.codec_profile);
formatter.field("dynamic_sub_gop", &self.dynamic_sub_gop);
formatter.field(
"flicker_adaptive_quantization",
&self.flicker_adaptive_quantization,
);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("gop_b_reference", &self.gop_b_reference);
formatter.field("gop_closed_cadence", &self.gop_closed_cadence);
formatter.field("gop_size", &self.gop_size);
formatter.field("gop_size_units", &self.gop_size_units);
formatter.field(
"hrd_buffer_initial_fill_percentage",
&self.hrd_buffer_initial_fill_percentage,
);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("max_bitrate", &self.max_bitrate);
formatter.field("min_i_interval", &self.min_i_interval);
formatter.field(
"number_b_frames_between_reference_frames",
&self.number_b_frames_between_reference_frames,
);
formatter.field("number_reference_frames", &self.number_reference_frames);
formatter.field("par_control", &self.par_control);
formatter.field("par_denominator", &self.par_denominator);
formatter.field("par_numerator", &self.par_numerator);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("qvbr_settings", &self.qvbr_settings);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.field(
"sample_adaptive_offset_filter_mode",
&self.sample_adaptive_offset_filter_mode,
);
formatter.field("scan_type_conversion_mode", &self.scan_type_conversion_mode);
formatter.field("scene_change_detect", &self.scene_change_detect);
formatter.field("slices", &self.slices);
formatter.field("slow_pal", &self.slow_pal);
formatter.field(
"spatial_adaptive_quantization",
&self.spatial_adaptive_quantization,
);
formatter.field("telecine", &self.telecine);
formatter.field(
"temporal_adaptive_quantization",
&self.temporal_adaptive_quantization,
);
formatter.field("temporal_ids", &self.temporal_ids);
formatter.field("tiles", &self.tiles);
formatter.field("unregistered_sei_timecode", &self.unregistered_sei_timecode);
formatter.field("write_mp4_packaging_type", &self.write_mp4_packaging_type);
formatter.finish()
}
}
/// See [`H265Settings`](crate::model::H265Settings)
pub mod h265_settings {
/// A builder for [`H265Settings`](crate::model::H265Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) adaptive_quantization:
std::option::Option<crate::model::H265AdaptiveQuantization>,
pub(crate) alternate_transfer_function_sei:
std::option::Option<crate::model::H265AlternateTransferFunctionSei>,
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) codec_level: std::option::Option<crate::model::H265CodecLevel>,
pub(crate) codec_profile: std::option::Option<crate::model::H265CodecProfile>,
pub(crate) dynamic_sub_gop: std::option::Option<crate::model::H265DynamicSubGop>,
pub(crate) flicker_adaptive_quantization:
std::option::Option<crate::model::H265FlickerAdaptiveQuantization>,
pub(crate) framerate_control: std::option::Option<crate::model::H265FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::H265FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) gop_b_reference: std::option::Option<crate::model::H265GopBReference>,
pub(crate) gop_closed_cadence: std::option::Option<i32>,
pub(crate) gop_size: std::option::Option<f64>,
pub(crate) gop_size_units: std::option::Option<crate::model::H265GopSizeUnits>,
pub(crate) hrd_buffer_initial_fill_percentage: std::option::Option<i32>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::H265InterlaceMode>,
pub(crate) max_bitrate: std::option::Option<i32>,
pub(crate) min_i_interval: std::option::Option<i32>,
pub(crate) number_b_frames_between_reference_frames: std::option::Option<i32>,
pub(crate) number_reference_frames: std::option::Option<i32>,
pub(crate) par_control: std::option::Option<crate::model::H265ParControl>,
pub(crate) par_denominator: std::option::Option<i32>,
pub(crate) par_numerator: std::option::Option<i32>,
pub(crate) quality_tuning_level: std::option::Option<crate::model::H265QualityTuningLevel>,
pub(crate) qvbr_settings: std::option::Option<crate::model::H265QvbrSettings>,
pub(crate) rate_control_mode: std::option::Option<crate::model::H265RateControlMode>,
pub(crate) sample_adaptive_offset_filter_mode:
std::option::Option<crate::model::H265SampleAdaptiveOffsetFilterMode>,
pub(crate) scan_type_conversion_mode:
std::option::Option<crate::model::H265ScanTypeConversionMode>,
pub(crate) scene_change_detect: std::option::Option<crate::model::H265SceneChangeDetect>,
pub(crate) slices: std::option::Option<i32>,
pub(crate) slow_pal: std::option::Option<crate::model::H265SlowPal>,
pub(crate) spatial_adaptive_quantization:
std::option::Option<crate::model::H265SpatialAdaptiveQuantization>,
pub(crate) telecine: std::option::Option<crate::model::H265Telecine>,
pub(crate) temporal_adaptive_quantization:
std::option::Option<crate::model::H265TemporalAdaptiveQuantization>,
pub(crate) temporal_ids: std::option::Option<crate::model::H265TemporalIds>,
pub(crate) tiles: std::option::Option<crate::model::H265Tiles>,
pub(crate) unregistered_sei_timecode:
std::option::Option<crate::model::H265UnregisteredSeiTimecode>,
pub(crate) write_mp4_packaging_type:
std::option::Option<crate::model::H265WriteMp4PackagingType>,
}
impl Builder {
/// When you set Adaptive Quantization (H265AdaptiveQuantization) to Auto (AUTO), or leave blank, MediaConvert automatically applies quantization to improve the video quality of your output. Set Adaptive Quantization to Low (LOW), Medium (MEDIUM), High (HIGH), Higher (HIGHER), or Max (MAX) to manually control the strength of the quantization filter. When you do, you can specify a value for Spatial Adaptive Quantization (H265SpatialAdaptiveQuantization), Temporal Adaptive Quantization (H265TemporalAdaptiveQuantization), and Flicker Adaptive Quantization (H265FlickerAdaptiveQuantization), to further control the quantization filter. Set Adaptive Quantization to Off (OFF) to apply no quantization to your output.
pub fn adaptive_quantization(
mut self,
input: crate::model::H265AdaptiveQuantization,
) -> Self {
self.adaptive_quantization = Some(input);
self
}
/// When you set Adaptive Quantization (H265AdaptiveQuantization) to Auto (AUTO), or leave blank, MediaConvert automatically applies quantization to improve the video quality of your output. Set Adaptive Quantization to Low (LOW), Medium (MEDIUM), High (HIGH), Higher (HIGHER), or Max (MAX) to manually control the strength of the quantization filter. When you do, you can specify a value for Spatial Adaptive Quantization (H265SpatialAdaptiveQuantization), Temporal Adaptive Quantization (H265TemporalAdaptiveQuantization), and Flicker Adaptive Quantization (H265FlickerAdaptiveQuantization), to further control the quantization filter. Set Adaptive Quantization to Off (OFF) to apply no quantization to your output.
pub fn set_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H265AdaptiveQuantization>,
) -> Self {
self.adaptive_quantization = input;
self
}
/// Enables Alternate Transfer Function SEI message for outputs using Hybrid Log Gamma (HLG) Electro-Optical Transfer Function (EOTF).
pub fn alternate_transfer_function_sei(
mut self,
input: crate::model::H265AlternateTransferFunctionSei,
) -> Self {
self.alternate_transfer_function_sei = Some(input);
self
}
/// Enables Alternate Transfer Function SEI message for outputs using Hybrid Log Gamma (HLG) Electro-Optical Transfer Function (EOTF).
pub fn set_alternate_transfer_function_sei(
mut self,
input: std::option::Option<crate::model::H265AlternateTransferFunctionSei>,
) -> Self {
self.alternate_transfer_function_sei = input;
self
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// H.265 Level.
pub fn codec_level(mut self, input: crate::model::H265CodecLevel) -> Self {
self.codec_level = Some(input);
self
}
/// H.265 Level.
pub fn set_codec_level(
mut self,
input: std::option::Option<crate::model::H265CodecLevel>,
) -> Self {
self.codec_level = input;
self
}
/// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License.
pub fn codec_profile(mut self, input: crate::model::H265CodecProfile) -> Self {
self.codec_profile = Some(input);
self
}
/// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License.
pub fn set_codec_profile(
mut self,
input: std::option::Option<crate::model::H265CodecProfile>,
) -> Self {
self.codec_profile = input;
self
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn dynamic_sub_gop(mut self, input: crate::model::H265DynamicSubGop) -> Self {
self.dynamic_sub_gop = Some(input);
self
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn set_dynamic_sub_gop(
mut self,
input: std::option::Option<crate::model::H265DynamicSubGop>,
) -> Self {
self.dynamic_sub_gop = input;
self
}
/// Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set adaptiveQuantization to a value other than Off (OFF).
pub fn flicker_adaptive_quantization(
mut self,
input: crate::model::H265FlickerAdaptiveQuantization,
) -> Self {
self.flicker_adaptive_quantization = Some(input);
self
}
/// Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set adaptiveQuantization to a value other than Off (OFF).
pub fn set_flicker_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H265FlickerAdaptiveQuantization>,
) -> Self {
self.flicker_adaptive_quantization = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::H265FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::H265FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::H265FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::H265FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub fn gop_b_reference(mut self, input: crate::model::H265GopBReference) -> Self {
self.gop_b_reference = Some(input);
self
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub fn set_gop_b_reference(
mut self,
input: std::option::Option<crate::model::H265GopBReference>,
) -> Self {
self.gop_b_reference = input;
self
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub fn gop_closed_cadence(mut self, input: i32) -> Self {
self.gop_closed_cadence = Some(input);
self
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub fn set_gop_closed_cadence(mut self, input: std::option::Option<i32>) -> Self {
self.gop_closed_cadence = input;
self
}
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub fn gop_size(mut self, input: f64) -> Self {
self.gop_size = Some(input);
self
}
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub fn set_gop_size(mut self, input: std::option::Option<f64>) -> Self {
self.gop_size = input;
self
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub fn gop_size_units(mut self, input: crate::model::H265GopSizeUnits) -> Self {
self.gop_size_units = Some(input);
self
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub fn set_gop_size_units(
mut self,
input: std::option::Option<crate::model::H265GopSizeUnits>,
) -> Self {
self.gop_size_units = input;
self
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn hrd_buffer_initial_fill_percentage(mut self, input: i32) -> Self {
self.hrd_buffer_initial_fill_percentage = Some(input);
self
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn set_hrd_buffer_initial_fill_percentage(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.hrd_buffer_initial_fill_percentage = input;
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(mut self, input: crate::model::H265InterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::H265InterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn max_bitrate(mut self, input: i32) -> Self {
self.max_bitrate = Some(input);
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn set_max_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_bitrate = input;
self
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn min_i_interval(mut self, input: i32) -> Self {
self.min_i_interval = Some(input);
self
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn set_min_i_interval(mut self, input: std::option::Option<i32>) -> Self {
self.min_i_interval = input;
self
}
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub fn number_b_frames_between_reference_frames(mut self, input: i32) -> Self {
self.number_b_frames_between_reference_frames = Some(input);
self
}
/// Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.
pub fn set_number_b_frames_between_reference_frames(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.number_b_frames_between_reference_frames = input;
self
}
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub fn number_reference_frames(mut self, input: i32) -> Self {
self.number_reference_frames = Some(input);
self
}
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub fn set_number_reference_frames(mut self, input: std::option::Option<i32>) -> Self {
self.number_reference_frames = input;
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(mut self, input: crate::model::H265ParControl) -> Self {
self.par_control = Some(input);
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn set_par_control(
mut self,
input: std::option::Option<crate::model::H265ParControl>,
) -> Self {
self.par_control = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(mut self, input: i32) -> Self {
self.par_denominator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn set_par_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.par_denominator = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(mut self, input: i32) -> Self {
self.par_numerator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn set_par_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.par_numerator = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(mut self, input: crate::model::H265QualityTuningLevel) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::H265QualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn qvbr_settings(mut self, input: crate::model::H265QvbrSettings) -> Self {
self.qvbr_settings = Some(input);
self
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn set_qvbr_settings(
mut self,
input: std::option::Option<crate::model::H265QvbrSettings>,
) -> Self {
self.qvbr_settings = input;
self
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub fn rate_control_mode(mut self, input: crate::model::H265RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::H265RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically selects best strength based on content
pub fn sample_adaptive_offset_filter_mode(
mut self,
input: crate::model::H265SampleAdaptiveOffsetFilterMode,
) -> Self {
self.sample_adaptive_offset_filter_mode = Some(input);
self
}
/// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically selects best strength based on content
pub fn set_sample_adaptive_offset_filter_mode(
mut self,
input: std::option::Option<crate::model::H265SampleAdaptiveOffsetFilterMode>,
) -> Self {
self.sample_adaptive_offset_filter_mode = input;
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
mut self,
input: crate::model::H265ScanTypeConversionMode,
) -> Self {
self.scan_type_conversion_mode = Some(input);
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn set_scan_type_conversion_mode(
mut self,
input: std::option::Option<crate::model::H265ScanTypeConversionMode>,
) -> Self {
self.scan_type_conversion_mode = input;
self
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub fn scene_change_detect(mut self, input: crate::model::H265SceneChangeDetect) -> Self {
self.scene_change_detect = Some(input);
self
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub fn set_scene_change_detect(
mut self,
input: std::option::Option<crate::model::H265SceneChangeDetect>,
) -> Self {
self.scene_change_detect = input;
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(mut self, input: i32) -> Self {
self.slices = Some(input);
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn set_slices(mut self, input: std::option::Option<i32>) -> Self {
self.slices = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::H265SlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::H265SlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
mut self,
input: crate::model::H265SpatialAdaptiveQuantization,
) -> Self {
self.spatial_adaptive_quantization = Some(input);
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn set_spatial_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H265SpatialAdaptiveQuantization>,
) -> Self {
self.spatial_adaptive_quantization = input;
self
}
/// This field applies only if the Streams > Advanced > Framerate (framerate) field is set to 29.970. This field works with the Streams > Advanced > Preprocessors > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced Mode field (interlace_mode) to identify the scan type for the output: Progressive, Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output from 23.976 input. - Soft: produces 23.976; the player converts this output to 29.97i.
pub fn telecine(mut self, input: crate::model::H265Telecine) -> Self {
self.telecine = Some(input);
self
}
/// This field applies only if the Streams > Advanced > Framerate (framerate) field is set to 29.970. This field works with the Streams > Advanced > Preprocessors > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced Mode field (interlace_mode) to identify the scan type for the output: Progressive, Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output from 23.976 input. - Soft: produces 23.976; the player converts this output to 29.97i.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::H265Telecine>,
) -> Self {
self.telecine = input;
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn temporal_adaptive_quantization(
mut self,
input: crate::model::H265TemporalAdaptiveQuantization,
) -> Self {
self.temporal_adaptive_quantization = Some(input);
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
pub fn set_temporal_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H265TemporalAdaptiveQuantization>,
) -> Self {
self.temporal_adaptive_quantization = input;
self
}
/// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers are supported depending on GOP structure: I- and P-frames form one layer, reference B-frames can form a second layer and non-reference b-frames can form a third layer. Decoders can optionally decode only the lower temporal layers to generate a lower frame rate output. For example, given a bitstream with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder could decode all the frames for full frame rate output or only the I and P frames (lowest temporal layer) for a half frame rate output.
pub fn temporal_ids(mut self, input: crate::model::H265TemporalIds) -> Self {
self.temporal_ids = Some(input);
self
}
/// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers are supported depending on GOP structure: I- and P-frames form one layer, reference B-frames can form a second layer and non-reference b-frames can form a third layer. Decoders can optionally decode only the lower temporal layers to generate a lower frame rate output. For example, given a bitstream with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder could decode all the frames for full frame rate output or only the I and P frames (lowest temporal layer) for a half frame rate output.
pub fn set_temporal_ids(
mut self,
input: std::option::Option<crate::model::H265TemporalIds>,
) -> Self {
self.temporal_ids = input;
self
}
/// Enable use of tiles, allowing horizontal as well as vertical subdivision of the encoded pictures.
pub fn tiles(mut self, input: crate::model::H265Tiles) -> Self {
self.tiles = Some(input);
self
}
/// Enable use of tiles, allowing horizontal as well as vertical subdivision of the encoded pictures.
pub fn set_tiles(mut self, input: std::option::Option<crate::model::H265Tiles>) -> Self {
self.tiles = input;
self
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub fn unregistered_sei_timecode(
mut self,
input: crate::model::H265UnregisteredSeiTimecode,
) -> Self {
self.unregistered_sei_timecode = Some(input);
self
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub fn set_unregistered_sei_timecode(
mut self,
input: std::option::Option<crate::model::H265UnregisteredSeiTimecode>,
) -> Self {
self.unregistered_sei_timecode = input;
self
}
/// If the location of parameter set NAL units doesn't matter in your workflow, ignore this setting. Use this setting only with CMAF or DASH outputs, or with standalone file outputs in an MPEG-4 container (MP4 outputs). Choose HVC1 to mark your output as HVC1. This makes your output compliant with the following specification: ISO IECJTC1 SC29 N13798 Text ISO/IEC FDIS 14496-15 3rd Edition. For these outputs, the service stores parameter set NAL units in the sample headers but not in the samples directly. For MP4 outputs, when you choose HVC1, your output video might not work properly with some downstream systems and video players. The service defaults to marking your output as HEV1. For these outputs, the service writes parameter set NAL units directly into the samples.
pub fn write_mp4_packaging_type(
mut self,
input: crate::model::H265WriteMp4PackagingType,
) -> Self {
self.write_mp4_packaging_type = Some(input);
self
}
/// If the location of parameter set NAL units doesn't matter in your workflow, ignore this setting. Use this setting only with CMAF or DASH outputs, or with standalone file outputs in an MPEG-4 container (MP4 outputs). Choose HVC1 to mark your output as HVC1. This makes your output compliant with the following specification: ISO IECJTC1 SC29 N13798 Text ISO/IEC FDIS 14496-15 3rd Edition. For these outputs, the service stores parameter set NAL units in the sample headers but not in the samples directly. For MP4 outputs, when you choose HVC1, your output video might not work properly with some downstream systems and video players. The service defaults to marking your output as HEV1. For these outputs, the service writes parameter set NAL units directly into the samples.
pub fn set_write_mp4_packaging_type(
mut self,
input: std::option::Option<crate::model::H265WriteMp4PackagingType>,
) -> Self {
self.write_mp4_packaging_type = input;
self
}
/// Consumes the builder and constructs a [`H265Settings`](crate::model::H265Settings)
pub fn build(self) -> crate::model::H265Settings {
crate::model::H265Settings {
adaptive_quantization: self.adaptive_quantization,
alternate_transfer_function_sei: self.alternate_transfer_function_sei,
bitrate: self.bitrate.unwrap_or_default(),
codec_level: self.codec_level,
codec_profile: self.codec_profile,
dynamic_sub_gop: self.dynamic_sub_gop,
flicker_adaptive_quantization: self.flicker_adaptive_quantization,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
gop_b_reference: self.gop_b_reference,
gop_closed_cadence: self.gop_closed_cadence.unwrap_or_default(),
gop_size: self.gop_size.unwrap_or_default(),
gop_size_units: self.gop_size_units,
hrd_buffer_initial_fill_percentage: self
.hrd_buffer_initial_fill_percentage
.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
interlace_mode: self.interlace_mode,
max_bitrate: self.max_bitrate.unwrap_or_default(),
min_i_interval: self.min_i_interval.unwrap_or_default(),
number_b_frames_between_reference_frames: self
.number_b_frames_between_reference_frames
.unwrap_or_default(),
number_reference_frames: self.number_reference_frames.unwrap_or_default(),
par_control: self.par_control,
par_denominator: self.par_denominator.unwrap_or_default(),
par_numerator: self.par_numerator.unwrap_or_default(),
quality_tuning_level: self.quality_tuning_level,
qvbr_settings: self.qvbr_settings,
rate_control_mode: self.rate_control_mode,
sample_adaptive_offset_filter_mode: self.sample_adaptive_offset_filter_mode,
scan_type_conversion_mode: self.scan_type_conversion_mode,
scene_change_detect: self.scene_change_detect,
slices: self.slices.unwrap_or_default(),
slow_pal: self.slow_pal,
spatial_adaptive_quantization: self.spatial_adaptive_quantization,
telecine: self.telecine,
temporal_adaptive_quantization: self.temporal_adaptive_quantization,
temporal_ids: self.temporal_ids,
tiles: self.tiles,
unregistered_sei_timecode: self.unregistered_sei_timecode,
write_mp4_packaging_type: self.write_mp4_packaging_type,
}
}
}
}
impl H265Settings {
/// Creates a new builder-style object to manufacture [`H265Settings`](crate::model::H265Settings)
pub fn builder() -> crate::model::h265_settings::Builder {
crate::model::h265_settings::Builder::default()
}
}
/// If the location of parameter set NAL units doesn't matter in your workflow, ignore this setting. Use this setting only with CMAF or DASH outputs, or with standalone file outputs in an MPEG-4 container (MP4 outputs). Choose HVC1 to mark your output as HVC1. This makes your output compliant with the following specification: ISO IECJTC1 SC29 N13798 Text ISO/IEC FDIS 14496-15 3rd Edition. For these outputs, the service stores parameter set NAL units in the sample headers but not in the samples directly. For MP4 outputs, when you choose HVC1, your output video might not work properly with some downstream systems and video players. The service defaults to marking your output as HEV1. For these outputs, the service writes parameter set NAL units directly into the samples.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265WriteMp4PackagingType {
#[allow(missing_docs)] // documentation missing in model
Hev1,
#[allow(missing_docs)] // documentation missing in model
Hvc1,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265WriteMp4PackagingType {
fn from(s: &str) -> Self {
match s {
"HEV1" => H265WriteMp4PackagingType::Hev1,
"HVC1" => H265WriteMp4PackagingType::Hvc1,
other => H265WriteMp4PackagingType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265WriteMp4PackagingType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265WriteMp4PackagingType::from(s))
}
}
impl H265WriteMp4PackagingType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265WriteMp4PackagingType::Hev1 => "HEV1",
H265WriteMp4PackagingType::Hvc1 => "HVC1",
H265WriteMp4PackagingType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HEV1", "HVC1"]
}
}
impl AsRef<str> for H265WriteMp4PackagingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265UnregisteredSeiTimecode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265UnregisteredSeiTimecode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265UnregisteredSeiTimecode::Disabled,
"ENABLED" => H265UnregisteredSeiTimecode::Enabled,
other => H265UnregisteredSeiTimecode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265UnregisteredSeiTimecode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265UnregisteredSeiTimecode::from(s))
}
}
impl H265UnregisteredSeiTimecode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265UnregisteredSeiTimecode::Disabled => "DISABLED",
H265UnregisteredSeiTimecode::Enabled => "ENABLED",
H265UnregisteredSeiTimecode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265UnregisteredSeiTimecode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable use of tiles, allowing horizontal as well as vertical subdivision of the encoded pictures.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265Tiles {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265Tiles {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265Tiles::Disabled,
"ENABLED" => H265Tiles::Enabled,
other => H265Tiles::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265Tiles {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265Tiles::from(s))
}
}
impl H265Tiles {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265Tiles::Disabled => "DISABLED",
H265Tiles::Enabled => "ENABLED",
H265Tiles::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265Tiles {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers are supported depending on GOP structure: I- and P-frames form one layer, reference B-frames can form a second layer and non-reference b-frames can form a third layer. Decoders can optionally decode only the lower temporal layers to generate a lower frame rate output. For example, given a bitstream with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder could decode all the frames for full frame rate output or only the I and P frames (lowest temporal layer) for a half frame rate output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265TemporalIds {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265TemporalIds {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265TemporalIds::Disabled,
"ENABLED" => H265TemporalIds::Enabled,
other => H265TemporalIds::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265TemporalIds {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265TemporalIds::from(s))
}
}
impl H265TemporalIds {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265TemporalIds::Disabled => "DISABLED",
H265TemporalIds::Enabled => "ENABLED",
H265TemporalIds::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265TemporalIds {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to disable this feature. Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265TemporalAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265TemporalAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265TemporalAdaptiveQuantization::Disabled,
"ENABLED" => H265TemporalAdaptiveQuantization::Enabled,
other => H265TemporalAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265TemporalAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265TemporalAdaptiveQuantization::from(s))
}
}
impl H265TemporalAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265TemporalAdaptiveQuantization::Disabled => "DISABLED",
H265TemporalAdaptiveQuantization::Enabled => "ENABLED",
H265TemporalAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265TemporalAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// This field applies only if the Streams > Advanced > Framerate (framerate) field is set to 29.970. This field works with the Streams > Advanced > Preprocessors > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced Mode field (interlace_mode) to identify the scan type for the output: Progressive, Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output from 23.976 input. - Soft: produces 23.976; the player converts this output to 29.97i.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265Telecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Soft,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265Telecine {
fn from(s: &str) -> Self {
match s {
"HARD" => H265Telecine::Hard,
"NONE" => H265Telecine::None,
"SOFT" => H265Telecine::Soft,
other => H265Telecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265Telecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265Telecine::from(s))
}
}
impl H265Telecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265Telecine::Hard => "HARD",
H265Telecine::None => "NONE",
H265Telecine::Soft => "SOFT",
H265Telecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE", "SOFT"]
}
}
impl AsRef<str> for H265Telecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265SpatialAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265SpatialAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265SpatialAdaptiveQuantization::Disabled,
"ENABLED" => H265SpatialAdaptiveQuantization::Enabled,
other => H265SpatialAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265SpatialAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265SpatialAdaptiveQuantization::from(s))
}
}
impl H265SpatialAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265SpatialAdaptiveQuantization::Disabled => "DISABLED",
H265SpatialAdaptiveQuantization::Enabled => "ENABLED",
H265SpatialAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265SpatialAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265SlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265SlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265SlowPal::Disabled,
"ENABLED" => H265SlowPal::Enabled,
other => H265SlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265SlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265SlowPal::from(s))
}
}
impl H265SlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265SlowPal::Disabled => "DISABLED",
H265SlowPal::Enabled => "ENABLED",
H265SlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265SlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265SceneChangeDetect {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
TransitionDetection,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265SceneChangeDetect {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265SceneChangeDetect::Disabled,
"ENABLED" => H265SceneChangeDetect::Enabled,
"TRANSITION_DETECTION" => H265SceneChangeDetect::TransitionDetection,
other => H265SceneChangeDetect::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265SceneChangeDetect {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265SceneChangeDetect::from(s))
}
}
impl H265SceneChangeDetect {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265SceneChangeDetect::Disabled => "DISABLED",
H265SceneChangeDetect::Enabled => "ENABLED",
H265SceneChangeDetect::TransitionDetection => "TRANSITION_DETECTION",
H265SceneChangeDetect::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "TRANSITION_DETECTION"]
}
}
impl AsRef<str> for H265SceneChangeDetect {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265ScanTypeConversionMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
InterlacedOptimize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265ScanTypeConversionMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => H265ScanTypeConversionMode::Interlaced,
"INTERLACED_OPTIMIZE" => H265ScanTypeConversionMode::InterlacedOptimize,
other => H265ScanTypeConversionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265ScanTypeConversionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265ScanTypeConversionMode::from(s))
}
}
impl H265ScanTypeConversionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265ScanTypeConversionMode::Interlaced => "INTERLACED",
H265ScanTypeConversionMode::InterlacedOptimize => "INTERLACED_OPTIMIZE",
H265ScanTypeConversionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "INTERLACED_OPTIMIZE"]
}
}
impl AsRef<str> for H265ScanTypeConversionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically selects best strength based on content
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265SampleAdaptiveOffsetFilterMode {
#[allow(missing_docs)] // documentation missing in model
Adaptive,
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
Off,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265SampleAdaptiveOffsetFilterMode {
fn from(s: &str) -> Self {
match s {
"ADAPTIVE" => H265SampleAdaptiveOffsetFilterMode::Adaptive,
"DEFAULT" => H265SampleAdaptiveOffsetFilterMode::Default,
"OFF" => H265SampleAdaptiveOffsetFilterMode::Off,
other => H265SampleAdaptiveOffsetFilterMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265SampleAdaptiveOffsetFilterMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265SampleAdaptiveOffsetFilterMode::from(s))
}
}
impl H265SampleAdaptiveOffsetFilterMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265SampleAdaptiveOffsetFilterMode::Adaptive => "ADAPTIVE",
H265SampleAdaptiveOffsetFilterMode::Default => "DEFAULT",
H265SampleAdaptiveOffsetFilterMode::Off => "OFF",
H265SampleAdaptiveOffsetFilterMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADAPTIVE", "DEFAULT", "OFF"]
}
}
impl AsRef<str> for H265SampleAdaptiveOffsetFilterMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Cbr,
#[allow(missing_docs)] // documentation missing in model
Qvbr,
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265RateControlMode {
fn from(s: &str) -> Self {
match s {
"CBR" => H265RateControlMode::Cbr,
"QVBR" => H265RateControlMode::Qvbr,
"VBR" => H265RateControlMode::Vbr,
other => H265RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265RateControlMode::from(s))
}
}
impl H265RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265RateControlMode::Cbr => "CBR",
H265RateControlMode::Qvbr => "QVBR",
H265RateControlMode::Vbr => "VBR",
H265RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBR", "QVBR", "VBR"]
}
}
impl AsRef<str> for H265RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct H265QvbrSettings {
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub max_average_bitrate: i32,
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub qvbr_quality_level: i32,
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub qvbr_quality_level_fine_tune: f64,
}
impl H265QvbrSettings {
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub fn max_average_bitrate(&self) -> i32 {
self.max_average_bitrate
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn qvbr_quality_level(&self) -> i32 {
self.qvbr_quality_level
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn qvbr_quality_level_fine_tune(&self) -> f64 {
self.qvbr_quality_level_fine_tune
}
}
impl std::fmt::Debug for H265QvbrSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("H265QvbrSettings");
formatter.field("max_average_bitrate", &self.max_average_bitrate);
formatter.field("qvbr_quality_level", &self.qvbr_quality_level);
formatter.field(
"qvbr_quality_level_fine_tune",
&self.qvbr_quality_level_fine_tune,
);
formatter.finish()
}
}
/// See [`H265QvbrSettings`](crate::model::H265QvbrSettings)
pub mod h265_qvbr_settings {
/// A builder for [`H265QvbrSettings`](crate::model::H265QvbrSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_average_bitrate: std::option::Option<i32>,
pub(crate) qvbr_quality_level: std::option::Option<i32>,
pub(crate) qvbr_quality_level_fine_tune: std::option::Option<f64>,
}
impl Builder {
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub fn max_average_bitrate(mut self, input: i32) -> Self {
self.max_average_bitrate = Some(input);
self
}
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub fn set_max_average_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_average_bitrate = input;
self
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn qvbr_quality_level(mut self, input: i32) -> Self {
self.qvbr_quality_level = Some(input);
self
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn set_qvbr_quality_level(mut self, input: std::option::Option<i32>) -> Self {
self.qvbr_quality_level = input;
self
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn qvbr_quality_level_fine_tune(mut self, input: f64) -> Self {
self.qvbr_quality_level_fine_tune = Some(input);
self
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn set_qvbr_quality_level_fine_tune(mut self, input: std::option::Option<f64>) -> Self {
self.qvbr_quality_level_fine_tune = input;
self
}
/// Consumes the builder and constructs a [`H265QvbrSettings`](crate::model::H265QvbrSettings)
pub fn build(self) -> crate::model::H265QvbrSettings {
crate::model::H265QvbrSettings {
max_average_bitrate: self.max_average_bitrate.unwrap_or_default(),
qvbr_quality_level: self.qvbr_quality_level.unwrap_or_default(),
qvbr_quality_level_fine_tune: self.qvbr_quality_level_fine_tune.unwrap_or_default(),
}
}
}
}
impl H265QvbrSettings {
/// Creates a new builder-style object to manufacture [`H265QvbrSettings`](crate::model::H265QvbrSettings)
pub fn builder() -> crate::model::h265_qvbr_settings::Builder {
crate::model::h265_qvbr_settings::Builder::default()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265QualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPassHq,
#[allow(missing_docs)] // documentation missing in model
SinglePass,
#[allow(missing_docs)] // documentation missing in model
SinglePassHq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265QualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS_HQ" => H265QualityTuningLevel::MultiPassHq,
"SINGLE_PASS" => H265QualityTuningLevel::SinglePass,
"SINGLE_PASS_HQ" => H265QualityTuningLevel::SinglePassHq,
other => H265QualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265QualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265QualityTuningLevel::from(s))
}
}
impl H265QualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265QualityTuningLevel::MultiPassHq => "MULTI_PASS_HQ",
H265QualityTuningLevel::SinglePass => "SINGLE_PASS",
H265QualityTuningLevel::SinglePassHq => "SINGLE_PASS_HQ",
H265QualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS_HQ", "SINGLE_PASS", "SINGLE_PASS_HQ"]
}
}
impl AsRef<str> for H265QualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265ParControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265ParControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => H265ParControl::InitializeFromSource,
"SPECIFIED" => H265ParControl::Specified,
other => H265ParControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265ParControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265ParControl::from(s))
}
}
impl H265ParControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265ParControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
H265ParControl::Specified => "SPECIFIED",
H265ParControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for H265ParControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265InterlaceMode {
#[allow(missing_docs)] // documentation missing in model
BottomField,
#[allow(missing_docs)] // documentation missing in model
FollowBottomField,
#[allow(missing_docs)] // documentation missing in model
FollowTopField,
#[allow(missing_docs)] // documentation missing in model
Progressive,
#[allow(missing_docs)] // documentation missing in model
TopField,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265InterlaceMode {
fn from(s: &str) -> Self {
match s {
"BOTTOM_FIELD" => H265InterlaceMode::BottomField,
"FOLLOW_BOTTOM_FIELD" => H265InterlaceMode::FollowBottomField,
"FOLLOW_TOP_FIELD" => H265InterlaceMode::FollowTopField,
"PROGRESSIVE" => H265InterlaceMode::Progressive,
"TOP_FIELD" => H265InterlaceMode::TopField,
other => H265InterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265InterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265InterlaceMode::from(s))
}
}
impl H265InterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265InterlaceMode::BottomField => "BOTTOM_FIELD",
H265InterlaceMode::FollowBottomField => "FOLLOW_BOTTOM_FIELD",
H265InterlaceMode::FollowTopField => "FOLLOW_TOP_FIELD",
H265InterlaceMode::Progressive => "PROGRESSIVE",
H265InterlaceMode::TopField => "TOP_FIELD",
H265InterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_FIELD",
"FOLLOW_BOTTOM_FIELD",
"FOLLOW_TOP_FIELD",
"PROGRESSIVE",
"TOP_FIELD",
]
}
}
impl AsRef<str> for H265InterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265GopSizeUnits {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Frames,
#[allow(missing_docs)] // documentation missing in model
Seconds,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265GopSizeUnits {
fn from(s: &str) -> Self {
match s {
"AUTO" => H265GopSizeUnits::Auto,
"FRAMES" => H265GopSizeUnits::Frames,
"SECONDS" => H265GopSizeUnits::Seconds,
other => H265GopSizeUnits::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265GopSizeUnits {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265GopSizeUnits::from(s))
}
}
impl H265GopSizeUnits {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265GopSizeUnits::Auto => "AUTO",
H265GopSizeUnits::Frames => "FRAMES",
H265GopSizeUnits::Seconds => "SECONDS",
H265GopSizeUnits::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "FRAMES", "SECONDS"]
}
}
impl AsRef<str> for H265GopSizeUnits {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265GopBReference {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265GopBReference {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265GopBReference::Disabled,
"ENABLED" => H265GopBReference::Enabled,
other => H265GopBReference::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265GopBReference {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265GopBReference::from(s))
}
}
impl H265GopBReference {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265GopBReference::Disabled => "DISABLED",
H265GopBReference::Enabled => "ENABLED",
H265GopBReference::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265GopBReference {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => H265FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => H265FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => H265FramerateConversionAlgorithm::Interpolate,
other => H265FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265FramerateConversionAlgorithm::from(s))
}
}
impl H265FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
H265FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
H265FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
H265FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for H265FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => H265FramerateControl::InitializeFromSource,
"SPECIFIED" => H265FramerateControl::Specified,
other => H265FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265FramerateControl::from(s))
}
}
impl H265FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
H265FramerateControl::Specified => "SPECIFIED",
H265FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for H265FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable this setting to have the encoder reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. This setting is disabled by default. Related setting: In addition to enabling this setting, you must also set adaptiveQuantization to a value other than Off (OFF).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265FlickerAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265FlickerAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265FlickerAdaptiveQuantization::Disabled,
"ENABLED" => H265FlickerAdaptiveQuantization::Enabled,
other => H265FlickerAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265FlickerAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265FlickerAdaptiveQuantization::from(s))
}
}
impl H265FlickerAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265FlickerAdaptiveQuantization::Disabled => "DISABLED",
H265FlickerAdaptiveQuantization::Enabled => "ENABLED",
H265FlickerAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265FlickerAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265DynamicSubGop {
#[allow(missing_docs)] // documentation missing in model
Adaptive,
#[allow(missing_docs)] // documentation missing in model
Static,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265DynamicSubGop {
fn from(s: &str) -> Self {
match s {
"ADAPTIVE" => H265DynamicSubGop::Adaptive,
"STATIC" => H265DynamicSubGop::Static,
other => H265DynamicSubGop::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265DynamicSubGop {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265DynamicSubGop::from(s))
}
}
impl H265DynamicSubGop {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265DynamicSubGop::Adaptive => "ADAPTIVE",
H265DynamicSubGop::Static => "STATIC",
H265DynamicSubGop::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADAPTIVE", "STATIC"]
}
}
impl AsRef<str> for H265DynamicSubGop {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265CodecProfile {
#[allow(missing_docs)] // documentation missing in model
Main10High,
#[allow(missing_docs)] // documentation missing in model
Main10Main,
#[allow(missing_docs)] // documentation missing in model
Main42210BitHigh,
#[allow(missing_docs)] // documentation missing in model
Main42210BitMain,
#[allow(missing_docs)] // documentation missing in model
Main4228BitHigh,
#[allow(missing_docs)] // documentation missing in model
Main4228BitMain,
#[allow(missing_docs)] // documentation missing in model
MainHigh,
#[allow(missing_docs)] // documentation missing in model
MainMain,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265CodecProfile {
fn from(s: &str) -> Self {
match s {
"MAIN10_HIGH" => H265CodecProfile::Main10High,
"MAIN10_MAIN" => H265CodecProfile::Main10Main,
"MAIN_422_10BIT_HIGH" => H265CodecProfile::Main42210BitHigh,
"MAIN_422_10BIT_MAIN" => H265CodecProfile::Main42210BitMain,
"MAIN_422_8BIT_HIGH" => H265CodecProfile::Main4228BitHigh,
"MAIN_422_8BIT_MAIN" => H265CodecProfile::Main4228BitMain,
"MAIN_HIGH" => H265CodecProfile::MainHigh,
"MAIN_MAIN" => H265CodecProfile::MainMain,
other => H265CodecProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265CodecProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265CodecProfile::from(s))
}
}
impl H265CodecProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265CodecProfile::Main10High => "MAIN10_HIGH",
H265CodecProfile::Main10Main => "MAIN10_MAIN",
H265CodecProfile::Main42210BitHigh => "MAIN_422_10BIT_HIGH",
H265CodecProfile::Main42210BitMain => "MAIN_422_10BIT_MAIN",
H265CodecProfile::Main4228BitHigh => "MAIN_422_8BIT_HIGH",
H265CodecProfile::Main4228BitMain => "MAIN_422_8BIT_MAIN",
H265CodecProfile::MainHigh => "MAIN_HIGH",
H265CodecProfile::MainMain => "MAIN_MAIN",
H265CodecProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"MAIN10_HIGH",
"MAIN10_MAIN",
"MAIN_422_10BIT_HIGH",
"MAIN_422_10BIT_MAIN",
"MAIN_422_8BIT_HIGH",
"MAIN_422_8BIT_MAIN",
"MAIN_HIGH",
"MAIN_MAIN",
]
}
}
impl AsRef<str> for H265CodecProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// H.265 Level.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265CodecLevel {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Level1,
#[allow(missing_docs)] // documentation missing in model
Level2,
#[allow(missing_docs)] // documentation missing in model
Level21,
#[allow(missing_docs)] // documentation missing in model
Level3,
#[allow(missing_docs)] // documentation missing in model
Level31,
#[allow(missing_docs)] // documentation missing in model
Level4,
#[allow(missing_docs)] // documentation missing in model
Level41,
#[allow(missing_docs)] // documentation missing in model
Level5,
#[allow(missing_docs)] // documentation missing in model
Level51,
#[allow(missing_docs)] // documentation missing in model
Level52,
#[allow(missing_docs)] // documentation missing in model
Level6,
#[allow(missing_docs)] // documentation missing in model
Level61,
#[allow(missing_docs)] // documentation missing in model
Level62,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265CodecLevel {
fn from(s: &str) -> Self {
match s {
"AUTO" => H265CodecLevel::Auto,
"LEVEL_1" => H265CodecLevel::Level1,
"LEVEL_2" => H265CodecLevel::Level2,
"LEVEL_2_1" => H265CodecLevel::Level21,
"LEVEL_3" => H265CodecLevel::Level3,
"LEVEL_3_1" => H265CodecLevel::Level31,
"LEVEL_4" => H265CodecLevel::Level4,
"LEVEL_4_1" => H265CodecLevel::Level41,
"LEVEL_5" => H265CodecLevel::Level5,
"LEVEL_5_1" => H265CodecLevel::Level51,
"LEVEL_5_2" => H265CodecLevel::Level52,
"LEVEL_6" => H265CodecLevel::Level6,
"LEVEL_6_1" => H265CodecLevel::Level61,
"LEVEL_6_2" => H265CodecLevel::Level62,
other => H265CodecLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265CodecLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265CodecLevel::from(s))
}
}
impl H265CodecLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265CodecLevel::Auto => "AUTO",
H265CodecLevel::Level1 => "LEVEL_1",
H265CodecLevel::Level2 => "LEVEL_2",
H265CodecLevel::Level21 => "LEVEL_2_1",
H265CodecLevel::Level3 => "LEVEL_3",
H265CodecLevel::Level31 => "LEVEL_3_1",
H265CodecLevel::Level4 => "LEVEL_4",
H265CodecLevel::Level41 => "LEVEL_4_1",
H265CodecLevel::Level5 => "LEVEL_5",
H265CodecLevel::Level51 => "LEVEL_5_1",
H265CodecLevel::Level52 => "LEVEL_5_2",
H265CodecLevel::Level6 => "LEVEL_6",
H265CodecLevel::Level61 => "LEVEL_6_1",
H265CodecLevel::Level62 => "LEVEL_6_2",
H265CodecLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTO",
"LEVEL_1",
"LEVEL_2",
"LEVEL_2_1",
"LEVEL_3",
"LEVEL_3_1",
"LEVEL_4",
"LEVEL_4_1",
"LEVEL_5",
"LEVEL_5_1",
"LEVEL_5_2",
"LEVEL_6",
"LEVEL_6_1",
"LEVEL_6_2",
]
}
}
impl AsRef<str> for H265CodecLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enables Alternate Transfer Function SEI message for outputs using Hybrid Log Gamma (HLG) Electro-Optical Transfer Function (EOTF).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265AlternateTransferFunctionSei {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265AlternateTransferFunctionSei {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H265AlternateTransferFunctionSei::Disabled,
"ENABLED" => H265AlternateTransferFunctionSei::Enabled,
other => H265AlternateTransferFunctionSei::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265AlternateTransferFunctionSei {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265AlternateTransferFunctionSei::from(s))
}
}
impl H265AlternateTransferFunctionSei {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265AlternateTransferFunctionSei::Disabled => "DISABLED",
H265AlternateTransferFunctionSei::Enabled => "ENABLED",
H265AlternateTransferFunctionSei::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H265AlternateTransferFunctionSei {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you set Adaptive Quantization (H265AdaptiveQuantization) to Auto (AUTO), or leave blank, MediaConvert automatically applies quantization to improve the video quality of your output. Set Adaptive Quantization to Low (LOW), Medium (MEDIUM), High (HIGH), Higher (HIGHER), or Max (MAX) to manually control the strength of the quantization filter. When you do, you can specify a value for Spatial Adaptive Quantization (H265SpatialAdaptiveQuantization), Temporal Adaptive Quantization (H265TemporalAdaptiveQuantization), and Flicker Adaptive Quantization (H265FlickerAdaptiveQuantization), to further control the quantization filter. Set Adaptive Quantization to Off (OFF) to apply no quantization to your output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H265AdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Higher,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Max,
#[allow(missing_docs)] // documentation missing in model
Medium,
#[allow(missing_docs)] // documentation missing in model
Off,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H265AdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"AUTO" => H265AdaptiveQuantization::Auto,
"HIGH" => H265AdaptiveQuantization::High,
"HIGHER" => H265AdaptiveQuantization::Higher,
"LOW" => H265AdaptiveQuantization::Low,
"MAX" => H265AdaptiveQuantization::Max,
"MEDIUM" => H265AdaptiveQuantization::Medium,
"OFF" => H265AdaptiveQuantization::Off,
other => H265AdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H265AdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H265AdaptiveQuantization::from(s))
}
}
impl H265AdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H265AdaptiveQuantization::Auto => "AUTO",
H265AdaptiveQuantization::High => "HIGH",
H265AdaptiveQuantization::Higher => "HIGHER",
H265AdaptiveQuantization::Low => "LOW",
H265AdaptiveQuantization::Max => "MAX",
H265AdaptiveQuantization::Medium => "MEDIUM",
H265AdaptiveQuantization::Off => "OFF",
H265AdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "HIGH", "HIGHER", "LOW", "MAX", "MEDIUM", "OFF"]
}
}
impl AsRef<str> for H265AdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value H_264.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct H264Settings {
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set H264AdaptiveQuantization to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization (H264AdaptiveQuantization) to Off (OFF). Related settings: The value that you choose here applies to the following settings: H264FlickerAdaptiveQuantization, H264SpatialAdaptiveQuantization, and H264TemporalAdaptiveQuantization.
pub adaptive_quantization: std::option::Option<crate::model::H264AdaptiveQuantization>,
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub bitrate: i32,
/// Specify an H.264 level that is consistent with your output video settings. If you aren't sure what level to specify, choose Auto (AUTO).
pub codec_level: std::option::Option<crate::model::H264CodecLevel>,
/// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the AVC-I License.
pub codec_profile: std::option::Option<crate::model::H264CodecProfile>,
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub dynamic_sub_gop: std::option::Option<crate::model::H264DynamicSubGop>,
/// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC.
pub entropy_encoding: std::option::Option<crate::model::H264EntropyEncoding>,
/// The video encoding method for your MPEG-4 AVC output. Keep the default value, PAFF, to have MediaConvert use PAFF encoding for interlaced outputs. Choose Force field (FORCE_FIELD) to disable PAFF encoding and create separate interlaced fields. Choose MBAFF to disable PAFF and have MediaConvert use MBAFF encoding for interlaced outputs.
pub field_encoding: std::option::Option<crate::model::H264FieldEncoding>,
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264FlickerAdaptiveQuantization is Disabled (DISABLED). Change this value to Enabled (ENABLED) to reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. To manually enable or disable H264FlickerAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub flicker_adaptive_quantization:
std::option::Option<crate::model::H264FlickerAdaptiveQuantization>,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::H264FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::H264FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub gop_b_reference: std::option::Option<crate::model::H264GopBReference>,
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub gop_closed_cadence: i32,
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub gop_size: f64,
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub gop_size_units: std::option::Option<crate::model::H264GopSizeUnits>,
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub hrd_buffer_initial_fill_percentage: i32,
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub hrd_buffer_size: i32,
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub interlace_mode: std::option::Option<crate::model::H264InterlaceMode>,
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub max_bitrate: i32,
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub min_i_interval: i32,
/// This setting to determines the number of B-frames that MediaConvert puts between reference frames in this output. We recommend that you use automatic behavior to allow the transcoder to choose the best value based on characteristics of your input video. In the console, choose AUTO to select this automatic behavior. When you manually edit your JSON job specification, leave this setting out to choose automatic behavior. When you want to specify this number explicitly, choose a whole number from 0 through 7.
pub number_b_frames_between_reference_frames: i32,
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub number_reference_frames: i32,
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub par_control: std::option::Option<crate::model::H264ParControl>,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub par_denominator: i32,
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub par_numerator: i32,
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub quality_tuning_level: std::option::Option<crate::model::H264QualityTuningLevel>,
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub qvbr_settings: std::option::Option<crate::model::H264QvbrSettings>,
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub rate_control_mode: std::option::Option<crate::model::H264RateControlMode>,
/// Places a PPS header on each encoded picture, even if repeated.
pub repeat_pps: std::option::Option<crate::model::H264RepeatPps>,
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub scan_type_conversion_mode: std::option::Option<crate::model::H264ScanTypeConversionMode>,
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub scene_change_detect: std::option::Option<crate::model::H264SceneChangeDetect>,
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub slices: i32,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::H264SlowPal>,
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub softness: i32,
/// Only use this setting when you change the default value, Auto (AUTO), for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264SpatialAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to set H264SpatialAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (H264AdaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher. To manually enable or disable H264SpatialAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub spatial_adaptive_quantization:
std::option::Option<crate::model::H264SpatialAdaptiveQuantization>,
/// Produces a bitstream compliant with SMPTE RP-2027.
pub syntax: std::option::Option<crate::model::H264Syntax>,
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub telecine: std::option::Option<crate::model::H264Telecine>,
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264TemporalAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to set H264TemporalAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization). To manually enable or disable H264TemporalAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub temporal_adaptive_quantization:
std::option::Option<crate::model::H264TemporalAdaptiveQuantization>,
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub unregistered_sei_timecode: std::option::Option<crate::model::H264UnregisteredSeiTimecode>,
}
impl H264Settings {
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set H264AdaptiveQuantization to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization (H264AdaptiveQuantization) to Off (OFF). Related settings: The value that you choose here applies to the following settings: H264FlickerAdaptiveQuantization, H264SpatialAdaptiveQuantization, and H264TemporalAdaptiveQuantization.
pub fn adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H264AdaptiveQuantization> {
self.adaptive_quantization.as_ref()
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Specify an H.264 level that is consistent with your output video settings. If you aren't sure what level to specify, choose Auto (AUTO).
pub fn codec_level(&self) -> std::option::Option<&crate::model::H264CodecLevel> {
self.codec_level.as_ref()
}
/// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the AVC-I License.
pub fn codec_profile(&self) -> std::option::Option<&crate::model::H264CodecProfile> {
self.codec_profile.as_ref()
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn dynamic_sub_gop(&self) -> std::option::Option<&crate::model::H264DynamicSubGop> {
self.dynamic_sub_gop.as_ref()
}
/// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC.
pub fn entropy_encoding(&self) -> std::option::Option<&crate::model::H264EntropyEncoding> {
self.entropy_encoding.as_ref()
}
/// The video encoding method for your MPEG-4 AVC output. Keep the default value, PAFF, to have MediaConvert use PAFF encoding for interlaced outputs. Choose Force field (FORCE_FIELD) to disable PAFF encoding and create separate interlaced fields. Choose MBAFF to disable PAFF and have MediaConvert use MBAFF encoding for interlaced outputs.
pub fn field_encoding(&self) -> std::option::Option<&crate::model::H264FieldEncoding> {
self.field_encoding.as_ref()
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264FlickerAdaptiveQuantization is Disabled (DISABLED). Change this value to Enabled (ENABLED) to reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. To manually enable or disable H264FlickerAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn flicker_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H264FlickerAdaptiveQuantization> {
self.flicker_adaptive_quantization.as_ref()
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::H264FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::H264FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub fn gop_b_reference(&self) -> std::option::Option<&crate::model::H264GopBReference> {
self.gop_b_reference.as_ref()
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub fn gop_closed_cadence(&self) -> i32 {
self.gop_closed_cadence
}
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub fn gop_size(&self) -> f64 {
self.gop_size
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub fn gop_size_units(&self) -> std::option::Option<&crate::model::H264GopSizeUnits> {
self.gop_size_units.as_ref()
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn hrd_buffer_initial_fill_percentage(&self) -> i32 {
self.hrd_buffer_initial_fill_percentage
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(&self) -> i32 {
self.hrd_buffer_size
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::H264InterlaceMode> {
self.interlace_mode.as_ref()
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn max_bitrate(&self) -> i32 {
self.max_bitrate
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn min_i_interval(&self) -> i32 {
self.min_i_interval
}
/// This setting to determines the number of B-frames that MediaConvert puts between reference frames in this output. We recommend that you use automatic behavior to allow the transcoder to choose the best value based on characteristics of your input video. In the console, choose AUTO to select this automatic behavior. When you manually edit your JSON job specification, leave this setting out to choose automatic behavior. When you want to specify this number explicitly, choose a whole number from 0 through 7.
pub fn number_b_frames_between_reference_frames(&self) -> i32 {
self.number_b_frames_between_reference_frames
}
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub fn number_reference_frames(&self) -> i32 {
self.number_reference_frames
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(&self) -> std::option::Option<&crate::model::H264ParControl> {
self.par_control.as_ref()
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(&self) -> i32 {
self.par_denominator
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(&self) -> i32 {
self.par_numerator
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::H264QualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn qvbr_settings(&self) -> std::option::Option<&crate::model::H264QvbrSettings> {
self.qvbr_settings.as_ref()
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::H264RateControlMode> {
self.rate_control_mode.as_ref()
}
/// Places a PPS header on each encoded picture, even if repeated.
pub fn repeat_pps(&self) -> std::option::Option<&crate::model::H264RepeatPps> {
self.repeat_pps.as_ref()
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
&self,
) -> std::option::Option<&crate::model::H264ScanTypeConversionMode> {
self.scan_type_conversion_mode.as_ref()
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub fn scene_change_detect(&self) -> std::option::Option<&crate::model::H264SceneChangeDetect> {
self.scene_change_detect.as_ref()
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(&self) -> i32 {
self.slices
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::H264SlowPal> {
self.slow_pal.as_ref()
}
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn softness(&self) -> i32 {
self.softness
}
/// Only use this setting when you change the default value, Auto (AUTO), for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264SpatialAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to set H264SpatialAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (H264AdaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher. To manually enable or disable H264SpatialAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn spatial_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H264SpatialAdaptiveQuantization> {
self.spatial_adaptive_quantization.as_ref()
}
/// Produces a bitstream compliant with SMPTE RP-2027.
pub fn syntax(&self) -> std::option::Option<&crate::model::H264Syntax> {
self.syntax.as_ref()
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(&self) -> std::option::Option<&crate::model::H264Telecine> {
self.telecine.as_ref()
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264TemporalAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to set H264TemporalAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization). To manually enable or disable H264TemporalAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn temporal_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::H264TemporalAdaptiveQuantization> {
self.temporal_adaptive_quantization.as_ref()
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub fn unregistered_sei_timecode(
&self,
) -> std::option::Option<&crate::model::H264UnregisteredSeiTimecode> {
self.unregistered_sei_timecode.as_ref()
}
}
impl std::fmt::Debug for H264Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("H264Settings");
formatter.field("adaptive_quantization", &self.adaptive_quantization);
formatter.field("bitrate", &self.bitrate);
formatter.field("codec_level", &self.codec_level);
formatter.field("codec_profile", &self.codec_profile);
formatter.field("dynamic_sub_gop", &self.dynamic_sub_gop);
formatter.field("entropy_encoding", &self.entropy_encoding);
formatter.field("field_encoding", &self.field_encoding);
formatter.field(
"flicker_adaptive_quantization",
&self.flicker_adaptive_quantization,
);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("gop_b_reference", &self.gop_b_reference);
formatter.field("gop_closed_cadence", &self.gop_closed_cadence);
formatter.field("gop_size", &self.gop_size);
formatter.field("gop_size_units", &self.gop_size_units);
formatter.field(
"hrd_buffer_initial_fill_percentage",
&self.hrd_buffer_initial_fill_percentage,
);
formatter.field("hrd_buffer_size", &self.hrd_buffer_size);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("max_bitrate", &self.max_bitrate);
formatter.field("min_i_interval", &self.min_i_interval);
formatter.field(
"number_b_frames_between_reference_frames",
&self.number_b_frames_between_reference_frames,
);
formatter.field("number_reference_frames", &self.number_reference_frames);
formatter.field("par_control", &self.par_control);
formatter.field("par_denominator", &self.par_denominator);
formatter.field("par_numerator", &self.par_numerator);
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.field("qvbr_settings", &self.qvbr_settings);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.field("repeat_pps", &self.repeat_pps);
formatter.field("scan_type_conversion_mode", &self.scan_type_conversion_mode);
formatter.field("scene_change_detect", &self.scene_change_detect);
formatter.field("slices", &self.slices);
formatter.field("slow_pal", &self.slow_pal);
formatter.field("softness", &self.softness);
formatter.field(
"spatial_adaptive_quantization",
&self.spatial_adaptive_quantization,
);
formatter.field("syntax", &self.syntax);
formatter.field("telecine", &self.telecine);
formatter.field(
"temporal_adaptive_quantization",
&self.temporal_adaptive_quantization,
);
formatter.field("unregistered_sei_timecode", &self.unregistered_sei_timecode);
formatter.finish()
}
}
/// See [`H264Settings`](crate::model::H264Settings)
pub mod h264_settings {
/// A builder for [`H264Settings`](crate::model::H264Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) adaptive_quantization:
std::option::Option<crate::model::H264AdaptiveQuantization>,
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) codec_level: std::option::Option<crate::model::H264CodecLevel>,
pub(crate) codec_profile: std::option::Option<crate::model::H264CodecProfile>,
pub(crate) dynamic_sub_gop: std::option::Option<crate::model::H264DynamicSubGop>,
pub(crate) entropy_encoding: std::option::Option<crate::model::H264EntropyEncoding>,
pub(crate) field_encoding: std::option::Option<crate::model::H264FieldEncoding>,
pub(crate) flicker_adaptive_quantization:
std::option::Option<crate::model::H264FlickerAdaptiveQuantization>,
pub(crate) framerate_control: std::option::Option<crate::model::H264FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::H264FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) gop_b_reference: std::option::Option<crate::model::H264GopBReference>,
pub(crate) gop_closed_cadence: std::option::Option<i32>,
pub(crate) gop_size: std::option::Option<f64>,
pub(crate) gop_size_units: std::option::Option<crate::model::H264GopSizeUnits>,
pub(crate) hrd_buffer_initial_fill_percentage: std::option::Option<i32>,
pub(crate) hrd_buffer_size: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::H264InterlaceMode>,
pub(crate) max_bitrate: std::option::Option<i32>,
pub(crate) min_i_interval: std::option::Option<i32>,
pub(crate) number_b_frames_between_reference_frames: std::option::Option<i32>,
pub(crate) number_reference_frames: std::option::Option<i32>,
pub(crate) par_control: std::option::Option<crate::model::H264ParControl>,
pub(crate) par_denominator: std::option::Option<i32>,
pub(crate) par_numerator: std::option::Option<i32>,
pub(crate) quality_tuning_level: std::option::Option<crate::model::H264QualityTuningLevel>,
pub(crate) qvbr_settings: std::option::Option<crate::model::H264QvbrSettings>,
pub(crate) rate_control_mode: std::option::Option<crate::model::H264RateControlMode>,
pub(crate) repeat_pps: std::option::Option<crate::model::H264RepeatPps>,
pub(crate) scan_type_conversion_mode:
std::option::Option<crate::model::H264ScanTypeConversionMode>,
pub(crate) scene_change_detect: std::option::Option<crate::model::H264SceneChangeDetect>,
pub(crate) slices: std::option::Option<i32>,
pub(crate) slow_pal: std::option::Option<crate::model::H264SlowPal>,
pub(crate) softness: std::option::Option<i32>,
pub(crate) spatial_adaptive_quantization:
std::option::Option<crate::model::H264SpatialAdaptiveQuantization>,
pub(crate) syntax: std::option::Option<crate::model::H264Syntax>,
pub(crate) telecine: std::option::Option<crate::model::H264Telecine>,
pub(crate) temporal_adaptive_quantization:
std::option::Option<crate::model::H264TemporalAdaptiveQuantization>,
pub(crate) unregistered_sei_timecode:
std::option::Option<crate::model::H264UnregisteredSeiTimecode>,
}
impl Builder {
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set H264AdaptiveQuantization to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization (H264AdaptiveQuantization) to Off (OFF). Related settings: The value that you choose here applies to the following settings: H264FlickerAdaptiveQuantization, H264SpatialAdaptiveQuantization, and H264TemporalAdaptiveQuantization.
pub fn adaptive_quantization(
mut self,
input: crate::model::H264AdaptiveQuantization,
) -> Self {
self.adaptive_quantization = Some(input);
self
}
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set H264AdaptiveQuantization to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization (H264AdaptiveQuantization) to Off (OFF). Related settings: The value that you choose here applies to the following settings: H264FlickerAdaptiveQuantization, H264SpatialAdaptiveQuantization, and H264TemporalAdaptiveQuantization.
pub fn set_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H264AdaptiveQuantization>,
) -> Self {
self.adaptive_quantization = input;
self
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second. Required for VBR and CBR. For MS Smooth outputs, bitrates must be unique when rounded down to the nearest multiple of 1000.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Specify an H.264 level that is consistent with your output video settings. If you aren't sure what level to specify, choose Auto (AUTO).
pub fn codec_level(mut self, input: crate::model::H264CodecLevel) -> Self {
self.codec_level = Some(input);
self
}
/// Specify an H.264 level that is consistent with your output video settings. If you aren't sure what level to specify, choose Auto (AUTO).
pub fn set_codec_level(
mut self,
input: std::option::Option<crate::model::H264CodecLevel>,
) -> Self {
self.codec_level = input;
self
}
/// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the AVC-I License.
pub fn codec_profile(mut self, input: crate::model::H264CodecProfile) -> Self {
self.codec_profile = Some(input);
self
}
/// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the AVC-I License.
pub fn set_codec_profile(
mut self,
input: std::option::Option<crate::model::H264CodecProfile>,
) -> Self {
self.codec_profile = input;
self
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn dynamic_sub_gop(mut self, input: crate::model::H264DynamicSubGop) -> Self {
self.dynamic_sub_gop = Some(input);
self
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
pub fn set_dynamic_sub_gop(
mut self,
input: std::option::Option<crate::model::H264DynamicSubGop>,
) -> Self {
self.dynamic_sub_gop = input;
self
}
/// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC.
pub fn entropy_encoding(mut self, input: crate::model::H264EntropyEncoding) -> Self {
self.entropy_encoding = Some(input);
self
}
/// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC.
pub fn set_entropy_encoding(
mut self,
input: std::option::Option<crate::model::H264EntropyEncoding>,
) -> Self {
self.entropy_encoding = input;
self
}
/// The video encoding method for your MPEG-4 AVC output. Keep the default value, PAFF, to have MediaConvert use PAFF encoding for interlaced outputs. Choose Force field (FORCE_FIELD) to disable PAFF encoding and create separate interlaced fields. Choose MBAFF to disable PAFF and have MediaConvert use MBAFF encoding for interlaced outputs.
pub fn field_encoding(mut self, input: crate::model::H264FieldEncoding) -> Self {
self.field_encoding = Some(input);
self
}
/// The video encoding method for your MPEG-4 AVC output. Keep the default value, PAFF, to have MediaConvert use PAFF encoding for interlaced outputs. Choose Force field (FORCE_FIELD) to disable PAFF encoding and create separate interlaced fields. Choose MBAFF to disable PAFF and have MediaConvert use MBAFF encoding for interlaced outputs.
pub fn set_field_encoding(
mut self,
input: std::option::Option<crate::model::H264FieldEncoding>,
) -> Self {
self.field_encoding = input;
self
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264FlickerAdaptiveQuantization is Disabled (DISABLED). Change this value to Enabled (ENABLED) to reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. To manually enable or disable H264FlickerAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn flicker_adaptive_quantization(
mut self,
input: crate::model::H264FlickerAdaptiveQuantization,
) -> Self {
self.flicker_adaptive_quantization = Some(input);
self
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264FlickerAdaptiveQuantization is Disabled (DISABLED). Change this value to Enabled (ENABLED) to reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. To manually enable or disable H264FlickerAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn set_flicker_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H264FlickerAdaptiveQuantization>,
) -> Self {
self.flicker_adaptive_quantization = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::H264FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::H264FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::H264FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::H264FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub fn gop_b_reference(mut self, input: crate::model::H264GopBReference) -> Self {
self.gop_b_reference = Some(input);
self
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
pub fn set_gop_b_reference(
mut self,
input: std::option::Option<crate::model::H264GopBReference>,
) -> Self {
self.gop_b_reference = input;
self
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub fn gop_closed_cadence(mut self, input: i32) -> Self {
self.gop_closed_cadence = Some(input);
self
}
/// Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.
pub fn set_gop_closed_cadence(mut self, input: std::option::Option<i32>) -> Self {
self.gop_closed_cadence = input;
self
}
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub fn gop_size(mut self, input: f64) -> Self {
self.gop_size = Some(input);
self
}
/// Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.
pub fn set_gop_size(mut self, input: std::option::Option<f64>) -> Self {
self.gop_size = input;
self
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub fn gop_size_units(mut self, input: crate::model::H264GopSizeUnits) -> Self {
self.gop_size_units = Some(input);
self
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
pub fn set_gop_size_units(
mut self,
input: std::option::Option<crate::model::H264GopSizeUnits>,
) -> Self {
self.gop_size_units = input;
self
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn hrd_buffer_initial_fill_percentage(mut self, input: i32) -> Self {
self.hrd_buffer_initial_fill_percentage = Some(input);
self
}
/// Percentage of the buffer that should initially be filled (HRD buffer model).
pub fn set_hrd_buffer_initial_fill_percentage(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.hrd_buffer_initial_fill_percentage = input;
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn hrd_buffer_size(mut self, input: i32) -> Self {
self.hrd_buffer_size = Some(input);
self
}
/// Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
pub fn set_hrd_buffer_size(mut self, input: std::option::Option<i32>) -> Self {
self.hrd_buffer_size = input;
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(mut self, input: crate::model::H264InterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::H264InterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn max_bitrate(mut self, input: i32) -> Self {
self.max_bitrate = Some(input);
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn set_max_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_bitrate = input;
self
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn min_i_interval(mut self, input: i32) -> Self {
self.min_i_interval = Some(input);
self
}
/// Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.
pub fn set_min_i_interval(mut self, input: std::option::Option<i32>) -> Self {
self.min_i_interval = input;
self
}
/// This setting to determines the number of B-frames that MediaConvert puts between reference frames in this output. We recommend that you use automatic behavior to allow the transcoder to choose the best value based on characteristics of your input video. In the console, choose AUTO to select this automatic behavior. When you manually edit your JSON job specification, leave this setting out to choose automatic behavior. When you want to specify this number explicitly, choose a whole number from 0 through 7.
pub fn number_b_frames_between_reference_frames(mut self, input: i32) -> Self {
self.number_b_frames_between_reference_frames = Some(input);
self
}
/// This setting to determines the number of B-frames that MediaConvert puts between reference frames in this output. We recommend that you use automatic behavior to allow the transcoder to choose the best value based on characteristics of your input video. In the console, choose AUTO to select this automatic behavior. When you manually edit your JSON job specification, leave this setting out to choose automatic behavior. When you want to specify this number explicitly, choose a whole number from 0 through 7.
pub fn set_number_b_frames_between_reference_frames(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.number_b_frames_between_reference_frames = input;
self
}
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub fn number_reference_frames(mut self, input: i32) -> Self {
self.number_reference_frames = Some(input);
self
}
/// Number of reference frames to use. The encoder may use more than requested if using B-frames and/or interlaced encoding.
pub fn set_number_reference_frames(mut self, input: std::option::Option<i32>) -> Self {
self.number_reference_frames = input;
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn par_control(mut self, input: crate::model::H264ParControl) -> Self {
self.par_control = Some(input);
self
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
pub fn set_par_control(
mut self,
input: std::option::Option<crate::model::H264ParControl>,
) -> Self {
self.par_control = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn par_denominator(mut self, input: i32) -> Self {
self.par_denominator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parDenominator is 33.
pub fn set_par_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.par_denominator = input;
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn par_numerator(mut self, input: i32) -> Self {
self.par_numerator = Some(input);
self
}
/// Required when you set Pixel aspect ratio (parControl) to SPECIFIED. On the console, this corresponds to any value other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In this example, the value for parNumerator is 40.
pub fn set_par_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.par_numerator = input;
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn quality_tuning_level(mut self, input: crate::model::H264QualityTuningLevel) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::H264QualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn qvbr_settings(mut self, input: crate::model::H264QvbrSettings) -> Self {
self.qvbr_settings = Some(input);
self
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn set_qvbr_settings(
mut self,
input: std::option::Option<crate::model::H264QvbrSettings>,
) -> Self {
self.qvbr_settings = input;
self
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub fn rate_control_mode(mut self, input: crate::model::H264RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::H264RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Places a PPS header on each encoded picture, even if repeated.
pub fn repeat_pps(mut self, input: crate::model::H264RepeatPps) -> Self {
self.repeat_pps = Some(input);
self
}
/// Places a PPS header on each encoded picture, even if repeated.
pub fn set_repeat_pps(
mut self,
input: std::option::Option<crate::model::H264RepeatPps>,
) -> Self {
self.repeat_pps = input;
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
mut self,
input: crate::model::H264ScanTypeConversionMode,
) -> Self {
self.scan_type_conversion_mode = Some(input);
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn set_scan_type_conversion_mode(
mut self,
input: std::option::Option<crate::model::H264ScanTypeConversionMode>,
) -> Self {
self.scan_type_conversion_mode = input;
self
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub fn scene_change_detect(mut self, input: crate::model::H264SceneChangeDetect) -> Self {
self.scene_change_detect = Some(input);
self
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
pub fn set_scene_change_detect(
mut self,
input: std::option::Option<crate::model::H264SceneChangeDetect>,
) -> Self {
self.scene_change_detect = input;
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn slices(mut self, input: i32) -> Self {
self.slices = Some(input);
self
}
/// Number of slices per picture. Must be less than or equal to the number of macroblock rows for progressive pictures, and less than or equal to half the number of macroblock rows for interlaced pictures.
pub fn set_slices(mut self, input: std::option::Option<i32>) -> Self {
self.slices = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::H264SlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::H264SlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn softness(mut self, input: i32) -> Self {
self.softness = Some(input);
self
}
/// Ignore this setting unless you need to comply with a specification that requires a specific value. If you don't have a specification requirement, we recommend that you adjust the softness of your output by using a lower value for the setting Sharpness (sharpness) or by enabling a noise reducer filter (noiseReducerFilter). The Softness (softness) setting specifies the quantization matrices that the encoder uses. Keep the default value, 0, for flat quantization. Choose the value 1 or 16 to use the default JVT softening quantization matricies from the H.264 specification. Choose a value from 17 to 128 to use planar interpolation. Increasing values from 17 to 128 result in increasing reduction of high-frequency data. The value 128 results in the softest video.
pub fn set_softness(mut self, input: std::option::Option<i32>) -> Self {
self.softness = input;
self
}
/// Only use this setting when you change the default value, Auto (AUTO), for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264SpatialAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to set H264SpatialAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (H264AdaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher. To manually enable or disable H264SpatialAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn spatial_adaptive_quantization(
mut self,
input: crate::model::H264SpatialAdaptiveQuantization,
) -> Self {
self.spatial_adaptive_quantization = Some(input);
self
}
/// Only use this setting when you change the default value, Auto (AUTO), for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264SpatialAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to set H264SpatialAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (H264AdaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher. To manually enable or disable H264SpatialAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn set_spatial_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H264SpatialAdaptiveQuantization>,
) -> Self {
self.spatial_adaptive_quantization = input;
self
}
/// Produces a bitstream compliant with SMPTE RP-2027.
pub fn syntax(mut self, input: crate::model::H264Syntax) -> Self {
self.syntax = Some(input);
self
}
/// Produces a bitstream compliant with SMPTE RP-2027.
pub fn set_syntax(mut self, input: std::option::Option<crate::model::H264Syntax>) -> Self {
self.syntax = input;
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(mut self, input: crate::model::H264Telecine) -> Self {
self.telecine = Some(input);
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::H264Telecine>,
) -> Self {
self.telecine = input;
self
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264TemporalAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to set H264TemporalAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization). To manually enable or disable H264TemporalAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn temporal_adaptive_quantization(
mut self,
input: crate::model::H264TemporalAdaptiveQuantization,
) -> Self {
self.temporal_adaptive_quantization = Some(input);
self
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264TemporalAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to set H264TemporalAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization). To manually enable or disable H264TemporalAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
pub fn set_temporal_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::H264TemporalAdaptiveQuantization>,
) -> Self {
self.temporal_adaptive_quantization = input;
self
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub fn unregistered_sei_timecode(
mut self,
input: crate::model::H264UnregisteredSeiTimecode,
) -> Self {
self.unregistered_sei_timecode = Some(input);
self
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
pub fn set_unregistered_sei_timecode(
mut self,
input: std::option::Option<crate::model::H264UnregisteredSeiTimecode>,
) -> Self {
self.unregistered_sei_timecode = input;
self
}
/// Consumes the builder and constructs a [`H264Settings`](crate::model::H264Settings)
pub fn build(self) -> crate::model::H264Settings {
crate::model::H264Settings {
adaptive_quantization: self.adaptive_quantization,
bitrate: self.bitrate.unwrap_or_default(),
codec_level: self.codec_level,
codec_profile: self.codec_profile,
dynamic_sub_gop: self.dynamic_sub_gop,
entropy_encoding: self.entropy_encoding,
field_encoding: self.field_encoding,
flicker_adaptive_quantization: self.flicker_adaptive_quantization,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
gop_b_reference: self.gop_b_reference,
gop_closed_cadence: self.gop_closed_cadence.unwrap_or_default(),
gop_size: self.gop_size.unwrap_or_default(),
gop_size_units: self.gop_size_units,
hrd_buffer_initial_fill_percentage: self
.hrd_buffer_initial_fill_percentage
.unwrap_or_default(),
hrd_buffer_size: self.hrd_buffer_size.unwrap_or_default(),
interlace_mode: self.interlace_mode,
max_bitrate: self.max_bitrate.unwrap_or_default(),
min_i_interval: self.min_i_interval.unwrap_or_default(),
number_b_frames_between_reference_frames: self
.number_b_frames_between_reference_frames
.unwrap_or_default(),
number_reference_frames: self.number_reference_frames.unwrap_or_default(),
par_control: self.par_control,
par_denominator: self.par_denominator.unwrap_or_default(),
par_numerator: self.par_numerator.unwrap_or_default(),
quality_tuning_level: self.quality_tuning_level,
qvbr_settings: self.qvbr_settings,
rate_control_mode: self.rate_control_mode,
repeat_pps: self.repeat_pps,
scan_type_conversion_mode: self.scan_type_conversion_mode,
scene_change_detect: self.scene_change_detect,
slices: self.slices.unwrap_or_default(),
slow_pal: self.slow_pal,
softness: self.softness.unwrap_or_default(),
spatial_adaptive_quantization: self.spatial_adaptive_quantization,
syntax: self.syntax,
telecine: self.telecine,
temporal_adaptive_quantization: self.temporal_adaptive_quantization,
unregistered_sei_timecode: self.unregistered_sei_timecode,
}
}
}
}
impl H264Settings {
/// Creates a new builder-style object to manufacture [`H264Settings`](crate::model::H264Settings)
pub fn builder() -> crate::model::h264_settings::Builder {
crate::model::h264_settings::Builder::default()
}
}
/// Inserts timecode for each frame as 4 bytes of an unregistered SEI message.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264UnregisteredSeiTimecode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264UnregisteredSeiTimecode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264UnregisteredSeiTimecode::Disabled,
"ENABLED" => H264UnregisteredSeiTimecode::Enabled,
other => H264UnregisteredSeiTimecode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264UnregisteredSeiTimecode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264UnregisteredSeiTimecode::from(s))
}
}
impl H264UnregisteredSeiTimecode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264UnregisteredSeiTimecode::Disabled => "DISABLED",
H264UnregisteredSeiTimecode::Enabled => "ENABLED",
H264UnregisteredSeiTimecode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264UnregisteredSeiTimecode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264TemporalAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on temporal variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas of the frame that aren't moving and uses more bits on complex objects with sharp edges that move a lot. For example, this feature improves the readability of text tickers on newscasts and scoreboards on sports matches. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen that doesn't have moving objects with sharp edges, such as sports athletes' faces, you might choose to set H264TemporalAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable temporal quantization, adjust the strength of the filter with the setting Adaptive quantization (adaptiveQuantization). To manually enable or disable H264TemporalAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264TemporalAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264TemporalAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264TemporalAdaptiveQuantization::Disabled,
"ENABLED" => H264TemporalAdaptiveQuantization::Enabled,
other => H264TemporalAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264TemporalAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264TemporalAdaptiveQuantization::from(s))
}
}
impl H264TemporalAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264TemporalAdaptiveQuantization::Disabled => "DISABLED",
H264TemporalAdaptiveQuantization::Enabled => "ENABLED",
H264TemporalAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264TemporalAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard or soft telecine to create a smoother picture. Hard telecine (HARD) produces a 29.97i output. Soft telecine (SOFT) produces an output with a 23.976 output that signals to the video player device to do the conversion during play back. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264Telecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Soft,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264Telecine {
fn from(s: &str) -> Self {
match s {
"HARD" => H264Telecine::Hard,
"NONE" => H264Telecine::None,
"SOFT" => H264Telecine::Soft,
other => H264Telecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264Telecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264Telecine::from(s))
}
}
impl H264Telecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264Telecine::Hard => "HARD",
H264Telecine::None => "NONE",
H264Telecine::Soft => "SOFT",
H264Telecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE", "SOFT"]
}
}
impl AsRef<str> for H264Telecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Produces a bitstream compliant with SMPTE RP-2027.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264Syntax {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
Rp2027,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264Syntax {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => H264Syntax::Default,
"RP2027" => H264Syntax::Rp2027,
other => H264Syntax::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264Syntax {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264Syntax::from(s))
}
}
impl H264Syntax {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264Syntax::Default => "DEFAULT",
H264Syntax::Rp2027 => "RP2027",
H264Syntax::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "RP2027"]
}
}
impl AsRef<str> for H264Syntax {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Only use this setting when you change the default value, Auto (AUTO), for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264SpatialAdaptiveQuantization is Enabled (ENABLED). Keep this default value to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to set H264SpatialAdaptiveQuantization to Disabled (DISABLED). Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (H264AdaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher. To manually enable or disable H264SpatialAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264SpatialAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264SpatialAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264SpatialAdaptiveQuantization::Disabled,
"ENABLED" => H264SpatialAdaptiveQuantization::Enabled,
other => H264SpatialAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264SpatialAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264SpatialAdaptiveQuantization::from(s))
}
}
impl H264SpatialAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264SpatialAdaptiveQuantization::Disabled => "DISABLED",
H264SpatialAdaptiveQuantization::Enabled => "ENABLED",
H264SpatialAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264SpatialAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264SlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264SlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264SlowPal::Disabled,
"ENABLED" => H264SlowPal::Enabled,
other => H264SlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264SlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264SlowPal::from(s))
}
}
impl H264SlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264SlowPal::Disabled => "DISABLED",
H264SlowPal::Enabled => "ENABLED",
H264SlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264SlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable this setting to insert I-frames at scene changes that the service automatically detects. This improves video quality and is enabled by default. If this output uses QVBR, choose Transition detection (TRANSITION_DETECTION) for further video quality improvement. For more information about QVBR, see https://docs.aws.amazon.com/console/mediaconvert/cbr-vbr-qvbr.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264SceneChangeDetect {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
TransitionDetection,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264SceneChangeDetect {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264SceneChangeDetect::Disabled,
"ENABLED" => H264SceneChangeDetect::Enabled,
"TRANSITION_DETECTION" => H264SceneChangeDetect::TransitionDetection,
other => H264SceneChangeDetect::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264SceneChangeDetect {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264SceneChangeDetect::from(s))
}
}
impl H264SceneChangeDetect {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264SceneChangeDetect::Disabled => "DISABLED",
H264SceneChangeDetect::Enabled => "ENABLED",
H264SceneChangeDetect::TransitionDetection => "TRANSITION_DETECTION",
H264SceneChangeDetect::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "TRANSITION_DETECTION"]
}
}
impl AsRef<str> for H264SceneChangeDetect {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264ScanTypeConversionMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
InterlacedOptimize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264ScanTypeConversionMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => H264ScanTypeConversionMode::Interlaced,
"INTERLACED_OPTIMIZE" => H264ScanTypeConversionMode::InterlacedOptimize,
other => H264ScanTypeConversionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264ScanTypeConversionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264ScanTypeConversionMode::from(s))
}
}
impl H264ScanTypeConversionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264ScanTypeConversionMode::Interlaced => "INTERLACED",
H264ScanTypeConversionMode::InterlacedOptimize => "INTERLACED_OPTIMIZE",
H264ScanTypeConversionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "INTERLACED_OPTIMIZE"]
}
}
impl AsRef<str> for H264ScanTypeConversionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Places a PPS header on each encoded picture, even if repeated.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264RepeatPps {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264RepeatPps {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264RepeatPps::Disabled,
"ENABLED" => H264RepeatPps::Enabled,
other => H264RepeatPps::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264RepeatPps {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264RepeatPps::from(s))
}
}
impl H264RepeatPps {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264RepeatPps::Disabled => "DISABLED",
H264RepeatPps::Enabled => "ENABLED",
H264RepeatPps::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264RepeatPps {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting to specify whether this output has a variable bitrate (VBR), constant bitrate (CBR) or quality-defined variable bitrate (QVBR).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Cbr,
#[allow(missing_docs)] // documentation missing in model
Qvbr,
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264RateControlMode {
fn from(s: &str) -> Self {
match s {
"CBR" => H264RateControlMode::Cbr,
"QVBR" => H264RateControlMode::Qvbr,
"VBR" => H264RateControlMode::Vbr,
other => H264RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264RateControlMode::from(s))
}
}
impl H264RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264RateControlMode::Cbr => "CBR",
H264RateControlMode::Qvbr => "QVBR",
H264RateControlMode::Vbr => "VBR",
H264RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBR", "QVBR", "VBR"]
}
}
impl AsRef<str> for H264RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for quality-defined variable bitrate encoding with the H.264 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct H264QvbrSettings {
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub max_average_bitrate: i32,
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub qvbr_quality_level: i32,
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub qvbr_quality_level_fine_tune: f64,
}
impl H264QvbrSettings {
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub fn max_average_bitrate(&self) -> i32 {
self.max_average_bitrate
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn qvbr_quality_level(&self) -> i32 {
self.qvbr_quality_level
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn qvbr_quality_level_fine_tune(&self) -> f64 {
self.qvbr_quality_level_fine_tune
}
}
impl std::fmt::Debug for H264QvbrSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("H264QvbrSettings");
formatter.field("max_average_bitrate", &self.max_average_bitrate);
formatter.field("qvbr_quality_level", &self.qvbr_quality_level);
formatter.field(
"qvbr_quality_level_fine_tune",
&self.qvbr_quality_level_fine_tune,
);
formatter.finish()
}
}
/// See [`H264QvbrSettings`](crate::model::H264QvbrSettings)
pub mod h264_qvbr_settings {
/// A builder for [`H264QvbrSettings`](crate::model::H264QvbrSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_average_bitrate: std::option::Option<i32>,
pub(crate) qvbr_quality_level: std::option::Option<i32>,
pub(crate) qvbr_quality_level_fine_tune: std::option::Option<f64>,
}
impl Builder {
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub fn max_average_bitrate(mut self, input: i32) -> Self {
self.max_average_bitrate = Some(input);
self
}
/// Use this setting only when Rate control mode is QVBR and Quality tuning level is Multi-pass HQ. For Max average bitrate values suited to the complexity of your input video, the service limits the average bitrate of the video part of this output to the value that you choose. That is, the total size of the video element is less than or equal to the value you set multiplied by the number of seconds of encoded output.
pub fn set_max_average_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_average_bitrate = input;
self
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn qvbr_quality_level(mut self, input: i32) -> Self {
self.qvbr_quality_level = Some(input);
self
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn set_qvbr_quality_level(mut self, input: std::option::Option<i32>) -> Self {
self.qvbr_quality_level = input;
self
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn qvbr_quality_level_fine_tune(mut self, input: f64) -> Self {
self.qvbr_quality_level_fine_tune = Some(input);
self
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn set_qvbr_quality_level_fine_tune(mut self, input: std::option::Option<f64>) -> Self {
self.qvbr_quality_level_fine_tune = input;
self
}
/// Consumes the builder and constructs a [`H264QvbrSettings`](crate::model::H264QvbrSettings)
pub fn build(self) -> crate::model::H264QvbrSettings {
crate::model::H264QvbrSettings {
max_average_bitrate: self.max_average_bitrate.unwrap_or_default(),
qvbr_quality_level: self.qvbr_quality_level.unwrap_or_default(),
qvbr_quality_level_fine_tune: self.qvbr_quality_level_fine_tune.unwrap_or_default(),
}
}
}
}
impl H264QvbrSettings {
/// Creates a new builder-style object to manufacture [`H264QvbrSettings`](crate::model::H264QvbrSettings)
pub fn builder() -> crate::model::h264_qvbr_settings::Builder {
crate::model::h264_qvbr_settings::Builder::default()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how you want to trade off encoding speed for output video quality. The default behavior is faster, lower quality, single-pass encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264QualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPassHq,
#[allow(missing_docs)] // documentation missing in model
SinglePass,
#[allow(missing_docs)] // documentation missing in model
SinglePassHq,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264QualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS_HQ" => H264QualityTuningLevel::MultiPassHq,
"SINGLE_PASS" => H264QualityTuningLevel::SinglePass,
"SINGLE_PASS_HQ" => H264QualityTuningLevel::SinglePassHq,
other => H264QualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264QualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264QualityTuningLevel::from(s))
}
}
impl H264QualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264QualityTuningLevel::MultiPassHq => "MULTI_PASS_HQ",
H264QualityTuningLevel::SinglePass => "SINGLE_PASS",
H264QualityTuningLevel::SinglePassHq => "SINGLE_PASS_HQ",
H264QualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS_HQ", "SINGLE_PASS", "SINGLE_PASS_HQ"]
}
}
impl AsRef<str> for H264QualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior, Follow source (INITIALIZE_FROM_SOURCE), uses the PAR from your input video for your output. To specify a different PAR in the console, choose any value other than Follow source. To specify a different PAR by editing the JSON job specification, choose SPECIFIED. When you choose SPECIFIED for this setting, you must also specify values for the parNumerator and parDenominator settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264ParControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264ParControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => H264ParControl::InitializeFromSource,
"SPECIFIED" => H264ParControl::Specified,
other => H264ParControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264ParControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264ParControl::from(s))
}
}
impl H264ParControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264ParControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
H264ParControl::Specified => "SPECIFIED",
H264ParControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for H264ParControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264InterlaceMode {
#[allow(missing_docs)] // documentation missing in model
BottomField,
#[allow(missing_docs)] // documentation missing in model
FollowBottomField,
#[allow(missing_docs)] // documentation missing in model
FollowTopField,
#[allow(missing_docs)] // documentation missing in model
Progressive,
#[allow(missing_docs)] // documentation missing in model
TopField,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264InterlaceMode {
fn from(s: &str) -> Self {
match s {
"BOTTOM_FIELD" => H264InterlaceMode::BottomField,
"FOLLOW_BOTTOM_FIELD" => H264InterlaceMode::FollowBottomField,
"FOLLOW_TOP_FIELD" => H264InterlaceMode::FollowTopField,
"PROGRESSIVE" => H264InterlaceMode::Progressive,
"TOP_FIELD" => H264InterlaceMode::TopField,
other => H264InterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264InterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264InterlaceMode::from(s))
}
}
impl H264InterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264InterlaceMode::BottomField => "BOTTOM_FIELD",
H264InterlaceMode::FollowBottomField => "FOLLOW_BOTTOM_FIELD",
H264InterlaceMode::FollowTopField => "FOLLOW_TOP_FIELD",
H264InterlaceMode::Progressive => "PROGRESSIVE",
H264InterlaceMode::TopField => "TOP_FIELD",
H264InterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_FIELD",
"FOLLOW_BOTTOM_FIELD",
"FOLLOW_TOP_FIELD",
"PROGRESSIVE",
"TOP_FIELD",
]
}
}
impl AsRef<str> for H264InterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264GopSizeUnits {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Frames,
#[allow(missing_docs)] // documentation missing in model
Seconds,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264GopSizeUnits {
fn from(s: &str) -> Self {
match s {
"AUTO" => H264GopSizeUnits::Auto,
"FRAMES" => H264GopSizeUnits::Frames,
"SECONDS" => H264GopSizeUnits::Seconds,
other => H264GopSizeUnits::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264GopSizeUnits {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264GopSizeUnits::from(s))
}
}
impl H264GopSizeUnits {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264GopSizeUnits::Auto => "AUTO",
H264GopSizeUnits::Frames => "FRAMES",
H264GopSizeUnits::Seconds => "SECONDS",
H264GopSizeUnits::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "FRAMES", "SECONDS"]
}
}
impl AsRef<str> for H264GopSizeUnits {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If enable, use reference B frames for GOP structures that have B frames > 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264GopBReference {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264GopBReference {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264GopBReference::Disabled,
"ENABLED" => H264GopBReference::Enabled,
other => H264GopBReference::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264GopBReference {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264GopBReference::from(s))
}
}
impl H264GopBReference {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264GopBReference::Disabled => "DISABLED",
H264GopBReference::Enabled => "ENABLED",
H264GopBReference::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264GopBReference {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => H264FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => H264FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => H264FramerateConversionAlgorithm::Interpolate,
other => H264FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264FramerateConversionAlgorithm::from(s))
}
}
impl H264FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
H264FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
H264FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
H264FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for H264FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => H264FramerateControl::InitializeFromSource,
"SPECIFIED" => H264FramerateControl::Specified,
other => H264FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264FramerateControl::from(s))
}
}
impl H264FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
H264FramerateControl::Specified => "SPECIFIED",
H264FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for H264FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Only use this setting when you change the default value, AUTO, for the setting H264AdaptiveQuantization. When you keep all defaults, excluding H264AdaptiveQuantization and all other adaptive quantization from your JSON job specification, MediaConvert automatically applies the best types of quantization for your video content. When you set H264AdaptiveQuantization to a value other than AUTO, the default value for H264FlickerAdaptiveQuantization is Disabled (DISABLED). Change this value to Enabled (ENABLED) to reduce I-frame pop. I-frame pop appears as a visual flicker that can arise when the encoder saves bits by copying some macroblocks many times from frame to frame, and then refreshes them at the I-frame. When you enable this setting, the encoder updates these macroblocks slightly more often to smooth out the flicker. To manually enable or disable H264FlickerAdaptiveQuantization, you must set Adaptive quantization (H264AdaptiveQuantization) to a value other than AUTO.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264FlickerAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264FlickerAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => H264FlickerAdaptiveQuantization::Disabled,
"ENABLED" => H264FlickerAdaptiveQuantization::Enabled,
other => H264FlickerAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264FlickerAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264FlickerAdaptiveQuantization::from(s))
}
}
impl H264FlickerAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264FlickerAdaptiveQuantization::Disabled => "DISABLED",
H264FlickerAdaptiveQuantization::Enabled => "ENABLED",
H264FlickerAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for H264FlickerAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The video encoding method for your MPEG-4 AVC output. Keep the default value, PAFF, to have MediaConvert use PAFF encoding for interlaced outputs. Choose Force field (FORCE_FIELD) to disable PAFF encoding and create separate interlaced fields. Choose MBAFF to disable PAFF and have MediaConvert use MBAFF encoding for interlaced outputs.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264FieldEncoding {
#[allow(missing_docs)] // documentation missing in model
ForceField,
#[allow(missing_docs)] // documentation missing in model
Mbaff,
#[allow(missing_docs)] // documentation missing in model
Paff,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264FieldEncoding {
fn from(s: &str) -> Self {
match s {
"FORCE_FIELD" => H264FieldEncoding::ForceField,
"MBAFF" => H264FieldEncoding::Mbaff,
"PAFF" => H264FieldEncoding::Paff,
other => H264FieldEncoding::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264FieldEncoding {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264FieldEncoding::from(s))
}
}
impl H264FieldEncoding {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264FieldEncoding::ForceField => "FORCE_FIELD",
H264FieldEncoding::Mbaff => "MBAFF",
H264FieldEncoding::Paff => "PAFF",
H264FieldEncoding::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FORCE_FIELD", "MBAFF", "PAFF"]
}
}
impl AsRef<str> for H264FieldEncoding {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264EntropyEncoding {
#[allow(missing_docs)] // documentation missing in model
Cabac,
#[allow(missing_docs)] // documentation missing in model
Cavlc,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264EntropyEncoding {
fn from(s: &str) -> Self {
match s {
"CABAC" => H264EntropyEncoding::Cabac,
"CAVLC" => H264EntropyEncoding::Cavlc,
other => H264EntropyEncoding::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264EntropyEncoding {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264EntropyEncoding::from(s))
}
}
impl H264EntropyEncoding {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264EntropyEncoding::Cabac => "CABAC",
H264EntropyEncoding::Cavlc => "CAVLC",
H264EntropyEncoding::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CABAC", "CAVLC"]
}
}
impl AsRef<str> for H264EntropyEncoding {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose Adaptive to improve subjective video quality for high-motion content. This will cause the service to use fewer B-frames (which infer information based on other frames) for high-motion portions of the video and more B-frames for low-motion portions. The maximum number of B-frames is limited by the value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264DynamicSubGop {
#[allow(missing_docs)] // documentation missing in model
Adaptive,
#[allow(missing_docs)] // documentation missing in model
Static,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264DynamicSubGop {
fn from(s: &str) -> Self {
match s {
"ADAPTIVE" => H264DynamicSubGop::Adaptive,
"STATIC" => H264DynamicSubGop::Static,
other => H264DynamicSubGop::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264DynamicSubGop {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264DynamicSubGop::from(s))
}
}
impl H264DynamicSubGop {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264DynamicSubGop::Adaptive => "ADAPTIVE",
H264DynamicSubGop::Static => "STATIC",
H264DynamicSubGop::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADAPTIVE", "STATIC"]
}
}
impl AsRef<str> for H264DynamicSubGop {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the AVC-I License.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264CodecProfile {
#[allow(missing_docs)] // documentation missing in model
Baseline,
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
High10Bit,
#[allow(missing_docs)] // documentation missing in model
High422,
#[allow(missing_docs)] // documentation missing in model
High42210Bit,
#[allow(missing_docs)] // documentation missing in model
Main,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264CodecProfile {
fn from(s: &str) -> Self {
match s {
"BASELINE" => H264CodecProfile::Baseline,
"HIGH" => H264CodecProfile::High,
"HIGH_10BIT" => H264CodecProfile::High10Bit,
"HIGH_422" => H264CodecProfile::High422,
"HIGH_422_10BIT" => H264CodecProfile::High42210Bit,
"MAIN" => H264CodecProfile::Main,
other => H264CodecProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264CodecProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264CodecProfile::from(s))
}
}
impl H264CodecProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264CodecProfile::Baseline => "BASELINE",
H264CodecProfile::High => "HIGH",
H264CodecProfile::High10Bit => "HIGH_10BIT",
H264CodecProfile::High422 => "HIGH_422",
H264CodecProfile::High42210Bit => "HIGH_422_10BIT",
H264CodecProfile::Main => "MAIN",
H264CodecProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BASELINE",
"HIGH",
"HIGH_10BIT",
"HIGH_422",
"HIGH_422_10BIT",
"MAIN",
]
}
}
impl AsRef<str> for H264CodecProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify an H.264 level that is consistent with your output video settings. If you aren't sure what level to specify, choose Auto (AUTO).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264CodecLevel {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Level1,
#[allow(missing_docs)] // documentation missing in model
Level11,
#[allow(missing_docs)] // documentation missing in model
Level12,
#[allow(missing_docs)] // documentation missing in model
Level13,
#[allow(missing_docs)] // documentation missing in model
Level2,
#[allow(missing_docs)] // documentation missing in model
Level21,
#[allow(missing_docs)] // documentation missing in model
Level22,
#[allow(missing_docs)] // documentation missing in model
Level3,
#[allow(missing_docs)] // documentation missing in model
Level31,
#[allow(missing_docs)] // documentation missing in model
Level32,
#[allow(missing_docs)] // documentation missing in model
Level4,
#[allow(missing_docs)] // documentation missing in model
Level41,
#[allow(missing_docs)] // documentation missing in model
Level42,
#[allow(missing_docs)] // documentation missing in model
Level5,
#[allow(missing_docs)] // documentation missing in model
Level51,
#[allow(missing_docs)] // documentation missing in model
Level52,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264CodecLevel {
fn from(s: &str) -> Self {
match s {
"AUTO" => H264CodecLevel::Auto,
"LEVEL_1" => H264CodecLevel::Level1,
"LEVEL_1_1" => H264CodecLevel::Level11,
"LEVEL_1_2" => H264CodecLevel::Level12,
"LEVEL_1_3" => H264CodecLevel::Level13,
"LEVEL_2" => H264CodecLevel::Level2,
"LEVEL_2_1" => H264CodecLevel::Level21,
"LEVEL_2_2" => H264CodecLevel::Level22,
"LEVEL_3" => H264CodecLevel::Level3,
"LEVEL_3_1" => H264CodecLevel::Level31,
"LEVEL_3_2" => H264CodecLevel::Level32,
"LEVEL_4" => H264CodecLevel::Level4,
"LEVEL_4_1" => H264CodecLevel::Level41,
"LEVEL_4_2" => H264CodecLevel::Level42,
"LEVEL_5" => H264CodecLevel::Level5,
"LEVEL_5_1" => H264CodecLevel::Level51,
"LEVEL_5_2" => H264CodecLevel::Level52,
other => H264CodecLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264CodecLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264CodecLevel::from(s))
}
}
impl H264CodecLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264CodecLevel::Auto => "AUTO",
H264CodecLevel::Level1 => "LEVEL_1",
H264CodecLevel::Level11 => "LEVEL_1_1",
H264CodecLevel::Level12 => "LEVEL_1_2",
H264CodecLevel::Level13 => "LEVEL_1_3",
H264CodecLevel::Level2 => "LEVEL_2",
H264CodecLevel::Level21 => "LEVEL_2_1",
H264CodecLevel::Level22 => "LEVEL_2_2",
H264CodecLevel::Level3 => "LEVEL_3",
H264CodecLevel::Level31 => "LEVEL_3_1",
H264CodecLevel::Level32 => "LEVEL_3_2",
H264CodecLevel::Level4 => "LEVEL_4",
H264CodecLevel::Level41 => "LEVEL_4_1",
H264CodecLevel::Level42 => "LEVEL_4_2",
H264CodecLevel::Level5 => "LEVEL_5",
H264CodecLevel::Level51 => "LEVEL_5_1",
H264CodecLevel::Level52 => "LEVEL_5_2",
H264CodecLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTO",
"LEVEL_1",
"LEVEL_1_1",
"LEVEL_1_2",
"LEVEL_1_3",
"LEVEL_2",
"LEVEL_2_1",
"LEVEL_2_2",
"LEVEL_3",
"LEVEL_3_1",
"LEVEL_3_2",
"LEVEL_4",
"LEVEL_4_1",
"LEVEL_4_2",
"LEVEL_5",
"LEVEL_5_1",
"LEVEL_5_2",
]
}
}
impl AsRef<str> for H264CodecLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Keep the default value, Auto (AUTO), for this setting to have MediaConvert automatically apply the best types of quantization for your video content. When you want to apply your quantization settings manually, you must set H264AdaptiveQuantization to a value other than Auto (AUTO). Use this setting to specify the strength of any adaptive quantization filters that you enable. If you don't want MediaConvert to do any adaptive quantization in this transcode, set Adaptive quantization (H264AdaptiveQuantization) to Off (OFF). Related settings: The value that you choose here applies to the following settings: H264FlickerAdaptiveQuantization, H264SpatialAdaptiveQuantization, and H264TemporalAdaptiveQuantization.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum H264AdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Higher,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Max,
#[allow(missing_docs)] // documentation missing in model
Medium,
#[allow(missing_docs)] // documentation missing in model
Off,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for H264AdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"AUTO" => H264AdaptiveQuantization::Auto,
"HIGH" => H264AdaptiveQuantization::High,
"HIGHER" => H264AdaptiveQuantization::Higher,
"LOW" => H264AdaptiveQuantization::Low,
"MAX" => H264AdaptiveQuantization::Max,
"MEDIUM" => H264AdaptiveQuantization::Medium,
"OFF" => H264AdaptiveQuantization::Off,
other => H264AdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for H264AdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(H264AdaptiveQuantization::from(s))
}
}
impl H264AdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
H264AdaptiveQuantization::Auto => "AUTO",
H264AdaptiveQuantization::High => "HIGH",
H264AdaptiveQuantization::Higher => "HIGHER",
H264AdaptiveQuantization::Low => "LOW",
H264AdaptiveQuantization::Max => "MAX",
H264AdaptiveQuantization::Medium => "MEDIUM",
H264AdaptiveQuantization::Off => "OFF",
H264AdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "HIGH", "HIGHER", "LOW", "MAX", "MEDIUM", "OFF"]
}
}
impl AsRef<str> for H264AdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to the value FRAME_CAPTURE.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FrameCaptureSettings {
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.n.jpg where n is the 0-based sequence number of each Capture.
pub framerate_denominator: i32,
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.NNNNNNN.jpg where N is the 0-based frame sequence number zero padded to 7 decimal places.
pub framerate_numerator: i32,
/// Maximum number of captures (encoded jpg output files).
pub max_captures: i32,
/// JPEG Quality - a higher value equals higher quality.
pub quality: i32,
}
impl FrameCaptureSettings {
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.n.jpg where n is the 0-based sequence number of each Capture.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.NNNNNNN.jpg where N is the 0-based frame sequence number zero padded to 7 decimal places.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Maximum number of captures (encoded jpg output files).
pub fn max_captures(&self) -> i32 {
self.max_captures
}
/// JPEG Quality - a higher value equals higher quality.
pub fn quality(&self) -> i32 {
self.quality
}
}
impl std::fmt::Debug for FrameCaptureSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("FrameCaptureSettings");
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("max_captures", &self.max_captures);
formatter.field("quality", &self.quality);
formatter.finish()
}
}
/// See [`FrameCaptureSettings`](crate::model::FrameCaptureSettings)
pub mod frame_capture_settings {
/// A builder for [`FrameCaptureSettings`](crate::model::FrameCaptureSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) max_captures: std::option::Option<i32>,
pub(crate) quality: std::option::Option<i32>,
}
impl Builder {
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.n.jpg where n is the 0-based sequence number of each Capture.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.n.jpg where n is the 0-based sequence number of each Capture.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.NNNNNNN.jpg where N is the 0-based frame sequence number zero padded to 7 decimal places.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// Frame capture will encode the first frame of the output stream, then one frame every framerateDenominator/framerateNumerator seconds. For example, settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of 1/3 frame per second) will capture the first frame, then 1 frame every 3s. Files will be named as filename.NNNNNNN.jpg where N is the 0-based frame sequence number zero padded to 7 decimal places.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Maximum number of captures (encoded jpg output files).
pub fn max_captures(mut self, input: i32) -> Self {
self.max_captures = Some(input);
self
}
/// Maximum number of captures (encoded jpg output files).
pub fn set_max_captures(mut self, input: std::option::Option<i32>) -> Self {
self.max_captures = input;
self
}
/// JPEG Quality - a higher value equals higher quality.
pub fn quality(mut self, input: i32) -> Self {
self.quality = Some(input);
self
}
/// JPEG Quality - a higher value equals higher quality.
pub fn set_quality(mut self, input: std::option::Option<i32>) -> Self {
self.quality = input;
self
}
/// Consumes the builder and constructs a [`FrameCaptureSettings`](crate::model::FrameCaptureSettings)
pub fn build(self) -> crate::model::FrameCaptureSettings {
crate::model::FrameCaptureSettings {
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
max_captures: self.max_captures.unwrap_or_default(),
quality: self.quality.unwrap_or_default(),
}
}
}
}
impl FrameCaptureSettings {
/// Creates a new builder-style object to manufacture [`FrameCaptureSettings`](crate::model::FrameCaptureSettings)
pub fn builder() -> crate::model::frame_capture_settings::Builder {
crate::model::frame_capture_settings::Builder::default()
}
}
/// Type of video codec
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum VideoCodec {
#[allow(missing_docs)] // documentation missing in model
Av1,
#[allow(missing_docs)] // documentation missing in model
AvcIntra,
#[allow(missing_docs)] // documentation missing in model
FrameCapture,
#[allow(missing_docs)] // documentation missing in model
H264,
#[allow(missing_docs)] // documentation missing in model
H265,
#[allow(missing_docs)] // documentation missing in model
Mpeg2,
#[allow(missing_docs)] // documentation missing in model
Prores,
#[allow(missing_docs)] // documentation missing in model
Vc3,
#[allow(missing_docs)] // documentation missing in model
Vp8,
#[allow(missing_docs)] // documentation missing in model
Vp9,
#[allow(missing_docs)] // documentation missing in model
Xavc,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for VideoCodec {
fn from(s: &str) -> Self {
match s {
"AV1" => VideoCodec::Av1,
"AVC_INTRA" => VideoCodec::AvcIntra,
"FRAME_CAPTURE" => VideoCodec::FrameCapture,
"H_264" => VideoCodec::H264,
"H_265" => VideoCodec::H265,
"MPEG2" => VideoCodec::Mpeg2,
"PRORES" => VideoCodec::Prores,
"VC3" => VideoCodec::Vc3,
"VP8" => VideoCodec::Vp8,
"VP9" => VideoCodec::Vp9,
"XAVC" => VideoCodec::Xavc,
other => VideoCodec::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for VideoCodec {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(VideoCodec::from(s))
}
}
impl VideoCodec {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
VideoCodec::Av1 => "AV1",
VideoCodec::AvcIntra => "AVC_INTRA",
VideoCodec::FrameCapture => "FRAME_CAPTURE",
VideoCodec::H264 => "H_264",
VideoCodec::H265 => "H_265",
VideoCodec::Mpeg2 => "MPEG2",
VideoCodec::Prores => "PRORES",
VideoCodec::Vc3 => "VC3",
VideoCodec::Vp8 => "VP8",
VideoCodec::Vp9 => "VP9",
VideoCodec::Xavc => "XAVC",
VideoCodec::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AV1",
"AVC_INTRA",
"FRAME_CAPTURE",
"H_264",
"H_265",
"MPEG2",
"PRORES",
"VC3",
"VP8",
"VP9",
"XAVC",
]
}
}
impl AsRef<str> for VideoCodec {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you choose AVC-Intra for your output video codec. For more information about the AVC-Intra settings, see the relevant specification. For detailed information about SD and HD in AVC-Intra, see https://ieeexplore.ieee.org/document/7290936. For information about 4K/2K in AVC-Intra, see https://pro-av.panasonic.net/en/avc-ultra/AVC-ULTRAoverview.pdf.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AvcIntraSettings {
/// Specify the AVC-Intra class of your output. The AVC-Intra class selection determines the output video bit rate depending on the frame rate of the output. Outputs with higher class values have higher bitrates and improved image quality. Note that for Class 4K/2K, MediaConvert supports only 4:2:2 chroma subsampling.
pub avc_intra_class: std::option::Option<crate::model::AvcIntraClass>,
/// Optional when you set AVC-Intra class (avcIntraClass) to Class 4K/2K (CLASS_4K_2K). When you set AVC-Intra class to a different value, this object isn't allowed.
pub avc_intra_uhd_settings: std::option::Option<crate::model::AvcIntraUhdSettings>,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::AvcIntraFramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::AvcIntraFramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub interlace_mode: std::option::Option<crate::model::AvcIntraInterlaceMode>,
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub scan_type_conversion_mode:
std::option::Option<crate::model::AvcIntraScanTypeConversionMode>,
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub slow_pal: std::option::Option<crate::model::AvcIntraSlowPal>,
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub telecine: std::option::Option<crate::model::AvcIntraTelecine>,
}
impl AvcIntraSettings {
/// Specify the AVC-Intra class of your output. The AVC-Intra class selection determines the output video bit rate depending on the frame rate of the output. Outputs with higher class values have higher bitrates and improved image quality. Note that for Class 4K/2K, MediaConvert supports only 4:2:2 chroma subsampling.
pub fn avc_intra_class(&self) -> std::option::Option<&crate::model::AvcIntraClass> {
self.avc_intra_class.as_ref()
}
/// Optional when you set AVC-Intra class (avcIntraClass) to Class 4K/2K (CLASS_4K_2K). When you set AVC-Intra class to a different value, this object isn't allowed.
pub fn avc_intra_uhd_settings(
&self,
) -> std::option::Option<&crate::model::AvcIntraUhdSettings> {
self.avc_intra_uhd_settings.as_ref()
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(
&self,
) -> std::option::Option<&crate::model::AvcIntraFramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::AvcIntraFramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(&self) -> std::option::Option<&crate::model::AvcIntraInterlaceMode> {
self.interlace_mode.as_ref()
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
&self,
) -> std::option::Option<&crate::model::AvcIntraScanTypeConversionMode> {
self.scan_type_conversion_mode.as_ref()
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(&self) -> std::option::Option<&crate::model::AvcIntraSlowPal> {
self.slow_pal.as_ref()
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(&self) -> std::option::Option<&crate::model::AvcIntraTelecine> {
self.telecine.as_ref()
}
}
impl std::fmt::Debug for AvcIntraSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AvcIntraSettings");
formatter.field("avc_intra_class", &self.avc_intra_class);
formatter.field("avc_intra_uhd_settings", &self.avc_intra_uhd_settings);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("interlace_mode", &self.interlace_mode);
formatter.field("scan_type_conversion_mode", &self.scan_type_conversion_mode);
formatter.field("slow_pal", &self.slow_pal);
formatter.field("telecine", &self.telecine);
formatter.finish()
}
}
/// See [`AvcIntraSettings`](crate::model::AvcIntraSettings)
pub mod avc_intra_settings {
/// A builder for [`AvcIntraSettings`](crate::model::AvcIntraSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) avc_intra_class: std::option::Option<crate::model::AvcIntraClass>,
pub(crate) avc_intra_uhd_settings: std::option::Option<crate::model::AvcIntraUhdSettings>,
pub(crate) framerate_control: std::option::Option<crate::model::AvcIntraFramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::AvcIntraFramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) interlace_mode: std::option::Option<crate::model::AvcIntraInterlaceMode>,
pub(crate) scan_type_conversion_mode:
std::option::Option<crate::model::AvcIntraScanTypeConversionMode>,
pub(crate) slow_pal: std::option::Option<crate::model::AvcIntraSlowPal>,
pub(crate) telecine: std::option::Option<crate::model::AvcIntraTelecine>,
}
impl Builder {
/// Specify the AVC-Intra class of your output. The AVC-Intra class selection determines the output video bit rate depending on the frame rate of the output. Outputs with higher class values have higher bitrates and improved image quality. Note that for Class 4K/2K, MediaConvert supports only 4:2:2 chroma subsampling.
pub fn avc_intra_class(mut self, input: crate::model::AvcIntraClass) -> Self {
self.avc_intra_class = Some(input);
self
}
/// Specify the AVC-Intra class of your output. The AVC-Intra class selection determines the output video bit rate depending on the frame rate of the output. Outputs with higher class values have higher bitrates and improved image quality. Note that for Class 4K/2K, MediaConvert supports only 4:2:2 chroma subsampling.
pub fn set_avc_intra_class(
mut self,
input: std::option::Option<crate::model::AvcIntraClass>,
) -> Self {
self.avc_intra_class = input;
self
}
/// Optional when you set AVC-Intra class (avcIntraClass) to Class 4K/2K (CLASS_4K_2K). When you set AVC-Intra class to a different value, this object isn't allowed.
pub fn avc_intra_uhd_settings(mut self, input: crate::model::AvcIntraUhdSettings) -> Self {
self.avc_intra_uhd_settings = Some(input);
self
}
/// Optional when you set AVC-Intra class (avcIntraClass) to Class 4K/2K (CLASS_4K_2K). When you set AVC-Intra class to a different value, this object isn't allowed.
pub fn set_avc_intra_uhd_settings(
mut self,
input: std::option::Option<crate::model::AvcIntraUhdSettings>,
) -> Self {
self.avc_intra_uhd_settings = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::AvcIntraFramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::AvcIntraFramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::AvcIntraFramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::AvcIntraFramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn interlace_mode(mut self, input: crate::model::AvcIntraInterlaceMode) -> Self {
self.interlace_mode = Some(input);
self
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
pub fn set_interlace_mode(
mut self,
input: std::option::Option<crate::model::AvcIntraInterlaceMode>,
) -> Self {
self.interlace_mode = input;
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn scan_type_conversion_mode(
mut self,
input: crate::model::AvcIntraScanTypeConversionMode,
) -> Self {
self.scan_type_conversion_mode = Some(input);
self
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
pub fn set_scan_type_conversion_mode(
mut self,
input: std::option::Option<crate::model::AvcIntraScanTypeConversionMode>,
) -> Self {
self.scan_type_conversion_mode = input;
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn slow_pal(mut self, input: crate::model::AvcIntraSlowPal) -> Self {
self.slow_pal = Some(input);
self
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
pub fn set_slow_pal(
mut self,
input: std::option::Option<crate::model::AvcIntraSlowPal>,
) -> Self {
self.slow_pal = input;
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn telecine(mut self, input: crate::model::AvcIntraTelecine) -> Self {
self.telecine = Some(input);
self
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
pub fn set_telecine(
mut self,
input: std::option::Option<crate::model::AvcIntraTelecine>,
) -> Self {
self.telecine = input;
self
}
/// Consumes the builder and constructs a [`AvcIntraSettings`](crate::model::AvcIntraSettings)
pub fn build(self) -> crate::model::AvcIntraSettings {
crate::model::AvcIntraSettings {
avc_intra_class: self.avc_intra_class,
avc_intra_uhd_settings: self.avc_intra_uhd_settings,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
interlace_mode: self.interlace_mode,
scan_type_conversion_mode: self.scan_type_conversion_mode,
slow_pal: self.slow_pal,
telecine: self.telecine,
}
}
}
}
impl AvcIntraSettings {
/// Creates a new builder-style object to manufacture [`AvcIntraSettings`](crate::model::AvcIntraSettings)
pub fn builder() -> crate::model::avc_intra_settings::Builder {
crate::model::avc_intra_settings::Builder::default()
}
}
/// When you do frame rate conversion from 23.976 frames per second (fps) to 29.97 fps, and your output scan type is interlaced, you can optionally enable hard telecine (HARD) to create a smoother picture. When you keep the default value, None (NONE), MediaConvert does a standard frame rate conversion to 29.97 without doing anything with the field polarity to create a smoother picture.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraTelecine {
#[allow(missing_docs)] // documentation missing in model
Hard,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraTelecine {
fn from(s: &str) -> Self {
match s {
"HARD" => AvcIntraTelecine::Hard,
"NONE" => AvcIntraTelecine::None,
other => AvcIntraTelecine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraTelecine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraTelecine::from(s))
}
}
impl AvcIntraTelecine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraTelecine::Hard => "HARD",
AvcIntraTelecine::None => "NONE",
AvcIntraTelecine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HARD", "NONE"]
}
}
impl AsRef<str> for AvcIntraTelecine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input frame rate is 23.976 or 24 frames per second (fps). Enable slow PAL to create a 25 fps output. When you enable slow PAL, MediaConvert relabels the video frames to 25 fps and resamples your audio to keep it synchronized with the video. Note that enabling this setting will slightly reduce the duration of your video. Required settings: You must also set Framerate to 25. In your JSON job specification, set (framerateControl) to (SPECIFIED), (framerateNumerator) to 25 and (framerateDenominator) to 1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraSlowPal {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraSlowPal {
fn from(s: &str) -> Self {
match s {
"DISABLED" => AvcIntraSlowPal::Disabled,
"ENABLED" => AvcIntraSlowPal::Enabled,
other => AvcIntraSlowPal::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraSlowPal {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraSlowPal::from(s))
}
}
impl AvcIntraSlowPal {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraSlowPal::Disabled => "DISABLED",
AvcIntraSlowPal::Enabled => "ENABLED",
AvcIntraSlowPal::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for AvcIntraSlowPal {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this situation, choose Optimized interlacing (INTERLACED_OPTIMIZE) to create a better quality interlaced output. In this case, each progressive frame from the input corresponds to an interlaced field in the output. Keep the default value, Basic interlacing (INTERLACED), for all other output frame rates. With basic interlacing, MediaConvert performs any frame rate conversion first and then interlaces the frames. When you choose Optimized interlacing and you set your output frame rate to a value that isn't suitable for optimized interlacing, MediaConvert automatically falls back to basic interlacing. Required settings: To use optimized interlacing, you must set Telecine (telecine) to None (NONE) or Soft (SOFT). You can't use optimized interlacing for hard telecine outputs. You must also set Interlace mode (interlaceMode) to a value other than Progressive (PROGRESSIVE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraScanTypeConversionMode {
#[allow(missing_docs)] // documentation missing in model
Interlaced,
#[allow(missing_docs)] // documentation missing in model
InterlacedOptimize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraScanTypeConversionMode {
fn from(s: &str) -> Self {
match s {
"INTERLACED" => AvcIntraScanTypeConversionMode::Interlaced,
"INTERLACED_OPTIMIZE" => AvcIntraScanTypeConversionMode::InterlacedOptimize,
other => AvcIntraScanTypeConversionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraScanTypeConversionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraScanTypeConversionMode::from(s))
}
}
impl AvcIntraScanTypeConversionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraScanTypeConversionMode::Interlaced => "INTERLACED",
AvcIntraScanTypeConversionMode::InterlacedOptimize => "INTERLACED_OPTIMIZE",
AvcIntraScanTypeConversionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INTERLACED", "INTERLACED_OPTIMIZE"]
}
}
impl AsRef<str> for AvcIntraScanTypeConversionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the scan line type for the output. Keep the default value, Progressive (PROGRESSIVE) to create a progressive output, regardless of the scan type of your input. Use Top field first (TOP_FIELD) or Bottom field first (BOTTOM_FIELD) to create an output that's interlaced with the same field polarity throughout. Use Follow, default top (FOLLOW_TOP_FIELD) or Follow, default bottom (FOLLOW_BOTTOM_FIELD) to produce outputs with the same field polarity as the source. For jobs that have multiple inputs, the output field polarity might change over the course of the output. Follow behavior depends on the input scan type. If the source is interlaced, the output will be interlaced with the same polarity as the source. If the source is progressive, the output will be interlaced with top field bottom field first, depending on which of the Follow options you choose.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraInterlaceMode {
#[allow(missing_docs)] // documentation missing in model
BottomField,
#[allow(missing_docs)] // documentation missing in model
FollowBottomField,
#[allow(missing_docs)] // documentation missing in model
FollowTopField,
#[allow(missing_docs)] // documentation missing in model
Progressive,
#[allow(missing_docs)] // documentation missing in model
TopField,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraInterlaceMode {
fn from(s: &str) -> Self {
match s {
"BOTTOM_FIELD" => AvcIntraInterlaceMode::BottomField,
"FOLLOW_BOTTOM_FIELD" => AvcIntraInterlaceMode::FollowBottomField,
"FOLLOW_TOP_FIELD" => AvcIntraInterlaceMode::FollowTopField,
"PROGRESSIVE" => AvcIntraInterlaceMode::Progressive,
"TOP_FIELD" => AvcIntraInterlaceMode::TopField,
other => AvcIntraInterlaceMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraInterlaceMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraInterlaceMode::from(s))
}
}
impl AvcIntraInterlaceMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraInterlaceMode::BottomField => "BOTTOM_FIELD",
AvcIntraInterlaceMode::FollowBottomField => "FOLLOW_BOTTOM_FIELD",
AvcIntraInterlaceMode::FollowTopField => "FOLLOW_TOP_FIELD",
AvcIntraInterlaceMode::Progressive => "PROGRESSIVE",
AvcIntraInterlaceMode::TopField => "TOP_FIELD",
AvcIntraInterlaceMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BOTTOM_FIELD",
"FOLLOW_BOTTOM_FIELD",
"FOLLOW_TOP_FIELD",
"PROGRESSIVE",
"TOP_FIELD",
]
}
}
impl AsRef<str> for AvcIntraInterlaceMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraFramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraFramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => AvcIntraFramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => AvcIntraFramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => AvcIntraFramerateConversionAlgorithm::Interpolate,
other => AvcIntraFramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraFramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraFramerateConversionAlgorithm::from(s))
}
}
impl AvcIntraFramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraFramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
AvcIntraFramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
AvcIntraFramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
AvcIntraFramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for AvcIntraFramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraFramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraFramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => AvcIntraFramerateControl::InitializeFromSource,
"SPECIFIED" => AvcIntraFramerateControl::Specified,
other => AvcIntraFramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraFramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraFramerateControl::from(s))
}
}
impl AvcIntraFramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraFramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
AvcIntraFramerateControl::Specified => "SPECIFIED",
AvcIntraFramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for AvcIntraFramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional when you set AVC-Intra class (avcIntraClass) to Class 4K/2K (CLASS_4K_2K). When you set AVC-Intra class to a different value, this object isn't allowed.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AvcIntraUhdSettings {
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how many transcoding passes MediaConvert does with your video. When you choose Multi-pass (MULTI_PASS), your video quality is better and your output bitrate is more accurate. That is, the actual bitrate of your output is closer to the target bitrate defined in the specification. When you choose Single-pass (SINGLE_PASS), your encoding time is faster. The default behavior is Single-pass (SINGLE_PASS).
pub quality_tuning_level: std::option::Option<crate::model::AvcIntraUhdQualityTuningLevel>,
}
impl AvcIntraUhdSettings {
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how many transcoding passes MediaConvert does with your video. When you choose Multi-pass (MULTI_PASS), your video quality is better and your output bitrate is more accurate. That is, the actual bitrate of your output is closer to the target bitrate defined in the specification. When you choose Single-pass (SINGLE_PASS), your encoding time is faster. The default behavior is Single-pass (SINGLE_PASS).
pub fn quality_tuning_level(
&self,
) -> std::option::Option<&crate::model::AvcIntraUhdQualityTuningLevel> {
self.quality_tuning_level.as_ref()
}
}
impl std::fmt::Debug for AvcIntraUhdSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AvcIntraUhdSettings");
formatter.field("quality_tuning_level", &self.quality_tuning_level);
formatter.finish()
}
}
/// See [`AvcIntraUhdSettings`](crate::model::AvcIntraUhdSettings)
pub mod avc_intra_uhd_settings {
/// A builder for [`AvcIntraUhdSettings`](crate::model::AvcIntraUhdSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) quality_tuning_level:
std::option::Option<crate::model::AvcIntraUhdQualityTuningLevel>,
}
impl Builder {
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how many transcoding passes MediaConvert does with your video. When you choose Multi-pass (MULTI_PASS), your video quality is better and your output bitrate is more accurate. That is, the actual bitrate of your output is closer to the target bitrate defined in the specification. When you choose Single-pass (SINGLE_PASS), your encoding time is faster. The default behavior is Single-pass (SINGLE_PASS).
pub fn quality_tuning_level(
mut self,
input: crate::model::AvcIntraUhdQualityTuningLevel,
) -> Self {
self.quality_tuning_level = Some(input);
self
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how many transcoding passes MediaConvert does with your video. When you choose Multi-pass (MULTI_PASS), your video quality is better and your output bitrate is more accurate. That is, the actual bitrate of your output is closer to the target bitrate defined in the specification. When you choose Single-pass (SINGLE_PASS), your encoding time is faster. The default behavior is Single-pass (SINGLE_PASS).
pub fn set_quality_tuning_level(
mut self,
input: std::option::Option<crate::model::AvcIntraUhdQualityTuningLevel>,
) -> Self {
self.quality_tuning_level = input;
self
}
/// Consumes the builder and constructs a [`AvcIntraUhdSettings`](crate::model::AvcIntraUhdSettings)
pub fn build(self) -> crate::model::AvcIntraUhdSettings {
crate::model::AvcIntraUhdSettings {
quality_tuning_level: self.quality_tuning_level,
}
}
}
}
impl AvcIntraUhdSettings {
/// Creates a new builder-style object to manufacture [`AvcIntraUhdSettings`](crate::model::AvcIntraUhdSettings)
pub fn builder() -> crate::model::avc_intra_uhd_settings::Builder {
crate::model::avc_intra_uhd_settings::Builder::default()
}
}
/// Optional. Use Quality tuning level (qualityTuningLevel) to choose how many transcoding passes MediaConvert does with your video. When you choose Multi-pass (MULTI_PASS), your video quality is better and your output bitrate is more accurate. That is, the actual bitrate of your output is closer to the target bitrate defined in the specification. When you choose Single-pass (SINGLE_PASS), your encoding time is faster. The default behavior is Single-pass (SINGLE_PASS).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraUhdQualityTuningLevel {
#[allow(missing_docs)] // documentation missing in model
MultiPass,
#[allow(missing_docs)] // documentation missing in model
SinglePass,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraUhdQualityTuningLevel {
fn from(s: &str) -> Self {
match s {
"MULTI_PASS" => AvcIntraUhdQualityTuningLevel::MultiPass,
"SINGLE_PASS" => AvcIntraUhdQualityTuningLevel::SinglePass,
other => AvcIntraUhdQualityTuningLevel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraUhdQualityTuningLevel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraUhdQualityTuningLevel::from(s))
}
}
impl AvcIntraUhdQualityTuningLevel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraUhdQualityTuningLevel::MultiPass => "MULTI_PASS",
AvcIntraUhdQualityTuningLevel::SinglePass => "SINGLE_PASS",
AvcIntraUhdQualityTuningLevel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTI_PASS", "SINGLE_PASS"]
}
}
impl AsRef<str> for AvcIntraUhdQualityTuningLevel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the AVC-Intra class of your output. The AVC-Intra class selection determines the output video bit rate depending on the frame rate of the output. Outputs with higher class values have higher bitrates and improved image quality. Note that for Class 4K/2K, MediaConvert supports only 4:2:2 chroma subsampling.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AvcIntraClass {
#[allow(missing_docs)] // documentation missing in model
Class100,
#[allow(missing_docs)] // documentation missing in model
Class200,
#[allow(missing_docs)] // documentation missing in model
Class4K2K,
#[allow(missing_docs)] // documentation missing in model
Class50,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AvcIntraClass {
fn from(s: &str) -> Self {
match s {
"CLASS_100" => AvcIntraClass::Class100,
"CLASS_200" => AvcIntraClass::Class200,
"CLASS_4K_2K" => AvcIntraClass::Class4K2K,
"CLASS_50" => AvcIntraClass::Class50,
other => AvcIntraClass::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AvcIntraClass {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AvcIntraClass::from(s))
}
}
impl AvcIntraClass {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AvcIntraClass::Class100 => "CLASS_100",
AvcIntraClass::Class200 => "CLASS_200",
AvcIntraClass::Class4K2K => "CLASS_4K_2K",
AvcIntraClass::Class50 => "CLASS_50",
AvcIntraClass::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CLASS_100", "CLASS_200", "CLASS_4K_2K", "CLASS_50"]
}
}
impl AsRef<str> for AvcIntraClass {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set Codec, under VideoDescription>CodecSettings to the value AV1.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Av1Settings {
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization (spatialAdaptiveQuantization).
pub adaptive_quantization: std::option::Option<crate::model::Av1AdaptiveQuantization>,
/// Specify the Bit depth (Av1BitDepth). You can choose 8-bit (BIT_8) or 10-bit (BIT_10).
pub bit_depth: std::option::Option<crate::model::Av1BitDepth>,
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub framerate_control: std::option::Option<crate::model::Av1FramerateControl>,
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub framerate_conversion_algorithm:
std::option::Option<crate::model::Av1FramerateConversionAlgorithm>,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_denominator: i32,
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub framerate_numerator: i32,
/// Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert doesn't support GOP length in seconds. This value must be greater than zero and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer value.
pub gop_size: f64,
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub max_bitrate: i32,
/// Specify from the number of B-frames, in the range of 0-15. For AV1 encoding, we recommend using 7 or 15. Choose a larger number for a lower bitrate and smaller file size; choose a smaller number for better video quality.
pub number_b_frames_between_reference_frames: i32,
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub qvbr_settings: std::option::Option<crate::model::Av1QvbrSettings>,
/// 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
pub rate_control_mode: std::option::Option<crate::model::Av1RateControlMode>,
/// Specify the number of slices per picture. This value must be 1, 2, 4, 8, 16, or 32. For progressive pictures, this value must be less than or equal to the number of macroblock rows. For interlaced pictures, this value must be less than or equal to half the number of macroblock rows.
pub slices: i32,
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub spatial_adaptive_quantization:
std::option::Option<crate::model::Av1SpatialAdaptiveQuantization>,
}
impl Av1Settings {
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization (spatialAdaptiveQuantization).
pub fn adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::Av1AdaptiveQuantization> {
self.adaptive_quantization.as_ref()
}
/// Specify the Bit depth (Av1BitDepth). You can choose 8-bit (BIT_8) or 10-bit (BIT_10).
pub fn bit_depth(&self) -> std::option::Option<&crate::model::Av1BitDepth> {
self.bit_depth.as_ref()
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(&self) -> std::option::Option<&crate::model::Av1FramerateControl> {
self.framerate_control.as_ref()
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
&self,
) -> std::option::Option<&crate::model::Av1FramerateConversionAlgorithm> {
self.framerate_conversion_algorithm.as_ref()
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
/// Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert doesn't support GOP length in seconds. This value must be greater than zero and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer value.
pub fn gop_size(&self) -> f64 {
self.gop_size
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn max_bitrate(&self) -> i32 {
self.max_bitrate
}
/// Specify from the number of B-frames, in the range of 0-15. For AV1 encoding, we recommend using 7 or 15. Choose a larger number for a lower bitrate and smaller file size; choose a smaller number for better video quality.
pub fn number_b_frames_between_reference_frames(&self) -> i32 {
self.number_b_frames_between_reference_frames
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn qvbr_settings(&self) -> std::option::Option<&crate::model::Av1QvbrSettings> {
self.qvbr_settings.as_ref()
}
/// 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::Av1RateControlMode> {
self.rate_control_mode.as_ref()
}
/// Specify the number of slices per picture. This value must be 1, 2, 4, 8, 16, or 32. For progressive pictures, this value must be less than or equal to the number of macroblock rows. For interlaced pictures, this value must be less than or equal to half the number of macroblock rows.
pub fn slices(&self) -> i32 {
self.slices
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
&self,
) -> std::option::Option<&crate::model::Av1SpatialAdaptiveQuantization> {
self.spatial_adaptive_quantization.as_ref()
}
}
impl std::fmt::Debug for Av1Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Av1Settings");
formatter.field("adaptive_quantization", &self.adaptive_quantization);
formatter.field("bit_depth", &self.bit_depth);
formatter.field("framerate_control", &self.framerate_control);
formatter.field(
"framerate_conversion_algorithm",
&self.framerate_conversion_algorithm,
);
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.field("gop_size", &self.gop_size);
formatter.field("max_bitrate", &self.max_bitrate);
formatter.field(
"number_b_frames_between_reference_frames",
&self.number_b_frames_between_reference_frames,
);
formatter.field("qvbr_settings", &self.qvbr_settings);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.field("slices", &self.slices);
formatter.field(
"spatial_adaptive_quantization",
&self.spatial_adaptive_quantization,
);
formatter.finish()
}
}
/// See [`Av1Settings`](crate::model::Av1Settings)
pub mod av1_settings {
/// A builder for [`Av1Settings`](crate::model::Av1Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) adaptive_quantization:
std::option::Option<crate::model::Av1AdaptiveQuantization>,
pub(crate) bit_depth: std::option::Option<crate::model::Av1BitDepth>,
pub(crate) framerate_control: std::option::Option<crate::model::Av1FramerateControl>,
pub(crate) framerate_conversion_algorithm:
std::option::Option<crate::model::Av1FramerateConversionAlgorithm>,
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
pub(crate) gop_size: std::option::Option<f64>,
pub(crate) max_bitrate: std::option::Option<i32>,
pub(crate) number_b_frames_between_reference_frames: std::option::Option<i32>,
pub(crate) qvbr_settings: std::option::Option<crate::model::Av1QvbrSettings>,
pub(crate) rate_control_mode: std::option::Option<crate::model::Av1RateControlMode>,
pub(crate) slices: std::option::Option<i32>,
pub(crate) spatial_adaptive_quantization:
std::option::Option<crate::model::Av1SpatialAdaptiveQuantization>,
}
impl Builder {
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization (spatialAdaptiveQuantization).
pub fn adaptive_quantization(
mut self,
input: crate::model::Av1AdaptiveQuantization,
) -> Self {
self.adaptive_quantization = Some(input);
self
}
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization (spatialAdaptiveQuantization).
pub fn set_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::Av1AdaptiveQuantization>,
) -> Self {
self.adaptive_quantization = input;
self
}
/// Specify the Bit depth (Av1BitDepth). You can choose 8-bit (BIT_8) or 10-bit (BIT_10).
pub fn bit_depth(mut self, input: crate::model::Av1BitDepth) -> Self {
self.bit_depth = Some(input);
self
}
/// Specify the Bit depth (Av1BitDepth). You can choose 8-bit (BIT_8) or 10-bit (BIT_10).
pub fn set_bit_depth(
mut self,
input: std::option::Option<crate::model::Av1BitDepth>,
) -> Self {
self.bit_depth = input;
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn framerate_control(mut self, input: crate::model::Av1FramerateControl) -> Self {
self.framerate_control = Some(input);
self
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
pub fn set_framerate_control(
mut self,
input: std::option::Option<crate::model::Av1FramerateControl>,
) -> Self {
self.framerate_control = input;
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn framerate_conversion_algorithm(
mut self,
input: crate::model::Av1FramerateConversionAlgorithm,
) -> Self {
self.framerate_conversion_algorithm = Some(input);
self
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
pub fn set_framerate_conversion_algorithm(
mut self,
input: std::option::Option<crate::model::Av1FramerateConversionAlgorithm>,
) -> Self {
self.framerate_conversion_algorithm = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert doesn't support GOP length in seconds. This value must be greater than zero and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer value.
pub fn gop_size(mut self, input: f64) -> Self {
self.gop_size = Some(input);
self
}
/// Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert doesn't support GOP length in seconds. This value must be greater than zero and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer value.
pub fn set_gop_size(mut self, input: std::option::Option<f64>) -> Self {
self.gop_size = input;
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn max_bitrate(mut self, input: i32) -> Self {
self.max_bitrate = Some(input);
self
}
/// Maximum bitrate in bits/second. For example, enter five megabits per second as 5000000. Required when Rate control mode is QVBR.
pub fn set_max_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_bitrate = input;
self
}
/// Specify from the number of B-frames, in the range of 0-15. For AV1 encoding, we recommend using 7 or 15. Choose a larger number for a lower bitrate and smaller file size; choose a smaller number for better video quality.
pub fn number_b_frames_between_reference_frames(mut self, input: i32) -> Self {
self.number_b_frames_between_reference_frames = Some(input);
self
}
/// Specify from the number of B-frames, in the range of 0-15. For AV1 encoding, we recommend using 7 or 15. Choose a larger number for a lower bitrate and smaller file size; choose a smaller number for better video quality.
pub fn set_number_b_frames_between_reference_frames(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.number_b_frames_between_reference_frames = input;
self
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn qvbr_settings(mut self, input: crate::model::Av1QvbrSettings) -> Self {
self.qvbr_settings = Some(input);
self
}
/// Settings for quality-defined variable bitrate encoding with the H.265 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
pub fn set_qvbr_settings(
mut self,
input: std::option::Option<crate::model::Av1QvbrSettings>,
) -> Self {
self.qvbr_settings = input;
self
}
/// 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
pub fn rate_control_mode(mut self, input: crate::model::Av1RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::Av1RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Specify the number of slices per picture. This value must be 1, 2, 4, 8, 16, or 32. For progressive pictures, this value must be less than or equal to the number of macroblock rows. For interlaced pictures, this value must be less than or equal to half the number of macroblock rows.
pub fn slices(mut self, input: i32) -> Self {
self.slices = Some(input);
self
}
/// Specify the number of slices per picture. This value must be 1, 2, 4, 8, 16, or 32. For progressive pictures, this value must be less than or equal to the number of macroblock rows. For interlaced pictures, this value must be less than or equal to half the number of macroblock rows.
pub fn set_slices(mut self, input: std::option::Option<i32>) -> Self {
self.slices = input;
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn spatial_adaptive_quantization(
mut self,
input: crate::model::Av1SpatialAdaptiveQuantization,
) -> Self {
self.spatial_adaptive_quantization = Some(input);
self
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
pub fn set_spatial_adaptive_quantization(
mut self,
input: std::option::Option<crate::model::Av1SpatialAdaptiveQuantization>,
) -> Self {
self.spatial_adaptive_quantization = input;
self
}
/// Consumes the builder and constructs a [`Av1Settings`](crate::model::Av1Settings)
pub fn build(self) -> crate::model::Av1Settings {
crate::model::Av1Settings {
adaptive_quantization: self.adaptive_quantization,
bit_depth: self.bit_depth,
framerate_control: self.framerate_control,
framerate_conversion_algorithm: self.framerate_conversion_algorithm,
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
gop_size: self.gop_size.unwrap_or_default(),
max_bitrate: self.max_bitrate.unwrap_or_default(),
number_b_frames_between_reference_frames: self
.number_b_frames_between_reference_frames
.unwrap_or_default(),
qvbr_settings: self.qvbr_settings,
rate_control_mode: self.rate_control_mode,
slices: self.slices.unwrap_or_default(),
spatial_adaptive_quantization: self.spatial_adaptive_quantization,
}
}
}
}
impl Av1Settings {
/// Creates a new builder-style object to manufacture [`Av1Settings`](crate::model::Av1Settings)
pub fn builder() -> crate::model::av1_settings::Builder {
crate::model::av1_settings::Builder::default()
}
}
/// Keep the default value, Enabled (ENABLED), to adjust quantization within each frame based on spatial variation of content complexity. When you enable this feature, the encoder uses fewer bits on areas that can sustain more distortion with no noticeable visual degradation and uses more bits on areas where any small distortion will be noticeable. For example, complex textured blocks are encoded with fewer bits and smooth textured blocks are encoded with more bits. Enabling this feature will almost always improve your video quality. Note, though, that this feature doesn't take into account where the viewer's attention is likely to be. If viewers are likely to be focusing their attention on a part of the screen with a lot of complex texture, you might choose to disable this feature. Related setting: When you enable spatial adaptive quantization, set the value for Adaptive quantization (adaptiveQuantization) depending on your content. For homogeneous content, such as cartoons and video games, set it to Low. For content with a wider variety of textures, set it to High or Higher.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Av1SpatialAdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Av1SpatialAdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Av1SpatialAdaptiveQuantization::Disabled,
"ENABLED" => Av1SpatialAdaptiveQuantization::Enabled,
other => Av1SpatialAdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Av1SpatialAdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Av1SpatialAdaptiveQuantization::from(s))
}
}
impl Av1SpatialAdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Av1SpatialAdaptiveQuantization::Disabled => "DISABLED",
Av1SpatialAdaptiveQuantization::Enabled => "ENABLED",
Av1SpatialAdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Av1SpatialAdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined variable bitrate (QVBR). You can''t use CBR or VBR.'
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Av1RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Qvbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Av1RateControlMode {
fn from(s: &str) -> Self {
match s {
"QVBR" => Av1RateControlMode::Qvbr,
other => Av1RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Av1RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Av1RateControlMode::from(s))
}
}
impl Av1RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Av1RateControlMode::Qvbr => "QVBR",
Av1RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["QVBR"]
}
}
impl AsRef<str> for Av1RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for quality-defined variable bitrate encoding with the AV1 codec. Use these settings only when you set QVBR for Rate control mode (RateControlMode).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Av1QvbrSettings {
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub qvbr_quality_level: i32,
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub qvbr_quality_level_fine_tune: f64,
}
impl Av1QvbrSettings {
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn qvbr_quality_level(&self) -> i32 {
self.qvbr_quality_level
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn qvbr_quality_level_fine_tune(&self) -> f64 {
self.qvbr_quality_level_fine_tune
}
}
impl std::fmt::Debug for Av1QvbrSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Av1QvbrSettings");
formatter.field("qvbr_quality_level", &self.qvbr_quality_level);
formatter.field(
"qvbr_quality_level_fine_tune",
&self.qvbr_quality_level_fine_tune,
);
formatter.finish()
}
}
/// See [`Av1QvbrSettings`](crate::model::Av1QvbrSettings)
pub mod av1_qvbr_settings {
/// A builder for [`Av1QvbrSettings`](crate::model::Av1QvbrSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) qvbr_quality_level: std::option::Option<i32>,
pub(crate) qvbr_quality_level_fine_tune: std::option::Option<f64>,
}
impl Builder {
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn qvbr_quality_level(mut self, input: i32) -> Self {
self.qvbr_quality_level = Some(input);
self
}
/// Use this setting only when you set Rate control mode (RateControlMode) to QVBR. Specify the target quality level for this output. MediaConvert determines the right number of bits to use for each part of the video to maintain the video quality that you specify. When you keep the default value, AUTO, MediaConvert picks a quality level for you, based on characteristics of your input video. If you prefer to specify a quality level, specify a number from 1 through 10. Use higher numbers for greater quality. Level 10 results in nearly lossless compression. The quality level for most broadcast-quality transcodes is between 6 and 9. Optionally, to specify a value between whole numbers, also provide a value for the setting qvbrQualityLevelFineTune. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33.
pub fn set_qvbr_quality_level(mut self, input: std::option::Option<i32>) -> Self {
self.qvbr_quality_level = input;
self
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn qvbr_quality_level_fine_tune(mut self, input: f64) -> Self {
self.qvbr_quality_level_fine_tune = Some(input);
self
}
/// Optional. Specify a value here to set the QVBR quality to a level that is between whole numbers. For example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. MediaConvert rounds your QVBR quality level to the nearest third of a whole number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune to .25, your actual QVBR quality level is 7.33.
pub fn set_qvbr_quality_level_fine_tune(mut self, input: std::option::Option<f64>) -> Self {
self.qvbr_quality_level_fine_tune = input;
self
}
/// Consumes the builder and constructs a [`Av1QvbrSettings`](crate::model::Av1QvbrSettings)
pub fn build(self) -> crate::model::Av1QvbrSettings {
crate::model::Av1QvbrSettings {
qvbr_quality_level: self.qvbr_quality_level.unwrap_or_default(),
qvbr_quality_level_fine_tune: self.qvbr_quality_level_fine_tune.unwrap_or_default(),
}
}
}
}
impl Av1QvbrSettings {
/// Creates a new builder-style object to manufacture [`Av1QvbrSettings`](crate::model::Av1QvbrSettings)
pub fn builder() -> crate::model::av1_qvbr_settings::Builder {
crate::model::av1_qvbr_settings::Builder::default()
}
}
/// Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. We recommend using drop duplicate (DUPLICATE_DROP) for numerically simple conversions, such as 60 fps to 30 fps. For numerically complex conversions, you can use interpolate (INTERPOLATE) to avoid stutter. This results in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video has already been converted from its original cadence, use FrameFormer (FRAMEFORMER) to do motion-compensated interpolation. FrameFormer chooses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding time and incurs a significant add-on cost.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Av1FramerateConversionAlgorithm {
#[allow(missing_docs)] // documentation missing in model
DuplicateDrop,
#[allow(missing_docs)] // documentation missing in model
Frameformer,
#[allow(missing_docs)] // documentation missing in model
Interpolate,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Av1FramerateConversionAlgorithm {
fn from(s: &str) -> Self {
match s {
"DUPLICATE_DROP" => Av1FramerateConversionAlgorithm::DuplicateDrop,
"FRAMEFORMER" => Av1FramerateConversionAlgorithm::Frameformer,
"INTERPOLATE" => Av1FramerateConversionAlgorithm::Interpolate,
other => Av1FramerateConversionAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Av1FramerateConversionAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Av1FramerateConversionAlgorithm::from(s))
}
}
impl Av1FramerateConversionAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Av1FramerateConversionAlgorithm::DuplicateDrop => "DUPLICATE_DROP",
Av1FramerateConversionAlgorithm::Frameformer => "FRAMEFORMER",
Av1FramerateConversionAlgorithm::Interpolate => "INTERPOLATE",
Av1FramerateConversionAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DUPLICATE_DROP", "FRAMEFORMER", "INTERPOLATE"]
}
}
impl AsRef<str> for Av1FramerateConversionAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction. If you are creating your transcoding job specification as a JSON file without the console, use FramerateControl to specify which value the service uses for the frame rate for this output. Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate from the input. Choose SPECIFIED if you want the service to use the frame rate you specify in the settings FramerateNumerator and FramerateDenominator.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Av1FramerateControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Av1FramerateControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Av1FramerateControl::InitializeFromSource,
"SPECIFIED" => Av1FramerateControl::Specified,
other => Av1FramerateControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Av1FramerateControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Av1FramerateControl::from(s))
}
}
impl Av1FramerateControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Av1FramerateControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Av1FramerateControl::Specified => "SPECIFIED",
Av1FramerateControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Av1FramerateControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the Bit depth (Av1BitDepth). You can choose 8-bit (BIT_8) or 10-bit (BIT_10).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Av1BitDepth {
#[allow(missing_docs)] // documentation missing in model
Bit10,
#[allow(missing_docs)] // documentation missing in model
Bit8,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Av1BitDepth {
fn from(s: &str) -> Self {
match s {
"BIT_10" => Av1BitDepth::Bit10,
"BIT_8" => Av1BitDepth::Bit8,
other => Av1BitDepth::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Av1BitDepth {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Av1BitDepth::from(s))
}
}
impl Av1BitDepth {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Av1BitDepth::Bit10 => "BIT_10",
Av1BitDepth::Bit8 => "BIT_8",
Av1BitDepth::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["BIT_10", "BIT_8"]
}
}
impl AsRef<str> for Av1BitDepth {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the strength of any adaptive quantization filters that you enable. The value that you choose here applies to Spatial adaptive quantization (spatialAdaptiveQuantization).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Av1AdaptiveQuantization {
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Higher,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
Max,
#[allow(missing_docs)] // documentation missing in model
Medium,
#[allow(missing_docs)] // documentation missing in model
Off,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Av1AdaptiveQuantization {
fn from(s: &str) -> Self {
match s {
"HIGH" => Av1AdaptiveQuantization::High,
"HIGHER" => Av1AdaptiveQuantization::Higher,
"LOW" => Av1AdaptiveQuantization::Low,
"MAX" => Av1AdaptiveQuantization::Max,
"MEDIUM" => Av1AdaptiveQuantization::Medium,
"OFF" => Av1AdaptiveQuantization::Off,
other => Av1AdaptiveQuantization::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Av1AdaptiveQuantization {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Av1AdaptiveQuantization::from(s))
}
}
impl Av1AdaptiveQuantization {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Av1AdaptiveQuantization::High => "HIGH",
Av1AdaptiveQuantization::Higher => "HIGHER",
Av1AdaptiveQuantization::Low => "LOW",
Av1AdaptiveQuantization::Max => "MAX",
Av1AdaptiveQuantization::Medium => "MEDIUM",
Av1AdaptiveQuantization::Off => "OFF",
Av1AdaptiveQuantization::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HIGH", "HIGHER", "LOW", "MAX", "MEDIUM", "OFF"]
}
}
impl AsRef<str> for Av1AdaptiveQuantization {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AntiAlias {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AntiAlias {
fn from(s: &str) -> Self {
match s {
"DISABLED" => AntiAlias::Disabled,
"ENABLED" => AntiAlias::Enabled,
other => AntiAlias::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AntiAlias {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AntiAlias::from(s))
}
}
impl AntiAlias {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AntiAlias::Disabled => "DISABLED",
AntiAlias::Enabled => "ENABLED",
AntiAlias::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for AntiAlias {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling (AfdSignaling) to specify whether the service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AfdSignaling {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Fixed,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AfdSignaling {
fn from(s: &str) -> Self {
match s {
"AUTO" => AfdSignaling::Auto,
"FIXED" => AfdSignaling::Fixed,
"NONE" => AfdSignaling::None,
other => AfdSignaling::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AfdSignaling {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AfdSignaling::from(s))
}
}
impl AfdSignaling {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AfdSignaling::Auto => "AUTO",
AfdSignaling::Fixed => "FIXED",
AfdSignaling::None => "NONE",
AfdSignaling::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "FIXED", "NONE"]
}
}
impl AsRef<str> for AfdSignaling {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Container specific settings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ContainerSettings {
/// These settings relate to the fragmented MP4 container for the segments in your CMAF outputs.
pub cmfc_settings: std::option::Option<crate::model::CmfcSettings>,
/// Container for this output. Some containers require a container settings object. If not specified, the default object will be created.
pub container: std::option::Option<crate::model::ContainerType>,
/// Settings for F4v container
pub f4v_settings: std::option::Option<crate::model::F4vSettings>,
/// MPEG-2 TS container settings. These apply to outputs in a File output group when the output's container (ContainerType) is MPEG-2 Transport Stream (M2TS). In these assets, data is organized by the program map table (PMT). Each transport stream program contains subsets of data, including audio, video, and metadata. Each of these subsets of data has a numerical label called a packet identifier (PID). Each transport stream program corresponds to one MediaConvert output. The PMT lists the types of data in a program along with their PID. Downstream systems and players use the program map table to look up the PID for each type of data it accesses and then uses the PIDs to locate specific data within the asset.
pub m2ts_settings: std::option::Option<crate::model::M2tsSettings>,
/// These settings relate to the MPEG-2 transport stream (MPEG2-TS) container for the MPEG2-TS segments in your HLS outputs.
pub m3u8_settings: std::option::Option<crate::model::M3u8Settings>,
/// These settings relate to your QuickTime MOV output container.
pub mov_settings: std::option::Option<crate::model::MovSettings>,
/// These settings relate to your MP4 output container. You can create audio only outputs with this container. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
pub mp4_settings: std::option::Option<crate::model::Mp4Settings>,
/// These settings relate to the fragmented MP4 container for the segments in your DASH outputs.
pub mpd_settings: std::option::Option<crate::model::MpdSettings>,
/// These settings relate to your MXF output container.
pub mxf_settings: std::option::Option<crate::model::MxfSettings>,
}
impl ContainerSettings {
/// These settings relate to the fragmented MP4 container for the segments in your CMAF outputs.
pub fn cmfc_settings(&self) -> std::option::Option<&crate::model::CmfcSettings> {
self.cmfc_settings.as_ref()
}
/// Container for this output. Some containers require a container settings object. If not specified, the default object will be created.
pub fn container(&self) -> std::option::Option<&crate::model::ContainerType> {
self.container.as_ref()
}
/// Settings for F4v container
pub fn f4v_settings(&self) -> std::option::Option<&crate::model::F4vSettings> {
self.f4v_settings.as_ref()
}
/// MPEG-2 TS container settings. These apply to outputs in a File output group when the output's container (ContainerType) is MPEG-2 Transport Stream (M2TS). In these assets, data is organized by the program map table (PMT). Each transport stream program contains subsets of data, including audio, video, and metadata. Each of these subsets of data has a numerical label called a packet identifier (PID). Each transport stream program corresponds to one MediaConvert output. The PMT lists the types of data in a program along with their PID. Downstream systems and players use the program map table to look up the PID for each type of data it accesses and then uses the PIDs to locate specific data within the asset.
pub fn m2ts_settings(&self) -> std::option::Option<&crate::model::M2tsSettings> {
self.m2ts_settings.as_ref()
}
/// These settings relate to the MPEG-2 transport stream (MPEG2-TS) container for the MPEG2-TS segments in your HLS outputs.
pub fn m3u8_settings(&self) -> std::option::Option<&crate::model::M3u8Settings> {
self.m3u8_settings.as_ref()
}
/// These settings relate to your QuickTime MOV output container.
pub fn mov_settings(&self) -> std::option::Option<&crate::model::MovSettings> {
self.mov_settings.as_ref()
}
/// These settings relate to your MP4 output container. You can create audio only outputs with this container. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
pub fn mp4_settings(&self) -> std::option::Option<&crate::model::Mp4Settings> {
self.mp4_settings.as_ref()
}
/// These settings relate to the fragmented MP4 container for the segments in your DASH outputs.
pub fn mpd_settings(&self) -> std::option::Option<&crate::model::MpdSettings> {
self.mpd_settings.as_ref()
}
/// These settings relate to your MXF output container.
pub fn mxf_settings(&self) -> std::option::Option<&crate::model::MxfSettings> {
self.mxf_settings.as_ref()
}
}
impl std::fmt::Debug for ContainerSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ContainerSettings");
formatter.field("cmfc_settings", &self.cmfc_settings);
formatter.field("container", &self.container);
formatter.field("f4v_settings", &self.f4v_settings);
formatter.field("m2ts_settings", &self.m2ts_settings);
formatter.field("m3u8_settings", &self.m3u8_settings);
formatter.field("mov_settings", &self.mov_settings);
formatter.field("mp4_settings", &self.mp4_settings);
formatter.field("mpd_settings", &self.mpd_settings);
formatter.field("mxf_settings", &self.mxf_settings);
formatter.finish()
}
}
/// See [`ContainerSettings`](crate::model::ContainerSettings)
pub mod container_settings {
/// A builder for [`ContainerSettings`](crate::model::ContainerSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) cmfc_settings: std::option::Option<crate::model::CmfcSettings>,
pub(crate) container: std::option::Option<crate::model::ContainerType>,
pub(crate) f4v_settings: std::option::Option<crate::model::F4vSettings>,
pub(crate) m2ts_settings: std::option::Option<crate::model::M2tsSettings>,
pub(crate) m3u8_settings: std::option::Option<crate::model::M3u8Settings>,
pub(crate) mov_settings: std::option::Option<crate::model::MovSettings>,
pub(crate) mp4_settings: std::option::Option<crate::model::Mp4Settings>,
pub(crate) mpd_settings: std::option::Option<crate::model::MpdSettings>,
pub(crate) mxf_settings: std::option::Option<crate::model::MxfSettings>,
}
impl Builder {
/// These settings relate to the fragmented MP4 container for the segments in your CMAF outputs.
pub fn cmfc_settings(mut self, input: crate::model::CmfcSettings) -> Self {
self.cmfc_settings = Some(input);
self
}
/// These settings relate to the fragmented MP4 container for the segments in your CMAF outputs.
pub fn set_cmfc_settings(
mut self,
input: std::option::Option<crate::model::CmfcSettings>,
) -> Self {
self.cmfc_settings = input;
self
}
/// Container for this output. Some containers require a container settings object. If not specified, the default object will be created.
pub fn container(mut self, input: crate::model::ContainerType) -> Self {
self.container = Some(input);
self
}
/// Container for this output. Some containers require a container settings object. If not specified, the default object will be created.
pub fn set_container(
mut self,
input: std::option::Option<crate::model::ContainerType>,
) -> Self {
self.container = input;
self
}
/// Settings for F4v container
pub fn f4v_settings(mut self, input: crate::model::F4vSettings) -> Self {
self.f4v_settings = Some(input);
self
}
/// Settings for F4v container
pub fn set_f4v_settings(
mut self,
input: std::option::Option<crate::model::F4vSettings>,
) -> Self {
self.f4v_settings = input;
self
}
/// MPEG-2 TS container settings. These apply to outputs in a File output group when the output's container (ContainerType) is MPEG-2 Transport Stream (M2TS). In these assets, data is organized by the program map table (PMT). Each transport stream program contains subsets of data, including audio, video, and metadata. Each of these subsets of data has a numerical label called a packet identifier (PID). Each transport stream program corresponds to one MediaConvert output. The PMT lists the types of data in a program along with their PID. Downstream systems and players use the program map table to look up the PID for each type of data it accesses and then uses the PIDs to locate specific data within the asset.
pub fn m2ts_settings(mut self, input: crate::model::M2tsSettings) -> Self {
self.m2ts_settings = Some(input);
self
}
/// MPEG-2 TS container settings. These apply to outputs in a File output group when the output's container (ContainerType) is MPEG-2 Transport Stream (M2TS). In these assets, data is organized by the program map table (PMT). Each transport stream program contains subsets of data, including audio, video, and metadata. Each of these subsets of data has a numerical label called a packet identifier (PID). Each transport stream program corresponds to one MediaConvert output. The PMT lists the types of data in a program along with their PID. Downstream systems and players use the program map table to look up the PID for each type of data it accesses and then uses the PIDs to locate specific data within the asset.
pub fn set_m2ts_settings(
mut self,
input: std::option::Option<crate::model::M2tsSettings>,
) -> Self {
self.m2ts_settings = input;
self
}
/// These settings relate to the MPEG-2 transport stream (MPEG2-TS) container for the MPEG2-TS segments in your HLS outputs.
pub fn m3u8_settings(mut self, input: crate::model::M3u8Settings) -> Self {
self.m3u8_settings = Some(input);
self
}
/// These settings relate to the MPEG-2 transport stream (MPEG2-TS) container for the MPEG2-TS segments in your HLS outputs.
pub fn set_m3u8_settings(
mut self,
input: std::option::Option<crate::model::M3u8Settings>,
) -> Self {
self.m3u8_settings = input;
self
}
/// These settings relate to your QuickTime MOV output container.
pub fn mov_settings(mut self, input: crate::model::MovSettings) -> Self {
self.mov_settings = Some(input);
self
}
/// These settings relate to your QuickTime MOV output container.
pub fn set_mov_settings(
mut self,
input: std::option::Option<crate::model::MovSettings>,
) -> Self {
self.mov_settings = input;
self
}
/// These settings relate to your MP4 output container. You can create audio only outputs with this container. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
pub fn mp4_settings(mut self, input: crate::model::Mp4Settings) -> Self {
self.mp4_settings = Some(input);
self
}
/// These settings relate to your MP4 output container. You can create audio only outputs with this container. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
pub fn set_mp4_settings(
mut self,
input: std::option::Option<crate::model::Mp4Settings>,
) -> Self {
self.mp4_settings = input;
self
}
/// These settings relate to the fragmented MP4 container for the segments in your DASH outputs.
pub fn mpd_settings(mut self, input: crate::model::MpdSettings) -> Self {
self.mpd_settings = Some(input);
self
}
/// These settings relate to the fragmented MP4 container for the segments in your DASH outputs.
pub fn set_mpd_settings(
mut self,
input: std::option::Option<crate::model::MpdSettings>,
) -> Self {
self.mpd_settings = input;
self
}
/// These settings relate to your MXF output container.
pub fn mxf_settings(mut self, input: crate::model::MxfSettings) -> Self {
self.mxf_settings = Some(input);
self
}
/// These settings relate to your MXF output container.
pub fn set_mxf_settings(
mut self,
input: std::option::Option<crate::model::MxfSettings>,
) -> Self {
self.mxf_settings = input;
self
}
/// Consumes the builder and constructs a [`ContainerSettings`](crate::model::ContainerSettings)
pub fn build(self) -> crate::model::ContainerSettings {
crate::model::ContainerSettings {
cmfc_settings: self.cmfc_settings,
container: self.container,
f4v_settings: self.f4v_settings,
m2ts_settings: self.m2ts_settings,
m3u8_settings: self.m3u8_settings,
mov_settings: self.mov_settings,
mp4_settings: self.mp4_settings,
mpd_settings: self.mpd_settings,
mxf_settings: self.mxf_settings,
}
}
}
}
impl ContainerSettings {
/// Creates a new builder-style object to manufacture [`ContainerSettings`](crate::model::ContainerSettings)
pub fn builder() -> crate::model::container_settings::Builder {
crate::model::container_settings::Builder::default()
}
}
/// These settings relate to your MXF output container.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MxfSettings {
/// Optional. When you have AFD signaling set up in your output video stream, use this setting to choose whether to also include it in the MXF wrapper. Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from the video stream for this output to the MXF wrapper. Regardless of which option you choose, the AFD values remain in the video stream. Related settings: To set up your output to include or exclude AFD values, see AfdSignaling, under VideoDescription. On the console, find AFD signaling under the output's video encoding settings.
pub afd_signaling: std::option::Option<crate::model::MxfAfdSignaling>,
/// Specify the MXF profile, also called shim, for this output. When you choose Auto, MediaConvert chooses a profile based on the video codec and resolution. For a list of codecs supported with each MXF profile, see https://docs.aws.amazon.com/mediaconvert/latest/ug/codecs-supported-with-each-mxf-profile.html. For more information about the automatic selection behavior, see https://docs.aws.amazon.com/mediaconvert/latest/ug/default-automatic-selection-of-mxf-profiles.html.
pub profile: std::option::Option<crate::model::MxfProfile>,
/// Specify the XAVC profile settings for MXF outputs when you set your MXF profile to XAVC.
pub xavc_profile_settings: std::option::Option<crate::model::MxfXavcProfileSettings>,
}
impl MxfSettings {
/// Optional. When you have AFD signaling set up in your output video stream, use this setting to choose whether to also include it in the MXF wrapper. Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from the video stream for this output to the MXF wrapper. Regardless of which option you choose, the AFD values remain in the video stream. Related settings: To set up your output to include or exclude AFD values, see AfdSignaling, under VideoDescription. On the console, find AFD signaling under the output's video encoding settings.
pub fn afd_signaling(&self) -> std::option::Option<&crate::model::MxfAfdSignaling> {
self.afd_signaling.as_ref()
}
/// Specify the MXF profile, also called shim, for this output. When you choose Auto, MediaConvert chooses a profile based on the video codec and resolution. For a list of codecs supported with each MXF profile, see https://docs.aws.amazon.com/mediaconvert/latest/ug/codecs-supported-with-each-mxf-profile.html. For more information about the automatic selection behavior, see https://docs.aws.amazon.com/mediaconvert/latest/ug/default-automatic-selection-of-mxf-profiles.html.
pub fn profile(&self) -> std::option::Option<&crate::model::MxfProfile> {
self.profile.as_ref()
}
/// Specify the XAVC profile settings for MXF outputs when you set your MXF profile to XAVC.
pub fn xavc_profile_settings(
&self,
) -> std::option::Option<&crate::model::MxfXavcProfileSettings> {
self.xavc_profile_settings.as_ref()
}
}
impl std::fmt::Debug for MxfSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MxfSettings");
formatter.field("afd_signaling", &self.afd_signaling);
formatter.field("profile", &self.profile);
formatter.field("xavc_profile_settings", &self.xavc_profile_settings);
formatter.finish()
}
}
/// See [`MxfSettings`](crate::model::MxfSettings)
pub mod mxf_settings {
/// A builder for [`MxfSettings`](crate::model::MxfSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) afd_signaling: std::option::Option<crate::model::MxfAfdSignaling>,
pub(crate) profile: std::option::Option<crate::model::MxfProfile>,
pub(crate) xavc_profile_settings: std::option::Option<crate::model::MxfXavcProfileSettings>,
}
impl Builder {
/// Optional. When you have AFD signaling set up in your output video stream, use this setting to choose whether to also include it in the MXF wrapper. Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from the video stream for this output to the MXF wrapper. Regardless of which option you choose, the AFD values remain in the video stream. Related settings: To set up your output to include or exclude AFD values, see AfdSignaling, under VideoDescription. On the console, find AFD signaling under the output's video encoding settings.
pub fn afd_signaling(mut self, input: crate::model::MxfAfdSignaling) -> Self {
self.afd_signaling = Some(input);
self
}
/// Optional. When you have AFD signaling set up in your output video stream, use this setting to choose whether to also include it in the MXF wrapper. Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from the video stream for this output to the MXF wrapper. Regardless of which option you choose, the AFD values remain in the video stream. Related settings: To set up your output to include or exclude AFD values, see AfdSignaling, under VideoDescription. On the console, find AFD signaling under the output's video encoding settings.
pub fn set_afd_signaling(
mut self,
input: std::option::Option<crate::model::MxfAfdSignaling>,
) -> Self {
self.afd_signaling = input;
self
}
/// Specify the MXF profile, also called shim, for this output. When you choose Auto, MediaConvert chooses a profile based on the video codec and resolution. For a list of codecs supported with each MXF profile, see https://docs.aws.amazon.com/mediaconvert/latest/ug/codecs-supported-with-each-mxf-profile.html. For more information about the automatic selection behavior, see https://docs.aws.amazon.com/mediaconvert/latest/ug/default-automatic-selection-of-mxf-profiles.html.
pub fn profile(mut self, input: crate::model::MxfProfile) -> Self {
self.profile = Some(input);
self
}
/// Specify the MXF profile, also called shim, for this output. When you choose Auto, MediaConvert chooses a profile based on the video codec and resolution. For a list of codecs supported with each MXF profile, see https://docs.aws.amazon.com/mediaconvert/latest/ug/codecs-supported-with-each-mxf-profile.html. For more information about the automatic selection behavior, see https://docs.aws.amazon.com/mediaconvert/latest/ug/default-automatic-selection-of-mxf-profiles.html.
pub fn set_profile(mut self, input: std::option::Option<crate::model::MxfProfile>) -> Self {
self.profile = input;
self
}
/// Specify the XAVC profile settings for MXF outputs when you set your MXF profile to XAVC.
pub fn xavc_profile_settings(
mut self,
input: crate::model::MxfXavcProfileSettings,
) -> Self {
self.xavc_profile_settings = Some(input);
self
}
/// Specify the XAVC profile settings for MXF outputs when you set your MXF profile to XAVC.
pub fn set_xavc_profile_settings(
mut self,
input: std::option::Option<crate::model::MxfXavcProfileSettings>,
) -> Self {
self.xavc_profile_settings = input;
self
}
/// Consumes the builder and constructs a [`MxfSettings`](crate::model::MxfSettings)
pub fn build(self) -> crate::model::MxfSettings {
crate::model::MxfSettings {
afd_signaling: self.afd_signaling,
profile: self.profile,
xavc_profile_settings: self.xavc_profile_settings,
}
}
}
}
impl MxfSettings {
/// Creates a new builder-style object to manufacture [`MxfSettings`](crate::model::MxfSettings)
pub fn builder() -> crate::model::mxf_settings::Builder {
crate::model::mxf_settings::Builder::default()
}
}
/// Specify the XAVC profile settings for MXF outputs when you set your MXF profile to XAVC.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MxfXavcProfileSettings {
/// To create an output that complies with the XAVC file format guidelines for interoperability, keep the default value, Drop frames for compliance (DROP_FRAMES_FOR_COMPLIANCE). To include all frames from your input in this output, keep the default setting, Allow any duration (ALLOW_ANY_DURATION). The number of frames that MediaConvert excludes when you set this to Drop frames for compliance depends on the output frame rate and duration.
pub duration_mode: std::option::Option<crate::model::MxfXavcDurationMode>,
/// Specify a value for this setting only for outputs that you set up with one of these two XAVC profiles: XAVC HD Intra CBG (XAVC_HD_INTRA_CBG) or XAVC 4K Intra CBG (XAVC_4K_INTRA_CBG). Specify the amount of space in each frame that the service reserves for ancillary data, such as teletext captions. The default value for this setting is 1492 bytes per frame. This should be sufficient to prevent overflow unless you have multiple pages of teletext captions data. If you have a large amount of teletext data, specify a larger number.
pub max_anc_data_size: i32,
}
impl MxfXavcProfileSettings {
/// To create an output that complies with the XAVC file format guidelines for interoperability, keep the default value, Drop frames for compliance (DROP_FRAMES_FOR_COMPLIANCE). To include all frames from your input in this output, keep the default setting, Allow any duration (ALLOW_ANY_DURATION). The number of frames that MediaConvert excludes when you set this to Drop frames for compliance depends on the output frame rate and duration.
pub fn duration_mode(&self) -> std::option::Option<&crate::model::MxfXavcDurationMode> {
self.duration_mode.as_ref()
}
/// Specify a value for this setting only for outputs that you set up with one of these two XAVC profiles: XAVC HD Intra CBG (XAVC_HD_INTRA_CBG) or XAVC 4K Intra CBG (XAVC_4K_INTRA_CBG). Specify the amount of space in each frame that the service reserves for ancillary data, such as teletext captions. The default value for this setting is 1492 bytes per frame. This should be sufficient to prevent overflow unless you have multiple pages of teletext captions data. If you have a large amount of teletext data, specify a larger number.
pub fn max_anc_data_size(&self) -> i32 {
self.max_anc_data_size
}
}
impl std::fmt::Debug for MxfXavcProfileSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MxfXavcProfileSettings");
formatter.field("duration_mode", &self.duration_mode);
formatter.field("max_anc_data_size", &self.max_anc_data_size);
formatter.finish()
}
}
/// See [`MxfXavcProfileSettings`](crate::model::MxfXavcProfileSettings)
pub mod mxf_xavc_profile_settings {
/// A builder for [`MxfXavcProfileSettings`](crate::model::MxfXavcProfileSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) duration_mode: std::option::Option<crate::model::MxfXavcDurationMode>,
pub(crate) max_anc_data_size: std::option::Option<i32>,
}
impl Builder {
/// To create an output that complies with the XAVC file format guidelines for interoperability, keep the default value, Drop frames for compliance (DROP_FRAMES_FOR_COMPLIANCE). To include all frames from your input in this output, keep the default setting, Allow any duration (ALLOW_ANY_DURATION). The number of frames that MediaConvert excludes when you set this to Drop frames for compliance depends on the output frame rate and duration.
pub fn duration_mode(mut self, input: crate::model::MxfXavcDurationMode) -> Self {
self.duration_mode = Some(input);
self
}
/// To create an output that complies with the XAVC file format guidelines for interoperability, keep the default value, Drop frames for compliance (DROP_FRAMES_FOR_COMPLIANCE). To include all frames from your input in this output, keep the default setting, Allow any duration (ALLOW_ANY_DURATION). The number of frames that MediaConvert excludes when you set this to Drop frames for compliance depends on the output frame rate and duration.
pub fn set_duration_mode(
mut self,
input: std::option::Option<crate::model::MxfXavcDurationMode>,
) -> Self {
self.duration_mode = input;
self
}
/// Specify a value for this setting only for outputs that you set up with one of these two XAVC profiles: XAVC HD Intra CBG (XAVC_HD_INTRA_CBG) or XAVC 4K Intra CBG (XAVC_4K_INTRA_CBG). Specify the amount of space in each frame that the service reserves for ancillary data, such as teletext captions. The default value for this setting is 1492 bytes per frame. This should be sufficient to prevent overflow unless you have multiple pages of teletext captions data. If you have a large amount of teletext data, specify a larger number.
pub fn max_anc_data_size(mut self, input: i32) -> Self {
self.max_anc_data_size = Some(input);
self
}
/// Specify a value for this setting only for outputs that you set up with one of these two XAVC profiles: XAVC HD Intra CBG (XAVC_HD_INTRA_CBG) or XAVC 4K Intra CBG (XAVC_4K_INTRA_CBG). Specify the amount of space in each frame that the service reserves for ancillary data, such as teletext captions. The default value for this setting is 1492 bytes per frame. This should be sufficient to prevent overflow unless you have multiple pages of teletext captions data. If you have a large amount of teletext data, specify a larger number.
pub fn set_max_anc_data_size(mut self, input: std::option::Option<i32>) -> Self {
self.max_anc_data_size = input;
self
}
/// Consumes the builder and constructs a [`MxfXavcProfileSettings`](crate::model::MxfXavcProfileSettings)
pub fn build(self) -> crate::model::MxfXavcProfileSettings {
crate::model::MxfXavcProfileSettings {
duration_mode: self.duration_mode,
max_anc_data_size: self.max_anc_data_size.unwrap_or_default(),
}
}
}
}
impl MxfXavcProfileSettings {
/// Creates a new builder-style object to manufacture [`MxfXavcProfileSettings`](crate::model::MxfXavcProfileSettings)
pub fn builder() -> crate::model::mxf_xavc_profile_settings::Builder {
crate::model::mxf_xavc_profile_settings::Builder::default()
}
}
/// To create an output that complies with the XAVC file format guidelines for interoperability, keep the default value, Drop frames for compliance (DROP_FRAMES_FOR_COMPLIANCE). To include all frames from your input in this output, keep the default setting, Allow any duration (ALLOW_ANY_DURATION). The number of frames that MediaConvert excludes when you set this to Drop frames for compliance depends on the output frame rate and duration.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MxfXavcDurationMode {
#[allow(missing_docs)] // documentation missing in model
AllowAnyDuration,
#[allow(missing_docs)] // documentation missing in model
DropFramesForCompliance,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MxfXavcDurationMode {
fn from(s: &str) -> Self {
match s {
"ALLOW_ANY_DURATION" => MxfXavcDurationMode::AllowAnyDuration,
"DROP_FRAMES_FOR_COMPLIANCE" => MxfXavcDurationMode::DropFramesForCompliance,
other => MxfXavcDurationMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MxfXavcDurationMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MxfXavcDurationMode::from(s))
}
}
impl MxfXavcDurationMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MxfXavcDurationMode::AllowAnyDuration => "ALLOW_ANY_DURATION",
MxfXavcDurationMode::DropFramesForCompliance => "DROP_FRAMES_FOR_COMPLIANCE",
MxfXavcDurationMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALLOW_ANY_DURATION", "DROP_FRAMES_FOR_COMPLIANCE"]
}
}
impl AsRef<str> for MxfXavcDurationMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the MXF profile, also called shim, for this output. When you choose Auto, MediaConvert chooses a profile based on the video codec and resolution. For a list of codecs supported with each MXF profile, see https://docs.aws.amazon.com/mediaconvert/latest/ug/codecs-supported-with-each-mxf-profile.html. For more information about the automatic selection behavior, see https://docs.aws.amazon.com/mediaconvert/latest/ug/default-automatic-selection-of-mxf-profiles.html.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MxfProfile {
#[allow(missing_docs)] // documentation missing in model
D10,
#[allow(missing_docs)] // documentation missing in model
Op1A,
#[allow(missing_docs)] // documentation missing in model
Xavc,
#[allow(missing_docs)] // documentation missing in model
Xdcam,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MxfProfile {
fn from(s: &str) -> Self {
match s {
"D_10" => MxfProfile::D10,
"OP1A" => MxfProfile::Op1A,
"XAVC" => MxfProfile::Xavc,
"XDCAM" => MxfProfile::Xdcam,
other => MxfProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MxfProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MxfProfile::from(s))
}
}
impl MxfProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MxfProfile::D10 => "D_10",
MxfProfile::Op1A => "OP1A",
MxfProfile::Xavc => "XAVC",
MxfProfile::Xdcam => "XDCAM",
MxfProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["D_10", "OP1A", "XAVC", "XDCAM"]
}
}
impl AsRef<str> for MxfProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. When you have AFD signaling set up in your output video stream, use this setting to choose whether to also include it in the MXF wrapper. Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from the video stream for this output to the MXF wrapper. Regardless of which option you choose, the AFD values remain in the video stream. Related settings: To set up your output to include or exclude AFD values, see AfdSignaling, under VideoDescription. On the console, find AFD signaling under the output's video encoding settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MxfAfdSignaling {
#[allow(missing_docs)] // documentation missing in model
CopyFromVideo,
#[allow(missing_docs)] // documentation missing in model
NoCopy,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MxfAfdSignaling {
fn from(s: &str) -> Self {
match s {
"COPY_FROM_VIDEO" => MxfAfdSignaling::CopyFromVideo,
"NO_COPY" => MxfAfdSignaling::NoCopy,
other => MxfAfdSignaling::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MxfAfdSignaling {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MxfAfdSignaling::from(s))
}
}
impl MxfAfdSignaling {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MxfAfdSignaling::CopyFromVideo => "COPY_FROM_VIDEO",
MxfAfdSignaling::NoCopy => "NO_COPY",
MxfAfdSignaling::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["COPY_FROM_VIDEO", "NO_COPY"]
}
}
impl AsRef<str> for MxfAfdSignaling {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// These settings relate to the fragmented MP4 container for the segments in your DASH outputs.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MpdSettings {
/// Optional. Choose Include (INCLUDE) to have MediaConvert mark up your DASH manifest with <accessibility>
/// elements for embedded 608 captions. This markup isn't generally required, but some video players require it to discover and play embedded 608 captions. Keep the default value, Exclude (EXCLUDE), to leave these elements out. When you enable this setting, this is the markup that MediaConvert includes in your manifest:
/// <accessibility schemeiduri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng" />
/// </accessibility>
pub accessibility_caption_hints:
std::option::Option<crate::model::MpdAccessibilityCaptionHints>,
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub audio_duration: std::option::Option<crate::model::MpdAudioDuration>,
/// Use this setting only in DASH output groups that include sidecar TTML or IMSC captions. You specify sidecar captions in a separate output from your audio and video. Choose Raw (RAW) for captions in a single XML file in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for captions in XML format contained within fragmented MP4 files. This set of fragmented MP4 files is separate from your video and audio fragmented MP4 files.
pub caption_container_type: std::option::Option<crate::model::MpdCaptionContainerType>,
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub klv_metadata: std::option::Option<crate::model::MpdKlvMetadata>,
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub scte35_esam: std::option::Option<crate::model::MpdScte35Esam>,
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub scte35_source: std::option::Option<crate::model::MpdScte35Source>,
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub timed_metadata: std::option::Option<crate::model::MpdTimedMetadata>,
}
impl MpdSettings {
/// Optional. Choose Include (INCLUDE) to have MediaConvert mark up your DASH manifest with <accessibility>
/// elements for embedded 608 captions. This markup isn't generally required, but some video players require it to discover and play embedded 608 captions. Keep the default value, Exclude (EXCLUDE), to leave these elements out. When you enable this setting, this is the markup that MediaConvert includes in your manifest:
/// <accessibility schemeiduri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng" />
/// </accessibility>
pub fn accessibility_caption_hints(
&self,
) -> std::option::Option<&crate::model::MpdAccessibilityCaptionHints> {
self.accessibility_caption_hints.as_ref()
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(&self) -> std::option::Option<&crate::model::MpdAudioDuration> {
self.audio_duration.as_ref()
}
/// Use this setting only in DASH output groups that include sidecar TTML or IMSC captions. You specify sidecar captions in a separate output from your audio and video. Choose Raw (RAW) for captions in a single XML file in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for captions in XML format contained within fragmented MP4 files. This set of fragmented MP4 files is separate from your video and audio fragmented MP4 files.
pub fn caption_container_type(
&self,
) -> std::option::Option<&crate::model::MpdCaptionContainerType> {
self.caption_container_type.as_ref()
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn klv_metadata(&self) -> std::option::Option<&crate::model::MpdKlvMetadata> {
self.klv_metadata.as_ref()
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn scte35_esam(&self) -> std::option::Option<&crate::model::MpdScte35Esam> {
self.scte35_esam.as_ref()
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub fn scte35_source(&self) -> std::option::Option<&crate::model::MpdScte35Source> {
self.scte35_source.as_ref()
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub fn timed_metadata(&self) -> std::option::Option<&crate::model::MpdTimedMetadata> {
self.timed_metadata.as_ref()
}
}
impl std::fmt::Debug for MpdSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MpdSettings");
formatter.field(
"accessibility_caption_hints",
&self.accessibility_caption_hints,
);
formatter.field("audio_duration", &self.audio_duration);
formatter.field("caption_container_type", &self.caption_container_type);
formatter.field("klv_metadata", &self.klv_metadata);
formatter.field("scte35_esam", &self.scte35_esam);
formatter.field("scte35_source", &self.scte35_source);
formatter.field("timed_metadata", &self.timed_metadata);
formatter.finish()
}
}
/// See [`MpdSettings`](crate::model::MpdSettings)
pub mod mpd_settings {
/// A builder for [`MpdSettings`](crate::model::MpdSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accessibility_caption_hints:
std::option::Option<crate::model::MpdAccessibilityCaptionHints>,
pub(crate) audio_duration: std::option::Option<crate::model::MpdAudioDuration>,
pub(crate) caption_container_type:
std::option::Option<crate::model::MpdCaptionContainerType>,
pub(crate) klv_metadata: std::option::Option<crate::model::MpdKlvMetadata>,
pub(crate) scte35_esam: std::option::Option<crate::model::MpdScte35Esam>,
pub(crate) scte35_source: std::option::Option<crate::model::MpdScte35Source>,
pub(crate) timed_metadata: std::option::Option<crate::model::MpdTimedMetadata>,
}
impl Builder {
/// Optional. Choose Include (INCLUDE) to have MediaConvert mark up your DASH manifest with <accessibility>
/// elements for embedded 608 captions. This markup isn't generally required, but some video players require it to discover and play embedded 608 captions. Keep the default value, Exclude (EXCLUDE), to leave these elements out. When you enable this setting, this is the markup that MediaConvert includes in your manifest:
/// <accessibility schemeiduri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng" />
/// </accessibility>
pub fn accessibility_caption_hints(
mut self,
input: crate::model::MpdAccessibilityCaptionHints,
) -> Self {
self.accessibility_caption_hints = Some(input);
self
}
/// Optional. Choose Include (INCLUDE) to have MediaConvert mark up your DASH manifest with <accessibility>
/// elements for embedded 608 captions. This markup isn't generally required, but some video players require it to discover and play embedded 608 captions. Keep the default value, Exclude (EXCLUDE), to leave these elements out. When you enable this setting, this is the markup that MediaConvert includes in your manifest:
/// <accessibility schemeiduri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng" />
/// </accessibility>
pub fn set_accessibility_caption_hints(
mut self,
input: std::option::Option<crate::model::MpdAccessibilityCaptionHints>,
) -> Self {
self.accessibility_caption_hints = input;
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(mut self, input: crate::model::MpdAudioDuration) -> Self {
self.audio_duration = Some(input);
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn set_audio_duration(
mut self,
input: std::option::Option<crate::model::MpdAudioDuration>,
) -> Self {
self.audio_duration = input;
self
}
/// Use this setting only in DASH output groups that include sidecar TTML or IMSC captions. You specify sidecar captions in a separate output from your audio and video. Choose Raw (RAW) for captions in a single XML file in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for captions in XML format contained within fragmented MP4 files. This set of fragmented MP4 files is separate from your video and audio fragmented MP4 files.
pub fn caption_container_type(
mut self,
input: crate::model::MpdCaptionContainerType,
) -> Self {
self.caption_container_type = Some(input);
self
}
/// Use this setting only in DASH output groups that include sidecar TTML or IMSC captions. You specify sidecar captions in a separate output from your audio and video. Choose Raw (RAW) for captions in a single XML file in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for captions in XML format contained within fragmented MP4 files. This set of fragmented MP4 files is separate from your video and audio fragmented MP4 files.
pub fn set_caption_container_type(
mut self,
input: std::option::Option<crate::model::MpdCaptionContainerType>,
) -> Self {
self.caption_container_type = input;
self
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn klv_metadata(mut self, input: crate::model::MpdKlvMetadata) -> Self {
self.klv_metadata = Some(input);
self
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn set_klv_metadata(
mut self,
input: std::option::Option<crate::model::MpdKlvMetadata>,
) -> Self {
self.klv_metadata = input;
self
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn scte35_esam(mut self, input: crate::model::MpdScte35Esam) -> Self {
self.scte35_esam = Some(input);
self
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn set_scte35_esam(
mut self,
input: std::option::Option<crate::model::MpdScte35Esam>,
) -> Self {
self.scte35_esam = input;
self
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub fn scte35_source(mut self, input: crate::model::MpdScte35Source) -> Self {
self.scte35_source = Some(input);
self
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub fn set_scte35_source(
mut self,
input: std::option::Option<crate::model::MpdScte35Source>,
) -> Self {
self.scte35_source = input;
self
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub fn timed_metadata(mut self, input: crate::model::MpdTimedMetadata) -> Self {
self.timed_metadata = Some(input);
self
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub fn set_timed_metadata(
mut self,
input: std::option::Option<crate::model::MpdTimedMetadata>,
) -> Self {
self.timed_metadata = input;
self
}
/// Consumes the builder and constructs a [`MpdSettings`](crate::model::MpdSettings)
pub fn build(self) -> crate::model::MpdSettings {
crate::model::MpdSettings {
accessibility_caption_hints: self.accessibility_caption_hints,
audio_duration: self.audio_duration,
caption_container_type: self.caption_container_type,
klv_metadata: self.klv_metadata,
scte35_esam: self.scte35_esam,
scte35_source: self.scte35_source,
timed_metadata: self.timed_metadata,
}
}
}
}
impl MpdSettings {
/// Creates a new builder-style object to manufacture [`MpdSettings`](crate::model::MpdSettings)
pub fn builder() -> crate::model::mpd_settings::Builder {
crate::model::mpd_settings::Builder::default()
}
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdTimedMetadata {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdTimedMetadata {
fn from(s: &str) -> Self {
match s {
"NONE" => MpdTimedMetadata::None,
"PASSTHROUGH" => MpdTimedMetadata::Passthrough,
other => MpdTimedMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdTimedMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdTimedMetadata::from(s))
}
}
impl MpdTimedMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdTimedMetadata::None => "NONE",
MpdTimedMetadata::Passthrough => "PASSTHROUGH",
MpdTimedMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for MpdTimedMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdScte35Source {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdScte35Source {
fn from(s: &str) -> Self {
match s {
"NONE" => MpdScte35Source::None,
"PASSTHROUGH" => MpdScte35Source::Passthrough,
other => MpdScte35Source::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdScte35Source {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdScte35Source::from(s))
}
}
impl MpdScte35Source {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdScte35Source::None => "NONE",
MpdScte35Source::Passthrough => "PASSTHROUGH",
MpdScte35Source::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for MpdScte35Source {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdScte35Esam {
#[allow(missing_docs)] // documentation missing in model
Insert,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdScte35Esam {
fn from(s: &str) -> Self {
match s {
"INSERT" => MpdScte35Esam::Insert,
"NONE" => MpdScte35Esam::None,
other => MpdScte35Esam::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdScte35Esam {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdScte35Esam::from(s))
}
}
impl MpdScte35Esam {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdScte35Esam::Insert => "INSERT",
MpdScte35Esam::None => "NONE",
MpdScte35Esam::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INSERT", "NONE"]
}
}
impl AsRef<str> for MpdScte35Esam {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdKlvMetadata {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdKlvMetadata {
fn from(s: &str) -> Self {
match s {
"NONE" => MpdKlvMetadata::None,
"PASSTHROUGH" => MpdKlvMetadata::Passthrough,
other => MpdKlvMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdKlvMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdKlvMetadata::from(s))
}
}
impl MpdKlvMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdKlvMetadata::None => "NONE",
MpdKlvMetadata::Passthrough => "PASSTHROUGH",
MpdKlvMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for MpdKlvMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting only in DASH output groups that include sidecar TTML or IMSC captions. You specify sidecar captions in a separate output from your audio and video. Choose Raw (RAW) for captions in a single XML file in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for captions in XML format contained within fragmented MP4 files. This set of fragmented MP4 files is separate from your video and audio fragmented MP4 files.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdCaptionContainerType {
#[allow(missing_docs)] // documentation missing in model
FragmentedMp4,
#[allow(missing_docs)] // documentation missing in model
Raw,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdCaptionContainerType {
fn from(s: &str) -> Self {
match s {
"FRAGMENTED_MP4" => MpdCaptionContainerType::FragmentedMp4,
"RAW" => MpdCaptionContainerType::Raw,
other => MpdCaptionContainerType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdCaptionContainerType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdCaptionContainerType::from(s))
}
}
impl MpdCaptionContainerType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdCaptionContainerType::FragmentedMp4 => "FRAGMENTED_MP4",
MpdCaptionContainerType::Raw => "RAW",
MpdCaptionContainerType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FRAGMENTED_MP4", "RAW"]
}
}
impl AsRef<str> for MpdCaptionContainerType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdAudioDuration {
#[allow(missing_docs)] // documentation missing in model
DefaultCodecDuration,
#[allow(missing_docs)] // documentation missing in model
MatchVideoDuration,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdAudioDuration {
fn from(s: &str) -> Self {
match s {
"DEFAULT_CODEC_DURATION" => MpdAudioDuration::DefaultCodecDuration,
"MATCH_VIDEO_DURATION" => MpdAudioDuration::MatchVideoDuration,
other => MpdAudioDuration::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdAudioDuration {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdAudioDuration::from(s))
}
}
impl MpdAudioDuration {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdAudioDuration::DefaultCodecDuration => "DEFAULT_CODEC_DURATION",
MpdAudioDuration::MatchVideoDuration => "MATCH_VIDEO_DURATION",
MpdAudioDuration::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT_CODEC_DURATION", "MATCH_VIDEO_DURATION"]
}
}
impl AsRef<str> for MpdAudioDuration {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Choose Include (INCLUDE) to have MediaConvert mark up your DASH manifest with <Accessibility> elements for embedded 608 captions. This markup isn't generally required, but some video players require it to discover and play embedded 608 captions. Keep the default value, Exclude (EXCLUDE), to leave these elements out. When you enable this setting, this is the markup that MediaConvert includes in your manifest: <Accessibility schemeIdUri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng"/>
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MpdAccessibilityCaptionHints {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MpdAccessibilityCaptionHints {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => MpdAccessibilityCaptionHints::Exclude,
"INCLUDE" => MpdAccessibilityCaptionHints::Include,
other => MpdAccessibilityCaptionHints::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MpdAccessibilityCaptionHints {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MpdAccessibilityCaptionHints::from(s))
}
}
impl MpdAccessibilityCaptionHints {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MpdAccessibilityCaptionHints::Exclude => "EXCLUDE",
MpdAccessibilityCaptionHints::Include => "INCLUDE",
MpdAccessibilityCaptionHints::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for MpdAccessibilityCaptionHints {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// These settings relate to your MP4 output container. You can create audio only outputs with this container. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-codecs-containers-audio-only.html#output-codecs-and-containers-supported-for-audio-only.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Mp4Settings {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub audio_duration: std::option::Option<crate::model::CmfcAudioDuration>,
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub cslg_atom: std::option::Option<crate::model::Mp4CslgAtom>,
/// Ignore this setting unless compliance to the CTTS box version specification matters in your workflow. Specify a value of 1 to set your CTTS box version to 1 and make your output compliant with the specification. When you specify a value of 1, you must also set CSLG atom (cslgAtom) to the value INCLUDE. Keep the default value 0 to set your CTTS box version to 0. This can provide backward compatibility for some players and packagers.
pub ctts_version: i32,
/// Inserts a free-space box immediately after the moov box.
pub free_space_box: std::option::Option<crate::model::Mp4FreeSpaceBox>,
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub moov_placement: std::option::Option<crate::model::Mp4MoovPlacement>,
/// Overrides the "Major Brand" field in the output file. Usually not necessary to specify.
pub mp4_major_brand: std::option::Option<std::string::String>,
}
impl Mp4Settings {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(&self) -> std::option::Option<&crate::model::CmfcAudioDuration> {
self.audio_duration.as_ref()
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub fn cslg_atom(&self) -> std::option::Option<&crate::model::Mp4CslgAtom> {
self.cslg_atom.as_ref()
}
/// Ignore this setting unless compliance to the CTTS box version specification matters in your workflow. Specify a value of 1 to set your CTTS box version to 1 and make your output compliant with the specification. When you specify a value of 1, you must also set CSLG atom (cslgAtom) to the value INCLUDE. Keep the default value 0 to set your CTTS box version to 0. This can provide backward compatibility for some players and packagers.
pub fn ctts_version(&self) -> i32 {
self.ctts_version
}
/// Inserts a free-space box immediately after the moov box.
pub fn free_space_box(&self) -> std::option::Option<&crate::model::Mp4FreeSpaceBox> {
self.free_space_box.as_ref()
}
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub fn moov_placement(&self) -> std::option::Option<&crate::model::Mp4MoovPlacement> {
self.moov_placement.as_ref()
}
/// Overrides the "Major Brand" field in the output file. Usually not necessary to specify.
pub fn mp4_major_brand(&self) -> std::option::Option<&str> {
self.mp4_major_brand.as_deref()
}
}
impl std::fmt::Debug for Mp4Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Mp4Settings");
formatter.field("audio_duration", &self.audio_duration);
formatter.field("cslg_atom", &self.cslg_atom);
formatter.field("ctts_version", &self.ctts_version);
formatter.field("free_space_box", &self.free_space_box);
formatter.field("moov_placement", &self.moov_placement);
formatter.field("mp4_major_brand", &self.mp4_major_brand);
formatter.finish()
}
}
/// See [`Mp4Settings`](crate::model::Mp4Settings)
pub mod mp4_settings {
/// A builder for [`Mp4Settings`](crate::model::Mp4Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_duration: std::option::Option<crate::model::CmfcAudioDuration>,
pub(crate) cslg_atom: std::option::Option<crate::model::Mp4CslgAtom>,
pub(crate) ctts_version: std::option::Option<i32>,
pub(crate) free_space_box: std::option::Option<crate::model::Mp4FreeSpaceBox>,
pub(crate) moov_placement: std::option::Option<crate::model::Mp4MoovPlacement>,
pub(crate) mp4_major_brand: std::option::Option<std::string::String>,
}
impl Builder {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(mut self, input: crate::model::CmfcAudioDuration) -> Self {
self.audio_duration = Some(input);
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn set_audio_duration(
mut self,
input: std::option::Option<crate::model::CmfcAudioDuration>,
) -> Self {
self.audio_duration = input;
self
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub fn cslg_atom(mut self, input: crate::model::Mp4CslgAtom) -> Self {
self.cslg_atom = Some(input);
self
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub fn set_cslg_atom(
mut self,
input: std::option::Option<crate::model::Mp4CslgAtom>,
) -> Self {
self.cslg_atom = input;
self
}
/// Ignore this setting unless compliance to the CTTS box version specification matters in your workflow. Specify a value of 1 to set your CTTS box version to 1 and make your output compliant with the specification. When you specify a value of 1, you must also set CSLG atom (cslgAtom) to the value INCLUDE. Keep the default value 0 to set your CTTS box version to 0. This can provide backward compatibility for some players and packagers.
pub fn ctts_version(mut self, input: i32) -> Self {
self.ctts_version = Some(input);
self
}
/// Ignore this setting unless compliance to the CTTS box version specification matters in your workflow. Specify a value of 1 to set your CTTS box version to 1 and make your output compliant with the specification. When you specify a value of 1, you must also set CSLG atom (cslgAtom) to the value INCLUDE. Keep the default value 0 to set your CTTS box version to 0. This can provide backward compatibility for some players and packagers.
pub fn set_ctts_version(mut self, input: std::option::Option<i32>) -> Self {
self.ctts_version = input;
self
}
/// Inserts a free-space box immediately after the moov box.
pub fn free_space_box(mut self, input: crate::model::Mp4FreeSpaceBox) -> Self {
self.free_space_box = Some(input);
self
}
/// Inserts a free-space box immediately after the moov box.
pub fn set_free_space_box(
mut self,
input: std::option::Option<crate::model::Mp4FreeSpaceBox>,
) -> Self {
self.free_space_box = input;
self
}
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub fn moov_placement(mut self, input: crate::model::Mp4MoovPlacement) -> Self {
self.moov_placement = Some(input);
self
}
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub fn set_moov_placement(
mut self,
input: std::option::Option<crate::model::Mp4MoovPlacement>,
) -> Self {
self.moov_placement = input;
self
}
/// Overrides the "Major Brand" field in the output file. Usually not necessary to specify.
pub fn mp4_major_brand(mut self, input: impl Into<std::string::String>) -> Self {
self.mp4_major_brand = Some(input.into());
self
}
/// Overrides the "Major Brand" field in the output file. Usually not necessary to specify.
pub fn set_mp4_major_brand(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.mp4_major_brand = input;
self
}
/// Consumes the builder and constructs a [`Mp4Settings`](crate::model::Mp4Settings)
pub fn build(self) -> crate::model::Mp4Settings {
crate::model::Mp4Settings {
audio_duration: self.audio_duration,
cslg_atom: self.cslg_atom,
ctts_version: self.ctts_version.unwrap_or_default(),
free_space_box: self.free_space_box,
moov_placement: self.moov_placement,
mp4_major_brand: self.mp4_major_brand,
}
}
}
}
impl Mp4Settings {
/// Creates a new builder-style object to manufacture [`Mp4Settings`](crate::model::Mp4Settings)
pub fn builder() -> crate::model::mp4_settings::Builder {
crate::model::mp4_settings::Builder::default()
}
}
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mp4MoovPlacement {
#[allow(missing_docs)] // documentation missing in model
Normal,
#[allow(missing_docs)] // documentation missing in model
ProgressiveDownload,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mp4MoovPlacement {
fn from(s: &str) -> Self {
match s {
"NORMAL" => Mp4MoovPlacement::Normal,
"PROGRESSIVE_DOWNLOAD" => Mp4MoovPlacement::ProgressiveDownload,
other => Mp4MoovPlacement::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mp4MoovPlacement {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mp4MoovPlacement::from(s))
}
}
impl Mp4MoovPlacement {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mp4MoovPlacement::Normal => "NORMAL",
Mp4MoovPlacement::ProgressiveDownload => "PROGRESSIVE_DOWNLOAD",
Mp4MoovPlacement::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NORMAL", "PROGRESSIVE_DOWNLOAD"]
}
}
impl AsRef<str> for Mp4MoovPlacement {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Inserts a free-space box immediately after the moov box.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mp4FreeSpaceBox {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mp4FreeSpaceBox {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => Mp4FreeSpaceBox::Exclude,
"INCLUDE" => Mp4FreeSpaceBox::Include,
other => Mp4FreeSpaceBox::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mp4FreeSpaceBox {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mp4FreeSpaceBox::from(s))
}
}
impl Mp4FreeSpaceBox {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mp4FreeSpaceBox::Exclude => "EXCLUDE",
Mp4FreeSpaceBox::Include => "INCLUDE",
Mp4FreeSpaceBox::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for Mp4FreeSpaceBox {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mp4CslgAtom {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mp4CslgAtom {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => Mp4CslgAtom::Exclude,
"INCLUDE" => Mp4CslgAtom::Include,
other => Mp4CslgAtom::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mp4CslgAtom {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mp4CslgAtom::from(s))
}
}
impl Mp4CslgAtom {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mp4CslgAtom::Exclude => "EXCLUDE",
Mp4CslgAtom::Include => "INCLUDE",
Mp4CslgAtom::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for Mp4CslgAtom {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcAudioDuration {
#[allow(missing_docs)] // documentation missing in model
DefaultCodecDuration,
#[allow(missing_docs)] // documentation missing in model
MatchVideoDuration,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcAudioDuration {
fn from(s: &str) -> Self {
match s {
"DEFAULT_CODEC_DURATION" => CmfcAudioDuration::DefaultCodecDuration,
"MATCH_VIDEO_DURATION" => CmfcAudioDuration::MatchVideoDuration,
other => CmfcAudioDuration::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcAudioDuration {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcAudioDuration::from(s))
}
}
impl CmfcAudioDuration {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcAudioDuration::DefaultCodecDuration => "DEFAULT_CODEC_DURATION",
CmfcAudioDuration::MatchVideoDuration => "MATCH_VIDEO_DURATION",
CmfcAudioDuration::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT_CODEC_DURATION", "MATCH_VIDEO_DURATION"]
}
}
impl AsRef<str> for CmfcAudioDuration {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// These settings relate to your QuickTime MOV output container.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MovSettings {
/// When enabled, include 'clap' atom if appropriate for the video output settings.
pub clap_atom: std::option::Option<crate::model::MovClapAtom>,
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub cslg_atom: std::option::Option<crate::model::MovCslgAtom>,
/// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using XDCAM fourcc codes. This increases compatibility with Apple editors and players, but may decrease compatibility with other players. Only applicable when the video codec is MPEG2.
pub mpeg2_four_cc_control: std::option::Option<crate::model::MovMpeg2FourCcControl>,
/// To make this output compatible with Omenon, keep the default value, OMNEON. Unless you need Omneon compatibility, set this value to NONE. When you keep the default value, OMNEON, MediaConvert increases the length of the edit list atom. This might cause file rejections when a recipient of the output file doesn't expct this extra padding.
pub padding_control: std::option::Option<crate::model::MovPaddingControl>,
/// Always keep the default value (SELF_CONTAINED) for this setting.
pub reference: std::option::Option<crate::model::MovReference>,
}
impl MovSettings {
/// When enabled, include 'clap' atom if appropriate for the video output settings.
pub fn clap_atom(&self) -> std::option::Option<&crate::model::MovClapAtom> {
self.clap_atom.as_ref()
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub fn cslg_atom(&self) -> std::option::Option<&crate::model::MovCslgAtom> {
self.cslg_atom.as_ref()
}
/// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using XDCAM fourcc codes. This increases compatibility with Apple editors and players, but may decrease compatibility with other players. Only applicable when the video codec is MPEG2.
pub fn mpeg2_four_cc_control(
&self,
) -> std::option::Option<&crate::model::MovMpeg2FourCcControl> {
self.mpeg2_four_cc_control.as_ref()
}
/// To make this output compatible with Omenon, keep the default value, OMNEON. Unless you need Omneon compatibility, set this value to NONE. When you keep the default value, OMNEON, MediaConvert increases the length of the edit list atom. This might cause file rejections when a recipient of the output file doesn't expct this extra padding.
pub fn padding_control(&self) -> std::option::Option<&crate::model::MovPaddingControl> {
self.padding_control.as_ref()
}
/// Always keep the default value (SELF_CONTAINED) for this setting.
pub fn reference(&self) -> std::option::Option<&crate::model::MovReference> {
self.reference.as_ref()
}
}
impl std::fmt::Debug for MovSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MovSettings");
formatter.field("clap_atom", &self.clap_atom);
formatter.field("cslg_atom", &self.cslg_atom);
formatter.field("mpeg2_four_cc_control", &self.mpeg2_four_cc_control);
formatter.field("padding_control", &self.padding_control);
formatter.field("reference", &self.reference);
formatter.finish()
}
}
/// See [`MovSettings`](crate::model::MovSettings)
pub mod mov_settings {
/// A builder for [`MovSettings`](crate::model::MovSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) clap_atom: std::option::Option<crate::model::MovClapAtom>,
pub(crate) cslg_atom: std::option::Option<crate::model::MovCslgAtom>,
pub(crate) mpeg2_four_cc_control: std::option::Option<crate::model::MovMpeg2FourCcControl>,
pub(crate) padding_control: std::option::Option<crate::model::MovPaddingControl>,
pub(crate) reference: std::option::Option<crate::model::MovReference>,
}
impl Builder {
/// When enabled, include 'clap' atom if appropriate for the video output settings.
pub fn clap_atom(mut self, input: crate::model::MovClapAtom) -> Self {
self.clap_atom = Some(input);
self
}
/// When enabled, include 'clap' atom if appropriate for the video output settings.
pub fn set_clap_atom(
mut self,
input: std::option::Option<crate::model::MovClapAtom>,
) -> Self {
self.clap_atom = input;
self
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub fn cslg_atom(mut self, input: crate::model::MovCslgAtom) -> Self {
self.cslg_atom = Some(input);
self
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
pub fn set_cslg_atom(
mut self,
input: std::option::Option<crate::model::MovCslgAtom>,
) -> Self {
self.cslg_atom = input;
self
}
/// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using XDCAM fourcc codes. This increases compatibility with Apple editors and players, but may decrease compatibility with other players. Only applicable when the video codec is MPEG2.
pub fn mpeg2_four_cc_control(mut self, input: crate::model::MovMpeg2FourCcControl) -> Self {
self.mpeg2_four_cc_control = Some(input);
self
}
/// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using XDCAM fourcc codes. This increases compatibility with Apple editors and players, but may decrease compatibility with other players. Only applicable when the video codec is MPEG2.
pub fn set_mpeg2_four_cc_control(
mut self,
input: std::option::Option<crate::model::MovMpeg2FourCcControl>,
) -> Self {
self.mpeg2_four_cc_control = input;
self
}
/// To make this output compatible with Omenon, keep the default value, OMNEON. Unless you need Omneon compatibility, set this value to NONE. When you keep the default value, OMNEON, MediaConvert increases the length of the edit list atom. This might cause file rejections when a recipient of the output file doesn't expct this extra padding.
pub fn padding_control(mut self, input: crate::model::MovPaddingControl) -> Self {
self.padding_control = Some(input);
self
}
/// To make this output compatible with Omenon, keep the default value, OMNEON. Unless you need Omneon compatibility, set this value to NONE. When you keep the default value, OMNEON, MediaConvert increases the length of the edit list atom. This might cause file rejections when a recipient of the output file doesn't expct this extra padding.
pub fn set_padding_control(
mut self,
input: std::option::Option<crate::model::MovPaddingControl>,
) -> Self {
self.padding_control = input;
self
}
/// Always keep the default value (SELF_CONTAINED) for this setting.
pub fn reference(mut self, input: crate::model::MovReference) -> Self {
self.reference = Some(input);
self
}
/// Always keep the default value (SELF_CONTAINED) for this setting.
pub fn set_reference(
mut self,
input: std::option::Option<crate::model::MovReference>,
) -> Self {
self.reference = input;
self
}
/// Consumes the builder and constructs a [`MovSettings`](crate::model::MovSettings)
pub fn build(self) -> crate::model::MovSettings {
crate::model::MovSettings {
clap_atom: self.clap_atom,
cslg_atom: self.cslg_atom,
mpeg2_four_cc_control: self.mpeg2_four_cc_control,
padding_control: self.padding_control,
reference: self.reference,
}
}
}
}
impl MovSettings {
/// Creates a new builder-style object to manufacture [`MovSettings`](crate::model::MovSettings)
pub fn builder() -> crate::model::mov_settings::Builder {
crate::model::mov_settings::Builder::default()
}
}
/// Always keep the default value (SELF_CONTAINED) for this setting.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MovReference {
#[allow(missing_docs)] // documentation missing in model
External,
#[allow(missing_docs)] // documentation missing in model
SelfContained,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MovReference {
fn from(s: &str) -> Self {
match s {
"EXTERNAL" => MovReference::External,
"SELF_CONTAINED" => MovReference::SelfContained,
other => MovReference::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MovReference {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MovReference::from(s))
}
}
impl MovReference {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MovReference::External => "EXTERNAL",
MovReference::SelfContained => "SELF_CONTAINED",
MovReference::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXTERNAL", "SELF_CONTAINED"]
}
}
impl AsRef<str> for MovReference {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// To make this output compatible with Omenon, keep the default value, OMNEON. Unless you need Omneon compatibility, set this value to NONE. When you keep the default value, OMNEON, MediaConvert increases the length of the edit list atom. This might cause file rejections when a recipient of the output file doesn't expct this extra padding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MovPaddingControl {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Omneon,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MovPaddingControl {
fn from(s: &str) -> Self {
match s {
"NONE" => MovPaddingControl::None,
"OMNEON" => MovPaddingControl::Omneon,
other => MovPaddingControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MovPaddingControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MovPaddingControl::from(s))
}
}
impl MovPaddingControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MovPaddingControl::None => "NONE",
MovPaddingControl::Omneon => "OMNEON",
MovPaddingControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "OMNEON"]
}
}
impl AsRef<str> for MovPaddingControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using XDCAM fourcc codes. This increases compatibility with Apple editors and players, but may decrease compatibility with other players. Only applicable when the video codec is MPEG2.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MovMpeg2FourCcControl {
#[allow(missing_docs)] // documentation missing in model
Mpeg,
#[allow(missing_docs)] // documentation missing in model
Xdcam,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MovMpeg2FourCcControl {
fn from(s: &str) -> Self {
match s {
"MPEG" => MovMpeg2FourCcControl::Mpeg,
"XDCAM" => MovMpeg2FourCcControl::Xdcam,
other => MovMpeg2FourCcControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MovMpeg2FourCcControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MovMpeg2FourCcControl::from(s))
}
}
impl MovMpeg2FourCcControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MovMpeg2FourCcControl::Mpeg => "MPEG",
MovMpeg2FourCcControl::Xdcam => "XDCAM",
MovMpeg2FourCcControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MPEG", "XDCAM"]
}
}
impl AsRef<str> for MovMpeg2FourCcControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample) box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1 amendment 1. This improves compatibility with Apple players and tools.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MovCslgAtom {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MovCslgAtom {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => MovCslgAtom::Exclude,
"INCLUDE" => MovCslgAtom::Include,
other => MovCslgAtom::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MovCslgAtom {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MovCslgAtom::from(s))
}
}
impl MovCslgAtom {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MovCslgAtom::Exclude => "EXCLUDE",
MovCslgAtom::Include => "INCLUDE",
MovCslgAtom::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for MovCslgAtom {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When enabled, include 'clap' atom if appropriate for the video output settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MovClapAtom {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MovClapAtom {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => MovClapAtom::Exclude,
"INCLUDE" => MovClapAtom::Include,
other => MovClapAtom::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MovClapAtom {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MovClapAtom::from(s))
}
}
impl MovClapAtom {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MovClapAtom::Exclude => "EXCLUDE",
MovClapAtom::Include => "INCLUDE",
MovClapAtom::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for MovClapAtom {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// These settings relate to the MPEG-2 transport stream (MPEG2-TS) container for the MPEG2-TS segments in your HLS outputs.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct M3u8Settings {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub audio_duration: std::option::Option<crate::model::M3u8AudioDuration>,
/// The number of audio frames to insert for each PES packet.
pub audio_frames_per_pes: i32,
/// Packet Identifier (PID) of the elementary audio stream(s) in the transport stream. Multiple values are accepted, and can be entered in ranges and/or by comma separation.
pub audio_pids: std::option::Option<std::vec::Vec<i32>>,
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub data_pts_control: std::option::Option<crate::model::M3u8DataPtsControl>,
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub max_pcr_interval: i32,
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub nielsen_id3: std::option::Option<crate::model::M3u8NielsenId3>,
/// The number of milliseconds between instances of this table in the output transport stream.
pub pat_interval: i32,
/// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This parameter is effective only when the PCR PID is the same as the video or audio elementary stream.
pub pcr_control: std::option::Option<crate::model::M3u8PcrControl>,
/// Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport stream. When no value is given, the encoder will assign the same value as the Video PID.
pub pcr_pid: i32,
/// The number of milliseconds between instances of this table in the output transport stream.
pub pmt_interval: i32,
/// Packet Identifier (PID) for the Program Map Table (PMT) in the transport stream.
pub pmt_pid: i32,
/// Packet Identifier (PID) of the private metadata stream in the transport stream.
pub private_metadata_pid: i32,
/// The value of the program number field in the Program Map Table.
pub program_number: i32,
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
pub scte35_pid: i32,
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE) if you don't want manifest conditioning. Choose Passthrough (PASSTHROUGH) and choose Ad markers (adMarkers) if you do want manifest conditioning. In both cases, also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml).
pub scte35_source: std::option::Option<crate::model::M3u8Scte35Source>,
/// Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH) to include ID3 metadata in this output. This includes ID3 metadata from the following features: ID3 timestamp period (timedMetadataId3Period), and Custom ID3 metadata inserter (timedMetadataInsertion). To exclude this ID3 metadata in this output: set ID3 metadata to None (NONE) or leave blank.
pub timed_metadata: std::option::Option<crate::model::TimedMetadata>,
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub timed_metadata_pid: i32,
/// The value of the transport stream ID field in the Program Map Table.
pub transport_stream_id: i32,
/// Packet Identifier (PID) of the elementary video stream in the transport stream.
pub video_pid: i32,
}
impl M3u8Settings {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(&self) -> std::option::Option<&crate::model::M3u8AudioDuration> {
self.audio_duration.as_ref()
}
/// The number of audio frames to insert for each PES packet.
pub fn audio_frames_per_pes(&self) -> i32 {
self.audio_frames_per_pes
}
/// Packet Identifier (PID) of the elementary audio stream(s) in the transport stream. Multiple values are accepted, and can be entered in ranges and/or by comma separation.
pub fn audio_pids(&self) -> std::option::Option<&[i32]> {
self.audio_pids.as_deref()
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub fn data_pts_control(&self) -> std::option::Option<&crate::model::M3u8DataPtsControl> {
self.data_pts_control.as_ref()
}
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub fn max_pcr_interval(&self) -> i32 {
self.max_pcr_interval
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub fn nielsen_id3(&self) -> std::option::Option<&crate::model::M3u8NielsenId3> {
self.nielsen_id3.as_ref()
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn pat_interval(&self) -> i32 {
self.pat_interval
}
/// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This parameter is effective only when the PCR PID is the same as the video or audio elementary stream.
pub fn pcr_control(&self) -> std::option::Option<&crate::model::M3u8PcrControl> {
self.pcr_control.as_ref()
}
/// Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport stream. When no value is given, the encoder will assign the same value as the Video PID.
pub fn pcr_pid(&self) -> i32 {
self.pcr_pid
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn pmt_interval(&self) -> i32 {
self.pmt_interval
}
/// Packet Identifier (PID) for the Program Map Table (PMT) in the transport stream.
pub fn pmt_pid(&self) -> i32 {
self.pmt_pid
}
/// Packet Identifier (PID) of the private metadata stream in the transport stream.
pub fn private_metadata_pid(&self) -> i32 {
self.private_metadata_pid
}
/// The value of the program number field in the Program Map Table.
pub fn program_number(&self) -> i32 {
self.program_number
}
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
pub fn scte35_pid(&self) -> i32 {
self.scte35_pid
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE) if you don't want manifest conditioning. Choose Passthrough (PASSTHROUGH) and choose Ad markers (adMarkers) if you do want manifest conditioning. In both cases, also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml).
pub fn scte35_source(&self) -> std::option::Option<&crate::model::M3u8Scte35Source> {
self.scte35_source.as_ref()
}
/// Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH) to include ID3 metadata in this output. This includes ID3 metadata from the following features: ID3 timestamp period (timedMetadataId3Period), and Custom ID3 metadata inserter (timedMetadataInsertion). To exclude this ID3 metadata in this output: set ID3 metadata to None (NONE) or leave blank.
pub fn timed_metadata(&self) -> std::option::Option<&crate::model::TimedMetadata> {
self.timed_metadata.as_ref()
}
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub fn timed_metadata_pid(&self) -> i32 {
self.timed_metadata_pid
}
/// The value of the transport stream ID field in the Program Map Table.
pub fn transport_stream_id(&self) -> i32 {
self.transport_stream_id
}
/// Packet Identifier (PID) of the elementary video stream in the transport stream.
pub fn video_pid(&self) -> i32 {
self.video_pid
}
}
impl std::fmt::Debug for M3u8Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("M3u8Settings");
formatter.field("audio_duration", &self.audio_duration);
formatter.field("audio_frames_per_pes", &self.audio_frames_per_pes);
formatter.field("audio_pids", &self.audio_pids);
formatter.field("data_pts_control", &self.data_pts_control);
formatter.field("max_pcr_interval", &self.max_pcr_interval);
formatter.field("nielsen_id3", &self.nielsen_id3);
formatter.field("pat_interval", &self.pat_interval);
formatter.field("pcr_control", &self.pcr_control);
formatter.field("pcr_pid", &self.pcr_pid);
formatter.field("pmt_interval", &self.pmt_interval);
formatter.field("pmt_pid", &self.pmt_pid);
formatter.field("private_metadata_pid", &self.private_metadata_pid);
formatter.field("program_number", &self.program_number);
formatter.field("scte35_pid", &self.scte35_pid);
formatter.field("scte35_source", &self.scte35_source);
formatter.field("timed_metadata", &self.timed_metadata);
formatter.field("timed_metadata_pid", &self.timed_metadata_pid);
formatter.field("transport_stream_id", &self.transport_stream_id);
formatter.field("video_pid", &self.video_pid);
formatter.finish()
}
}
/// See [`M3u8Settings`](crate::model::M3u8Settings)
pub mod m3u8_settings {
/// A builder for [`M3u8Settings`](crate::model::M3u8Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_duration: std::option::Option<crate::model::M3u8AudioDuration>,
pub(crate) audio_frames_per_pes: std::option::Option<i32>,
pub(crate) audio_pids: std::option::Option<std::vec::Vec<i32>>,
pub(crate) data_pts_control: std::option::Option<crate::model::M3u8DataPtsControl>,
pub(crate) max_pcr_interval: std::option::Option<i32>,
pub(crate) nielsen_id3: std::option::Option<crate::model::M3u8NielsenId3>,
pub(crate) pat_interval: std::option::Option<i32>,
pub(crate) pcr_control: std::option::Option<crate::model::M3u8PcrControl>,
pub(crate) pcr_pid: std::option::Option<i32>,
pub(crate) pmt_interval: std::option::Option<i32>,
pub(crate) pmt_pid: std::option::Option<i32>,
pub(crate) private_metadata_pid: std::option::Option<i32>,
pub(crate) program_number: std::option::Option<i32>,
pub(crate) scte35_pid: std::option::Option<i32>,
pub(crate) scte35_source: std::option::Option<crate::model::M3u8Scte35Source>,
pub(crate) timed_metadata: std::option::Option<crate::model::TimedMetadata>,
pub(crate) timed_metadata_pid: std::option::Option<i32>,
pub(crate) transport_stream_id: std::option::Option<i32>,
pub(crate) video_pid: std::option::Option<i32>,
}
impl Builder {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(mut self, input: crate::model::M3u8AudioDuration) -> Self {
self.audio_duration = Some(input);
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn set_audio_duration(
mut self,
input: std::option::Option<crate::model::M3u8AudioDuration>,
) -> Self {
self.audio_duration = input;
self
}
/// The number of audio frames to insert for each PES packet.
pub fn audio_frames_per_pes(mut self, input: i32) -> Self {
self.audio_frames_per_pes = Some(input);
self
}
/// The number of audio frames to insert for each PES packet.
pub fn set_audio_frames_per_pes(mut self, input: std::option::Option<i32>) -> Self {
self.audio_frames_per_pes = input;
self
}
/// Appends an item to `audio_pids`.
///
/// To override the contents of this collection use [`set_audio_pids`](Self::set_audio_pids).
///
/// Packet Identifier (PID) of the elementary audio stream(s) in the transport stream. Multiple values are accepted, and can be entered in ranges and/or by comma separation.
pub fn audio_pids(mut self, input: i32) -> Self {
let mut v = self.audio_pids.unwrap_or_default();
v.push(input);
self.audio_pids = Some(v);
self
}
/// Packet Identifier (PID) of the elementary audio stream(s) in the transport stream. Multiple values are accepted, and can be entered in ranges and/or by comma separation.
pub fn set_audio_pids(mut self, input: std::option::Option<std::vec::Vec<i32>>) -> Self {
self.audio_pids = input;
self
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub fn data_pts_control(mut self, input: crate::model::M3u8DataPtsControl) -> Self {
self.data_pts_control = Some(input);
self
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub fn set_data_pts_control(
mut self,
input: std::option::Option<crate::model::M3u8DataPtsControl>,
) -> Self {
self.data_pts_control = input;
self
}
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub fn max_pcr_interval(mut self, input: i32) -> Self {
self.max_pcr_interval = Some(input);
self
}
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub fn set_max_pcr_interval(mut self, input: std::option::Option<i32>) -> Self {
self.max_pcr_interval = input;
self
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub fn nielsen_id3(mut self, input: crate::model::M3u8NielsenId3) -> Self {
self.nielsen_id3 = Some(input);
self
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub fn set_nielsen_id3(
mut self,
input: std::option::Option<crate::model::M3u8NielsenId3>,
) -> Self {
self.nielsen_id3 = input;
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn pat_interval(mut self, input: i32) -> Self {
self.pat_interval = Some(input);
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn set_pat_interval(mut self, input: std::option::Option<i32>) -> Self {
self.pat_interval = input;
self
}
/// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This parameter is effective only when the PCR PID is the same as the video or audio elementary stream.
pub fn pcr_control(mut self, input: crate::model::M3u8PcrControl) -> Self {
self.pcr_control = Some(input);
self
}
/// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This parameter is effective only when the PCR PID is the same as the video or audio elementary stream.
pub fn set_pcr_control(
mut self,
input: std::option::Option<crate::model::M3u8PcrControl>,
) -> Self {
self.pcr_control = input;
self
}
/// Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport stream. When no value is given, the encoder will assign the same value as the Video PID.
pub fn pcr_pid(mut self, input: i32) -> Self {
self.pcr_pid = Some(input);
self
}
/// Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport stream. When no value is given, the encoder will assign the same value as the Video PID.
pub fn set_pcr_pid(mut self, input: std::option::Option<i32>) -> Self {
self.pcr_pid = input;
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn pmt_interval(mut self, input: i32) -> Self {
self.pmt_interval = Some(input);
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn set_pmt_interval(mut self, input: std::option::Option<i32>) -> Self {
self.pmt_interval = input;
self
}
/// Packet Identifier (PID) for the Program Map Table (PMT) in the transport stream.
pub fn pmt_pid(mut self, input: i32) -> Self {
self.pmt_pid = Some(input);
self
}
/// Packet Identifier (PID) for the Program Map Table (PMT) in the transport stream.
pub fn set_pmt_pid(mut self, input: std::option::Option<i32>) -> Self {
self.pmt_pid = input;
self
}
/// Packet Identifier (PID) of the private metadata stream in the transport stream.
pub fn private_metadata_pid(mut self, input: i32) -> Self {
self.private_metadata_pid = Some(input);
self
}
/// Packet Identifier (PID) of the private metadata stream in the transport stream.
pub fn set_private_metadata_pid(mut self, input: std::option::Option<i32>) -> Self {
self.private_metadata_pid = input;
self
}
/// The value of the program number field in the Program Map Table.
pub fn program_number(mut self, input: i32) -> Self {
self.program_number = Some(input);
self
}
/// The value of the program number field in the Program Map Table.
pub fn set_program_number(mut self, input: std::option::Option<i32>) -> Self {
self.program_number = input;
self
}
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
pub fn scte35_pid(mut self, input: i32) -> Self {
self.scte35_pid = Some(input);
self
}
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
pub fn set_scte35_pid(mut self, input: std::option::Option<i32>) -> Self {
self.scte35_pid = input;
self
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE) if you don't want manifest conditioning. Choose Passthrough (PASSTHROUGH) and choose Ad markers (adMarkers) if you do want manifest conditioning. In both cases, also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml).
pub fn scte35_source(mut self, input: crate::model::M3u8Scte35Source) -> Self {
self.scte35_source = Some(input);
self
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE) if you don't want manifest conditioning. Choose Passthrough (PASSTHROUGH) and choose Ad markers (adMarkers) if you do want manifest conditioning. In both cases, also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml).
pub fn set_scte35_source(
mut self,
input: std::option::Option<crate::model::M3u8Scte35Source>,
) -> Self {
self.scte35_source = input;
self
}
/// Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH) to include ID3 metadata in this output. This includes ID3 metadata from the following features: ID3 timestamp period (timedMetadataId3Period), and Custom ID3 metadata inserter (timedMetadataInsertion). To exclude this ID3 metadata in this output: set ID3 metadata to None (NONE) or leave blank.
pub fn timed_metadata(mut self, input: crate::model::TimedMetadata) -> Self {
self.timed_metadata = Some(input);
self
}
/// Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH) to include ID3 metadata in this output. This includes ID3 metadata from the following features: ID3 timestamp period (timedMetadataId3Period), and Custom ID3 metadata inserter (timedMetadataInsertion). To exclude this ID3 metadata in this output: set ID3 metadata to None (NONE) or leave blank.
pub fn set_timed_metadata(
mut self,
input: std::option::Option<crate::model::TimedMetadata>,
) -> Self {
self.timed_metadata = input;
self
}
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub fn timed_metadata_pid(mut self, input: i32) -> Self {
self.timed_metadata_pid = Some(input);
self
}
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub fn set_timed_metadata_pid(mut self, input: std::option::Option<i32>) -> Self {
self.timed_metadata_pid = input;
self
}
/// The value of the transport stream ID field in the Program Map Table.
pub fn transport_stream_id(mut self, input: i32) -> Self {
self.transport_stream_id = Some(input);
self
}
/// The value of the transport stream ID field in the Program Map Table.
pub fn set_transport_stream_id(mut self, input: std::option::Option<i32>) -> Self {
self.transport_stream_id = input;
self
}
/// Packet Identifier (PID) of the elementary video stream in the transport stream.
pub fn video_pid(mut self, input: i32) -> Self {
self.video_pid = Some(input);
self
}
/// Packet Identifier (PID) of the elementary video stream in the transport stream.
pub fn set_video_pid(mut self, input: std::option::Option<i32>) -> Self {
self.video_pid = input;
self
}
/// Consumes the builder and constructs a [`M3u8Settings`](crate::model::M3u8Settings)
pub fn build(self) -> crate::model::M3u8Settings {
crate::model::M3u8Settings {
audio_duration: self.audio_duration,
audio_frames_per_pes: self.audio_frames_per_pes.unwrap_or_default(),
audio_pids: self.audio_pids,
data_pts_control: self.data_pts_control,
max_pcr_interval: self.max_pcr_interval.unwrap_or_default(),
nielsen_id3: self.nielsen_id3,
pat_interval: self.pat_interval.unwrap_or_default(),
pcr_control: self.pcr_control,
pcr_pid: self.pcr_pid.unwrap_or_default(),
pmt_interval: self.pmt_interval.unwrap_or_default(),
pmt_pid: self.pmt_pid.unwrap_or_default(),
private_metadata_pid: self.private_metadata_pid.unwrap_or_default(),
program_number: self.program_number.unwrap_or_default(),
scte35_pid: self.scte35_pid.unwrap_or_default(),
scte35_source: self.scte35_source,
timed_metadata: self.timed_metadata,
timed_metadata_pid: self.timed_metadata_pid.unwrap_or_default(),
transport_stream_id: self.transport_stream_id.unwrap_or_default(),
video_pid: self.video_pid.unwrap_or_default(),
}
}
}
}
impl M3u8Settings {
/// Creates a new builder-style object to manufacture [`M3u8Settings`](crate::model::M3u8Settings)
pub fn builder() -> crate::model::m3u8_settings::Builder {
crate::model::m3u8_settings::Builder::default()
}
}
/// Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH) to include ID3 metadata in this output. This includes ID3 metadata from the following features: ID3 timestamp period (timedMetadataId3Period), and Custom ID3 metadata inserter (timedMetadataInsertion). To exclude this ID3 metadata in this output: set ID3 metadata to None (NONE) or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TimedMetadata {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for TimedMetadata {
fn from(s: &str) -> Self {
match s {
"NONE" => TimedMetadata::None,
"PASSTHROUGH" => TimedMetadata::Passthrough,
other => TimedMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TimedMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TimedMetadata::from(s))
}
}
impl TimedMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TimedMetadata::None => "NONE",
TimedMetadata::Passthrough => "PASSTHROUGH",
TimedMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for TimedMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE) if you don't want manifest conditioning. Choose Passthrough (PASSTHROUGH) and choose Ad markers (adMarkers) if you do want manifest conditioning. In both cases, also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M3u8Scte35Source {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M3u8Scte35Source {
fn from(s: &str) -> Self {
match s {
"NONE" => M3u8Scte35Source::None,
"PASSTHROUGH" => M3u8Scte35Source::Passthrough,
other => M3u8Scte35Source::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M3u8Scte35Source {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M3u8Scte35Source::from(s))
}
}
impl M3u8Scte35Source {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M3u8Scte35Source::None => "NONE",
M3u8Scte35Source::Passthrough => "PASSTHROUGH",
M3u8Scte35Source::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for M3u8Scte35Source {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This parameter is effective only when the PCR PID is the same as the video or audio elementary stream.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M3u8PcrControl {
#[allow(missing_docs)] // documentation missing in model
ConfiguredPcrPeriod,
#[allow(missing_docs)] // documentation missing in model
PcrEveryPesPacket,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M3u8PcrControl {
fn from(s: &str) -> Self {
match s {
"CONFIGURED_PCR_PERIOD" => M3u8PcrControl::ConfiguredPcrPeriod,
"PCR_EVERY_PES_PACKET" => M3u8PcrControl::PcrEveryPesPacket,
other => M3u8PcrControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M3u8PcrControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M3u8PcrControl::from(s))
}
}
impl M3u8PcrControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M3u8PcrControl::ConfiguredPcrPeriod => "CONFIGURED_PCR_PERIOD",
M3u8PcrControl::PcrEveryPesPacket => "PCR_EVERY_PES_PACKET",
M3u8PcrControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CONFIGURED_PCR_PERIOD", "PCR_EVERY_PES_PACKET"]
}
}
impl AsRef<str> for M3u8PcrControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M3u8NielsenId3 {
#[allow(missing_docs)] // documentation missing in model
Insert,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M3u8NielsenId3 {
fn from(s: &str) -> Self {
match s {
"INSERT" => M3u8NielsenId3::Insert,
"NONE" => M3u8NielsenId3::None,
other => M3u8NielsenId3::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M3u8NielsenId3 {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M3u8NielsenId3::from(s))
}
}
impl M3u8NielsenId3 {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M3u8NielsenId3::Insert => "INSERT",
M3u8NielsenId3::None => "NONE",
M3u8NielsenId3::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INSERT", "NONE"]
}
}
impl AsRef<str> for M3u8NielsenId3 {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M3u8DataPtsControl {
#[allow(missing_docs)] // documentation missing in model
AlignToVideo,
#[allow(missing_docs)] // documentation missing in model
Auto,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M3u8DataPtsControl {
fn from(s: &str) -> Self {
match s {
"ALIGN_TO_VIDEO" => M3u8DataPtsControl::AlignToVideo,
"AUTO" => M3u8DataPtsControl::Auto,
other => M3u8DataPtsControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M3u8DataPtsControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M3u8DataPtsControl::from(s))
}
}
impl M3u8DataPtsControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M3u8DataPtsControl::AlignToVideo => "ALIGN_TO_VIDEO",
M3u8DataPtsControl::Auto => "AUTO",
M3u8DataPtsControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALIGN_TO_VIDEO", "AUTO"]
}
}
impl AsRef<str> for M3u8DataPtsControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M3u8AudioDuration {
#[allow(missing_docs)] // documentation missing in model
DefaultCodecDuration,
#[allow(missing_docs)] // documentation missing in model
MatchVideoDuration,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M3u8AudioDuration {
fn from(s: &str) -> Self {
match s {
"DEFAULT_CODEC_DURATION" => M3u8AudioDuration::DefaultCodecDuration,
"MATCH_VIDEO_DURATION" => M3u8AudioDuration::MatchVideoDuration,
other => M3u8AudioDuration::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M3u8AudioDuration {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M3u8AudioDuration::from(s))
}
}
impl M3u8AudioDuration {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M3u8AudioDuration::DefaultCodecDuration => "DEFAULT_CODEC_DURATION",
M3u8AudioDuration::MatchVideoDuration => "MATCH_VIDEO_DURATION",
M3u8AudioDuration::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT_CODEC_DURATION", "MATCH_VIDEO_DURATION"]
}
}
impl AsRef<str> for M3u8AudioDuration {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// MPEG-2 TS container settings. These apply to outputs in a File output group when the output's container (ContainerType) is MPEG-2 Transport Stream (M2TS). In these assets, data is organized by the program map table (PMT). Each transport stream program contains subsets of data, including audio, video, and metadata. Each of these subsets of data has a numerical label called a packet identifier (PID). Each transport stream program corresponds to one MediaConvert output. The PMT lists the types of data in a program along with their PID. Downstream systems and players use the program map table to look up the PID for each type of data it accesses and then uses the PIDs to locate specific data within the asset.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct M2tsSettings {
/// Selects between the DVB and ATSC buffer models for Dolby Digital audio.
pub audio_buffer_model: std::option::Option<crate::model::M2tsAudioBufferModel>,
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub audio_duration: std::option::Option<crate::model::M2tsAudioDuration>,
/// The number of audio frames to insert for each PES packet.
pub audio_frames_per_pes: i32,
/// Specify the packet identifiers (PIDs) for any elementary audio streams you include in this output. Specify multiple PIDs as a JSON array. Default is the range 482-492.
pub audio_pids: std::option::Option<std::vec::Vec<i32>>,
/// Specify the output bitrate of the transport stream in bits per second. Setting to 0 lets the muxer automatically determine the appropriate bitrate. Other common values are 3750000, 7500000, and 15000000.
pub bitrate: i32,
/// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, use multiplex buffer model. If set to NONE, this can lead to lower latency, but low-memory devices may not be able to play back the stream without interruptions.
pub buffer_model: std::option::Option<crate::model::M2tsBufferModel>,
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub data_pts_control: std::option::Option<crate::model::M2tsDataPtsControl>,
/// Use these settings to insert a DVB Network Information Table (NIT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub dvb_nit_settings: std::option::Option<crate::model::DvbNitSettings>,
/// Use these settings to insert a DVB Service Description Table (SDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub dvb_sdt_settings: std::option::Option<crate::model::DvbSdtSettings>,
/// Specify the packet identifiers (PIDs) for DVB subtitle data included in this output. Specify multiple PIDs as a JSON array. Default is the range 460-479.
pub dvb_sub_pids: std::option::Option<std::vec::Vec<i32>>,
/// Use these settings to insert a DVB Time and Date Table (TDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub dvb_tdt_settings: std::option::Option<crate::model::DvbTdtSettings>,
/// Specify the packet identifier (PID) for DVB teletext data you include in this output. Default is 499.
pub dvb_teletext_pid: i32,
/// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to partitions 3 and 4. The interval between these additional markers will be fixed, and will be slightly shorter than the video EBP marker interval. When set to VIDEO_INTERVAL, these additional markers will not be inserted. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub ebp_audio_interval: std::option::Option<crate::model::M2tsEbpAudioInterval>,
/// Selects which PIDs to place EBP markers on. They can either be placed only on the video PID, or on both the video PID and all audio PIDs. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub ebp_placement: std::option::Option<crate::model::M2tsEbpPlacement>,
/// Controls whether to include the ES Rate field in the PES header.
pub es_rate_in_pes: std::option::Option<crate::model::M2tsEsRateInPes>,
/// Keep the default value (DEFAULT) unless you know that your audio EBP markers are incorrectly appearing before your video EBP markers. To correct this problem, set this value to Force (FORCE).
pub force_ts_video_ebp_order: std::option::Option<crate::model::M2tsForceTsVideoEbpOrder>,
/// The length, in seconds, of each fragment. Only used with EBP markers.
pub fragment_time: f64,
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub klv_metadata: std::option::Option<crate::model::M2tsKlvMetadata>,
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub max_pcr_interval: i32,
/// When set, enforces that Encoder Boundary Points do not come within the specified time interval of each other by looking ahead at input video. If another EBP is going to come in within the specified time interval, the current EBP is not emitted, and the segment is "stretched" to the next marker. The lookahead value does not add latency to the system. The Live Event must be configured elsewhere to create sufficient latency to make the lookahead accurate.
pub min_ebp_interval: i32,
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub nielsen_id3: std::option::Option<crate::model::M2tsNielsenId3>,
/// Value in bits per second of extra null packets to insert into the transport stream. This can be used if a downstream encryption system requires periodic null packets.
pub null_packet_bitrate: f64,
/// The number of milliseconds between instances of this table in the output transport stream.
pub pat_interval: i32,
/// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This is effective only when the PCR PID is the same as the video or audio elementary stream.
pub pcr_control: std::option::Option<crate::model::M2tsPcrControl>,
/// Specify the packet identifier (PID) for the program clock reference (PCR) in this output. If you do not specify a value, the service will use the value for Video PID (VideoPid).
pub pcr_pid: i32,
/// Specify the number of milliseconds between instances of the program map table (PMT) in the output transport stream.
pub pmt_interval: i32,
/// Specify the packet identifier (PID) for the program map table (PMT) itself. Default is 480.
pub pmt_pid: i32,
/// Specify the packet identifier (PID) of the private metadata stream. Default is 503.
pub private_metadata_pid: i32,
/// Use Program number (programNumber) to specify the program number used in the program map table (PMT) for this output. Default is 1. Program numbers and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub program_number: i32,
/// When set to CBR, inserts null packets into transport stream to fill specified bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, but the output will not be padded up to that bitrate.
pub rate_mode: std::option::Option<crate::model::M2tsRateMode>,
/// Include this in your job settings to put SCTE-35 markers in your HLS and transport stream outputs at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub scte35_esam: std::option::Option<crate::model::M2tsScte35Esam>,
/// Specify the packet identifier (PID) of the SCTE-35 stream in the transport stream.
pub scte35_pid: i32,
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE). Also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml). Also enable ESAM SCTE-35 (include the property scte35Esam).
pub scte35_source: std::option::Option<crate::model::M2tsScte35Source>,
/// Inserts segmentation markers at each segmentation_time period. rai_segstart sets the Random Access Indicator bit in the adaptation field. rai_adapt sets the RAI bit and adds the current timecode in the private data bytes. psi_segstart inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary Point information to the adaptation field as per OpenCable specification OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information to the adaptation field using a legacy proprietary format.
pub segmentation_markers: std::option::Option<crate::model::M2tsSegmentationMarkers>,
/// The segmentation style parameter controls how segmentation markers are inserted into the transport stream. With avails, it is possible that segments may be truncated, which can influence where future segmentation markers are inserted. When a segmentation style of "reset_cadence" is selected and a segment is truncated due to an avail, we will reset the segmentation cadence. This means the subsequent segment will have a duration of of $segmentation_time seconds. When a segmentation style of "maintain_cadence" is selected and a segment is truncated due to an avail, we will not reset the segmentation cadence. This means the subsequent segment will likely be truncated as well. However, all segments after that will have a duration of $segmentation_time seconds. Note that EBP lookahead is a slight exception to this rule.
pub segmentation_style: std::option::Option<crate::model::M2tsSegmentationStyle>,
/// Specify the length, in seconds, of each segment. Required unless markers is set to _none_.
pub segmentation_time: f64,
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub timed_metadata_pid: i32,
/// Specify the ID for the transport stream itself in the program map table for this output. Transport stream IDs and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub transport_stream_id: i32,
/// Specify the packet identifier (PID) of the elementary video stream in the transport stream.
pub video_pid: i32,
}
impl M2tsSettings {
/// Selects between the DVB and ATSC buffer models for Dolby Digital audio.
pub fn audio_buffer_model(&self) -> std::option::Option<&crate::model::M2tsAudioBufferModel> {
self.audio_buffer_model.as_ref()
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(&self) -> std::option::Option<&crate::model::M2tsAudioDuration> {
self.audio_duration.as_ref()
}
/// The number of audio frames to insert for each PES packet.
pub fn audio_frames_per_pes(&self) -> i32 {
self.audio_frames_per_pes
}
/// Specify the packet identifiers (PIDs) for any elementary audio streams you include in this output. Specify multiple PIDs as a JSON array. Default is the range 482-492.
pub fn audio_pids(&self) -> std::option::Option<&[i32]> {
self.audio_pids.as_deref()
}
/// Specify the output bitrate of the transport stream in bits per second. Setting to 0 lets the muxer automatically determine the appropriate bitrate. Other common values are 3750000, 7500000, and 15000000.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, use multiplex buffer model. If set to NONE, this can lead to lower latency, but low-memory devices may not be able to play back the stream without interruptions.
pub fn buffer_model(&self) -> std::option::Option<&crate::model::M2tsBufferModel> {
self.buffer_model.as_ref()
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub fn data_pts_control(&self) -> std::option::Option<&crate::model::M2tsDataPtsControl> {
self.data_pts_control.as_ref()
}
/// Use these settings to insert a DVB Network Information Table (NIT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn dvb_nit_settings(&self) -> std::option::Option<&crate::model::DvbNitSettings> {
self.dvb_nit_settings.as_ref()
}
/// Use these settings to insert a DVB Service Description Table (SDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn dvb_sdt_settings(&self) -> std::option::Option<&crate::model::DvbSdtSettings> {
self.dvb_sdt_settings.as_ref()
}
/// Specify the packet identifiers (PIDs) for DVB subtitle data included in this output. Specify multiple PIDs as a JSON array. Default is the range 460-479.
pub fn dvb_sub_pids(&self) -> std::option::Option<&[i32]> {
self.dvb_sub_pids.as_deref()
}
/// Use these settings to insert a DVB Time and Date Table (TDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn dvb_tdt_settings(&self) -> std::option::Option<&crate::model::DvbTdtSettings> {
self.dvb_tdt_settings.as_ref()
}
/// Specify the packet identifier (PID) for DVB teletext data you include in this output. Default is 499.
pub fn dvb_teletext_pid(&self) -> i32 {
self.dvb_teletext_pid
}
/// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to partitions 3 and 4. The interval between these additional markers will be fixed, and will be slightly shorter than the video EBP marker interval. When set to VIDEO_INTERVAL, these additional markers will not be inserted. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub fn ebp_audio_interval(&self) -> std::option::Option<&crate::model::M2tsEbpAudioInterval> {
self.ebp_audio_interval.as_ref()
}
/// Selects which PIDs to place EBP markers on. They can either be placed only on the video PID, or on both the video PID and all audio PIDs. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub fn ebp_placement(&self) -> std::option::Option<&crate::model::M2tsEbpPlacement> {
self.ebp_placement.as_ref()
}
/// Controls whether to include the ES Rate field in the PES header.
pub fn es_rate_in_pes(&self) -> std::option::Option<&crate::model::M2tsEsRateInPes> {
self.es_rate_in_pes.as_ref()
}
/// Keep the default value (DEFAULT) unless you know that your audio EBP markers are incorrectly appearing before your video EBP markers. To correct this problem, set this value to Force (FORCE).
pub fn force_ts_video_ebp_order(
&self,
) -> std::option::Option<&crate::model::M2tsForceTsVideoEbpOrder> {
self.force_ts_video_ebp_order.as_ref()
}
/// The length, in seconds, of each fragment. Only used with EBP markers.
pub fn fragment_time(&self) -> f64 {
self.fragment_time
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn klv_metadata(&self) -> std::option::Option<&crate::model::M2tsKlvMetadata> {
self.klv_metadata.as_ref()
}
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub fn max_pcr_interval(&self) -> i32 {
self.max_pcr_interval
}
/// When set, enforces that Encoder Boundary Points do not come within the specified time interval of each other by looking ahead at input video. If another EBP is going to come in within the specified time interval, the current EBP is not emitted, and the segment is "stretched" to the next marker. The lookahead value does not add latency to the system. The Live Event must be configured elsewhere to create sufficient latency to make the lookahead accurate.
pub fn min_ebp_interval(&self) -> i32 {
self.min_ebp_interval
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub fn nielsen_id3(&self) -> std::option::Option<&crate::model::M2tsNielsenId3> {
self.nielsen_id3.as_ref()
}
/// Value in bits per second of extra null packets to insert into the transport stream. This can be used if a downstream encryption system requires periodic null packets.
pub fn null_packet_bitrate(&self) -> f64 {
self.null_packet_bitrate
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn pat_interval(&self) -> i32 {
self.pat_interval
}
/// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This is effective only when the PCR PID is the same as the video or audio elementary stream.
pub fn pcr_control(&self) -> std::option::Option<&crate::model::M2tsPcrControl> {
self.pcr_control.as_ref()
}
/// Specify the packet identifier (PID) for the program clock reference (PCR) in this output. If you do not specify a value, the service will use the value for Video PID (VideoPid).
pub fn pcr_pid(&self) -> i32 {
self.pcr_pid
}
/// Specify the number of milliseconds between instances of the program map table (PMT) in the output transport stream.
pub fn pmt_interval(&self) -> i32 {
self.pmt_interval
}
/// Specify the packet identifier (PID) for the program map table (PMT) itself. Default is 480.
pub fn pmt_pid(&self) -> i32 {
self.pmt_pid
}
/// Specify the packet identifier (PID) of the private metadata stream. Default is 503.
pub fn private_metadata_pid(&self) -> i32 {
self.private_metadata_pid
}
/// Use Program number (programNumber) to specify the program number used in the program map table (PMT) for this output. Default is 1. Program numbers and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub fn program_number(&self) -> i32 {
self.program_number
}
/// When set to CBR, inserts null packets into transport stream to fill specified bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, but the output will not be padded up to that bitrate.
pub fn rate_mode(&self) -> std::option::Option<&crate::model::M2tsRateMode> {
self.rate_mode.as_ref()
}
/// Include this in your job settings to put SCTE-35 markers in your HLS and transport stream outputs at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn scte35_esam(&self) -> std::option::Option<&crate::model::M2tsScte35Esam> {
self.scte35_esam.as_ref()
}
/// Specify the packet identifier (PID) of the SCTE-35 stream in the transport stream.
pub fn scte35_pid(&self) -> i32 {
self.scte35_pid
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE). Also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml). Also enable ESAM SCTE-35 (include the property scte35Esam).
pub fn scte35_source(&self) -> std::option::Option<&crate::model::M2tsScte35Source> {
self.scte35_source.as_ref()
}
/// Inserts segmentation markers at each segmentation_time period. rai_segstart sets the Random Access Indicator bit in the adaptation field. rai_adapt sets the RAI bit and adds the current timecode in the private data bytes. psi_segstart inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary Point information to the adaptation field as per OpenCable specification OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information to the adaptation field using a legacy proprietary format.
pub fn segmentation_markers(
&self,
) -> std::option::Option<&crate::model::M2tsSegmentationMarkers> {
self.segmentation_markers.as_ref()
}
/// The segmentation style parameter controls how segmentation markers are inserted into the transport stream. With avails, it is possible that segments may be truncated, which can influence where future segmentation markers are inserted. When a segmentation style of "reset_cadence" is selected and a segment is truncated due to an avail, we will reset the segmentation cadence. This means the subsequent segment will have a duration of of $segmentation_time seconds. When a segmentation style of "maintain_cadence" is selected and a segment is truncated due to an avail, we will not reset the segmentation cadence. This means the subsequent segment will likely be truncated as well. However, all segments after that will have a duration of $segmentation_time seconds. Note that EBP lookahead is a slight exception to this rule.
pub fn segmentation_style(&self) -> std::option::Option<&crate::model::M2tsSegmentationStyle> {
self.segmentation_style.as_ref()
}
/// Specify the length, in seconds, of each segment. Required unless markers is set to _none_.
pub fn segmentation_time(&self) -> f64 {
self.segmentation_time
}
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub fn timed_metadata_pid(&self) -> i32 {
self.timed_metadata_pid
}
/// Specify the ID for the transport stream itself in the program map table for this output. Transport stream IDs and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub fn transport_stream_id(&self) -> i32 {
self.transport_stream_id
}
/// Specify the packet identifier (PID) of the elementary video stream in the transport stream.
pub fn video_pid(&self) -> i32 {
self.video_pid
}
}
impl std::fmt::Debug for M2tsSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("M2tsSettings");
formatter.field("audio_buffer_model", &self.audio_buffer_model);
formatter.field("audio_duration", &self.audio_duration);
formatter.field("audio_frames_per_pes", &self.audio_frames_per_pes);
formatter.field("audio_pids", &self.audio_pids);
formatter.field("bitrate", &self.bitrate);
formatter.field("buffer_model", &self.buffer_model);
formatter.field("data_pts_control", &self.data_pts_control);
formatter.field("dvb_nit_settings", &self.dvb_nit_settings);
formatter.field("dvb_sdt_settings", &self.dvb_sdt_settings);
formatter.field("dvb_sub_pids", &self.dvb_sub_pids);
formatter.field("dvb_tdt_settings", &self.dvb_tdt_settings);
formatter.field("dvb_teletext_pid", &self.dvb_teletext_pid);
formatter.field("ebp_audio_interval", &self.ebp_audio_interval);
formatter.field("ebp_placement", &self.ebp_placement);
formatter.field("es_rate_in_pes", &self.es_rate_in_pes);
formatter.field("force_ts_video_ebp_order", &self.force_ts_video_ebp_order);
formatter.field("fragment_time", &self.fragment_time);
formatter.field("klv_metadata", &self.klv_metadata);
formatter.field("max_pcr_interval", &self.max_pcr_interval);
formatter.field("min_ebp_interval", &self.min_ebp_interval);
formatter.field("nielsen_id3", &self.nielsen_id3);
formatter.field("null_packet_bitrate", &self.null_packet_bitrate);
formatter.field("pat_interval", &self.pat_interval);
formatter.field("pcr_control", &self.pcr_control);
formatter.field("pcr_pid", &self.pcr_pid);
formatter.field("pmt_interval", &self.pmt_interval);
formatter.field("pmt_pid", &self.pmt_pid);
formatter.field("private_metadata_pid", &self.private_metadata_pid);
formatter.field("program_number", &self.program_number);
formatter.field("rate_mode", &self.rate_mode);
formatter.field("scte35_esam", &self.scte35_esam);
formatter.field("scte35_pid", &self.scte35_pid);
formatter.field("scte35_source", &self.scte35_source);
formatter.field("segmentation_markers", &self.segmentation_markers);
formatter.field("segmentation_style", &self.segmentation_style);
formatter.field("segmentation_time", &self.segmentation_time);
formatter.field("timed_metadata_pid", &self.timed_metadata_pid);
formatter.field("transport_stream_id", &self.transport_stream_id);
formatter.field("video_pid", &self.video_pid);
formatter.finish()
}
}
/// See [`M2tsSettings`](crate::model::M2tsSettings)
pub mod m2ts_settings {
/// A builder for [`M2tsSettings`](crate::model::M2tsSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_buffer_model: std::option::Option<crate::model::M2tsAudioBufferModel>,
pub(crate) audio_duration: std::option::Option<crate::model::M2tsAudioDuration>,
pub(crate) audio_frames_per_pes: std::option::Option<i32>,
pub(crate) audio_pids: std::option::Option<std::vec::Vec<i32>>,
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) buffer_model: std::option::Option<crate::model::M2tsBufferModel>,
pub(crate) data_pts_control: std::option::Option<crate::model::M2tsDataPtsControl>,
pub(crate) dvb_nit_settings: std::option::Option<crate::model::DvbNitSettings>,
pub(crate) dvb_sdt_settings: std::option::Option<crate::model::DvbSdtSettings>,
pub(crate) dvb_sub_pids: std::option::Option<std::vec::Vec<i32>>,
pub(crate) dvb_tdt_settings: std::option::Option<crate::model::DvbTdtSettings>,
pub(crate) dvb_teletext_pid: std::option::Option<i32>,
pub(crate) ebp_audio_interval: std::option::Option<crate::model::M2tsEbpAudioInterval>,
pub(crate) ebp_placement: std::option::Option<crate::model::M2tsEbpPlacement>,
pub(crate) es_rate_in_pes: std::option::Option<crate::model::M2tsEsRateInPes>,
pub(crate) force_ts_video_ebp_order:
std::option::Option<crate::model::M2tsForceTsVideoEbpOrder>,
pub(crate) fragment_time: std::option::Option<f64>,
pub(crate) klv_metadata: std::option::Option<crate::model::M2tsKlvMetadata>,
pub(crate) max_pcr_interval: std::option::Option<i32>,
pub(crate) min_ebp_interval: std::option::Option<i32>,
pub(crate) nielsen_id3: std::option::Option<crate::model::M2tsNielsenId3>,
pub(crate) null_packet_bitrate: std::option::Option<f64>,
pub(crate) pat_interval: std::option::Option<i32>,
pub(crate) pcr_control: std::option::Option<crate::model::M2tsPcrControl>,
pub(crate) pcr_pid: std::option::Option<i32>,
pub(crate) pmt_interval: std::option::Option<i32>,
pub(crate) pmt_pid: std::option::Option<i32>,
pub(crate) private_metadata_pid: std::option::Option<i32>,
pub(crate) program_number: std::option::Option<i32>,
pub(crate) rate_mode: std::option::Option<crate::model::M2tsRateMode>,
pub(crate) scte35_esam: std::option::Option<crate::model::M2tsScte35Esam>,
pub(crate) scte35_pid: std::option::Option<i32>,
pub(crate) scte35_source: std::option::Option<crate::model::M2tsScte35Source>,
pub(crate) segmentation_markers: std::option::Option<crate::model::M2tsSegmentationMarkers>,
pub(crate) segmentation_style: std::option::Option<crate::model::M2tsSegmentationStyle>,
pub(crate) segmentation_time: std::option::Option<f64>,
pub(crate) timed_metadata_pid: std::option::Option<i32>,
pub(crate) transport_stream_id: std::option::Option<i32>,
pub(crate) video_pid: std::option::Option<i32>,
}
impl Builder {
/// Selects between the DVB and ATSC buffer models for Dolby Digital audio.
pub fn audio_buffer_model(mut self, input: crate::model::M2tsAudioBufferModel) -> Self {
self.audio_buffer_model = Some(input);
self
}
/// Selects between the DVB and ATSC buffer models for Dolby Digital audio.
pub fn set_audio_buffer_model(
mut self,
input: std::option::Option<crate::model::M2tsAudioBufferModel>,
) -> Self {
self.audio_buffer_model = input;
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(mut self, input: crate::model::M2tsAudioDuration) -> Self {
self.audio_duration = Some(input);
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn set_audio_duration(
mut self,
input: std::option::Option<crate::model::M2tsAudioDuration>,
) -> Self {
self.audio_duration = input;
self
}
/// The number of audio frames to insert for each PES packet.
pub fn audio_frames_per_pes(mut self, input: i32) -> Self {
self.audio_frames_per_pes = Some(input);
self
}
/// The number of audio frames to insert for each PES packet.
pub fn set_audio_frames_per_pes(mut self, input: std::option::Option<i32>) -> Self {
self.audio_frames_per_pes = input;
self
}
/// Appends an item to `audio_pids`.
///
/// To override the contents of this collection use [`set_audio_pids`](Self::set_audio_pids).
///
/// Specify the packet identifiers (PIDs) for any elementary audio streams you include in this output. Specify multiple PIDs as a JSON array. Default is the range 482-492.
pub fn audio_pids(mut self, input: i32) -> Self {
let mut v = self.audio_pids.unwrap_or_default();
v.push(input);
self.audio_pids = Some(v);
self
}
/// Specify the packet identifiers (PIDs) for any elementary audio streams you include in this output. Specify multiple PIDs as a JSON array. Default is the range 482-492.
pub fn set_audio_pids(mut self, input: std::option::Option<std::vec::Vec<i32>>) -> Self {
self.audio_pids = input;
self
}
/// Specify the output bitrate of the transport stream in bits per second. Setting to 0 lets the muxer automatically determine the appropriate bitrate. Other common values are 3750000, 7500000, and 15000000.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the output bitrate of the transport stream in bits per second. Setting to 0 lets the muxer automatically determine the appropriate bitrate. Other common values are 3750000, 7500000, and 15000000.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, use multiplex buffer model. If set to NONE, this can lead to lower latency, but low-memory devices may not be able to play back the stream without interruptions.
pub fn buffer_model(mut self, input: crate::model::M2tsBufferModel) -> Self {
self.buffer_model = Some(input);
self
}
/// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, use multiplex buffer model. If set to NONE, this can lead to lower latency, but low-memory devices may not be able to play back the stream without interruptions.
pub fn set_buffer_model(
mut self,
input: std::option::Option<crate::model::M2tsBufferModel>,
) -> Self {
self.buffer_model = input;
self
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub fn data_pts_control(mut self, input: crate::model::M2tsDataPtsControl) -> Self {
self.data_pts_control = Some(input);
self
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
pub fn set_data_pts_control(
mut self,
input: std::option::Option<crate::model::M2tsDataPtsControl>,
) -> Self {
self.data_pts_control = input;
self
}
/// Use these settings to insert a DVB Network Information Table (NIT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn dvb_nit_settings(mut self, input: crate::model::DvbNitSettings) -> Self {
self.dvb_nit_settings = Some(input);
self
}
/// Use these settings to insert a DVB Network Information Table (NIT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn set_dvb_nit_settings(
mut self,
input: std::option::Option<crate::model::DvbNitSettings>,
) -> Self {
self.dvb_nit_settings = input;
self
}
/// Use these settings to insert a DVB Service Description Table (SDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn dvb_sdt_settings(mut self, input: crate::model::DvbSdtSettings) -> Self {
self.dvb_sdt_settings = Some(input);
self
}
/// Use these settings to insert a DVB Service Description Table (SDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn set_dvb_sdt_settings(
mut self,
input: std::option::Option<crate::model::DvbSdtSettings>,
) -> Self {
self.dvb_sdt_settings = input;
self
}
/// Appends an item to `dvb_sub_pids`.
///
/// To override the contents of this collection use [`set_dvb_sub_pids`](Self::set_dvb_sub_pids).
///
/// Specify the packet identifiers (PIDs) for DVB subtitle data included in this output. Specify multiple PIDs as a JSON array. Default is the range 460-479.
pub fn dvb_sub_pids(mut self, input: i32) -> Self {
let mut v = self.dvb_sub_pids.unwrap_or_default();
v.push(input);
self.dvb_sub_pids = Some(v);
self
}
/// Specify the packet identifiers (PIDs) for DVB subtitle data included in this output. Specify multiple PIDs as a JSON array. Default is the range 460-479.
pub fn set_dvb_sub_pids(mut self, input: std::option::Option<std::vec::Vec<i32>>) -> Self {
self.dvb_sub_pids = input;
self
}
/// Use these settings to insert a DVB Time and Date Table (TDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn dvb_tdt_settings(mut self, input: crate::model::DvbTdtSettings) -> Self {
self.dvb_tdt_settings = Some(input);
self
}
/// Use these settings to insert a DVB Time and Date Table (TDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
pub fn set_dvb_tdt_settings(
mut self,
input: std::option::Option<crate::model::DvbTdtSettings>,
) -> Self {
self.dvb_tdt_settings = input;
self
}
/// Specify the packet identifier (PID) for DVB teletext data you include in this output. Default is 499.
pub fn dvb_teletext_pid(mut self, input: i32) -> Self {
self.dvb_teletext_pid = Some(input);
self
}
/// Specify the packet identifier (PID) for DVB teletext data you include in this output. Default is 499.
pub fn set_dvb_teletext_pid(mut self, input: std::option::Option<i32>) -> Self {
self.dvb_teletext_pid = input;
self
}
/// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to partitions 3 and 4. The interval between these additional markers will be fixed, and will be slightly shorter than the video EBP marker interval. When set to VIDEO_INTERVAL, these additional markers will not be inserted. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub fn ebp_audio_interval(mut self, input: crate::model::M2tsEbpAudioInterval) -> Self {
self.ebp_audio_interval = Some(input);
self
}
/// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to partitions 3 and 4. The interval between these additional markers will be fixed, and will be slightly shorter than the video EBP marker interval. When set to VIDEO_INTERVAL, these additional markers will not be inserted. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub fn set_ebp_audio_interval(
mut self,
input: std::option::Option<crate::model::M2tsEbpAudioInterval>,
) -> Self {
self.ebp_audio_interval = input;
self
}
/// Selects which PIDs to place EBP markers on. They can either be placed only on the video PID, or on both the video PID and all audio PIDs. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub fn ebp_placement(mut self, input: crate::model::M2tsEbpPlacement) -> Self {
self.ebp_placement = Some(input);
self
}
/// Selects which PIDs to place EBP markers on. They can either be placed only on the video PID, or on both the video PID and all audio PIDs. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
pub fn set_ebp_placement(
mut self,
input: std::option::Option<crate::model::M2tsEbpPlacement>,
) -> Self {
self.ebp_placement = input;
self
}
/// Controls whether to include the ES Rate field in the PES header.
pub fn es_rate_in_pes(mut self, input: crate::model::M2tsEsRateInPes) -> Self {
self.es_rate_in_pes = Some(input);
self
}
/// Controls whether to include the ES Rate field in the PES header.
pub fn set_es_rate_in_pes(
mut self,
input: std::option::Option<crate::model::M2tsEsRateInPes>,
) -> Self {
self.es_rate_in_pes = input;
self
}
/// Keep the default value (DEFAULT) unless you know that your audio EBP markers are incorrectly appearing before your video EBP markers. To correct this problem, set this value to Force (FORCE).
pub fn force_ts_video_ebp_order(
mut self,
input: crate::model::M2tsForceTsVideoEbpOrder,
) -> Self {
self.force_ts_video_ebp_order = Some(input);
self
}
/// Keep the default value (DEFAULT) unless you know that your audio EBP markers are incorrectly appearing before your video EBP markers. To correct this problem, set this value to Force (FORCE).
pub fn set_force_ts_video_ebp_order(
mut self,
input: std::option::Option<crate::model::M2tsForceTsVideoEbpOrder>,
) -> Self {
self.force_ts_video_ebp_order = input;
self
}
/// The length, in seconds, of each fragment. Only used with EBP markers.
pub fn fragment_time(mut self, input: f64) -> Self {
self.fragment_time = Some(input);
self
}
/// The length, in seconds, of each fragment. Only used with EBP markers.
pub fn set_fragment_time(mut self, input: std::option::Option<f64>) -> Self {
self.fragment_time = input;
self
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn klv_metadata(mut self, input: crate::model::M2tsKlvMetadata) -> Self {
self.klv_metadata = Some(input);
self
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn set_klv_metadata(
mut self,
input: std::option::Option<crate::model::M2tsKlvMetadata>,
) -> Self {
self.klv_metadata = input;
self
}
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub fn max_pcr_interval(mut self, input: i32) -> Self {
self.max_pcr_interval = Some(input);
self
}
/// Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.
pub fn set_max_pcr_interval(mut self, input: std::option::Option<i32>) -> Self {
self.max_pcr_interval = input;
self
}
/// When set, enforces that Encoder Boundary Points do not come within the specified time interval of each other by looking ahead at input video. If another EBP is going to come in within the specified time interval, the current EBP is not emitted, and the segment is "stretched" to the next marker. The lookahead value does not add latency to the system. The Live Event must be configured elsewhere to create sufficient latency to make the lookahead accurate.
pub fn min_ebp_interval(mut self, input: i32) -> Self {
self.min_ebp_interval = Some(input);
self
}
/// When set, enforces that Encoder Boundary Points do not come within the specified time interval of each other by looking ahead at input video. If another EBP is going to come in within the specified time interval, the current EBP is not emitted, and the segment is "stretched" to the next marker. The lookahead value does not add latency to the system. The Live Event must be configured elsewhere to create sufficient latency to make the lookahead accurate.
pub fn set_min_ebp_interval(mut self, input: std::option::Option<i32>) -> Self {
self.min_ebp_interval = input;
self
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub fn nielsen_id3(mut self, input: crate::model::M2tsNielsenId3) -> Self {
self.nielsen_id3 = Some(input);
self
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
pub fn set_nielsen_id3(
mut self,
input: std::option::Option<crate::model::M2tsNielsenId3>,
) -> Self {
self.nielsen_id3 = input;
self
}
/// Value in bits per second of extra null packets to insert into the transport stream. This can be used if a downstream encryption system requires periodic null packets.
pub fn null_packet_bitrate(mut self, input: f64) -> Self {
self.null_packet_bitrate = Some(input);
self
}
/// Value in bits per second of extra null packets to insert into the transport stream. This can be used if a downstream encryption system requires periodic null packets.
pub fn set_null_packet_bitrate(mut self, input: std::option::Option<f64>) -> Self {
self.null_packet_bitrate = input;
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn pat_interval(mut self, input: i32) -> Self {
self.pat_interval = Some(input);
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn set_pat_interval(mut self, input: std::option::Option<i32>) -> Self {
self.pat_interval = input;
self
}
/// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This is effective only when the PCR PID is the same as the video or audio elementary stream.
pub fn pcr_control(mut self, input: crate::model::M2tsPcrControl) -> Self {
self.pcr_control = Some(input);
self
}
/// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This is effective only when the PCR PID is the same as the video or audio elementary stream.
pub fn set_pcr_control(
mut self,
input: std::option::Option<crate::model::M2tsPcrControl>,
) -> Self {
self.pcr_control = input;
self
}
/// Specify the packet identifier (PID) for the program clock reference (PCR) in this output. If you do not specify a value, the service will use the value for Video PID (VideoPid).
pub fn pcr_pid(mut self, input: i32) -> Self {
self.pcr_pid = Some(input);
self
}
/// Specify the packet identifier (PID) for the program clock reference (PCR) in this output. If you do not specify a value, the service will use the value for Video PID (VideoPid).
pub fn set_pcr_pid(mut self, input: std::option::Option<i32>) -> Self {
self.pcr_pid = input;
self
}
/// Specify the number of milliseconds between instances of the program map table (PMT) in the output transport stream.
pub fn pmt_interval(mut self, input: i32) -> Self {
self.pmt_interval = Some(input);
self
}
/// Specify the number of milliseconds between instances of the program map table (PMT) in the output transport stream.
pub fn set_pmt_interval(mut self, input: std::option::Option<i32>) -> Self {
self.pmt_interval = input;
self
}
/// Specify the packet identifier (PID) for the program map table (PMT) itself. Default is 480.
pub fn pmt_pid(mut self, input: i32) -> Self {
self.pmt_pid = Some(input);
self
}
/// Specify the packet identifier (PID) for the program map table (PMT) itself. Default is 480.
pub fn set_pmt_pid(mut self, input: std::option::Option<i32>) -> Self {
self.pmt_pid = input;
self
}
/// Specify the packet identifier (PID) of the private metadata stream. Default is 503.
pub fn private_metadata_pid(mut self, input: i32) -> Self {
self.private_metadata_pid = Some(input);
self
}
/// Specify the packet identifier (PID) of the private metadata stream. Default is 503.
pub fn set_private_metadata_pid(mut self, input: std::option::Option<i32>) -> Self {
self.private_metadata_pid = input;
self
}
/// Use Program number (programNumber) to specify the program number used in the program map table (PMT) for this output. Default is 1. Program numbers and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub fn program_number(mut self, input: i32) -> Self {
self.program_number = Some(input);
self
}
/// Use Program number (programNumber) to specify the program number used in the program map table (PMT) for this output. Default is 1. Program numbers and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub fn set_program_number(mut self, input: std::option::Option<i32>) -> Self {
self.program_number = input;
self
}
/// When set to CBR, inserts null packets into transport stream to fill specified bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, but the output will not be padded up to that bitrate.
pub fn rate_mode(mut self, input: crate::model::M2tsRateMode) -> Self {
self.rate_mode = Some(input);
self
}
/// When set to CBR, inserts null packets into transport stream to fill specified bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, but the output will not be padded up to that bitrate.
pub fn set_rate_mode(
mut self,
input: std::option::Option<crate::model::M2tsRateMode>,
) -> Self {
self.rate_mode = input;
self
}
/// Include this in your job settings to put SCTE-35 markers in your HLS and transport stream outputs at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn scte35_esam(mut self, input: crate::model::M2tsScte35Esam) -> Self {
self.scte35_esam = Some(input);
self
}
/// Include this in your job settings to put SCTE-35 markers in your HLS and transport stream outputs at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn set_scte35_esam(
mut self,
input: std::option::Option<crate::model::M2tsScte35Esam>,
) -> Self {
self.scte35_esam = input;
self
}
/// Specify the packet identifier (PID) of the SCTE-35 stream in the transport stream.
pub fn scte35_pid(mut self, input: i32) -> Self {
self.scte35_pid = Some(input);
self
}
/// Specify the packet identifier (PID) of the SCTE-35 stream in the transport stream.
pub fn set_scte35_pid(mut self, input: std::option::Option<i32>) -> Self {
self.scte35_pid = input;
self
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE). Also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml). Also enable ESAM SCTE-35 (include the property scte35Esam).
pub fn scte35_source(mut self, input: crate::model::M2tsScte35Source) -> Self {
self.scte35_source = Some(input);
self
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE). Also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml). Also enable ESAM SCTE-35 (include the property scte35Esam).
pub fn set_scte35_source(
mut self,
input: std::option::Option<crate::model::M2tsScte35Source>,
) -> Self {
self.scte35_source = input;
self
}
/// Inserts segmentation markers at each segmentation_time period. rai_segstart sets the Random Access Indicator bit in the adaptation field. rai_adapt sets the RAI bit and adds the current timecode in the private data bytes. psi_segstart inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary Point information to the adaptation field as per OpenCable specification OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information to the adaptation field using a legacy proprietary format.
pub fn segmentation_markers(
mut self,
input: crate::model::M2tsSegmentationMarkers,
) -> Self {
self.segmentation_markers = Some(input);
self
}
/// Inserts segmentation markers at each segmentation_time period. rai_segstart sets the Random Access Indicator bit in the adaptation field. rai_adapt sets the RAI bit and adds the current timecode in the private data bytes. psi_segstart inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary Point information to the adaptation field as per OpenCable specification OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information to the adaptation field using a legacy proprietary format.
pub fn set_segmentation_markers(
mut self,
input: std::option::Option<crate::model::M2tsSegmentationMarkers>,
) -> Self {
self.segmentation_markers = input;
self
}
/// The segmentation style parameter controls how segmentation markers are inserted into the transport stream. With avails, it is possible that segments may be truncated, which can influence where future segmentation markers are inserted. When a segmentation style of "reset_cadence" is selected and a segment is truncated due to an avail, we will reset the segmentation cadence. This means the subsequent segment will have a duration of of $segmentation_time seconds. When a segmentation style of "maintain_cadence" is selected and a segment is truncated due to an avail, we will not reset the segmentation cadence. This means the subsequent segment will likely be truncated as well. However, all segments after that will have a duration of $segmentation_time seconds. Note that EBP lookahead is a slight exception to this rule.
pub fn segmentation_style(mut self, input: crate::model::M2tsSegmentationStyle) -> Self {
self.segmentation_style = Some(input);
self
}
/// The segmentation style parameter controls how segmentation markers are inserted into the transport stream. With avails, it is possible that segments may be truncated, which can influence where future segmentation markers are inserted. When a segmentation style of "reset_cadence" is selected and a segment is truncated due to an avail, we will reset the segmentation cadence. This means the subsequent segment will have a duration of of $segmentation_time seconds. When a segmentation style of "maintain_cadence" is selected and a segment is truncated due to an avail, we will not reset the segmentation cadence. This means the subsequent segment will likely be truncated as well. However, all segments after that will have a duration of $segmentation_time seconds. Note that EBP lookahead is a slight exception to this rule.
pub fn set_segmentation_style(
mut self,
input: std::option::Option<crate::model::M2tsSegmentationStyle>,
) -> Self {
self.segmentation_style = input;
self
}
/// Specify the length, in seconds, of each segment. Required unless markers is set to _none_.
pub fn segmentation_time(mut self, input: f64) -> Self {
self.segmentation_time = Some(input);
self
}
/// Specify the length, in seconds, of each segment. Required unless markers is set to _none_.
pub fn set_segmentation_time(mut self, input: std::option::Option<f64>) -> Self {
self.segmentation_time = input;
self
}
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub fn timed_metadata_pid(mut self, input: i32) -> Self {
self.timed_metadata_pid = Some(input);
self
}
/// Packet Identifier (PID) of the ID3 metadata stream in the transport stream.
pub fn set_timed_metadata_pid(mut self, input: std::option::Option<i32>) -> Self {
self.timed_metadata_pid = input;
self
}
/// Specify the ID for the transport stream itself in the program map table for this output. Transport stream IDs and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub fn transport_stream_id(mut self, input: i32) -> Self {
self.transport_stream_id = Some(input);
self
}
/// Specify the ID for the transport stream itself in the program map table for this output. Transport stream IDs and program map tables are parts of MPEG-2 transport stream containers, used for organizing data.
pub fn set_transport_stream_id(mut self, input: std::option::Option<i32>) -> Self {
self.transport_stream_id = input;
self
}
/// Specify the packet identifier (PID) of the elementary video stream in the transport stream.
pub fn video_pid(mut self, input: i32) -> Self {
self.video_pid = Some(input);
self
}
/// Specify the packet identifier (PID) of the elementary video stream in the transport stream.
pub fn set_video_pid(mut self, input: std::option::Option<i32>) -> Self {
self.video_pid = input;
self
}
/// Consumes the builder and constructs a [`M2tsSettings`](crate::model::M2tsSettings)
pub fn build(self) -> crate::model::M2tsSettings {
crate::model::M2tsSettings {
audio_buffer_model: self.audio_buffer_model,
audio_duration: self.audio_duration,
audio_frames_per_pes: self.audio_frames_per_pes.unwrap_or_default(),
audio_pids: self.audio_pids,
bitrate: self.bitrate.unwrap_or_default(),
buffer_model: self.buffer_model,
data_pts_control: self.data_pts_control,
dvb_nit_settings: self.dvb_nit_settings,
dvb_sdt_settings: self.dvb_sdt_settings,
dvb_sub_pids: self.dvb_sub_pids,
dvb_tdt_settings: self.dvb_tdt_settings,
dvb_teletext_pid: self.dvb_teletext_pid.unwrap_or_default(),
ebp_audio_interval: self.ebp_audio_interval,
ebp_placement: self.ebp_placement,
es_rate_in_pes: self.es_rate_in_pes,
force_ts_video_ebp_order: self.force_ts_video_ebp_order,
fragment_time: self.fragment_time.unwrap_or_default(),
klv_metadata: self.klv_metadata,
max_pcr_interval: self.max_pcr_interval.unwrap_or_default(),
min_ebp_interval: self.min_ebp_interval.unwrap_or_default(),
nielsen_id3: self.nielsen_id3,
null_packet_bitrate: self.null_packet_bitrate.unwrap_or_default(),
pat_interval: self.pat_interval.unwrap_or_default(),
pcr_control: self.pcr_control,
pcr_pid: self.pcr_pid.unwrap_or_default(),
pmt_interval: self.pmt_interval.unwrap_or_default(),
pmt_pid: self.pmt_pid.unwrap_or_default(),
private_metadata_pid: self.private_metadata_pid.unwrap_or_default(),
program_number: self.program_number.unwrap_or_default(),
rate_mode: self.rate_mode,
scte35_esam: self.scte35_esam,
scte35_pid: self.scte35_pid.unwrap_or_default(),
scte35_source: self.scte35_source,
segmentation_markers: self.segmentation_markers,
segmentation_style: self.segmentation_style,
segmentation_time: self.segmentation_time.unwrap_or_default(),
timed_metadata_pid: self.timed_metadata_pid.unwrap_or_default(),
transport_stream_id: self.transport_stream_id.unwrap_or_default(),
video_pid: self.video_pid.unwrap_or_default(),
}
}
}
}
impl M2tsSettings {
/// Creates a new builder-style object to manufacture [`M2tsSettings`](crate::model::M2tsSettings)
pub fn builder() -> crate::model::m2ts_settings::Builder {
crate::model::m2ts_settings::Builder::default()
}
}
/// The segmentation style parameter controls how segmentation markers are inserted into the transport stream. With avails, it is possible that segments may be truncated, which can influence where future segmentation markers are inserted. When a segmentation style of "reset_cadence" is selected and a segment is truncated due to an avail, we will reset the segmentation cadence. This means the subsequent segment will have a duration of of $segmentation_time seconds. When a segmentation style of "maintain_cadence" is selected and a segment is truncated due to an avail, we will not reset the segmentation cadence. This means the subsequent segment will likely be truncated as well. However, all segments after that will have a duration of $segmentation_time seconds. Note that EBP lookahead is a slight exception to this rule.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsSegmentationStyle {
#[allow(missing_docs)] // documentation missing in model
MaintainCadence,
#[allow(missing_docs)] // documentation missing in model
ResetCadence,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsSegmentationStyle {
fn from(s: &str) -> Self {
match s {
"MAINTAIN_CADENCE" => M2tsSegmentationStyle::MaintainCadence,
"RESET_CADENCE" => M2tsSegmentationStyle::ResetCadence,
other => M2tsSegmentationStyle::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsSegmentationStyle {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsSegmentationStyle::from(s))
}
}
impl M2tsSegmentationStyle {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsSegmentationStyle::MaintainCadence => "MAINTAIN_CADENCE",
M2tsSegmentationStyle::ResetCadence => "RESET_CADENCE",
M2tsSegmentationStyle::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MAINTAIN_CADENCE", "RESET_CADENCE"]
}
}
impl AsRef<str> for M2tsSegmentationStyle {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Inserts segmentation markers at each segmentation_time period. rai_segstart sets the Random Access Indicator bit in the adaptation field. rai_adapt sets the RAI bit and adds the current timecode in the private data bytes. psi_segstart inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary Point information to the adaptation field as per OpenCable specification OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information to the adaptation field using a legacy proprietary format.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsSegmentationMarkers {
#[allow(missing_docs)] // documentation missing in model
Ebp,
#[allow(missing_docs)] // documentation missing in model
EbpLegacy,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
PsiSegstart,
#[allow(missing_docs)] // documentation missing in model
RaiAdapt,
#[allow(missing_docs)] // documentation missing in model
RaiSegstart,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsSegmentationMarkers {
fn from(s: &str) -> Self {
match s {
"EBP" => M2tsSegmentationMarkers::Ebp,
"EBP_LEGACY" => M2tsSegmentationMarkers::EbpLegacy,
"NONE" => M2tsSegmentationMarkers::None,
"PSI_SEGSTART" => M2tsSegmentationMarkers::PsiSegstart,
"RAI_ADAPT" => M2tsSegmentationMarkers::RaiAdapt,
"RAI_SEGSTART" => M2tsSegmentationMarkers::RaiSegstart,
other => M2tsSegmentationMarkers::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsSegmentationMarkers {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsSegmentationMarkers::from(s))
}
}
impl M2tsSegmentationMarkers {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsSegmentationMarkers::Ebp => "EBP",
M2tsSegmentationMarkers::EbpLegacy => "EBP_LEGACY",
M2tsSegmentationMarkers::None => "NONE",
M2tsSegmentationMarkers::PsiSegstart => "PSI_SEGSTART",
M2tsSegmentationMarkers::RaiAdapt => "RAI_ADAPT",
M2tsSegmentationMarkers::RaiSegstart => "RAI_SEGSTART",
M2tsSegmentationMarkers::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"EBP",
"EBP_LEGACY",
"NONE",
"PSI_SEGSTART",
"RAI_ADAPT",
"RAI_SEGSTART",
]
}
}
impl AsRef<str> for M2tsSegmentationMarkers {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// For SCTE-35 markers from your input-- Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want SCTE-35 markers in this output. For SCTE-35 markers from an ESAM XML document-- Choose None (NONE). Also provide the ESAM XML as a string in the setting Signal processing notification XML (sccXml). Also enable ESAM SCTE-35 (include the property scte35Esam).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsScte35Source {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsScte35Source {
fn from(s: &str) -> Self {
match s {
"NONE" => M2tsScte35Source::None,
"PASSTHROUGH" => M2tsScte35Source::Passthrough,
other => M2tsScte35Source::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsScte35Source {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsScte35Source::from(s))
}
}
impl M2tsScte35Source {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsScte35Source::None => "NONE",
M2tsScte35Source::Passthrough => "PASSTHROUGH",
M2tsScte35Source::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for M2tsScte35Source {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for SCTE-35 signals from ESAM. Include this in your job settings to put SCTE-35 markers in your HLS and transport stream outputs at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct M2tsScte35Esam {
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream generated by ESAM.
pub scte35_esam_pid: i32,
}
impl M2tsScte35Esam {
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream generated by ESAM.
pub fn scte35_esam_pid(&self) -> i32 {
self.scte35_esam_pid
}
}
impl std::fmt::Debug for M2tsScte35Esam {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("M2tsScte35Esam");
formatter.field("scte35_esam_pid", &self.scte35_esam_pid);
formatter.finish()
}
}
/// See [`M2tsScte35Esam`](crate::model::M2tsScte35Esam)
pub mod m2ts_scte35_esam {
/// A builder for [`M2tsScte35Esam`](crate::model::M2tsScte35Esam)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) scte35_esam_pid: std::option::Option<i32>,
}
impl Builder {
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream generated by ESAM.
pub fn scte35_esam_pid(mut self, input: i32) -> Self {
self.scte35_esam_pid = Some(input);
self
}
/// Packet Identifier (PID) of the SCTE-35 stream in the transport stream generated by ESAM.
pub fn set_scte35_esam_pid(mut self, input: std::option::Option<i32>) -> Self {
self.scte35_esam_pid = input;
self
}
/// Consumes the builder and constructs a [`M2tsScte35Esam`](crate::model::M2tsScte35Esam)
pub fn build(self) -> crate::model::M2tsScte35Esam {
crate::model::M2tsScte35Esam {
scte35_esam_pid: self.scte35_esam_pid.unwrap_or_default(),
}
}
}
}
impl M2tsScte35Esam {
/// Creates a new builder-style object to manufacture [`M2tsScte35Esam`](crate::model::M2tsScte35Esam)
pub fn builder() -> crate::model::m2ts_scte35_esam::Builder {
crate::model::m2ts_scte35_esam::Builder::default()
}
}
/// When set to CBR, inserts null packets into transport stream to fill specified bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, but the output will not be padded up to that bitrate.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsRateMode {
#[allow(missing_docs)] // documentation missing in model
Cbr,
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsRateMode {
fn from(s: &str) -> Self {
match s {
"CBR" => M2tsRateMode::Cbr,
"VBR" => M2tsRateMode::Vbr,
other => M2tsRateMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsRateMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsRateMode::from(s))
}
}
impl M2tsRateMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsRateMode::Cbr => "CBR",
M2tsRateMode::Vbr => "VBR",
M2tsRateMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBR", "VBR"]
}
}
impl AsRef<str> for M2tsRateMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted for every Packetized Elementary Stream (PES) header. This is effective only when the PCR PID is the same as the video or audio elementary stream.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsPcrControl {
#[allow(missing_docs)] // documentation missing in model
ConfiguredPcrPeriod,
#[allow(missing_docs)] // documentation missing in model
PcrEveryPesPacket,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsPcrControl {
fn from(s: &str) -> Self {
match s {
"CONFIGURED_PCR_PERIOD" => M2tsPcrControl::ConfiguredPcrPeriod,
"PCR_EVERY_PES_PACKET" => M2tsPcrControl::PcrEveryPesPacket,
other => M2tsPcrControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsPcrControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsPcrControl::from(s))
}
}
impl M2tsPcrControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsPcrControl::ConfiguredPcrPeriod => "CONFIGURED_PCR_PERIOD",
M2tsPcrControl::PcrEveryPesPacket => "PCR_EVERY_PES_PACKET",
M2tsPcrControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CONFIGURED_PCR_PERIOD", "PCR_EVERY_PES_PACKET"]
}
}
impl AsRef<str> for M2tsPcrControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If INSERT, Nielsen inaudible tones for media tracking will be detected in the input audio and an equivalent ID3 tag will be inserted in the output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsNielsenId3 {
#[allow(missing_docs)] // documentation missing in model
Insert,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsNielsenId3 {
fn from(s: &str) -> Self {
match s {
"INSERT" => M2tsNielsenId3::Insert,
"NONE" => M2tsNielsenId3::None,
other => M2tsNielsenId3::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsNielsenId3 {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsNielsenId3::from(s))
}
}
impl M2tsNielsenId3 {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsNielsenId3::Insert => "INSERT",
M2tsNielsenId3::None => "NONE",
M2tsNielsenId3::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INSERT", "NONE"]
}
}
impl AsRef<str> for M2tsNielsenId3 {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and passes it through to the output transport stream. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsKlvMetadata {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsKlvMetadata {
fn from(s: &str) -> Self {
match s {
"NONE" => M2tsKlvMetadata::None,
"PASSTHROUGH" => M2tsKlvMetadata::Passthrough,
other => M2tsKlvMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsKlvMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsKlvMetadata::from(s))
}
}
impl M2tsKlvMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsKlvMetadata::None => "NONE",
M2tsKlvMetadata::Passthrough => "PASSTHROUGH",
M2tsKlvMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for M2tsKlvMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Keep the default value (DEFAULT) unless you know that your audio EBP markers are incorrectly appearing before your video EBP markers. To correct this problem, set this value to Force (FORCE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsForceTsVideoEbpOrder {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
Force,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsForceTsVideoEbpOrder {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => M2tsForceTsVideoEbpOrder::Default,
"FORCE" => M2tsForceTsVideoEbpOrder::Force,
other => M2tsForceTsVideoEbpOrder::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsForceTsVideoEbpOrder {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsForceTsVideoEbpOrder::from(s))
}
}
impl M2tsForceTsVideoEbpOrder {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsForceTsVideoEbpOrder::Default => "DEFAULT",
M2tsForceTsVideoEbpOrder::Force => "FORCE",
M2tsForceTsVideoEbpOrder::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "FORCE"]
}
}
impl AsRef<str> for M2tsForceTsVideoEbpOrder {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Controls whether to include the ES Rate field in the PES header.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsEsRateInPes {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsEsRateInPes {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => M2tsEsRateInPes::Exclude,
"INCLUDE" => M2tsEsRateInPes::Include,
other => M2tsEsRateInPes::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsEsRateInPes {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsEsRateInPes::from(s))
}
}
impl M2tsEsRateInPes {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsEsRateInPes::Exclude => "EXCLUDE",
M2tsEsRateInPes::Include => "INCLUDE",
M2tsEsRateInPes::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for M2tsEsRateInPes {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Selects which PIDs to place EBP markers on. They can either be placed only on the video PID, or on both the video PID and all audio PIDs. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsEbpPlacement {
#[allow(missing_docs)] // documentation missing in model
VideoAndAudioPids,
#[allow(missing_docs)] // documentation missing in model
VideoPid,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsEbpPlacement {
fn from(s: &str) -> Self {
match s {
"VIDEO_AND_AUDIO_PIDS" => M2tsEbpPlacement::VideoAndAudioPids,
"VIDEO_PID" => M2tsEbpPlacement::VideoPid,
other => M2tsEbpPlacement::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsEbpPlacement {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsEbpPlacement::from(s))
}
}
impl M2tsEbpPlacement {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsEbpPlacement::VideoAndAudioPids => "VIDEO_AND_AUDIO_PIDS",
M2tsEbpPlacement::VideoPid => "VIDEO_PID",
M2tsEbpPlacement::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["VIDEO_AND_AUDIO_PIDS", "VIDEO_PID"]
}
}
impl AsRef<str> for M2tsEbpPlacement {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to partitions 3 and 4. The interval between these additional markers will be fixed, and will be slightly shorter than the video EBP marker interval. When set to VIDEO_INTERVAL, these additional markers will not be inserted. Only applicable when EBP segmentation markers are is selected (segmentationMarkers is EBP or EBP_LEGACY).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsEbpAudioInterval {
#[allow(missing_docs)] // documentation missing in model
VideoAndFixedIntervals,
#[allow(missing_docs)] // documentation missing in model
VideoInterval,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsEbpAudioInterval {
fn from(s: &str) -> Self {
match s {
"VIDEO_AND_FIXED_INTERVALS" => M2tsEbpAudioInterval::VideoAndFixedIntervals,
"VIDEO_INTERVAL" => M2tsEbpAudioInterval::VideoInterval,
other => M2tsEbpAudioInterval::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsEbpAudioInterval {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsEbpAudioInterval::from(s))
}
}
impl M2tsEbpAudioInterval {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsEbpAudioInterval::VideoAndFixedIntervals => "VIDEO_AND_FIXED_INTERVALS",
M2tsEbpAudioInterval::VideoInterval => "VIDEO_INTERVAL",
M2tsEbpAudioInterval::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["VIDEO_AND_FIXED_INTERVALS", "VIDEO_INTERVAL"]
}
}
impl AsRef<str> for M2tsEbpAudioInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use these settings to insert a DVB Time and Date Table (TDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DvbTdtSettings {
/// The number of milliseconds between instances of this table in the output transport stream.
pub tdt_interval: i32,
}
impl DvbTdtSettings {
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn tdt_interval(&self) -> i32 {
self.tdt_interval
}
}
impl std::fmt::Debug for DvbTdtSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DvbTdtSettings");
formatter.field("tdt_interval", &self.tdt_interval);
formatter.finish()
}
}
/// See [`DvbTdtSettings`](crate::model::DvbTdtSettings)
pub mod dvb_tdt_settings {
/// A builder for [`DvbTdtSettings`](crate::model::DvbTdtSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tdt_interval: std::option::Option<i32>,
}
impl Builder {
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn tdt_interval(mut self, input: i32) -> Self {
self.tdt_interval = Some(input);
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn set_tdt_interval(mut self, input: std::option::Option<i32>) -> Self {
self.tdt_interval = input;
self
}
/// Consumes the builder and constructs a [`DvbTdtSettings`](crate::model::DvbTdtSettings)
pub fn build(self) -> crate::model::DvbTdtSettings {
crate::model::DvbTdtSettings {
tdt_interval: self.tdt_interval.unwrap_or_default(),
}
}
}
}
impl DvbTdtSettings {
/// Creates a new builder-style object to manufacture [`DvbTdtSettings`](crate::model::DvbTdtSettings)
pub fn builder() -> crate::model::dvb_tdt_settings::Builder {
crate::model::dvb_tdt_settings::Builder::default()
}
}
/// Use these settings to insert a DVB Service Description Table (SDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DvbSdtSettings {
/// Selects method of inserting SDT information into output stream. "Follow input SDT" copies SDT information from input stream to output stream. "Follow input SDT if present" copies SDT information from input stream to output stream if SDT information is present in the input, otherwise it will fall back on the user-defined values. Enter "SDT Manually" means user will enter the SDT information. "No SDT" means output stream will not contain SDT information.
pub output_sdt: std::option::Option<crate::model::OutputSdt>,
/// The number of milliseconds between instances of this table in the output transport stream.
pub sdt_interval: i32,
/// The service name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub service_name: std::option::Option<std::string::String>,
/// The service provider name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub service_provider_name: std::option::Option<std::string::String>,
}
impl DvbSdtSettings {
/// Selects method of inserting SDT information into output stream. "Follow input SDT" copies SDT information from input stream to output stream. "Follow input SDT if present" copies SDT information from input stream to output stream if SDT information is present in the input, otherwise it will fall back on the user-defined values. Enter "SDT Manually" means user will enter the SDT information. "No SDT" means output stream will not contain SDT information.
pub fn output_sdt(&self) -> std::option::Option<&crate::model::OutputSdt> {
self.output_sdt.as_ref()
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn sdt_interval(&self) -> i32 {
self.sdt_interval
}
/// The service name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
/// The service provider name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub fn service_provider_name(&self) -> std::option::Option<&str> {
self.service_provider_name.as_deref()
}
}
impl std::fmt::Debug for DvbSdtSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DvbSdtSettings");
formatter.field("output_sdt", &self.output_sdt);
formatter.field("sdt_interval", &self.sdt_interval);
formatter.field("service_name", &self.service_name);
formatter.field("service_provider_name", &self.service_provider_name);
formatter.finish()
}
}
/// See [`DvbSdtSettings`](crate::model::DvbSdtSettings)
pub mod dvb_sdt_settings {
/// A builder for [`DvbSdtSettings`](crate::model::DvbSdtSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) output_sdt: std::option::Option<crate::model::OutputSdt>,
pub(crate) sdt_interval: std::option::Option<i32>,
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) service_provider_name: std::option::Option<std::string::String>,
}
impl Builder {
/// Selects method of inserting SDT information into output stream. "Follow input SDT" copies SDT information from input stream to output stream. "Follow input SDT if present" copies SDT information from input stream to output stream if SDT information is present in the input, otherwise it will fall back on the user-defined values. Enter "SDT Manually" means user will enter the SDT information. "No SDT" means output stream will not contain SDT information.
pub fn output_sdt(mut self, input: crate::model::OutputSdt) -> Self {
self.output_sdt = Some(input);
self
}
/// Selects method of inserting SDT information into output stream. "Follow input SDT" copies SDT information from input stream to output stream. "Follow input SDT if present" copies SDT information from input stream to output stream if SDT information is present in the input, otherwise it will fall back on the user-defined values. Enter "SDT Manually" means user will enter the SDT information. "No SDT" means output stream will not contain SDT information.
pub fn set_output_sdt(
mut self,
input: std::option::Option<crate::model::OutputSdt>,
) -> Self {
self.output_sdt = input;
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn sdt_interval(mut self, input: i32) -> Self {
self.sdt_interval = Some(input);
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn set_sdt_interval(mut self, input: std::option::Option<i32>) -> Self {
self.sdt_interval = input;
self
}
/// The service name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
/// The service name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
/// The service provider name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub fn service_provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_provider_name = Some(input.into());
self
}
/// The service provider name placed in the service_descriptor in the Service Description Table. Maximum length is 256 characters.
pub fn set_service_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_provider_name = input;
self
}
/// Consumes the builder and constructs a [`DvbSdtSettings`](crate::model::DvbSdtSettings)
pub fn build(self) -> crate::model::DvbSdtSettings {
crate::model::DvbSdtSettings {
output_sdt: self.output_sdt,
sdt_interval: self.sdt_interval.unwrap_or_default(),
service_name: self.service_name,
service_provider_name: self.service_provider_name,
}
}
}
}
impl DvbSdtSettings {
/// Creates a new builder-style object to manufacture [`DvbSdtSettings`](crate::model::DvbSdtSettings)
pub fn builder() -> crate::model::dvb_sdt_settings::Builder {
crate::model::dvb_sdt_settings::Builder::default()
}
}
/// Selects method of inserting SDT information into output stream. "Follow input SDT" copies SDT information from input stream to output stream. "Follow input SDT if present" copies SDT information from input stream to output stream if SDT information is present in the input, otherwise it will fall back on the user-defined values. Enter "SDT Manually" means user will enter the SDT information. "No SDT" means output stream will not contain SDT information.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OutputSdt {
#[allow(missing_docs)] // documentation missing in model
SdtFollow,
#[allow(missing_docs)] // documentation missing in model
SdtFollowIfPresent,
#[allow(missing_docs)] // documentation missing in model
SdtManual,
#[allow(missing_docs)] // documentation missing in model
SdtNone,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for OutputSdt {
fn from(s: &str) -> Self {
match s {
"SDT_FOLLOW" => OutputSdt::SdtFollow,
"SDT_FOLLOW_IF_PRESENT" => OutputSdt::SdtFollowIfPresent,
"SDT_MANUAL" => OutputSdt::SdtManual,
"SDT_NONE" => OutputSdt::SdtNone,
other => OutputSdt::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for OutputSdt {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OutputSdt::from(s))
}
}
impl OutputSdt {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
OutputSdt::SdtFollow => "SDT_FOLLOW",
OutputSdt::SdtFollowIfPresent => "SDT_FOLLOW_IF_PRESENT",
OutputSdt::SdtManual => "SDT_MANUAL",
OutputSdt::SdtNone => "SDT_NONE",
OutputSdt::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"SDT_FOLLOW",
"SDT_FOLLOW_IF_PRESENT",
"SDT_MANUAL",
"SDT_NONE",
]
}
}
impl AsRef<str> for OutputSdt {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use these settings to insert a DVB Network Information Table (NIT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DvbNitSettings {
/// The numeric value placed in the Network Information Table (NIT).
pub network_id: i32,
/// The network name text placed in the network_name_descriptor inside the Network Information Table. Maximum length is 256 characters.
pub network_name: std::option::Option<std::string::String>,
/// The number of milliseconds between instances of this table in the output transport stream.
pub nit_interval: i32,
}
impl DvbNitSettings {
/// The numeric value placed in the Network Information Table (NIT).
pub fn network_id(&self) -> i32 {
self.network_id
}
/// The network name text placed in the network_name_descriptor inside the Network Information Table. Maximum length is 256 characters.
pub fn network_name(&self) -> std::option::Option<&str> {
self.network_name.as_deref()
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn nit_interval(&self) -> i32 {
self.nit_interval
}
}
impl std::fmt::Debug for DvbNitSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DvbNitSettings");
formatter.field("network_id", &self.network_id);
formatter.field("network_name", &self.network_name);
formatter.field("nit_interval", &self.nit_interval);
formatter.finish()
}
}
/// See [`DvbNitSettings`](crate::model::DvbNitSettings)
pub mod dvb_nit_settings {
/// A builder for [`DvbNitSettings`](crate::model::DvbNitSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) network_id: std::option::Option<i32>,
pub(crate) network_name: std::option::Option<std::string::String>,
pub(crate) nit_interval: std::option::Option<i32>,
}
impl Builder {
/// The numeric value placed in the Network Information Table (NIT).
pub fn network_id(mut self, input: i32) -> Self {
self.network_id = Some(input);
self
}
/// The numeric value placed in the Network Information Table (NIT).
pub fn set_network_id(mut self, input: std::option::Option<i32>) -> Self {
self.network_id = input;
self
}
/// The network name text placed in the network_name_descriptor inside the Network Information Table. Maximum length is 256 characters.
pub fn network_name(mut self, input: impl Into<std::string::String>) -> Self {
self.network_name = Some(input.into());
self
}
/// The network name text placed in the network_name_descriptor inside the Network Information Table. Maximum length is 256 characters.
pub fn set_network_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.network_name = input;
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn nit_interval(mut self, input: i32) -> Self {
self.nit_interval = Some(input);
self
}
/// The number of milliseconds between instances of this table in the output transport stream.
pub fn set_nit_interval(mut self, input: std::option::Option<i32>) -> Self {
self.nit_interval = input;
self
}
/// Consumes the builder and constructs a [`DvbNitSettings`](crate::model::DvbNitSettings)
pub fn build(self) -> crate::model::DvbNitSettings {
crate::model::DvbNitSettings {
network_id: self.network_id.unwrap_or_default(),
network_name: self.network_name,
nit_interval: self.nit_interval.unwrap_or_default(),
}
}
}
}
impl DvbNitSettings {
/// Creates a new builder-style object to manufacture [`DvbNitSettings`](crate::model::DvbNitSettings)
pub fn builder() -> crate::model::dvb_nit_settings::Builder {
crate::model::dvb_nit_settings::Builder::default()
}
}
/// If you select ALIGN_TO_VIDEO, MediaConvert writes captions and data packets with Presentation Timestamp (PTS) values greater than or equal to the first video packet PTS (MediaConvert drops captions and data packets with lesser PTS values). Keep the default value (AUTO) to allow all PTS values.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsDataPtsControl {
#[allow(missing_docs)] // documentation missing in model
AlignToVideo,
#[allow(missing_docs)] // documentation missing in model
Auto,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsDataPtsControl {
fn from(s: &str) -> Self {
match s {
"ALIGN_TO_VIDEO" => M2tsDataPtsControl::AlignToVideo,
"AUTO" => M2tsDataPtsControl::Auto,
other => M2tsDataPtsControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsDataPtsControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsDataPtsControl::from(s))
}
}
impl M2tsDataPtsControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsDataPtsControl::AlignToVideo => "ALIGN_TO_VIDEO",
M2tsDataPtsControl::Auto => "AUTO",
M2tsDataPtsControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALIGN_TO_VIDEO", "AUTO"]
}
}
impl AsRef<str> for M2tsDataPtsControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, use multiplex buffer model. If set to NONE, this can lead to lower latency, but low-memory devices may not be able to play back the stream without interruptions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsBufferModel {
#[allow(missing_docs)] // documentation missing in model
Multiplex,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsBufferModel {
fn from(s: &str) -> Self {
match s {
"MULTIPLEX" => M2tsBufferModel::Multiplex,
"NONE" => M2tsBufferModel::None,
other => M2tsBufferModel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsBufferModel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsBufferModel::from(s))
}
}
impl M2tsBufferModel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsBufferModel::Multiplex => "MULTIPLEX",
M2tsBufferModel::None => "NONE",
M2tsBufferModel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MULTIPLEX", "NONE"]
}
}
impl AsRef<str> for M2tsBufferModel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsAudioDuration {
#[allow(missing_docs)] // documentation missing in model
DefaultCodecDuration,
#[allow(missing_docs)] // documentation missing in model
MatchVideoDuration,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsAudioDuration {
fn from(s: &str) -> Self {
match s {
"DEFAULT_CODEC_DURATION" => M2tsAudioDuration::DefaultCodecDuration,
"MATCH_VIDEO_DURATION" => M2tsAudioDuration::MatchVideoDuration,
other => M2tsAudioDuration::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsAudioDuration {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsAudioDuration::from(s))
}
}
impl M2tsAudioDuration {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsAudioDuration::DefaultCodecDuration => "DEFAULT_CODEC_DURATION",
M2tsAudioDuration::MatchVideoDuration => "MATCH_VIDEO_DURATION",
M2tsAudioDuration::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT_CODEC_DURATION", "MATCH_VIDEO_DURATION"]
}
}
impl AsRef<str> for M2tsAudioDuration {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Selects between the DVB and ATSC buffer models for Dolby Digital audio.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum M2tsAudioBufferModel {
#[allow(missing_docs)] // documentation missing in model
Atsc,
#[allow(missing_docs)] // documentation missing in model
Dvb,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for M2tsAudioBufferModel {
fn from(s: &str) -> Self {
match s {
"ATSC" => M2tsAudioBufferModel::Atsc,
"DVB" => M2tsAudioBufferModel::Dvb,
other => M2tsAudioBufferModel::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for M2tsAudioBufferModel {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(M2tsAudioBufferModel::from(s))
}
}
impl M2tsAudioBufferModel {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
M2tsAudioBufferModel::Atsc => "ATSC",
M2tsAudioBufferModel::Dvb => "DVB",
M2tsAudioBufferModel::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ATSC", "DVB"]
}
}
impl AsRef<str> for M2tsAudioBufferModel {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for F4v container
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct F4vSettings {
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub moov_placement: std::option::Option<crate::model::F4vMoovPlacement>,
}
impl F4vSettings {
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub fn moov_placement(&self) -> std::option::Option<&crate::model::F4vMoovPlacement> {
self.moov_placement.as_ref()
}
}
impl std::fmt::Debug for F4vSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("F4vSettings");
formatter.field("moov_placement", &self.moov_placement);
formatter.finish()
}
}
/// See [`F4vSettings`](crate::model::F4vSettings)
pub mod f4v_settings {
/// A builder for [`F4vSettings`](crate::model::F4vSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) moov_placement: std::option::Option<crate::model::F4vMoovPlacement>,
}
impl Builder {
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub fn moov_placement(mut self, input: crate::model::F4vMoovPlacement) -> Self {
self.moov_placement = Some(input);
self
}
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
pub fn set_moov_placement(
mut self,
input: std::option::Option<crate::model::F4vMoovPlacement>,
) -> Self {
self.moov_placement = input;
self
}
/// Consumes the builder and constructs a [`F4vSettings`](crate::model::F4vSettings)
pub fn build(self) -> crate::model::F4vSettings {
crate::model::F4vSettings {
moov_placement: self.moov_placement,
}
}
}
}
impl F4vSettings {
/// Creates a new builder-style object to manufacture [`F4vSettings`](crate::model::F4vSettings)
pub fn builder() -> crate::model::f4v_settings::Builder {
crate::model::f4v_settings::Builder::default()
}
}
/// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning of the archive as required for progressive downloading. Otherwise it is placed normally at the end.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum F4vMoovPlacement {
#[allow(missing_docs)] // documentation missing in model
Normal,
#[allow(missing_docs)] // documentation missing in model
ProgressiveDownload,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for F4vMoovPlacement {
fn from(s: &str) -> Self {
match s {
"NORMAL" => F4vMoovPlacement::Normal,
"PROGRESSIVE_DOWNLOAD" => F4vMoovPlacement::ProgressiveDownload,
other => F4vMoovPlacement::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for F4vMoovPlacement {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(F4vMoovPlacement::from(s))
}
}
impl F4vMoovPlacement {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
F4vMoovPlacement::Normal => "NORMAL",
F4vMoovPlacement::ProgressiveDownload => "PROGRESSIVE_DOWNLOAD",
F4vMoovPlacement::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NORMAL", "PROGRESSIVE_DOWNLOAD"]
}
}
impl AsRef<str> for F4vMoovPlacement {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Container for this output. Some containers require a container settings object. If not specified, the default object will be created.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ContainerType {
#[allow(missing_docs)] // documentation missing in model
Cmfc,
#[allow(missing_docs)] // documentation missing in model
F4V,
#[allow(missing_docs)] // documentation missing in model
Ismv,
#[allow(missing_docs)] // documentation missing in model
M2Ts,
#[allow(missing_docs)] // documentation missing in model
M3U8,
#[allow(missing_docs)] // documentation missing in model
Mov,
#[allow(missing_docs)] // documentation missing in model
Mp4,
#[allow(missing_docs)] // documentation missing in model
Mpd,
#[allow(missing_docs)] // documentation missing in model
Mxf,
#[allow(missing_docs)] // documentation missing in model
Raw,
#[allow(missing_docs)] // documentation missing in model
Webm,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ContainerType {
fn from(s: &str) -> Self {
match s {
"CMFC" => ContainerType::Cmfc,
"F4V" => ContainerType::F4V,
"ISMV" => ContainerType::Ismv,
"M2TS" => ContainerType::M2Ts,
"M3U8" => ContainerType::M3U8,
"MOV" => ContainerType::Mov,
"MP4" => ContainerType::Mp4,
"MPD" => ContainerType::Mpd,
"MXF" => ContainerType::Mxf,
"RAW" => ContainerType::Raw,
"WEBM" => ContainerType::Webm,
other => ContainerType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ContainerType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ContainerType::from(s))
}
}
impl ContainerType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ContainerType::Cmfc => "CMFC",
ContainerType::F4V => "F4V",
ContainerType::Ismv => "ISMV",
ContainerType::M2Ts => "M2TS",
ContainerType::M3U8 => "M3U8",
ContainerType::Mov => "MOV",
ContainerType::Mp4 => "MP4",
ContainerType::Mpd => "MPD",
ContainerType::Mxf => "MXF",
ContainerType::Raw => "RAW",
ContainerType::Webm => "WEBM",
ContainerType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"CMFC", "F4V", "ISMV", "M2TS", "M3U8", "MOV", "MP4", "MPD", "MXF", "RAW", "WEBM",
]
}
}
impl AsRef<str> for ContainerType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// These settings relate to the fragmented MP4 container for the segments in your CMAF outputs.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmfcSettings {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub audio_duration: std::option::Option<crate::model::CmfcAudioDuration>,
/// Specify the audio rendition group for this audio rendition. Specify up to one value for each audio output in your output group. This value appears in your HLS parent manifest in the EXT-X-MEDIA tag of TYPE=AUDIO, as the value for the GROUP-ID attribute. For example, if you specify "audio_aac_1" for Audio group ID, it appears in your manifest like this: #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_aac_1". Related setting: To associate the rendition group that this audio track belongs to with a video rendition, include the same value that you provide here for that video output's setting Audio rendition sets (audioRenditionSets).
pub audio_group_id: std::option::Option<std::string::String>,
/// List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs "audio_aac_1" and "audio_dolby". Then you would specify this value: "audio_aac_1,audio_dolby". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is "amazing_video_1.m3u8". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO="audio_aac_1"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO="audio_dolby"... amazing_video_1.m3u8
pub audio_rendition_sets: std::option::Option<std::string::String>,
/// Use this setting to control the values that MediaConvert puts in your HLS parent playlist to control how the client player selects which audio track to play. The other options for this setting determine the values that MediaConvert writes for the DEFAULT and AUTOSELECT attributes of the EXT-X-MEDIA entry for the audio variant. For more information about these attributes, see the Apple documentation article https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/adding_alternate_media_to_a_playlist. Choose Alternate audio, auto select, default (ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT) to set DEFAULT=YES and AUTOSELECT=YES. Choose this value for only one variant in your output group. Choose Alternate audio, auto select, not default (ALTERNATE_AUDIO_AUTO_SELECT) to set DEFAULT=NO and AUTOSELECT=YES. Choose Alternate Audio, Not Auto Select to set DEFAULT=NO and AUTOSELECT=NO. When you don't specify a value for this setting, MediaConvert defaults to Alternate audio, auto select, default. When there is more than one variant in your output group, you must explicitly choose a value for this setting.
pub audio_track_type: std::option::Option<crate::model::CmfcAudioTrackType>,
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub descriptive_video_service_flag:
std::option::Option<crate::model::CmfcDescriptiveVideoServiceFlag>,
/// Choose Include (INCLUDE) to have MediaConvert generate an HLS child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub i_frame_only_manifest: std::option::Option<crate::model::CmfcIFrameOnlyManifest>,
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub klv_metadata: std::option::Option<crate::model::CmfcKlvMetadata>,
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub scte35_esam: std::option::Option<crate::model::CmfcScte35Esam>,
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub scte35_source: std::option::Option<crate::model::CmfcScte35Source>,
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub timed_metadata: std::option::Option<crate::model::CmfcTimedMetadata>,
}
impl CmfcSettings {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(&self) -> std::option::Option<&crate::model::CmfcAudioDuration> {
self.audio_duration.as_ref()
}
/// Specify the audio rendition group for this audio rendition. Specify up to one value for each audio output in your output group. This value appears in your HLS parent manifest in the EXT-X-MEDIA tag of TYPE=AUDIO, as the value for the GROUP-ID attribute. For example, if you specify "audio_aac_1" for Audio group ID, it appears in your manifest like this: #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_aac_1". Related setting: To associate the rendition group that this audio track belongs to with a video rendition, include the same value that you provide here for that video output's setting Audio rendition sets (audioRenditionSets).
pub fn audio_group_id(&self) -> std::option::Option<&str> {
self.audio_group_id.as_deref()
}
/// List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs "audio_aac_1" and "audio_dolby". Then you would specify this value: "audio_aac_1,audio_dolby". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is "amazing_video_1.m3u8". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO="audio_aac_1"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO="audio_dolby"... amazing_video_1.m3u8
pub fn audio_rendition_sets(&self) -> std::option::Option<&str> {
self.audio_rendition_sets.as_deref()
}
/// Use this setting to control the values that MediaConvert puts in your HLS parent playlist to control how the client player selects which audio track to play. The other options for this setting determine the values that MediaConvert writes for the DEFAULT and AUTOSELECT attributes of the EXT-X-MEDIA entry for the audio variant. For more information about these attributes, see the Apple documentation article https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/adding_alternate_media_to_a_playlist. Choose Alternate audio, auto select, default (ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT) to set DEFAULT=YES and AUTOSELECT=YES. Choose this value for only one variant in your output group. Choose Alternate audio, auto select, not default (ALTERNATE_AUDIO_AUTO_SELECT) to set DEFAULT=NO and AUTOSELECT=YES. Choose Alternate Audio, Not Auto Select to set DEFAULT=NO and AUTOSELECT=NO. When you don't specify a value for this setting, MediaConvert defaults to Alternate audio, auto select, default. When there is more than one variant in your output group, you must explicitly choose a value for this setting.
pub fn audio_track_type(&self) -> std::option::Option<&crate::model::CmfcAudioTrackType> {
self.audio_track_type.as_ref()
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub fn descriptive_video_service_flag(
&self,
) -> std::option::Option<&crate::model::CmfcDescriptiveVideoServiceFlag> {
self.descriptive_video_service_flag.as_ref()
}
/// Choose Include (INCLUDE) to have MediaConvert generate an HLS child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub fn i_frame_only_manifest(
&self,
) -> std::option::Option<&crate::model::CmfcIFrameOnlyManifest> {
self.i_frame_only_manifest.as_ref()
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn klv_metadata(&self) -> std::option::Option<&crate::model::CmfcKlvMetadata> {
self.klv_metadata.as_ref()
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn scte35_esam(&self) -> std::option::Option<&crate::model::CmfcScte35Esam> {
self.scte35_esam.as_ref()
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub fn scte35_source(&self) -> std::option::Option<&crate::model::CmfcScte35Source> {
self.scte35_source.as_ref()
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub fn timed_metadata(&self) -> std::option::Option<&crate::model::CmfcTimedMetadata> {
self.timed_metadata.as_ref()
}
}
impl std::fmt::Debug for CmfcSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CmfcSettings");
formatter.field("audio_duration", &self.audio_duration);
formatter.field("audio_group_id", &self.audio_group_id);
formatter.field("audio_rendition_sets", &self.audio_rendition_sets);
formatter.field("audio_track_type", &self.audio_track_type);
formatter.field(
"descriptive_video_service_flag",
&self.descriptive_video_service_flag,
);
formatter.field("i_frame_only_manifest", &self.i_frame_only_manifest);
formatter.field("klv_metadata", &self.klv_metadata);
formatter.field("scte35_esam", &self.scte35_esam);
formatter.field("scte35_source", &self.scte35_source);
formatter.field("timed_metadata", &self.timed_metadata);
formatter.finish()
}
}
/// See [`CmfcSettings`](crate::model::CmfcSettings)
pub mod cmfc_settings {
/// A builder for [`CmfcSettings`](crate::model::CmfcSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_duration: std::option::Option<crate::model::CmfcAudioDuration>,
pub(crate) audio_group_id: std::option::Option<std::string::String>,
pub(crate) audio_rendition_sets: std::option::Option<std::string::String>,
pub(crate) audio_track_type: std::option::Option<crate::model::CmfcAudioTrackType>,
pub(crate) descriptive_video_service_flag:
std::option::Option<crate::model::CmfcDescriptiveVideoServiceFlag>,
pub(crate) i_frame_only_manifest: std::option::Option<crate::model::CmfcIFrameOnlyManifest>,
pub(crate) klv_metadata: std::option::Option<crate::model::CmfcKlvMetadata>,
pub(crate) scte35_esam: std::option::Option<crate::model::CmfcScte35Esam>,
pub(crate) scte35_source: std::option::Option<crate::model::CmfcScte35Source>,
pub(crate) timed_metadata: std::option::Option<crate::model::CmfcTimedMetadata>,
}
impl Builder {
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn audio_duration(mut self, input: crate::model::CmfcAudioDuration) -> Self {
self.audio_duration = Some(input);
self
}
/// Specify this setting only when your output will be consumed by a downstream repackaging workflow that is sensitive to very small duration differences between video and audio. For this situation, choose Match video duration (MATCH_VIDEO_DURATION). In all other cases, keep the default value, Default codec duration (DEFAULT_CODEC_DURATION). When you choose Match video duration, MediaConvert pads the output audio streams with silence or trims them to ensure that the total duration of each audio stream is at least as long as the total duration of the video stream. After padding or trimming, the audio stream duration is no more than one frame longer than the video stream. MediaConvert applies audio padding or trimming only to the end of the last segment of the output. For unsegmented outputs, MediaConvert adds padding only to the end of the file. When you keep the default value, any minor discrepancies between audio and video duration will depend on your output audio codec.
pub fn set_audio_duration(
mut self,
input: std::option::Option<crate::model::CmfcAudioDuration>,
) -> Self {
self.audio_duration = input;
self
}
/// Specify the audio rendition group for this audio rendition. Specify up to one value for each audio output in your output group. This value appears in your HLS parent manifest in the EXT-X-MEDIA tag of TYPE=AUDIO, as the value for the GROUP-ID attribute. For example, if you specify "audio_aac_1" for Audio group ID, it appears in your manifest like this: #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_aac_1". Related setting: To associate the rendition group that this audio track belongs to with a video rendition, include the same value that you provide here for that video output's setting Audio rendition sets (audioRenditionSets).
pub fn audio_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.audio_group_id = Some(input.into());
self
}
/// Specify the audio rendition group for this audio rendition. Specify up to one value for each audio output in your output group. This value appears in your HLS parent manifest in the EXT-X-MEDIA tag of TYPE=AUDIO, as the value for the GROUP-ID attribute. For example, if you specify "audio_aac_1" for Audio group ID, it appears in your manifest like this: #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_aac_1". Related setting: To associate the rendition group that this audio track belongs to with a video rendition, include the same value that you provide here for that video output's setting Audio rendition sets (audioRenditionSets).
pub fn set_audio_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.audio_group_id = input;
self
}
/// List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs "audio_aac_1" and "audio_dolby". Then you would specify this value: "audio_aac_1,audio_dolby". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is "amazing_video_1.m3u8". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO="audio_aac_1"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO="audio_dolby"... amazing_video_1.m3u8
pub fn audio_rendition_sets(mut self, input: impl Into<std::string::String>) -> Self {
self.audio_rendition_sets = Some(input.into());
self
}
/// List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs "audio_aac_1" and "audio_dolby". Then you would specify this value: "audio_aac_1,audio_dolby". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is "amazing_video_1.m3u8". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO="audio_aac_1"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO="audio_dolby"... amazing_video_1.m3u8
pub fn set_audio_rendition_sets(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.audio_rendition_sets = input;
self
}
/// Use this setting to control the values that MediaConvert puts in your HLS parent playlist to control how the client player selects which audio track to play. The other options for this setting determine the values that MediaConvert writes for the DEFAULT and AUTOSELECT attributes of the EXT-X-MEDIA entry for the audio variant. For more information about these attributes, see the Apple documentation article https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/adding_alternate_media_to_a_playlist. Choose Alternate audio, auto select, default (ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT) to set DEFAULT=YES and AUTOSELECT=YES. Choose this value for only one variant in your output group. Choose Alternate audio, auto select, not default (ALTERNATE_AUDIO_AUTO_SELECT) to set DEFAULT=NO and AUTOSELECT=YES. Choose Alternate Audio, Not Auto Select to set DEFAULT=NO and AUTOSELECT=NO. When you don't specify a value for this setting, MediaConvert defaults to Alternate audio, auto select, default. When there is more than one variant in your output group, you must explicitly choose a value for this setting.
pub fn audio_track_type(mut self, input: crate::model::CmfcAudioTrackType) -> Self {
self.audio_track_type = Some(input);
self
}
/// Use this setting to control the values that MediaConvert puts in your HLS parent playlist to control how the client player selects which audio track to play. The other options for this setting determine the values that MediaConvert writes for the DEFAULT and AUTOSELECT attributes of the EXT-X-MEDIA entry for the audio variant. For more information about these attributes, see the Apple documentation article https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/adding_alternate_media_to_a_playlist. Choose Alternate audio, auto select, default (ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT) to set DEFAULT=YES and AUTOSELECT=YES. Choose this value for only one variant in your output group. Choose Alternate audio, auto select, not default (ALTERNATE_AUDIO_AUTO_SELECT) to set DEFAULT=NO and AUTOSELECT=YES. Choose Alternate Audio, Not Auto Select to set DEFAULT=NO and AUTOSELECT=NO. When you don't specify a value for this setting, MediaConvert defaults to Alternate audio, auto select, default. When there is more than one variant in your output group, you must explicitly choose a value for this setting.
pub fn set_audio_track_type(
mut self,
input: std::option::Option<crate::model::CmfcAudioTrackType>,
) -> Self {
self.audio_track_type = input;
self
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub fn descriptive_video_service_flag(
mut self,
input: crate::model::CmfcDescriptiveVideoServiceFlag,
) -> Self {
self.descriptive_video_service_flag = Some(input);
self
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub fn set_descriptive_video_service_flag(
mut self,
input: std::option::Option<crate::model::CmfcDescriptiveVideoServiceFlag>,
) -> Self {
self.descriptive_video_service_flag = input;
self
}
/// Choose Include (INCLUDE) to have MediaConvert generate an HLS child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub fn i_frame_only_manifest(
mut self,
input: crate::model::CmfcIFrameOnlyManifest,
) -> Self {
self.i_frame_only_manifest = Some(input);
self
}
/// Choose Include (INCLUDE) to have MediaConvert generate an HLS child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub fn set_i_frame_only_manifest(
mut self,
input: std::option::Option<crate::model::CmfcIFrameOnlyManifest>,
) -> Self {
self.i_frame_only_manifest = input;
self
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn klv_metadata(mut self, input: crate::model::CmfcKlvMetadata) -> Self {
self.klv_metadata = Some(input);
self
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
pub fn set_klv_metadata(
mut self,
input: std::option::Option<crate::model::CmfcKlvMetadata>,
) -> Self {
self.klv_metadata = input;
self
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn scte35_esam(mut self, input: crate::model::CmfcScte35Esam) -> Self {
self.scte35_esam = Some(input);
self
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
pub fn set_scte35_esam(
mut self,
input: std::option::Option<crate::model::CmfcScte35Esam>,
) -> Self {
self.scte35_esam = input;
self
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub fn scte35_source(mut self, input: crate::model::CmfcScte35Source) -> Self {
self.scte35_source = Some(input);
self
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
pub fn set_scte35_source(
mut self,
input: std::option::Option<crate::model::CmfcScte35Source>,
) -> Self {
self.scte35_source = input;
self
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub fn timed_metadata(mut self, input: crate::model::CmfcTimedMetadata) -> Self {
self.timed_metadata = Some(input);
self
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
pub fn set_timed_metadata(
mut self,
input: std::option::Option<crate::model::CmfcTimedMetadata>,
) -> Self {
self.timed_metadata = input;
self
}
/// Consumes the builder and constructs a [`CmfcSettings`](crate::model::CmfcSettings)
pub fn build(self) -> crate::model::CmfcSettings {
crate::model::CmfcSettings {
audio_duration: self.audio_duration,
audio_group_id: self.audio_group_id,
audio_rendition_sets: self.audio_rendition_sets,
audio_track_type: self.audio_track_type,
descriptive_video_service_flag: self.descriptive_video_service_flag,
i_frame_only_manifest: self.i_frame_only_manifest,
klv_metadata: self.klv_metadata,
scte35_esam: self.scte35_esam,
scte35_source: self.scte35_source,
timed_metadata: self.timed_metadata,
}
}
}
}
impl CmfcSettings {
/// Creates a new builder-style object to manufacture [`CmfcSettings`](crate::model::CmfcSettings)
pub fn builder() -> crate::model::cmfc_settings::Builder {
crate::model::cmfc_settings::Builder::default()
}
}
/// To include ID3 metadata in this output: Set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). Specify this ID3 metadata in Custom ID3 metadata inserter (timedMetadataInsertion). MediaConvert writes each instance of ID3 metadata in a separate Event Message (eMSG) box. To exclude this ID3 metadata: Set ID3 metadata to None (NONE) or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcTimedMetadata {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcTimedMetadata {
fn from(s: &str) -> Self {
match s {
"NONE" => CmfcTimedMetadata::None,
"PASSTHROUGH" => CmfcTimedMetadata::Passthrough,
other => CmfcTimedMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcTimedMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcTimedMetadata::from(s))
}
}
impl CmfcTimedMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcTimedMetadata::None => "NONE",
CmfcTimedMetadata::Passthrough => "PASSTHROUGH",
CmfcTimedMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for CmfcTimedMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless you have SCTE-35 markers in your input video file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that appear in your input to also appear in this output. Choose None (NONE) if you don't want those SCTE-35 markers in this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcScte35Source {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcScte35Source {
fn from(s: &str) -> Self {
match s {
"NONE" => CmfcScte35Source::None,
"PASSTHROUGH" => CmfcScte35Source::Passthrough,
other => CmfcScte35Source::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcScte35Source {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcScte35Source::from(s))
}
}
impl CmfcScte35Source {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcScte35Source::None => "NONE",
CmfcScte35Source::Passthrough => "PASSTHROUGH",
CmfcScte35Source::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for CmfcScte35Source {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting only when you specify SCTE-35 markers from ESAM. Choose INSERT to put SCTE-35 markers in this output at the insertion points that you specify in an ESAM XML document. Provide the document in the setting SCC XML (sccXml).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcScte35Esam {
#[allow(missing_docs)] // documentation missing in model
Insert,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcScte35Esam {
fn from(s: &str) -> Self {
match s {
"INSERT" => CmfcScte35Esam::Insert,
"NONE" => CmfcScte35Esam::None,
other => CmfcScte35Esam::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcScte35Esam {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcScte35Esam::from(s))
}
}
impl CmfcScte35Esam {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcScte35Esam::Insert => "INSERT",
CmfcScte35Esam::None => "NONE",
CmfcScte35Esam::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INSERT", "NONE"]
}
}
impl AsRef<str> for CmfcScte35Esam {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// To include key-length-value metadata in this output: Set KLV metadata insertion to Passthrough. MediaConvert reads KLV metadata present in your input and writes each instance to a separate event message box in the output, according to MISB ST1910.1. To exclude this KLV metadata: Set KLV metadata insertion to None or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcKlvMetadata {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcKlvMetadata {
fn from(s: &str) -> Self {
match s {
"NONE" => CmfcKlvMetadata::None,
"PASSTHROUGH" => CmfcKlvMetadata::Passthrough,
other => CmfcKlvMetadata::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcKlvMetadata {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcKlvMetadata::from(s))
}
}
impl CmfcKlvMetadata {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcKlvMetadata::None => "NONE",
CmfcKlvMetadata::Passthrough => "PASSTHROUGH",
CmfcKlvMetadata::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PASSTHROUGH"]
}
}
impl AsRef<str> for CmfcKlvMetadata {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose Include (INCLUDE) to have MediaConvert generate an HLS child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcIFrameOnlyManifest {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcIFrameOnlyManifest {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => CmfcIFrameOnlyManifest::Exclude,
"INCLUDE" => CmfcIFrameOnlyManifest::Include,
other => CmfcIFrameOnlyManifest::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcIFrameOnlyManifest {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcIFrameOnlyManifest::from(s))
}
}
impl CmfcIFrameOnlyManifest {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcIFrameOnlyManifest::Exclude => "EXCLUDE",
CmfcIFrameOnlyManifest::Include => "INCLUDE",
CmfcIFrameOnlyManifest::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for CmfcIFrameOnlyManifest {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcDescriptiveVideoServiceFlag {
#[allow(missing_docs)] // documentation missing in model
DontFlag,
#[allow(missing_docs)] // documentation missing in model
Flag,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcDescriptiveVideoServiceFlag {
fn from(s: &str) -> Self {
match s {
"DONT_FLAG" => CmfcDescriptiveVideoServiceFlag::DontFlag,
"FLAG" => CmfcDescriptiveVideoServiceFlag::Flag,
other => CmfcDescriptiveVideoServiceFlag::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcDescriptiveVideoServiceFlag {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcDescriptiveVideoServiceFlag::from(s))
}
}
impl CmfcDescriptiveVideoServiceFlag {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcDescriptiveVideoServiceFlag::DontFlag => "DONT_FLAG",
CmfcDescriptiveVideoServiceFlag::Flag => "FLAG",
CmfcDescriptiveVideoServiceFlag::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DONT_FLAG", "FLAG"]
}
}
impl AsRef<str> for CmfcDescriptiveVideoServiceFlag {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting to control the values that MediaConvert puts in your HLS parent playlist to control how the client player selects which audio track to play. The other options for this setting determine the values that MediaConvert writes for the DEFAULT and AUTOSELECT attributes of the EXT-X-MEDIA entry for the audio variant. For more information about these attributes, see the Apple documentation article https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/adding_alternate_media_to_a_playlist. Choose Alternate audio, auto select, default (ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT) to set DEFAULT=YES and AUTOSELECT=YES. Choose this value for only one variant in your output group. Choose Alternate audio, auto select, not default (ALTERNATE_AUDIO_AUTO_SELECT) to set DEFAULT=NO and AUTOSELECT=YES. Choose Alternate Audio, Not Auto Select to set DEFAULT=NO and AUTOSELECT=NO. When you don't specify a value for this setting, MediaConvert defaults to Alternate audio, auto select, default. When there is more than one variant in your output group, you must explicitly choose a value for this setting.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmfcAudioTrackType {
#[allow(missing_docs)] // documentation missing in model
AlternateAudioAutoSelect,
#[allow(missing_docs)] // documentation missing in model
AlternateAudioAutoSelectDefault,
#[allow(missing_docs)] // documentation missing in model
AlternateAudioNotAutoSelect,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmfcAudioTrackType {
fn from(s: &str) -> Self {
match s {
"ALTERNATE_AUDIO_AUTO_SELECT" => CmfcAudioTrackType::AlternateAudioAutoSelect,
"ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" => {
CmfcAudioTrackType::AlternateAudioAutoSelectDefault
}
"ALTERNATE_AUDIO_NOT_AUTO_SELECT" => CmfcAudioTrackType::AlternateAudioNotAutoSelect,
other => CmfcAudioTrackType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmfcAudioTrackType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmfcAudioTrackType::from(s))
}
}
impl CmfcAudioTrackType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmfcAudioTrackType::AlternateAudioAutoSelect => "ALTERNATE_AUDIO_AUTO_SELECT",
CmfcAudioTrackType::AlternateAudioAutoSelectDefault => {
"ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT"
}
CmfcAudioTrackType::AlternateAudioNotAutoSelect => "ALTERNATE_AUDIO_NOT_AUTO_SELECT",
CmfcAudioTrackType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ALTERNATE_AUDIO_AUTO_SELECT",
"ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT",
"ALTERNATE_AUDIO_NOT_AUTO_SELECT",
]
}
}
impl AsRef<str> for CmfcAudioTrackType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Caption Description for preset
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptionDescriptionPreset {
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub custom_language_code: std::option::Option<std::string::String>,
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub destination_settings: std::option::Option<crate::model::CaptionDestinationSettings>,
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub language_code: std::option::Option<crate::model::LanguageCode>,
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub language_description: std::option::Option<std::string::String>,
}
impl CaptionDescriptionPreset {
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn custom_language_code(&self) -> std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub fn destination_settings(
&self,
) -> std::option::Option<&crate::model::CaptionDestinationSettings> {
self.destination_settings.as_ref()
}
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn language_description(&self) -> std::option::Option<&str> {
self.language_description.as_deref()
}
}
impl std::fmt::Debug for CaptionDescriptionPreset {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptionDescriptionPreset");
formatter.field("custom_language_code", &self.custom_language_code);
formatter.field("destination_settings", &self.destination_settings);
formatter.field("language_code", &self.language_code);
formatter.field("language_description", &self.language_description);
formatter.finish()
}
}
/// See [`CaptionDescriptionPreset`](crate::model::CaptionDescriptionPreset)
pub mod caption_description_preset {
/// A builder for [`CaptionDescriptionPreset`](crate::model::CaptionDescriptionPreset)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) custom_language_code: std::option::Option<std::string::String>,
pub(crate) destination_settings:
std::option::Option<crate::model::CaptionDestinationSettings>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) language_description: std::option::Option<std::string::String>,
}
impl Builder {
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn custom_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_language_code = Some(input.into());
self
}
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn set_custom_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_language_code = input;
self
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub fn destination_settings(
mut self,
input: crate::model::CaptionDestinationSettings,
) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::CaptionDestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn language_description(mut self, input: impl Into<std::string::String>) -> Self {
self.language_description = Some(input.into());
self
}
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn set_language_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.language_description = input;
self
}
/// Consumes the builder and constructs a [`CaptionDescriptionPreset`](crate::model::CaptionDescriptionPreset)
pub fn build(self) -> crate::model::CaptionDescriptionPreset {
crate::model::CaptionDescriptionPreset {
custom_language_code: self.custom_language_code,
destination_settings: self.destination_settings,
language_code: self.language_code,
language_description: self.language_description,
}
}
}
}
impl CaptionDescriptionPreset {
/// Creates a new builder-style object to manufacture [`CaptionDescriptionPreset`](crate::model::CaptionDescriptionPreset)
pub fn builder() -> crate::model::caption_description_preset::Builder {
crate::model::caption_description_preset::Builder::default()
}
}
/// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum LanguageCode {
#[allow(missing_docs)] // documentation missing in model
Aar,
#[allow(missing_docs)] // documentation missing in model
Abk,
#[allow(missing_docs)] // documentation missing in model
Afr,
#[allow(missing_docs)] // documentation missing in model
Aka,
#[allow(missing_docs)] // documentation missing in model
Amh,
#[allow(missing_docs)] // documentation missing in model
Ara,
#[allow(missing_docs)] // documentation missing in model
Arg,
#[allow(missing_docs)] // documentation missing in model
Asm,
#[allow(missing_docs)] // documentation missing in model
Ava,
#[allow(missing_docs)] // documentation missing in model
Ave,
#[allow(missing_docs)] // documentation missing in model
Aym,
#[allow(missing_docs)] // documentation missing in model
Aze,
#[allow(missing_docs)] // documentation missing in model
Bak,
#[allow(missing_docs)] // documentation missing in model
Bam,
#[allow(missing_docs)] // documentation missing in model
Bel,
#[allow(missing_docs)] // documentation missing in model
Ben,
#[allow(missing_docs)] // documentation missing in model
Bih,
#[allow(missing_docs)] // documentation missing in model
Bis,
#[allow(missing_docs)] // documentation missing in model
Bod,
#[allow(missing_docs)] // documentation missing in model
Bos,
#[allow(missing_docs)] // documentation missing in model
Bre,
#[allow(missing_docs)] // documentation missing in model
Bul,
#[allow(missing_docs)] // documentation missing in model
Cat,
#[allow(missing_docs)] // documentation missing in model
Ces,
#[allow(missing_docs)] // documentation missing in model
Cha,
#[allow(missing_docs)] // documentation missing in model
Che,
#[allow(missing_docs)] // documentation missing in model
Chu,
#[allow(missing_docs)] // documentation missing in model
Chv,
#[allow(missing_docs)] // documentation missing in model
Cor,
#[allow(missing_docs)] // documentation missing in model
Cos,
#[allow(missing_docs)] // documentation missing in model
Cre,
#[allow(missing_docs)] // documentation missing in model
Cym,
#[allow(missing_docs)] // documentation missing in model
Dan,
#[allow(missing_docs)] // documentation missing in model
Deu,
#[allow(missing_docs)] // documentation missing in model
Div,
#[allow(missing_docs)] // documentation missing in model
Dzo,
#[allow(missing_docs)] // documentation missing in model
Ell,
#[allow(missing_docs)] // documentation missing in model
Eng,
#[allow(missing_docs)] // documentation missing in model
Enm,
#[allow(missing_docs)] // documentation missing in model
Epo,
#[allow(missing_docs)] // documentation missing in model
Est,
#[allow(missing_docs)] // documentation missing in model
Eus,
#[allow(missing_docs)] // documentation missing in model
Ewe,
#[allow(missing_docs)] // documentation missing in model
Fao,
#[allow(missing_docs)] // documentation missing in model
Fas,
#[allow(missing_docs)] // documentation missing in model
Fij,
#[allow(missing_docs)] // documentation missing in model
Fin,
#[allow(missing_docs)] // documentation missing in model
Fra,
#[allow(missing_docs)] // documentation missing in model
Frm,
#[allow(missing_docs)] // documentation missing in model
Fry,
#[allow(missing_docs)] // documentation missing in model
Ful,
#[allow(missing_docs)] // documentation missing in model
Ger,
#[allow(missing_docs)] // documentation missing in model
Gla,
#[allow(missing_docs)] // documentation missing in model
Gle,
#[allow(missing_docs)] // documentation missing in model
Glg,
#[allow(missing_docs)] // documentation missing in model
Glv,
#[allow(missing_docs)] // documentation missing in model
Grn,
#[allow(missing_docs)] // documentation missing in model
Guj,
#[allow(missing_docs)] // documentation missing in model
Hat,
#[allow(missing_docs)] // documentation missing in model
Hau,
#[allow(missing_docs)] // documentation missing in model
Heb,
#[allow(missing_docs)] // documentation missing in model
Her,
#[allow(missing_docs)] // documentation missing in model
Hin,
#[allow(missing_docs)] // documentation missing in model
Hmo,
#[allow(missing_docs)] // documentation missing in model
Hrv,
#[allow(missing_docs)] // documentation missing in model
Hun,
#[allow(missing_docs)] // documentation missing in model
Hye,
#[allow(missing_docs)] // documentation missing in model
Ibo,
#[allow(missing_docs)] // documentation missing in model
Ido,
#[allow(missing_docs)] // documentation missing in model
Iii,
#[allow(missing_docs)] // documentation missing in model
Iku,
#[allow(missing_docs)] // documentation missing in model
Ile,
#[allow(missing_docs)] // documentation missing in model
Ina,
#[allow(missing_docs)] // documentation missing in model
Ind,
#[allow(missing_docs)] // documentation missing in model
Ipk,
#[allow(missing_docs)] // documentation missing in model
Isl,
#[allow(missing_docs)] // documentation missing in model
Ita,
#[allow(missing_docs)] // documentation missing in model
Jav,
#[allow(missing_docs)] // documentation missing in model
Jpn,
#[allow(missing_docs)] // documentation missing in model
Kal,
#[allow(missing_docs)] // documentation missing in model
Kan,
#[allow(missing_docs)] // documentation missing in model
Kas,
#[allow(missing_docs)] // documentation missing in model
Kat,
#[allow(missing_docs)] // documentation missing in model
Kau,
#[allow(missing_docs)] // documentation missing in model
Kaz,
#[allow(missing_docs)] // documentation missing in model
Khm,
#[allow(missing_docs)] // documentation missing in model
Kik,
#[allow(missing_docs)] // documentation missing in model
Kin,
#[allow(missing_docs)] // documentation missing in model
Kir,
#[allow(missing_docs)] // documentation missing in model
Kom,
#[allow(missing_docs)] // documentation missing in model
Kon,
#[allow(missing_docs)] // documentation missing in model
Kor,
#[allow(missing_docs)] // documentation missing in model
Kua,
#[allow(missing_docs)] // documentation missing in model
Kur,
#[allow(missing_docs)] // documentation missing in model
Lao,
#[allow(missing_docs)] // documentation missing in model
Lat,
#[allow(missing_docs)] // documentation missing in model
Lav,
#[allow(missing_docs)] // documentation missing in model
Lim,
#[allow(missing_docs)] // documentation missing in model
Lin,
#[allow(missing_docs)] // documentation missing in model
Lit,
#[allow(missing_docs)] // documentation missing in model
Ltz,
#[allow(missing_docs)] // documentation missing in model
Lub,
#[allow(missing_docs)] // documentation missing in model
Lug,
#[allow(missing_docs)] // documentation missing in model
Mah,
#[allow(missing_docs)] // documentation missing in model
Mal,
#[allow(missing_docs)] // documentation missing in model
Mar,
#[allow(missing_docs)] // documentation missing in model
Mkd,
#[allow(missing_docs)] // documentation missing in model
Mlg,
#[allow(missing_docs)] // documentation missing in model
Mlt,
#[allow(missing_docs)] // documentation missing in model
Mon,
#[allow(missing_docs)] // documentation missing in model
Mri,
#[allow(missing_docs)] // documentation missing in model
Msa,
#[allow(missing_docs)] // documentation missing in model
Mya,
#[allow(missing_docs)] // documentation missing in model
Nau,
#[allow(missing_docs)] // documentation missing in model
Nav,
#[allow(missing_docs)] // documentation missing in model
Nbl,
#[allow(missing_docs)] // documentation missing in model
Nde,
#[allow(missing_docs)] // documentation missing in model
Ndo,
#[allow(missing_docs)] // documentation missing in model
Nep,
#[allow(missing_docs)] // documentation missing in model
Nld,
#[allow(missing_docs)] // documentation missing in model
Nno,
#[allow(missing_docs)] // documentation missing in model
Nob,
#[allow(missing_docs)] // documentation missing in model
Nor,
#[allow(missing_docs)] // documentation missing in model
Nya,
#[allow(missing_docs)] // documentation missing in model
Oci,
#[allow(missing_docs)] // documentation missing in model
Oji,
#[allow(missing_docs)] // documentation missing in model
Ori,
#[allow(missing_docs)] // documentation missing in model
Orj,
#[allow(missing_docs)] // documentation missing in model
Orm,
#[allow(missing_docs)] // documentation missing in model
Oss,
#[allow(missing_docs)] // documentation missing in model
Pan,
#[allow(missing_docs)] // documentation missing in model
Pli,
#[allow(missing_docs)] // documentation missing in model
Pol,
#[allow(missing_docs)] // documentation missing in model
Por,
#[allow(missing_docs)] // documentation missing in model
Pus,
#[allow(missing_docs)] // documentation missing in model
Qaa,
#[allow(missing_docs)] // documentation missing in model
Qpc,
#[allow(missing_docs)] // documentation missing in model
Que,
#[allow(missing_docs)] // documentation missing in model
Roh,
#[allow(missing_docs)] // documentation missing in model
Ron,
#[allow(missing_docs)] // documentation missing in model
Run,
#[allow(missing_docs)] // documentation missing in model
Rus,
#[allow(missing_docs)] // documentation missing in model
Sag,
#[allow(missing_docs)] // documentation missing in model
San,
#[allow(missing_docs)] // documentation missing in model
Sin,
#[allow(missing_docs)] // documentation missing in model
Slk,
#[allow(missing_docs)] // documentation missing in model
Slv,
#[allow(missing_docs)] // documentation missing in model
Sme,
#[allow(missing_docs)] // documentation missing in model
Smo,
#[allow(missing_docs)] // documentation missing in model
Sna,
#[allow(missing_docs)] // documentation missing in model
Snd,
#[allow(missing_docs)] // documentation missing in model
Som,
#[allow(missing_docs)] // documentation missing in model
Sot,
#[allow(missing_docs)] // documentation missing in model
Spa,
#[allow(missing_docs)] // documentation missing in model
Sqi,
#[allow(missing_docs)] // documentation missing in model
Srb,
#[allow(missing_docs)] // documentation missing in model
Srd,
#[allow(missing_docs)] // documentation missing in model
Srp,
#[allow(missing_docs)] // documentation missing in model
Ssw,
#[allow(missing_docs)] // documentation missing in model
Sun,
#[allow(missing_docs)] // documentation missing in model
Swa,
#[allow(missing_docs)] // documentation missing in model
Swe,
#[allow(missing_docs)] // documentation missing in model
Tah,
#[allow(missing_docs)] // documentation missing in model
Tam,
#[allow(missing_docs)] // documentation missing in model
Tat,
#[allow(missing_docs)] // documentation missing in model
Tel,
#[allow(missing_docs)] // documentation missing in model
Tgk,
#[allow(missing_docs)] // documentation missing in model
Tgl,
#[allow(missing_docs)] // documentation missing in model
Tha,
#[allow(missing_docs)] // documentation missing in model
Tir,
#[allow(missing_docs)] // documentation missing in model
Tng,
#[allow(missing_docs)] // documentation missing in model
Ton,
#[allow(missing_docs)] // documentation missing in model
Tsn,
#[allow(missing_docs)] // documentation missing in model
Tso,
#[allow(missing_docs)] // documentation missing in model
Tuk,
#[allow(missing_docs)] // documentation missing in model
Tur,
#[allow(missing_docs)] // documentation missing in model
Twi,
#[allow(missing_docs)] // documentation missing in model
Uig,
#[allow(missing_docs)] // documentation missing in model
Ukr,
#[allow(missing_docs)] // documentation missing in model
Urd,
#[allow(missing_docs)] // documentation missing in model
Uzb,
#[allow(missing_docs)] // documentation missing in model
Ven,
#[allow(missing_docs)] // documentation missing in model
Vie,
#[allow(missing_docs)] // documentation missing in model
Vol,
#[allow(missing_docs)] // documentation missing in model
Wln,
#[allow(missing_docs)] // documentation missing in model
Wol,
#[allow(missing_docs)] // documentation missing in model
Xho,
#[allow(missing_docs)] // documentation missing in model
Yid,
#[allow(missing_docs)] // documentation missing in model
Yor,
#[allow(missing_docs)] // documentation missing in model
Zha,
#[allow(missing_docs)] // documentation missing in model
Zho,
#[allow(missing_docs)] // documentation missing in model
Zul,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for LanguageCode {
fn from(s: &str) -> Self {
match s {
"AAR" => LanguageCode::Aar,
"ABK" => LanguageCode::Abk,
"AFR" => LanguageCode::Afr,
"AKA" => LanguageCode::Aka,
"AMH" => LanguageCode::Amh,
"ARA" => LanguageCode::Ara,
"ARG" => LanguageCode::Arg,
"ASM" => LanguageCode::Asm,
"AVA" => LanguageCode::Ava,
"AVE" => LanguageCode::Ave,
"AYM" => LanguageCode::Aym,
"AZE" => LanguageCode::Aze,
"BAK" => LanguageCode::Bak,
"BAM" => LanguageCode::Bam,
"BEL" => LanguageCode::Bel,
"BEN" => LanguageCode::Ben,
"BIH" => LanguageCode::Bih,
"BIS" => LanguageCode::Bis,
"BOD" => LanguageCode::Bod,
"BOS" => LanguageCode::Bos,
"BRE" => LanguageCode::Bre,
"BUL" => LanguageCode::Bul,
"CAT" => LanguageCode::Cat,
"CES" => LanguageCode::Ces,
"CHA" => LanguageCode::Cha,
"CHE" => LanguageCode::Che,
"CHU" => LanguageCode::Chu,
"CHV" => LanguageCode::Chv,
"COR" => LanguageCode::Cor,
"COS" => LanguageCode::Cos,
"CRE" => LanguageCode::Cre,
"CYM" => LanguageCode::Cym,
"DAN" => LanguageCode::Dan,
"DEU" => LanguageCode::Deu,
"DIV" => LanguageCode::Div,
"DZO" => LanguageCode::Dzo,
"ELL" => LanguageCode::Ell,
"ENG" => LanguageCode::Eng,
"ENM" => LanguageCode::Enm,
"EPO" => LanguageCode::Epo,
"EST" => LanguageCode::Est,
"EUS" => LanguageCode::Eus,
"EWE" => LanguageCode::Ewe,
"FAO" => LanguageCode::Fao,
"FAS" => LanguageCode::Fas,
"FIJ" => LanguageCode::Fij,
"FIN" => LanguageCode::Fin,
"FRA" => LanguageCode::Fra,
"FRM" => LanguageCode::Frm,
"FRY" => LanguageCode::Fry,
"FUL" => LanguageCode::Ful,
"GER" => LanguageCode::Ger,
"GLA" => LanguageCode::Gla,
"GLE" => LanguageCode::Gle,
"GLG" => LanguageCode::Glg,
"GLV" => LanguageCode::Glv,
"GRN" => LanguageCode::Grn,
"GUJ" => LanguageCode::Guj,
"HAT" => LanguageCode::Hat,
"HAU" => LanguageCode::Hau,
"HEB" => LanguageCode::Heb,
"HER" => LanguageCode::Her,
"HIN" => LanguageCode::Hin,
"HMO" => LanguageCode::Hmo,
"HRV" => LanguageCode::Hrv,
"HUN" => LanguageCode::Hun,
"HYE" => LanguageCode::Hye,
"IBO" => LanguageCode::Ibo,
"IDO" => LanguageCode::Ido,
"III" => LanguageCode::Iii,
"IKU" => LanguageCode::Iku,
"ILE" => LanguageCode::Ile,
"INA" => LanguageCode::Ina,
"IND" => LanguageCode::Ind,
"IPK" => LanguageCode::Ipk,
"ISL" => LanguageCode::Isl,
"ITA" => LanguageCode::Ita,
"JAV" => LanguageCode::Jav,
"JPN" => LanguageCode::Jpn,
"KAL" => LanguageCode::Kal,
"KAN" => LanguageCode::Kan,
"KAS" => LanguageCode::Kas,
"KAT" => LanguageCode::Kat,
"KAU" => LanguageCode::Kau,
"KAZ" => LanguageCode::Kaz,
"KHM" => LanguageCode::Khm,
"KIK" => LanguageCode::Kik,
"KIN" => LanguageCode::Kin,
"KIR" => LanguageCode::Kir,
"KOM" => LanguageCode::Kom,
"KON" => LanguageCode::Kon,
"KOR" => LanguageCode::Kor,
"KUA" => LanguageCode::Kua,
"KUR" => LanguageCode::Kur,
"LAO" => LanguageCode::Lao,
"LAT" => LanguageCode::Lat,
"LAV" => LanguageCode::Lav,
"LIM" => LanguageCode::Lim,
"LIN" => LanguageCode::Lin,
"LIT" => LanguageCode::Lit,
"LTZ" => LanguageCode::Ltz,
"LUB" => LanguageCode::Lub,
"LUG" => LanguageCode::Lug,
"MAH" => LanguageCode::Mah,
"MAL" => LanguageCode::Mal,
"MAR" => LanguageCode::Mar,
"MKD" => LanguageCode::Mkd,
"MLG" => LanguageCode::Mlg,
"MLT" => LanguageCode::Mlt,
"MON" => LanguageCode::Mon,
"MRI" => LanguageCode::Mri,
"MSA" => LanguageCode::Msa,
"MYA" => LanguageCode::Mya,
"NAU" => LanguageCode::Nau,
"NAV" => LanguageCode::Nav,
"NBL" => LanguageCode::Nbl,
"NDE" => LanguageCode::Nde,
"NDO" => LanguageCode::Ndo,
"NEP" => LanguageCode::Nep,
"NLD" => LanguageCode::Nld,
"NNO" => LanguageCode::Nno,
"NOB" => LanguageCode::Nob,
"NOR" => LanguageCode::Nor,
"NYA" => LanguageCode::Nya,
"OCI" => LanguageCode::Oci,
"OJI" => LanguageCode::Oji,
"ORI" => LanguageCode::Ori,
"ORJ" => LanguageCode::Orj,
"ORM" => LanguageCode::Orm,
"OSS" => LanguageCode::Oss,
"PAN" => LanguageCode::Pan,
"PLI" => LanguageCode::Pli,
"POL" => LanguageCode::Pol,
"POR" => LanguageCode::Por,
"PUS" => LanguageCode::Pus,
"QAA" => LanguageCode::Qaa,
"QPC" => LanguageCode::Qpc,
"QUE" => LanguageCode::Que,
"ROH" => LanguageCode::Roh,
"RON" => LanguageCode::Ron,
"RUN" => LanguageCode::Run,
"RUS" => LanguageCode::Rus,
"SAG" => LanguageCode::Sag,
"SAN" => LanguageCode::San,
"SIN" => LanguageCode::Sin,
"SLK" => LanguageCode::Slk,
"SLV" => LanguageCode::Slv,
"SME" => LanguageCode::Sme,
"SMO" => LanguageCode::Smo,
"SNA" => LanguageCode::Sna,
"SND" => LanguageCode::Snd,
"SOM" => LanguageCode::Som,
"SOT" => LanguageCode::Sot,
"SPA" => LanguageCode::Spa,
"SQI" => LanguageCode::Sqi,
"SRB" => LanguageCode::Srb,
"SRD" => LanguageCode::Srd,
"SRP" => LanguageCode::Srp,
"SSW" => LanguageCode::Ssw,
"SUN" => LanguageCode::Sun,
"SWA" => LanguageCode::Swa,
"SWE" => LanguageCode::Swe,
"TAH" => LanguageCode::Tah,
"TAM" => LanguageCode::Tam,
"TAT" => LanguageCode::Tat,
"TEL" => LanguageCode::Tel,
"TGK" => LanguageCode::Tgk,
"TGL" => LanguageCode::Tgl,
"THA" => LanguageCode::Tha,
"TIR" => LanguageCode::Tir,
"TNG" => LanguageCode::Tng,
"TON" => LanguageCode::Ton,
"TSN" => LanguageCode::Tsn,
"TSO" => LanguageCode::Tso,
"TUK" => LanguageCode::Tuk,
"TUR" => LanguageCode::Tur,
"TWI" => LanguageCode::Twi,
"UIG" => LanguageCode::Uig,
"UKR" => LanguageCode::Ukr,
"URD" => LanguageCode::Urd,
"UZB" => LanguageCode::Uzb,
"VEN" => LanguageCode::Ven,
"VIE" => LanguageCode::Vie,
"VOL" => LanguageCode::Vol,
"WLN" => LanguageCode::Wln,
"WOL" => LanguageCode::Wol,
"XHO" => LanguageCode::Xho,
"YID" => LanguageCode::Yid,
"YOR" => LanguageCode::Yor,
"ZHA" => LanguageCode::Zha,
"ZHO" => LanguageCode::Zho,
"ZUL" => LanguageCode::Zul,
other => LanguageCode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for LanguageCode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(LanguageCode::from(s))
}
}
impl LanguageCode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
LanguageCode::Aar => "AAR",
LanguageCode::Abk => "ABK",
LanguageCode::Afr => "AFR",
LanguageCode::Aka => "AKA",
LanguageCode::Amh => "AMH",
LanguageCode::Ara => "ARA",
LanguageCode::Arg => "ARG",
LanguageCode::Asm => "ASM",
LanguageCode::Ava => "AVA",
LanguageCode::Ave => "AVE",
LanguageCode::Aym => "AYM",
LanguageCode::Aze => "AZE",
LanguageCode::Bak => "BAK",
LanguageCode::Bam => "BAM",
LanguageCode::Bel => "BEL",
LanguageCode::Ben => "BEN",
LanguageCode::Bih => "BIH",
LanguageCode::Bis => "BIS",
LanguageCode::Bod => "BOD",
LanguageCode::Bos => "BOS",
LanguageCode::Bre => "BRE",
LanguageCode::Bul => "BUL",
LanguageCode::Cat => "CAT",
LanguageCode::Ces => "CES",
LanguageCode::Cha => "CHA",
LanguageCode::Che => "CHE",
LanguageCode::Chu => "CHU",
LanguageCode::Chv => "CHV",
LanguageCode::Cor => "COR",
LanguageCode::Cos => "COS",
LanguageCode::Cre => "CRE",
LanguageCode::Cym => "CYM",
LanguageCode::Dan => "DAN",
LanguageCode::Deu => "DEU",
LanguageCode::Div => "DIV",
LanguageCode::Dzo => "DZO",
LanguageCode::Ell => "ELL",
LanguageCode::Eng => "ENG",
LanguageCode::Enm => "ENM",
LanguageCode::Epo => "EPO",
LanguageCode::Est => "EST",
LanguageCode::Eus => "EUS",
LanguageCode::Ewe => "EWE",
LanguageCode::Fao => "FAO",
LanguageCode::Fas => "FAS",
LanguageCode::Fij => "FIJ",
LanguageCode::Fin => "FIN",
LanguageCode::Fra => "FRA",
LanguageCode::Frm => "FRM",
LanguageCode::Fry => "FRY",
LanguageCode::Ful => "FUL",
LanguageCode::Ger => "GER",
LanguageCode::Gla => "GLA",
LanguageCode::Gle => "GLE",
LanguageCode::Glg => "GLG",
LanguageCode::Glv => "GLV",
LanguageCode::Grn => "GRN",
LanguageCode::Guj => "GUJ",
LanguageCode::Hat => "HAT",
LanguageCode::Hau => "HAU",
LanguageCode::Heb => "HEB",
LanguageCode::Her => "HER",
LanguageCode::Hin => "HIN",
LanguageCode::Hmo => "HMO",
LanguageCode::Hrv => "HRV",
LanguageCode::Hun => "HUN",
LanguageCode::Hye => "HYE",
LanguageCode::Ibo => "IBO",
LanguageCode::Ido => "IDO",
LanguageCode::Iii => "III",
LanguageCode::Iku => "IKU",
LanguageCode::Ile => "ILE",
LanguageCode::Ina => "INA",
LanguageCode::Ind => "IND",
LanguageCode::Ipk => "IPK",
LanguageCode::Isl => "ISL",
LanguageCode::Ita => "ITA",
LanguageCode::Jav => "JAV",
LanguageCode::Jpn => "JPN",
LanguageCode::Kal => "KAL",
LanguageCode::Kan => "KAN",
LanguageCode::Kas => "KAS",
LanguageCode::Kat => "KAT",
LanguageCode::Kau => "KAU",
LanguageCode::Kaz => "KAZ",
LanguageCode::Khm => "KHM",
LanguageCode::Kik => "KIK",
LanguageCode::Kin => "KIN",
LanguageCode::Kir => "KIR",
LanguageCode::Kom => "KOM",
LanguageCode::Kon => "KON",
LanguageCode::Kor => "KOR",
LanguageCode::Kua => "KUA",
LanguageCode::Kur => "KUR",
LanguageCode::Lao => "LAO",
LanguageCode::Lat => "LAT",
LanguageCode::Lav => "LAV",
LanguageCode::Lim => "LIM",
LanguageCode::Lin => "LIN",
LanguageCode::Lit => "LIT",
LanguageCode::Ltz => "LTZ",
LanguageCode::Lub => "LUB",
LanguageCode::Lug => "LUG",
LanguageCode::Mah => "MAH",
LanguageCode::Mal => "MAL",
LanguageCode::Mar => "MAR",
LanguageCode::Mkd => "MKD",
LanguageCode::Mlg => "MLG",
LanguageCode::Mlt => "MLT",
LanguageCode::Mon => "MON",
LanguageCode::Mri => "MRI",
LanguageCode::Msa => "MSA",
LanguageCode::Mya => "MYA",
LanguageCode::Nau => "NAU",
LanguageCode::Nav => "NAV",
LanguageCode::Nbl => "NBL",
LanguageCode::Nde => "NDE",
LanguageCode::Ndo => "NDO",
LanguageCode::Nep => "NEP",
LanguageCode::Nld => "NLD",
LanguageCode::Nno => "NNO",
LanguageCode::Nob => "NOB",
LanguageCode::Nor => "NOR",
LanguageCode::Nya => "NYA",
LanguageCode::Oci => "OCI",
LanguageCode::Oji => "OJI",
LanguageCode::Ori => "ORI",
LanguageCode::Orj => "ORJ",
LanguageCode::Orm => "ORM",
LanguageCode::Oss => "OSS",
LanguageCode::Pan => "PAN",
LanguageCode::Pli => "PLI",
LanguageCode::Pol => "POL",
LanguageCode::Por => "POR",
LanguageCode::Pus => "PUS",
LanguageCode::Qaa => "QAA",
LanguageCode::Qpc => "QPC",
LanguageCode::Que => "QUE",
LanguageCode::Roh => "ROH",
LanguageCode::Ron => "RON",
LanguageCode::Run => "RUN",
LanguageCode::Rus => "RUS",
LanguageCode::Sag => "SAG",
LanguageCode::San => "SAN",
LanguageCode::Sin => "SIN",
LanguageCode::Slk => "SLK",
LanguageCode::Slv => "SLV",
LanguageCode::Sme => "SME",
LanguageCode::Smo => "SMO",
LanguageCode::Sna => "SNA",
LanguageCode::Snd => "SND",
LanguageCode::Som => "SOM",
LanguageCode::Sot => "SOT",
LanguageCode::Spa => "SPA",
LanguageCode::Sqi => "SQI",
LanguageCode::Srb => "SRB",
LanguageCode::Srd => "SRD",
LanguageCode::Srp => "SRP",
LanguageCode::Ssw => "SSW",
LanguageCode::Sun => "SUN",
LanguageCode::Swa => "SWA",
LanguageCode::Swe => "SWE",
LanguageCode::Tah => "TAH",
LanguageCode::Tam => "TAM",
LanguageCode::Tat => "TAT",
LanguageCode::Tel => "TEL",
LanguageCode::Tgk => "TGK",
LanguageCode::Tgl => "TGL",
LanguageCode::Tha => "THA",
LanguageCode::Tir => "TIR",
LanguageCode::Tng => "TNG",
LanguageCode::Ton => "TON",
LanguageCode::Tsn => "TSN",
LanguageCode::Tso => "TSO",
LanguageCode::Tuk => "TUK",
LanguageCode::Tur => "TUR",
LanguageCode::Twi => "TWI",
LanguageCode::Uig => "UIG",
LanguageCode::Ukr => "UKR",
LanguageCode::Urd => "URD",
LanguageCode::Uzb => "UZB",
LanguageCode::Ven => "VEN",
LanguageCode::Vie => "VIE",
LanguageCode::Vol => "VOL",
LanguageCode::Wln => "WLN",
LanguageCode::Wol => "WOL",
LanguageCode::Xho => "XHO",
LanguageCode::Yid => "YID",
LanguageCode::Yor => "YOR",
LanguageCode::Zha => "ZHA",
LanguageCode::Zho => "ZHO",
LanguageCode::Zul => "ZUL",
LanguageCode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AAR", "ABK", "AFR", "AKA", "AMH", "ARA", "ARG", "ASM", "AVA", "AVE", "AYM", "AZE",
"BAK", "BAM", "BEL", "BEN", "BIH", "BIS", "BOD", "BOS", "BRE", "BUL", "CAT", "CES",
"CHA", "CHE", "CHU", "CHV", "COR", "COS", "CRE", "CYM", "DAN", "DEU", "DIV", "DZO",
"ELL", "ENG", "ENM", "EPO", "EST", "EUS", "EWE", "FAO", "FAS", "FIJ", "FIN", "FRA",
"FRM", "FRY", "FUL", "GER", "GLA", "GLE", "GLG", "GLV", "GRN", "GUJ", "HAT", "HAU",
"HEB", "HER", "HIN", "HMO", "HRV", "HUN", "HYE", "IBO", "IDO", "III", "IKU", "ILE",
"INA", "IND", "IPK", "ISL", "ITA", "JAV", "JPN", "KAL", "KAN", "KAS", "KAT", "KAU",
"KAZ", "KHM", "KIK", "KIN", "KIR", "KOM", "KON", "KOR", "KUA", "KUR", "LAO", "LAT",
"LAV", "LIM", "LIN", "LIT", "LTZ", "LUB", "LUG", "MAH", "MAL", "MAR", "MKD", "MLG",
"MLT", "MON", "MRI", "MSA", "MYA", "NAU", "NAV", "NBL", "NDE", "NDO", "NEP", "NLD",
"NNO", "NOB", "NOR", "NYA", "OCI", "OJI", "ORI", "ORJ", "ORM", "OSS", "PAN", "PLI",
"POL", "POR", "PUS", "QAA", "QPC", "QUE", "ROH", "RON", "RUN", "RUS", "SAG", "SAN",
"SIN", "SLK", "SLV", "SME", "SMO", "SNA", "SND", "SOM", "SOT", "SPA", "SQI", "SRB",
"SRD", "SRP", "SSW", "SUN", "SWA", "SWE", "TAH", "TAM", "TAT", "TEL", "TGK", "TGL",
"THA", "TIR", "TNG", "TON", "TSN", "TSO", "TUK", "TUR", "TWI", "UIG", "UKR", "URD",
"UZB", "VEN", "VIE", "VOL", "WLN", "WOL", "XHO", "YID", "YOR", "ZHA", "ZHO", "ZUL",
]
}
}
impl AsRef<str> for LanguageCode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptionDestinationSettings {
/// Burn-in is a captions delivery method, rather than a captions format. Burn-in writes the captions directly on your video frames, replacing pixels of video content with the captions. Set up burn-in captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/burn-in-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to BURN_IN.
pub burnin_destination_settings: std::option::Option<crate::model::BurninDestinationSettings>,
/// Specify the format for this set of captions on this output. The default format is embedded without SCTE-20. Note that your choice of video output container constrains your choice of output captions format. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/captions-support-tables.html. If you are using SCTE-20 and you want to create an output that complies with the SCTE-43 spec, choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20).
pub destination_type: std::option::Option<crate::model::CaptionDestinationType>,
/// Settings related to DVB-Sub captions. Set up DVB-Sub captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/dvb-sub-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to DVB_SUB.
pub dvb_sub_destination_settings: std::option::Option<crate::model::DvbSubDestinationSettings>,
/// Settings related to CEA/EIA-608 and CEA/EIA-708 (also called embedded or ancillary) captions. Set up embedded captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/embedded-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
pub embedded_destination_settings:
std::option::Option<crate::model::EmbeddedDestinationSettings>,
/// Settings related to IMSC captions. IMSC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to IMSC.
pub imsc_destination_settings: std::option::Option<crate::model::ImscDestinationSettings>,
/// Settings related to SCC captions. SCC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/scc-srt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SCC.
pub scc_destination_settings: std::option::Option<crate::model::SccDestinationSettings>,
/// Settings related to SRT captions. SRT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SRT.
pub srt_destination_settings: std::option::Option<crate::model::SrtDestinationSettings>,
/// Settings related to teletext captions. Set up teletext captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/teletext-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TELETEXT.
pub teletext_destination_settings:
std::option::Option<crate::model::TeletextDestinationSettings>,
/// Settings related to TTML captions. TTML is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TTML.
pub ttml_destination_settings: std::option::Option<crate::model::TtmlDestinationSettings>,
/// Settings related to WebVTT captions. WebVTT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to WebVTT.
pub webvtt_destination_settings: std::option::Option<crate::model::WebvttDestinationSettings>,
}
impl CaptionDestinationSettings {
/// Burn-in is a captions delivery method, rather than a captions format. Burn-in writes the captions directly on your video frames, replacing pixels of video content with the captions. Set up burn-in captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/burn-in-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to BURN_IN.
pub fn burnin_destination_settings(
&self,
) -> std::option::Option<&crate::model::BurninDestinationSettings> {
self.burnin_destination_settings.as_ref()
}
/// Specify the format for this set of captions on this output. The default format is embedded without SCTE-20. Note that your choice of video output container constrains your choice of output captions format. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/captions-support-tables.html. If you are using SCTE-20 and you want to create an output that complies with the SCTE-43 spec, choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20).
pub fn destination_type(&self) -> std::option::Option<&crate::model::CaptionDestinationType> {
self.destination_type.as_ref()
}
/// Settings related to DVB-Sub captions. Set up DVB-Sub captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/dvb-sub-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to DVB_SUB.
pub fn dvb_sub_destination_settings(
&self,
) -> std::option::Option<&crate::model::DvbSubDestinationSettings> {
self.dvb_sub_destination_settings.as_ref()
}
/// Settings related to CEA/EIA-608 and CEA/EIA-708 (also called embedded or ancillary) captions. Set up embedded captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/embedded-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
pub fn embedded_destination_settings(
&self,
) -> std::option::Option<&crate::model::EmbeddedDestinationSettings> {
self.embedded_destination_settings.as_ref()
}
/// Settings related to IMSC captions. IMSC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to IMSC.
pub fn imsc_destination_settings(
&self,
) -> std::option::Option<&crate::model::ImscDestinationSettings> {
self.imsc_destination_settings.as_ref()
}
/// Settings related to SCC captions. SCC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/scc-srt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SCC.
pub fn scc_destination_settings(
&self,
) -> std::option::Option<&crate::model::SccDestinationSettings> {
self.scc_destination_settings.as_ref()
}
/// Settings related to SRT captions. SRT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SRT.
pub fn srt_destination_settings(
&self,
) -> std::option::Option<&crate::model::SrtDestinationSettings> {
self.srt_destination_settings.as_ref()
}
/// Settings related to teletext captions. Set up teletext captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/teletext-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TELETEXT.
pub fn teletext_destination_settings(
&self,
) -> std::option::Option<&crate::model::TeletextDestinationSettings> {
self.teletext_destination_settings.as_ref()
}
/// Settings related to TTML captions. TTML is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TTML.
pub fn ttml_destination_settings(
&self,
) -> std::option::Option<&crate::model::TtmlDestinationSettings> {
self.ttml_destination_settings.as_ref()
}
/// Settings related to WebVTT captions. WebVTT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to WebVTT.
pub fn webvtt_destination_settings(
&self,
) -> std::option::Option<&crate::model::WebvttDestinationSettings> {
self.webvtt_destination_settings.as_ref()
}
}
impl std::fmt::Debug for CaptionDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptionDestinationSettings");
formatter.field(
"burnin_destination_settings",
&self.burnin_destination_settings,
);
formatter.field("destination_type", &self.destination_type);
formatter.field(
"dvb_sub_destination_settings",
&self.dvb_sub_destination_settings,
);
formatter.field(
"embedded_destination_settings",
&self.embedded_destination_settings,
);
formatter.field("imsc_destination_settings", &self.imsc_destination_settings);
formatter.field("scc_destination_settings", &self.scc_destination_settings);
formatter.field("srt_destination_settings", &self.srt_destination_settings);
formatter.field(
"teletext_destination_settings",
&self.teletext_destination_settings,
);
formatter.field("ttml_destination_settings", &self.ttml_destination_settings);
formatter.field(
"webvtt_destination_settings",
&self.webvtt_destination_settings,
);
formatter.finish()
}
}
/// See [`CaptionDestinationSettings`](crate::model::CaptionDestinationSettings)
pub mod caption_destination_settings {
/// A builder for [`CaptionDestinationSettings`](crate::model::CaptionDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) burnin_destination_settings:
std::option::Option<crate::model::BurninDestinationSettings>,
pub(crate) destination_type: std::option::Option<crate::model::CaptionDestinationType>,
pub(crate) dvb_sub_destination_settings:
std::option::Option<crate::model::DvbSubDestinationSettings>,
pub(crate) embedded_destination_settings:
std::option::Option<crate::model::EmbeddedDestinationSettings>,
pub(crate) imsc_destination_settings:
std::option::Option<crate::model::ImscDestinationSettings>,
pub(crate) scc_destination_settings:
std::option::Option<crate::model::SccDestinationSettings>,
pub(crate) srt_destination_settings:
std::option::Option<crate::model::SrtDestinationSettings>,
pub(crate) teletext_destination_settings:
std::option::Option<crate::model::TeletextDestinationSettings>,
pub(crate) ttml_destination_settings:
std::option::Option<crate::model::TtmlDestinationSettings>,
pub(crate) webvtt_destination_settings:
std::option::Option<crate::model::WebvttDestinationSettings>,
}
impl Builder {
/// Burn-in is a captions delivery method, rather than a captions format. Burn-in writes the captions directly on your video frames, replacing pixels of video content with the captions. Set up burn-in captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/burn-in-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to BURN_IN.
pub fn burnin_destination_settings(
mut self,
input: crate::model::BurninDestinationSettings,
) -> Self {
self.burnin_destination_settings = Some(input);
self
}
/// Burn-in is a captions delivery method, rather than a captions format. Burn-in writes the captions directly on your video frames, replacing pixels of video content with the captions. Set up burn-in captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/burn-in-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to BURN_IN.
pub fn set_burnin_destination_settings(
mut self,
input: std::option::Option<crate::model::BurninDestinationSettings>,
) -> Self {
self.burnin_destination_settings = input;
self
}
/// Specify the format for this set of captions on this output. The default format is embedded without SCTE-20. Note that your choice of video output container constrains your choice of output captions format. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/captions-support-tables.html. If you are using SCTE-20 and you want to create an output that complies with the SCTE-43 spec, choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20).
pub fn destination_type(mut self, input: crate::model::CaptionDestinationType) -> Self {
self.destination_type = Some(input);
self
}
/// Specify the format for this set of captions on this output. The default format is embedded without SCTE-20. Note that your choice of video output container constrains your choice of output captions format. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/captions-support-tables.html. If you are using SCTE-20 and you want to create an output that complies with the SCTE-43 spec, choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20).
pub fn set_destination_type(
mut self,
input: std::option::Option<crate::model::CaptionDestinationType>,
) -> Self {
self.destination_type = input;
self
}
/// Settings related to DVB-Sub captions. Set up DVB-Sub captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/dvb-sub-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to DVB_SUB.
pub fn dvb_sub_destination_settings(
mut self,
input: crate::model::DvbSubDestinationSettings,
) -> Self {
self.dvb_sub_destination_settings = Some(input);
self
}
/// Settings related to DVB-Sub captions. Set up DVB-Sub captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/dvb-sub-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to DVB_SUB.
pub fn set_dvb_sub_destination_settings(
mut self,
input: std::option::Option<crate::model::DvbSubDestinationSettings>,
) -> Self {
self.dvb_sub_destination_settings = input;
self
}
/// Settings related to CEA/EIA-608 and CEA/EIA-708 (also called embedded or ancillary) captions. Set up embedded captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/embedded-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
pub fn embedded_destination_settings(
mut self,
input: crate::model::EmbeddedDestinationSettings,
) -> Self {
self.embedded_destination_settings = Some(input);
self
}
/// Settings related to CEA/EIA-608 and CEA/EIA-708 (also called embedded or ancillary) captions. Set up embedded captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/embedded-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
pub fn set_embedded_destination_settings(
mut self,
input: std::option::Option<crate::model::EmbeddedDestinationSettings>,
) -> Self {
self.embedded_destination_settings = input;
self
}
/// Settings related to IMSC captions. IMSC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to IMSC.
pub fn imsc_destination_settings(
mut self,
input: crate::model::ImscDestinationSettings,
) -> Self {
self.imsc_destination_settings = Some(input);
self
}
/// Settings related to IMSC captions. IMSC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to IMSC.
pub fn set_imsc_destination_settings(
mut self,
input: std::option::Option<crate::model::ImscDestinationSettings>,
) -> Self {
self.imsc_destination_settings = input;
self
}
/// Settings related to SCC captions. SCC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/scc-srt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SCC.
pub fn scc_destination_settings(
mut self,
input: crate::model::SccDestinationSettings,
) -> Self {
self.scc_destination_settings = Some(input);
self
}
/// Settings related to SCC captions. SCC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/scc-srt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SCC.
pub fn set_scc_destination_settings(
mut self,
input: std::option::Option<crate::model::SccDestinationSettings>,
) -> Self {
self.scc_destination_settings = input;
self
}
/// Settings related to SRT captions. SRT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SRT.
pub fn srt_destination_settings(
mut self,
input: crate::model::SrtDestinationSettings,
) -> Self {
self.srt_destination_settings = Some(input);
self
}
/// Settings related to SRT captions. SRT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SRT.
pub fn set_srt_destination_settings(
mut self,
input: std::option::Option<crate::model::SrtDestinationSettings>,
) -> Self {
self.srt_destination_settings = input;
self
}
/// Settings related to teletext captions. Set up teletext captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/teletext-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TELETEXT.
pub fn teletext_destination_settings(
mut self,
input: crate::model::TeletextDestinationSettings,
) -> Self {
self.teletext_destination_settings = Some(input);
self
}
/// Settings related to teletext captions. Set up teletext captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/teletext-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TELETEXT.
pub fn set_teletext_destination_settings(
mut self,
input: std::option::Option<crate::model::TeletextDestinationSettings>,
) -> Self {
self.teletext_destination_settings = input;
self
}
/// Settings related to TTML captions. TTML is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TTML.
pub fn ttml_destination_settings(
mut self,
input: crate::model::TtmlDestinationSettings,
) -> Self {
self.ttml_destination_settings = Some(input);
self
}
/// Settings related to TTML captions. TTML is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TTML.
pub fn set_ttml_destination_settings(
mut self,
input: std::option::Option<crate::model::TtmlDestinationSettings>,
) -> Self {
self.ttml_destination_settings = input;
self
}
/// Settings related to WebVTT captions. WebVTT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to WebVTT.
pub fn webvtt_destination_settings(
mut self,
input: crate::model::WebvttDestinationSettings,
) -> Self {
self.webvtt_destination_settings = Some(input);
self
}
/// Settings related to WebVTT captions. WebVTT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to WebVTT.
pub fn set_webvtt_destination_settings(
mut self,
input: std::option::Option<crate::model::WebvttDestinationSettings>,
) -> Self {
self.webvtt_destination_settings = input;
self
}
/// Consumes the builder and constructs a [`CaptionDestinationSettings`](crate::model::CaptionDestinationSettings)
pub fn build(self) -> crate::model::CaptionDestinationSettings {
crate::model::CaptionDestinationSettings {
burnin_destination_settings: self.burnin_destination_settings,
destination_type: self.destination_type,
dvb_sub_destination_settings: self.dvb_sub_destination_settings,
embedded_destination_settings: self.embedded_destination_settings,
imsc_destination_settings: self.imsc_destination_settings,
scc_destination_settings: self.scc_destination_settings,
srt_destination_settings: self.srt_destination_settings,
teletext_destination_settings: self.teletext_destination_settings,
ttml_destination_settings: self.ttml_destination_settings,
webvtt_destination_settings: self.webvtt_destination_settings,
}
}
}
}
impl CaptionDestinationSettings {
/// Creates a new builder-style object to manufacture [`CaptionDestinationSettings`](crate::model::CaptionDestinationSettings)
pub fn builder() -> crate::model::caption_destination_settings::Builder {
crate::model::caption_destination_settings::Builder::default()
}
}
/// Settings related to WebVTT captions. WebVTT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to WebVTT.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WebvttDestinationSettings {
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub accessibility: std::option::Option<crate::model::WebvttAccessibilitySubs>,
/// To use the available style, color, and position information from your input captions: Set Style passthrough (stylePassthrough) to Enabled (ENABLED). MediaConvert uses default settings when style and position information is missing from your input captions. To recreate the input captions exactly: Set Style passthrough to Strict (STRICT). MediaConvert automatically applies timing adjustments, including adjustments for frame rate conversion, ad avails, and input clipping. Your input captions format must be WebVTT. To ignore the style and position information from your input captions and use simplified output captions: Set Style passthrough to Disabled (DISABLED), or leave blank.
pub style_passthrough: std::option::Option<crate::model::WebvttStylePassthrough>,
}
impl WebvttDestinationSettings {
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub fn accessibility(&self) -> std::option::Option<&crate::model::WebvttAccessibilitySubs> {
self.accessibility.as_ref()
}
/// To use the available style, color, and position information from your input captions: Set Style passthrough (stylePassthrough) to Enabled (ENABLED). MediaConvert uses default settings when style and position information is missing from your input captions. To recreate the input captions exactly: Set Style passthrough to Strict (STRICT). MediaConvert automatically applies timing adjustments, including adjustments for frame rate conversion, ad avails, and input clipping. Your input captions format must be WebVTT. To ignore the style and position information from your input captions and use simplified output captions: Set Style passthrough to Disabled (DISABLED), or leave blank.
pub fn style_passthrough(&self) -> std::option::Option<&crate::model::WebvttStylePassthrough> {
self.style_passthrough.as_ref()
}
}
impl std::fmt::Debug for WebvttDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WebvttDestinationSettings");
formatter.field("accessibility", &self.accessibility);
formatter.field("style_passthrough", &self.style_passthrough);
formatter.finish()
}
}
/// See [`WebvttDestinationSettings`](crate::model::WebvttDestinationSettings)
pub mod webvtt_destination_settings {
/// A builder for [`WebvttDestinationSettings`](crate::model::WebvttDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accessibility: std::option::Option<crate::model::WebvttAccessibilitySubs>,
pub(crate) style_passthrough: std::option::Option<crate::model::WebvttStylePassthrough>,
}
impl Builder {
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub fn accessibility(mut self, input: crate::model::WebvttAccessibilitySubs) -> Self {
self.accessibility = Some(input);
self
}
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub fn set_accessibility(
mut self,
input: std::option::Option<crate::model::WebvttAccessibilitySubs>,
) -> Self {
self.accessibility = input;
self
}
/// To use the available style, color, and position information from your input captions: Set Style passthrough (stylePassthrough) to Enabled (ENABLED). MediaConvert uses default settings when style and position information is missing from your input captions. To recreate the input captions exactly: Set Style passthrough to Strict (STRICT). MediaConvert automatically applies timing adjustments, including adjustments for frame rate conversion, ad avails, and input clipping. Your input captions format must be WebVTT. To ignore the style and position information from your input captions and use simplified output captions: Set Style passthrough to Disabled (DISABLED), or leave blank.
pub fn style_passthrough(mut self, input: crate::model::WebvttStylePassthrough) -> Self {
self.style_passthrough = Some(input);
self
}
/// To use the available style, color, and position information from your input captions: Set Style passthrough (stylePassthrough) to Enabled (ENABLED). MediaConvert uses default settings when style and position information is missing from your input captions. To recreate the input captions exactly: Set Style passthrough to Strict (STRICT). MediaConvert automatically applies timing adjustments, including adjustments for frame rate conversion, ad avails, and input clipping. Your input captions format must be WebVTT. To ignore the style and position information from your input captions and use simplified output captions: Set Style passthrough to Disabled (DISABLED), or leave blank.
pub fn set_style_passthrough(
mut self,
input: std::option::Option<crate::model::WebvttStylePassthrough>,
) -> Self {
self.style_passthrough = input;
self
}
/// Consumes the builder and constructs a [`WebvttDestinationSettings`](crate::model::WebvttDestinationSettings)
pub fn build(self) -> crate::model::WebvttDestinationSettings {
crate::model::WebvttDestinationSettings {
accessibility: self.accessibility,
style_passthrough: self.style_passthrough,
}
}
}
}
impl WebvttDestinationSettings {
/// Creates a new builder-style object to manufacture [`WebvttDestinationSettings`](crate::model::WebvttDestinationSettings)
pub fn builder() -> crate::model::webvtt_destination_settings::Builder {
crate::model::webvtt_destination_settings::Builder::default()
}
}
/// To use the available style, color, and position information from your input captions: Set Style passthrough (stylePassthrough) to Enabled (ENABLED). MediaConvert uses default settings when style and position information is missing from your input captions. To recreate the input captions exactly: Set Style passthrough to Strict (STRICT). MediaConvert automatically applies timing adjustments, including adjustments for frame rate conversion, ad avails, and input clipping. Your input captions format must be WebVTT. To ignore the style and position information from your input captions and use simplified output captions: Set Style passthrough to Disabled (DISABLED), or leave blank.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum WebvttStylePassthrough {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
Strict,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for WebvttStylePassthrough {
fn from(s: &str) -> Self {
match s {
"DISABLED" => WebvttStylePassthrough::Disabled,
"ENABLED" => WebvttStylePassthrough::Enabled,
"STRICT" => WebvttStylePassthrough::Strict,
other => WebvttStylePassthrough::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for WebvttStylePassthrough {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(WebvttStylePassthrough::from(s))
}
}
impl WebvttStylePassthrough {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
WebvttStylePassthrough::Disabled => "DISABLED",
WebvttStylePassthrough::Enabled => "ENABLED",
WebvttStylePassthrough::Strict => "STRICT",
WebvttStylePassthrough::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "STRICT"]
}
}
impl AsRef<str> for WebvttStylePassthrough {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum WebvttAccessibilitySubs {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for WebvttAccessibilitySubs {
fn from(s: &str) -> Self {
match s {
"DISABLED" => WebvttAccessibilitySubs::Disabled,
"ENABLED" => WebvttAccessibilitySubs::Enabled,
other => WebvttAccessibilitySubs::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for WebvttAccessibilitySubs {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(WebvttAccessibilitySubs::from(s))
}
}
impl WebvttAccessibilitySubs {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
WebvttAccessibilitySubs::Disabled => "DISABLED",
WebvttAccessibilitySubs::Enabled => "ENABLED",
WebvttAccessibilitySubs::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for WebvttAccessibilitySubs {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to TTML captions. TTML is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TTML.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TtmlDestinationSettings {
/// Pass through style and position information from a TTML-like input source (TTML, IMSC, SMPTE-TT) to the TTML output.
pub style_passthrough: std::option::Option<crate::model::TtmlStylePassthrough>,
}
impl TtmlDestinationSettings {
/// Pass through style and position information from a TTML-like input source (TTML, IMSC, SMPTE-TT) to the TTML output.
pub fn style_passthrough(&self) -> std::option::Option<&crate::model::TtmlStylePassthrough> {
self.style_passthrough.as_ref()
}
}
impl std::fmt::Debug for TtmlDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TtmlDestinationSettings");
formatter.field("style_passthrough", &self.style_passthrough);
formatter.finish()
}
}
/// See [`TtmlDestinationSettings`](crate::model::TtmlDestinationSettings)
pub mod ttml_destination_settings {
/// A builder for [`TtmlDestinationSettings`](crate::model::TtmlDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) style_passthrough: std::option::Option<crate::model::TtmlStylePassthrough>,
}
impl Builder {
/// Pass through style and position information from a TTML-like input source (TTML, IMSC, SMPTE-TT) to the TTML output.
pub fn style_passthrough(mut self, input: crate::model::TtmlStylePassthrough) -> Self {
self.style_passthrough = Some(input);
self
}
/// Pass through style and position information from a TTML-like input source (TTML, IMSC, SMPTE-TT) to the TTML output.
pub fn set_style_passthrough(
mut self,
input: std::option::Option<crate::model::TtmlStylePassthrough>,
) -> Self {
self.style_passthrough = input;
self
}
/// Consumes the builder and constructs a [`TtmlDestinationSettings`](crate::model::TtmlDestinationSettings)
pub fn build(self) -> crate::model::TtmlDestinationSettings {
crate::model::TtmlDestinationSettings {
style_passthrough: self.style_passthrough,
}
}
}
}
impl TtmlDestinationSettings {
/// Creates a new builder-style object to manufacture [`TtmlDestinationSettings`](crate::model::TtmlDestinationSettings)
pub fn builder() -> crate::model::ttml_destination_settings::Builder {
crate::model::ttml_destination_settings::Builder::default()
}
}
/// Pass through style and position information from a TTML-like input source (TTML, IMSC, SMPTE-TT) to the TTML output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TtmlStylePassthrough {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for TtmlStylePassthrough {
fn from(s: &str) -> Self {
match s {
"DISABLED" => TtmlStylePassthrough::Disabled,
"ENABLED" => TtmlStylePassthrough::Enabled,
other => TtmlStylePassthrough::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TtmlStylePassthrough {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TtmlStylePassthrough::from(s))
}
}
impl TtmlStylePassthrough {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TtmlStylePassthrough::Disabled => "DISABLED",
TtmlStylePassthrough::Enabled => "ENABLED",
TtmlStylePassthrough::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for TtmlStylePassthrough {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to teletext captions. Set up teletext captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/teletext-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to TELETEXT.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TeletextDestinationSettings {
/// Set pageNumber to the Teletext page number for the destination captions for this output. This value must be a three-digit hexadecimal string; strings ending in -FF are invalid. If you are passing through the entire set of Teletext data, do not use this field.
pub page_number: std::option::Option<std::string::String>,
/// Specify the page types for this Teletext page. If you don't specify a value here, the service sets the page type to the default value Subtitle (PAGE_TYPE_SUBTITLE). If you pass through the entire set of Teletext data, don't use this field. When you pass through a set of Teletext pages, your output has the same page types as your input.
pub page_types: std::option::Option<std::vec::Vec<crate::model::TeletextPageType>>,
}
impl TeletextDestinationSettings {
/// Set pageNumber to the Teletext page number for the destination captions for this output. This value must be a three-digit hexadecimal string; strings ending in -FF are invalid. If you are passing through the entire set of Teletext data, do not use this field.
pub fn page_number(&self) -> std::option::Option<&str> {
self.page_number.as_deref()
}
/// Specify the page types for this Teletext page. If you don't specify a value here, the service sets the page type to the default value Subtitle (PAGE_TYPE_SUBTITLE). If you pass through the entire set of Teletext data, don't use this field. When you pass through a set of Teletext pages, your output has the same page types as your input.
pub fn page_types(&self) -> std::option::Option<&[crate::model::TeletextPageType]> {
self.page_types.as_deref()
}
}
impl std::fmt::Debug for TeletextDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TeletextDestinationSettings");
formatter.field("page_number", &self.page_number);
formatter.field("page_types", &self.page_types);
formatter.finish()
}
}
/// See [`TeletextDestinationSettings`](crate::model::TeletextDestinationSettings)
pub mod teletext_destination_settings {
/// A builder for [`TeletextDestinationSettings`](crate::model::TeletextDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) page_number: std::option::Option<std::string::String>,
pub(crate) page_types: std::option::Option<std::vec::Vec<crate::model::TeletextPageType>>,
}
impl Builder {
/// Set pageNumber to the Teletext page number for the destination captions for this output. This value must be a three-digit hexadecimal string; strings ending in -FF are invalid. If you are passing through the entire set of Teletext data, do not use this field.
pub fn page_number(mut self, input: impl Into<std::string::String>) -> Self {
self.page_number = Some(input.into());
self
}
/// Set pageNumber to the Teletext page number for the destination captions for this output. This value must be a three-digit hexadecimal string; strings ending in -FF are invalid. If you are passing through the entire set of Teletext data, do not use this field.
pub fn set_page_number(mut self, input: std::option::Option<std::string::String>) -> Self {
self.page_number = input;
self
}
/// Appends an item to `page_types`.
///
/// To override the contents of this collection use [`set_page_types`](Self::set_page_types).
///
/// Specify the page types for this Teletext page. If you don't specify a value here, the service sets the page type to the default value Subtitle (PAGE_TYPE_SUBTITLE). If you pass through the entire set of Teletext data, don't use this field. When you pass through a set of Teletext pages, your output has the same page types as your input.
pub fn page_types(mut self, input: crate::model::TeletextPageType) -> Self {
let mut v = self.page_types.unwrap_or_default();
v.push(input);
self.page_types = Some(v);
self
}
/// Specify the page types for this Teletext page. If you don't specify a value here, the service sets the page type to the default value Subtitle (PAGE_TYPE_SUBTITLE). If you pass through the entire set of Teletext data, don't use this field. When you pass through a set of Teletext pages, your output has the same page types as your input.
pub fn set_page_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TeletextPageType>>,
) -> Self {
self.page_types = input;
self
}
/// Consumes the builder and constructs a [`TeletextDestinationSettings`](crate::model::TeletextDestinationSettings)
pub fn build(self) -> crate::model::TeletextDestinationSettings {
crate::model::TeletextDestinationSettings {
page_number: self.page_number,
page_types: self.page_types,
}
}
}
}
impl TeletextDestinationSettings {
/// Creates a new builder-style object to manufacture [`TeletextDestinationSettings`](crate::model::TeletextDestinationSettings)
pub fn builder() -> crate::model::teletext_destination_settings::Builder {
crate::model::teletext_destination_settings::Builder::default()
}
}
/// A page type as defined in the standard ETSI EN 300 468, Table 94
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TeletextPageType {
#[allow(missing_docs)] // documentation missing in model
PageTypeAddlInfo,
#[allow(missing_docs)] // documentation missing in model
PageTypeHearingImpairedSubtitle,
#[allow(missing_docs)] // documentation missing in model
PageTypeInitial,
#[allow(missing_docs)] // documentation missing in model
PageTypeProgramSchedule,
#[allow(missing_docs)] // documentation missing in model
PageTypeSubtitle,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for TeletextPageType {
fn from(s: &str) -> Self {
match s {
"PAGE_TYPE_ADDL_INFO" => TeletextPageType::PageTypeAddlInfo,
"PAGE_TYPE_HEARING_IMPAIRED_SUBTITLE" => {
TeletextPageType::PageTypeHearingImpairedSubtitle
}
"PAGE_TYPE_INITIAL" => TeletextPageType::PageTypeInitial,
"PAGE_TYPE_PROGRAM_SCHEDULE" => TeletextPageType::PageTypeProgramSchedule,
"PAGE_TYPE_SUBTITLE" => TeletextPageType::PageTypeSubtitle,
other => TeletextPageType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TeletextPageType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TeletextPageType::from(s))
}
}
impl TeletextPageType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TeletextPageType::PageTypeAddlInfo => "PAGE_TYPE_ADDL_INFO",
TeletextPageType::PageTypeHearingImpairedSubtitle => {
"PAGE_TYPE_HEARING_IMPAIRED_SUBTITLE"
}
TeletextPageType::PageTypeInitial => "PAGE_TYPE_INITIAL",
TeletextPageType::PageTypeProgramSchedule => "PAGE_TYPE_PROGRAM_SCHEDULE",
TeletextPageType::PageTypeSubtitle => "PAGE_TYPE_SUBTITLE",
TeletextPageType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"PAGE_TYPE_ADDL_INFO",
"PAGE_TYPE_HEARING_IMPAIRED_SUBTITLE",
"PAGE_TYPE_INITIAL",
"PAGE_TYPE_PROGRAM_SCHEDULE",
"PAGE_TYPE_SUBTITLE",
]
}
}
impl AsRef<str> for TeletextPageType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to SRT captions. SRT is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SRT.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SrtDestinationSettings {
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use simplified output captions.
pub style_passthrough: std::option::Option<crate::model::SrtStylePassthrough>,
}
impl SrtDestinationSettings {
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use simplified output captions.
pub fn style_passthrough(&self) -> std::option::Option<&crate::model::SrtStylePassthrough> {
self.style_passthrough.as_ref()
}
}
impl std::fmt::Debug for SrtDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SrtDestinationSettings");
formatter.field("style_passthrough", &self.style_passthrough);
formatter.finish()
}
}
/// See [`SrtDestinationSettings`](crate::model::SrtDestinationSettings)
pub mod srt_destination_settings {
/// A builder for [`SrtDestinationSettings`](crate::model::SrtDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) style_passthrough: std::option::Option<crate::model::SrtStylePassthrough>,
}
impl Builder {
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use simplified output captions.
pub fn style_passthrough(mut self, input: crate::model::SrtStylePassthrough) -> Self {
self.style_passthrough = Some(input);
self
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use simplified output captions.
pub fn set_style_passthrough(
mut self,
input: std::option::Option<crate::model::SrtStylePassthrough>,
) -> Self {
self.style_passthrough = input;
self
}
/// Consumes the builder and constructs a [`SrtDestinationSettings`](crate::model::SrtDestinationSettings)
pub fn build(self) -> crate::model::SrtDestinationSettings {
crate::model::SrtDestinationSettings {
style_passthrough: self.style_passthrough,
}
}
}
}
impl SrtDestinationSettings {
/// Creates a new builder-style object to manufacture [`SrtDestinationSettings`](crate::model::SrtDestinationSettings)
pub fn builder() -> crate::model::srt_destination_settings::Builder {
crate::model::srt_destination_settings::Builder::default()
}
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use simplified output captions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SrtStylePassthrough {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for SrtStylePassthrough {
fn from(s: &str) -> Self {
match s {
"DISABLED" => SrtStylePassthrough::Disabled,
"ENABLED" => SrtStylePassthrough::Enabled,
other => SrtStylePassthrough::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SrtStylePassthrough {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SrtStylePassthrough::from(s))
}
}
impl SrtStylePassthrough {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
SrtStylePassthrough::Disabled => "DISABLED",
SrtStylePassthrough::Enabled => "ENABLED",
SrtStylePassthrough::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for SrtStylePassthrough {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to SCC captions. SCC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/scc-srt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to SCC.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SccDestinationSettings {
/// Set Framerate (SccDestinationFramerate) to make sure that the captions and the video are synchronized in the output. Specify a frame rate that matches the frame rate of the associated video. If the video frame rate is 29.97, choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 non-dropframe (FRAMERATE_29_97_NON_DROPFRAME).
pub framerate: std::option::Option<crate::model::SccDestinationFramerate>,
}
impl SccDestinationSettings {
/// Set Framerate (SccDestinationFramerate) to make sure that the captions and the video are synchronized in the output. Specify a frame rate that matches the frame rate of the associated video. If the video frame rate is 29.97, choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 non-dropframe (FRAMERATE_29_97_NON_DROPFRAME).
pub fn framerate(&self) -> std::option::Option<&crate::model::SccDestinationFramerate> {
self.framerate.as_ref()
}
}
impl std::fmt::Debug for SccDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SccDestinationSettings");
formatter.field("framerate", &self.framerate);
formatter.finish()
}
}
/// See [`SccDestinationSettings`](crate::model::SccDestinationSettings)
pub mod scc_destination_settings {
/// A builder for [`SccDestinationSettings`](crate::model::SccDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framerate: std::option::Option<crate::model::SccDestinationFramerate>,
}
impl Builder {
/// Set Framerate (SccDestinationFramerate) to make sure that the captions and the video are synchronized in the output. Specify a frame rate that matches the frame rate of the associated video. If the video frame rate is 29.97, choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 non-dropframe (FRAMERATE_29_97_NON_DROPFRAME).
pub fn framerate(mut self, input: crate::model::SccDestinationFramerate) -> Self {
self.framerate = Some(input);
self
}
/// Set Framerate (SccDestinationFramerate) to make sure that the captions and the video are synchronized in the output. Specify a frame rate that matches the frame rate of the associated video. If the video frame rate is 29.97, choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 non-dropframe (FRAMERATE_29_97_NON_DROPFRAME).
pub fn set_framerate(
mut self,
input: std::option::Option<crate::model::SccDestinationFramerate>,
) -> Self {
self.framerate = input;
self
}
/// Consumes the builder and constructs a [`SccDestinationSettings`](crate::model::SccDestinationSettings)
pub fn build(self) -> crate::model::SccDestinationSettings {
crate::model::SccDestinationSettings {
framerate: self.framerate,
}
}
}
}
impl SccDestinationSettings {
/// Creates a new builder-style object to manufacture [`SccDestinationSettings`](crate::model::SccDestinationSettings)
pub fn builder() -> crate::model::scc_destination_settings::Builder {
crate::model::scc_destination_settings::Builder::default()
}
}
/// Set Framerate (SccDestinationFramerate) to make sure that the captions and the video are synchronized in the output. Specify a frame rate that matches the frame rate of the associated video. If the video frame rate is 29.97, choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 non-dropframe (FRAMERATE_29_97_NON_DROPFRAME).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SccDestinationFramerate {
#[allow(missing_docs)] // documentation missing in model
Framerate2397,
#[allow(missing_docs)] // documentation missing in model
Framerate24,
#[allow(missing_docs)] // documentation missing in model
Framerate25,
#[allow(missing_docs)] // documentation missing in model
Framerate2997Dropframe,
#[allow(missing_docs)] // documentation missing in model
Framerate2997NonDropframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for SccDestinationFramerate {
fn from(s: &str) -> Self {
match s {
"FRAMERATE_23_97" => SccDestinationFramerate::Framerate2397,
"FRAMERATE_24" => SccDestinationFramerate::Framerate24,
"FRAMERATE_25" => SccDestinationFramerate::Framerate25,
"FRAMERATE_29_97_DROPFRAME" => SccDestinationFramerate::Framerate2997Dropframe,
"FRAMERATE_29_97_NON_DROPFRAME" => SccDestinationFramerate::Framerate2997NonDropframe,
other => SccDestinationFramerate::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SccDestinationFramerate {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SccDestinationFramerate::from(s))
}
}
impl SccDestinationFramerate {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
SccDestinationFramerate::Framerate2397 => "FRAMERATE_23_97",
SccDestinationFramerate::Framerate24 => "FRAMERATE_24",
SccDestinationFramerate::Framerate25 => "FRAMERATE_25",
SccDestinationFramerate::Framerate2997Dropframe => "FRAMERATE_29_97_DROPFRAME",
SccDestinationFramerate::Framerate2997NonDropframe => "FRAMERATE_29_97_NON_DROPFRAME",
SccDestinationFramerate::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FRAMERATE_23_97",
"FRAMERATE_24",
"FRAMERATE_25",
"FRAMERATE_29_97_DROPFRAME",
"FRAMERATE_29_97_NON_DROPFRAME",
]
}
}
impl AsRef<str> for SccDestinationFramerate {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to IMSC captions. IMSC is a sidecar format that holds captions in a file that is separate from the video container. Set up sidecar captions in the same output group, but different output from your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-and-webvtt-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to IMSC.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ImscDestinationSettings {
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub accessibility: std::option::Option<crate::model::ImscAccessibilitySubs>,
/// Keep this setting enabled to have MediaConvert use the font style and position information from the captions source in the output. This option is available only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting for simplified output captions.
pub style_passthrough: std::option::Option<crate::model::ImscStylePassthrough>,
}
impl ImscDestinationSettings {
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub fn accessibility(&self) -> std::option::Option<&crate::model::ImscAccessibilitySubs> {
self.accessibility.as_ref()
}
/// Keep this setting enabled to have MediaConvert use the font style and position information from the captions source in the output. This option is available only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting for simplified output captions.
pub fn style_passthrough(&self) -> std::option::Option<&crate::model::ImscStylePassthrough> {
self.style_passthrough.as_ref()
}
}
impl std::fmt::Debug for ImscDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ImscDestinationSettings");
formatter.field("accessibility", &self.accessibility);
formatter.field("style_passthrough", &self.style_passthrough);
formatter.finish()
}
}
/// See [`ImscDestinationSettings`](crate::model::ImscDestinationSettings)
pub mod imsc_destination_settings {
/// A builder for [`ImscDestinationSettings`](crate::model::ImscDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accessibility: std::option::Option<crate::model::ImscAccessibilitySubs>,
pub(crate) style_passthrough: std::option::Option<crate::model::ImscStylePassthrough>,
}
impl Builder {
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub fn accessibility(mut self, input: crate::model::ImscAccessibilitySubs) -> Self {
self.accessibility = Some(input);
self
}
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
pub fn set_accessibility(
mut self,
input: std::option::Option<crate::model::ImscAccessibilitySubs>,
) -> Self {
self.accessibility = input;
self
}
/// Keep this setting enabled to have MediaConvert use the font style and position information from the captions source in the output. This option is available only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting for simplified output captions.
pub fn style_passthrough(mut self, input: crate::model::ImscStylePassthrough) -> Self {
self.style_passthrough = Some(input);
self
}
/// Keep this setting enabled to have MediaConvert use the font style and position information from the captions source in the output. This option is available only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting for simplified output captions.
pub fn set_style_passthrough(
mut self,
input: std::option::Option<crate::model::ImscStylePassthrough>,
) -> Self {
self.style_passthrough = input;
self
}
/// Consumes the builder and constructs a [`ImscDestinationSettings`](crate::model::ImscDestinationSettings)
pub fn build(self) -> crate::model::ImscDestinationSettings {
crate::model::ImscDestinationSettings {
accessibility: self.accessibility,
style_passthrough: self.style_passthrough,
}
}
}
}
impl ImscDestinationSettings {
/// Creates a new builder-style object to manufacture [`ImscDestinationSettings`](crate::model::ImscDestinationSettings)
pub fn builder() -> crate::model::imsc_destination_settings::Builder {
crate::model::imsc_destination_settings::Builder::default()
}
}
/// Keep this setting enabled to have MediaConvert use the font style and position information from the captions source in the output. This option is available only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting for simplified output captions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ImscStylePassthrough {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ImscStylePassthrough {
fn from(s: &str) -> Self {
match s {
"DISABLED" => ImscStylePassthrough::Disabled,
"ENABLED" => ImscStylePassthrough::Enabled,
other => ImscStylePassthrough::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ImscStylePassthrough {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ImscStylePassthrough::from(s))
}
}
impl ImscStylePassthrough {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ImscStylePassthrough::Disabled => "DISABLED",
ImscStylePassthrough::Enabled => "ENABLED",
ImscStylePassthrough::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for ImscStylePassthrough {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Set Accessibility subtitles to Enabled if the ISMC or WebVTT captions track is intended to provide accessibility for people who are deaf or hard of hearing. When you enable this feature, MediaConvert adds the following attributes under EXT-X-MEDIA in the HLS or CMAF manifest for this track: CHARACTERISTICS="public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound" and AUTOSELECT="YES". Keep the default value, Disabled, if the captions track is not intended to provide such accessibility. MediaConvert will not add the above attributes.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ImscAccessibilitySubs {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ImscAccessibilitySubs {
fn from(s: &str) -> Self {
match s {
"DISABLED" => ImscAccessibilitySubs::Disabled,
"ENABLED" => ImscAccessibilitySubs::Enabled,
other => ImscAccessibilitySubs::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ImscAccessibilitySubs {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ImscAccessibilitySubs::from(s))
}
}
impl ImscAccessibilitySubs {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ImscAccessibilitySubs::Disabled => "DISABLED",
ImscAccessibilitySubs::Enabled => "ENABLED",
ImscAccessibilitySubs::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for ImscAccessibilitySubs {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to CEA/EIA-608 and CEA/EIA-708 (also called embedded or ancillary) captions. Set up embedded captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/embedded-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to EMBEDDED, EMBEDDED_PLUS_SCTE20, or SCTE20_PLUS_EMBEDDED.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EmbeddedDestinationSettings {
/// Ignore this setting unless your input captions are SCC format and your output captions are embedded in the video stream. Specify a CC number for each captions channel in this output. If you have two channels, choose CC numbers that aren't in the same field. For example, choose 1 and 3. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub destination608_channel_number: i32,
/// Ignore this setting unless your input captions are SCC format and you want both 608 and 708 captions embedded in your output stream. Optionally, specify the 708 service number for each output captions channel. Choose a different number for each channel. To use this setting, also set Force 608 to 708 upconvert (Convert608To708) to Upconvert (UPCONVERT) in your input captions selector settings. If you choose to upconvert but don't specify a 708 service number, MediaConvert uses the number that you specify for CC channel number (destination608ChannelNumber) for the 708 service number. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub destination708_service_number: i32,
}
impl EmbeddedDestinationSettings {
/// Ignore this setting unless your input captions are SCC format and your output captions are embedded in the video stream. Specify a CC number for each captions channel in this output. If you have two channels, choose CC numbers that aren't in the same field. For example, choose 1 and 3. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub fn destination608_channel_number(&self) -> i32 {
self.destination608_channel_number
}
/// Ignore this setting unless your input captions are SCC format and you want both 608 and 708 captions embedded in your output stream. Optionally, specify the 708 service number for each output captions channel. Choose a different number for each channel. To use this setting, also set Force 608 to 708 upconvert (Convert608To708) to Upconvert (UPCONVERT) in your input captions selector settings. If you choose to upconvert but don't specify a 708 service number, MediaConvert uses the number that you specify for CC channel number (destination608ChannelNumber) for the 708 service number. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub fn destination708_service_number(&self) -> i32 {
self.destination708_service_number
}
}
impl std::fmt::Debug for EmbeddedDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EmbeddedDestinationSettings");
formatter.field(
"destination608_channel_number",
&self.destination608_channel_number,
);
formatter.field(
"destination708_service_number",
&self.destination708_service_number,
);
formatter.finish()
}
}
/// See [`EmbeddedDestinationSettings`](crate::model::EmbeddedDestinationSettings)
pub mod embedded_destination_settings {
/// A builder for [`EmbeddedDestinationSettings`](crate::model::EmbeddedDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination608_channel_number: std::option::Option<i32>,
pub(crate) destination708_service_number: std::option::Option<i32>,
}
impl Builder {
/// Ignore this setting unless your input captions are SCC format and your output captions are embedded in the video stream. Specify a CC number for each captions channel in this output. If you have two channels, choose CC numbers that aren't in the same field. For example, choose 1 and 3. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub fn destination608_channel_number(mut self, input: i32) -> Self {
self.destination608_channel_number = Some(input);
self
}
/// Ignore this setting unless your input captions are SCC format and your output captions are embedded in the video stream. Specify a CC number for each captions channel in this output. If you have two channels, choose CC numbers that aren't in the same field. For example, choose 1 and 3. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub fn set_destination608_channel_number(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.destination608_channel_number = input;
self
}
/// Ignore this setting unless your input captions are SCC format and you want both 608 and 708 captions embedded in your output stream. Optionally, specify the 708 service number for each output captions channel. Choose a different number for each channel. To use this setting, also set Force 608 to 708 upconvert (Convert608To708) to Upconvert (UPCONVERT) in your input captions selector settings. If you choose to upconvert but don't specify a 708 service number, MediaConvert uses the number that you specify for CC channel number (destination608ChannelNumber) for the 708 service number. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub fn destination708_service_number(mut self, input: i32) -> Self {
self.destination708_service_number = Some(input);
self
}
/// Ignore this setting unless your input captions are SCC format and you want both 608 and 708 captions embedded in your output stream. Optionally, specify the 708 service number for each output captions channel. Choose a different number for each channel. To use this setting, also set Force 608 to 708 upconvert (Convert608To708) to Upconvert (UPCONVERT) in your input captions selector settings. If you choose to upconvert but don't specify a 708 service number, MediaConvert uses the number that you specify for CC channel number (destination608ChannelNumber) for the 708 service number. For more information, see https://docs.aws.amazon.com/console/mediaconvert/dual-scc-to-embedded.
pub fn set_destination708_service_number(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.destination708_service_number = input;
self
}
/// Consumes the builder and constructs a [`EmbeddedDestinationSettings`](crate::model::EmbeddedDestinationSettings)
pub fn build(self) -> crate::model::EmbeddedDestinationSettings {
crate::model::EmbeddedDestinationSettings {
destination608_channel_number: self
.destination608_channel_number
.unwrap_or_default(),
destination708_service_number: self
.destination708_service_number
.unwrap_or_default(),
}
}
}
}
impl EmbeddedDestinationSettings {
/// Creates a new builder-style object to manufacture [`EmbeddedDestinationSettings`](crate::model::EmbeddedDestinationSettings)
pub fn builder() -> crate::model::embedded_destination_settings::Builder {
crate::model::embedded_destination_settings::Builder::default()
}
}
/// Settings related to DVB-Sub captions. Set up DVB-Sub captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/dvb-sub-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to DVB_SUB.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DvbSubDestinationSettings {
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates. Within your job settings, all of your DVB-Sub settings must be identical.
pub alignment: std::option::Option<crate::model::DvbSubtitleAlignment>,
/// Ignore this setting unless Style Passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub apply_font_color: std::option::Option<crate::model::DvbSubtitleApplyFontColor>,
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub background_color: std::option::Option<crate::model::DvbSubtitleBackgroundColor>,
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub background_opacity: i32,
/// Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.
pub dds_handling: std::option::Option<crate::model::DvbddsHandling>,
/// Use this setting, along with DDS y-coordinate (ddsYCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the left side of the frame and the left side of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub dds_x_coordinate: i32,
/// Use this setting, along with DDS x-coordinate (ddsXCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the top of the frame and the top of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub dds_y_coordinate: i32,
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fallback_font: std::option::Option<crate::model::DvbSubSubtitleFallbackFont>,
/// Specify the color of the captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub font_color: std::option::Option<crate::model::DvbSubtitleFontColor>,
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent. Within your job settings, all of your DVB-Sub settings must be identical.
pub font_opacity: i32,
/// Specify the Font resolution (FontResolution) in DPI (dots per inch). Within your job settings, all of your DVB-Sub settings must be identical.
pub font_resolution: i32,
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese. Within your job settings, all of your DVB-Sub settings must be identical.
pub font_script: std::option::Option<crate::model::FontScript>,
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size. Within your job settings, all of your DVB-Sub settings must be identical.
pub font_size: i32,
/// Specify the height, in pixels, of this set of DVB-Sub captions. The default value is 576 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub height: i32,
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub hex_font_color: std::option::Option<std::string::String>,
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub outline_color: std::option::Option<crate::model::DvbSubtitleOutlineColor>,
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub outline_size: i32,
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub shadow_color: std::option::Option<crate::model::DvbSubtitleShadowColor>,
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub shadow_opacity: i32,
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left. Within your job settings, all of your DVB-Sub settings must be identical.
pub shadow_x_offset: i32,
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub shadow_y_offset: i32,
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub style_passthrough: std::option::Option<crate::model::DvbSubtitleStylePassthrough>,
/// Specify whether your DVB subtitles are standard or for hearing impaired. Choose hearing impaired if your subtitles include audio descriptions and dialogue. Choose standard if your subtitles include only dialogue.
pub subtitling_type: std::option::Option<crate::model::DvbSubtitlingType>,
/// Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub teletext_spacing: std::option::Option<crate::model::DvbSubtitleTeletextSpacing>,
/// Specify the width, in pixels, of this set of DVB-Sub captions. The default value is 720 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub width: i32,
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the outputin pixels. A value of 10 would result in the captions starting 10 pixels from the left ofthe output. If no explicit x_position is provided, the horizontal caption position will bedetermined by the alignment parameter. Within your job settings, all of your DVB-Sub settings must be identical.
pub x_position: i32,
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output. Within your job settings, all of your DVB-Sub settings must be identical.
pub y_position: i32,
}
impl DvbSubDestinationSettings {
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn alignment(&self) -> std::option::Option<&crate::model::DvbSubtitleAlignment> {
self.alignment.as_ref()
}
/// Ignore this setting unless Style Passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub fn apply_font_color(
&self,
) -> std::option::Option<&crate::model::DvbSubtitleApplyFontColor> {
self.apply_font_color.as_ref()
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub fn background_color(
&self,
) -> std::option::Option<&crate::model::DvbSubtitleBackgroundColor> {
self.background_color.as_ref()
}
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn background_opacity(&self) -> i32 {
self.background_opacity
}
/// Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.
pub fn dds_handling(&self) -> std::option::Option<&crate::model::DvbddsHandling> {
self.dds_handling.as_ref()
}
/// Use this setting, along with DDS y-coordinate (ddsYCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the left side of the frame and the left side of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub fn dds_x_coordinate(&self) -> i32 {
self.dds_x_coordinate
}
/// Use this setting, along with DDS x-coordinate (ddsXCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the top of the frame and the top of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub fn dds_y_coordinate(&self) -> i32 {
self.dds_y_coordinate
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fn fallback_font(&self) -> std::option::Option<&crate::model::DvbSubSubtitleFallbackFont> {
self.fallback_font.as_ref()
}
/// Specify the color of the captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_color(&self) -> std::option::Option<&crate::model::DvbSubtitleFontColor> {
self.font_color.as_ref()
}
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_opacity(&self) -> i32 {
self.font_opacity
}
/// Specify the Font resolution (FontResolution) in DPI (dots per inch). Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_resolution(&self) -> i32 {
self.font_resolution
}
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_script(&self) -> std::option::Option<&crate::model::FontScript> {
self.font_script.as_ref()
}
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_size(&self) -> i32 {
self.font_size
}
/// Specify the height, in pixels, of this set of DVB-Sub captions. The default value is 576 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub fn height(&self) -> i32 {
self.height
}
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub fn hex_font_color(&self) -> std::option::Option<&str> {
self.hex_font_color.as_deref()
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn outline_color(&self) -> std::option::Option<&crate::model::DvbSubtitleOutlineColor> {
self.outline_color.as_ref()
}
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn outline_size(&self) -> i32 {
self.outline_size
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_color(&self) -> std::option::Option<&crate::model::DvbSubtitleShadowColor> {
self.shadow_color.as_ref()
}
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_opacity(&self) -> i32 {
self.shadow_opacity
}
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_x_offset(&self) -> i32 {
self.shadow_x_offset
}
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_y_offset(&self) -> i32 {
self.shadow_y_offset
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub fn style_passthrough(
&self,
) -> std::option::Option<&crate::model::DvbSubtitleStylePassthrough> {
self.style_passthrough.as_ref()
}
/// Specify whether your DVB subtitles are standard or for hearing impaired. Choose hearing impaired if your subtitles include audio descriptions and dialogue. Choose standard if your subtitles include only dialogue.
pub fn subtitling_type(&self) -> std::option::Option<&crate::model::DvbSubtitlingType> {
self.subtitling_type.as_ref()
}
/// Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn teletext_spacing(
&self,
) -> std::option::Option<&crate::model::DvbSubtitleTeletextSpacing> {
self.teletext_spacing.as_ref()
}
/// Specify the width, in pixels, of this set of DVB-Sub captions. The default value is 720 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub fn width(&self) -> i32 {
self.width
}
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the outputin pixels. A value of 10 would result in the captions starting 10 pixels from the left ofthe output. If no explicit x_position is provided, the horizontal caption position will bedetermined by the alignment parameter. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn x_position(&self) -> i32 {
self.x_position
}
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn y_position(&self) -> i32 {
self.y_position
}
}
impl std::fmt::Debug for DvbSubDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DvbSubDestinationSettings");
formatter.field("alignment", &self.alignment);
formatter.field("apply_font_color", &self.apply_font_color);
formatter.field("background_color", &self.background_color);
formatter.field("background_opacity", &self.background_opacity);
formatter.field("dds_handling", &self.dds_handling);
formatter.field("dds_x_coordinate", &self.dds_x_coordinate);
formatter.field("dds_y_coordinate", &self.dds_y_coordinate);
formatter.field("fallback_font", &self.fallback_font);
formatter.field("font_color", &self.font_color);
formatter.field("font_opacity", &self.font_opacity);
formatter.field("font_resolution", &self.font_resolution);
formatter.field("font_script", &self.font_script);
formatter.field("font_size", &self.font_size);
formatter.field("height", &self.height);
formatter.field("hex_font_color", &self.hex_font_color);
formatter.field("outline_color", &self.outline_color);
formatter.field("outline_size", &self.outline_size);
formatter.field("shadow_color", &self.shadow_color);
formatter.field("shadow_opacity", &self.shadow_opacity);
formatter.field("shadow_x_offset", &self.shadow_x_offset);
formatter.field("shadow_y_offset", &self.shadow_y_offset);
formatter.field("style_passthrough", &self.style_passthrough);
formatter.field("subtitling_type", &self.subtitling_type);
formatter.field("teletext_spacing", &self.teletext_spacing);
formatter.field("width", &self.width);
formatter.field("x_position", &self.x_position);
formatter.field("y_position", &self.y_position);
formatter.finish()
}
}
/// See [`DvbSubDestinationSettings`](crate::model::DvbSubDestinationSettings)
pub mod dvb_sub_destination_settings {
/// A builder for [`DvbSubDestinationSettings`](crate::model::DvbSubDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) alignment: std::option::Option<crate::model::DvbSubtitleAlignment>,
pub(crate) apply_font_color: std::option::Option<crate::model::DvbSubtitleApplyFontColor>,
pub(crate) background_color: std::option::Option<crate::model::DvbSubtitleBackgroundColor>,
pub(crate) background_opacity: std::option::Option<i32>,
pub(crate) dds_handling: std::option::Option<crate::model::DvbddsHandling>,
pub(crate) dds_x_coordinate: std::option::Option<i32>,
pub(crate) dds_y_coordinate: std::option::Option<i32>,
pub(crate) fallback_font: std::option::Option<crate::model::DvbSubSubtitleFallbackFont>,
pub(crate) font_color: std::option::Option<crate::model::DvbSubtitleFontColor>,
pub(crate) font_opacity: std::option::Option<i32>,
pub(crate) font_resolution: std::option::Option<i32>,
pub(crate) font_script: std::option::Option<crate::model::FontScript>,
pub(crate) font_size: std::option::Option<i32>,
pub(crate) height: std::option::Option<i32>,
pub(crate) hex_font_color: std::option::Option<std::string::String>,
pub(crate) outline_color: std::option::Option<crate::model::DvbSubtitleOutlineColor>,
pub(crate) outline_size: std::option::Option<i32>,
pub(crate) shadow_color: std::option::Option<crate::model::DvbSubtitleShadowColor>,
pub(crate) shadow_opacity: std::option::Option<i32>,
pub(crate) shadow_x_offset: std::option::Option<i32>,
pub(crate) shadow_y_offset: std::option::Option<i32>,
pub(crate) style_passthrough:
std::option::Option<crate::model::DvbSubtitleStylePassthrough>,
pub(crate) subtitling_type: std::option::Option<crate::model::DvbSubtitlingType>,
pub(crate) teletext_spacing: std::option::Option<crate::model::DvbSubtitleTeletextSpacing>,
pub(crate) width: std::option::Option<i32>,
pub(crate) x_position: std::option::Option<i32>,
pub(crate) y_position: std::option::Option<i32>,
}
impl Builder {
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn alignment(mut self, input: crate::model::DvbSubtitleAlignment) -> Self {
self.alignment = Some(input);
self
}
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_alignment(
mut self,
input: std::option::Option<crate::model::DvbSubtitleAlignment>,
) -> Self {
self.alignment = input;
self
}
/// Ignore this setting unless Style Passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub fn apply_font_color(mut self, input: crate::model::DvbSubtitleApplyFontColor) -> Self {
self.apply_font_color = Some(input);
self
}
/// Ignore this setting unless Style Passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub fn set_apply_font_color(
mut self,
input: std::option::Option<crate::model::DvbSubtitleApplyFontColor>,
) -> Self {
self.apply_font_color = input;
self
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub fn background_color(mut self, input: crate::model::DvbSubtitleBackgroundColor) -> Self {
self.background_color = Some(input);
self
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub fn set_background_color(
mut self,
input: std::option::Option<crate::model::DvbSubtitleBackgroundColor>,
) -> Self {
self.background_color = input;
self
}
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn background_opacity(mut self, input: i32) -> Self {
self.background_opacity = Some(input);
self
}
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_background_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.background_opacity = input;
self
}
/// Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.
pub fn dds_handling(mut self, input: crate::model::DvbddsHandling) -> Self {
self.dds_handling = Some(input);
self
}
/// Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.
pub fn set_dds_handling(
mut self,
input: std::option::Option<crate::model::DvbddsHandling>,
) -> Self {
self.dds_handling = input;
self
}
/// Use this setting, along with DDS y-coordinate (ddsYCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the left side of the frame and the left side of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub fn dds_x_coordinate(mut self, input: i32) -> Self {
self.dds_x_coordinate = Some(input);
self
}
/// Use this setting, along with DDS y-coordinate (ddsYCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the left side of the frame and the left side of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub fn set_dds_x_coordinate(mut self, input: std::option::Option<i32>) -> Self {
self.dds_x_coordinate = input;
self
}
/// Use this setting, along with DDS x-coordinate (ddsXCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the top of the frame and the top of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub fn dds_y_coordinate(mut self, input: i32) -> Self {
self.dds_y_coordinate = Some(input);
self
}
/// Use this setting, along with DDS x-coordinate (ddsXCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the top of the frame and the top of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.
pub fn set_dds_y_coordinate(mut self, input: std::option::Option<i32>) -> Self {
self.dds_y_coordinate = input;
self
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fn fallback_font(mut self, input: crate::model::DvbSubSubtitleFallbackFont) -> Self {
self.fallback_font = Some(input);
self
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fn set_fallback_font(
mut self,
input: std::option::Option<crate::model::DvbSubSubtitleFallbackFont>,
) -> Self {
self.fallback_font = input;
self
}
/// Specify the color of the captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_color(mut self, input: crate::model::DvbSubtitleFontColor) -> Self {
self.font_color = Some(input);
self
}
/// Specify the color of the captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_font_color(
mut self,
input: std::option::Option<crate::model::DvbSubtitleFontColor>,
) -> Self {
self.font_color = input;
self
}
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_opacity(mut self, input: i32) -> Self {
self.font_opacity = Some(input);
self
}
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_font_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.font_opacity = input;
self
}
/// Specify the Font resolution (FontResolution) in DPI (dots per inch). Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_resolution(mut self, input: i32) -> Self {
self.font_resolution = Some(input);
self
}
/// Specify the Font resolution (FontResolution) in DPI (dots per inch). Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_font_resolution(mut self, input: std::option::Option<i32>) -> Self {
self.font_resolution = input;
self
}
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_script(mut self, input: crate::model::FontScript) -> Self {
self.font_script = Some(input);
self
}
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_font_script(
mut self,
input: std::option::Option<crate::model::FontScript>,
) -> Self {
self.font_script = input;
self
}
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn font_size(mut self, input: i32) -> Self {
self.font_size = Some(input);
self
}
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_font_size(mut self, input: std::option::Option<i32>) -> Self {
self.font_size = input;
self
}
/// Specify the height, in pixels, of this set of DVB-Sub captions. The default value is 576 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Specify the height, in pixels, of this set of DVB-Sub captions. The default value is 576 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub fn hex_font_color(mut self, input: impl Into<std::string::String>) -> Self {
self.hex_font_color = Some(input.into());
self
}
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub fn set_hex_font_color(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.hex_font_color = input;
self
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn outline_color(mut self, input: crate::model::DvbSubtitleOutlineColor) -> Self {
self.outline_color = Some(input);
self
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_outline_color(
mut self,
input: std::option::Option<crate::model::DvbSubtitleOutlineColor>,
) -> Self {
self.outline_color = input;
self
}
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn outline_size(mut self, input: i32) -> Self {
self.outline_size = Some(input);
self
}
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_outline_size(mut self, input: std::option::Option<i32>) -> Self {
self.outline_size = input;
self
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_color(mut self, input: crate::model::DvbSubtitleShadowColor) -> Self {
self.shadow_color = Some(input);
self
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_shadow_color(
mut self,
input: std::option::Option<crate::model::DvbSubtitleShadowColor>,
) -> Self {
self.shadow_color = input;
self
}
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_opacity(mut self, input: i32) -> Self {
self.shadow_opacity = Some(input);
self
}
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_shadow_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.shadow_opacity = input;
self
}
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_x_offset(mut self, input: i32) -> Self {
self.shadow_x_offset = Some(input);
self
}
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_shadow_x_offset(mut self, input: std::option::Option<i32>) -> Self {
self.shadow_x_offset = input;
self
}
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn shadow_y_offset(mut self, input: i32) -> Self {
self.shadow_y_offset = Some(input);
self
}
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_shadow_y_offset(mut self, input: std::option::Option<i32>) -> Self {
self.shadow_y_offset = input;
self
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub fn style_passthrough(
mut self,
input: crate::model::DvbSubtitleStylePassthrough,
) -> Self {
self.style_passthrough = Some(input);
self
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub fn set_style_passthrough(
mut self,
input: std::option::Option<crate::model::DvbSubtitleStylePassthrough>,
) -> Self {
self.style_passthrough = input;
self
}
/// Specify whether your DVB subtitles are standard or for hearing impaired. Choose hearing impaired if your subtitles include audio descriptions and dialogue. Choose standard if your subtitles include only dialogue.
pub fn subtitling_type(mut self, input: crate::model::DvbSubtitlingType) -> Self {
self.subtitling_type = Some(input);
self
}
/// Specify whether your DVB subtitles are standard or for hearing impaired. Choose hearing impaired if your subtitles include audio descriptions and dialogue. Choose standard if your subtitles include only dialogue.
pub fn set_subtitling_type(
mut self,
input: std::option::Option<crate::model::DvbSubtitlingType>,
) -> Self {
self.subtitling_type = input;
self
}
/// Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn teletext_spacing(mut self, input: crate::model::DvbSubtitleTeletextSpacing) -> Self {
self.teletext_spacing = Some(input);
self
}
/// Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_teletext_spacing(
mut self,
input: std::option::Option<crate::model::DvbSubtitleTeletextSpacing>,
) -> Self {
self.teletext_spacing = input;
self
}
/// Specify the width, in pixels, of this set of DVB-Sub captions. The default value is 720 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Specify the width, in pixels, of this set of DVB-Sub captions. The default value is 720 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the outputin pixels. A value of 10 would result in the captions starting 10 pixels from the left ofthe output. If no explicit x_position is provided, the horizontal caption position will bedetermined by the alignment parameter. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn x_position(mut self, input: i32) -> Self {
self.x_position = Some(input);
self
}
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the outputin pixels. A value of 10 would result in the captions starting 10 pixels from the left ofthe output. If no explicit x_position is provided, the horizontal caption position will bedetermined by the alignment parameter. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_x_position(mut self, input: std::option::Option<i32>) -> Self {
self.x_position = input;
self
}
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn y_position(mut self, input: i32) -> Self {
self.y_position = Some(input);
self
}
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output. Within your job settings, all of your DVB-Sub settings must be identical.
pub fn set_y_position(mut self, input: std::option::Option<i32>) -> Self {
self.y_position = input;
self
}
/// Consumes the builder and constructs a [`DvbSubDestinationSettings`](crate::model::DvbSubDestinationSettings)
pub fn build(self) -> crate::model::DvbSubDestinationSettings {
crate::model::DvbSubDestinationSettings {
alignment: self.alignment,
apply_font_color: self.apply_font_color,
background_color: self.background_color,
background_opacity: self.background_opacity.unwrap_or_default(),
dds_handling: self.dds_handling,
dds_x_coordinate: self.dds_x_coordinate.unwrap_or_default(),
dds_y_coordinate: self.dds_y_coordinate.unwrap_or_default(),
fallback_font: self.fallback_font,
font_color: self.font_color,
font_opacity: self.font_opacity.unwrap_or_default(),
font_resolution: self.font_resolution.unwrap_or_default(),
font_script: self.font_script,
font_size: self.font_size.unwrap_or_default(),
height: self.height.unwrap_or_default(),
hex_font_color: self.hex_font_color,
outline_color: self.outline_color,
outline_size: self.outline_size.unwrap_or_default(),
shadow_color: self.shadow_color,
shadow_opacity: self.shadow_opacity.unwrap_or_default(),
shadow_x_offset: self.shadow_x_offset.unwrap_or_default(),
shadow_y_offset: self.shadow_y_offset.unwrap_or_default(),
style_passthrough: self.style_passthrough,
subtitling_type: self.subtitling_type,
teletext_spacing: self.teletext_spacing,
width: self.width.unwrap_or_default(),
x_position: self.x_position.unwrap_or_default(),
y_position: self.y_position.unwrap_or_default(),
}
}
}
}
impl DvbSubDestinationSettings {
/// Creates a new builder-style object to manufacture [`DvbSubDestinationSettings`](crate::model::DvbSubDestinationSettings)
pub fn builder() -> crate::model::dvb_sub_destination_settings::Builder {
crate::model::dvb_sub_destination_settings::Builder::default()
}
}
/// Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleTeletextSpacing {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
FixedGrid,
#[allow(missing_docs)] // documentation missing in model
Proportional,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleTeletextSpacing {
fn from(s: &str) -> Self {
match s {
"AUTO" => DvbSubtitleTeletextSpacing::Auto,
"FIXED_GRID" => DvbSubtitleTeletextSpacing::FixedGrid,
"PROPORTIONAL" => DvbSubtitleTeletextSpacing::Proportional,
other => DvbSubtitleTeletextSpacing::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleTeletextSpacing {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleTeletextSpacing::from(s))
}
}
impl DvbSubtitleTeletextSpacing {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleTeletextSpacing::Auto => "AUTO",
DvbSubtitleTeletextSpacing::FixedGrid => "FIXED_GRID",
DvbSubtitleTeletextSpacing::Proportional => "PROPORTIONAL",
DvbSubtitleTeletextSpacing::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "FIXED_GRID", "PROPORTIONAL"]
}
}
impl AsRef<str> for DvbSubtitleTeletextSpacing {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether your DVB subtitles are standard or for hearing impaired. Choose hearing impaired if your subtitles include audio descriptions and dialogue. Choose standard if your subtitles include only dialogue.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitlingType {
#[allow(missing_docs)] // documentation missing in model
HearingImpaired,
#[allow(missing_docs)] // documentation missing in model
Standard,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitlingType {
fn from(s: &str) -> Self {
match s {
"HEARING_IMPAIRED" => DvbSubtitlingType::HearingImpaired,
"STANDARD" => DvbSubtitlingType::Standard,
other => DvbSubtitlingType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitlingType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitlingType::from(s))
}
}
impl DvbSubtitlingType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitlingType::HearingImpaired => "HEARING_IMPAIRED",
DvbSubtitlingType::Standard => "STANDARD",
DvbSubtitlingType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HEARING_IMPAIRED", "STANDARD"]
}
}
impl AsRef<str> for DvbSubtitlingType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleStylePassthrough {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleStylePassthrough {
fn from(s: &str) -> Self {
match s {
"DISABLED" => DvbSubtitleStylePassthrough::Disabled,
"ENABLED" => DvbSubtitleStylePassthrough::Enabled,
other => DvbSubtitleStylePassthrough::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleStylePassthrough {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleStylePassthrough::from(s))
}
}
impl DvbSubtitleStylePassthrough {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleStylePassthrough::Disabled => "DISABLED",
DvbSubtitleStylePassthrough::Enabled => "ENABLED",
DvbSubtitleStylePassthrough::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for DvbSubtitleStylePassthrough {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleShadowColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
White,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleShadowColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => DvbSubtitleShadowColor::Auto,
"BLACK" => DvbSubtitleShadowColor::Black,
"NONE" => DvbSubtitleShadowColor::None,
"WHITE" => DvbSubtitleShadowColor::White,
other => DvbSubtitleShadowColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleShadowColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleShadowColor::from(s))
}
}
impl DvbSubtitleShadowColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleShadowColor::Auto => "AUTO",
DvbSubtitleShadowColor::Black => "BLACK",
DvbSubtitleShadowColor::None => "NONE",
DvbSubtitleShadowColor::White => "WHITE",
DvbSubtitleShadowColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "BLACK", "NONE", "WHITE"]
}
}
impl AsRef<str> for DvbSubtitleShadowColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleOutlineColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
Blue,
#[allow(missing_docs)] // documentation missing in model
Green,
#[allow(missing_docs)] // documentation missing in model
Red,
#[allow(missing_docs)] // documentation missing in model
White,
#[allow(missing_docs)] // documentation missing in model
Yellow,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleOutlineColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => DvbSubtitleOutlineColor::Auto,
"BLACK" => DvbSubtitleOutlineColor::Black,
"BLUE" => DvbSubtitleOutlineColor::Blue,
"GREEN" => DvbSubtitleOutlineColor::Green,
"RED" => DvbSubtitleOutlineColor::Red,
"WHITE" => DvbSubtitleOutlineColor::White,
"YELLOW" => DvbSubtitleOutlineColor::Yellow,
other => DvbSubtitleOutlineColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleOutlineColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleOutlineColor::from(s))
}
}
impl DvbSubtitleOutlineColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleOutlineColor::Auto => "AUTO",
DvbSubtitleOutlineColor::Black => "BLACK",
DvbSubtitleOutlineColor::Blue => "BLUE",
DvbSubtitleOutlineColor::Green => "GREEN",
DvbSubtitleOutlineColor::Red => "RED",
DvbSubtitleOutlineColor::White => "WHITE",
DvbSubtitleOutlineColor::Yellow => "YELLOW",
DvbSubtitleOutlineColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "BLACK", "BLUE", "GREEN", "RED", "WHITE", "YELLOW"]
}
}
impl AsRef<str> for DvbSubtitleOutlineColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Provide the font script, using an ISO 15924 script code, if the LanguageCode is not sufficient for determining the script type. Where LanguageCode or CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum FontScript {
#[allow(missing_docs)] // documentation missing in model
Automatic,
#[allow(missing_docs)] // documentation missing in model
Hans,
#[allow(missing_docs)] // documentation missing in model
Hant,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for FontScript {
fn from(s: &str) -> Self {
match s {
"AUTOMATIC" => FontScript::Automatic,
"HANS" => FontScript::Hans,
"HANT" => FontScript::Hant,
other => FontScript::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for FontScript {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FontScript::from(s))
}
}
impl FontScript {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
FontScript::Automatic => "AUTOMATIC",
FontScript::Hans => "HANS",
FontScript::Hant => "HANT",
FontScript::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTOMATIC", "HANS", "HANT"]
}
}
impl AsRef<str> for FontScript {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the color of the captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleFontColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
Blue,
#[allow(missing_docs)] // documentation missing in model
Green,
#[allow(missing_docs)] // documentation missing in model
Hex,
#[allow(missing_docs)] // documentation missing in model
Red,
#[allow(missing_docs)] // documentation missing in model
White,
#[allow(missing_docs)] // documentation missing in model
Yellow,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleFontColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => DvbSubtitleFontColor::Auto,
"BLACK" => DvbSubtitleFontColor::Black,
"BLUE" => DvbSubtitleFontColor::Blue,
"GREEN" => DvbSubtitleFontColor::Green,
"HEX" => DvbSubtitleFontColor::Hex,
"RED" => DvbSubtitleFontColor::Red,
"WHITE" => DvbSubtitleFontColor::White,
"YELLOW" => DvbSubtitleFontColor::Yellow,
other => DvbSubtitleFontColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleFontColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleFontColor::from(s))
}
}
impl DvbSubtitleFontColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleFontColor::Auto => "AUTO",
DvbSubtitleFontColor::Black => "BLACK",
DvbSubtitleFontColor::Blue => "BLUE",
DvbSubtitleFontColor::Green => "GREEN",
DvbSubtitleFontColor::Hex => "HEX",
DvbSubtitleFontColor::Red => "RED",
DvbSubtitleFontColor::White => "WHITE",
DvbSubtitleFontColor::Yellow => "YELLOW",
DvbSubtitleFontColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTO", "BLACK", "BLUE", "GREEN", "HEX", "RED", "WHITE", "YELLOW",
]
}
}
impl AsRef<str> for DvbSubtitleFontColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubSubtitleFallbackFont {
#[allow(missing_docs)] // documentation missing in model
BestMatch,
#[allow(missing_docs)] // documentation missing in model
MonospacedSansserif,
#[allow(missing_docs)] // documentation missing in model
MonospacedSerif,
#[allow(missing_docs)] // documentation missing in model
ProportionalSansserif,
#[allow(missing_docs)] // documentation missing in model
ProportionalSerif,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubSubtitleFallbackFont {
fn from(s: &str) -> Self {
match s {
"BEST_MATCH" => DvbSubSubtitleFallbackFont::BestMatch,
"MONOSPACED_SANSSERIF" => DvbSubSubtitleFallbackFont::MonospacedSansserif,
"MONOSPACED_SERIF" => DvbSubSubtitleFallbackFont::MonospacedSerif,
"PROPORTIONAL_SANSSERIF" => DvbSubSubtitleFallbackFont::ProportionalSansserif,
"PROPORTIONAL_SERIF" => DvbSubSubtitleFallbackFont::ProportionalSerif,
other => DvbSubSubtitleFallbackFont::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubSubtitleFallbackFont {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubSubtitleFallbackFont::from(s))
}
}
impl DvbSubSubtitleFallbackFont {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubSubtitleFallbackFont::BestMatch => "BEST_MATCH",
DvbSubSubtitleFallbackFont::MonospacedSansserif => "MONOSPACED_SANSSERIF",
DvbSubSubtitleFallbackFont::MonospacedSerif => "MONOSPACED_SERIF",
DvbSubSubtitleFallbackFont::ProportionalSansserif => "PROPORTIONAL_SANSSERIF",
DvbSubSubtitleFallbackFont::ProportionalSerif => "PROPORTIONAL_SERIF",
DvbSubSubtitleFallbackFont::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BEST_MATCH",
"MONOSPACED_SANSSERIF",
"MONOSPACED_SERIF",
"PROPORTIONAL_SANSSERIF",
"PROPORTIONAL_SERIF",
]
}
}
impl AsRef<str> for DvbSubSubtitleFallbackFont {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbddsHandling {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
NoDisplayWindow,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbddsHandling {
fn from(s: &str) -> Self {
match s {
"NONE" => DvbddsHandling::None,
"NO_DISPLAY_WINDOW" => DvbddsHandling::NoDisplayWindow,
"SPECIFIED" => DvbddsHandling::Specified,
other => DvbddsHandling::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbddsHandling {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbddsHandling::from(s))
}
}
impl DvbddsHandling {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbddsHandling::None => "NONE",
DvbddsHandling::NoDisplayWindow => "NO_DISPLAY_WINDOW",
DvbddsHandling::Specified => "SPECIFIED",
DvbddsHandling::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "NO_DISPLAY_WINDOW", "SPECIFIED"]
}
}
impl AsRef<str> for DvbddsHandling {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleBackgroundColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
White,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleBackgroundColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => DvbSubtitleBackgroundColor::Auto,
"BLACK" => DvbSubtitleBackgroundColor::Black,
"NONE" => DvbSubtitleBackgroundColor::None,
"WHITE" => DvbSubtitleBackgroundColor::White,
other => DvbSubtitleBackgroundColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleBackgroundColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleBackgroundColor::from(s))
}
}
impl DvbSubtitleBackgroundColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleBackgroundColor::Auto => "AUTO",
DvbSubtitleBackgroundColor::Black => "BLACK",
DvbSubtitleBackgroundColor::None => "NONE",
DvbSubtitleBackgroundColor::White => "WHITE",
DvbSubtitleBackgroundColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "BLACK", "NONE", "WHITE"]
}
}
impl AsRef<str> for DvbSubtitleBackgroundColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless Style Passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleApplyFontColor {
#[allow(missing_docs)] // documentation missing in model
AllText,
#[allow(missing_docs)] // documentation missing in model
WhiteTextOnly,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleApplyFontColor {
fn from(s: &str) -> Self {
match s {
"ALL_TEXT" => DvbSubtitleApplyFontColor::AllText,
"WHITE_TEXT_ONLY" => DvbSubtitleApplyFontColor::WhiteTextOnly,
other => DvbSubtitleApplyFontColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleApplyFontColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleApplyFontColor::from(s))
}
}
impl DvbSubtitleApplyFontColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleApplyFontColor::AllText => "ALL_TEXT",
DvbSubtitleApplyFontColor::WhiteTextOnly => "WHITE_TEXT_ONLY",
DvbSubtitleApplyFontColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALL_TEXT", "WHITE_TEXT_ONLY"]
}
}
impl AsRef<str> for DvbSubtitleApplyFontColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates. Within your job settings, all of your DVB-Sub settings must be identical.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DvbSubtitleAlignment {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Centered,
#[allow(missing_docs)] // documentation missing in model
Left,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DvbSubtitleAlignment {
fn from(s: &str) -> Self {
match s {
"AUTO" => DvbSubtitleAlignment::Auto,
"CENTERED" => DvbSubtitleAlignment::Centered,
"LEFT" => DvbSubtitleAlignment::Left,
other => DvbSubtitleAlignment::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DvbSubtitleAlignment {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DvbSubtitleAlignment::from(s))
}
}
impl DvbSubtitleAlignment {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DvbSubtitleAlignment::Auto => "AUTO",
DvbSubtitleAlignment::Centered => "CENTERED",
DvbSubtitleAlignment::Left => "LEFT",
DvbSubtitleAlignment::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "CENTERED", "LEFT"]
}
}
impl AsRef<str> for DvbSubtitleAlignment {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the format for this set of captions on this output. The default format is embedded without SCTE-20. Note that your choice of video output container constrains your choice of output captions format. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/captions-support-tables.html. If you are using SCTE-20 and you want to create an output that complies with the SCTE-43 spec, choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED). To create a non-compliant output where the embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CaptionDestinationType {
#[allow(missing_docs)] // documentation missing in model
BurnIn,
#[allow(missing_docs)] // documentation missing in model
DvbSub,
#[allow(missing_docs)] // documentation missing in model
Embedded,
#[allow(missing_docs)] // documentation missing in model
EmbeddedPlusScte20,
#[allow(missing_docs)] // documentation missing in model
Imsc,
#[allow(missing_docs)] // documentation missing in model
Scc,
#[allow(missing_docs)] // documentation missing in model
Scte20PlusEmbedded,
#[allow(missing_docs)] // documentation missing in model
Smi,
#[allow(missing_docs)] // documentation missing in model
Srt,
#[allow(missing_docs)] // documentation missing in model
Teletext,
#[allow(missing_docs)] // documentation missing in model
Ttml,
#[allow(missing_docs)] // documentation missing in model
Webvtt,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CaptionDestinationType {
fn from(s: &str) -> Self {
match s {
"BURN_IN" => CaptionDestinationType::BurnIn,
"DVB_SUB" => CaptionDestinationType::DvbSub,
"EMBEDDED" => CaptionDestinationType::Embedded,
"EMBEDDED_PLUS_SCTE20" => CaptionDestinationType::EmbeddedPlusScte20,
"IMSC" => CaptionDestinationType::Imsc,
"SCC" => CaptionDestinationType::Scc,
"SCTE20_PLUS_EMBEDDED" => CaptionDestinationType::Scte20PlusEmbedded,
"SMI" => CaptionDestinationType::Smi,
"SRT" => CaptionDestinationType::Srt,
"TELETEXT" => CaptionDestinationType::Teletext,
"TTML" => CaptionDestinationType::Ttml,
"WEBVTT" => CaptionDestinationType::Webvtt,
other => CaptionDestinationType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CaptionDestinationType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CaptionDestinationType::from(s))
}
}
impl CaptionDestinationType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CaptionDestinationType::BurnIn => "BURN_IN",
CaptionDestinationType::DvbSub => "DVB_SUB",
CaptionDestinationType::Embedded => "EMBEDDED",
CaptionDestinationType::EmbeddedPlusScte20 => "EMBEDDED_PLUS_SCTE20",
CaptionDestinationType::Imsc => "IMSC",
CaptionDestinationType::Scc => "SCC",
CaptionDestinationType::Scte20PlusEmbedded => "SCTE20_PLUS_EMBEDDED",
CaptionDestinationType::Smi => "SMI",
CaptionDestinationType::Srt => "SRT",
CaptionDestinationType::Teletext => "TELETEXT",
CaptionDestinationType::Ttml => "TTML",
CaptionDestinationType::Webvtt => "WEBVTT",
CaptionDestinationType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BURN_IN",
"DVB_SUB",
"EMBEDDED",
"EMBEDDED_PLUS_SCTE20",
"IMSC",
"SCC",
"SCTE20_PLUS_EMBEDDED",
"SMI",
"SRT",
"TELETEXT",
"TTML",
"WEBVTT",
]
}
}
impl AsRef<str> for CaptionDestinationType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Burn-in is a captions delivery method, rather than a captions format. Burn-in writes the captions directly on your video frames, replacing pixels of video content with the captions. Set up burn-in captions in the same output as your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/burn-in-output-captions.html. When you work directly in your JSON job specification, include this object and any required children when you set destinationType to BURN_IN.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BurninDestinationSettings {
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates.
pub alignment: std::option::Option<crate::model::BurninSubtitleAlignment>,
/// Ignore this setting unless Style passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub apply_font_color: std::option::Option<crate::model::BurninSubtitleApplyFontColor>,
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub background_color: std::option::Option<crate::model::BurninSubtitleBackgroundColor>,
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions.
pub background_opacity: i32,
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fallback_font: std::option::Option<crate::model::BurninSubtitleFallbackFont>,
/// Specify the color of the burned-in captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present.
pub font_color: std::option::Option<crate::model::BurninSubtitleFontColor>,
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent.
pub font_opacity: i32,
/// Specify the Font resolution (FontResolution) in DPI (dots per inch).
pub font_resolution: i32,
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese.
pub font_script: std::option::Option<crate::model::FontScript>,
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size.
pub font_size: i32,
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub hex_font_color: std::option::Option<std::string::String>,
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present.
pub outline_color: std::option::Option<crate::model::BurninSubtitleOutlineColor>,
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present.
pub outline_size: i32,
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present.
pub shadow_color: std::option::Option<crate::model::BurninSubtitleShadowColor>,
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions.
pub shadow_opacity: i32,
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left.
pub shadow_x_offset: i32,
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present.
pub shadow_y_offset: i32,
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub style_passthrough: std::option::Option<crate::model::BurnInSubtitleStylePassthrough>,
/// Specify whether the text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions.
pub teletext_spacing: std::option::Option<crate::model::BurninSubtitleTeletextSpacing>,
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the left of the output. If no explicit x_position is provided, the horizontal caption position will be determined by the alignment parameter.
pub x_position: i32,
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output.
pub y_position: i32,
}
impl BurninDestinationSettings {
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates.
pub fn alignment(&self) -> std::option::Option<&crate::model::BurninSubtitleAlignment> {
self.alignment.as_ref()
}
/// Ignore this setting unless Style passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub fn apply_font_color(
&self,
) -> std::option::Option<&crate::model::BurninSubtitleApplyFontColor> {
self.apply_font_color.as_ref()
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub fn background_color(
&self,
) -> std::option::Option<&crate::model::BurninSubtitleBackgroundColor> {
self.background_color.as_ref()
}
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions.
pub fn background_opacity(&self) -> i32 {
self.background_opacity
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fn fallback_font(&self) -> std::option::Option<&crate::model::BurninSubtitleFallbackFont> {
self.fallback_font.as_ref()
}
/// Specify the color of the burned-in captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present.
pub fn font_color(&self) -> std::option::Option<&crate::model::BurninSubtitleFontColor> {
self.font_color.as_ref()
}
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent.
pub fn font_opacity(&self) -> i32 {
self.font_opacity
}
/// Specify the Font resolution (FontResolution) in DPI (dots per inch).
pub fn font_resolution(&self) -> i32 {
self.font_resolution
}
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese.
pub fn font_script(&self) -> std::option::Option<&crate::model::FontScript> {
self.font_script.as_ref()
}
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size.
pub fn font_size(&self) -> i32 {
self.font_size
}
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub fn hex_font_color(&self) -> std::option::Option<&str> {
self.hex_font_color.as_deref()
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present.
pub fn outline_color(&self) -> std::option::Option<&crate::model::BurninSubtitleOutlineColor> {
self.outline_color.as_ref()
}
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present.
pub fn outline_size(&self) -> i32 {
self.outline_size
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present.
pub fn shadow_color(&self) -> std::option::Option<&crate::model::BurninSubtitleShadowColor> {
self.shadow_color.as_ref()
}
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions.
pub fn shadow_opacity(&self) -> i32 {
self.shadow_opacity
}
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left.
pub fn shadow_x_offset(&self) -> i32 {
self.shadow_x_offset
}
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present.
pub fn shadow_y_offset(&self) -> i32 {
self.shadow_y_offset
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub fn style_passthrough(
&self,
) -> std::option::Option<&crate::model::BurnInSubtitleStylePassthrough> {
self.style_passthrough.as_ref()
}
/// Specify whether the text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions.
pub fn teletext_spacing(
&self,
) -> std::option::Option<&crate::model::BurninSubtitleTeletextSpacing> {
self.teletext_spacing.as_ref()
}
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the left of the output. If no explicit x_position is provided, the horizontal caption position will be determined by the alignment parameter.
pub fn x_position(&self) -> i32 {
self.x_position
}
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output.
pub fn y_position(&self) -> i32 {
self.y_position
}
}
impl std::fmt::Debug for BurninDestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BurninDestinationSettings");
formatter.field("alignment", &self.alignment);
formatter.field("apply_font_color", &self.apply_font_color);
formatter.field("background_color", &self.background_color);
formatter.field("background_opacity", &self.background_opacity);
formatter.field("fallback_font", &self.fallback_font);
formatter.field("font_color", &self.font_color);
formatter.field("font_opacity", &self.font_opacity);
formatter.field("font_resolution", &self.font_resolution);
formatter.field("font_script", &self.font_script);
formatter.field("font_size", &self.font_size);
formatter.field("hex_font_color", &self.hex_font_color);
formatter.field("outline_color", &self.outline_color);
formatter.field("outline_size", &self.outline_size);
formatter.field("shadow_color", &self.shadow_color);
formatter.field("shadow_opacity", &self.shadow_opacity);
formatter.field("shadow_x_offset", &self.shadow_x_offset);
formatter.field("shadow_y_offset", &self.shadow_y_offset);
formatter.field("style_passthrough", &self.style_passthrough);
formatter.field("teletext_spacing", &self.teletext_spacing);
formatter.field("x_position", &self.x_position);
formatter.field("y_position", &self.y_position);
formatter.finish()
}
}
/// See [`BurninDestinationSettings`](crate::model::BurninDestinationSettings)
pub mod burnin_destination_settings {
/// A builder for [`BurninDestinationSettings`](crate::model::BurninDestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) alignment: std::option::Option<crate::model::BurninSubtitleAlignment>,
pub(crate) apply_font_color:
std::option::Option<crate::model::BurninSubtitleApplyFontColor>,
pub(crate) background_color:
std::option::Option<crate::model::BurninSubtitleBackgroundColor>,
pub(crate) background_opacity: std::option::Option<i32>,
pub(crate) fallback_font: std::option::Option<crate::model::BurninSubtitleFallbackFont>,
pub(crate) font_color: std::option::Option<crate::model::BurninSubtitleFontColor>,
pub(crate) font_opacity: std::option::Option<i32>,
pub(crate) font_resolution: std::option::Option<i32>,
pub(crate) font_script: std::option::Option<crate::model::FontScript>,
pub(crate) font_size: std::option::Option<i32>,
pub(crate) hex_font_color: std::option::Option<std::string::String>,
pub(crate) outline_color: std::option::Option<crate::model::BurninSubtitleOutlineColor>,
pub(crate) outline_size: std::option::Option<i32>,
pub(crate) shadow_color: std::option::Option<crate::model::BurninSubtitleShadowColor>,
pub(crate) shadow_opacity: std::option::Option<i32>,
pub(crate) shadow_x_offset: std::option::Option<i32>,
pub(crate) shadow_y_offset: std::option::Option<i32>,
pub(crate) style_passthrough:
std::option::Option<crate::model::BurnInSubtitleStylePassthrough>,
pub(crate) teletext_spacing:
std::option::Option<crate::model::BurninSubtitleTeletextSpacing>,
pub(crate) x_position: std::option::Option<i32>,
pub(crate) y_position: std::option::Option<i32>,
}
impl Builder {
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates.
pub fn alignment(mut self, input: crate::model::BurninSubtitleAlignment) -> Self {
self.alignment = Some(input);
self
}
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates.
pub fn set_alignment(
mut self,
input: std::option::Option<crate::model::BurninSubtitleAlignment>,
) -> Self {
self.alignment = input;
self
}
/// Ignore this setting unless Style passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub fn apply_font_color(
mut self,
input: crate::model::BurninSubtitleApplyFontColor,
) -> Self {
self.apply_font_color = Some(input);
self
}
/// Ignore this setting unless Style passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
pub fn set_apply_font_color(
mut self,
input: std::option::Option<crate::model::BurninSubtitleApplyFontColor>,
) -> Self {
self.apply_font_color = input;
self
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub fn background_color(
mut self,
input: crate::model::BurninSubtitleBackgroundColor,
) -> Self {
self.background_color = Some(input);
self
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
pub fn set_background_color(
mut self,
input: std::option::Option<crate::model::BurninSubtitleBackgroundColor>,
) -> Self {
self.background_color = input;
self
}
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions.
pub fn background_opacity(mut self, input: i32) -> Self {
self.background_opacity = Some(input);
self
}
/// Specify the opacity of the background rectangle. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to enabled, leave blank to pass through the background style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all backgrounds from your output captions.
pub fn set_background_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.background_opacity = input;
self
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fn fallback_font(mut self, input: crate::model::BurninSubtitleFallbackFont) -> Self {
self.fallback_font = Some(input);
self
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
pub fn set_fallback_font(
mut self,
input: std::option::Option<crate::model::BurninSubtitleFallbackFont>,
) -> Self {
self.fallback_font = input;
self
}
/// Specify the color of the burned-in captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present.
pub fn font_color(mut self, input: crate::model::BurninSubtitleFontColor) -> Self {
self.font_color = Some(input);
self
}
/// Specify the color of the burned-in captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present.
pub fn set_font_color(
mut self,
input: std::option::Option<crate::model::BurninSubtitleFontColor>,
) -> Self {
self.font_color = input;
self
}
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent.
pub fn font_opacity(mut self, input: i32) -> Self {
self.font_opacity = Some(input);
self
}
/// Specify the opacity of the burned-in captions. 255 is opaque; 0 is transparent.
pub fn set_font_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.font_opacity = input;
self
}
/// Specify the Font resolution (FontResolution) in DPI (dots per inch).
pub fn font_resolution(mut self, input: i32) -> Self {
self.font_resolution = Some(input);
self
}
/// Specify the Font resolution (FontResolution) in DPI (dots per inch).
pub fn set_font_resolution(mut self, input: std::option::Option<i32>) -> Self {
self.font_resolution = input;
self
}
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese.
pub fn font_script(mut self, input: crate::model::FontScript) -> Self {
self.font_script = Some(input);
self
}
/// Set Font script (FontScript) to Automatically determined (AUTOMATIC), or leave blank, to automatically determine the font script in your input captions. Otherwise, set to Simplified Chinese (HANS) or Traditional Chinese (HANT) if your input font script uses Simplified or Traditional Chinese.
pub fn set_font_script(
mut self,
input: std::option::Option<crate::model::FontScript>,
) -> Self {
self.font_script = input;
self
}
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size.
pub fn font_size(mut self, input: i32) -> Self {
self.font_size = Some(input);
self
}
/// Specify the Font size (FontSize) in pixels. Must be a positive integer. Set to 0, or leave blank, for automatic font size.
pub fn set_font_size(mut self, input: std::option::Option<i32>) -> Self {
self.font_size = input;
self
}
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub fn hex_font_color(mut self, input: impl Into<std::string::String>) -> Self {
self.hex_font_color = Some(input.into());
self
}
/// Ignore this setting unless your Font color is set to Hex. Enter either six or eight hexidecimal digits, representing red, green, and blue, with two optional extra digits for alpha. For example a value of 1122AABB is a red value of 0x11, a green value of 0x22, a blue value of 0xAA, and an alpha value of 0xBB.
pub fn set_hex_font_color(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.hex_font_color = input;
self
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present.
pub fn outline_color(mut self, input: crate::model::BurninSubtitleOutlineColor) -> Self {
self.outline_color = Some(input);
self
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present.
pub fn set_outline_color(
mut self,
input: std::option::Option<crate::model::BurninSubtitleOutlineColor>,
) -> Self {
self.outline_color = input;
self
}
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present.
pub fn outline_size(mut self, input: i32) -> Self {
self.outline_size = Some(input);
self
}
/// Specify the Outline size (OutlineSize) of the caption text, in pixels. Leave Outline size blank and set Style passthrough (StylePassthrough) to enabled to use the outline size data from your input captions, if present.
pub fn set_outline_size(mut self, input: std::option::Option<i32>) -> Self {
self.outline_size = input;
self
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present.
pub fn shadow_color(mut self, input: crate::model::BurninSubtitleShadowColor) -> Self {
self.shadow_color = Some(input);
self
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present.
pub fn set_shadow_color(
mut self,
input: std::option::Option<crate::model::BurninSubtitleShadowColor>,
) -> Self {
self.shadow_color = input;
self
}
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions.
pub fn shadow_opacity(mut self, input: i32) -> Self {
self.shadow_opacity = Some(input);
self
}
/// Specify the opacity of the shadow. Enter a value from 0 to 255, where 0 is transparent and 255 is opaque. If Style passthrough (StylePassthrough) is set to Enabled, leave Shadow opacity (ShadowOpacity) blank to pass through the shadow style information in your input captions to your output captions. If Style passthrough is set to disabled, leave blank to use a value of 0 and remove all shadows from your output captions.
pub fn set_shadow_opacity(mut self, input: std::option::Option<i32>) -> Self {
self.shadow_opacity = input;
self
}
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left.
pub fn shadow_x_offset(mut self, input: i32) -> Self {
self.shadow_x_offset = Some(input);
self
}
/// Specify the horizontal offset of the shadow, relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels to the left.
pub fn set_shadow_x_offset(mut self, input: std::option::Option<i32>) -> Self {
self.shadow_x_offset = input;
self
}
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present.
pub fn shadow_y_offset(mut self, input: i32) -> Self {
self.shadow_y_offset = Some(input);
self
}
/// Specify the vertical offset of the shadow relative to the captions in pixels. A value of -2 would result in a shadow offset 2 pixels above the text. Leave Shadow y-offset (ShadowYOffset) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow y-offset data from your input captions, if present.
pub fn set_shadow_y_offset(mut self, input: std::option::Option<i32>) -> Self {
self.shadow_y_offset = input;
self
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub fn style_passthrough(
mut self,
input: crate::model::BurnInSubtitleStylePassthrough,
) -> Self {
self.style_passthrough = Some(input);
self
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
pub fn set_style_passthrough(
mut self,
input: std::option::Option<crate::model::BurnInSubtitleStylePassthrough>,
) -> Self {
self.style_passthrough = input;
self
}
/// Specify whether the text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions.
pub fn teletext_spacing(
mut self,
input: crate::model::BurninSubtitleTeletextSpacing,
) -> Self {
self.teletext_spacing = Some(input);
self
}
/// Specify whether the text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions.
pub fn set_teletext_spacing(
mut self,
input: std::option::Option<crate::model::BurninSubtitleTeletextSpacing>,
) -> Self {
self.teletext_spacing = input;
self
}
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the left of the output. If no explicit x_position is provided, the horizontal caption position will be determined by the alignment parameter.
pub fn x_position(mut self, input: i32) -> Self {
self.x_position = Some(input);
self
}
/// Specify the horizontal position (XPosition) of the captions, relative to the left side of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the left of the output. If no explicit x_position is provided, the horizontal caption position will be determined by the alignment parameter.
pub fn set_x_position(mut self, input: std::option::Option<i32>) -> Self {
self.x_position = input;
self
}
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output.
pub fn y_position(mut self, input: i32) -> Self {
self.y_position = Some(input);
self
}
/// Specify the vertical position (YPosition) of the captions, relative to the top of the output in pixels. A value of 10 would result in the captions starting 10 pixels from the top of the output. If no explicit y_position is provided, the caption will be positioned towards the bottom of the output.
pub fn set_y_position(mut self, input: std::option::Option<i32>) -> Self {
self.y_position = input;
self
}
/// Consumes the builder and constructs a [`BurninDestinationSettings`](crate::model::BurninDestinationSettings)
pub fn build(self) -> crate::model::BurninDestinationSettings {
crate::model::BurninDestinationSettings {
alignment: self.alignment,
apply_font_color: self.apply_font_color,
background_color: self.background_color,
background_opacity: self.background_opacity.unwrap_or_default(),
fallback_font: self.fallback_font,
font_color: self.font_color,
font_opacity: self.font_opacity.unwrap_or_default(),
font_resolution: self.font_resolution.unwrap_or_default(),
font_script: self.font_script,
font_size: self.font_size.unwrap_or_default(),
hex_font_color: self.hex_font_color,
outline_color: self.outline_color,
outline_size: self.outline_size.unwrap_or_default(),
shadow_color: self.shadow_color,
shadow_opacity: self.shadow_opacity.unwrap_or_default(),
shadow_x_offset: self.shadow_x_offset.unwrap_or_default(),
shadow_y_offset: self.shadow_y_offset.unwrap_or_default(),
style_passthrough: self.style_passthrough,
teletext_spacing: self.teletext_spacing,
x_position: self.x_position.unwrap_or_default(),
y_position: self.y_position.unwrap_or_default(),
}
}
}
}
impl BurninDestinationSettings {
/// Creates a new builder-style object to manufacture [`BurninDestinationSettings`](crate::model::BurninDestinationSettings)
pub fn builder() -> crate::model::burnin_destination_settings::Builder {
crate::model::burnin_destination_settings::Builder::default()
}
}
/// Specify whether the text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleTeletextSpacing {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
FixedGrid,
#[allow(missing_docs)] // documentation missing in model
Proportional,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleTeletextSpacing {
fn from(s: &str) -> Self {
match s {
"AUTO" => BurninSubtitleTeletextSpacing::Auto,
"FIXED_GRID" => BurninSubtitleTeletextSpacing::FixedGrid,
"PROPORTIONAL" => BurninSubtitleTeletextSpacing::Proportional,
other => BurninSubtitleTeletextSpacing::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleTeletextSpacing {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleTeletextSpacing::from(s))
}
}
impl BurninSubtitleTeletextSpacing {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleTeletextSpacing::Auto => "AUTO",
BurninSubtitleTeletextSpacing::FixedGrid => "FIXED_GRID",
BurninSubtitleTeletextSpacing::Proportional => "PROPORTIONAL",
BurninSubtitleTeletextSpacing::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "FIXED_GRID", "PROPORTIONAL"]
}
}
impl AsRef<str> for BurninSubtitleTeletextSpacing {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Set Style passthrough (StylePassthrough) to ENABLED to use the available style, color, and position information from your input captions. MediaConvert uses default settings for any missing style and position information in your input captions. Set Style passthrough to DISABLED, or leave blank, to ignore the style and position information from your input captions and use default settings: white text with black outlining, bottom-center positioning, and automatic sizing. Whether you set Style passthrough to enabled or not, you can also choose to manually override any of the individual style and position settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurnInSubtitleStylePassthrough {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurnInSubtitleStylePassthrough {
fn from(s: &str) -> Self {
match s {
"DISABLED" => BurnInSubtitleStylePassthrough::Disabled,
"ENABLED" => BurnInSubtitleStylePassthrough::Enabled,
other => BurnInSubtitleStylePassthrough::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurnInSubtitleStylePassthrough {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurnInSubtitleStylePassthrough::from(s))
}
}
impl BurnInSubtitleStylePassthrough {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurnInSubtitleStylePassthrough::Disabled => "DISABLED",
BurnInSubtitleStylePassthrough::Enabled => "ENABLED",
BurnInSubtitleStylePassthrough::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for BurnInSubtitleStylePassthrough {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the color of the shadow cast by the captions. Leave Shadow color (ShadowColor) blank and set Style passthrough (StylePassthrough) to enabled to use the shadow color data from your input captions, if present.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleShadowColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
White,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleShadowColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => BurninSubtitleShadowColor::Auto,
"BLACK" => BurninSubtitleShadowColor::Black,
"NONE" => BurninSubtitleShadowColor::None,
"WHITE" => BurninSubtitleShadowColor::White,
other => BurninSubtitleShadowColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleShadowColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleShadowColor::from(s))
}
}
impl BurninSubtitleShadowColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleShadowColor::Auto => "AUTO",
BurninSubtitleShadowColor::Black => "BLACK",
BurninSubtitleShadowColor::None => "NONE",
BurninSubtitleShadowColor::White => "WHITE",
BurninSubtitleShadowColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "BLACK", "NONE", "WHITE"]
}
}
impl AsRef<str> for BurninSubtitleShadowColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify font outline color. Leave Outline color (OutlineColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font outline color data from your input captions, if present.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleOutlineColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
Blue,
#[allow(missing_docs)] // documentation missing in model
Green,
#[allow(missing_docs)] // documentation missing in model
Red,
#[allow(missing_docs)] // documentation missing in model
White,
#[allow(missing_docs)] // documentation missing in model
Yellow,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleOutlineColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => BurninSubtitleOutlineColor::Auto,
"BLACK" => BurninSubtitleOutlineColor::Black,
"BLUE" => BurninSubtitleOutlineColor::Blue,
"GREEN" => BurninSubtitleOutlineColor::Green,
"RED" => BurninSubtitleOutlineColor::Red,
"WHITE" => BurninSubtitleOutlineColor::White,
"YELLOW" => BurninSubtitleOutlineColor::Yellow,
other => BurninSubtitleOutlineColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleOutlineColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleOutlineColor::from(s))
}
}
impl BurninSubtitleOutlineColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleOutlineColor::Auto => "AUTO",
BurninSubtitleOutlineColor::Black => "BLACK",
BurninSubtitleOutlineColor::Blue => "BLUE",
BurninSubtitleOutlineColor::Green => "GREEN",
BurninSubtitleOutlineColor::Red => "RED",
BurninSubtitleOutlineColor::White => "WHITE",
BurninSubtitleOutlineColor::Yellow => "YELLOW",
BurninSubtitleOutlineColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "BLACK", "BLUE", "GREEN", "RED", "WHITE", "YELLOW"]
}
}
impl AsRef<str> for BurninSubtitleOutlineColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the color of the burned-in captions text. Leave Font color (FontColor) blank and set Style passthrough (StylePassthrough) to enabled to use the font color data from your input captions, if present.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleFontColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
Blue,
#[allow(missing_docs)] // documentation missing in model
Green,
#[allow(missing_docs)] // documentation missing in model
Hex,
#[allow(missing_docs)] // documentation missing in model
Red,
#[allow(missing_docs)] // documentation missing in model
White,
#[allow(missing_docs)] // documentation missing in model
Yellow,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleFontColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => BurninSubtitleFontColor::Auto,
"BLACK" => BurninSubtitleFontColor::Black,
"BLUE" => BurninSubtitleFontColor::Blue,
"GREEN" => BurninSubtitleFontColor::Green,
"HEX" => BurninSubtitleFontColor::Hex,
"RED" => BurninSubtitleFontColor::Red,
"WHITE" => BurninSubtitleFontColor::White,
"YELLOW" => BurninSubtitleFontColor::Yellow,
other => BurninSubtitleFontColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleFontColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleFontColor::from(s))
}
}
impl BurninSubtitleFontColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleFontColor::Auto => "AUTO",
BurninSubtitleFontColor::Black => "BLACK",
BurninSubtitleFontColor::Blue => "BLUE",
BurninSubtitleFontColor::Green => "GREEN",
BurninSubtitleFontColor::Hex => "HEX",
BurninSubtitleFontColor::Red => "RED",
BurninSubtitleFontColor::White => "WHITE",
BurninSubtitleFontColor::Yellow => "YELLOW",
BurninSubtitleFontColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTO", "BLACK", "BLUE", "GREEN", "HEX", "RED", "WHITE", "YELLOW",
]
}
}
impl AsRef<str> for BurninSubtitleFontColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the font that you want the service to use for your burn in captions when your input captions specify a font that MediaConvert doesn't support. When you set Fallback font (FallbackFont) to best match (BEST_MATCH), or leave blank, MediaConvert uses a supported font that most closely matches the font that your input captions specify. When there are multiple unsupported fonts in your input captions, MediaConvert matches each font with the supported font that matches best. When you explicitly choose a replacement font, MediaConvert uses that font to replace all unsupported fonts from your input.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleFallbackFont {
#[allow(missing_docs)] // documentation missing in model
BestMatch,
#[allow(missing_docs)] // documentation missing in model
MonospacedSansserif,
#[allow(missing_docs)] // documentation missing in model
MonospacedSerif,
#[allow(missing_docs)] // documentation missing in model
ProportionalSansserif,
#[allow(missing_docs)] // documentation missing in model
ProportionalSerif,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleFallbackFont {
fn from(s: &str) -> Self {
match s {
"BEST_MATCH" => BurninSubtitleFallbackFont::BestMatch,
"MONOSPACED_SANSSERIF" => BurninSubtitleFallbackFont::MonospacedSansserif,
"MONOSPACED_SERIF" => BurninSubtitleFallbackFont::MonospacedSerif,
"PROPORTIONAL_SANSSERIF" => BurninSubtitleFallbackFont::ProportionalSansserif,
"PROPORTIONAL_SERIF" => BurninSubtitleFallbackFont::ProportionalSerif,
other => BurninSubtitleFallbackFont::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleFallbackFont {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleFallbackFont::from(s))
}
}
impl BurninSubtitleFallbackFont {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleFallbackFont::BestMatch => "BEST_MATCH",
BurninSubtitleFallbackFont::MonospacedSansserif => "MONOSPACED_SANSSERIF",
BurninSubtitleFallbackFont::MonospacedSerif => "MONOSPACED_SERIF",
BurninSubtitleFallbackFont::ProportionalSansserif => "PROPORTIONAL_SANSSERIF",
BurninSubtitleFallbackFont::ProportionalSerif => "PROPORTIONAL_SERIF",
BurninSubtitleFallbackFont::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"BEST_MATCH",
"MONOSPACED_SANSSERIF",
"MONOSPACED_SERIF",
"PROPORTIONAL_SANSSERIF",
"PROPORTIONAL_SERIF",
]
}
}
impl AsRef<str> for BurninSubtitleFallbackFont {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleBackgroundColor {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
White,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleBackgroundColor {
fn from(s: &str) -> Self {
match s {
"AUTO" => BurninSubtitleBackgroundColor::Auto,
"BLACK" => BurninSubtitleBackgroundColor::Black,
"NONE" => BurninSubtitleBackgroundColor::None,
"WHITE" => BurninSubtitleBackgroundColor::White,
other => BurninSubtitleBackgroundColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleBackgroundColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleBackgroundColor::from(s))
}
}
impl BurninSubtitleBackgroundColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleBackgroundColor::Auto => "AUTO",
BurninSubtitleBackgroundColor::Black => "BLACK",
BurninSubtitleBackgroundColor::None => "NONE",
BurninSubtitleBackgroundColor::White => "WHITE",
BurninSubtitleBackgroundColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "BLACK", "NONE", "WHITE"]
}
}
impl AsRef<str> for BurninSubtitleBackgroundColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless Style passthrough (StylePassthrough) is set to Enabled and Font color (FontColor) set to Black, Yellow, Red, Green, Blue, or Hex. Use Apply font color (ApplyFontColor) for additional font color controls. When you choose White text only (WHITE_TEXT_ONLY), or leave blank, your font color setting only applies to white text in your input captions. For example, if your font color setting is Yellow, and your input captions have red and white text, your output captions will have red and yellow text. When you choose ALL_TEXT, your font color setting applies to all of your output captions text.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleApplyFontColor {
#[allow(missing_docs)] // documentation missing in model
AllText,
#[allow(missing_docs)] // documentation missing in model
WhiteTextOnly,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleApplyFontColor {
fn from(s: &str) -> Self {
match s {
"ALL_TEXT" => BurninSubtitleApplyFontColor::AllText,
"WHITE_TEXT_ONLY" => BurninSubtitleApplyFontColor::WhiteTextOnly,
other => BurninSubtitleApplyFontColor::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleApplyFontColor {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleApplyFontColor::from(s))
}
}
impl BurninSubtitleApplyFontColor {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleApplyFontColor::AllText => "ALL_TEXT",
BurninSubtitleApplyFontColor::WhiteTextOnly => "WHITE_TEXT_ONLY",
BurninSubtitleApplyFontColor::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALL_TEXT", "WHITE_TEXT_ONLY"]
}
}
impl AsRef<str> for BurninSubtitleApplyFontColor {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the alignment of your captions. If no explicit x_position is provided, setting alignment to centered will placethe captions at the bottom center of the output. Similarly, setting a left alignment willalign captions to the bottom left of the output. If x and y positions are given in conjunction with the alignment parameter, the font will be justified (either left or centered) relative to those coordinates.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BurninSubtitleAlignment {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Centered,
#[allow(missing_docs)] // documentation missing in model
Left,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BurninSubtitleAlignment {
fn from(s: &str) -> Self {
match s {
"AUTO" => BurninSubtitleAlignment::Auto,
"CENTERED" => BurninSubtitleAlignment::Centered,
"LEFT" => BurninSubtitleAlignment::Left,
other => BurninSubtitleAlignment::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BurninSubtitleAlignment {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BurninSubtitleAlignment::from(s))
}
}
impl BurninSubtitleAlignment {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BurninSubtitleAlignment::Auto => "AUTO",
BurninSubtitleAlignment::Centered => "CENTERED",
BurninSubtitleAlignment::Left => "LEFT",
BurninSubtitleAlignment::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "CENTERED", "LEFT"]
}
}
impl AsRef<str> for BurninSubtitleAlignment {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to one audio tab on the MediaConvert console. In your job JSON, an instance of AudioDescription is equivalent to one audio tab in the console. Usually, one audio tab corresponds to one output audio track. Depending on how you set up your input audio selectors and whether you use audio selector groups, one audio tab can correspond to a group of output audio tracks.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AudioDescription {
/// When you mimic a multi-channel audio layout with multiple mono-channel tracks, you can tag each channel layout manually. For example, you would tag the tracks that contain your left, right, and center audio with Left (L), Right (R), and Center (C), respectively. When you don't specify a value, MediaConvert labels your track as Center (C) by default. To use audio layout tagging, your output must be in a QuickTime (.mov) container; your audio codec must be AAC, WAV, or AIFF; and you must set up your audio track to have only one channel.
pub audio_channel_tagging_settings:
std::option::Option<crate::model::AudioChannelTaggingSettings>,
/// Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
pub audio_normalization_settings: std::option::Option<crate::model::AudioNormalizationSettings>,
/// Specifies which audio data to use from each input. In the simplest case, specify an "Audio Selector":#inputs-audio_selector by name based on its order within each input. For example if you specify "Audio Selector 3", then the third audio selector will be used from each input. If an input does not have an "Audio Selector 3", then the audio selector marked as "default" in that input will be used. If there is no audio selector marked as "default", silence will be inserted for the duration of that input. Alternatively, an "Audio Selector Group":#inputs-audio_selector_group name may be specified, with similar default/silence behavior. If no audio_source_name is specified, then "Audio Selector 1" will be chosen automatically.
pub audio_source_name: std::option::Option<std::string::String>,
/// Applies only if Follow Input Audio Type is unchecked (false). A number between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 = Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually Impaired Commentary, 4-255 = Reserved.
pub audio_type: i32,
/// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then that value is passed through to the output. If the input contains no ISO 639 audio_type, the value in Audio Type is included in the output. Otherwise the value in Audio Type is included in the output. Note that this field and audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
pub audio_type_control: std::option::Option<crate::model::AudioTypeControl>,
/// Settings related to audio encoding. The settings in this group vary depending on the value that you choose for your audio codec.
pub codec_settings: std::option::Option<crate::model::AudioCodecSettings>,
/// Specify the language for this audio output track. The service puts this language code into your output audio track when you set Language code control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED). The service also uses your specified custom language code when you set Language code control (AudioLanguageCodeControl) to Follow input (FOLLOW_INPUT), but your input file doesn't specify a language code. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub custom_language_code: std::option::Option<std::string::String>,
/// Indicates the language of the audio output track. The ISO 639 language specified in the 'Language Code' drop down will be used when 'Follow Input Language Code' is not selected or when 'Follow Input Language Code' is selected but there is no ISO 639 language code specified by the input.
pub language_code: std::option::Option<crate::model::LanguageCode>,
/// Specify which source for language code takes precedence for this audio track. When you choose Follow input (FOLLOW_INPUT), the service uses the language code from the input track if it's present. If there's no languge code on the input track, the service uses the code that you specify in the setting Language code (languageCode or customLanguageCode). When you choose Use configured (USE_CONFIGURED), the service uses the language code that you specify.
pub language_code_control: std::option::Option<crate::model::AudioLanguageCodeControl>,
/// Advanced audio remixing settings.
pub remix_settings: std::option::Option<crate::model::RemixSettings>,
/// Specify a label for this output audio stream. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub stream_name: std::option::Option<std::string::String>,
}
impl AudioDescription {
/// When you mimic a multi-channel audio layout with multiple mono-channel tracks, you can tag each channel layout manually. For example, you would tag the tracks that contain your left, right, and center audio with Left (L), Right (R), and Center (C), respectively. When you don't specify a value, MediaConvert labels your track as Center (C) by default. To use audio layout tagging, your output must be in a QuickTime (.mov) container; your audio codec must be AAC, WAV, or AIFF; and you must set up your audio track to have only one channel.
pub fn audio_channel_tagging_settings(
&self,
) -> std::option::Option<&crate::model::AudioChannelTaggingSettings> {
self.audio_channel_tagging_settings.as_ref()
}
/// Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
pub fn audio_normalization_settings(
&self,
) -> std::option::Option<&crate::model::AudioNormalizationSettings> {
self.audio_normalization_settings.as_ref()
}
/// Specifies which audio data to use from each input. In the simplest case, specify an "Audio Selector":#inputs-audio_selector by name based on its order within each input. For example if you specify "Audio Selector 3", then the third audio selector will be used from each input. If an input does not have an "Audio Selector 3", then the audio selector marked as "default" in that input will be used. If there is no audio selector marked as "default", silence will be inserted for the duration of that input. Alternatively, an "Audio Selector Group":#inputs-audio_selector_group name may be specified, with similar default/silence behavior. If no audio_source_name is specified, then "Audio Selector 1" will be chosen automatically.
pub fn audio_source_name(&self) -> std::option::Option<&str> {
self.audio_source_name.as_deref()
}
/// Applies only if Follow Input Audio Type is unchecked (false). A number between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 = Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually Impaired Commentary, 4-255 = Reserved.
pub fn audio_type(&self) -> i32 {
self.audio_type
}
/// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then that value is passed through to the output. If the input contains no ISO 639 audio_type, the value in Audio Type is included in the output. Otherwise the value in Audio Type is included in the output. Note that this field and audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
pub fn audio_type_control(&self) -> std::option::Option<&crate::model::AudioTypeControl> {
self.audio_type_control.as_ref()
}
/// Settings related to audio encoding. The settings in this group vary depending on the value that you choose for your audio codec.
pub fn codec_settings(&self) -> std::option::Option<&crate::model::AudioCodecSettings> {
self.codec_settings.as_ref()
}
/// Specify the language for this audio output track. The service puts this language code into your output audio track when you set Language code control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED). The service also uses your specified custom language code when you set Language code control (AudioLanguageCodeControl) to Follow input (FOLLOW_INPUT), but your input file doesn't specify a language code. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn custom_language_code(&self) -> std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// Indicates the language of the audio output track. The ISO 639 language specified in the 'Language Code' drop down will be used when 'Follow Input Language Code' is not selected or when 'Follow Input Language Code' is selected but there is no ISO 639 language code specified by the input.
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
/// Specify which source for language code takes precedence for this audio track. When you choose Follow input (FOLLOW_INPUT), the service uses the language code from the input track if it's present. If there's no languge code on the input track, the service uses the code that you specify in the setting Language code (languageCode or customLanguageCode). When you choose Use configured (USE_CONFIGURED), the service uses the language code that you specify.
pub fn language_code_control(
&self,
) -> std::option::Option<&crate::model::AudioLanguageCodeControl> {
self.language_code_control.as_ref()
}
/// Advanced audio remixing settings.
pub fn remix_settings(&self) -> std::option::Option<&crate::model::RemixSettings> {
self.remix_settings.as_ref()
}
/// Specify a label for this output audio stream. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn stream_name(&self) -> std::option::Option<&str> {
self.stream_name.as_deref()
}
}
impl std::fmt::Debug for AudioDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AudioDescription");
formatter.field(
"audio_channel_tagging_settings",
&self.audio_channel_tagging_settings,
);
formatter.field(
"audio_normalization_settings",
&self.audio_normalization_settings,
);
formatter.field("audio_source_name", &self.audio_source_name);
formatter.field("audio_type", &self.audio_type);
formatter.field("audio_type_control", &self.audio_type_control);
formatter.field("codec_settings", &self.codec_settings);
formatter.field("custom_language_code", &self.custom_language_code);
formatter.field("language_code", &self.language_code);
formatter.field("language_code_control", &self.language_code_control);
formatter.field("remix_settings", &self.remix_settings);
formatter.field("stream_name", &self.stream_name);
formatter.finish()
}
}
/// See [`AudioDescription`](crate::model::AudioDescription)
pub mod audio_description {
/// A builder for [`AudioDescription`](crate::model::AudioDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_channel_tagging_settings:
std::option::Option<crate::model::AudioChannelTaggingSettings>,
pub(crate) audio_normalization_settings:
std::option::Option<crate::model::AudioNormalizationSettings>,
pub(crate) audio_source_name: std::option::Option<std::string::String>,
pub(crate) audio_type: std::option::Option<i32>,
pub(crate) audio_type_control: std::option::Option<crate::model::AudioTypeControl>,
pub(crate) codec_settings: std::option::Option<crate::model::AudioCodecSettings>,
pub(crate) custom_language_code: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) language_code_control:
std::option::Option<crate::model::AudioLanguageCodeControl>,
pub(crate) remix_settings: std::option::Option<crate::model::RemixSettings>,
pub(crate) stream_name: std::option::Option<std::string::String>,
}
impl Builder {
/// When you mimic a multi-channel audio layout with multiple mono-channel tracks, you can tag each channel layout manually. For example, you would tag the tracks that contain your left, right, and center audio with Left (L), Right (R), and Center (C), respectively. When you don't specify a value, MediaConvert labels your track as Center (C) by default. To use audio layout tagging, your output must be in a QuickTime (.mov) container; your audio codec must be AAC, WAV, or AIFF; and you must set up your audio track to have only one channel.
pub fn audio_channel_tagging_settings(
mut self,
input: crate::model::AudioChannelTaggingSettings,
) -> Self {
self.audio_channel_tagging_settings = Some(input);
self
}
/// When you mimic a multi-channel audio layout with multiple mono-channel tracks, you can tag each channel layout manually. For example, you would tag the tracks that contain your left, right, and center audio with Left (L), Right (R), and Center (C), respectively. When you don't specify a value, MediaConvert labels your track as Center (C) by default. To use audio layout tagging, your output must be in a QuickTime (.mov) container; your audio codec must be AAC, WAV, or AIFF; and you must set up your audio track to have only one channel.
pub fn set_audio_channel_tagging_settings(
mut self,
input: std::option::Option<crate::model::AudioChannelTaggingSettings>,
) -> Self {
self.audio_channel_tagging_settings = input;
self
}
/// Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
pub fn audio_normalization_settings(
mut self,
input: crate::model::AudioNormalizationSettings,
) -> Self {
self.audio_normalization_settings = Some(input);
self
}
/// Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
pub fn set_audio_normalization_settings(
mut self,
input: std::option::Option<crate::model::AudioNormalizationSettings>,
) -> Self {
self.audio_normalization_settings = input;
self
}
/// Specifies which audio data to use from each input. In the simplest case, specify an "Audio Selector":#inputs-audio_selector by name based on its order within each input. For example if you specify "Audio Selector 3", then the third audio selector will be used from each input. If an input does not have an "Audio Selector 3", then the audio selector marked as "default" in that input will be used. If there is no audio selector marked as "default", silence will be inserted for the duration of that input. Alternatively, an "Audio Selector Group":#inputs-audio_selector_group name may be specified, with similar default/silence behavior. If no audio_source_name is specified, then "Audio Selector 1" will be chosen automatically.
pub fn audio_source_name(mut self, input: impl Into<std::string::String>) -> Self {
self.audio_source_name = Some(input.into());
self
}
/// Specifies which audio data to use from each input. In the simplest case, specify an "Audio Selector":#inputs-audio_selector by name based on its order within each input. For example if you specify "Audio Selector 3", then the third audio selector will be used from each input. If an input does not have an "Audio Selector 3", then the audio selector marked as "default" in that input will be used. If there is no audio selector marked as "default", silence will be inserted for the duration of that input. Alternatively, an "Audio Selector Group":#inputs-audio_selector_group name may be specified, with similar default/silence behavior. If no audio_source_name is specified, then "Audio Selector 1" will be chosen automatically.
pub fn set_audio_source_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.audio_source_name = input;
self
}
/// Applies only if Follow Input Audio Type is unchecked (false). A number between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 = Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually Impaired Commentary, 4-255 = Reserved.
pub fn audio_type(mut self, input: i32) -> Self {
self.audio_type = Some(input);
self
}
/// Applies only if Follow Input Audio Type is unchecked (false). A number between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 = Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually Impaired Commentary, 4-255 = Reserved.
pub fn set_audio_type(mut self, input: std::option::Option<i32>) -> Self {
self.audio_type = input;
self
}
/// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then that value is passed through to the output. If the input contains no ISO 639 audio_type, the value in Audio Type is included in the output. Otherwise the value in Audio Type is included in the output. Note that this field and audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
pub fn audio_type_control(mut self, input: crate::model::AudioTypeControl) -> Self {
self.audio_type_control = Some(input);
self
}
/// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then that value is passed through to the output. If the input contains no ISO 639 audio_type, the value in Audio Type is included in the output. Otherwise the value in Audio Type is included in the output. Note that this field and audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
pub fn set_audio_type_control(
mut self,
input: std::option::Option<crate::model::AudioTypeControl>,
) -> Self {
self.audio_type_control = input;
self
}
/// Settings related to audio encoding. The settings in this group vary depending on the value that you choose for your audio codec.
pub fn codec_settings(mut self, input: crate::model::AudioCodecSettings) -> Self {
self.codec_settings = Some(input);
self
}
/// Settings related to audio encoding. The settings in this group vary depending on the value that you choose for your audio codec.
pub fn set_codec_settings(
mut self,
input: std::option::Option<crate::model::AudioCodecSettings>,
) -> Self {
self.codec_settings = input;
self
}
/// Specify the language for this audio output track. The service puts this language code into your output audio track when you set Language code control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED). The service also uses your specified custom language code when you set Language code control (AudioLanguageCodeControl) to Follow input (FOLLOW_INPUT), but your input file doesn't specify a language code. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn custom_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_language_code = Some(input.into());
self
}
/// Specify the language for this audio output track. The service puts this language code into your output audio track when you set Language code control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED). The service also uses your specified custom language code when you set Language code control (AudioLanguageCodeControl) to Follow input (FOLLOW_INPUT), but your input file doesn't specify a language code. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn set_custom_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_language_code = input;
self
}
/// Indicates the language of the audio output track. The ISO 639 language specified in the 'Language Code' drop down will be used when 'Follow Input Language Code' is not selected or when 'Follow Input Language Code' is selected but there is no ISO 639 language code specified by the input.
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
/// Indicates the language of the audio output track. The ISO 639 language specified in the 'Language Code' drop down will be used when 'Follow Input Language Code' is not selected or when 'Follow Input Language Code' is selected but there is no ISO 639 language code specified by the input.
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
/// Specify which source for language code takes precedence for this audio track. When you choose Follow input (FOLLOW_INPUT), the service uses the language code from the input track if it's present. If there's no languge code on the input track, the service uses the code that you specify in the setting Language code (languageCode or customLanguageCode). When you choose Use configured (USE_CONFIGURED), the service uses the language code that you specify.
pub fn language_code_control(
mut self,
input: crate::model::AudioLanguageCodeControl,
) -> Self {
self.language_code_control = Some(input);
self
}
/// Specify which source for language code takes precedence for this audio track. When you choose Follow input (FOLLOW_INPUT), the service uses the language code from the input track if it's present. If there's no languge code on the input track, the service uses the code that you specify in the setting Language code (languageCode or customLanguageCode). When you choose Use configured (USE_CONFIGURED), the service uses the language code that you specify.
pub fn set_language_code_control(
mut self,
input: std::option::Option<crate::model::AudioLanguageCodeControl>,
) -> Self {
self.language_code_control = input;
self
}
/// Advanced audio remixing settings.
pub fn remix_settings(mut self, input: crate::model::RemixSettings) -> Self {
self.remix_settings = Some(input);
self
}
/// Advanced audio remixing settings.
pub fn set_remix_settings(
mut self,
input: std::option::Option<crate::model::RemixSettings>,
) -> Self {
self.remix_settings = input;
self
}
/// Specify a label for this output audio stream. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.stream_name = Some(input.into());
self
}
/// Specify a label for this output audio stream. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stream_name = input;
self
}
/// Consumes the builder and constructs a [`AudioDescription`](crate::model::AudioDescription)
pub fn build(self) -> crate::model::AudioDescription {
crate::model::AudioDescription {
audio_channel_tagging_settings: self.audio_channel_tagging_settings,
audio_normalization_settings: self.audio_normalization_settings,
audio_source_name: self.audio_source_name,
audio_type: self.audio_type.unwrap_or_default(),
audio_type_control: self.audio_type_control,
codec_settings: self.codec_settings,
custom_language_code: self.custom_language_code,
language_code: self.language_code,
language_code_control: self.language_code_control,
remix_settings: self.remix_settings,
stream_name: self.stream_name,
}
}
}
}
impl AudioDescription {
/// Creates a new builder-style object to manufacture [`AudioDescription`](crate::model::AudioDescription)
pub fn builder() -> crate::model::audio_description::Builder {
crate::model::audio_description::Builder::default()
}
}
/// Use Manual audio remixing (RemixSettings) to adjust audio levels for each audio channel in each output of your job. With audio remixing, you can output more or fewer audio channels than your input audio source provides.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RemixSettings {
/// Channel mapping (ChannelMapping) contains the group of fields that hold the remixing value for each channel, in dB. Specify remix values to indicate how much of the content from your input audio channel you want in your output audio channels. Each instance of the InputChannels or InputChannelsFineTune array specifies these values for one output channel. Use one instance of this array for each output channel. In the console, each array corresponds to a column in the graphical depiction of the mapping matrix. The rows of the graphical matrix correspond to input channels. Valid values are within the range from -60 (mute) through 6. A setting of 0 passes the input channel unchanged to the output channel (no attenuation or amplification). Use InputChannels or InputChannelsFineTune to specify your remix values. Don't use both.
pub channel_mapping: std::option::Option<crate::model::ChannelMapping>,
/// Specify the number of audio channels from your input that you want to use in your output. With remixing, you might combine or split the data in these channels, so the number of channels in your final output might be different. If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub channels_in: i32,
/// Specify the number of channels in this output after remixing. Valid values: 1, 2, 4, 6, 8... 64. (1 and even numbers to 64.) If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub channels_out: i32,
}
impl RemixSettings {
/// Channel mapping (ChannelMapping) contains the group of fields that hold the remixing value for each channel, in dB. Specify remix values to indicate how much of the content from your input audio channel you want in your output audio channels. Each instance of the InputChannels or InputChannelsFineTune array specifies these values for one output channel. Use one instance of this array for each output channel. In the console, each array corresponds to a column in the graphical depiction of the mapping matrix. The rows of the graphical matrix correspond to input channels. Valid values are within the range from -60 (mute) through 6. A setting of 0 passes the input channel unchanged to the output channel (no attenuation or amplification). Use InputChannels or InputChannelsFineTune to specify your remix values. Don't use both.
pub fn channel_mapping(&self) -> std::option::Option<&crate::model::ChannelMapping> {
self.channel_mapping.as_ref()
}
/// Specify the number of audio channels from your input that you want to use in your output. With remixing, you might combine or split the data in these channels, so the number of channels in your final output might be different. If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub fn channels_in(&self) -> i32 {
self.channels_in
}
/// Specify the number of channels in this output after remixing. Valid values: 1, 2, 4, 6, 8... 64. (1 and even numbers to 64.) If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub fn channels_out(&self) -> i32 {
self.channels_out
}
}
impl std::fmt::Debug for RemixSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RemixSettings");
formatter.field("channel_mapping", &self.channel_mapping);
formatter.field("channels_in", &self.channels_in);
formatter.field("channels_out", &self.channels_out);
formatter.finish()
}
}
/// See [`RemixSettings`](crate::model::RemixSettings)
pub mod remix_settings {
/// A builder for [`RemixSettings`](crate::model::RemixSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) channel_mapping: std::option::Option<crate::model::ChannelMapping>,
pub(crate) channels_in: std::option::Option<i32>,
pub(crate) channels_out: std::option::Option<i32>,
}
impl Builder {
/// Channel mapping (ChannelMapping) contains the group of fields that hold the remixing value for each channel, in dB. Specify remix values to indicate how much of the content from your input audio channel you want in your output audio channels. Each instance of the InputChannels or InputChannelsFineTune array specifies these values for one output channel. Use one instance of this array for each output channel. In the console, each array corresponds to a column in the graphical depiction of the mapping matrix. The rows of the graphical matrix correspond to input channels. Valid values are within the range from -60 (mute) through 6. A setting of 0 passes the input channel unchanged to the output channel (no attenuation or amplification). Use InputChannels or InputChannelsFineTune to specify your remix values. Don't use both.
pub fn channel_mapping(mut self, input: crate::model::ChannelMapping) -> Self {
self.channel_mapping = Some(input);
self
}
/// Channel mapping (ChannelMapping) contains the group of fields that hold the remixing value for each channel, in dB. Specify remix values to indicate how much of the content from your input audio channel you want in your output audio channels. Each instance of the InputChannels or InputChannelsFineTune array specifies these values for one output channel. Use one instance of this array for each output channel. In the console, each array corresponds to a column in the graphical depiction of the mapping matrix. The rows of the graphical matrix correspond to input channels. Valid values are within the range from -60 (mute) through 6. A setting of 0 passes the input channel unchanged to the output channel (no attenuation or amplification). Use InputChannels or InputChannelsFineTune to specify your remix values. Don't use both.
pub fn set_channel_mapping(
mut self,
input: std::option::Option<crate::model::ChannelMapping>,
) -> Self {
self.channel_mapping = input;
self
}
/// Specify the number of audio channels from your input that you want to use in your output. With remixing, you might combine or split the data in these channels, so the number of channels in your final output might be different. If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub fn channels_in(mut self, input: i32) -> Self {
self.channels_in = Some(input);
self
}
/// Specify the number of audio channels from your input that you want to use in your output. With remixing, you might combine or split the data in these channels, so the number of channels in your final output might be different. If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub fn set_channels_in(mut self, input: std::option::Option<i32>) -> Self {
self.channels_in = input;
self
}
/// Specify the number of channels in this output after remixing. Valid values: 1, 2, 4, 6, 8... 64. (1 and even numbers to 64.) If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub fn channels_out(mut self, input: i32) -> Self {
self.channels_out = Some(input);
self
}
/// Specify the number of channels in this output after remixing. Valid values: 1, 2, 4, 6, 8... 64. (1 and even numbers to 64.) If you are doing both input channel mapping and output channel mapping, the number of output channels in your input mapping must be the same as the number of input channels in your output mapping.
pub fn set_channels_out(mut self, input: std::option::Option<i32>) -> Self {
self.channels_out = input;
self
}
/// Consumes the builder and constructs a [`RemixSettings`](crate::model::RemixSettings)
pub fn build(self) -> crate::model::RemixSettings {
crate::model::RemixSettings {
channel_mapping: self.channel_mapping,
channels_in: self.channels_in.unwrap_or_default(),
channels_out: self.channels_out.unwrap_or_default(),
}
}
}
}
impl RemixSettings {
/// Creates a new builder-style object to manufacture [`RemixSettings`](crate::model::RemixSettings)
pub fn builder() -> crate::model::remix_settings::Builder {
crate::model::remix_settings::Builder::default()
}
}
/// Channel mapping (ChannelMapping) contains the group of fields that hold the remixing value for each channel, in dB. Specify remix values to indicate how much of the content from your input audio channel you want in your output audio channels. Each instance of the InputChannels or InputChannelsFineTune array specifies these values for one output channel. Use one instance of this array for each output channel. In the console, each array corresponds to a column in the graphical depiction of the mapping matrix. The rows of the graphical matrix correspond to input channels. Valid values are within the range from -60 (mute) through 6. A setting of 0 passes the input channel unchanged to the output channel (no attenuation or amplification). Use InputChannels or InputChannelsFineTune to specify your remix values. Don't use both.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ChannelMapping {
/// In your JSON job specification, include one child of OutputChannels for each audio channel that you want in your output. Each child should contain one instance of InputChannels or InputChannelsFineTune.
pub output_channels: std::option::Option<std::vec::Vec<crate::model::OutputChannelMapping>>,
}
impl ChannelMapping {
/// In your JSON job specification, include one child of OutputChannels for each audio channel that you want in your output. Each child should contain one instance of InputChannels or InputChannelsFineTune.
pub fn output_channels(&self) -> std::option::Option<&[crate::model::OutputChannelMapping]> {
self.output_channels.as_deref()
}
}
impl std::fmt::Debug for ChannelMapping {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ChannelMapping");
formatter.field("output_channels", &self.output_channels);
formatter.finish()
}
}
/// See [`ChannelMapping`](crate::model::ChannelMapping)
pub mod channel_mapping {
/// A builder for [`ChannelMapping`](crate::model::ChannelMapping)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) output_channels:
std::option::Option<std::vec::Vec<crate::model::OutputChannelMapping>>,
}
impl Builder {
/// Appends an item to `output_channels`.
///
/// To override the contents of this collection use [`set_output_channels`](Self::set_output_channels).
///
/// In your JSON job specification, include one child of OutputChannels for each audio channel that you want in your output. Each child should contain one instance of InputChannels or InputChannelsFineTune.
pub fn output_channels(mut self, input: crate::model::OutputChannelMapping) -> Self {
let mut v = self.output_channels.unwrap_or_default();
v.push(input);
self.output_channels = Some(v);
self
}
/// In your JSON job specification, include one child of OutputChannels for each audio channel that you want in your output. Each child should contain one instance of InputChannels or InputChannelsFineTune.
pub fn set_output_channels(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OutputChannelMapping>>,
) -> Self {
self.output_channels = input;
self
}
/// Consumes the builder and constructs a [`ChannelMapping`](crate::model::ChannelMapping)
pub fn build(self) -> crate::model::ChannelMapping {
crate::model::ChannelMapping {
output_channels: self.output_channels,
}
}
}
}
impl ChannelMapping {
/// Creates a new builder-style object to manufacture [`ChannelMapping`](crate::model::ChannelMapping)
pub fn builder() -> crate::model::channel_mapping::Builder {
crate::model::channel_mapping::Builder::default()
}
}
/// OutputChannel mapping settings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputChannelMapping {
/// Use this setting to specify your remix values when they are integers, such as -10, 0, or 4.
pub input_channels: std::option::Option<std::vec::Vec<i32>>,
/// Use this setting to specify your remix values when they have a decimal component, such as -10.312, 0.08, or 4.9. MediaConvert rounds your remixing values to the nearest thousandth.
pub input_channels_fine_tune: std::option::Option<std::vec::Vec<f64>>,
}
impl OutputChannelMapping {
/// Use this setting to specify your remix values when they are integers, such as -10, 0, or 4.
pub fn input_channels(&self) -> std::option::Option<&[i32]> {
self.input_channels.as_deref()
}
/// Use this setting to specify your remix values when they have a decimal component, such as -10.312, 0.08, or 4.9. MediaConvert rounds your remixing values to the nearest thousandth.
pub fn input_channels_fine_tune(&self) -> std::option::Option<&[f64]> {
self.input_channels_fine_tune.as_deref()
}
}
impl std::fmt::Debug for OutputChannelMapping {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputChannelMapping");
formatter.field("input_channels", &self.input_channels);
formatter.field("input_channels_fine_tune", &self.input_channels_fine_tune);
formatter.finish()
}
}
/// See [`OutputChannelMapping`](crate::model::OutputChannelMapping)
pub mod output_channel_mapping {
/// A builder for [`OutputChannelMapping`](crate::model::OutputChannelMapping)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_channels: std::option::Option<std::vec::Vec<i32>>,
pub(crate) input_channels_fine_tune: std::option::Option<std::vec::Vec<f64>>,
}
impl Builder {
/// Appends an item to `input_channels`.
///
/// To override the contents of this collection use [`set_input_channels`](Self::set_input_channels).
///
/// Use this setting to specify your remix values when they are integers, such as -10, 0, or 4.
pub fn input_channels(mut self, input: i32) -> Self {
let mut v = self.input_channels.unwrap_or_default();
v.push(input);
self.input_channels = Some(v);
self
}
/// Use this setting to specify your remix values when they are integers, such as -10, 0, or 4.
pub fn set_input_channels(
mut self,
input: std::option::Option<std::vec::Vec<i32>>,
) -> Self {
self.input_channels = input;
self
}
/// Appends an item to `input_channels_fine_tune`.
///
/// To override the contents of this collection use [`set_input_channels_fine_tune`](Self::set_input_channels_fine_tune).
///
/// Use this setting to specify your remix values when they have a decimal component, such as -10.312, 0.08, or 4.9. MediaConvert rounds your remixing values to the nearest thousandth.
pub fn input_channels_fine_tune(mut self, input: f64) -> Self {
let mut v = self.input_channels_fine_tune.unwrap_or_default();
v.push(input);
self.input_channels_fine_tune = Some(v);
self
}
/// Use this setting to specify your remix values when they have a decimal component, such as -10.312, 0.08, or 4.9. MediaConvert rounds your remixing values to the nearest thousandth.
pub fn set_input_channels_fine_tune(
mut self,
input: std::option::Option<std::vec::Vec<f64>>,
) -> Self {
self.input_channels_fine_tune = input;
self
}
/// Consumes the builder and constructs a [`OutputChannelMapping`](crate::model::OutputChannelMapping)
pub fn build(self) -> crate::model::OutputChannelMapping {
crate::model::OutputChannelMapping {
input_channels: self.input_channels,
input_channels_fine_tune: self.input_channels_fine_tune,
}
}
}
}
impl OutputChannelMapping {
/// Creates a new builder-style object to manufacture [`OutputChannelMapping`](crate::model::OutputChannelMapping)
pub fn builder() -> crate::model::output_channel_mapping::Builder {
crate::model::output_channel_mapping::Builder::default()
}
}
/// Specify which source for language code takes precedence for this audio track. When you choose Follow input (FOLLOW_INPUT), the service uses the language code from the input track if it's present. If there's no languge code on the input track, the service uses the code that you specify in the setting Language code (languageCode or customLanguageCode). When you choose Use configured (USE_CONFIGURED), the service uses the language code that you specify.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioLanguageCodeControl {
#[allow(missing_docs)] // documentation missing in model
FollowInput,
#[allow(missing_docs)] // documentation missing in model
UseConfigured,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioLanguageCodeControl {
fn from(s: &str) -> Self {
match s {
"FOLLOW_INPUT" => AudioLanguageCodeControl::FollowInput,
"USE_CONFIGURED" => AudioLanguageCodeControl::UseConfigured,
other => AudioLanguageCodeControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioLanguageCodeControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioLanguageCodeControl::from(s))
}
}
impl AudioLanguageCodeControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioLanguageCodeControl::FollowInput => "FOLLOW_INPUT",
AudioLanguageCodeControl::UseConfigured => "USE_CONFIGURED",
AudioLanguageCodeControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_INPUT", "USE_CONFIGURED"]
}
}
impl AsRef<str> for AudioLanguageCodeControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to audio encoding. The settings in this group vary depending on the value that you choose for your audio codec.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AudioCodecSettings {
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AAC. The service accepts one of two mutually exclusive groups of AAC settings--VBR and CBR. To select one of these modes, set the value of Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you control the audio quality with the setting VBR quality (vbrQuality). In CBR mode, you use the setting Bitrate (bitrate). Defaults and valid values depend on the rate control mode.
pub aac_settings: std::option::Option<crate::model::AacSettings>,
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AC3.
pub ac3_settings: std::option::Option<crate::model::Ac3Settings>,
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AIFF.
pub aiff_settings: std::option::Option<crate::model::AiffSettings>,
/// Choose the audio codec for this output. Note that the option Dolby Digital passthrough (PASSTHROUGH) applies only to Dolby Digital and Dolby Digital Plus audio inputs. Make sure that you choose a codec that's supported with your output container: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#reference-codecs-containers-output-audio For audio-only outputs, make sure that both your input audio codec and your output audio codec are supported for audio-only workflows. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers-input.html#reference-codecs-containers-input-audio-only and https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#audio-only-output
pub codec: std::option::Option<crate::model::AudioCodec>,
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3_ATMOS.
pub eac3_atmos_settings: std::option::Option<crate::model::Eac3AtmosSettings>,
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3.
pub eac3_settings: std::option::Option<crate::model::Eac3Settings>,
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value MP2.
pub mp2_settings: std::option::Option<crate::model::Mp2Settings>,
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value MP3.
pub mp3_settings: std::option::Option<crate::model::Mp3Settings>,
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value OPUS.
pub opus_settings: std::option::Option<crate::model::OpusSettings>,
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value Vorbis.
pub vorbis_settings: std::option::Option<crate::model::VorbisSettings>,
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value WAV.
pub wav_settings: std::option::Option<crate::model::WavSettings>,
}
impl AudioCodecSettings {
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AAC. The service accepts one of two mutually exclusive groups of AAC settings--VBR and CBR. To select one of these modes, set the value of Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you control the audio quality with the setting VBR quality (vbrQuality). In CBR mode, you use the setting Bitrate (bitrate). Defaults and valid values depend on the rate control mode.
pub fn aac_settings(&self) -> std::option::Option<&crate::model::AacSettings> {
self.aac_settings.as_ref()
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AC3.
pub fn ac3_settings(&self) -> std::option::Option<&crate::model::Ac3Settings> {
self.ac3_settings.as_ref()
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AIFF.
pub fn aiff_settings(&self) -> std::option::Option<&crate::model::AiffSettings> {
self.aiff_settings.as_ref()
}
/// Choose the audio codec for this output. Note that the option Dolby Digital passthrough (PASSTHROUGH) applies only to Dolby Digital and Dolby Digital Plus audio inputs. Make sure that you choose a codec that's supported with your output container: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#reference-codecs-containers-output-audio For audio-only outputs, make sure that both your input audio codec and your output audio codec are supported for audio-only workflows. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers-input.html#reference-codecs-containers-input-audio-only and https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#audio-only-output
pub fn codec(&self) -> std::option::Option<&crate::model::AudioCodec> {
self.codec.as_ref()
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3_ATMOS.
pub fn eac3_atmos_settings(&self) -> std::option::Option<&crate::model::Eac3AtmosSettings> {
self.eac3_atmos_settings.as_ref()
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3.
pub fn eac3_settings(&self) -> std::option::Option<&crate::model::Eac3Settings> {
self.eac3_settings.as_ref()
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value MP2.
pub fn mp2_settings(&self) -> std::option::Option<&crate::model::Mp2Settings> {
self.mp2_settings.as_ref()
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value MP3.
pub fn mp3_settings(&self) -> std::option::Option<&crate::model::Mp3Settings> {
self.mp3_settings.as_ref()
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value OPUS.
pub fn opus_settings(&self) -> std::option::Option<&crate::model::OpusSettings> {
self.opus_settings.as_ref()
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value Vorbis.
pub fn vorbis_settings(&self) -> std::option::Option<&crate::model::VorbisSettings> {
self.vorbis_settings.as_ref()
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value WAV.
pub fn wav_settings(&self) -> std::option::Option<&crate::model::WavSettings> {
self.wav_settings.as_ref()
}
}
impl std::fmt::Debug for AudioCodecSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AudioCodecSettings");
formatter.field("aac_settings", &self.aac_settings);
formatter.field("ac3_settings", &self.ac3_settings);
formatter.field("aiff_settings", &self.aiff_settings);
formatter.field("codec", &self.codec);
formatter.field("eac3_atmos_settings", &self.eac3_atmos_settings);
formatter.field("eac3_settings", &self.eac3_settings);
formatter.field("mp2_settings", &self.mp2_settings);
formatter.field("mp3_settings", &self.mp3_settings);
formatter.field("opus_settings", &self.opus_settings);
formatter.field("vorbis_settings", &self.vorbis_settings);
formatter.field("wav_settings", &self.wav_settings);
formatter.finish()
}
}
/// See [`AudioCodecSettings`](crate::model::AudioCodecSettings)
pub mod audio_codec_settings {
/// A builder for [`AudioCodecSettings`](crate::model::AudioCodecSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) aac_settings: std::option::Option<crate::model::AacSettings>,
pub(crate) ac3_settings: std::option::Option<crate::model::Ac3Settings>,
pub(crate) aiff_settings: std::option::Option<crate::model::AiffSettings>,
pub(crate) codec: std::option::Option<crate::model::AudioCodec>,
pub(crate) eac3_atmos_settings: std::option::Option<crate::model::Eac3AtmosSettings>,
pub(crate) eac3_settings: std::option::Option<crate::model::Eac3Settings>,
pub(crate) mp2_settings: std::option::Option<crate::model::Mp2Settings>,
pub(crate) mp3_settings: std::option::Option<crate::model::Mp3Settings>,
pub(crate) opus_settings: std::option::Option<crate::model::OpusSettings>,
pub(crate) vorbis_settings: std::option::Option<crate::model::VorbisSettings>,
pub(crate) wav_settings: std::option::Option<crate::model::WavSettings>,
}
impl Builder {
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AAC. The service accepts one of two mutually exclusive groups of AAC settings--VBR and CBR. To select one of these modes, set the value of Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you control the audio quality with the setting VBR quality (vbrQuality). In CBR mode, you use the setting Bitrate (bitrate). Defaults and valid values depend on the rate control mode.
pub fn aac_settings(mut self, input: crate::model::AacSettings) -> Self {
self.aac_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AAC. The service accepts one of two mutually exclusive groups of AAC settings--VBR and CBR. To select one of these modes, set the value of Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you control the audio quality with the setting VBR quality (vbrQuality). In CBR mode, you use the setting Bitrate (bitrate). Defaults and valid values depend on the rate control mode.
pub fn set_aac_settings(
mut self,
input: std::option::Option<crate::model::AacSettings>,
) -> Self {
self.aac_settings = input;
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AC3.
pub fn ac3_settings(mut self, input: crate::model::Ac3Settings) -> Self {
self.ac3_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AC3.
pub fn set_ac3_settings(
mut self,
input: std::option::Option<crate::model::Ac3Settings>,
) -> Self {
self.ac3_settings = input;
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AIFF.
pub fn aiff_settings(mut self, input: crate::model::AiffSettings) -> Self {
self.aiff_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AIFF.
pub fn set_aiff_settings(
mut self,
input: std::option::Option<crate::model::AiffSettings>,
) -> Self {
self.aiff_settings = input;
self
}
/// Choose the audio codec for this output. Note that the option Dolby Digital passthrough (PASSTHROUGH) applies only to Dolby Digital and Dolby Digital Plus audio inputs. Make sure that you choose a codec that's supported with your output container: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#reference-codecs-containers-output-audio For audio-only outputs, make sure that both your input audio codec and your output audio codec are supported for audio-only workflows. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers-input.html#reference-codecs-containers-input-audio-only and https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#audio-only-output
pub fn codec(mut self, input: crate::model::AudioCodec) -> Self {
self.codec = Some(input);
self
}
/// Choose the audio codec for this output. Note that the option Dolby Digital passthrough (PASSTHROUGH) applies only to Dolby Digital and Dolby Digital Plus audio inputs. Make sure that you choose a codec that's supported with your output container: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#reference-codecs-containers-output-audio For audio-only outputs, make sure that both your input audio codec and your output audio codec are supported for audio-only workflows. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers-input.html#reference-codecs-containers-input-audio-only and https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#audio-only-output
pub fn set_codec(mut self, input: std::option::Option<crate::model::AudioCodec>) -> Self {
self.codec = input;
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3_ATMOS.
pub fn eac3_atmos_settings(mut self, input: crate::model::Eac3AtmosSettings) -> Self {
self.eac3_atmos_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3_ATMOS.
pub fn set_eac3_atmos_settings(
mut self,
input: std::option::Option<crate::model::Eac3AtmosSettings>,
) -> Self {
self.eac3_atmos_settings = input;
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3.
pub fn eac3_settings(mut self, input: crate::model::Eac3Settings) -> Self {
self.eac3_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3.
pub fn set_eac3_settings(
mut self,
input: std::option::Option<crate::model::Eac3Settings>,
) -> Self {
self.eac3_settings = input;
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value MP2.
pub fn mp2_settings(mut self, input: crate::model::Mp2Settings) -> Self {
self.mp2_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value MP2.
pub fn set_mp2_settings(
mut self,
input: std::option::Option<crate::model::Mp2Settings>,
) -> Self {
self.mp2_settings = input;
self
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value MP3.
pub fn mp3_settings(mut self, input: crate::model::Mp3Settings) -> Self {
self.mp3_settings = Some(input);
self
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value MP3.
pub fn set_mp3_settings(
mut self,
input: std::option::Option<crate::model::Mp3Settings>,
) -> Self {
self.mp3_settings = input;
self
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value OPUS.
pub fn opus_settings(mut self, input: crate::model::OpusSettings) -> Self {
self.opus_settings = Some(input);
self
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value OPUS.
pub fn set_opus_settings(
mut self,
input: std::option::Option<crate::model::OpusSettings>,
) -> Self {
self.opus_settings = input;
self
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value Vorbis.
pub fn vorbis_settings(mut self, input: crate::model::VorbisSettings) -> Self {
self.vorbis_settings = Some(input);
self
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value Vorbis.
pub fn set_vorbis_settings(
mut self,
input: std::option::Option<crate::model::VorbisSettings>,
) -> Self {
self.vorbis_settings = input;
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value WAV.
pub fn wav_settings(mut self, input: crate::model::WavSettings) -> Self {
self.wav_settings = Some(input);
self
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value WAV.
pub fn set_wav_settings(
mut self,
input: std::option::Option<crate::model::WavSettings>,
) -> Self {
self.wav_settings = input;
self
}
/// Consumes the builder and constructs a [`AudioCodecSettings`](crate::model::AudioCodecSettings)
pub fn build(self) -> crate::model::AudioCodecSettings {
crate::model::AudioCodecSettings {
aac_settings: self.aac_settings,
ac3_settings: self.ac3_settings,
aiff_settings: self.aiff_settings,
codec: self.codec,
eac3_atmos_settings: self.eac3_atmos_settings,
eac3_settings: self.eac3_settings,
mp2_settings: self.mp2_settings,
mp3_settings: self.mp3_settings,
opus_settings: self.opus_settings,
vorbis_settings: self.vorbis_settings,
wav_settings: self.wav_settings,
}
}
}
}
impl AudioCodecSettings {
/// Creates a new builder-style object to manufacture [`AudioCodecSettings`](crate::model::AudioCodecSettings)
pub fn builder() -> crate::model::audio_codec_settings::Builder {
crate::model::audio_codec_settings::Builder::default()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value WAV.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WavSettings {
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub bit_depth: i32,
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub channels: i32,
/// The service defaults to using RIFF for WAV outputs. If your output audio is likely to exceed 4 GB in file size, or if you otherwise need the extended support of the RF64 format, set your output WAV file format to RF64.
pub format: std::option::Option<crate::model::WavFormat>,
/// Sample rate in Hz.
pub sample_rate: i32,
}
impl WavSettings {
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub fn bit_depth(&self) -> i32 {
self.bit_depth
}
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub fn channels(&self) -> i32 {
self.channels
}
/// The service defaults to using RIFF for WAV outputs. If your output audio is likely to exceed 4 GB in file size, or if you otherwise need the extended support of the RF64 format, set your output WAV file format to RF64.
pub fn format(&self) -> std::option::Option<&crate::model::WavFormat> {
self.format.as_ref()
}
/// Sample rate in Hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
}
impl std::fmt::Debug for WavSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WavSettings");
formatter.field("bit_depth", &self.bit_depth);
formatter.field("channels", &self.channels);
formatter.field("format", &self.format);
formatter.field("sample_rate", &self.sample_rate);
formatter.finish()
}
}
/// See [`WavSettings`](crate::model::WavSettings)
pub mod wav_settings {
/// A builder for [`WavSettings`](crate::model::WavSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bit_depth: std::option::Option<i32>,
pub(crate) channels: std::option::Option<i32>,
pub(crate) format: std::option::Option<crate::model::WavFormat>,
pub(crate) sample_rate: std::option::Option<i32>,
}
impl Builder {
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub fn bit_depth(mut self, input: i32) -> Self {
self.bit_depth = Some(input);
self
}
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub fn set_bit_depth(mut self, input: std::option::Option<i32>) -> Self {
self.bit_depth = input;
self
}
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// The service defaults to using RIFF for WAV outputs. If your output audio is likely to exceed 4 GB in file size, or if you otherwise need the extended support of the RF64 format, set your output WAV file format to RF64.
pub fn format(mut self, input: crate::model::WavFormat) -> Self {
self.format = Some(input);
self
}
/// The service defaults to using RIFF for WAV outputs. If your output audio is likely to exceed 4 GB in file size, or if you otherwise need the extended support of the RF64 format, set your output WAV file format to RF64.
pub fn set_format(mut self, input: std::option::Option<crate::model::WavFormat>) -> Self {
self.format = input;
self
}
/// Sample rate in Hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Sample rate in Hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Consumes the builder and constructs a [`WavSettings`](crate::model::WavSettings)
pub fn build(self) -> crate::model::WavSettings {
crate::model::WavSettings {
bit_depth: self.bit_depth.unwrap_or_default(),
channels: self.channels.unwrap_or_default(),
format: self.format,
sample_rate: self.sample_rate.unwrap_or_default(),
}
}
}
}
impl WavSettings {
/// Creates a new builder-style object to manufacture [`WavSettings`](crate::model::WavSettings)
pub fn builder() -> crate::model::wav_settings::Builder {
crate::model::wav_settings::Builder::default()
}
}
/// The service defaults to using RIFF for WAV outputs. If your output audio is likely to exceed 4 GB in file size, or if you otherwise need the extended support of the RF64 format, set your output WAV file format to RF64.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum WavFormat {
#[allow(missing_docs)] // documentation missing in model
Rf64,
#[allow(missing_docs)] // documentation missing in model
Riff,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for WavFormat {
fn from(s: &str) -> Self {
match s {
"RF64" => WavFormat::Rf64,
"RIFF" => WavFormat::Riff,
other => WavFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for WavFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(WavFormat::from(s))
}
}
impl WavFormat {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
WavFormat::Rf64 => "RF64",
WavFormat::Riff => "RIFF",
WavFormat::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["RF64", "RIFF"]
}
}
impl AsRef<str> for WavFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value Vorbis.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VorbisSettings {
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub channels: i32,
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub sample_rate: i32,
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub vbr_quality: i32,
}
impl VorbisSettings {
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub fn channels(&self) -> i32 {
self.channels
}
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub fn vbr_quality(&self) -> i32 {
self.vbr_quality
}
}
impl std::fmt::Debug for VorbisSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VorbisSettings");
formatter.field("channels", &self.channels);
formatter.field("sample_rate", &self.sample_rate);
formatter.field("vbr_quality", &self.vbr_quality);
formatter.finish()
}
}
/// See [`VorbisSettings`](crate::model::VorbisSettings)
pub mod vorbis_settings {
/// A builder for [`VorbisSettings`](crate::model::VorbisSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) channels: std::option::Option<i32>,
pub(crate) sample_rate: std::option::Option<i32>,
pub(crate) vbr_quality: std::option::Option<i32>,
}
impl Builder {
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub fn vbr_quality(mut self, input: i32) -> Self {
self.vbr_quality = Some(input);
self
}
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub fn set_vbr_quality(mut self, input: std::option::Option<i32>) -> Self {
self.vbr_quality = input;
self
}
/// Consumes the builder and constructs a [`VorbisSettings`](crate::model::VorbisSettings)
pub fn build(self) -> crate::model::VorbisSettings {
crate::model::VorbisSettings {
channels: self.channels.unwrap_or_default(),
sample_rate: self.sample_rate.unwrap_or_default(),
vbr_quality: self.vbr_quality.unwrap_or_default(),
}
}
}
}
impl VorbisSettings {
/// Creates a new builder-style object to manufacture [`VorbisSettings`](crate::model::VorbisSettings)
pub fn builder() -> crate::model::vorbis_settings::Builder {
crate::model::vorbis_settings::Builder::default()
}
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value OPUS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OpusSettings {
/// Optional. Specify the average bitrate in bits per second. Valid values are multiples of 8000, from 32000 through 192000. The default value is 96000, which we recommend for quality and bandwidth.
pub bitrate: i32,
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub channels: i32,
/// Optional. Sample rate in hz. Valid values are 16000, 24000, and 48000. The default value is 48000.
pub sample_rate: i32,
}
impl OpusSettings {
/// Optional. Specify the average bitrate in bits per second. Valid values are multiples of 8000, from 32000 through 192000. The default value is 96000, which we recommend for quality and bandwidth.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub fn channels(&self) -> i32 {
self.channels
}
/// Optional. Sample rate in hz. Valid values are 16000, 24000, and 48000. The default value is 48000.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
}
impl std::fmt::Debug for OpusSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OpusSettings");
formatter.field("bitrate", &self.bitrate);
formatter.field("channels", &self.channels);
formatter.field("sample_rate", &self.sample_rate);
formatter.finish()
}
}
/// See [`OpusSettings`](crate::model::OpusSettings)
pub mod opus_settings {
/// A builder for [`OpusSettings`](crate::model::OpusSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) channels: std::option::Option<i32>,
pub(crate) sample_rate: std::option::Option<i32>,
}
impl Builder {
/// Optional. Specify the average bitrate in bits per second. Valid values are multiples of 8000, from 32000 through 192000. The default value is 96000, which we recommend for quality and bandwidth.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Optional. Specify the average bitrate in bits per second. Valid values are multiples of 8000, from 32000 through 192000. The default value is 96000, which we recommend for quality and bandwidth.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// Optional. Sample rate in hz. Valid values are 16000, 24000, and 48000. The default value is 48000.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Optional. Sample rate in hz. Valid values are 16000, 24000, and 48000. The default value is 48000.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Consumes the builder and constructs a [`OpusSettings`](crate::model::OpusSettings)
pub fn build(self) -> crate::model::OpusSettings {
crate::model::OpusSettings {
bitrate: self.bitrate.unwrap_or_default(),
channels: self.channels.unwrap_or_default(),
sample_rate: self.sample_rate.unwrap_or_default(),
}
}
}
}
impl OpusSettings {
/// Creates a new builder-style object to manufacture [`OpusSettings`](crate::model::OpusSettings)
pub fn builder() -> crate::model::opus_settings::Builder {
crate::model::opus_settings::Builder::default()
}
}
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value MP3.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Mp3Settings {
/// Specify the average bitrate in bits per second.
pub bitrate: i32,
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub channels: i32,
/// Specify whether the service encodes this MP3 audio output with a constant bitrate (CBR) or a variable bitrate (VBR).
pub rate_control_mode: std::option::Option<crate::model::Mp3RateControlMode>,
/// Sample rate in hz.
pub sample_rate: i32,
/// Required when you set Bitrate control mode (rateControlMode) to VBR. Specify the audio quality of this MP3 output from 0 (highest quality) to 9 (lowest quality).
pub vbr_quality: i32,
}
impl Mp3Settings {
/// Specify the average bitrate in bits per second.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub fn channels(&self) -> i32 {
self.channels
}
/// Specify whether the service encodes this MP3 audio output with a constant bitrate (CBR) or a variable bitrate (VBR).
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::Mp3RateControlMode> {
self.rate_control_mode.as_ref()
}
/// Sample rate in hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
/// Required when you set Bitrate control mode (rateControlMode) to VBR. Specify the audio quality of this MP3 output from 0 (highest quality) to 9 (lowest quality).
pub fn vbr_quality(&self) -> i32 {
self.vbr_quality
}
}
impl std::fmt::Debug for Mp3Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Mp3Settings");
formatter.field("bitrate", &self.bitrate);
formatter.field("channels", &self.channels);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.field("sample_rate", &self.sample_rate);
formatter.field("vbr_quality", &self.vbr_quality);
formatter.finish()
}
}
/// See [`Mp3Settings`](crate::model::Mp3Settings)
pub mod mp3_settings {
/// A builder for [`Mp3Settings`](crate::model::Mp3Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) channels: std::option::Option<i32>,
pub(crate) rate_control_mode: std::option::Option<crate::model::Mp3RateControlMode>,
pub(crate) sample_rate: std::option::Option<i32>,
pub(crate) vbr_quality: std::option::Option<i32>,
}
impl Builder {
/// Specify the average bitrate in bits per second.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// Specify whether the service encodes this MP3 audio output with a constant bitrate (CBR) or a variable bitrate (VBR).
pub fn rate_control_mode(mut self, input: crate::model::Mp3RateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// Specify whether the service encodes this MP3 audio output with a constant bitrate (CBR) or a variable bitrate (VBR).
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::Mp3RateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Sample rate in hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Sample rate in hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Required when you set Bitrate control mode (rateControlMode) to VBR. Specify the audio quality of this MP3 output from 0 (highest quality) to 9 (lowest quality).
pub fn vbr_quality(mut self, input: i32) -> Self {
self.vbr_quality = Some(input);
self
}
/// Required when you set Bitrate control mode (rateControlMode) to VBR. Specify the audio quality of this MP3 output from 0 (highest quality) to 9 (lowest quality).
pub fn set_vbr_quality(mut self, input: std::option::Option<i32>) -> Self {
self.vbr_quality = input;
self
}
/// Consumes the builder and constructs a [`Mp3Settings`](crate::model::Mp3Settings)
pub fn build(self) -> crate::model::Mp3Settings {
crate::model::Mp3Settings {
bitrate: self.bitrate.unwrap_or_default(),
channels: self.channels.unwrap_or_default(),
rate_control_mode: self.rate_control_mode,
sample_rate: self.sample_rate.unwrap_or_default(),
vbr_quality: self.vbr_quality.unwrap_or_default(),
}
}
}
}
impl Mp3Settings {
/// Creates a new builder-style object to manufacture [`Mp3Settings`](crate::model::Mp3Settings)
pub fn builder() -> crate::model::mp3_settings::Builder {
crate::model::mp3_settings::Builder::default()
}
}
/// Specify whether the service encodes this MP3 audio output with a constant bitrate (CBR) or a variable bitrate (VBR).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Mp3RateControlMode {
#[allow(missing_docs)] // documentation missing in model
Cbr,
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Mp3RateControlMode {
fn from(s: &str) -> Self {
match s {
"CBR" => Mp3RateControlMode::Cbr,
"VBR" => Mp3RateControlMode::Vbr,
other => Mp3RateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Mp3RateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Mp3RateControlMode::from(s))
}
}
impl Mp3RateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Mp3RateControlMode::Cbr => "CBR",
Mp3RateControlMode::Vbr => "VBR",
Mp3RateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBR", "VBR"]
}
}
impl AsRef<str> for Mp3RateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value MP2.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Mp2Settings {
/// Specify the average bitrate in bits per second.
pub bitrate: i32,
/// Set Channels to specify the number of channels in this output audio track. Choosing Mono in the console will give you 1 output channel; choosing Stereo will give you 2. In the API, valid values are 1 and 2.
pub channels: i32,
/// Sample rate in hz.
pub sample_rate: i32,
}
impl Mp2Settings {
/// Specify the average bitrate in bits per second.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Set Channels to specify the number of channels in this output audio track. Choosing Mono in the console will give you 1 output channel; choosing Stereo will give you 2. In the API, valid values are 1 and 2.
pub fn channels(&self) -> i32 {
self.channels
}
/// Sample rate in hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
}
impl std::fmt::Debug for Mp2Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Mp2Settings");
formatter.field("bitrate", &self.bitrate);
formatter.field("channels", &self.channels);
formatter.field("sample_rate", &self.sample_rate);
formatter.finish()
}
}
/// See [`Mp2Settings`](crate::model::Mp2Settings)
pub mod mp2_settings {
/// A builder for [`Mp2Settings`](crate::model::Mp2Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) channels: std::option::Option<i32>,
pub(crate) sample_rate: std::option::Option<i32>,
}
impl Builder {
/// Specify the average bitrate in bits per second.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Set Channels to specify the number of channels in this output audio track. Choosing Mono in the console will give you 1 output channel; choosing Stereo will give you 2. In the API, valid values are 1 and 2.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Set Channels to specify the number of channels in this output audio track. Choosing Mono in the console will give you 1 output channel; choosing Stereo will give you 2. In the API, valid values are 1 and 2.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// Sample rate in hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Sample rate in hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Consumes the builder and constructs a [`Mp2Settings`](crate::model::Mp2Settings)
pub fn build(self) -> crate::model::Mp2Settings {
crate::model::Mp2Settings {
bitrate: self.bitrate.unwrap_or_default(),
channels: self.channels.unwrap_or_default(),
sample_rate: self.sample_rate.unwrap_or_default(),
}
}
}
}
impl Mp2Settings {
/// Creates a new builder-style object to manufacture [`Mp2Settings`](crate::model::Mp2Settings)
pub fn builder() -> crate::model::mp2_settings::Builder {
crate::model::mp2_settings::Builder::default()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Eac3Settings {
/// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. Only used for 3/2 coding mode.
pub attenuation_control: std::option::Option<crate::model::Eac3AttenuationControl>,
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub bitrate: i32,
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub bitstream_mode: std::option::Option<crate::model::Eac3BitstreamMode>,
/// Dolby Digital Plus coding mode. Determines number of channels.
pub coding_mode: std::option::Option<crate::model::Eac3CodingMode>,
/// Activates a DC highpass filter for all input channels.
pub dc_filter: std::option::Option<crate::model::Eac3DcFilter>,
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital Plus, dialnorm will be passed through.
pub dialnorm: i32,
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub dynamic_range_compression_line:
std::option::Option<crate::model::Eac3DynamicRangeCompressionLine>,
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub dynamic_range_compression_rf:
std::option::Option<crate::model::Eac3DynamicRangeCompressionRf>,
/// When encoding 3/2 audio, controls whether the LFE channel is enabled
pub lfe_control: std::option::Option<crate::model::Eac3LfeControl>,
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub lfe_filter: std::option::Option<crate::model::Eac3LfeFilter>,
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only center (loRoCenterMixLevel).
pub lo_ro_center_mix_level: f64,
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only surround (loRoSurroundMixLevel).
pub lo_ro_surround_mix_level: f64,
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total center (ltRtCenterMixLevel).
pub lt_rt_center_mix_level: f64,
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total surround (ltRtSurroundMixLevel).
pub lt_rt_surround_mix_level: f64,
/// When set to FOLLOW_INPUT, 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.
pub metadata_control: std::option::Option<crate::model::Eac3MetadataControl>,
/// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is present on the input. this detection is dynamic over the life of the transcode. Inputs that alternate between DD+ and non-DD+ content will have a consistent DD+ output as the system alternates between passthrough and encoding.
pub passthrough_control: std::option::Option<crate::model::Eac3PassthroughControl>,
/// Controls the amount of phase-shift applied to the surround channels. Only used for 3/2 coding mode.
pub phase_control: std::option::Option<crate::model::Eac3PhaseControl>,
/// This value is always 48000. It represents the sample rate in Hz.
pub sample_rate: i32,
/// Choose how the service does stereo downmixing. This setting only applies if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Stereo downmix (Eac3StereoDownmix).
pub stereo_downmix: std::option::Option<crate::model::Eac3StereoDownmix>,
/// When encoding 3/2 audio, sets whether an extra center back surround channel is matrix encoded into the left and right surround channels.
pub surround_ex_mode: std::option::Option<crate::model::Eac3SurroundExMode>,
/// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into the two channels.
pub surround_mode: std::option::Option<crate::model::Eac3SurroundMode>,
}
impl Eac3Settings {
/// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. Only used for 3/2 coding mode.
pub fn attenuation_control(
&self,
) -> std::option::Option<&crate::model::Eac3AttenuationControl> {
self.attenuation_control.as_ref()
}
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn bitstream_mode(&self) -> std::option::Option<&crate::model::Eac3BitstreamMode> {
self.bitstream_mode.as_ref()
}
/// Dolby Digital Plus coding mode. Determines number of channels.
pub fn coding_mode(&self) -> std::option::Option<&crate::model::Eac3CodingMode> {
self.coding_mode.as_ref()
}
/// Activates a DC highpass filter for all input channels.
pub fn dc_filter(&self) -> std::option::Option<&crate::model::Eac3DcFilter> {
self.dc_filter.as_ref()
}
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital Plus, dialnorm will be passed through.
pub fn dialnorm(&self) -> i32 {
self.dialnorm
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_line(
&self,
) -> std::option::Option<&crate::model::Eac3DynamicRangeCompressionLine> {
self.dynamic_range_compression_line.as_ref()
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_rf(
&self,
) -> std::option::Option<&crate::model::Eac3DynamicRangeCompressionRf> {
self.dynamic_range_compression_rf.as_ref()
}
/// When encoding 3/2 audio, controls whether the LFE channel is enabled
pub fn lfe_control(&self) -> std::option::Option<&crate::model::Eac3LfeControl> {
self.lfe_control.as_ref()
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub fn lfe_filter(&self) -> std::option::Option<&crate::model::Eac3LfeFilter> {
self.lfe_filter.as_ref()
}
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only center (loRoCenterMixLevel).
pub fn lo_ro_center_mix_level(&self) -> f64 {
self.lo_ro_center_mix_level
}
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only surround (loRoSurroundMixLevel).
pub fn lo_ro_surround_mix_level(&self) -> f64 {
self.lo_ro_surround_mix_level
}
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total center (ltRtCenterMixLevel).
pub fn lt_rt_center_mix_level(&self) -> f64 {
self.lt_rt_center_mix_level
}
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total surround (ltRtSurroundMixLevel).
pub fn lt_rt_surround_mix_level(&self) -> f64 {
self.lt_rt_surround_mix_level
}
/// When set to FOLLOW_INPUT, 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.
pub fn metadata_control(&self) -> std::option::Option<&crate::model::Eac3MetadataControl> {
self.metadata_control.as_ref()
}
/// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is present on the input. this detection is dynamic over the life of the transcode. Inputs that alternate between DD+ and non-DD+ content will have a consistent DD+ output as the system alternates between passthrough and encoding.
pub fn passthrough_control(
&self,
) -> std::option::Option<&crate::model::Eac3PassthroughControl> {
self.passthrough_control.as_ref()
}
/// Controls the amount of phase-shift applied to the surround channels. Only used for 3/2 coding mode.
pub fn phase_control(&self) -> std::option::Option<&crate::model::Eac3PhaseControl> {
self.phase_control.as_ref()
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
/// Choose how the service does stereo downmixing. This setting only applies if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Stereo downmix (Eac3StereoDownmix).
pub fn stereo_downmix(&self) -> std::option::Option<&crate::model::Eac3StereoDownmix> {
self.stereo_downmix.as_ref()
}
/// When encoding 3/2 audio, sets whether an extra center back surround channel is matrix encoded into the left and right surround channels.
pub fn surround_ex_mode(&self) -> std::option::Option<&crate::model::Eac3SurroundExMode> {
self.surround_ex_mode.as_ref()
}
/// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into the two channels.
pub fn surround_mode(&self) -> std::option::Option<&crate::model::Eac3SurroundMode> {
self.surround_mode.as_ref()
}
}
impl std::fmt::Debug for Eac3Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Eac3Settings");
formatter.field("attenuation_control", &self.attenuation_control);
formatter.field("bitrate", &self.bitrate);
formatter.field("bitstream_mode", &self.bitstream_mode);
formatter.field("coding_mode", &self.coding_mode);
formatter.field("dc_filter", &self.dc_filter);
formatter.field("dialnorm", &self.dialnorm);
formatter.field(
"dynamic_range_compression_line",
&self.dynamic_range_compression_line,
);
formatter.field(
"dynamic_range_compression_rf",
&self.dynamic_range_compression_rf,
);
formatter.field("lfe_control", &self.lfe_control);
formatter.field("lfe_filter", &self.lfe_filter);
formatter.field("lo_ro_center_mix_level", &self.lo_ro_center_mix_level);
formatter.field("lo_ro_surround_mix_level", &self.lo_ro_surround_mix_level);
formatter.field("lt_rt_center_mix_level", &self.lt_rt_center_mix_level);
formatter.field("lt_rt_surround_mix_level", &self.lt_rt_surround_mix_level);
formatter.field("metadata_control", &self.metadata_control);
formatter.field("passthrough_control", &self.passthrough_control);
formatter.field("phase_control", &self.phase_control);
formatter.field("sample_rate", &self.sample_rate);
formatter.field("stereo_downmix", &self.stereo_downmix);
formatter.field("surround_ex_mode", &self.surround_ex_mode);
formatter.field("surround_mode", &self.surround_mode);
formatter.finish()
}
}
/// See [`Eac3Settings`](crate::model::Eac3Settings)
pub mod eac3_settings {
/// A builder for [`Eac3Settings`](crate::model::Eac3Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) attenuation_control: std::option::Option<crate::model::Eac3AttenuationControl>,
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) bitstream_mode: std::option::Option<crate::model::Eac3BitstreamMode>,
pub(crate) coding_mode: std::option::Option<crate::model::Eac3CodingMode>,
pub(crate) dc_filter: std::option::Option<crate::model::Eac3DcFilter>,
pub(crate) dialnorm: std::option::Option<i32>,
pub(crate) dynamic_range_compression_line:
std::option::Option<crate::model::Eac3DynamicRangeCompressionLine>,
pub(crate) dynamic_range_compression_rf:
std::option::Option<crate::model::Eac3DynamicRangeCompressionRf>,
pub(crate) lfe_control: std::option::Option<crate::model::Eac3LfeControl>,
pub(crate) lfe_filter: std::option::Option<crate::model::Eac3LfeFilter>,
pub(crate) lo_ro_center_mix_level: std::option::Option<f64>,
pub(crate) lo_ro_surround_mix_level: std::option::Option<f64>,
pub(crate) lt_rt_center_mix_level: std::option::Option<f64>,
pub(crate) lt_rt_surround_mix_level: std::option::Option<f64>,
pub(crate) metadata_control: std::option::Option<crate::model::Eac3MetadataControl>,
pub(crate) passthrough_control: std::option::Option<crate::model::Eac3PassthroughControl>,
pub(crate) phase_control: std::option::Option<crate::model::Eac3PhaseControl>,
pub(crate) sample_rate: std::option::Option<i32>,
pub(crate) stereo_downmix: std::option::Option<crate::model::Eac3StereoDownmix>,
pub(crate) surround_ex_mode: std::option::Option<crate::model::Eac3SurroundExMode>,
pub(crate) surround_mode: std::option::Option<crate::model::Eac3SurroundMode>,
}
impl Builder {
/// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. Only used for 3/2 coding mode.
pub fn attenuation_control(mut self, input: crate::model::Eac3AttenuationControl) -> Self {
self.attenuation_control = Some(input);
self
}
/// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. Only used for 3/2 coding mode.
pub fn set_attenuation_control(
mut self,
input: std::option::Option<crate::model::Eac3AttenuationControl>,
) -> Self {
self.attenuation_control = input;
self
}
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn bitstream_mode(mut self, input: crate::model::Eac3BitstreamMode) -> Self {
self.bitstream_mode = Some(input);
self
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn set_bitstream_mode(
mut self,
input: std::option::Option<crate::model::Eac3BitstreamMode>,
) -> Self {
self.bitstream_mode = input;
self
}
/// Dolby Digital Plus coding mode. Determines number of channels.
pub fn coding_mode(mut self, input: crate::model::Eac3CodingMode) -> Self {
self.coding_mode = Some(input);
self
}
/// Dolby Digital Plus coding mode. Determines number of channels.
pub fn set_coding_mode(
mut self,
input: std::option::Option<crate::model::Eac3CodingMode>,
) -> Self {
self.coding_mode = input;
self
}
/// Activates a DC highpass filter for all input channels.
pub fn dc_filter(mut self, input: crate::model::Eac3DcFilter) -> Self {
self.dc_filter = Some(input);
self
}
/// Activates a DC highpass filter for all input channels.
pub fn set_dc_filter(
mut self,
input: std::option::Option<crate::model::Eac3DcFilter>,
) -> Self {
self.dc_filter = input;
self
}
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital Plus, dialnorm will be passed through.
pub fn dialnorm(mut self, input: i32) -> Self {
self.dialnorm = Some(input);
self
}
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital Plus, dialnorm will be passed through.
pub fn set_dialnorm(mut self, input: std::option::Option<i32>) -> Self {
self.dialnorm = input;
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_line(
mut self,
input: crate::model::Eac3DynamicRangeCompressionLine,
) -> Self {
self.dynamic_range_compression_line = Some(input);
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn set_dynamic_range_compression_line(
mut self,
input: std::option::Option<crate::model::Eac3DynamicRangeCompressionLine>,
) -> Self {
self.dynamic_range_compression_line = input;
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_rf(
mut self,
input: crate::model::Eac3DynamicRangeCompressionRf,
) -> Self {
self.dynamic_range_compression_rf = Some(input);
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn set_dynamic_range_compression_rf(
mut self,
input: std::option::Option<crate::model::Eac3DynamicRangeCompressionRf>,
) -> Self {
self.dynamic_range_compression_rf = input;
self
}
/// When encoding 3/2 audio, controls whether the LFE channel is enabled
pub fn lfe_control(mut self, input: crate::model::Eac3LfeControl) -> Self {
self.lfe_control = Some(input);
self
}
/// When encoding 3/2 audio, controls whether the LFE channel is enabled
pub fn set_lfe_control(
mut self,
input: std::option::Option<crate::model::Eac3LfeControl>,
) -> Self {
self.lfe_control = input;
self
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub fn lfe_filter(mut self, input: crate::model::Eac3LfeFilter) -> Self {
self.lfe_filter = Some(input);
self
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub fn set_lfe_filter(
mut self,
input: std::option::Option<crate::model::Eac3LfeFilter>,
) -> Self {
self.lfe_filter = input;
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only center (loRoCenterMixLevel).
pub fn lo_ro_center_mix_level(mut self, input: f64) -> Self {
self.lo_ro_center_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only center (loRoCenterMixLevel).
pub fn set_lo_ro_center_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lo_ro_center_mix_level = input;
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only surround (loRoSurroundMixLevel).
pub fn lo_ro_surround_mix_level(mut self, input: f64) -> Self {
self.lo_ro_surround_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left only/Right only surround (loRoSurroundMixLevel).
pub fn set_lo_ro_surround_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lo_ro_surround_mix_level = input;
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total center (ltRtCenterMixLevel).
pub fn lt_rt_center_mix_level(mut self, input: f64) -> Self {
self.lt_rt_center_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total center (ltRtCenterMixLevel).
pub fn set_lt_rt_center_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lt_rt_center_mix_level = input;
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total surround (ltRtSurroundMixLevel).
pub fn lt_rt_surround_mix_level(mut self, input: f64) -> Self {
self.lt_rt_surround_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Digital Plus setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. How the service uses this value depends on the value that you choose for Stereo downmix (Eac3StereoDownmix). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. This setting applies only if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Left total/Right total surround (ltRtSurroundMixLevel).
pub fn set_lt_rt_surround_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lt_rt_surround_mix_level = input;
self
}
/// When set to FOLLOW_INPUT, 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.
pub fn metadata_control(mut self, input: crate::model::Eac3MetadataControl) -> Self {
self.metadata_control = Some(input);
self
}
/// When set to FOLLOW_INPUT, 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.
pub fn set_metadata_control(
mut self,
input: std::option::Option<crate::model::Eac3MetadataControl>,
) -> Self {
self.metadata_control = input;
self
}
/// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is present on the input. this detection is dynamic over the life of the transcode. Inputs that alternate between DD+ and non-DD+ content will have a consistent DD+ output as the system alternates between passthrough and encoding.
pub fn passthrough_control(mut self, input: crate::model::Eac3PassthroughControl) -> Self {
self.passthrough_control = Some(input);
self
}
/// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is present on the input. this detection is dynamic over the life of the transcode. Inputs that alternate between DD+ and non-DD+ content will have a consistent DD+ output as the system alternates between passthrough and encoding.
pub fn set_passthrough_control(
mut self,
input: std::option::Option<crate::model::Eac3PassthroughControl>,
) -> Self {
self.passthrough_control = input;
self
}
/// Controls the amount of phase-shift applied to the surround channels. Only used for 3/2 coding mode.
pub fn phase_control(mut self, input: crate::model::Eac3PhaseControl) -> Self {
self.phase_control = Some(input);
self
}
/// Controls the amount of phase-shift applied to the surround channels. Only used for 3/2 coding mode.
pub fn set_phase_control(
mut self,
input: std::option::Option<crate::model::Eac3PhaseControl>,
) -> Self {
self.phase_control = input;
self
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Choose how the service does stereo downmixing. This setting only applies if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Stereo downmix (Eac3StereoDownmix).
pub fn stereo_downmix(mut self, input: crate::model::Eac3StereoDownmix) -> Self {
self.stereo_downmix = Some(input);
self
}
/// Choose how the service does stereo downmixing. This setting only applies if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Stereo downmix (Eac3StereoDownmix).
pub fn set_stereo_downmix(
mut self,
input: std::option::Option<crate::model::Eac3StereoDownmix>,
) -> Self {
self.stereo_downmix = input;
self
}
/// When encoding 3/2 audio, sets whether an extra center back surround channel is matrix encoded into the left and right surround channels.
pub fn surround_ex_mode(mut self, input: crate::model::Eac3SurroundExMode) -> Self {
self.surround_ex_mode = Some(input);
self
}
/// When encoding 3/2 audio, sets whether an extra center back surround channel is matrix encoded into the left and right surround channels.
pub fn set_surround_ex_mode(
mut self,
input: std::option::Option<crate::model::Eac3SurroundExMode>,
) -> Self {
self.surround_ex_mode = input;
self
}
/// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into the two channels.
pub fn surround_mode(mut self, input: crate::model::Eac3SurroundMode) -> Self {
self.surround_mode = Some(input);
self
}
/// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into the two channels.
pub fn set_surround_mode(
mut self,
input: std::option::Option<crate::model::Eac3SurroundMode>,
) -> Self {
self.surround_mode = input;
self
}
/// Consumes the builder and constructs a [`Eac3Settings`](crate::model::Eac3Settings)
pub fn build(self) -> crate::model::Eac3Settings {
crate::model::Eac3Settings {
attenuation_control: self.attenuation_control,
bitrate: self.bitrate.unwrap_or_default(),
bitstream_mode: self.bitstream_mode,
coding_mode: self.coding_mode,
dc_filter: self.dc_filter,
dialnorm: self.dialnorm.unwrap_or_default(),
dynamic_range_compression_line: self.dynamic_range_compression_line,
dynamic_range_compression_rf: self.dynamic_range_compression_rf,
lfe_control: self.lfe_control,
lfe_filter: self.lfe_filter,
lo_ro_center_mix_level: self.lo_ro_center_mix_level.unwrap_or_default(),
lo_ro_surround_mix_level: self.lo_ro_surround_mix_level.unwrap_or_default(),
lt_rt_center_mix_level: self.lt_rt_center_mix_level.unwrap_or_default(),
lt_rt_surround_mix_level: self.lt_rt_surround_mix_level.unwrap_or_default(),
metadata_control: self.metadata_control,
passthrough_control: self.passthrough_control,
phase_control: self.phase_control,
sample_rate: self.sample_rate.unwrap_or_default(),
stereo_downmix: self.stereo_downmix,
surround_ex_mode: self.surround_ex_mode,
surround_mode: self.surround_mode,
}
}
}
}
impl Eac3Settings {
/// Creates a new builder-style object to manufacture [`Eac3Settings`](crate::model::Eac3Settings)
pub fn builder() -> crate::model::eac3_settings::Builder {
crate::model::eac3_settings::Builder::default()
}
}
/// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into the two channels.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3SurroundMode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
NotIndicated,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3SurroundMode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Eac3SurroundMode::Disabled,
"ENABLED" => Eac3SurroundMode::Enabled,
"NOT_INDICATED" => Eac3SurroundMode::NotIndicated,
other => Eac3SurroundMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3SurroundMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3SurroundMode::from(s))
}
}
impl Eac3SurroundMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3SurroundMode::Disabled => "DISABLED",
Eac3SurroundMode::Enabled => "ENABLED",
Eac3SurroundMode::NotIndicated => "NOT_INDICATED",
Eac3SurroundMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "NOT_INDICATED"]
}
}
impl AsRef<str> for Eac3SurroundMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When encoding 3/2 audio, sets whether an extra center back surround channel is matrix encoded into the left and right surround channels.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3SurroundExMode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
NotIndicated,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3SurroundExMode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Eac3SurroundExMode::Disabled,
"ENABLED" => Eac3SurroundExMode::Enabled,
"NOT_INDICATED" => Eac3SurroundExMode::NotIndicated,
other => Eac3SurroundExMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3SurroundExMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3SurroundExMode::from(s))
}
}
impl Eac3SurroundExMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3SurroundExMode::Disabled => "DISABLED",
Eac3SurroundExMode::Enabled => "ENABLED",
Eac3SurroundExMode::NotIndicated => "NOT_INDICATED",
Eac3SurroundExMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "NOT_INDICATED"]
}
}
impl AsRef<str> for Eac3SurroundExMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose how the service does stereo downmixing. This setting only applies if you keep the default value of 3/2 - L, R, C, Ls, Rs (CODING_MODE_3_2) for the setting Coding mode (Eac3CodingMode). If you choose a different value for Coding mode, the service ignores Stereo downmix (Eac3StereoDownmix).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3StereoDownmix {
#[allow(missing_docs)] // documentation missing in model
Dpl2,
#[allow(missing_docs)] // documentation missing in model
LoRo,
#[allow(missing_docs)] // documentation missing in model
LtRt,
#[allow(missing_docs)] // documentation missing in model
NotIndicated,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3StereoDownmix {
fn from(s: &str) -> Self {
match s {
"DPL2" => Eac3StereoDownmix::Dpl2,
"LO_RO" => Eac3StereoDownmix::LoRo,
"LT_RT" => Eac3StereoDownmix::LtRt,
"NOT_INDICATED" => Eac3StereoDownmix::NotIndicated,
other => Eac3StereoDownmix::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3StereoDownmix {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3StereoDownmix::from(s))
}
}
impl Eac3StereoDownmix {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3StereoDownmix::Dpl2 => "DPL2",
Eac3StereoDownmix::LoRo => "LO_RO",
Eac3StereoDownmix::LtRt => "LT_RT",
Eac3StereoDownmix::NotIndicated => "NOT_INDICATED",
Eac3StereoDownmix::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DPL2", "LO_RO", "LT_RT", "NOT_INDICATED"]
}
}
impl AsRef<str> for Eac3StereoDownmix {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Controls the amount of phase-shift applied to the surround channels. Only used for 3/2 coding mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3PhaseControl {
#[allow(missing_docs)] // documentation missing in model
NoShift,
#[allow(missing_docs)] // documentation missing in model
Shift90Degrees,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3PhaseControl {
fn from(s: &str) -> Self {
match s {
"NO_SHIFT" => Eac3PhaseControl::NoShift,
"SHIFT_90_DEGREES" => Eac3PhaseControl::Shift90Degrees,
other => Eac3PhaseControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3PhaseControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3PhaseControl::from(s))
}
}
impl Eac3PhaseControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3PhaseControl::NoShift => "NO_SHIFT",
Eac3PhaseControl::Shift90Degrees => "SHIFT_90_DEGREES",
Eac3PhaseControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NO_SHIFT", "SHIFT_90_DEGREES"]
}
}
impl AsRef<str> for Eac3PhaseControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is present on the input. this detection is dynamic over the life of the transcode. Inputs that alternate between DD+ and non-DD+ content will have a consistent DD+ output as the system alternates between passthrough and encoding.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3PassthroughControl {
#[allow(missing_docs)] // documentation missing in model
NoPassthrough,
#[allow(missing_docs)] // documentation missing in model
WhenPossible,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3PassthroughControl {
fn from(s: &str) -> Self {
match s {
"NO_PASSTHROUGH" => Eac3PassthroughControl::NoPassthrough,
"WHEN_POSSIBLE" => Eac3PassthroughControl::WhenPossible,
other => Eac3PassthroughControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3PassthroughControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3PassthroughControl::from(s))
}
}
impl Eac3PassthroughControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3PassthroughControl::NoPassthrough => "NO_PASSTHROUGH",
Eac3PassthroughControl::WhenPossible => "WHEN_POSSIBLE",
Eac3PassthroughControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NO_PASSTHROUGH", "WHEN_POSSIBLE"]
}
}
impl AsRef<str> for Eac3PassthroughControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to FOLLOW_INPUT, 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3MetadataControl {
#[allow(missing_docs)] // documentation missing in model
FollowInput,
#[allow(missing_docs)] // documentation missing in model
UseConfigured,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3MetadataControl {
fn from(s: &str) -> Self {
match s {
"FOLLOW_INPUT" => Eac3MetadataControl::FollowInput,
"USE_CONFIGURED" => Eac3MetadataControl::UseConfigured,
other => Eac3MetadataControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3MetadataControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3MetadataControl::from(s))
}
}
impl Eac3MetadataControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3MetadataControl::FollowInput => "FOLLOW_INPUT",
Eac3MetadataControl::UseConfigured => "USE_CONFIGURED",
Eac3MetadataControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_INPUT", "USE_CONFIGURED"]
}
}
impl AsRef<str> for Eac3MetadataControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3LfeFilter {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3LfeFilter {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Eac3LfeFilter::Disabled,
"ENABLED" => Eac3LfeFilter::Enabled,
other => Eac3LfeFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3LfeFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3LfeFilter::from(s))
}
}
impl Eac3LfeFilter {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3LfeFilter::Disabled => "DISABLED",
Eac3LfeFilter::Enabled => "ENABLED",
Eac3LfeFilter::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Eac3LfeFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When encoding 3/2 audio, controls whether the LFE channel is enabled
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3LfeControl {
#[allow(missing_docs)] // documentation missing in model
Lfe,
#[allow(missing_docs)] // documentation missing in model
NoLfe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3LfeControl {
fn from(s: &str) -> Self {
match s {
"LFE" => Eac3LfeControl::Lfe,
"NO_LFE" => Eac3LfeControl::NoLfe,
other => Eac3LfeControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3LfeControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3LfeControl::from(s))
}
}
impl Eac3LfeControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3LfeControl::Lfe => "LFE",
Eac3LfeControl::NoLfe => "NO_LFE",
Eac3LfeControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["LFE", "NO_LFE"]
}
}
impl AsRef<str> for Eac3LfeControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3DynamicRangeCompressionRf {
#[allow(missing_docs)] // documentation missing in model
FilmLight,
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
MusicLight,
#[allow(missing_docs)] // documentation missing in model
MusicStandard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Speech,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3DynamicRangeCompressionRf {
fn from(s: &str) -> Self {
match s {
"FILM_LIGHT" => Eac3DynamicRangeCompressionRf::FilmLight,
"FILM_STANDARD" => Eac3DynamicRangeCompressionRf::FilmStandard,
"MUSIC_LIGHT" => Eac3DynamicRangeCompressionRf::MusicLight,
"MUSIC_STANDARD" => Eac3DynamicRangeCompressionRf::MusicStandard,
"NONE" => Eac3DynamicRangeCompressionRf::None,
"SPEECH" => Eac3DynamicRangeCompressionRf::Speech,
other => Eac3DynamicRangeCompressionRf::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3DynamicRangeCompressionRf {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3DynamicRangeCompressionRf::from(s))
}
}
impl Eac3DynamicRangeCompressionRf {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3DynamicRangeCompressionRf::FilmLight => "FILM_LIGHT",
Eac3DynamicRangeCompressionRf::FilmStandard => "FILM_STANDARD",
Eac3DynamicRangeCompressionRf::MusicLight => "MUSIC_LIGHT",
Eac3DynamicRangeCompressionRf::MusicStandard => "MUSIC_STANDARD",
Eac3DynamicRangeCompressionRf::None => "NONE",
Eac3DynamicRangeCompressionRf::Speech => "SPEECH",
Eac3DynamicRangeCompressionRf::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FILM_LIGHT",
"FILM_STANDARD",
"MUSIC_LIGHT",
"MUSIC_STANDARD",
"NONE",
"SPEECH",
]
}
}
impl AsRef<str> for Eac3DynamicRangeCompressionRf {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3DynamicRangeCompressionLine {
#[allow(missing_docs)] // documentation missing in model
FilmLight,
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
MusicLight,
#[allow(missing_docs)] // documentation missing in model
MusicStandard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Speech,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3DynamicRangeCompressionLine {
fn from(s: &str) -> Self {
match s {
"FILM_LIGHT" => Eac3DynamicRangeCompressionLine::FilmLight,
"FILM_STANDARD" => Eac3DynamicRangeCompressionLine::FilmStandard,
"MUSIC_LIGHT" => Eac3DynamicRangeCompressionLine::MusicLight,
"MUSIC_STANDARD" => Eac3DynamicRangeCompressionLine::MusicStandard,
"NONE" => Eac3DynamicRangeCompressionLine::None,
"SPEECH" => Eac3DynamicRangeCompressionLine::Speech,
other => Eac3DynamicRangeCompressionLine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3DynamicRangeCompressionLine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3DynamicRangeCompressionLine::from(s))
}
}
impl Eac3DynamicRangeCompressionLine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3DynamicRangeCompressionLine::FilmLight => "FILM_LIGHT",
Eac3DynamicRangeCompressionLine::FilmStandard => "FILM_STANDARD",
Eac3DynamicRangeCompressionLine::MusicLight => "MUSIC_LIGHT",
Eac3DynamicRangeCompressionLine::MusicStandard => "MUSIC_STANDARD",
Eac3DynamicRangeCompressionLine::None => "NONE",
Eac3DynamicRangeCompressionLine::Speech => "SPEECH",
Eac3DynamicRangeCompressionLine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FILM_LIGHT",
"FILM_STANDARD",
"MUSIC_LIGHT",
"MUSIC_STANDARD",
"NONE",
"SPEECH",
]
}
}
impl AsRef<str> for Eac3DynamicRangeCompressionLine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Activates a DC highpass filter for all input channels.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3DcFilter {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3DcFilter {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Eac3DcFilter::Disabled,
"ENABLED" => Eac3DcFilter::Enabled,
other => Eac3DcFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3DcFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3DcFilter::from(s))
}
}
impl Eac3DcFilter {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3DcFilter::Disabled => "DISABLED",
Eac3DcFilter::Enabled => "ENABLED",
Eac3DcFilter::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Eac3DcFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Dolby Digital Plus coding mode. Determines number of channels.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3CodingMode {
#[allow(missing_docs)] // documentation missing in model
CodingMode10,
#[allow(missing_docs)] // documentation missing in model
CodingMode20,
#[allow(missing_docs)] // documentation missing in model
CodingMode32,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3CodingMode {
fn from(s: &str) -> Self {
match s {
"CODING_MODE_1_0" => Eac3CodingMode::CodingMode10,
"CODING_MODE_2_0" => Eac3CodingMode::CodingMode20,
"CODING_MODE_3_2" => Eac3CodingMode::CodingMode32,
other => Eac3CodingMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3CodingMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3CodingMode::from(s))
}
}
impl Eac3CodingMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3CodingMode::CodingMode10 => "CODING_MODE_1_0",
Eac3CodingMode::CodingMode20 => "CODING_MODE_2_0",
Eac3CodingMode::CodingMode32 => "CODING_MODE_3_2",
Eac3CodingMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CODING_MODE_1_0", "CODING_MODE_2_0", "CODING_MODE_3_2"]
}
}
impl AsRef<str> for Eac3CodingMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3BitstreamMode {
#[allow(missing_docs)] // documentation missing in model
Commentary,
#[allow(missing_docs)] // documentation missing in model
CompleteMain,
#[allow(missing_docs)] // documentation missing in model
Emergency,
#[allow(missing_docs)] // documentation missing in model
HearingImpaired,
#[allow(missing_docs)] // documentation missing in model
VisuallyImpaired,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3BitstreamMode {
fn from(s: &str) -> Self {
match s {
"COMMENTARY" => Eac3BitstreamMode::Commentary,
"COMPLETE_MAIN" => Eac3BitstreamMode::CompleteMain,
"EMERGENCY" => Eac3BitstreamMode::Emergency,
"HEARING_IMPAIRED" => Eac3BitstreamMode::HearingImpaired,
"VISUALLY_IMPAIRED" => Eac3BitstreamMode::VisuallyImpaired,
other => Eac3BitstreamMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3BitstreamMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3BitstreamMode::from(s))
}
}
impl Eac3BitstreamMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3BitstreamMode::Commentary => "COMMENTARY",
Eac3BitstreamMode::CompleteMain => "COMPLETE_MAIN",
Eac3BitstreamMode::Emergency => "EMERGENCY",
Eac3BitstreamMode::HearingImpaired => "HEARING_IMPAIRED",
Eac3BitstreamMode::VisuallyImpaired => "VISUALLY_IMPAIRED",
Eac3BitstreamMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"COMMENTARY",
"COMPLETE_MAIN",
"EMERGENCY",
"HEARING_IMPAIRED",
"VISUALLY_IMPAIRED",
]
}
}
impl AsRef<str> for Eac3BitstreamMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. Only used for 3/2 coding mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AttenuationControl {
#[allow(missing_docs)] // documentation missing in model
Attenuate3Db,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AttenuationControl {
fn from(s: &str) -> Self {
match s {
"ATTENUATE_3_DB" => Eac3AttenuationControl::Attenuate3Db,
"NONE" => Eac3AttenuationControl::None,
other => Eac3AttenuationControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AttenuationControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AttenuationControl::from(s))
}
}
impl Eac3AttenuationControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AttenuationControl::Attenuate3Db => "ATTENUATE_3_DB",
Eac3AttenuationControl::None => "NONE",
Eac3AttenuationControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ATTENUATE_3_DB", "NONE"]
}
}
impl AsRef<str> for Eac3AttenuationControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value EAC3_ATMOS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Eac3AtmosSettings {
/// Specify the average bitrate for this output in bits per second. Valid values: 384k, 448k, 576k, 640k, 768k, 1024k Default value: 448k Note that MediaConvert supports 384k only with channel-based immersive (CBI) 7.1.4 and 5.1.4 inputs. For CBI 9.1.6 and other input types, MediaConvert automatically increases your output bitrate to 448k.
pub bitrate: i32,
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub bitstream_mode: std::option::Option<crate::model::Eac3AtmosBitstreamMode>,
/// The coding mode for Dolby Digital Plus JOC (Atmos).
pub coding_mode: std::option::Option<crate::model::Eac3AtmosCodingMode>,
/// Enable Dolby Dialogue Intelligence to adjust loudness based on dialogue analysis.
pub dialogue_intelligence: std::option::Option<crate::model::Eac3AtmosDialogueIntelligence>,
/// Specify whether MediaConvert should use any downmix metadata from your input file. Keep the default value, Custom (SPECIFIED) to provide downmix values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your downmix values: Left only/Right only surround (LoRoSurroundMixLevel), Left total/Right total surround (LtRtSurroundMixLevel), Left total/Right total center (LtRtCenterMixLevel), Left only/Right only center (LoRoCenterMixLevel), and Stereo downmix (StereoDownmix). When you keep Custom (SPECIFIED) for Downmix control (DownmixControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub downmix_control: std::option::Option<crate::model::Eac3AtmosDownmixControl>,
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the line operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression line (DynamicRangeCompressionLine). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub dynamic_range_compression_line:
std::option::Option<crate::model::Eac3AtmosDynamicRangeCompressionLine>,
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the RF operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression RF (DynamicRangeCompressionRf). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub dynamic_range_compression_rf:
std::option::Option<crate::model::Eac3AtmosDynamicRangeCompressionRf>,
/// Specify whether MediaConvert should use any dynamic range control metadata from your input file. Keep the default value, Custom (SPECIFIED), to provide dynamic range control values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your dynamic range control values: Dynamic range compression line (DynamicRangeCompressionLine) and Dynamic range compression RF (DynamicRangeCompressionRf). When you keep the value Custom (SPECIFIED) for Dynamic range control (DynamicRangeControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub dynamic_range_control: std::option::Option<crate::model::Eac3AtmosDynamicRangeControl>,
/// Specify a value for the following Dolby Atmos setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only center (LoRoCenterMixLevel).
pub lo_ro_center_mix_level: f64,
/// Specify a value for the following Dolby Atmos setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only surround (LoRoSurroundMixLevel).
pub lo_ro_surround_mix_level: f64,
/// Specify a value for the following Dolby Atmos setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left total/Right total center (LtRtCenterMixLevel).
pub lt_rt_center_mix_level: f64,
/// Specify a value for the following Dolby Atmos setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, the service ignores Left total/Right total surround (LtRtSurroundMixLevel).
pub lt_rt_surround_mix_level: f64,
/// Choose how the service meters the loudness of your audio.
pub metering_mode: std::option::Option<crate::model::Eac3AtmosMeteringMode>,
/// This value is always 48000. It represents the sample rate in Hz.
pub sample_rate: i32,
/// Specify the percentage of audio content, from 0% to 100%, that must be speech in order for the encoder to use the measured speech loudness as the overall program loudness. Default value: 15%
pub speech_threshold: i32,
/// Choose how the service does stereo downmixing. Default value: Not indicated (ATMOS_STORAGE_DDP_DMIXMOD_NOT_INDICATED) Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Stereo downmix (StereoDownmix).
pub stereo_downmix: std::option::Option<crate::model::Eac3AtmosStereoDownmix>,
/// Specify whether your input audio has an additional center rear surround channel matrix encoded into your left and right surround channels.
pub surround_ex_mode: std::option::Option<crate::model::Eac3AtmosSurroundExMode>,
}
impl Eac3AtmosSettings {
/// Specify the average bitrate for this output in bits per second. Valid values: 384k, 448k, 576k, 640k, 768k, 1024k Default value: 448k Note that MediaConvert supports 384k only with channel-based immersive (CBI) 7.1.4 and 5.1.4 inputs. For CBI 9.1.6 and other input types, MediaConvert automatically increases your output bitrate to 448k.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn bitstream_mode(&self) -> std::option::Option<&crate::model::Eac3AtmosBitstreamMode> {
self.bitstream_mode.as_ref()
}
/// The coding mode for Dolby Digital Plus JOC (Atmos).
pub fn coding_mode(&self) -> std::option::Option<&crate::model::Eac3AtmosCodingMode> {
self.coding_mode.as_ref()
}
/// Enable Dolby Dialogue Intelligence to adjust loudness based on dialogue analysis.
pub fn dialogue_intelligence(
&self,
) -> std::option::Option<&crate::model::Eac3AtmosDialogueIntelligence> {
self.dialogue_intelligence.as_ref()
}
/// Specify whether MediaConvert should use any downmix metadata from your input file. Keep the default value, Custom (SPECIFIED) to provide downmix values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your downmix values: Left only/Right only surround (LoRoSurroundMixLevel), Left total/Right total surround (LtRtSurroundMixLevel), Left total/Right total center (LtRtCenterMixLevel), Left only/Right only center (LoRoCenterMixLevel), and Stereo downmix (StereoDownmix). When you keep Custom (SPECIFIED) for Downmix control (DownmixControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub fn downmix_control(&self) -> std::option::Option<&crate::model::Eac3AtmosDownmixControl> {
self.downmix_control.as_ref()
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the line operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression line (DynamicRangeCompressionLine). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_line(
&self,
) -> std::option::Option<&crate::model::Eac3AtmosDynamicRangeCompressionLine> {
self.dynamic_range_compression_line.as_ref()
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the RF operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression RF (DynamicRangeCompressionRf). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_rf(
&self,
) -> std::option::Option<&crate::model::Eac3AtmosDynamicRangeCompressionRf> {
self.dynamic_range_compression_rf.as_ref()
}
/// Specify whether MediaConvert should use any dynamic range control metadata from your input file. Keep the default value, Custom (SPECIFIED), to provide dynamic range control values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your dynamic range control values: Dynamic range compression line (DynamicRangeCompressionLine) and Dynamic range compression RF (DynamicRangeCompressionRf). When you keep the value Custom (SPECIFIED) for Dynamic range control (DynamicRangeControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub fn dynamic_range_control(
&self,
) -> std::option::Option<&crate::model::Eac3AtmosDynamicRangeControl> {
self.dynamic_range_control.as_ref()
}
/// Specify a value for the following Dolby Atmos setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only center (LoRoCenterMixLevel).
pub fn lo_ro_center_mix_level(&self) -> f64 {
self.lo_ro_center_mix_level
}
/// Specify a value for the following Dolby Atmos setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only surround (LoRoSurroundMixLevel).
pub fn lo_ro_surround_mix_level(&self) -> f64 {
self.lo_ro_surround_mix_level
}
/// Specify a value for the following Dolby Atmos setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left total/Right total center (LtRtCenterMixLevel).
pub fn lt_rt_center_mix_level(&self) -> f64 {
self.lt_rt_center_mix_level
}
/// Specify a value for the following Dolby Atmos setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, the service ignores Left total/Right total surround (LtRtSurroundMixLevel).
pub fn lt_rt_surround_mix_level(&self) -> f64 {
self.lt_rt_surround_mix_level
}
/// Choose how the service meters the loudness of your audio.
pub fn metering_mode(&self) -> std::option::Option<&crate::model::Eac3AtmosMeteringMode> {
self.metering_mode.as_ref()
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
/// Specify the percentage of audio content, from 0% to 100%, that must be speech in order for the encoder to use the measured speech loudness as the overall program loudness. Default value: 15%
pub fn speech_threshold(&self) -> i32 {
self.speech_threshold
}
/// Choose how the service does stereo downmixing. Default value: Not indicated (ATMOS_STORAGE_DDP_DMIXMOD_NOT_INDICATED) Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Stereo downmix (StereoDownmix).
pub fn stereo_downmix(&self) -> std::option::Option<&crate::model::Eac3AtmosStereoDownmix> {
self.stereo_downmix.as_ref()
}
/// Specify whether your input audio has an additional center rear surround channel matrix encoded into your left and right surround channels.
pub fn surround_ex_mode(&self) -> std::option::Option<&crate::model::Eac3AtmosSurroundExMode> {
self.surround_ex_mode.as_ref()
}
}
impl std::fmt::Debug for Eac3AtmosSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Eac3AtmosSettings");
formatter.field("bitrate", &self.bitrate);
formatter.field("bitstream_mode", &self.bitstream_mode);
formatter.field("coding_mode", &self.coding_mode);
formatter.field("dialogue_intelligence", &self.dialogue_intelligence);
formatter.field("downmix_control", &self.downmix_control);
formatter.field(
"dynamic_range_compression_line",
&self.dynamic_range_compression_line,
);
formatter.field(
"dynamic_range_compression_rf",
&self.dynamic_range_compression_rf,
);
formatter.field("dynamic_range_control", &self.dynamic_range_control);
formatter.field("lo_ro_center_mix_level", &self.lo_ro_center_mix_level);
formatter.field("lo_ro_surround_mix_level", &self.lo_ro_surround_mix_level);
formatter.field("lt_rt_center_mix_level", &self.lt_rt_center_mix_level);
formatter.field("lt_rt_surround_mix_level", &self.lt_rt_surround_mix_level);
formatter.field("metering_mode", &self.metering_mode);
formatter.field("sample_rate", &self.sample_rate);
formatter.field("speech_threshold", &self.speech_threshold);
formatter.field("stereo_downmix", &self.stereo_downmix);
formatter.field("surround_ex_mode", &self.surround_ex_mode);
formatter.finish()
}
}
/// See [`Eac3AtmosSettings`](crate::model::Eac3AtmosSettings)
pub mod eac3_atmos_settings {
/// A builder for [`Eac3AtmosSettings`](crate::model::Eac3AtmosSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) bitstream_mode: std::option::Option<crate::model::Eac3AtmosBitstreamMode>,
pub(crate) coding_mode: std::option::Option<crate::model::Eac3AtmosCodingMode>,
pub(crate) dialogue_intelligence:
std::option::Option<crate::model::Eac3AtmosDialogueIntelligence>,
pub(crate) downmix_control: std::option::Option<crate::model::Eac3AtmosDownmixControl>,
pub(crate) dynamic_range_compression_line:
std::option::Option<crate::model::Eac3AtmosDynamicRangeCompressionLine>,
pub(crate) dynamic_range_compression_rf:
std::option::Option<crate::model::Eac3AtmosDynamicRangeCompressionRf>,
pub(crate) dynamic_range_control:
std::option::Option<crate::model::Eac3AtmosDynamicRangeControl>,
pub(crate) lo_ro_center_mix_level: std::option::Option<f64>,
pub(crate) lo_ro_surround_mix_level: std::option::Option<f64>,
pub(crate) lt_rt_center_mix_level: std::option::Option<f64>,
pub(crate) lt_rt_surround_mix_level: std::option::Option<f64>,
pub(crate) metering_mode: std::option::Option<crate::model::Eac3AtmosMeteringMode>,
pub(crate) sample_rate: std::option::Option<i32>,
pub(crate) speech_threshold: std::option::Option<i32>,
pub(crate) stereo_downmix: std::option::Option<crate::model::Eac3AtmosStereoDownmix>,
pub(crate) surround_ex_mode: std::option::Option<crate::model::Eac3AtmosSurroundExMode>,
}
impl Builder {
/// Specify the average bitrate for this output in bits per second. Valid values: 384k, 448k, 576k, 640k, 768k, 1024k Default value: 448k Note that MediaConvert supports 384k only with channel-based immersive (CBI) 7.1.4 and 5.1.4 inputs. For CBI 9.1.6 and other input types, MediaConvert automatically increases your output bitrate to 448k.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate for this output in bits per second. Valid values: 384k, 448k, 576k, 640k, 768k, 1024k Default value: 448k Note that MediaConvert supports 384k only with channel-based immersive (CBI) 7.1.4 and 5.1.4 inputs. For CBI 9.1.6 and other input types, MediaConvert automatically increases your output bitrate to 448k.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn bitstream_mode(mut self, input: crate::model::Eac3AtmosBitstreamMode) -> Self {
self.bitstream_mode = Some(input);
self
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn set_bitstream_mode(
mut self,
input: std::option::Option<crate::model::Eac3AtmosBitstreamMode>,
) -> Self {
self.bitstream_mode = input;
self
}
/// The coding mode for Dolby Digital Plus JOC (Atmos).
pub fn coding_mode(mut self, input: crate::model::Eac3AtmosCodingMode) -> Self {
self.coding_mode = Some(input);
self
}
/// The coding mode for Dolby Digital Plus JOC (Atmos).
pub fn set_coding_mode(
mut self,
input: std::option::Option<crate::model::Eac3AtmosCodingMode>,
) -> Self {
self.coding_mode = input;
self
}
/// Enable Dolby Dialogue Intelligence to adjust loudness based on dialogue analysis.
pub fn dialogue_intelligence(
mut self,
input: crate::model::Eac3AtmosDialogueIntelligence,
) -> Self {
self.dialogue_intelligence = Some(input);
self
}
/// Enable Dolby Dialogue Intelligence to adjust loudness based on dialogue analysis.
pub fn set_dialogue_intelligence(
mut self,
input: std::option::Option<crate::model::Eac3AtmosDialogueIntelligence>,
) -> Self {
self.dialogue_intelligence = input;
self
}
/// Specify whether MediaConvert should use any downmix metadata from your input file. Keep the default value, Custom (SPECIFIED) to provide downmix values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your downmix values: Left only/Right only surround (LoRoSurroundMixLevel), Left total/Right total surround (LtRtSurroundMixLevel), Left total/Right total center (LtRtCenterMixLevel), Left only/Right only center (LoRoCenterMixLevel), and Stereo downmix (StereoDownmix). When you keep Custom (SPECIFIED) for Downmix control (DownmixControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub fn downmix_control(mut self, input: crate::model::Eac3AtmosDownmixControl) -> Self {
self.downmix_control = Some(input);
self
}
/// Specify whether MediaConvert should use any downmix metadata from your input file. Keep the default value, Custom (SPECIFIED) to provide downmix values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your downmix values: Left only/Right only surround (LoRoSurroundMixLevel), Left total/Right total surround (LtRtSurroundMixLevel), Left total/Right total center (LtRtCenterMixLevel), Left only/Right only center (LoRoCenterMixLevel), and Stereo downmix (StereoDownmix). When you keep Custom (SPECIFIED) for Downmix control (DownmixControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub fn set_downmix_control(
mut self,
input: std::option::Option<crate::model::Eac3AtmosDownmixControl>,
) -> Self {
self.downmix_control = input;
self
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the line operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression line (DynamicRangeCompressionLine). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_line(
mut self,
input: crate::model::Eac3AtmosDynamicRangeCompressionLine,
) -> Self {
self.dynamic_range_compression_line = Some(input);
self
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the line operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression line (DynamicRangeCompressionLine). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn set_dynamic_range_compression_line(
mut self,
input: std::option::Option<crate::model::Eac3AtmosDynamicRangeCompressionLine>,
) -> Self {
self.dynamic_range_compression_line = input;
self
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the RF operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression RF (DynamicRangeCompressionRf). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_rf(
mut self,
input: crate::model::Eac3AtmosDynamicRangeCompressionRf,
) -> Self {
self.dynamic_range_compression_rf = Some(input);
self
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the RF operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression RF (DynamicRangeCompressionRf). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn set_dynamic_range_compression_rf(
mut self,
input: std::option::Option<crate::model::Eac3AtmosDynamicRangeCompressionRf>,
) -> Self {
self.dynamic_range_compression_rf = input;
self
}
/// Specify whether MediaConvert should use any dynamic range control metadata from your input file. Keep the default value, Custom (SPECIFIED), to provide dynamic range control values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your dynamic range control values: Dynamic range compression line (DynamicRangeCompressionLine) and Dynamic range compression RF (DynamicRangeCompressionRf). When you keep the value Custom (SPECIFIED) for Dynamic range control (DynamicRangeControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub fn dynamic_range_control(
mut self,
input: crate::model::Eac3AtmosDynamicRangeControl,
) -> Self {
self.dynamic_range_control = Some(input);
self
}
/// Specify whether MediaConvert should use any dynamic range control metadata from your input file. Keep the default value, Custom (SPECIFIED), to provide dynamic range control values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your dynamic range control values: Dynamic range compression line (DynamicRangeCompressionLine) and Dynamic range compression RF (DynamicRangeCompressionRf). When you keep the value Custom (SPECIFIED) for Dynamic range control (DynamicRangeControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
pub fn set_dynamic_range_control(
mut self,
input: std::option::Option<crate::model::Eac3AtmosDynamicRangeControl>,
) -> Self {
self.dynamic_range_control = input;
self
}
/// Specify a value for the following Dolby Atmos setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only center (LoRoCenterMixLevel).
pub fn lo_ro_center_mix_level(mut self, input: f64) -> Self {
self.lo_ro_center_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Atmos setting: Left only/Right only center mix (Lo/Ro center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only center (LoRoCenterMixLevel).
pub fn set_lo_ro_center_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lo_ro_center_mix_level = input;
self
}
/// Specify a value for the following Dolby Atmos setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only surround (LoRoSurroundMixLevel).
pub fn lo_ro_surround_mix_level(mut self, input: f64) -> Self {
self.lo_ro_surround_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Atmos setting: Left only/Right only (Lo/Ro surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB). Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left only/Right only surround (LoRoSurroundMixLevel).
pub fn set_lo_ro_surround_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lo_ro_surround_mix_level = input;
self
}
/// Specify a value for the following Dolby Atmos setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left total/Right total center (LtRtCenterMixLevel).
pub fn lt_rt_center_mix_level(mut self, input: f64) -> Self {
self.lt_rt_center_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Atmos setting: Left total/Right total center mix (Lt/Rt center). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: 3.0, 1.5, 0.0, -1.5, -3.0, -4.5, and -6.0. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Left total/Right total center (LtRtCenterMixLevel).
pub fn set_lt_rt_center_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lt_rt_center_mix_level = input;
self
}
/// Specify a value for the following Dolby Atmos setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, the service ignores Left total/Right total surround (LtRtSurroundMixLevel).
pub fn lt_rt_surround_mix_level(mut self, input: f64) -> Self {
self.lt_rt_surround_mix_level = Some(input);
self
}
/// Specify a value for the following Dolby Atmos setting: Left total/Right total surround mix (Lt/Rt surround). MediaConvert uses this value for downmixing. Default value: -3 dB (ATMOS_STORAGE_DDP_MIXLEV_MINUS_3_DB) Valid values: -1.5, -3.0, -4.5, -6.0, and -60. The value -60 mutes the channel. Related setting: How the service uses this value depends on the value that you choose for Stereo downmix (Eac3AtmosStereoDownmix). Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, the service ignores Left total/Right total surround (LtRtSurroundMixLevel).
pub fn set_lt_rt_surround_mix_level(mut self, input: std::option::Option<f64>) -> Self {
self.lt_rt_surround_mix_level = input;
self
}
/// Choose how the service meters the loudness of your audio.
pub fn metering_mode(mut self, input: crate::model::Eac3AtmosMeteringMode) -> Self {
self.metering_mode = Some(input);
self
}
/// Choose how the service meters the loudness of your audio.
pub fn set_metering_mode(
mut self,
input: std::option::Option<crate::model::Eac3AtmosMeteringMode>,
) -> Self {
self.metering_mode = input;
self
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Specify the percentage of audio content, from 0% to 100%, that must be speech in order for the encoder to use the measured speech loudness as the overall program loudness. Default value: 15%
pub fn speech_threshold(mut self, input: i32) -> Self {
self.speech_threshold = Some(input);
self
}
/// Specify the percentage of audio content, from 0% to 100%, that must be speech in order for the encoder to use the measured speech loudness as the overall program loudness. Default value: 15%
pub fn set_speech_threshold(mut self, input: std::option::Option<i32>) -> Self {
self.speech_threshold = input;
self
}
/// Choose how the service does stereo downmixing. Default value: Not indicated (ATMOS_STORAGE_DDP_DMIXMOD_NOT_INDICATED) Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Stereo downmix (StereoDownmix).
pub fn stereo_downmix(mut self, input: crate::model::Eac3AtmosStereoDownmix) -> Self {
self.stereo_downmix = Some(input);
self
}
/// Choose how the service does stereo downmixing. Default value: Not indicated (ATMOS_STORAGE_DDP_DMIXMOD_NOT_INDICATED) Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Stereo downmix (StereoDownmix).
pub fn set_stereo_downmix(
mut self,
input: std::option::Option<crate::model::Eac3AtmosStereoDownmix>,
) -> Self {
self.stereo_downmix = input;
self
}
/// Specify whether your input audio has an additional center rear surround channel matrix encoded into your left and right surround channels.
pub fn surround_ex_mode(mut self, input: crate::model::Eac3AtmosSurroundExMode) -> Self {
self.surround_ex_mode = Some(input);
self
}
/// Specify whether your input audio has an additional center rear surround channel matrix encoded into your left and right surround channels.
pub fn set_surround_ex_mode(
mut self,
input: std::option::Option<crate::model::Eac3AtmosSurroundExMode>,
) -> Self {
self.surround_ex_mode = input;
self
}
/// Consumes the builder and constructs a [`Eac3AtmosSettings`](crate::model::Eac3AtmosSettings)
pub fn build(self) -> crate::model::Eac3AtmosSettings {
crate::model::Eac3AtmosSettings {
bitrate: self.bitrate.unwrap_or_default(),
bitstream_mode: self.bitstream_mode,
coding_mode: self.coding_mode,
dialogue_intelligence: self.dialogue_intelligence,
downmix_control: self.downmix_control,
dynamic_range_compression_line: self.dynamic_range_compression_line,
dynamic_range_compression_rf: self.dynamic_range_compression_rf,
dynamic_range_control: self.dynamic_range_control,
lo_ro_center_mix_level: self.lo_ro_center_mix_level.unwrap_or_default(),
lo_ro_surround_mix_level: self.lo_ro_surround_mix_level.unwrap_or_default(),
lt_rt_center_mix_level: self.lt_rt_center_mix_level.unwrap_or_default(),
lt_rt_surround_mix_level: self.lt_rt_surround_mix_level.unwrap_or_default(),
metering_mode: self.metering_mode,
sample_rate: self.sample_rate.unwrap_or_default(),
speech_threshold: self.speech_threshold.unwrap_or_default(),
stereo_downmix: self.stereo_downmix,
surround_ex_mode: self.surround_ex_mode,
}
}
}
}
impl Eac3AtmosSettings {
/// Creates a new builder-style object to manufacture [`Eac3AtmosSettings`](crate::model::Eac3AtmosSettings)
pub fn builder() -> crate::model::eac3_atmos_settings::Builder {
crate::model::eac3_atmos_settings::Builder::default()
}
}
/// Specify whether your input audio has an additional center rear surround channel matrix encoded into your left and right surround channels.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosSurroundExMode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
NotIndicated,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosSurroundExMode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Eac3AtmosSurroundExMode::Disabled,
"ENABLED" => Eac3AtmosSurroundExMode::Enabled,
"NOT_INDICATED" => Eac3AtmosSurroundExMode::NotIndicated,
other => Eac3AtmosSurroundExMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosSurroundExMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosSurroundExMode::from(s))
}
}
impl Eac3AtmosSurroundExMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosSurroundExMode::Disabled => "DISABLED",
Eac3AtmosSurroundExMode::Enabled => "ENABLED",
Eac3AtmosSurroundExMode::NotIndicated => "NOT_INDICATED",
Eac3AtmosSurroundExMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "NOT_INDICATED"]
}
}
impl AsRef<str> for Eac3AtmosSurroundExMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose how the service does stereo downmixing. Default value: Not indicated (ATMOS_STORAGE_DDP_DMIXMOD_NOT_INDICATED) Related setting: To have MediaConvert use this value, keep the default value, Custom (SPECIFIED) for the setting Downmix control (DownmixControl). Otherwise, MediaConvert ignores Stereo downmix (StereoDownmix).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosStereoDownmix {
#[allow(missing_docs)] // documentation missing in model
Dpl2,
#[allow(missing_docs)] // documentation missing in model
NotIndicated,
#[allow(missing_docs)] // documentation missing in model
Stereo,
#[allow(missing_docs)] // documentation missing in model
Surround,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosStereoDownmix {
fn from(s: &str) -> Self {
match s {
"DPL2" => Eac3AtmosStereoDownmix::Dpl2,
"NOT_INDICATED" => Eac3AtmosStereoDownmix::NotIndicated,
"STEREO" => Eac3AtmosStereoDownmix::Stereo,
"SURROUND" => Eac3AtmosStereoDownmix::Surround,
other => Eac3AtmosStereoDownmix::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosStereoDownmix {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosStereoDownmix::from(s))
}
}
impl Eac3AtmosStereoDownmix {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosStereoDownmix::Dpl2 => "DPL2",
Eac3AtmosStereoDownmix::NotIndicated => "NOT_INDICATED",
Eac3AtmosStereoDownmix::Stereo => "STEREO",
Eac3AtmosStereoDownmix::Surround => "SURROUND",
Eac3AtmosStereoDownmix::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DPL2", "NOT_INDICATED", "STEREO", "SURROUND"]
}
}
impl AsRef<str> for Eac3AtmosStereoDownmix {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose how the service meters the loudness of your audio.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosMeteringMode {
#[allow(missing_docs)] // documentation missing in model
ItuBs17701,
#[allow(missing_docs)] // documentation missing in model
ItuBs17702,
#[allow(missing_docs)] // documentation missing in model
ItuBs17703,
#[allow(missing_docs)] // documentation missing in model
ItuBs17704,
#[allow(missing_docs)] // documentation missing in model
LeqA,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosMeteringMode {
fn from(s: &str) -> Self {
match s {
"ITU_BS_1770_1" => Eac3AtmosMeteringMode::ItuBs17701,
"ITU_BS_1770_2" => Eac3AtmosMeteringMode::ItuBs17702,
"ITU_BS_1770_3" => Eac3AtmosMeteringMode::ItuBs17703,
"ITU_BS_1770_4" => Eac3AtmosMeteringMode::ItuBs17704,
"LEQ_A" => Eac3AtmosMeteringMode::LeqA,
other => Eac3AtmosMeteringMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosMeteringMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosMeteringMode::from(s))
}
}
impl Eac3AtmosMeteringMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosMeteringMode::ItuBs17701 => "ITU_BS_1770_1",
Eac3AtmosMeteringMode::ItuBs17702 => "ITU_BS_1770_2",
Eac3AtmosMeteringMode::ItuBs17703 => "ITU_BS_1770_3",
Eac3AtmosMeteringMode::ItuBs17704 => "ITU_BS_1770_4",
Eac3AtmosMeteringMode::LeqA => "LEQ_A",
Eac3AtmosMeteringMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ITU_BS_1770_1",
"ITU_BS_1770_2",
"ITU_BS_1770_3",
"ITU_BS_1770_4",
"LEQ_A",
]
}
}
impl AsRef<str> for Eac3AtmosMeteringMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether MediaConvert should use any dynamic range control metadata from your input file. Keep the default value, Custom (SPECIFIED), to provide dynamic range control values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your dynamic range control values: Dynamic range compression line (DynamicRangeCompressionLine) and Dynamic range compression RF (DynamicRangeCompressionRf). When you keep the value Custom (SPECIFIED) for Dynamic range control (DynamicRangeControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosDynamicRangeControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosDynamicRangeControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Eac3AtmosDynamicRangeControl::InitializeFromSource,
"SPECIFIED" => Eac3AtmosDynamicRangeControl::Specified,
other => Eac3AtmosDynamicRangeControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosDynamicRangeControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosDynamicRangeControl::from(s))
}
}
impl Eac3AtmosDynamicRangeControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosDynamicRangeControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Eac3AtmosDynamicRangeControl::Specified => "SPECIFIED",
Eac3AtmosDynamicRangeControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Eac3AtmosDynamicRangeControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the RF operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression RF (DynamicRangeCompressionRf). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosDynamicRangeCompressionRf {
#[allow(missing_docs)] // documentation missing in model
FilmLight,
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
MusicLight,
#[allow(missing_docs)] // documentation missing in model
MusicStandard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Speech,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosDynamicRangeCompressionRf {
fn from(s: &str) -> Self {
match s {
"FILM_LIGHT" => Eac3AtmosDynamicRangeCompressionRf::FilmLight,
"FILM_STANDARD" => Eac3AtmosDynamicRangeCompressionRf::FilmStandard,
"MUSIC_LIGHT" => Eac3AtmosDynamicRangeCompressionRf::MusicLight,
"MUSIC_STANDARD" => Eac3AtmosDynamicRangeCompressionRf::MusicStandard,
"NONE" => Eac3AtmosDynamicRangeCompressionRf::None,
"SPEECH" => Eac3AtmosDynamicRangeCompressionRf::Speech,
other => Eac3AtmosDynamicRangeCompressionRf::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosDynamicRangeCompressionRf {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosDynamicRangeCompressionRf::from(s))
}
}
impl Eac3AtmosDynamicRangeCompressionRf {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosDynamicRangeCompressionRf::FilmLight => "FILM_LIGHT",
Eac3AtmosDynamicRangeCompressionRf::FilmStandard => "FILM_STANDARD",
Eac3AtmosDynamicRangeCompressionRf::MusicLight => "MUSIC_LIGHT",
Eac3AtmosDynamicRangeCompressionRf::MusicStandard => "MUSIC_STANDARD",
Eac3AtmosDynamicRangeCompressionRf::None => "NONE",
Eac3AtmosDynamicRangeCompressionRf::Speech => "SPEECH",
Eac3AtmosDynamicRangeCompressionRf::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FILM_LIGHT",
"FILM_STANDARD",
"MUSIC_LIGHT",
"MUSIC_STANDARD",
"NONE",
"SPEECH",
]
}
}
impl AsRef<str> for Eac3AtmosDynamicRangeCompressionRf {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the Dolby dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby stream for the line operating mode. Default value: Film light (ATMOS_STORAGE_DDP_COMPR_FILM_LIGHT) Related setting: To have MediaConvert use the value you specify here, keep the default value, Custom (SPECIFIED) for the setting Dynamic range control (DynamicRangeControl). Otherwise, MediaConvert ignores Dynamic range compression line (DynamicRangeCompressionLine). For information about the Dolby DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosDynamicRangeCompressionLine {
#[allow(missing_docs)] // documentation missing in model
FilmLight,
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
MusicLight,
#[allow(missing_docs)] // documentation missing in model
MusicStandard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Speech,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosDynamicRangeCompressionLine {
fn from(s: &str) -> Self {
match s {
"FILM_LIGHT" => Eac3AtmosDynamicRangeCompressionLine::FilmLight,
"FILM_STANDARD" => Eac3AtmosDynamicRangeCompressionLine::FilmStandard,
"MUSIC_LIGHT" => Eac3AtmosDynamicRangeCompressionLine::MusicLight,
"MUSIC_STANDARD" => Eac3AtmosDynamicRangeCompressionLine::MusicStandard,
"NONE" => Eac3AtmosDynamicRangeCompressionLine::None,
"SPEECH" => Eac3AtmosDynamicRangeCompressionLine::Speech,
other => Eac3AtmosDynamicRangeCompressionLine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosDynamicRangeCompressionLine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosDynamicRangeCompressionLine::from(s))
}
}
impl Eac3AtmosDynamicRangeCompressionLine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosDynamicRangeCompressionLine::FilmLight => "FILM_LIGHT",
Eac3AtmosDynamicRangeCompressionLine::FilmStandard => "FILM_STANDARD",
Eac3AtmosDynamicRangeCompressionLine::MusicLight => "MUSIC_LIGHT",
Eac3AtmosDynamicRangeCompressionLine::MusicStandard => "MUSIC_STANDARD",
Eac3AtmosDynamicRangeCompressionLine::None => "NONE",
Eac3AtmosDynamicRangeCompressionLine::Speech => "SPEECH",
Eac3AtmosDynamicRangeCompressionLine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FILM_LIGHT",
"FILM_STANDARD",
"MUSIC_LIGHT",
"MUSIC_STANDARD",
"NONE",
"SPEECH",
]
}
}
impl AsRef<str> for Eac3AtmosDynamicRangeCompressionLine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether MediaConvert should use any downmix metadata from your input file. Keep the default value, Custom (SPECIFIED) to provide downmix values in your job settings. Choose Follow source (INITIALIZE_FROM_SOURCE) to use the metadata from your input. Related settings--Use these settings to specify your downmix values: Left only/Right only surround (LoRoSurroundMixLevel), Left total/Right total surround (LtRtSurroundMixLevel), Left total/Right total center (LtRtCenterMixLevel), Left only/Right only center (LoRoCenterMixLevel), and Stereo downmix (StereoDownmix). When you keep Custom (SPECIFIED) for Downmix control (DownmixControl) and you don't specify values for the related settings, MediaConvert uses default values for those settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosDownmixControl {
#[allow(missing_docs)] // documentation missing in model
InitializeFromSource,
#[allow(missing_docs)] // documentation missing in model
Specified,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosDownmixControl {
fn from(s: &str) -> Self {
match s {
"INITIALIZE_FROM_SOURCE" => Eac3AtmosDownmixControl::InitializeFromSource,
"SPECIFIED" => Eac3AtmosDownmixControl::Specified,
other => Eac3AtmosDownmixControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosDownmixControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosDownmixControl::from(s))
}
}
impl Eac3AtmosDownmixControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosDownmixControl::InitializeFromSource => "INITIALIZE_FROM_SOURCE",
Eac3AtmosDownmixControl::Specified => "SPECIFIED",
Eac3AtmosDownmixControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INITIALIZE_FROM_SOURCE", "SPECIFIED"]
}
}
impl AsRef<str> for Eac3AtmosDownmixControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable Dolby Dialogue Intelligence to adjust loudness based on dialogue analysis.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosDialogueIntelligence {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosDialogueIntelligence {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Eac3AtmosDialogueIntelligence::Disabled,
"ENABLED" => Eac3AtmosDialogueIntelligence::Enabled,
other => Eac3AtmosDialogueIntelligence::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosDialogueIntelligence {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosDialogueIntelligence::from(s))
}
}
impl Eac3AtmosDialogueIntelligence {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosDialogueIntelligence::Disabled => "DISABLED",
Eac3AtmosDialogueIntelligence::Enabled => "ENABLED",
Eac3AtmosDialogueIntelligence::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Eac3AtmosDialogueIntelligence {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The coding mode for Dolby Digital Plus JOC (Atmos).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosCodingMode {
#[allow(missing_docs)] // documentation missing in model
CodingMode514,
#[allow(missing_docs)] // documentation missing in model
CodingMode714,
#[allow(missing_docs)] // documentation missing in model
CodingMode916,
#[allow(missing_docs)] // documentation missing in model
CodingModeAuto,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosCodingMode {
fn from(s: &str) -> Self {
match s {
"CODING_MODE_5_1_4" => Eac3AtmosCodingMode::CodingMode514,
"CODING_MODE_7_1_4" => Eac3AtmosCodingMode::CodingMode714,
"CODING_MODE_9_1_6" => Eac3AtmosCodingMode::CodingMode916,
"CODING_MODE_AUTO" => Eac3AtmosCodingMode::CodingModeAuto,
other => Eac3AtmosCodingMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosCodingMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosCodingMode::from(s))
}
}
impl Eac3AtmosCodingMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosCodingMode::CodingMode514 => "CODING_MODE_5_1_4",
Eac3AtmosCodingMode::CodingMode714 => "CODING_MODE_7_1_4",
Eac3AtmosCodingMode::CodingMode916 => "CODING_MODE_9_1_6",
Eac3AtmosCodingMode::CodingModeAuto => "CODING_MODE_AUTO",
Eac3AtmosCodingMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"CODING_MODE_5_1_4",
"CODING_MODE_7_1_4",
"CODING_MODE_9_1_6",
"CODING_MODE_AUTO",
]
}
}
impl AsRef<str> for Eac3AtmosCodingMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the bitstream mode for the E-AC-3 stream that the encoder emits. For more information about the EAC3 bitstream mode, see ATSC A/52-2012 (Annex E).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Eac3AtmosBitstreamMode {
#[allow(missing_docs)] // documentation missing in model
CompleteMain,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Eac3AtmosBitstreamMode {
fn from(s: &str) -> Self {
match s {
"COMPLETE_MAIN" => Eac3AtmosBitstreamMode::CompleteMain,
other => Eac3AtmosBitstreamMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Eac3AtmosBitstreamMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Eac3AtmosBitstreamMode::from(s))
}
}
impl Eac3AtmosBitstreamMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Eac3AtmosBitstreamMode::CompleteMain => "COMPLETE_MAIN",
Eac3AtmosBitstreamMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["COMPLETE_MAIN"]
}
}
impl AsRef<str> for Eac3AtmosBitstreamMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the audio codec for this output. Note that the option Dolby Digital passthrough (PASSTHROUGH) applies only to Dolby Digital and Dolby Digital Plus audio inputs. Make sure that you choose a codec that's supported with your output container: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#reference-codecs-containers-output-audio For audio-only outputs, make sure that both your input audio codec and your output audio codec are supported for audio-only workflows. For more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers-input.html#reference-codecs-containers-input-audio-only and https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html#audio-only-output
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioCodec {
#[allow(missing_docs)] // documentation missing in model
Aac,
#[allow(missing_docs)] // documentation missing in model
Ac3,
#[allow(missing_docs)] // documentation missing in model
Aiff,
#[allow(missing_docs)] // documentation missing in model
Eac3,
#[allow(missing_docs)] // documentation missing in model
Eac3Atmos,
#[allow(missing_docs)] // documentation missing in model
Mp2,
#[allow(missing_docs)] // documentation missing in model
Mp3,
#[allow(missing_docs)] // documentation missing in model
Opus,
#[allow(missing_docs)] // documentation missing in model
Passthrough,
#[allow(missing_docs)] // documentation missing in model
Vorbis,
#[allow(missing_docs)] // documentation missing in model
Wav,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioCodec {
fn from(s: &str) -> Self {
match s {
"AAC" => AudioCodec::Aac,
"AC3" => AudioCodec::Ac3,
"AIFF" => AudioCodec::Aiff,
"EAC3" => AudioCodec::Eac3,
"EAC3_ATMOS" => AudioCodec::Eac3Atmos,
"MP2" => AudioCodec::Mp2,
"MP3" => AudioCodec::Mp3,
"OPUS" => AudioCodec::Opus,
"PASSTHROUGH" => AudioCodec::Passthrough,
"VORBIS" => AudioCodec::Vorbis,
"WAV" => AudioCodec::Wav,
other => AudioCodec::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioCodec {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioCodec::from(s))
}
}
impl AudioCodec {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioCodec::Aac => "AAC",
AudioCodec::Ac3 => "AC3",
AudioCodec::Aiff => "AIFF",
AudioCodec::Eac3 => "EAC3",
AudioCodec::Eac3Atmos => "EAC3_ATMOS",
AudioCodec::Mp2 => "MP2",
AudioCodec::Mp3 => "MP3",
AudioCodec::Opus => "OPUS",
AudioCodec::Passthrough => "PASSTHROUGH",
AudioCodec::Vorbis => "VORBIS",
AudioCodec::Wav => "WAV",
AudioCodec::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AAC",
"AC3",
"AIFF",
"EAC3",
"EAC3_ATMOS",
"MP2",
"MP3",
"OPUS",
"PASSTHROUGH",
"VORBIS",
"WAV",
]
}
}
impl AsRef<str> for AudioCodec {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AIFF.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AiffSettings {
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub bit_depth: i32,
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub channels: i32,
/// Sample rate in hz.
pub sample_rate: i32,
}
impl AiffSettings {
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub fn bit_depth(&self) -> i32 {
self.bit_depth
}
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub fn channels(&self) -> i32 {
self.channels
}
/// Sample rate in hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
}
impl std::fmt::Debug for AiffSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AiffSettings");
formatter.field("bit_depth", &self.bit_depth);
formatter.field("channels", &self.channels);
formatter.field("sample_rate", &self.sample_rate);
formatter.finish()
}
}
/// See [`AiffSettings`](crate::model::AiffSettings)
pub mod aiff_settings {
/// A builder for [`AiffSettings`](crate::model::AiffSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bit_depth: std::option::Option<i32>,
pub(crate) channels: std::option::Option<i32>,
pub(crate) sample_rate: std::option::Option<i32>,
}
impl Builder {
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub fn bit_depth(mut self, input: i32) -> Self {
self.bit_depth = Some(input);
self
}
/// Specify Bit depth (BitDepth), in bits per sample, to choose the encoding quality for this audio track.
pub fn set_bit_depth(mut self, input: std::option::Option<i32>) -> Self {
self.bit_depth = input;
self
}
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Specify the number of channels in this output audio track. Valid values are 1 and even numbers up to 64. For example, 1, 2, 4, 6, and so on, up to 64.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// Sample rate in hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Sample rate in hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Consumes the builder and constructs a [`AiffSettings`](crate::model::AiffSettings)
pub fn build(self) -> crate::model::AiffSettings {
crate::model::AiffSettings {
bit_depth: self.bit_depth.unwrap_or_default(),
channels: self.channels.unwrap_or_default(),
sample_rate: self.sample_rate.unwrap_or_default(),
}
}
}
}
impl AiffSettings {
/// Creates a new builder-style object to manufacture [`AiffSettings`](crate::model::AiffSettings)
pub fn builder() -> crate::model::aiff_settings::Builder {
crate::model::aiff_settings::Builder::default()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AC3.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Ac3Settings {
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub bitrate: i32,
/// Specify the bitstream mode for the AC-3 stream that the encoder emits. For more information about the AC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub bitstream_mode: std::option::Option<crate::model::Ac3BitstreamMode>,
/// Dolby Digital coding mode. Determines number of channels.
pub coding_mode: std::option::Option<crate::model::Ac3CodingMode>,
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital, dialnorm will be passed through.
pub dialnorm: i32,
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub dynamic_range_compression_line:
std::option::Option<crate::model::Ac3DynamicRangeCompressionLine>,
/// When you want to add Dolby dynamic range compression (DRC) signaling to your output stream, we recommend that you use the mode-specific settings instead of Dynamic range compression profile (DynamicRangeCompressionProfile). The mode-specific settings are Dynamic range compression profile, line mode (dynamicRangeCompressionLine) and Dynamic range compression profile, RF mode (dynamicRangeCompressionRf). Note that when you specify values for all three settings, MediaConvert ignores the value of this setting in favor of the mode-specific settings. If you do use this setting instead of the mode-specific settings, choose None (NONE) to leave out DRC signaling. Keep the default Film standard (FILM_STANDARD) to set the profile to Dolby's film standard profile for all operating modes.
pub dynamic_range_compression_profile:
std::option::Option<crate::model::Ac3DynamicRangeCompressionProfile>,
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub dynamic_range_compression_rf:
std::option::Option<crate::model::Ac3DynamicRangeCompressionRf>,
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub lfe_filter: std::option::Option<crate::model::Ac3LfeFilter>,
/// When set to FOLLOW_INPUT, 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.
pub metadata_control: std::option::Option<crate::model::Ac3MetadataControl>,
/// This value is always 48000. It represents the sample rate in Hz.
pub sample_rate: i32,
}
impl Ac3Settings {
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// Specify the bitstream mode for the AC-3 stream that the encoder emits. For more information about the AC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn bitstream_mode(&self) -> std::option::Option<&crate::model::Ac3BitstreamMode> {
self.bitstream_mode.as_ref()
}
/// Dolby Digital coding mode. Determines number of channels.
pub fn coding_mode(&self) -> std::option::Option<&crate::model::Ac3CodingMode> {
self.coding_mode.as_ref()
}
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital, dialnorm will be passed through.
pub fn dialnorm(&self) -> i32 {
self.dialnorm
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_line(
&self,
) -> std::option::Option<&crate::model::Ac3DynamicRangeCompressionLine> {
self.dynamic_range_compression_line.as_ref()
}
/// When you want to add Dolby dynamic range compression (DRC) signaling to your output stream, we recommend that you use the mode-specific settings instead of Dynamic range compression profile (DynamicRangeCompressionProfile). The mode-specific settings are Dynamic range compression profile, line mode (dynamicRangeCompressionLine) and Dynamic range compression profile, RF mode (dynamicRangeCompressionRf). Note that when you specify values for all three settings, MediaConvert ignores the value of this setting in favor of the mode-specific settings. If you do use this setting instead of the mode-specific settings, choose None (NONE) to leave out DRC signaling. Keep the default Film standard (FILM_STANDARD) to set the profile to Dolby's film standard profile for all operating modes.
pub fn dynamic_range_compression_profile(
&self,
) -> std::option::Option<&crate::model::Ac3DynamicRangeCompressionProfile> {
self.dynamic_range_compression_profile.as_ref()
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_rf(
&self,
) -> std::option::Option<&crate::model::Ac3DynamicRangeCompressionRf> {
self.dynamic_range_compression_rf.as_ref()
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub fn lfe_filter(&self) -> std::option::Option<&crate::model::Ac3LfeFilter> {
self.lfe_filter.as_ref()
}
/// When set to FOLLOW_INPUT, 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.
pub fn metadata_control(&self) -> std::option::Option<&crate::model::Ac3MetadataControl> {
self.metadata_control.as_ref()
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
}
impl std::fmt::Debug for Ac3Settings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Ac3Settings");
formatter.field("bitrate", &self.bitrate);
formatter.field("bitstream_mode", &self.bitstream_mode);
formatter.field("coding_mode", &self.coding_mode);
formatter.field("dialnorm", &self.dialnorm);
formatter.field(
"dynamic_range_compression_line",
&self.dynamic_range_compression_line,
);
formatter.field(
"dynamic_range_compression_profile",
&self.dynamic_range_compression_profile,
);
formatter.field(
"dynamic_range_compression_rf",
&self.dynamic_range_compression_rf,
);
formatter.field("lfe_filter", &self.lfe_filter);
formatter.field("metadata_control", &self.metadata_control);
formatter.field("sample_rate", &self.sample_rate);
formatter.finish()
}
}
/// See [`Ac3Settings`](crate::model::Ac3Settings)
pub mod ac3_settings {
/// A builder for [`Ac3Settings`](crate::model::Ac3Settings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) bitstream_mode: std::option::Option<crate::model::Ac3BitstreamMode>,
pub(crate) coding_mode: std::option::Option<crate::model::Ac3CodingMode>,
pub(crate) dialnorm: std::option::Option<i32>,
pub(crate) dynamic_range_compression_line:
std::option::Option<crate::model::Ac3DynamicRangeCompressionLine>,
pub(crate) dynamic_range_compression_profile:
std::option::Option<crate::model::Ac3DynamicRangeCompressionProfile>,
pub(crate) dynamic_range_compression_rf:
std::option::Option<crate::model::Ac3DynamicRangeCompressionRf>,
pub(crate) lfe_filter: std::option::Option<crate::model::Ac3LfeFilter>,
pub(crate) metadata_control: std::option::Option<crate::model::Ac3MetadataControl>,
pub(crate) sample_rate: std::option::Option<i32>,
}
impl Builder {
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second. Valid bitrates depend on the coding mode.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// Specify the bitstream mode for the AC-3 stream that the encoder emits. For more information about the AC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn bitstream_mode(mut self, input: crate::model::Ac3BitstreamMode) -> Self {
self.bitstream_mode = Some(input);
self
}
/// Specify the bitstream mode for the AC-3 stream that the encoder emits. For more information about the AC3 bitstream mode, see ATSC A/52-2012 (Annex E).
pub fn set_bitstream_mode(
mut self,
input: std::option::Option<crate::model::Ac3BitstreamMode>,
) -> Self {
self.bitstream_mode = input;
self
}
/// Dolby Digital coding mode. Determines number of channels.
pub fn coding_mode(mut self, input: crate::model::Ac3CodingMode) -> Self {
self.coding_mode = Some(input);
self
}
/// Dolby Digital coding mode. Determines number of channels.
pub fn set_coding_mode(
mut self,
input: std::option::Option<crate::model::Ac3CodingMode>,
) -> Self {
self.coding_mode = input;
self
}
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital, dialnorm will be passed through.
pub fn dialnorm(mut self, input: i32) -> Self {
self.dialnorm = Some(input);
self
}
/// Sets the dialnorm for the output. If blank and input audio is Dolby Digital, dialnorm will be passed through.
pub fn set_dialnorm(mut self, input: std::option::Option<i32>) -> Self {
self.dialnorm = input;
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_line(
mut self,
input: crate::model::Ac3DynamicRangeCompressionLine,
) -> Self {
self.dynamic_range_compression_line = Some(input);
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn set_dynamic_range_compression_line(
mut self,
input: std::option::Option<crate::model::Ac3DynamicRangeCompressionLine>,
) -> Self {
self.dynamic_range_compression_line = input;
self
}
/// When you want to add Dolby dynamic range compression (DRC) signaling to your output stream, we recommend that you use the mode-specific settings instead of Dynamic range compression profile (DynamicRangeCompressionProfile). The mode-specific settings are Dynamic range compression profile, line mode (dynamicRangeCompressionLine) and Dynamic range compression profile, RF mode (dynamicRangeCompressionRf). Note that when you specify values for all three settings, MediaConvert ignores the value of this setting in favor of the mode-specific settings. If you do use this setting instead of the mode-specific settings, choose None (NONE) to leave out DRC signaling. Keep the default Film standard (FILM_STANDARD) to set the profile to Dolby's film standard profile for all operating modes.
pub fn dynamic_range_compression_profile(
mut self,
input: crate::model::Ac3DynamicRangeCompressionProfile,
) -> Self {
self.dynamic_range_compression_profile = Some(input);
self
}
/// When you want to add Dolby dynamic range compression (DRC) signaling to your output stream, we recommend that you use the mode-specific settings instead of Dynamic range compression profile (DynamicRangeCompressionProfile). The mode-specific settings are Dynamic range compression profile, line mode (dynamicRangeCompressionLine) and Dynamic range compression profile, RF mode (dynamicRangeCompressionRf). Note that when you specify values for all three settings, MediaConvert ignores the value of this setting in favor of the mode-specific settings. If you do use this setting instead of the mode-specific settings, choose None (NONE) to leave out DRC signaling. Keep the default Film standard (FILM_STANDARD) to set the profile to Dolby's film standard profile for all operating modes.
pub fn set_dynamic_range_compression_profile(
mut self,
input: std::option::Option<crate::model::Ac3DynamicRangeCompressionProfile>,
) -> Self {
self.dynamic_range_compression_profile = input;
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn dynamic_range_compression_rf(
mut self,
input: crate::model::Ac3DynamicRangeCompressionRf,
) -> Self {
self.dynamic_range_compression_rf = Some(input);
self
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
pub fn set_dynamic_range_compression_rf(
mut self,
input: std::option::Option<crate::model::Ac3DynamicRangeCompressionRf>,
) -> Self {
self.dynamic_range_compression_rf = input;
self
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub fn lfe_filter(mut self, input: crate::model::Ac3LfeFilter) -> Self {
self.lfe_filter = Some(input);
self
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
pub fn set_lfe_filter(
mut self,
input: std::option::Option<crate::model::Ac3LfeFilter>,
) -> Self {
self.lfe_filter = input;
self
}
/// When set to FOLLOW_INPUT, 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.
pub fn metadata_control(mut self, input: crate::model::Ac3MetadataControl) -> Self {
self.metadata_control = Some(input);
self
}
/// When set to FOLLOW_INPUT, 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.
pub fn set_metadata_control(
mut self,
input: std::option::Option<crate::model::Ac3MetadataControl>,
) -> Self {
self.metadata_control = input;
self
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// This value is always 48000. It represents the sample rate in Hz.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Consumes the builder and constructs a [`Ac3Settings`](crate::model::Ac3Settings)
pub fn build(self) -> crate::model::Ac3Settings {
crate::model::Ac3Settings {
bitrate: self.bitrate.unwrap_or_default(),
bitstream_mode: self.bitstream_mode,
coding_mode: self.coding_mode,
dialnorm: self.dialnorm.unwrap_or_default(),
dynamic_range_compression_line: self.dynamic_range_compression_line,
dynamic_range_compression_profile: self.dynamic_range_compression_profile,
dynamic_range_compression_rf: self.dynamic_range_compression_rf,
lfe_filter: self.lfe_filter,
metadata_control: self.metadata_control,
sample_rate: self.sample_rate.unwrap_or_default(),
}
}
}
}
impl Ac3Settings {
/// Creates a new builder-style object to manufacture [`Ac3Settings`](crate::model::Ac3Settings)
pub fn builder() -> crate::model::ac3_settings::Builder {
crate::model::ac3_settings::Builder::default()
}
}
/// When set to FOLLOW_INPUT, 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3MetadataControl {
#[allow(missing_docs)] // documentation missing in model
FollowInput,
#[allow(missing_docs)] // documentation missing in model
UseConfigured,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3MetadataControl {
fn from(s: &str) -> Self {
match s {
"FOLLOW_INPUT" => Ac3MetadataControl::FollowInput,
"USE_CONFIGURED" => Ac3MetadataControl::UseConfigured,
other => Ac3MetadataControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3MetadataControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3MetadataControl::from(s))
}
}
impl Ac3MetadataControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3MetadataControl::FollowInput => "FOLLOW_INPUT",
Ac3MetadataControl::UseConfigured => "USE_CONFIGURED",
Ac3MetadataControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_INPUT", "USE_CONFIGURED"]
}
}
impl AsRef<str> for Ac3MetadataControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only valid with 3_2_LFE coding mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3LfeFilter {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3LfeFilter {
fn from(s: &str) -> Self {
match s {
"DISABLED" => Ac3LfeFilter::Disabled,
"ENABLED" => Ac3LfeFilter::Enabled,
other => Ac3LfeFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3LfeFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3LfeFilter::from(s))
}
}
impl Ac3LfeFilter {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3LfeFilter::Disabled => "DISABLED",
Ac3LfeFilter::Enabled => "ENABLED",
Ac3LfeFilter::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for Ac3LfeFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the RF operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3DynamicRangeCompressionRf {
#[allow(missing_docs)] // documentation missing in model
FilmLight,
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
MusicLight,
#[allow(missing_docs)] // documentation missing in model
MusicStandard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Speech,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3DynamicRangeCompressionRf {
fn from(s: &str) -> Self {
match s {
"FILM_LIGHT" => Ac3DynamicRangeCompressionRf::FilmLight,
"FILM_STANDARD" => Ac3DynamicRangeCompressionRf::FilmStandard,
"MUSIC_LIGHT" => Ac3DynamicRangeCompressionRf::MusicLight,
"MUSIC_STANDARD" => Ac3DynamicRangeCompressionRf::MusicStandard,
"NONE" => Ac3DynamicRangeCompressionRf::None,
"SPEECH" => Ac3DynamicRangeCompressionRf::Speech,
other => Ac3DynamicRangeCompressionRf::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3DynamicRangeCompressionRf {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3DynamicRangeCompressionRf::from(s))
}
}
impl Ac3DynamicRangeCompressionRf {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3DynamicRangeCompressionRf::FilmLight => "FILM_LIGHT",
Ac3DynamicRangeCompressionRf::FilmStandard => "FILM_STANDARD",
Ac3DynamicRangeCompressionRf::MusicLight => "MUSIC_LIGHT",
Ac3DynamicRangeCompressionRf::MusicStandard => "MUSIC_STANDARD",
Ac3DynamicRangeCompressionRf::None => "NONE",
Ac3DynamicRangeCompressionRf::Speech => "SPEECH",
Ac3DynamicRangeCompressionRf::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FILM_LIGHT",
"FILM_STANDARD",
"MUSIC_LIGHT",
"MUSIC_STANDARD",
"NONE",
"SPEECH",
]
}
}
impl AsRef<str> for Ac3DynamicRangeCompressionRf {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you want to add Dolby dynamic range compression (DRC) signaling to your output stream, we recommend that you use the mode-specific settings instead of Dynamic range compression profile (DynamicRangeCompressionProfile). The mode-specific settings are Dynamic range compression profile, line mode (dynamicRangeCompressionLine) and Dynamic range compression profile, RF mode (dynamicRangeCompressionRf). Note that when you specify values for all three settings, MediaConvert ignores the value of this setting in favor of the mode-specific settings. If you do use this setting instead of the mode-specific settings, choose None (NONE) to leave out DRC signaling. Keep the default Film standard (FILM_STANDARD) to set the profile to Dolby's film standard profile for all operating modes.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3DynamicRangeCompressionProfile {
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3DynamicRangeCompressionProfile {
fn from(s: &str) -> Self {
match s {
"FILM_STANDARD" => Ac3DynamicRangeCompressionProfile::FilmStandard,
"NONE" => Ac3DynamicRangeCompressionProfile::None,
other => Ac3DynamicRangeCompressionProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3DynamicRangeCompressionProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3DynamicRangeCompressionProfile::from(s))
}
}
impl Ac3DynamicRangeCompressionProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3DynamicRangeCompressionProfile::FilmStandard => "FILM_STANDARD",
Ac3DynamicRangeCompressionProfile::None => "NONE",
Ac3DynamicRangeCompressionProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FILM_STANDARD", "NONE"]
}
}
impl AsRef<str> for Ac3DynamicRangeCompressionProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the Dolby Digital dynamic range control (DRC) profile that MediaConvert uses when encoding the metadata in the Dolby Digital stream for the line operating mode. Related setting: When you use this setting, MediaConvert ignores any value you provide for Dynamic range compression profile (DynamicRangeCompressionProfile). For information about the Dolby Digital DRC operating modes and profiles, see the Dynamic Range Control chapter of the Dolby Metadata Guide at https://developer.dolby.com/globalassets/professional/documents/dolby-metadata-guide.pdf.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3DynamicRangeCompressionLine {
#[allow(missing_docs)] // documentation missing in model
FilmLight,
#[allow(missing_docs)] // documentation missing in model
FilmStandard,
#[allow(missing_docs)] // documentation missing in model
MusicLight,
#[allow(missing_docs)] // documentation missing in model
MusicStandard,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Speech,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3DynamicRangeCompressionLine {
fn from(s: &str) -> Self {
match s {
"FILM_LIGHT" => Ac3DynamicRangeCompressionLine::FilmLight,
"FILM_STANDARD" => Ac3DynamicRangeCompressionLine::FilmStandard,
"MUSIC_LIGHT" => Ac3DynamicRangeCompressionLine::MusicLight,
"MUSIC_STANDARD" => Ac3DynamicRangeCompressionLine::MusicStandard,
"NONE" => Ac3DynamicRangeCompressionLine::None,
"SPEECH" => Ac3DynamicRangeCompressionLine::Speech,
other => Ac3DynamicRangeCompressionLine::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3DynamicRangeCompressionLine {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3DynamicRangeCompressionLine::from(s))
}
}
impl Ac3DynamicRangeCompressionLine {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3DynamicRangeCompressionLine::FilmLight => "FILM_LIGHT",
Ac3DynamicRangeCompressionLine::FilmStandard => "FILM_STANDARD",
Ac3DynamicRangeCompressionLine::MusicLight => "MUSIC_LIGHT",
Ac3DynamicRangeCompressionLine::MusicStandard => "MUSIC_STANDARD",
Ac3DynamicRangeCompressionLine::None => "NONE",
Ac3DynamicRangeCompressionLine::Speech => "SPEECH",
Ac3DynamicRangeCompressionLine::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"FILM_LIGHT",
"FILM_STANDARD",
"MUSIC_LIGHT",
"MUSIC_STANDARD",
"NONE",
"SPEECH",
]
}
}
impl AsRef<str> for Ac3DynamicRangeCompressionLine {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Dolby Digital coding mode. Determines number of channels.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3CodingMode {
#[allow(missing_docs)] // documentation missing in model
CodingMode10,
#[allow(missing_docs)] // documentation missing in model
CodingMode11,
#[allow(missing_docs)] // documentation missing in model
CodingMode20,
#[allow(missing_docs)] // documentation missing in model
CodingMode32Lfe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3CodingMode {
fn from(s: &str) -> Self {
match s {
"CODING_MODE_1_0" => Ac3CodingMode::CodingMode10,
"CODING_MODE_1_1" => Ac3CodingMode::CodingMode11,
"CODING_MODE_2_0" => Ac3CodingMode::CodingMode20,
"CODING_MODE_3_2_LFE" => Ac3CodingMode::CodingMode32Lfe,
other => Ac3CodingMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3CodingMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3CodingMode::from(s))
}
}
impl Ac3CodingMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3CodingMode::CodingMode10 => "CODING_MODE_1_0",
Ac3CodingMode::CodingMode11 => "CODING_MODE_1_1",
Ac3CodingMode::CodingMode20 => "CODING_MODE_2_0",
Ac3CodingMode::CodingMode32Lfe => "CODING_MODE_3_2_LFE",
Ac3CodingMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"CODING_MODE_1_0",
"CODING_MODE_1_1",
"CODING_MODE_2_0",
"CODING_MODE_3_2_LFE",
]
}
}
impl AsRef<str> for Ac3CodingMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the bitstream mode for the AC-3 stream that the encoder emits. For more information about the AC3 bitstream mode, see ATSC A/52-2012 (Annex E).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Ac3BitstreamMode {
#[allow(missing_docs)] // documentation missing in model
Commentary,
#[allow(missing_docs)] // documentation missing in model
CompleteMain,
#[allow(missing_docs)] // documentation missing in model
Dialogue,
#[allow(missing_docs)] // documentation missing in model
Emergency,
#[allow(missing_docs)] // documentation missing in model
HearingImpaired,
#[allow(missing_docs)] // documentation missing in model
MusicAndEffects,
#[allow(missing_docs)] // documentation missing in model
VisuallyImpaired,
#[allow(missing_docs)] // documentation missing in model
VoiceOver,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Ac3BitstreamMode {
fn from(s: &str) -> Self {
match s {
"COMMENTARY" => Ac3BitstreamMode::Commentary,
"COMPLETE_MAIN" => Ac3BitstreamMode::CompleteMain,
"DIALOGUE" => Ac3BitstreamMode::Dialogue,
"EMERGENCY" => Ac3BitstreamMode::Emergency,
"HEARING_IMPAIRED" => Ac3BitstreamMode::HearingImpaired,
"MUSIC_AND_EFFECTS" => Ac3BitstreamMode::MusicAndEffects,
"VISUALLY_IMPAIRED" => Ac3BitstreamMode::VisuallyImpaired,
"VOICE_OVER" => Ac3BitstreamMode::VoiceOver,
other => Ac3BitstreamMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Ac3BitstreamMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Ac3BitstreamMode::from(s))
}
}
impl Ac3BitstreamMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Ac3BitstreamMode::Commentary => "COMMENTARY",
Ac3BitstreamMode::CompleteMain => "COMPLETE_MAIN",
Ac3BitstreamMode::Dialogue => "DIALOGUE",
Ac3BitstreamMode::Emergency => "EMERGENCY",
Ac3BitstreamMode::HearingImpaired => "HEARING_IMPAIRED",
Ac3BitstreamMode::MusicAndEffects => "MUSIC_AND_EFFECTS",
Ac3BitstreamMode::VisuallyImpaired => "VISUALLY_IMPAIRED",
Ac3BitstreamMode::VoiceOver => "VOICE_OVER",
Ac3BitstreamMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"COMMENTARY",
"COMPLETE_MAIN",
"DIALOGUE",
"EMERGENCY",
"HEARING_IMPAIRED",
"MUSIC_AND_EFFECTS",
"VISUALLY_IMPAIRED",
"VOICE_OVER",
]
}
}
impl AsRef<str> for Ac3BitstreamMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to the value AAC. The service accepts one of two mutually exclusive groups of AAC settings--VBR and CBR. To select one of these modes, set the value of Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you control the audio quality with the setting VBR quality (vbrQuality). In CBR mode, you use the setting Bitrate (bitrate). Defaults and valid values depend on the rate control mode.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AacSettings {
/// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio + audio description (AD) as a stereo pair. The value for AudioType will be set to 3, which signals to downstream systems that this stream contains "broadcaster mixed AD". Note that the input received by the encoder must contain pre-mixed audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any values you provide in AudioType and FollowInputAudioType. Choose NORMAL when the input does not contain pre-mixed audio + audio description (AD). In this case, the encoder will use any values you provide for AudioType and FollowInputAudioType.
pub audio_description_broadcaster_mix:
std::option::Option<crate::model::AacAudioDescriptionBroadcasterMix>,
/// Specify the average bitrate in bits per second. The set of valid values for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is also constrained by the values that you choose for Profile (codecProfile), Bitrate control mode (codingMode), and Sample rate (sampleRate). Default values depend on Bitrate control mode and Profile.
pub bitrate: i32,
/// AAC Profile.
pub codec_profile: std::option::Option<crate::model::AacCodecProfile>,
/// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control mode and profile. "1.0 - Audio Description (Receiver Mix)" setting receives a stereo description plus control track and emits a mono AAC encode of the description track, with control data emitted in the PES header as per ETSI TS 101 154 Annex E.
pub coding_mode: std::option::Option<crate::model::AacCodingMode>,
/// Rate Control Mode.
pub rate_control_mode: std::option::Option<crate::model::AacRateControlMode>,
/// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, you must choose "No container" for the output container.
pub raw_format: std::option::Option<crate::model::AacRawFormat>,
/// Sample rate in Hz. Valid values depend on rate control mode and profile.
pub sample_rate: i32,
/// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream containers.
pub specification: std::option::Option<crate::model::AacSpecification>,
/// VBR Quality Level - Only used if rate_control_mode is VBR.
pub vbr_quality: std::option::Option<crate::model::AacVbrQuality>,
}
impl AacSettings {
/// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio + audio description (AD) as a stereo pair. The value for AudioType will be set to 3, which signals to downstream systems that this stream contains "broadcaster mixed AD". Note that the input received by the encoder must contain pre-mixed audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any values you provide in AudioType and FollowInputAudioType. Choose NORMAL when the input does not contain pre-mixed audio + audio description (AD). In this case, the encoder will use any values you provide for AudioType and FollowInputAudioType.
pub fn audio_description_broadcaster_mix(
&self,
) -> std::option::Option<&crate::model::AacAudioDescriptionBroadcasterMix> {
self.audio_description_broadcaster_mix.as_ref()
}
/// Specify the average bitrate in bits per second. The set of valid values for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is also constrained by the values that you choose for Profile (codecProfile), Bitrate control mode (codingMode), and Sample rate (sampleRate). Default values depend on Bitrate control mode and Profile.
pub fn bitrate(&self) -> i32 {
self.bitrate
}
/// AAC Profile.
pub fn codec_profile(&self) -> std::option::Option<&crate::model::AacCodecProfile> {
self.codec_profile.as_ref()
}
/// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control mode and profile. "1.0 - Audio Description (Receiver Mix)" setting receives a stereo description plus control track and emits a mono AAC encode of the description track, with control data emitted in the PES header as per ETSI TS 101 154 Annex E.
pub fn coding_mode(&self) -> std::option::Option<&crate::model::AacCodingMode> {
self.coding_mode.as_ref()
}
/// Rate Control Mode.
pub fn rate_control_mode(&self) -> std::option::Option<&crate::model::AacRateControlMode> {
self.rate_control_mode.as_ref()
}
/// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, you must choose "No container" for the output container.
pub fn raw_format(&self) -> std::option::Option<&crate::model::AacRawFormat> {
self.raw_format.as_ref()
}
/// Sample rate in Hz. Valid values depend on rate control mode and profile.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
/// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream containers.
pub fn specification(&self) -> std::option::Option<&crate::model::AacSpecification> {
self.specification.as_ref()
}
/// VBR Quality Level - Only used if rate_control_mode is VBR.
pub fn vbr_quality(&self) -> std::option::Option<&crate::model::AacVbrQuality> {
self.vbr_quality.as_ref()
}
}
impl std::fmt::Debug for AacSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AacSettings");
formatter.field(
"audio_description_broadcaster_mix",
&self.audio_description_broadcaster_mix,
);
formatter.field("bitrate", &self.bitrate);
formatter.field("codec_profile", &self.codec_profile);
formatter.field("coding_mode", &self.coding_mode);
formatter.field("rate_control_mode", &self.rate_control_mode);
formatter.field("raw_format", &self.raw_format);
formatter.field("sample_rate", &self.sample_rate);
formatter.field("specification", &self.specification);
formatter.field("vbr_quality", &self.vbr_quality);
formatter.finish()
}
}
/// See [`AacSettings`](crate::model::AacSettings)
pub mod aac_settings {
/// A builder for [`AacSettings`](crate::model::AacSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_description_broadcaster_mix:
std::option::Option<crate::model::AacAudioDescriptionBroadcasterMix>,
pub(crate) bitrate: std::option::Option<i32>,
pub(crate) codec_profile: std::option::Option<crate::model::AacCodecProfile>,
pub(crate) coding_mode: std::option::Option<crate::model::AacCodingMode>,
pub(crate) rate_control_mode: std::option::Option<crate::model::AacRateControlMode>,
pub(crate) raw_format: std::option::Option<crate::model::AacRawFormat>,
pub(crate) sample_rate: std::option::Option<i32>,
pub(crate) specification: std::option::Option<crate::model::AacSpecification>,
pub(crate) vbr_quality: std::option::Option<crate::model::AacVbrQuality>,
}
impl Builder {
/// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio + audio description (AD) as a stereo pair. The value for AudioType will be set to 3, which signals to downstream systems that this stream contains "broadcaster mixed AD". Note that the input received by the encoder must contain pre-mixed audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any values you provide in AudioType and FollowInputAudioType. Choose NORMAL when the input does not contain pre-mixed audio + audio description (AD). In this case, the encoder will use any values you provide for AudioType and FollowInputAudioType.
pub fn audio_description_broadcaster_mix(
mut self,
input: crate::model::AacAudioDescriptionBroadcasterMix,
) -> Self {
self.audio_description_broadcaster_mix = Some(input);
self
}
/// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio + audio description (AD) as a stereo pair. The value for AudioType will be set to 3, which signals to downstream systems that this stream contains "broadcaster mixed AD". Note that the input received by the encoder must contain pre-mixed audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any values you provide in AudioType and FollowInputAudioType. Choose NORMAL when the input does not contain pre-mixed audio + audio description (AD). In this case, the encoder will use any values you provide for AudioType and FollowInputAudioType.
pub fn set_audio_description_broadcaster_mix(
mut self,
input: std::option::Option<crate::model::AacAudioDescriptionBroadcasterMix>,
) -> Self {
self.audio_description_broadcaster_mix = input;
self
}
/// Specify the average bitrate in bits per second. The set of valid values for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is also constrained by the values that you choose for Profile (codecProfile), Bitrate control mode (codingMode), and Sample rate (sampleRate). Default values depend on Bitrate control mode and Profile.
pub fn bitrate(mut self, input: i32) -> Self {
self.bitrate = Some(input);
self
}
/// Specify the average bitrate in bits per second. The set of valid values for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is also constrained by the values that you choose for Profile (codecProfile), Bitrate control mode (codingMode), and Sample rate (sampleRate). Default values depend on Bitrate control mode and Profile.
pub fn set_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.bitrate = input;
self
}
/// AAC Profile.
pub fn codec_profile(mut self, input: crate::model::AacCodecProfile) -> Self {
self.codec_profile = Some(input);
self
}
/// AAC Profile.
pub fn set_codec_profile(
mut self,
input: std::option::Option<crate::model::AacCodecProfile>,
) -> Self {
self.codec_profile = input;
self
}
/// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control mode and profile. "1.0 - Audio Description (Receiver Mix)" setting receives a stereo description plus control track and emits a mono AAC encode of the description track, with control data emitted in the PES header as per ETSI TS 101 154 Annex E.
pub fn coding_mode(mut self, input: crate::model::AacCodingMode) -> Self {
self.coding_mode = Some(input);
self
}
/// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control mode and profile. "1.0 - Audio Description (Receiver Mix)" setting receives a stereo description plus control track and emits a mono AAC encode of the description track, with control data emitted in the PES header as per ETSI TS 101 154 Annex E.
pub fn set_coding_mode(
mut self,
input: std::option::Option<crate::model::AacCodingMode>,
) -> Self {
self.coding_mode = input;
self
}
/// Rate Control Mode.
pub fn rate_control_mode(mut self, input: crate::model::AacRateControlMode) -> Self {
self.rate_control_mode = Some(input);
self
}
/// Rate Control Mode.
pub fn set_rate_control_mode(
mut self,
input: std::option::Option<crate::model::AacRateControlMode>,
) -> Self {
self.rate_control_mode = input;
self
}
/// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, you must choose "No container" for the output container.
pub fn raw_format(mut self, input: crate::model::AacRawFormat) -> Self {
self.raw_format = Some(input);
self
}
/// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, you must choose "No container" for the output container.
pub fn set_raw_format(
mut self,
input: std::option::Option<crate::model::AacRawFormat>,
) -> Self {
self.raw_format = input;
self
}
/// Sample rate in Hz. Valid values depend on rate control mode and profile.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Sample rate in Hz. Valid values depend on rate control mode and profile.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream containers.
pub fn specification(mut self, input: crate::model::AacSpecification) -> Self {
self.specification = Some(input);
self
}
/// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream containers.
pub fn set_specification(
mut self,
input: std::option::Option<crate::model::AacSpecification>,
) -> Self {
self.specification = input;
self
}
/// VBR Quality Level - Only used if rate_control_mode is VBR.
pub fn vbr_quality(mut self, input: crate::model::AacVbrQuality) -> Self {
self.vbr_quality = Some(input);
self
}
/// VBR Quality Level - Only used if rate_control_mode is VBR.
pub fn set_vbr_quality(
mut self,
input: std::option::Option<crate::model::AacVbrQuality>,
) -> Self {
self.vbr_quality = input;
self
}
/// Consumes the builder and constructs a [`AacSettings`](crate::model::AacSettings)
pub fn build(self) -> crate::model::AacSettings {
crate::model::AacSettings {
audio_description_broadcaster_mix: self.audio_description_broadcaster_mix,
bitrate: self.bitrate.unwrap_or_default(),
codec_profile: self.codec_profile,
coding_mode: self.coding_mode,
rate_control_mode: self.rate_control_mode,
raw_format: self.raw_format,
sample_rate: self.sample_rate.unwrap_or_default(),
specification: self.specification,
vbr_quality: self.vbr_quality,
}
}
}
}
impl AacSettings {
/// Creates a new builder-style object to manufacture [`AacSettings`](crate::model::AacSettings)
pub fn builder() -> crate::model::aac_settings::Builder {
crate::model::aac_settings::Builder::default()
}
}
/// VBR Quality Level - Only used if rate_control_mode is VBR.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacVbrQuality {
#[allow(missing_docs)] // documentation missing in model
High,
#[allow(missing_docs)] // documentation missing in model
Low,
#[allow(missing_docs)] // documentation missing in model
MediumHigh,
#[allow(missing_docs)] // documentation missing in model
MediumLow,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacVbrQuality {
fn from(s: &str) -> Self {
match s {
"HIGH" => AacVbrQuality::High,
"LOW" => AacVbrQuality::Low,
"MEDIUM_HIGH" => AacVbrQuality::MediumHigh,
"MEDIUM_LOW" => AacVbrQuality::MediumLow,
other => AacVbrQuality::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacVbrQuality {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacVbrQuality::from(s))
}
}
impl AacVbrQuality {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacVbrQuality::High => "HIGH",
AacVbrQuality::Low => "LOW",
AacVbrQuality::MediumHigh => "MEDIUM_HIGH",
AacVbrQuality::MediumLow => "MEDIUM_LOW",
AacVbrQuality::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HIGH", "LOW", "MEDIUM_HIGH", "MEDIUM_LOW"]
}
}
impl AsRef<str> for AacVbrQuality {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream containers.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacSpecification {
#[allow(missing_docs)] // documentation missing in model
Mpeg2,
#[allow(missing_docs)] // documentation missing in model
Mpeg4,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacSpecification {
fn from(s: &str) -> Self {
match s {
"MPEG2" => AacSpecification::Mpeg2,
"MPEG4" => AacSpecification::Mpeg4,
other => AacSpecification::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacSpecification {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacSpecification::from(s))
}
}
impl AacSpecification {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacSpecification::Mpeg2 => "MPEG2",
AacSpecification::Mpeg4 => "MPEG4",
AacSpecification::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MPEG2", "MPEG4"]
}
}
impl AsRef<str> for AacSpecification {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, you must choose "No container" for the output container.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacRawFormat {
#[allow(missing_docs)] // documentation missing in model
LatmLoas,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacRawFormat {
fn from(s: &str) -> Self {
match s {
"LATM_LOAS" => AacRawFormat::LatmLoas,
"NONE" => AacRawFormat::None,
other => AacRawFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacRawFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacRawFormat::from(s))
}
}
impl AacRawFormat {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacRawFormat::LatmLoas => "LATM_LOAS",
AacRawFormat::None => "NONE",
AacRawFormat::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["LATM_LOAS", "NONE"]
}
}
impl AsRef<str> for AacRawFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Rate Control Mode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacRateControlMode {
#[allow(missing_docs)] // documentation missing in model
Cbr,
#[allow(missing_docs)] // documentation missing in model
Vbr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacRateControlMode {
fn from(s: &str) -> Self {
match s {
"CBR" => AacRateControlMode::Cbr,
"VBR" => AacRateControlMode::Vbr,
other => AacRateControlMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacRateControlMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacRateControlMode::from(s))
}
}
impl AacRateControlMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacRateControlMode::Cbr => "CBR",
AacRateControlMode::Vbr => "VBR",
AacRateControlMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBR", "VBR"]
}
}
impl AsRef<str> for AacRateControlMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control mode and profile. "1.0 - Audio Description (Receiver Mix)" setting receives a stereo description plus control track and emits a mono AAC encode of the description track, with control data emitted in the PES header as per ETSI TS 101 154 Annex E.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacCodingMode {
#[allow(missing_docs)] // documentation missing in model
AdReceiverMix,
#[allow(missing_docs)] // documentation missing in model
CodingMode10,
#[allow(missing_docs)] // documentation missing in model
CodingMode11,
#[allow(missing_docs)] // documentation missing in model
CodingMode20,
#[allow(missing_docs)] // documentation missing in model
CodingMode51,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacCodingMode {
fn from(s: &str) -> Self {
match s {
"AD_RECEIVER_MIX" => AacCodingMode::AdReceiverMix,
"CODING_MODE_1_0" => AacCodingMode::CodingMode10,
"CODING_MODE_1_1" => AacCodingMode::CodingMode11,
"CODING_MODE_2_0" => AacCodingMode::CodingMode20,
"CODING_MODE_5_1" => AacCodingMode::CodingMode51,
other => AacCodingMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacCodingMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacCodingMode::from(s))
}
}
impl AacCodingMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacCodingMode::AdReceiverMix => "AD_RECEIVER_MIX",
AacCodingMode::CodingMode10 => "CODING_MODE_1_0",
AacCodingMode::CodingMode11 => "CODING_MODE_1_1",
AacCodingMode::CodingMode20 => "CODING_MODE_2_0",
AacCodingMode::CodingMode51 => "CODING_MODE_5_1",
AacCodingMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AD_RECEIVER_MIX",
"CODING_MODE_1_0",
"CODING_MODE_1_1",
"CODING_MODE_2_0",
"CODING_MODE_5_1",
]
}
}
impl AsRef<str> for AacCodingMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// AAC Profile.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacCodecProfile {
#[allow(missing_docs)] // documentation missing in model
Hev1,
#[allow(missing_docs)] // documentation missing in model
Hev2,
#[allow(missing_docs)] // documentation missing in model
Lc,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacCodecProfile {
fn from(s: &str) -> Self {
match s {
"HEV1" => AacCodecProfile::Hev1,
"HEV2" => AacCodecProfile::Hev2,
"LC" => AacCodecProfile::Lc,
other => AacCodecProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacCodecProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacCodecProfile::from(s))
}
}
impl AacCodecProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacCodecProfile::Hev1 => "HEV1",
AacCodecProfile::Hev2 => "HEV2",
AacCodecProfile::Lc => "LC",
AacCodecProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HEV1", "HEV2", "LC"]
}
}
impl AsRef<str> for AacCodecProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio + audio description (AD) as a stereo pair. The value for AudioType will be set to 3, which signals to downstream systems that this stream contains "broadcaster mixed AD". Note that the input received by the encoder must contain pre-mixed audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any values you provide in AudioType and FollowInputAudioType. Choose NORMAL when the input does not contain pre-mixed audio + audio description (AD). In this case, the encoder will use any values you provide for AudioType and FollowInputAudioType.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AacAudioDescriptionBroadcasterMix {
#[allow(missing_docs)] // documentation missing in model
BroadcasterMixedAd,
#[allow(missing_docs)] // documentation missing in model
Normal,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AacAudioDescriptionBroadcasterMix {
fn from(s: &str) -> Self {
match s {
"BROADCASTER_MIXED_AD" => AacAudioDescriptionBroadcasterMix::BroadcasterMixedAd,
"NORMAL" => AacAudioDescriptionBroadcasterMix::Normal,
other => AacAudioDescriptionBroadcasterMix::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AacAudioDescriptionBroadcasterMix {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AacAudioDescriptionBroadcasterMix::from(s))
}
}
impl AacAudioDescriptionBroadcasterMix {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AacAudioDescriptionBroadcasterMix::BroadcasterMixedAd => "BROADCASTER_MIXED_AD",
AacAudioDescriptionBroadcasterMix::Normal => "NORMAL",
AacAudioDescriptionBroadcasterMix::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["BROADCASTER_MIXED_AD", "NORMAL"]
}
}
impl AsRef<str> for AacAudioDescriptionBroadcasterMix {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then that value is passed through to the output. If the input contains no ISO 639 audio_type, the value in Audio Type is included in the output. Otherwise the value in Audio Type is included in the output. Note that this field and audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioTypeControl {
#[allow(missing_docs)] // documentation missing in model
FollowInput,
#[allow(missing_docs)] // documentation missing in model
UseConfigured,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioTypeControl {
fn from(s: &str) -> Self {
match s {
"FOLLOW_INPUT" => AudioTypeControl::FollowInput,
"USE_CONFIGURED" => AudioTypeControl::UseConfigured,
other => AudioTypeControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioTypeControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioTypeControl::from(s))
}
}
impl AudioTypeControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioTypeControl::FollowInput => "FOLLOW_INPUT",
AudioTypeControl::UseConfigured => "USE_CONFIGURED",
AudioTypeControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_INPUT", "USE_CONFIGURED"]
}
}
impl AsRef<str> for AudioTypeControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AudioNormalizationSettings {
/// Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
pub algorithm: std::option::Option<crate::model::AudioNormalizationAlgorithm>,
/// When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
pub algorithm_control: std::option::Option<crate::model::AudioNormalizationAlgorithmControl>,
/// Content measuring above this level will be corrected to the target level. Content measuring below this level will not be corrected.
pub correction_gate_level: i32,
/// If set to LOG, log each output's audio track loudness to a CSV file.
pub loudness_logging: std::option::Option<crate::model::AudioNormalizationLoudnessLogging>,
/// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
pub peak_calculation: std::option::Option<crate::model::AudioNormalizationPeakCalculation>,
/// When you use Audio normalization (AudioNormalizationSettings), optionally use this setting to specify a target loudness. If you don't specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm (algorithm). If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
pub target_lkfs: f64,
}
impl AudioNormalizationSettings {
/// Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
pub fn algorithm(&self) -> std::option::Option<&crate::model::AudioNormalizationAlgorithm> {
self.algorithm.as_ref()
}
/// When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
pub fn algorithm_control(
&self,
) -> std::option::Option<&crate::model::AudioNormalizationAlgorithmControl> {
self.algorithm_control.as_ref()
}
/// Content measuring above this level will be corrected to the target level. Content measuring below this level will not be corrected.
pub fn correction_gate_level(&self) -> i32 {
self.correction_gate_level
}
/// If set to LOG, log each output's audio track loudness to a CSV file.
pub fn loudness_logging(
&self,
) -> std::option::Option<&crate::model::AudioNormalizationLoudnessLogging> {
self.loudness_logging.as_ref()
}
/// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
pub fn peak_calculation(
&self,
) -> std::option::Option<&crate::model::AudioNormalizationPeakCalculation> {
self.peak_calculation.as_ref()
}
/// When you use Audio normalization (AudioNormalizationSettings), optionally use this setting to specify a target loudness. If you don't specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm (algorithm). If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
pub fn target_lkfs(&self) -> f64 {
self.target_lkfs
}
}
impl std::fmt::Debug for AudioNormalizationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AudioNormalizationSettings");
formatter.field("algorithm", &self.algorithm);
formatter.field("algorithm_control", &self.algorithm_control);
formatter.field("correction_gate_level", &self.correction_gate_level);
formatter.field("loudness_logging", &self.loudness_logging);
formatter.field("peak_calculation", &self.peak_calculation);
formatter.field("target_lkfs", &self.target_lkfs);
formatter.finish()
}
}
/// See [`AudioNormalizationSettings`](crate::model::AudioNormalizationSettings)
pub mod audio_normalization_settings {
/// A builder for [`AudioNormalizationSettings`](crate::model::AudioNormalizationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) algorithm: std::option::Option<crate::model::AudioNormalizationAlgorithm>,
pub(crate) algorithm_control:
std::option::Option<crate::model::AudioNormalizationAlgorithmControl>,
pub(crate) correction_gate_level: std::option::Option<i32>,
pub(crate) loudness_logging:
std::option::Option<crate::model::AudioNormalizationLoudnessLogging>,
pub(crate) peak_calculation:
std::option::Option<crate::model::AudioNormalizationPeakCalculation>,
pub(crate) target_lkfs: std::option::Option<f64>,
}
impl Builder {
/// Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
pub fn algorithm(mut self, input: crate::model::AudioNormalizationAlgorithm) -> Self {
self.algorithm = Some(input);
self
}
/// Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
pub fn set_algorithm(
mut self,
input: std::option::Option<crate::model::AudioNormalizationAlgorithm>,
) -> Self {
self.algorithm = input;
self
}
/// When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
pub fn algorithm_control(
mut self,
input: crate::model::AudioNormalizationAlgorithmControl,
) -> Self {
self.algorithm_control = Some(input);
self
}
/// When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
pub fn set_algorithm_control(
mut self,
input: std::option::Option<crate::model::AudioNormalizationAlgorithmControl>,
) -> Self {
self.algorithm_control = input;
self
}
/// Content measuring above this level will be corrected to the target level. Content measuring below this level will not be corrected.
pub fn correction_gate_level(mut self, input: i32) -> Self {
self.correction_gate_level = Some(input);
self
}
/// Content measuring above this level will be corrected to the target level. Content measuring below this level will not be corrected.
pub fn set_correction_gate_level(mut self, input: std::option::Option<i32>) -> Self {
self.correction_gate_level = input;
self
}
/// If set to LOG, log each output's audio track loudness to a CSV file.
pub fn loudness_logging(
mut self,
input: crate::model::AudioNormalizationLoudnessLogging,
) -> Self {
self.loudness_logging = Some(input);
self
}
/// If set to LOG, log each output's audio track loudness to a CSV file.
pub fn set_loudness_logging(
mut self,
input: std::option::Option<crate::model::AudioNormalizationLoudnessLogging>,
) -> Self {
self.loudness_logging = input;
self
}
/// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
pub fn peak_calculation(
mut self,
input: crate::model::AudioNormalizationPeakCalculation,
) -> Self {
self.peak_calculation = Some(input);
self
}
/// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
pub fn set_peak_calculation(
mut self,
input: std::option::Option<crate::model::AudioNormalizationPeakCalculation>,
) -> Self {
self.peak_calculation = input;
self
}
/// When you use Audio normalization (AudioNormalizationSettings), optionally use this setting to specify a target loudness. If you don't specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm (algorithm). If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
pub fn target_lkfs(mut self, input: f64) -> Self {
self.target_lkfs = Some(input);
self
}
/// When you use Audio normalization (AudioNormalizationSettings), optionally use this setting to specify a target loudness. If you don't specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm (algorithm). If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
pub fn set_target_lkfs(mut self, input: std::option::Option<f64>) -> Self {
self.target_lkfs = input;
self
}
/// Consumes the builder and constructs a [`AudioNormalizationSettings`](crate::model::AudioNormalizationSettings)
pub fn build(self) -> crate::model::AudioNormalizationSettings {
crate::model::AudioNormalizationSettings {
algorithm: self.algorithm,
algorithm_control: self.algorithm_control,
correction_gate_level: self.correction_gate_level.unwrap_or_default(),
loudness_logging: self.loudness_logging,
peak_calculation: self.peak_calculation,
target_lkfs: self.target_lkfs.unwrap_or_default(),
}
}
}
}
impl AudioNormalizationSettings {
/// Creates a new builder-style object to manufacture [`AudioNormalizationSettings`](crate::model::AudioNormalizationSettings)
pub fn builder() -> crate::model::audio_normalization_settings::Builder {
crate::model::audio_normalization_settings::Builder::default()
}
}
/// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioNormalizationPeakCalculation {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
TruePeak,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioNormalizationPeakCalculation {
fn from(s: &str) -> Self {
match s {
"NONE" => AudioNormalizationPeakCalculation::None,
"TRUE_PEAK" => AudioNormalizationPeakCalculation::TruePeak,
other => AudioNormalizationPeakCalculation::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioNormalizationPeakCalculation {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioNormalizationPeakCalculation::from(s))
}
}
impl AudioNormalizationPeakCalculation {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioNormalizationPeakCalculation::None => "NONE",
AudioNormalizationPeakCalculation::TruePeak => "TRUE_PEAK",
AudioNormalizationPeakCalculation::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "TRUE_PEAK"]
}
}
impl AsRef<str> for AudioNormalizationPeakCalculation {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If set to LOG, log each output's audio track loudness to a CSV file.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioNormalizationLoudnessLogging {
#[allow(missing_docs)] // documentation missing in model
DontLog,
#[allow(missing_docs)] // documentation missing in model
Log,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioNormalizationLoudnessLogging {
fn from(s: &str) -> Self {
match s {
"DONT_LOG" => AudioNormalizationLoudnessLogging::DontLog,
"LOG" => AudioNormalizationLoudnessLogging::Log,
other => AudioNormalizationLoudnessLogging::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioNormalizationLoudnessLogging {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioNormalizationLoudnessLogging::from(s))
}
}
impl AudioNormalizationLoudnessLogging {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioNormalizationLoudnessLogging::DontLog => "DONT_LOG",
AudioNormalizationLoudnessLogging::Log => "LOG",
AudioNormalizationLoudnessLogging::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DONT_LOG", "LOG"]
}
}
impl AsRef<str> for AudioNormalizationLoudnessLogging {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioNormalizationAlgorithmControl {
#[allow(missing_docs)] // documentation missing in model
CorrectAudio,
#[allow(missing_docs)] // documentation missing in model
MeasureOnly,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioNormalizationAlgorithmControl {
fn from(s: &str) -> Self {
match s {
"CORRECT_AUDIO" => AudioNormalizationAlgorithmControl::CorrectAudio,
"MEASURE_ONLY" => AudioNormalizationAlgorithmControl::MeasureOnly,
other => AudioNormalizationAlgorithmControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioNormalizationAlgorithmControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioNormalizationAlgorithmControl::from(s))
}
}
impl AudioNormalizationAlgorithmControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioNormalizationAlgorithmControl::CorrectAudio => "CORRECT_AUDIO",
AudioNormalizationAlgorithmControl::MeasureOnly => "MEASURE_ONLY",
AudioNormalizationAlgorithmControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CORRECT_AUDIO", "MEASURE_ONLY"]
}
}
impl AsRef<str> for AudioNormalizationAlgorithmControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioNormalizationAlgorithm {
#[allow(missing_docs)] // documentation missing in model
ItuBs17701,
#[allow(missing_docs)] // documentation missing in model
ItuBs17702,
#[allow(missing_docs)] // documentation missing in model
ItuBs17703,
#[allow(missing_docs)] // documentation missing in model
ItuBs17704,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioNormalizationAlgorithm {
fn from(s: &str) -> Self {
match s {
"ITU_BS_1770_1" => AudioNormalizationAlgorithm::ItuBs17701,
"ITU_BS_1770_2" => AudioNormalizationAlgorithm::ItuBs17702,
"ITU_BS_1770_3" => AudioNormalizationAlgorithm::ItuBs17703,
"ITU_BS_1770_4" => AudioNormalizationAlgorithm::ItuBs17704,
other => AudioNormalizationAlgorithm::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioNormalizationAlgorithm {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioNormalizationAlgorithm::from(s))
}
}
impl AudioNormalizationAlgorithm {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioNormalizationAlgorithm::ItuBs17701 => "ITU_BS_1770_1",
AudioNormalizationAlgorithm::ItuBs17702 => "ITU_BS_1770_2",
AudioNormalizationAlgorithm::ItuBs17703 => "ITU_BS_1770_3",
AudioNormalizationAlgorithm::ItuBs17704 => "ITU_BS_1770_4",
AudioNormalizationAlgorithm::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ITU_BS_1770_1",
"ITU_BS_1770_2",
"ITU_BS_1770_3",
"ITU_BS_1770_4",
]
}
}
impl AsRef<str> for AudioNormalizationAlgorithm {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you mimic a multi-channel audio layout with multiple mono-channel tracks, you can tag each channel layout manually. For example, you would tag the tracks that contain your left, right, and center audio with Left (L), Right (R), and Center (C), respectively. When you don't specify a value, MediaConvert labels your track as Center (C) by default. To use audio layout tagging, your output must be in a QuickTime (.mov) container; your audio codec must be AAC, WAV, or AIFF; and you must set up your audio track to have only one channel.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AudioChannelTaggingSettings {
/// You can add a tag for this mono-channel audio track to mimic its placement in a multi-channel layout. For example, if this track is the left surround channel, choose Left surround (LS).
pub channel_tag: std::option::Option<crate::model::AudioChannelTag>,
}
impl AudioChannelTaggingSettings {
/// You can add a tag for this mono-channel audio track to mimic its placement in a multi-channel layout. For example, if this track is the left surround channel, choose Left surround (LS).
pub fn channel_tag(&self) -> std::option::Option<&crate::model::AudioChannelTag> {
self.channel_tag.as_ref()
}
}
impl std::fmt::Debug for AudioChannelTaggingSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AudioChannelTaggingSettings");
formatter.field("channel_tag", &self.channel_tag);
formatter.finish()
}
}
/// See [`AudioChannelTaggingSettings`](crate::model::AudioChannelTaggingSettings)
pub mod audio_channel_tagging_settings {
/// A builder for [`AudioChannelTaggingSettings`](crate::model::AudioChannelTaggingSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) channel_tag: std::option::Option<crate::model::AudioChannelTag>,
}
impl Builder {
/// You can add a tag for this mono-channel audio track to mimic its placement in a multi-channel layout. For example, if this track is the left surround channel, choose Left surround (LS).
pub fn channel_tag(mut self, input: crate::model::AudioChannelTag) -> Self {
self.channel_tag = Some(input);
self
}
/// You can add a tag for this mono-channel audio track to mimic its placement in a multi-channel layout. For example, if this track is the left surround channel, choose Left surround (LS).
pub fn set_channel_tag(
mut self,
input: std::option::Option<crate::model::AudioChannelTag>,
) -> Self {
self.channel_tag = input;
self
}
/// Consumes the builder and constructs a [`AudioChannelTaggingSettings`](crate::model::AudioChannelTaggingSettings)
pub fn build(self) -> crate::model::AudioChannelTaggingSettings {
crate::model::AudioChannelTaggingSettings {
channel_tag: self.channel_tag,
}
}
}
}
impl AudioChannelTaggingSettings {
/// Creates a new builder-style object to manufacture [`AudioChannelTaggingSettings`](crate::model::AudioChannelTaggingSettings)
pub fn builder() -> crate::model::audio_channel_tagging_settings::Builder {
crate::model::audio_channel_tagging_settings::Builder::default()
}
}
/// You can add a tag for this mono-channel audio track to mimic its placement in a multi-channel layout. For example, if this track is the left surround channel, choose Left surround (LS).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioChannelTag {
#[allow(missing_docs)] // documentation missing in model
C,
#[allow(missing_docs)] // documentation missing in model
Cs,
#[allow(missing_docs)] // documentation missing in model
L,
#[allow(missing_docs)] // documentation missing in model
Lc,
#[allow(missing_docs)] // documentation missing in model
Lfe,
#[allow(missing_docs)] // documentation missing in model
Ls,
#[allow(missing_docs)] // documentation missing in model
Lsd,
#[allow(missing_docs)] // documentation missing in model
R,
#[allow(missing_docs)] // documentation missing in model
Rc,
#[allow(missing_docs)] // documentation missing in model
Rs,
#[allow(missing_docs)] // documentation missing in model
Rsd,
#[allow(missing_docs)] // documentation missing in model
Tcs,
#[allow(missing_docs)] // documentation missing in model
Vhc,
#[allow(missing_docs)] // documentation missing in model
Vhl,
#[allow(missing_docs)] // documentation missing in model
Vhr,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioChannelTag {
fn from(s: &str) -> Self {
match s {
"C" => AudioChannelTag::C,
"CS" => AudioChannelTag::Cs,
"L" => AudioChannelTag::L,
"LC" => AudioChannelTag::Lc,
"LFE" => AudioChannelTag::Lfe,
"LS" => AudioChannelTag::Ls,
"LSD" => AudioChannelTag::Lsd,
"R" => AudioChannelTag::R,
"RC" => AudioChannelTag::Rc,
"RS" => AudioChannelTag::Rs,
"RSD" => AudioChannelTag::Rsd,
"TCS" => AudioChannelTag::Tcs,
"VHC" => AudioChannelTag::Vhc,
"VHL" => AudioChannelTag::Vhl,
"VHR" => AudioChannelTag::Vhr,
other => AudioChannelTag::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioChannelTag {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioChannelTag::from(s))
}
}
impl AudioChannelTag {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioChannelTag::C => "C",
AudioChannelTag::Cs => "CS",
AudioChannelTag::L => "L",
AudioChannelTag::Lc => "LC",
AudioChannelTag::Lfe => "LFE",
AudioChannelTag::Ls => "LS",
AudioChannelTag::Lsd => "LSD",
AudioChannelTag::R => "R",
AudioChannelTag::Rc => "RC",
AudioChannelTag::Rs => "RS",
AudioChannelTag::Rsd => "RSD",
AudioChannelTag::Tcs => "TCS",
AudioChannelTag::Vhc => "VHC",
AudioChannelTag::Vhl => "VHL",
AudioChannelTag::Vhr => "VHR",
AudioChannelTag::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"C", "CS", "L", "LC", "LFE", "LS", "LSD", "R", "RC", "RS", "RSD", "TCS", "VHC", "VHL",
"VHR",
]
}
}
impl AsRef<str> for AudioChannelTag {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// A job template is a pre-made set of encoding instructions that you can use to quickly create a job.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JobTemplate {
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub acceleration_settings: std::option::Option<crate::model::AccelerationSettings>,
/// An identifier for this resource that is unique within all of AWS.
pub arn: std::option::Option<std::string::String>,
/// An optional category you create to organize your job templates.
pub category: std::option::Option<std::string::String>,
/// The timestamp in epoch seconds for Job template creation.
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
/// An optional description you create for each job template.
pub description: std::option::Option<std::string::String>,
/// Optional list of hop destinations.
pub hop_destinations: std::option::Option<std::vec::Vec<crate::model::HopDestination>>,
/// The timestamp in epoch seconds when the Job template was last updated.
pub last_updated: std::option::Option<aws_smithy_types::DateTime>,
/// A name you create for each job template. Each name must be unique within your account.
pub name: std::option::Option<std::string::String>,
/// Relative priority on the job.
pub priority: i32,
/// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
pub queue: std::option::Option<std::string::String>,
/// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
pub settings: std::option::Option<crate::model::JobTemplateSettings>,
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub status_update_interval: std::option::Option<crate::model::StatusUpdateInterval>,
/// A job template can be of two types: system or custom. System or built-in job templates can't be modified or deleted by the user.
pub r#type: std::option::Option<crate::model::Type>,
}
impl JobTemplate {
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub fn acceleration_settings(
&self,
) -> std::option::Option<&crate::model::AccelerationSettings> {
self.acceleration_settings.as_ref()
}
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// An optional category you create to organize your job templates.
pub fn category(&self) -> std::option::Option<&str> {
self.category.as_deref()
}
/// The timestamp in epoch seconds for Job template creation.
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// An optional description you create for each job template.
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// Optional list of hop destinations.
pub fn hop_destinations(&self) -> std::option::Option<&[crate::model::HopDestination]> {
self.hop_destinations.as_deref()
}
/// The timestamp in epoch seconds when the Job template was last updated.
pub fn last_updated(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_updated.as_ref()
}
/// A name you create for each job template. Each name must be unique within your account.
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// Relative priority on the job.
pub fn priority(&self) -> i32 {
self.priority
}
/// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
pub fn queue(&self) -> std::option::Option<&str> {
self.queue.as_deref()
}
/// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
pub fn settings(&self) -> std::option::Option<&crate::model::JobTemplateSettings> {
self.settings.as_ref()
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub fn status_update_interval(
&self,
) -> std::option::Option<&crate::model::StatusUpdateInterval> {
self.status_update_interval.as_ref()
}
/// A job template can be of two types: system or custom. System or built-in job templates can't be modified or deleted by the user.
pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for JobTemplate {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JobTemplate");
formatter.field("acceleration_settings", &self.acceleration_settings);
formatter.field("arn", &self.arn);
formatter.field("category", &self.category);
formatter.field("created_at", &self.created_at);
formatter.field("description", &self.description);
formatter.field("hop_destinations", &self.hop_destinations);
formatter.field("last_updated", &self.last_updated);
formatter.field("name", &self.name);
formatter.field("priority", &self.priority);
formatter.field("queue", &self.queue);
formatter.field("settings", &self.settings);
formatter.field("status_update_interval", &self.status_update_interval);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`JobTemplate`](crate::model::JobTemplate)
pub mod job_template {
/// A builder for [`JobTemplate`](crate::model::JobTemplate)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) acceleration_settings: std::option::Option<crate::model::AccelerationSettings>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) category: std::option::Option<std::string::String>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) hop_destinations:
std::option::Option<std::vec::Vec<crate::model::HopDestination>>,
pub(crate) last_updated: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) priority: std::option::Option<i32>,
pub(crate) queue: std::option::Option<std::string::String>,
pub(crate) settings: std::option::Option<crate::model::JobTemplateSettings>,
pub(crate) status_update_interval: std::option::Option<crate::model::StatusUpdateInterval>,
pub(crate) r#type: std::option::Option<crate::model::Type>,
}
impl Builder {
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub fn acceleration_settings(mut self, input: crate::model::AccelerationSettings) -> Self {
self.acceleration_settings = Some(input);
self
}
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub fn set_acceleration_settings(
mut self,
input: std::option::Option<crate::model::AccelerationSettings>,
) -> Self {
self.acceleration_settings = input;
self
}
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// An identifier for this resource that is unique within all of AWS.
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// An optional category you create to organize your job templates.
pub fn category(mut self, input: impl Into<std::string::String>) -> Self {
self.category = Some(input.into());
self
}
/// An optional category you create to organize your job templates.
pub fn set_category(mut self, input: std::option::Option<std::string::String>) -> Self {
self.category = input;
self
}
/// The timestamp in epoch seconds for Job template creation.
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
/// The timestamp in epoch seconds for Job template creation.
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
/// An optional description you create for each job template.
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// An optional description you create for each job template.
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// Appends an item to `hop_destinations`.
///
/// To override the contents of this collection use [`set_hop_destinations`](Self::set_hop_destinations).
///
/// Optional list of hop destinations.
pub fn hop_destinations(mut self, input: crate::model::HopDestination) -> Self {
let mut v = self.hop_destinations.unwrap_or_default();
v.push(input);
self.hop_destinations = Some(v);
self
}
/// Optional list of hop destinations.
pub fn set_hop_destinations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::HopDestination>>,
) -> Self {
self.hop_destinations = input;
self
}
/// The timestamp in epoch seconds when the Job template was last updated.
pub fn last_updated(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated = Some(input);
self
}
/// The timestamp in epoch seconds when the Job template was last updated.
pub fn set_last_updated(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_updated = input;
self
}
/// A name you create for each job template. Each name must be unique within your account.
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// A name you create for each job template. Each name must be unique within your account.
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Relative priority on the job.
pub fn priority(mut self, input: i32) -> Self {
self.priority = Some(input);
self
}
/// Relative priority on the job.
pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
self.priority = input;
self
}
/// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
pub fn queue(mut self, input: impl Into<std::string::String>) -> Self {
self.queue = Some(input.into());
self
}
/// Optional. The queue that jobs created from this template are assigned to. If you don't specify this, jobs will go to the default queue.
pub fn set_queue(mut self, input: std::option::Option<std::string::String>) -> Self {
self.queue = input;
self
}
/// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
pub fn settings(mut self, input: crate::model::JobTemplateSettings) -> Self {
self.settings = Some(input);
self
}
/// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
pub fn set_settings(
mut self,
input: std::option::Option<crate::model::JobTemplateSettings>,
) -> Self {
self.settings = input;
self
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub fn status_update_interval(mut self, input: crate::model::StatusUpdateInterval) -> Self {
self.status_update_interval = Some(input);
self
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub fn set_status_update_interval(
mut self,
input: std::option::Option<crate::model::StatusUpdateInterval>,
) -> Self {
self.status_update_interval = input;
self
}
/// A job template can be of two types: system or custom. System or built-in job templates can't be modified or deleted by the user.
pub fn r#type(mut self, input: crate::model::Type) -> Self {
self.r#type = Some(input);
self
}
/// A job template can be of two types: system or custom. System or built-in job templates can't be modified or deleted by the user.
pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`JobTemplate`](crate::model::JobTemplate)
pub fn build(self) -> crate::model::JobTemplate {
crate::model::JobTemplate {
acceleration_settings: self.acceleration_settings,
arn: self.arn,
category: self.category,
created_at: self.created_at,
description: self.description,
hop_destinations: self.hop_destinations,
last_updated: self.last_updated,
name: self.name,
priority: self.priority.unwrap_or_default(),
queue: self.queue,
settings: self.settings,
status_update_interval: self.status_update_interval,
r#type: self.r#type,
}
}
}
}
impl JobTemplate {
/// Creates a new builder-style object to manufacture [`JobTemplate`](crate::model::JobTemplate)
pub fn builder() -> crate::model::job_template::Builder {
crate::model::job_template::Builder::default()
}
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum StatusUpdateInterval {
#[allow(missing_docs)] // documentation missing in model
Seconds10,
#[allow(missing_docs)] // documentation missing in model
Seconds12,
#[allow(missing_docs)] // documentation missing in model
Seconds120,
#[allow(missing_docs)] // documentation missing in model
Seconds15,
#[allow(missing_docs)] // documentation missing in model
Seconds180,
#[allow(missing_docs)] // documentation missing in model
Seconds20,
#[allow(missing_docs)] // documentation missing in model
Seconds240,
#[allow(missing_docs)] // documentation missing in model
Seconds30,
#[allow(missing_docs)] // documentation missing in model
Seconds300,
#[allow(missing_docs)] // documentation missing in model
Seconds360,
#[allow(missing_docs)] // documentation missing in model
Seconds420,
#[allow(missing_docs)] // documentation missing in model
Seconds480,
#[allow(missing_docs)] // documentation missing in model
Seconds540,
#[allow(missing_docs)] // documentation missing in model
Seconds60,
#[allow(missing_docs)] // documentation missing in model
Seconds600,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for StatusUpdateInterval {
fn from(s: &str) -> Self {
match s {
"SECONDS_10" => StatusUpdateInterval::Seconds10,
"SECONDS_12" => StatusUpdateInterval::Seconds12,
"SECONDS_120" => StatusUpdateInterval::Seconds120,
"SECONDS_15" => StatusUpdateInterval::Seconds15,
"SECONDS_180" => StatusUpdateInterval::Seconds180,
"SECONDS_20" => StatusUpdateInterval::Seconds20,
"SECONDS_240" => StatusUpdateInterval::Seconds240,
"SECONDS_30" => StatusUpdateInterval::Seconds30,
"SECONDS_300" => StatusUpdateInterval::Seconds300,
"SECONDS_360" => StatusUpdateInterval::Seconds360,
"SECONDS_420" => StatusUpdateInterval::Seconds420,
"SECONDS_480" => StatusUpdateInterval::Seconds480,
"SECONDS_540" => StatusUpdateInterval::Seconds540,
"SECONDS_60" => StatusUpdateInterval::Seconds60,
"SECONDS_600" => StatusUpdateInterval::Seconds600,
other => StatusUpdateInterval::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StatusUpdateInterval {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StatusUpdateInterval::from(s))
}
}
impl StatusUpdateInterval {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
StatusUpdateInterval::Seconds10 => "SECONDS_10",
StatusUpdateInterval::Seconds12 => "SECONDS_12",
StatusUpdateInterval::Seconds120 => "SECONDS_120",
StatusUpdateInterval::Seconds15 => "SECONDS_15",
StatusUpdateInterval::Seconds180 => "SECONDS_180",
StatusUpdateInterval::Seconds20 => "SECONDS_20",
StatusUpdateInterval::Seconds240 => "SECONDS_240",
StatusUpdateInterval::Seconds30 => "SECONDS_30",
StatusUpdateInterval::Seconds300 => "SECONDS_300",
StatusUpdateInterval::Seconds360 => "SECONDS_360",
StatusUpdateInterval::Seconds420 => "SECONDS_420",
StatusUpdateInterval::Seconds480 => "SECONDS_480",
StatusUpdateInterval::Seconds540 => "SECONDS_540",
StatusUpdateInterval::Seconds60 => "SECONDS_60",
StatusUpdateInterval::Seconds600 => "SECONDS_600",
StatusUpdateInterval::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"SECONDS_10",
"SECONDS_12",
"SECONDS_120",
"SECONDS_15",
"SECONDS_180",
"SECONDS_20",
"SECONDS_240",
"SECONDS_30",
"SECONDS_300",
"SECONDS_360",
"SECONDS_420",
"SECONDS_480",
"SECONDS_540",
"SECONDS_60",
"SECONDS_600",
]
}
}
impl AsRef<str> for StatusUpdateInterval {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JobTemplateSettings {
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub ad_avail_offset: i32,
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub avail_blanking: std::option::Option<crate::model::AvailBlanking>,
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub esam: std::option::Option<crate::model::EsamSettings>,
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub extended_data_services: std::option::Option<crate::model::ExtendedDataServices>,
/// Use Inputs (inputs) to define the source file used in the transcode job. There can only be one input in a job template. Using the API, you can include multiple inputs when referencing a job template.
pub inputs: std::option::Option<std::vec::Vec<crate::model::InputTemplate>>,
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub kantar_watermark: std::option::Option<crate::model::KantarWatermarkSettings>,
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub motion_image_inserter: std::option::Option<crate::model::MotionImageInserter>,
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub nielsen_configuration: std::option::Option<crate::model::NielsenConfiguration>,
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub nielsen_non_linear_watermark:
std::option::Option<crate::model::NielsenNonLinearWatermarkSettings>,
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub output_groups: std::option::Option<std::vec::Vec<crate::model::OutputGroup>>,
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub timecode_config: std::option::Option<crate::model::TimecodeConfig>,
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub timed_metadata_insertion: std::option::Option<crate::model::TimedMetadataInsertion>,
}
impl JobTemplateSettings {
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub fn ad_avail_offset(&self) -> i32 {
self.ad_avail_offset
}
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub fn avail_blanking(&self) -> std::option::Option<&crate::model::AvailBlanking> {
self.avail_blanking.as_ref()
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub fn esam(&self) -> std::option::Option<&crate::model::EsamSettings> {
self.esam.as_ref()
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub fn extended_data_services(
&self,
) -> std::option::Option<&crate::model::ExtendedDataServices> {
self.extended_data_services.as_ref()
}
/// Use Inputs (inputs) to define the source file used in the transcode job. There can only be one input in a job template. Using the API, you can include multiple inputs when referencing a job template.
pub fn inputs(&self) -> std::option::Option<&[crate::model::InputTemplate]> {
self.inputs.as_deref()
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub fn kantar_watermark(&self) -> std::option::Option<&crate::model::KantarWatermarkSettings> {
self.kantar_watermark.as_ref()
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub fn motion_image_inserter(&self) -> std::option::Option<&crate::model::MotionImageInserter> {
self.motion_image_inserter.as_ref()
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub fn nielsen_configuration(
&self,
) -> std::option::Option<&crate::model::NielsenConfiguration> {
self.nielsen_configuration.as_ref()
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub fn nielsen_non_linear_watermark(
&self,
) -> std::option::Option<&crate::model::NielsenNonLinearWatermarkSettings> {
self.nielsen_non_linear_watermark.as_ref()
}
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub fn output_groups(&self) -> std::option::Option<&[crate::model::OutputGroup]> {
self.output_groups.as_deref()
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub fn timecode_config(&self) -> std::option::Option<&crate::model::TimecodeConfig> {
self.timecode_config.as_ref()
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn timed_metadata_insertion(
&self,
) -> std::option::Option<&crate::model::TimedMetadataInsertion> {
self.timed_metadata_insertion.as_ref()
}
}
impl std::fmt::Debug for JobTemplateSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JobTemplateSettings");
formatter.field("ad_avail_offset", &self.ad_avail_offset);
formatter.field("avail_blanking", &self.avail_blanking);
formatter.field("esam", &self.esam);
formatter.field("extended_data_services", &self.extended_data_services);
formatter.field("inputs", &self.inputs);
formatter.field("kantar_watermark", &self.kantar_watermark);
formatter.field("motion_image_inserter", &self.motion_image_inserter);
formatter.field("nielsen_configuration", &self.nielsen_configuration);
formatter.field(
"nielsen_non_linear_watermark",
&self.nielsen_non_linear_watermark,
);
formatter.field("output_groups", &self.output_groups);
formatter.field("timecode_config", &self.timecode_config);
formatter.field("timed_metadata_insertion", &self.timed_metadata_insertion);
formatter.finish()
}
}
/// See [`JobTemplateSettings`](crate::model::JobTemplateSettings)
pub mod job_template_settings {
/// A builder for [`JobTemplateSettings`](crate::model::JobTemplateSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ad_avail_offset: std::option::Option<i32>,
pub(crate) avail_blanking: std::option::Option<crate::model::AvailBlanking>,
pub(crate) esam: std::option::Option<crate::model::EsamSettings>,
pub(crate) extended_data_services: std::option::Option<crate::model::ExtendedDataServices>,
pub(crate) inputs: std::option::Option<std::vec::Vec<crate::model::InputTemplate>>,
pub(crate) kantar_watermark: std::option::Option<crate::model::KantarWatermarkSettings>,
pub(crate) motion_image_inserter: std::option::Option<crate::model::MotionImageInserter>,
pub(crate) nielsen_configuration: std::option::Option<crate::model::NielsenConfiguration>,
pub(crate) nielsen_non_linear_watermark:
std::option::Option<crate::model::NielsenNonLinearWatermarkSettings>,
pub(crate) output_groups: std::option::Option<std::vec::Vec<crate::model::OutputGroup>>,
pub(crate) timecode_config: std::option::Option<crate::model::TimecodeConfig>,
pub(crate) timed_metadata_insertion:
std::option::Option<crate::model::TimedMetadataInsertion>,
}
impl Builder {
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub fn ad_avail_offset(mut self, input: i32) -> Self {
self.ad_avail_offset = Some(input);
self
}
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub fn set_ad_avail_offset(mut self, input: std::option::Option<i32>) -> Self {
self.ad_avail_offset = input;
self
}
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub fn avail_blanking(mut self, input: crate::model::AvailBlanking) -> Self {
self.avail_blanking = Some(input);
self
}
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub fn set_avail_blanking(
mut self,
input: std::option::Option<crate::model::AvailBlanking>,
) -> Self {
self.avail_blanking = input;
self
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub fn esam(mut self, input: crate::model::EsamSettings) -> Self {
self.esam = Some(input);
self
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub fn set_esam(mut self, input: std::option::Option<crate::model::EsamSettings>) -> Self {
self.esam = input;
self
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub fn extended_data_services(mut self, input: crate::model::ExtendedDataServices) -> Self {
self.extended_data_services = Some(input);
self
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub fn set_extended_data_services(
mut self,
input: std::option::Option<crate::model::ExtendedDataServices>,
) -> Self {
self.extended_data_services = input;
self
}
/// Appends an item to `inputs`.
///
/// To override the contents of this collection use [`set_inputs`](Self::set_inputs).
///
/// Use Inputs (inputs) to define the source file used in the transcode job. There can only be one input in a job template. Using the API, you can include multiple inputs when referencing a job template.
pub fn inputs(mut self, input: crate::model::InputTemplate) -> Self {
let mut v = self.inputs.unwrap_or_default();
v.push(input);
self.inputs = Some(v);
self
}
/// Use Inputs (inputs) to define the source file used in the transcode job. There can only be one input in a job template. Using the API, you can include multiple inputs when referencing a job template.
pub fn set_inputs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InputTemplate>>,
) -> Self {
self.inputs = input;
self
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub fn kantar_watermark(mut self, input: crate::model::KantarWatermarkSettings) -> Self {
self.kantar_watermark = Some(input);
self
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub fn set_kantar_watermark(
mut self,
input: std::option::Option<crate::model::KantarWatermarkSettings>,
) -> Self {
self.kantar_watermark = input;
self
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub fn motion_image_inserter(mut self, input: crate::model::MotionImageInserter) -> Self {
self.motion_image_inserter = Some(input);
self
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub fn set_motion_image_inserter(
mut self,
input: std::option::Option<crate::model::MotionImageInserter>,
) -> Self {
self.motion_image_inserter = input;
self
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub fn nielsen_configuration(mut self, input: crate::model::NielsenConfiguration) -> Self {
self.nielsen_configuration = Some(input);
self
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub fn set_nielsen_configuration(
mut self,
input: std::option::Option<crate::model::NielsenConfiguration>,
) -> Self {
self.nielsen_configuration = input;
self
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub fn nielsen_non_linear_watermark(
mut self,
input: crate::model::NielsenNonLinearWatermarkSettings,
) -> Self {
self.nielsen_non_linear_watermark = Some(input);
self
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub fn set_nielsen_non_linear_watermark(
mut self,
input: std::option::Option<crate::model::NielsenNonLinearWatermarkSettings>,
) -> Self {
self.nielsen_non_linear_watermark = input;
self
}
/// Appends an item to `output_groups`.
///
/// To override the contents of this collection use [`set_output_groups`](Self::set_output_groups).
///
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub fn output_groups(mut self, input: crate::model::OutputGroup) -> Self {
let mut v = self.output_groups.unwrap_or_default();
v.push(input);
self.output_groups = Some(v);
self
}
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub fn set_output_groups(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OutputGroup>>,
) -> Self {
self.output_groups = input;
self
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub fn timecode_config(mut self, input: crate::model::TimecodeConfig) -> Self {
self.timecode_config = Some(input);
self
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub fn set_timecode_config(
mut self,
input: std::option::Option<crate::model::TimecodeConfig>,
) -> Self {
self.timecode_config = input;
self
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn timed_metadata_insertion(
mut self,
input: crate::model::TimedMetadataInsertion,
) -> Self {
self.timed_metadata_insertion = Some(input);
self
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn set_timed_metadata_insertion(
mut self,
input: std::option::Option<crate::model::TimedMetadataInsertion>,
) -> Self {
self.timed_metadata_insertion = input;
self
}
/// Consumes the builder and constructs a [`JobTemplateSettings`](crate::model::JobTemplateSettings)
pub fn build(self) -> crate::model::JobTemplateSettings {
crate::model::JobTemplateSettings {
ad_avail_offset: self.ad_avail_offset.unwrap_or_default(),
avail_blanking: self.avail_blanking,
esam: self.esam,
extended_data_services: self.extended_data_services,
inputs: self.inputs,
kantar_watermark: self.kantar_watermark,
motion_image_inserter: self.motion_image_inserter,
nielsen_configuration: self.nielsen_configuration,
nielsen_non_linear_watermark: self.nielsen_non_linear_watermark,
output_groups: self.output_groups,
timecode_config: self.timecode_config,
timed_metadata_insertion: self.timed_metadata_insertion,
}
}
}
}
impl JobTemplateSettings {
/// Creates a new builder-style object to manufacture [`JobTemplateSettings`](crate::model::JobTemplateSettings)
pub fn builder() -> crate::model::job_template_settings::Builder {
crate::model::job_template_settings::Builder::default()
}
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TimedMetadataInsertion {
/// Id3Insertions contains the array of Id3Insertion instances.
pub id3_insertions: std::option::Option<std::vec::Vec<crate::model::Id3Insertion>>,
}
impl TimedMetadataInsertion {
/// Id3Insertions contains the array of Id3Insertion instances.
pub fn id3_insertions(&self) -> std::option::Option<&[crate::model::Id3Insertion]> {
self.id3_insertions.as_deref()
}
}
impl std::fmt::Debug for TimedMetadataInsertion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TimedMetadataInsertion");
formatter.field("id3_insertions", &self.id3_insertions);
formatter.finish()
}
}
/// See [`TimedMetadataInsertion`](crate::model::TimedMetadataInsertion)
pub mod timed_metadata_insertion {
/// A builder for [`TimedMetadataInsertion`](crate::model::TimedMetadataInsertion)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id3_insertions: std::option::Option<std::vec::Vec<crate::model::Id3Insertion>>,
}
impl Builder {
/// Appends an item to `id3_insertions`.
///
/// To override the contents of this collection use [`set_id3_insertions`](Self::set_id3_insertions).
///
/// Id3Insertions contains the array of Id3Insertion instances.
pub fn id3_insertions(mut self, input: crate::model::Id3Insertion) -> Self {
let mut v = self.id3_insertions.unwrap_or_default();
v.push(input);
self.id3_insertions = Some(v);
self
}
/// Id3Insertions contains the array of Id3Insertion instances.
pub fn set_id3_insertions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Id3Insertion>>,
) -> Self {
self.id3_insertions = input;
self
}
/// Consumes the builder and constructs a [`TimedMetadataInsertion`](crate::model::TimedMetadataInsertion)
pub fn build(self) -> crate::model::TimedMetadataInsertion {
crate::model::TimedMetadataInsertion {
id3_insertions: self.id3_insertions,
}
}
}
}
impl TimedMetadataInsertion {
/// Creates a new builder-style object to manufacture [`TimedMetadataInsertion`](crate::model::TimedMetadataInsertion)
pub fn builder() -> crate::model::timed_metadata_insertion::Builder {
crate::model::timed_metadata_insertion::Builder::default()
}
}
/// To insert ID3 tags in your output, specify two values. Use ID3 tag (Id3) to specify the base 64 encoded string and use Timecode (TimeCode) to specify the time when the tag should be inserted. To insert multiple ID3 tags in your output, create multiple instances of ID3 insertion (Id3Insertion).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Id3Insertion {
/// Use ID3 tag (Id3) to provide a fully formed ID3 tag in base64-encode format.
pub id3: std::option::Option<std::string::String>,
/// Provide a Timecode (TimeCode) in HH:MM:SS:FF or HH:MM:SS;FF format.
pub timecode: std::option::Option<std::string::String>,
}
impl Id3Insertion {
/// Use ID3 tag (Id3) to provide a fully formed ID3 tag in base64-encode format.
pub fn id3(&self) -> std::option::Option<&str> {
self.id3.as_deref()
}
/// Provide a Timecode (TimeCode) in HH:MM:SS:FF or HH:MM:SS;FF format.
pub fn timecode(&self) -> std::option::Option<&str> {
self.timecode.as_deref()
}
}
impl std::fmt::Debug for Id3Insertion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Id3Insertion");
formatter.field("id3", &self.id3);
formatter.field("timecode", &self.timecode);
formatter.finish()
}
}
/// See [`Id3Insertion`](crate::model::Id3Insertion)
pub mod id3_insertion {
/// A builder for [`Id3Insertion`](crate::model::Id3Insertion)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id3: std::option::Option<std::string::String>,
pub(crate) timecode: std::option::Option<std::string::String>,
}
impl Builder {
/// Use ID3 tag (Id3) to provide a fully formed ID3 tag in base64-encode format.
pub fn id3(mut self, input: impl Into<std::string::String>) -> Self {
self.id3 = Some(input.into());
self
}
/// Use ID3 tag (Id3) to provide a fully formed ID3 tag in base64-encode format.
pub fn set_id3(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id3 = input;
self
}
/// Provide a Timecode (TimeCode) in HH:MM:SS:FF or HH:MM:SS;FF format.
pub fn timecode(mut self, input: impl Into<std::string::String>) -> Self {
self.timecode = Some(input.into());
self
}
/// Provide a Timecode (TimeCode) in HH:MM:SS:FF or HH:MM:SS;FF format.
pub fn set_timecode(mut self, input: std::option::Option<std::string::String>) -> Self {
self.timecode = input;
self
}
/// Consumes the builder and constructs a [`Id3Insertion`](crate::model::Id3Insertion)
pub fn build(self) -> crate::model::Id3Insertion {
crate::model::Id3Insertion {
id3: self.id3,
timecode: self.timecode,
}
}
}
}
impl Id3Insertion {
/// Creates a new builder-style object to manufacture [`Id3Insertion`](crate::model::Id3Insertion)
pub fn builder() -> crate::model::id3_insertion::Builder {
crate::model::id3_insertion::Builder::default()
}
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TimecodeConfig {
/// If you use an editing platform that relies on an anchor timecode, use Anchor Timecode (Anchor) to specify a timecode that will match the input video frame to the output video frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF). This setting ignores frame rate conversion. System behavior for Anchor Timecode varies depending on your setting for Source (TimecodeSource). * If Source (TimecodeSource) is set to Specified Start (SPECIFIEDSTART), the first input frame is the specified value in Start Timecode (Start). Anchor Timecode (Anchor) and Start Timecode (Start) are used calculate output timecode. * If Source (TimecodeSource) is set to Start at 0 (ZEROBASED) the first frame is 00:00:00:00. * If Source (TimecodeSource) is set to Embedded (EMBEDDED), the first frame is the timecode value on the first input frame of the input.
pub anchor: std::option::Option<std::string::String>,
/// Use Source (TimecodeSource) to set how timecodes are handled within this job. To make sure that your video, audio, captions, and markers are synchronized and that time-based features, such as image inserter, work correctly, choose the Timecode source option that matches your assets. All timecodes are in a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - Use the timecode that is in the input video. If no embedded timecode is in the source, the service will use Start at 0 (ZEROBASED) instead. * Start at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame to a value other than zero. You use Start timecode (Start) to provide this value.
pub source: std::option::Option<crate::model::TimecodeSource>,
/// Only use when you set Source (TimecodeSource) to Specified start (SPECIFIEDSTART). Use Start timecode (Start) to specify the timecode for the initial frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF).
pub start: std::option::Option<std::string::String>,
/// Only applies to outputs that support program-date-time stamp. Use Timestamp offset (TimestampOffset) to overwrite the timecode date without affecting the time and frame number. Provide the new date as a string in the format "yyyy-mm-dd". To use Time stamp offset, you must also enable Insert program-date-time (InsertProgramDateTime) in the output settings. For example, if the date part of your timecodes is 2002-1-25 and you want to change it to one year later, set Timestamp offset (TimestampOffset) to 2003-1-25.
pub timestamp_offset: std::option::Option<std::string::String>,
}
impl TimecodeConfig {
/// If you use an editing platform that relies on an anchor timecode, use Anchor Timecode (Anchor) to specify a timecode that will match the input video frame to the output video frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF). This setting ignores frame rate conversion. System behavior for Anchor Timecode varies depending on your setting for Source (TimecodeSource). * If Source (TimecodeSource) is set to Specified Start (SPECIFIEDSTART), the first input frame is the specified value in Start Timecode (Start). Anchor Timecode (Anchor) and Start Timecode (Start) are used calculate output timecode. * If Source (TimecodeSource) is set to Start at 0 (ZEROBASED) the first frame is 00:00:00:00. * If Source (TimecodeSource) is set to Embedded (EMBEDDED), the first frame is the timecode value on the first input frame of the input.
pub fn anchor(&self) -> std::option::Option<&str> {
self.anchor.as_deref()
}
/// Use Source (TimecodeSource) to set how timecodes are handled within this job. To make sure that your video, audio, captions, and markers are synchronized and that time-based features, such as image inserter, work correctly, choose the Timecode source option that matches your assets. All timecodes are in a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - Use the timecode that is in the input video. If no embedded timecode is in the source, the service will use Start at 0 (ZEROBASED) instead. * Start at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame to a value other than zero. You use Start timecode (Start) to provide this value.
pub fn source(&self) -> std::option::Option<&crate::model::TimecodeSource> {
self.source.as_ref()
}
/// Only use when you set Source (TimecodeSource) to Specified start (SPECIFIEDSTART). Use Start timecode (Start) to specify the timecode for the initial frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF).
pub fn start(&self) -> std::option::Option<&str> {
self.start.as_deref()
}
/// Only applies to outputs that support program-date-time stamp. Use Timestamp offset (TimestampOffset) to overwrite the timecode date without affecting the time and frame number. Provide the new date as a string in the format "yyyy-mm-dd". To use Time stamp offset, you must also enable Insert program-date-time (InsertProgramDateTime) in the output settings. For example, if the date part of your timecodes is 2002-1-25 and you want to change it to one year later, set Timestamp offset (TimestampOffset) to 2003-1-25.
pub fn timestamp_offset(&self) -> std::option::Option<&str> {
self.timestamp_offset.as_deref()
}
}
impl std::fmt::Debug for TimecodeConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TimecodeConfig");
formatter.field("anchor", &self.anchor);
formatter.field("source", &self.source);
formatter.field("start", &self.start);
formatter.field("timestamp_offset", &self.timestamp_offset);
formatter.finish()
}
}
/// See [`TimecodeConfig`](crate::model::TimecodeConfig)
pub mod timecode_config {
/// A builder for [`TimecodeConfig`](crate::model::TimecodeConfig)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) anchor: std::option::Option<std::string::String>,
pub(crate) source: std::option::Option<crate::model::TimecodeSource>,
pub(crate) start: std::option::Option<std::string::String>,
pub(crate) timestamp_offset: std::option::Option<std::string::String>,
}
impl Builder {
/// If you use an editing platform that relies on an anchor timecode, use Anchor Timecode (Anchor) to specify a timecode that will match the input video frame to the output video frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF). This setting ignores frame rate conversion. System behavior for Anchor Timecode varies depending on your setting for Source (TimecodeSource). * If Source (TimecodeSource) is set to Specified Start (SPECIFIEDSTART), the first input frame is the specified value in Start Timecode (Start). Anchor Timecode (Anchor) and Start Timecode (Start) are used calculate output timecode. * If Source (TimecodeSource) is set to Start at 0 (ZEROBASED) the first frame is 00:00:00:00. * If Source (TimecodeSource) is set to Embedded (EMBEDDED), the first frame is the timecode value on the first input frame of the input.
pub fn anchor(mut self, input: impl Into<std::string::String>) -> Self {
self.anchor = Some(input.into());
self
}
/// If you use an editing platform that relies on an anchor timecode, use Anchor Timecode (Anchor) to specify a timecode that will match the input video frame to the output video frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF). This setting ignores frame rate conversion. System behavior for Anchor Timecode varies depending on your setting for Source (TimecodeSource). * If Source (TimecodeSource) is set to Specified Start (SPECIFIEDSTART), the first input frame is the specified value in Start Timecode (Start). Anchor Timecode (Anchor) and Start Timecode (Start) are used calculate output timecode. * If Source (TimecodeSource) is set to Start at 0 (ZEROBASED) the first frame is 00:00:00:00. * If Source (TimecodeSource) is set to Embedded (EMBEDDED), the first frame is the timecode value on the first input frame of the input.
pub fn set_anchor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.anchor = input;
self
}
/// Use Source (TimecodeSource) to set how timecodes are handled within this job. To make sure that your video, audio, captions, and markers are synchronized and that time-based features, such as image inserter, work correctly, choose the Timecode source option that matches your assets. All timecodes are in a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - Use the timecode that is in the input video. If no embedded timecode is in the source, the service will use Start at 0 (ZEROBASED) instead. * Start at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame to a value other than zero. You use Start timecode (Start) to provide this value.
pub fn source(mut self, input: crate::model::TimecodeSource) -> Self {
self.source = Some(input);
self
}
/// Use Source (TimecodeSource) to set how timecodes are handled within this job. To make sure that your video, audio, captions, and markers are synchronized and that time-based features, such as image inserter, work correctly, choose the Timecode source option that matches your assets. All timecodes are in a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - Use the timecode that is in the input video. If no embedded timecode is in the source, the service will use Start at 0 (ZEROBASED) instead. * Start at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame to a value other than zero. You use Start timecode (Start) to provide this value.
pub fn set_source(
mut self,
input: std::option::Option<crate::model::TimecodeSource>,
) -> Self {
self.source = input;
self
}
/// Only use when you set Source (TimecodeSource) to Specified start (SPECIFIEDSTART). Use Start timecode (Start) to specify the timecode for the initial frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF).
pub fn start(mut self, input: impl Into<std::string::String>) -> Self {
self.start = Some(input.into());
self
}
/// Only use when you set Source (TimecodeSource) to Specified start (SPECIFIEDSTART). Use Start timecode (Start) to specify the timecode for the initial frame. Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF).
pub fn set_start(mut self, input: std::option::Option<std::string::String>) -> Self {
self.start = input;
self
}
/// Only applies to outputs that support program-date-time stamp. Use Timestamp offset (TimestampOffset) to overwrite the timecode date without affecting the time and frame number. Provide the new date as a string in the format "yyyy-mm-dd". To use Time stamp offset, you must also enable Insert program-date-time (InsertProgramDateTime) in the output settings. For example, if the date part of your timecodes is 2002-1-25 and you want to change it to one year later, set Timestamp offset (TimestampOffset) to 2003-1-25.
pub fn timestamp_offset(mut self, input: impl Into<std::string::String>) -> Self {
self.timestamp_offset = Some(input.into());
self
}
/// Only applies to outputs that support program-date-time stamp. Use Timestamp offset (TimestampOffset) to overwrite the timecode date without affecting the time and frame number. Provide the new date as a string in the format "yyyy-mm-dd". To use Time stamp offset, you must also enable Insert program-date-time (InsertProgramDateTime) in the output settings. For example, if the date part of your timecodes is 2002-1-25 and you want to change it to one year later, set Timestamp offset (TimestampOffset) to 2003-1-25.
pub fn set_timestamp_offset(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.timestamp_offset = input;
self
}
/// Consumes the builder and constructs a [`TimecodeConfig`](crate::model::TimecodeConfig)
pub fn build(self) -> crate::model::TimecodeConfig {
crate::model::TimecodeConfig {
anchor: self.anchor,
source: self.source,
start: self.start,
timestamp_offset: self.timestamp_offset,
}
}
}
}
impl TimecodeConfig {
/// Creates a new builder-style object to manufacture [`TimecodeConfig`](crate::model::TimecodeConfig)
pub fn builder() -> crate::model::timecode_config::Builder {
crate::model::timecode_config::Builder::default()
}
}
/// Use Source (TimecodeSource) to set how timecodes are handled within this job. To make sure that your video, audio, captions, and markers are synchronized and that time-based features, such as image inserter, work correctly, choose the Timecode source option that matches your assets. All timecodes are in a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - Use the timecode that is in the input video. If no embedded timecode is in the source, the service will use Start at 0 (ZEROBASED) instead. * Start at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame to a value other than zero. You use Start timecode (Start) to provide this value.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TimecodeSource {
#[allow(missing_docs)] // documentation missing in model
Embedded,
#[allow(missing_docs)] // documentation missing in model
Specifiedstart,
#[allow(missing_docs)] // documentation missing in model
Zerobased,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for TimecodeSource {
fn from(s: &str) -> Self {
match s {
"EMBEDDED" => TimecodeSource::Embedded,
"SPECIFIEDSTART" => TimecodeSource::Specifiedstart,
"ZEROBASED" => TimecodeSource::Zerobased,
other => TimecodeSource::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TimecodeSource {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TimecodeSource::from(s))
}
}
impl TimecodeSource {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TimecodeSource::Embedded => "EMBEDDED",
TimecodeSource::Specifiedstart => "SPECIFIEDSTART",
TimecodeSource::Zerobased => "ZEROBASED",
TimecodeSource::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EMBEDDED", "SPECIFIEDSTART", "ZEROBASED"]
}
}
impl AsRef<str> for TimecodeSource {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Group of outputs
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputGroup {
/// Use automated encoding to have MediaConvert choose your encoding settings for you, based on characteristics of your input video.
pub automated_encoding_settings: std::option::Option<crate::model::AutomatedEncodingSettings>,
/// Use Custom Group Name (CustomName) to specify a name for the output group. This value is displayed on the console and can make your job settings JSON more human-readable. It does not affect your outputs. Use up to twelve characters that are either letters, numbers, spaces, or underscores.
pub custom_name: std::option::Option<std::string::String>,
/// Name of the output group
pub name: std::option::Option<std::string::String>,
/// Output Group settings, including type
pub output_group_settings: std::option::Option<crate::model::OutputGroupSettings>,
/// This object holds groups of encoding settings, one group of settings per output.
pub outputs: std::option::Option<std::vec::Vec<crate::model::Output>>,
}
impl OutputGroup {
/// Use automated encoding to have MediaConvert choose your encoding settings for you, based on characteristics of your input video.
pub fn automated_encoding_settings(
&self,
) -> std::option::Option<&crate::model::AutomatedEncodingSettings> {
self.automated_encoding_settings.as_ref()
}
/// Use Custom Group Name (CustomName) to specify a name for the output group. This value is displayed on the console and can make your job settings JSON more human-readable. It does not affect your outputs. Use up to twelve characters that are either letters, numbers, spaces, or underscores.
pub fn custom_name(&self) -> std::option::Option<&str> {
self.custom_name.as_deref()
}
/// Name of the output group
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// Output Group settings, including type
pub fn output_group_settings(&self) -> std::option::Option<&crate::model::OutputGroupSettings> {
self.output_group_settings.as_ref()
}
/// This object holds groups of encoding settings, one group of settings per output.
pub fn outputs(&self) -> std::option::Option<&[crate::model::Output]> {
self.outputs.as_deref()
}
}
impl std::fmt::Debug for OutputGroup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputGroup");
formatter.field(
"automated_encoding_settings",
&self.automated_encoding_settings,
);
formatter.field("custom_name", &self.custom_name);
formatter.field("name", &self.name);
formatter.field("output_group_settings", &self.output_group_settings);
formatter.field("outputs", &self.outputs);
formatter.finish()
}
}
/// See [`OutputGroup`](crate::model::OutputGroup)
pub mod output_group {
/// A builder for [`OutputGroup`](crate::model::OutputGroup)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) automated_encoding_settings:
std::option::Option<crate::model::AutomatedEncodingSettings>,
pub(crate) custom_name: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) output_group_settings: std::option::Option<crate::model::OutputGroupSettings>,
pub(crate) outputs: std::option::Option<std::vec::Vec<crate::model::Output>>,
}
impl Builder {
/// Use automated encoding to have MediaConvert choose your encoding settings for you, based on characteristics of your input video.
pub fn automated_encoding_settings(
mut self,
input: crate::model::AutomatedEncodingSettings,
) -> Self {
self.automated_encoding_settings = Some(input);
self
}
/// Use automated encoding to have MediaConvert choose your encoding settings for you, based on characteristics of your input video.
pub fn set_automated_encoding_settings(
mut self,
input: std::option::Option<crate::model::AutomatedEncodingSettings>,
) -> Self {
self.automated_encoding_settings = input;
self
}
/// Use Custom Group Name (CustomName) to specify a name for the output group. This value is displayed on the console and can make your job settings JSON more human-readable. It does not affect your outputs. Use up to twelve characters that are either letters, numbers, spaces, or underscores.
pub fn custom_name(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_name = Some(input.into());
self
}
/// Use Custom Group Name (CustomName) to specify a name for the output group. This value is displayed on the console and can make your job settings JSON more human-readable. It does not affect your outputs. Use up to twelve characters that are either letters, numbers, spaces, or underscores.
pub fn set_custom_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.custom_name = input;
self
}
/// Name of the output group
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// Name of the output group
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Output Group settings, including type
pub fn output_group_settings(mut self, input: crate::model::OutputGroupSettings) -> Self {
self.output_group_settings = Some(input);
self
}
/// Output Group settings, including type
pub fn set_output_group_settings(
mut self,
input: std::option::Option<crate::model::OutputGroupSettings>,
) -> Self {
self.output_group_settings = input;
self
}
/// Appends an item to `outputs`.
///
/// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
///
/// This object holds groups of encoding settings, one group of settings per output.
pub fn outputs(mut self, input: crate::model::Output) -> Self {
let mut v = self.outputs.unwrap_or_default();
v.push(input);
self.outputs = Some(v);
self
}
/// This object holds groups of encoding settings, one group of settings per output.
pub fn set_outputs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Output>>,
) -> Self {
self.outputs = input;
self
}
/// Consumes the builder and constructs a [`OutputGroup`](crate::model::OutputGroup)
pub fn build(self) -> crate::model::OutputGroup {
crate::model::OutputGroup {
automated_encoding_settings: self.automated_encoding_settings,
custom_name: self.custom_name,
name: self.name,
output_group_settings: self.output_group_settings,
outputs: self.outputs,
}
}
}
}
impl OutputGroup {
/// Creates a new builder-style object to manufacture [`OutputGroup`](crate::model::OutputGroup)
pub fn builder() -> crate::model::output_group::Builder {
crate::model::output_group::Builder::default()
}
}
/// Each output in your job is a collection of settings that describes how you want MediaConvert to encode a single output file or stream. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/create-outputs.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Output {
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub audio_descriptions: std::option::Option<std::vec::Vec<crate::model::AudioDescription>>,
/// (CaptionDescriptions) contains groups of captions settings. For each output that has captions, include one instance of (CaptionDescriptions). (CaptionDescriptions) can contain multiple groups of captions settings.
pub caption_descriptions: std::option::Option<std::vec::Vec<crate::model::CaptionDescription>>,
/// Container specific settings.
pub container_settings: std::option::Option<crate::model::ContainerSettings>,
/// Use Extension (Extension) to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
pub extension: std::option::Option<std::string::String>,
/// Use Name modifier (NameModifier) to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier (NameModifier) is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
pub name_modifier: std::option::Option<std::string::String>,
/// Specific settings for this type of output.
pub output_settings: std::option::Option<crate::model::OutputSettings>,
/// Use Preset (Preset) to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset (Preset) or Container settings (ContainerSettings), but not both.
pub preset: std::option::Option<std::string::String>,
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub video_description: std::option::Option<crate::model::VideoDescription>,
}
impl Output {
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub fn audio_descriptions(&self) -> std::option::Option<&[crate::model::AudioDescription]> {
self.audio_descriptions.as_deref()
}
/// (CaptionDescriptions) contains groups of captions settings. For each output that has captions, include one instance of (CaptionDescriptions). (CaptionDescriptions) can contain multiple groups of captions settings.
pub fn caption_descriptions(&self) -> std::option::Option<&[crate::model::CaptionDescription]> {
self.caption_descriptions.as_deref()
}
/// Container specific settings.
pub fn container_settings(&self) -> std::option::Option<&crate::model::ContainerSettings> {
self.container_settings.as_ref()
}
/// Use Extension (Extension) to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
pub fn extension(&self) -> std::option::Option<&str> {
self.extension.as_deref()
}
/// Use Name modifier (NameModifier) to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier (NameModifier) is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
pub fn name_modifier(&self) -> std::option::Option<&str> {
self.name_modifier.as_deref()
}
/// Specific settings for this type of output.
pub fn output_settings(&self) -> std::option::Option<&crate::model::OutputSettings> {
self.output_settings.as_ref()
}
/// Use Preset (Preset) to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset (Preset) or Container settings (ContainerSettings), but not both.
pub fn preset(&self) -> std::option::Option<&str> {
self.preset.as_deref()
}
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub fn video_description(&self) -> std::option::Option<&crate::model::VideoDescription> {
self.video_description.as_ref()
}
}
impl std::fmt::Debug for Output {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Output");
formatter.field("audio_descriptions", &self.audio_descriptions);
formatter.field("caption_descriptions", &self.caption_descriptions);
formatter.field("container_settings", &self.container_settings);
formatter.field("extension", &self.extension);
formatter.field("name_modifier", &self.name_modifier);
formatter.field("output_settings", &self.output_settings);
formatter.field("preset", &self.preset);
formatter.field("video_description", &self.video_description);
formatter.finish()
}
}
/// See [`Output`](crate::model::Output)
pub mod output {
/// A builder for [`Output`](crate::model::Output)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_descriptions:
std::option::Option<std::vec::Vec<crate::model::AudioDescription>>,
pub(crate) caption_descriptions:
std::option::Option<std::vec::Vec<crate::model::CaptionDescription>>,
pub(crate) container_settings: std::option::Option<crate::model::ContainerSettings>,
pub(crate) extension: std::option::Option<std::string::String>,
pub(crate) name_modifier: std::option::Option<std::string::String>,
pub(crate) output_settings: std::option::Option<crate::model::OutputSettings>,
pub(crate) preset: std::option::Option<std::string::String>,
pub(crate) video_description: std::option::Option<crate::model::VideoDescription>,
}
impl Builder {
/// Appends an item to `audio_descriptions`.
///
/// To override the contents of this collection use [`set_audio_descriptions`](Self::set_audio_descriptions).
///
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub fn audio_descriptions(mut self, input: crate::model::AudioDescription) -> Self {
let mut v = self.audio_descriptions.unwrap_or_default();
v.push(input);
self.audio_descriptions = Some(v);
self
}
/// (AudioDescriptions) contains groups of audio encoding settings organized by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) can contain multiple groups of encoding settings.
pub fn set_audio_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AudioDescription>>,
) -> Self {
self.audio_descriptions = input;
self
}
/// Appends an item to `caption_descriptions`.
///
/// To override the contents of this collection use [`set_caption_descriptions`](Self::set_caption_descriptions).
///
/// (CaptionDescriptions) contains groups of captions settings. For each output that has captions, include one instance of (CaptionDescriptions). (CaptionDescriptions) can contain multiple groups of captions settings.
pub fn caption_descriptions(mut self, input: crate::model::CaptionDescription) -> Self {
let mut v = self.caption_descriptions.unwrap_or_default();
v.push(input);
self.caption_descriptions = Some(v);
self
}
/// (CaptionDescriptions) contains groups of captions settings. For each output that has captions, include one instance of (CaptionDescriptions). (CaptionDescriptions) can contain multiple groups of captions settings.
pub fn set_caption_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CaptionDescription>>,
) -> Self {
self.caption_descriptions = input;
self
}
/// Container specific settings.
pub fn container_settings(mut self, input: crate::model::ContainerSettings) -> Self {
self.container_settings = Some(input);
self
}
/// Container specific settings.
pub fn set_container_settings(
mut self,
input: std::option::Option<crate::model::ContainerSettings>,
) -> Self {
self.container_settings = input;
self
}
/// Use Extension (Extension) to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
pub fn extension(mut self, input: impl Into<std::string::String>) -> Self {
self.extension = Some(input.into());
self
}
/// Use Extension (Extension) to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
pub fn set_extension(mut self, input: std::option::Option<std::string::String>) -> Self {
self.extension = input;
self
}
/// Use Name modifier (NameModifier) to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier (NameModifier) is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
pub fn name_modifier(mut self, input: impl Into<std::string::String>) -> Self {
self.name_modifier = Some(input.into());
self
}
/// Use Name modifier (NameModifier) to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier (NameModifier) is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
pub fn set_name_modifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.name_modifier = input;
self
}
/// Specific settings for this type of output.
pub fn output_settings(mut self, input: crate::model::OutputSettings) -> Self {
self.output_settings = Some(input);
self
}
/// Specific settings for this type of output.
pub fn set_output_settings(
mut self,
input: std::option::Option<crate::model::OutputSettings>,
) -> Self {
self.output_settings = input;
self
}
/// Use Preset (Preset) to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset (Preset) or Container settings (ContainerSettings), but not both.
pub fn preset(mut self, input: impl Into<std::string::String>) -> Self {
self.preset = Some(input.into());
self
}
/// Use Preset (Preset) to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset (Preset) or Container settings (ContainerSettings), but not both.
pub fn set_preset(mut self, input: std::option::Option<std::string::String>) -> Self {
self.preset = input;
self
}
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub fn video_description(mut self, input: crate::model::VideoDescription) -> Self {
self.video_description = Some(input);
self
}
/// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
pub fn set_video_description(
mut self,
input: std::option::Option<crate::model::VideoDescription>,
) -> Self {
self.video_description = input;
self
}
/// Consumes the builder and constructs a [`Output`](crate::model::Output)
pub fn build(self) -> crate::model::Output {
crate::model::Output {
audio_descriptions: self.audio_descriptions,
caption_descriptions: self.caption_descriptions,
container_settings: self.container_settings,
extension: self.extension,
name_modifier: self.name_modifier,
output_settings: self.output_settings,
preset: self.preset,
video_description: self.video_description,
}
}
}
}
impl Output {
/// Creates a new builder-style object to manufacture [`Output`](crate::model::Output)
pub fn builder() -> crate::model::output::Builder {
crate::model::output::Builder::default()
}
}
/// Specific settings for this type of output.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputSettings {
/// Settings for HLS output groups
pub hls_settings: std::option::Option<crate::model::HlsSettings>,
}
impl OutputSettings {
/// Settings for HLS output groups
pub fn hls_settings(&self) -> std::option::Option<&crate::model::HlsSettings> {
self.hls_settings.as_ref()
}
}
impl std::fmt::Debug for OutputSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputSettings");
formatter.field("hls_settings", &self.hls_settings);
formatter.finish()
}
}
/// See [`OutputSettings`](crate::model::OutputSettings)
pub mod output_settings {
/// A builder for [`OutputSettings`](crate::model::OutputSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) hls_settings: std::option::Option<crate::model::HlsSettings>,
}
impl Builder {
/// Settings for HLS output groups
pub fn hls_settings(mut self, input: crate::model::HlsSettings) -> Self {
self.hls_settings = Some(input);
self
}
/// Settings for HLS output groups
pub fn set_hls_settings(
mut self,
input: std::option::Option<crate::model::HlsSettings>,
) -> Self {
self.hls_settings = input;
self
}
/// Consumes the builder and constructs a [`OutputSettings`](crate::model::OutputSettings)
pub fn build(self) -> crate::model::OutputSettings {
crate::model::OutputSettings {
hls_settings: self.hls_settings,
}
}
}
}
impl OutputSettings {
/// Creates a new builder-style object to manufacture [`OutputSettings`](crate::model::OutputSettings)
pub fn builder() -> crate::model::output_settings::Builder {
crate::model::output_settings::Builder::default()
}
}
/// Settings for HLS output groups
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsSettings {
/// Specifies the group to which the audio rendition belongs.
pub audio_group_id: std::option::Option<std::string::String>,
/// Use this setting only in audio-only outputs. Choose MPEG-2 Transport Stream (M2TS) to create a file in an MPEG2-TS container. Keep the default value Automatic (AUTOMATIC) to create an audio-only file in a raw container. Regardless of the value that you specify here, if this output has video, the service will place the output into an MPEG2-TS container.
pub audio_only_container: std::option::Option<crate::model::HlsAudioOnlyContainer>,
/// List all the audio groups that are used with the video output stream. Input all the audio GROUP-IDs that are associated to the video, separate by ','.
pub audio_rendition_sets: std::option::Option<std::string::String>,
/// Four types of audio-only tracks are supported: Audio-Only Variant Stream The client can play back this audio-only stream instead of video in low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate Audio, Auto Select, Default Alternate rendition that the client should try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default Alternate rendition that the client may try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not Auto Select Alternate rendition that the client will not try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=NO
pub audio_track_type: std::option::Option<crate::model::HlsAudioTrackType>,
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub descriptive_video_service_flag:
std::option::Option<crate::model::HlsDescriptiveVideoServiceFlag>,
/// Choose Include (INCLUDE) to have MediaConvert generate a child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub i_frame_only_manifest: std::option::Option<crate::model::HlsIFrameOnlyManifest>,
/// Use this setting to add an identifying string to the filename of each segment. The service adds this string between the name modifier and segment index number. You can use format identifiers in the string. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/using-variables-in-your-job-settings.html
pub segment_modifier: std::option::Option<std::string::String>,
}
impl HlsSettings {
/// Specifies the group to which the audio rendition belongs.
pub fn audio_group_id(&self) -> std::option::Option<&str> {
self.audio_group_id.as_deref()
}
/// Use this setting only in audio-only outputs. Choose MPEG-2 Transport Stream (M2TS) to create a file in an MPEG2-TS container. Keep the default value Automatic (AUTOMATIC) to create an audio-only file in a raw container. Regardless of the value that you specify here, if this output has video, the service will place the output into an MPEG2-TS container.
pub fn audio_only_container(
&self,
) -> std::option::Option<&crate::model::HlsAudioOnlyContainer> {
self.audio_only_container.as_ref()
}
/// List all the audio groups that are used with the video output stream. Input all the audio GROUP-IDs that are associated to the video, separate by ','.
pub fn audio_rendition_sets(&self) -> std::option::Option<&str> {
self.audio_rendition_sets.as_deref()
}
/// Four types of audio-only tracks are supported: Audio-Only Variant Stream The client can play back this audio-only stream instead of video in low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate Audio, Auto Select, Default Alternate rendition that the client should try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default Alternate rendition that the client may try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not Auto Select Alternate rendition that the client will not try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=NO
pub fn audio_track_type(&self) -> std::option::Option<&crate::model::HlsAudioTrackType> {
self.audio_track_type.as_ref()
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub fn descriptive_video_service_flag(
&self,
) -> std::option::Option<&crate::model::HlsDescriptiveVideoServiceFlag> {
self.descriptive_video_service_flag.as_ref()
}
/// Choose Include (INCLUDE) to have MediaConvert generate a child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub fn i_frame_only_manifest(
&self,
) -> std::option::Option<&crate::model::HlsIFrameOnlyManifest> {
self.i_frame_only_manifest.as_ref()
}
/// Use this setting to add an identifying string to the filename of each segment. The service adds this string between the name modifier and segment index number. You can use format identifiers in the string. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/using-variables-in-your-job-settings.html
pub fn segment_modifier(&self) -> std::option::Option<&str> {
self.segment_modifier.as_deref()
}
}
impl std::fmt::Debug for HlsSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsSettings");
formatter.field("audio_group_id", &self.audio_group_id);
formatter.field("audio_only_container", &self.audio_only_container);
formatter.field("audio_rendition_sets", &self.audio_rendition_sets);
formatter.field("audio_track_type", &self.audio_track_type);
formatter.field(
"descriptive_video_service_flag",
&self.descriptive_video_service_flag,
);
formatter.field("i_frame_only_manifest", &self.i_frame_only_manifest);
formatter.field("segment_modifier", &self.segment_modifier);
formatter.finish()
}
}
/// See [`HlsSettings`](crate::model::HlsSettings)
pub mod hls_settings {
/// A builder for [`HlsSettings`](crate::model::HlsSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_group_id: std::option::Option<std::string::String>,
pub(crate) audio_only_container: std::option::Option<crate::model::HlsAudioOnlyContainer>,
pub(crate) audio_rendition_sets: std::option::Option<std::string::String>,
pub(crate) audio_track_type: std::option::Option<crate::model::HlsAudioTrackType>,
pub(crate) descriptive_video_service_flag:
std::option::Option<crate::model::HlsDescriptiveVideoServiceFlag>,
pub(crate) i_frame_only_manifest: std::option::Option<crate::model::HlsIFrameOnlyManifest>,
pub(crate) segment_modifier: std::option::Option<std::string::String>,
}
impl Builder {
/// Specifies the group to which the audio rendition belongs.
pub fn audio_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.audio_group_id = Some(input.into());
self
}
/// Specifies the group to which the audio rendition belongs.
pub fn set_audio_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.audio_group_id = input;
self
}
/// Use this setting only in audio-only outputs. Choose MPEG-2 Transport Stream (M2TS) to create a file in an MPEG2-TS container. Keep the default value Automatic (AUTOMATIC) to create an audio-only file in a raw container. Regardless of the value that you specify here, if this output has video, the service will place the output into an MPEG2-TS container.
pub fn audio_only_container(mut self, input: crate::model::HlsAudioOnlyContainer) -> Self {
self.audio_only_container = Some(input);
self
}
/// Use this setting only in audio-only outputs. Choose MPEG-2 Transport Stream (M2TS) to create a file in an MPEG2-TS container. Keep the default value Automatic (AUTOMATIC) to create an audio-only file in a raw container. Regardless of the value that you specify here, if this output has video, the service will place the output into an MPEG2-TS container.
pub fn set_audio_only_container(
mut self,
input: std::option::Option<crate::model::HlsAudioOnlyContainer>,
) -> Self {
self.audio_only_container = input;
self
}
/// List all the audio groups that are used with the video output stream. Input all the audio GROUP-IDs that are associated to the video, separate by ','.
pub fn audio_rendition_sets(mut self, input: impl Into<std::string::String>) -> Self {
self.audio_rendition_sets = Some(input.into());
self
}
/// List all the audio groups that are used with the video output stream. Input all the audio GROUP-IDs that are associated to the video, separate by ','.
pub fn set_audio_rendition_sets(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.audio_rendition_sets = input;
self
}
/// Four types of audio-only tracks are supported: Audio-Only Variant Stream The client can play back this audio-only stream instead of video in low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate Audio, Auto Select, Default Alternate rendition that the client should try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default Alternate rendition that the client may try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not Auto Select Alternate rendition that the client will not try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=NO
pub fn audio_track_type(mut self, input: crate::model::HlsAudioTrackType) -> Self {
self.audio_track_type = Some(input);
self
}
/// Four types of audio-only tracks are supported: Audio-Only Variant Stream The client can play back this audio-only stream instead of video in low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate Audio, Auto Select, Default Alternate rendition that the client should try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default Alternate rendition that the client may try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not Auto Select Alternate rendition that the client will not try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=NO
pub fn set_audio_track_type(
mut self,
input: std::option::Option<crate::model::HlsAudioTrackType>,
) -> Self {
self.audio_track_type = input;
self
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub fn descriptive_video_service_flag(
mut self,
input: crate::model::HlsDescriptiveVideoServiceFlag,
) -> Self {
self.descriptive_video_service_flag = Some(input);
self
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
pub fn set_descriptive_video_service_flag(
mut self,
input: std::option::Option<crate::model::HlsDescriptiveVideoServiceFlag>,
) -> Self {
self.descriptive_video_service_flag = input;
self
}
/// Choose Include (INCLUDE) to have MediaConvert generate a child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub fn i_frame_only_manifest(mut self, input: crate::model::HlsIFrameOnlyManifest) -> Self {
self.i_frame_only_manifest = Some(input);
self
}
/// Choose Include (INCLUDE) to have MediaConvert generate a child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
pub fn set_i_frame_only_manifest(
mut self,
input: std::option::Option<crate::model::HlsIFrameOnlyManifest>,
) -> Self {
self.i_frame_only_manifest = input;
self
}
/// Use this setting to add an identifying string to the filename of each segment. The service adds this string between the name modifier and segment index number. You can use format identifiers in the string. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/using-variables-in-your-job-settings.html
pub fn segment_modifier(mut self, input: impl Into<std::string::String>) -> Self {
self.segment_modifier = Some(input.into());
self
}
/// Use this setting to add an identifying string to the filename of each segment. The service adds this string between the name modifier and segment index number. You can use format identifiers in the string. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/using-variables-in-your-job-settings.html
pub fn set_segment_modifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.segment_modifier = input;
self
}
/// Consumes the builder and constructs a [`HlsSettings`](crate::model::HlsSettings)
pub fn build(self) -> crate::model::HlsSettings {
crate::model::HlsSettings {
audio_group_id: self.audio_group_id,
audio_only_container: self.audio_only_container,
audio_rendition_sets: self.audio_rendition_sets,
audio_track_type: self.audio_track_type,
descriptive_video_service_flag: self.descriptive_video_service_flag,
i_frame_only_manifest: self.i_frame_only_manifest,
segment_modifier: self.segment_modifier,
}
}
}
}
impl HlsSettings {
/// Creates a new builder-style object to manufacture [`HlsSettings`](crate::model::HlsSettings)
pub fn builder() -> crate::model::hls_settings::Builder {
crate::model::hls_settings::Builder::default()
}
}
/// Choose Include (INCLUDE) to have MediaConvert generate a child manifest that lists only the I-frames for this rendition, in addition to your regular manifest for this rendition. You might use this manifest as part of a workflow that creates preview functions for your video. MediaConvert adds both the I-frame only child manifest and the regular child manifest to the parent manifest. When you don't need the I-frame only child manifest, keep the default value Exclude (EXCLUDE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsIFrameOnlyManifest {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsIFrameOnlyManifest {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => HlsIFrameOnlyManifest::Exclude,
"INCLUDE" => HlsIFrameOnlyManifest::Include,
other => HlsIFrameOnlyManifest::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsIFrameOnlyManifest {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsIFrameOnlyManifest::from(s))
}
}
impl HlsIFrameOnlyManifest {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsIFrameOnlyManifest::Exclude => "EXCLUDE",
HlsIFrameOnlyManifest::Include => "INCLUDE",
HlsIFrameOnlyManifest::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for HlsIFrameOnlyManifest {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether to flag this audio track as descriptive video service (DVS) in your HLS parent manifest. When you choose Flag (FLAG), MediaConvert includes the parameter CHARACTERISTICS="public.accessibility.describes-video" in the EXT-X-MEDIA entry for this track. When you keep the default choice, Don't flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS flag can help with accessibility on Apple devices. For more information, see the Apple documentation.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsDescriptiveVideoServiceFlag {
#[allow(missing_docs)] // documentation missing in model
DontFlag,
#[allow(missing_docs)] // documentation missing in model
Flag,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsDescriptiveVideoServiceFlag {
fn from(s: &str) -> Self {
match s {
"DONT_FLAG" => HlsDescriptiveVideoServiceFlag::DontFlag,
"FLAG" => HlsDescriptiveVideoServiceFlag::Flag,
other => HlsDescriptiveVideoServiceFlag::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsDescriptiveVideoServiceFlag {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsDescriptiveVideoServiceFlag::from(s))
}
}
impl HlsDescriptiveVideoServiceFlag {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsDescriptiveVideoServiceFlag::DontFlag => "DONT_FLAG",
HlsDescriptiveVideoServiceFlag::Flag => "FLAG",
HlsDescriptiveVideoServiceFlag::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DONT_FLAG", "FLAG"]
}
}
impl AsRef<str> for HlsDescriptiveVideoServiceFlag {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Four types of audio-only tracks are supported: Audio-Only Variant Stream The client can play back this audio-only stream instead of video in low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate Audio, Auto Select, Default Alternate rendition that the client should try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default Alternate rendition that the client may try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not Auto Select Alternate rendition that the client will not try to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=NO
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsAudioTrackType {
#[allow(missing_docs)] // documentation missing in model
AlternateAudioAutoSelect,
#[allow(missing_docs)] // documentation missing in model
AlternateAudioAutoSelectDefault,
#[allow(missing_docs)] // documentation missing in model
AlternateAudioNotAutoSelect,
#[allow(missing_docs)] // documentation missing in model
AudioOnlyVariantStream,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsAudioTrackType {
fn from(s: &str) -> Self {
match s {
"ALTERNATE_AUDIO_AUTO_SELECT" => HlsAudioTrackType::AlternateAudioAutoSelect,
"ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" => {
HlsAudioTrackType::AlternateAudioAutoSelectDefault
}
"ALTERNATE_AUDIO_NOT_AUTO_SELECT" => HlsAudioTrackType::AlternateAudioNotAutoSelect,
"AUDIO_ONLY_VARIANT_STREAM" => HlsAudioTrackType::AudioOnlyVariantStream,
other => HlsAudioTrackType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsAudioTrackType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsAudioTrackType::from(s))
}
}
impl HlsAudioTrackType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsAudioTrackType::AlternateAudioAutoSelect => "ALTERNATE_AUDIO_AUTO_SELECT",
HlsAudioTrackType::AlternateAudioAutoSelectDefault => {
"ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT"
}
HlsAudioTrackType::AlternateAudioNotAutoSelect => "ALTERNATE_AUDIO_NOT_AUTO_SELECT",
HlsAudioTrackType::AudioOnlyVariantStream => "AUDIO_ONLY_VARIANT_STREAM",
HlsAudioTrackType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ALTERNATE_AUDIO_AUTO_SELECT",
"ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT",
"ALTERNATE_AUDIO_NOT_AUTO_SELECT",
"AUDIO_ONLY_VARIANT_STREAM",
]
}
}
impl AsRef<str> for HlsAudioTrackType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting only in audio-only outputs. Choose MPEG-2 Transport Stream (M2TS) to create a file in an MPEG2-TS container. Keep the default value Automatic (AUTOMATIC) to create a raw audio-only file with no container. Regardless of the value that you specify here, if this output has video, the service will place outputs into an MPEG2-TS container.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsAudioOnlyContainer {
#[allow(missing_docs)] // documentation missing in model
Automatic,
#[allow(missing_docs)] // documentation missing in model
M2Ts,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsAudioOnlyContainer {
fn from(s: &str) -> Self {
match s {
"AUTOMATIC" => HlsAudioOnlyContainer::Automatic,
"M2TS" => HlsAudioOnlyContainer::M2Ts,
other => HlsAudioOnlyContainer::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsAudioOnlyContainer {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsAudioOnlyContainer::from(s))
}
}
impl HlsAudioOnlyContainer {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsAudioOnlyContainer::Automatic => "AUTOMATIC",
HlsAudioOnlyContainer::M2Ts => "M2TS",
HlsAudioOnlyContainer::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTOMATIC", "M2TS"]
}
}
impl AsRef<str> for HlsAudioOnlyContainer {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// This object holds groups of settings related to captions for one output. For each output that has captions, include one instance of CaptionDescriptions.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptionDescription {
/// Specifies which "Caption Selector":#inputs-caption_selector to use from each input when generating captions. The name should be of the format "Caption Selector <n>
/// ", which denotes that the Nth Caption Selector will be used from each input.
/// </n>
pub caption_selector_name: std::option::Option<std::string::String>,
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub custom_language_code: std::option::Option<std::string::String>,
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub destination_settings: std::option::Option<crate::model::CaptionDestinationSettings>,
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub language_code: std::option::Option<crate::model::LanguageCode>,
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub language_description: std::option::Option<std::string::String>,
}
impl CaptionDescription {
/// Specifies which "Caption Selector":#inputs-caption_selector to use from each input when generating captions. The name should be of the format "Caption Selector <n>
/// ", which denotes that the Nth Caption Selector will be used from each input.
/// </n>
pub fn caption_selector_name(&self) -> std::option::Option<&str> {
self.caption_selector_name.as_deref()
}
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn custom_language_code(&self) -> std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub fn destination_settings(
&self,
) -> std::option::Option<&crate::model::CaptionDestinationSettings> {
self.destination_settings.as_ref()
}
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn language_description(&self) -> std::option::Option<&str> {
self.language_description.as_deref()
}
}
impl std::fmt::Debug for CaptionDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptionDescription");
formatter.field("caption_selector_name", &self.caption_selector_name);
formatter.field("custom_language_code", &self.custom_language_code);
formatter.field("destination_settings", &self.destination_settings);
formatter.field("language_code", &self.language_code);
formatter.field("language_description", &self.language_description);
formatter.finish()
}
}
/// See [`CaptionDescription`](crate::model::CaptionDescription)
pub mod caption_description {
/// A builder for [`CaptionDescription`](crate::model::CaptionDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) caption_selector_name: std::option::Option<std::string::String>,
pub(crate) custom_language_code: std::option::Option<std::string::String>,
pub(crate) destination_settings:
std::option::Option<crate::model::CaptionDestinationSettings>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) language_description: std::option::Option<std::string::String>,
}
impl Builder {
/// Specifies which "Caption Selector":#inputs-caption_selector to use from each input when generating captions. The name should be of the format "Caption Selector <n>
/// ", which denotes that the Nth Caption Selector will be used from each input.
/// </n>
pub fn caption_selector_name(mut self, input: impl Into<std::string::String>) -> Self {
self.caption_selector_name = Some(input.into());
self
}
/// Specifies which "Caption Selector":#inputs-caption_selector to use from each input when generating captions. The name should be of the format "Caption Selector <n>
/// ", which denotes that the Nth Caption Selector will be used from each input.
/// </n>
pub fn set_caption_selector_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.caption_selector_name = input;
self
}
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn custom_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_language_code = Some(input.into());
self
}
/// Specify the language for this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information when automatically selecting the font script for rendering the captions text. For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For streaming outputs, you can also use any other code in the full RFC-5646 specification. Streaming outputs are those that are in one of the following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth Streaming.
pub fn set_custom_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_language_code = input;
self
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub fn destination_settings(
mut self,
input: crate::model::CaptionDestinationSettings,
) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings related to one captions tab on the MediaConvert console. In your job JSON, an instance of captions DestinationSettings is equivalent to one captions tab in the console. Usually, one captions tab corresponds to one output captions track. Depending on your output captions format, one tab might correspond to a set of output captions tracks. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/including-captions.html.
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::CaptionDestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
/// Specify the language of this captions output track. For most captions output formats, the encoder puts this language information in the output captions metadata. If your output captions format is DVB-Sub or Burn in, the encoder uses this language information to choose the font language for rendering the captions text.
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn language_description(mut self, input: impl Into<std::string::String>) -> Self {
self.language_description = Some(input.into());
self
}
/// Specify a label for this set of output captions. For example, "English", "Director commentary", or "track_2". For streaming outputs, MediaConvert passes this information into destination manifests for display on the end-viewer's player device. For outputs in other output groups, the service ignores this setting.
pub fn set_language_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.language_description = input;
self
}
/// Consumes the builder and constructs a [`CaptionDescription`](crate::model::CaptionDescription)
pub fn build(self) -> crate::model::CaptionDescription {
crate::model::CaptionDescription {
caption_selector_name: self.caption_selector_name,
custom_language_code: self.custom_language_code,
destination_settings: self.destination_settings,
language_code: self.language_code,
language_description: self.language_description,
}
}
}
}
impl CaptionDescription {
/// Creates a new builder-style object to manufacture [`CaptionDescription`](crate::model::CaptionDescription)
pub fn builder() -> crate::model::caption_description::Builder {
crate::model::caption_description::Builder::default()
}
}
/// Output Group settings, including type
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputGroupSettings {
/// Settings related to your CMAF output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to CMAF_GROUP_SETTINGS.
pub cmaf_group_settings: std::option::Option<crate::model::CmafGroupSettings>,
/// Settings related to your DASH output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to DASH_ISO_GROUP_SETTINGS.
pub dash_iso_group_settings: std::option::Option<crate::model::DashIsoGroupSettings>,
/// Settings related to your File output group. MediaConvert uses this group of settings to generate a single standalone file, rather than a streaming package. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to FILE_GROUP_SETTINGS.
pub file_group_settings: std::option::Option<crate::model::FileGroupSettings>,
/// Settings related to your HLS output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to HLS_GROUP_SETTINGS.
pub hls_group_settings: std::option::Option<crate::model::HlsGroupSettings>,
/// Settings related to your Microsoft Smooth Streaming output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to MS_SMOOTH_GROUP_SETTINGS.
pub ms_smooth_group_settings: std::option::Option<crate::model::MsSmoothGroupSettings>,
/// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, CMAF)
pub r#type: std::option::Option<crate::model::OutputGroupType>,
}
impl OutputGroupSettings {
/// Settings related to your CMAF output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to CMAF_GROUP_SETTINGS.
pub fn cmaf_group_settings(&self) -> std::option::Option<&crate::model::CmafGroupSettings> {
self.cmaf_group_settings.as_ref()
}
/// Settings related to your DASH output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to DASH_ISO_GROUP_SETTINGS.
pub fn dash_iso_group_settings(
&self,
) -> std::option::Option<&crate::model::DashIsoGroupSettings> {
self.dash_iso_group_settings.as_ref()
}
/// Settings related to your File output group. MediaConvert uses this group of settings to generate a single standalone file, rather than a streaming package. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to FILE_GROUP_SETTINGS.
pub fn file_group_settings(&self) -> std::option::Option<&crate::model::FileGroupSettings> {
self.file_group_settings.as_ref()
}
/// Settings related to your HLS output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to HLS_GROUP_SETTINGS.
pub fn hls_group_settings(&self) -> std::option::Option<&crate::model::HlsGroupSettings> {
self.hls_group_settings.as_ref()
}
/// Settings related to your Microsoft Smooth Streaming output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to MS_SMOOTH_GROUP_SETTINGS.
pub fn ms_smooth_group_settings(
&self,
) -> std::option::Option<&crate::model::MsSmoothGroupSettings> {
self.ms_smooth_group_settings.as_ref()
}
/// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, CMAF)
pub fn r#type(&self) -> std::option::Option<&crate::model::OutputGroupType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for OutputGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputGroupSettings");
formatter.field("cmaf_group_settings", &self.cmaf_group_settings);
formatter.field("dash_iso_group_settings", &self.dash_iso_group_settings);
formatter.field("file_group_settings", &self.file_group_settings);
formatter.field("hls_group_settings", &self.hls_group_settings);
formatter.field("ms_smooth_group_settings", &self.ms_smooth_group_settings);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`OutputGroupSettings`](crate::model::OutputGroupSettings)
pub mod output_group_settings {
/// A builder for [`OutputGroupSettings`](crate::model::OutputGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) cmaf_group_settings: std::option::Option<crate::model::CmafGroupSettings>,
pub(crate) dash_iso_group_settings: std::option::Option<crate::model::DashIsoGroupSettings>,
pub(crate) file_group_settings: std::option::Option<crate::model::FileGroupSettings>,
pub(crate) hls_group_settings: std::option::Option<crate::model::HlsGroupSettings>,
pub(crate) ms_smooth_group_settings:
std::option::Option<crate::model::MsSmoothGroupSettings>,
pub(crate) r#type: std::option::Option<crate::model::OutputGroupType>,
}
impl Builder {
/// Settings related to your CMAF output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to CMAF_GROUP_SETTINGS.
pub fn cmaf_group_settings(mut self, input: crate::model::CmafGroupSettings) -> Self {
self.cmaf_group_settings = Some(input);
self
}
/// Settings related to your CMAF output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to CMAF_GROUP_SETTINGS.
pub fn set_cmaf_group_settings(
mut self,
input: std::option::Option<crate::model::CmafGroupSettings>,
) -> Self {
self.cmaf_group_settings = input;
self
}
/// Settings related to your DASH output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to DASH_ISO_GROUP_SETTINGS.
pub fn dash_iso_group_settings(
mut self,
input: crate::model::DashIsoGroupSettings,
) -> Self {
self.dash_iso_group_settings = Some(input);
self
}
/// Settings related to your DASH output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to DASH_ISO_GROUP_SETTINGS.
pub fn set_dash_iso_group_settings(
mut self,
input: std::option::Option<crate::model::DashIsoGroupSettings>,
) -> Self {
self.dash_iso_group_settings = input;
self
}
/// Settings related to your File output group. MediaConvert uses this group of settings to generate a single standalone file, rather than a streaming package. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to FILE_GROUP_SETTINGS.
pub fn file_group_settings(mut self, input: crate::model::FileGroupSettings) -> Self {
self.file_group_settings = Some(input);
self
}
/// Settings related to your File output group. MediaConvert uses this group of settings to generate a single standalone file, rather than a streaming package. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to FILE_GROUP_SETTINGS.
pub fn set_file_group_settings(
mut self,
input: std::option::Option<crate::model::FileGroupSettings>,
) -> Self {
self.file_group_settings = input;
self
}
/// Settings related to your HLS output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to HLS_GROUP_SETTINGS.
pub fn hls_group_settings(mut self, input: crate::model::HlsGroupSettings) -> Self {
self.hls_group_settings = Some(input);
self
}
/// Settings related to your HLS output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to HLS_GROUP_SETTINGS.
pub fn set_hls_group_settings(
mut self,
input: std::option::Option<crate::model::HlsGroupSettings>,
) -> Self {
self.hls_group_settings = input;
self
}
/// Settings related to your Microsoft Smooth Streaming output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to MS_SMOOTH_GROUP_SETTINGS.
pub fn ms_smooth_group_settings(
mut self,
input: crate::model::MsSmoothGroupSettings,
) -> Self {
self.ms_smooth_group_settings = Some(input);
self
}
/// Settings related to your Microsoft Smooth Streaming output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to MS_SMOOTH_GROUP_SETTINGS.
pub fn set_ms_smooth_group_settings(
mut self,
input: std::option::Option<crate::model::MsSmoothGroupSettings>,
) -> Self {
self.ms_smooth_group_settings = input;
self
}
/// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, CMAF)
pub fn r#type(mut self, input: crate::model::OutputGroupType) -> Self {
self.r#type = Some(input);
self
}
/// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, CMAF)
pub fn set_type(
mut self,
input: std::option::Option<crate::model::OutputGroupType>,
) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`OutputGroupSettings`](crate::model::OutputGroupSettings)
pub fn build(self) -> crate::model::OutputGroupSettings {
crate::model::OutputGroupSettings {
cmaf_group_settings: self.cmaf_group_settings,
dash_iso_group_settings: self.dash_iso_group_settings,
file_group_settings: self.file_group_settings,
hls_group_settings: self.hls_group_settings,
ms_smooth_group_settings: self.ms_smooth_group_settings,
r#type: self.r#type,
}
}
}
}
impl OutputGroupSettings {
/// Creates a new builder-style object to manufacture [`OutputGroupSettings`](crate::model::OutputGroupSettings)
pub fn builder() -> crate::model::output_group_settings::Builder {
crate::model::output_group_settings::Builder::default()
}
}
/// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, CMAF)
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OutputGroupType {
#[allow(missing_docs)] // documentation missing in model
CmafGroupSettings,
#[allow(missing_docs)] // documentation missing in model
DashIsoGroupSettings,
#[allow(missing_docs)] // documentation missing in model
FileGroupSettings,
#[allow(missing_docs)] // documentation missing in model
HlsGroupSettings,
#[allow(missing_docs)] // documentation missing in model
MsSmoothGroupSettings,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for OutputGroupType {
fn from(s: &str) -> Self {
match s {
"CMAF_GROUP_SETTINGS" => OutputGroupType::CmafGroupSettings,
"DASH_ISO_GROUP_SETTINGS" => OutputGroupType::DashIsoGroupSettings,
"FILE_GROUP_SETTINGS" => OutputGroupType::FileGroupSettings,
"HLS_GROUP_SETTINGS" => OutputGroupType::HlsGroupSettings,
"MS_SMOOTH_GROUP_SETTINGS" => OutputGroupType::MsSmoothGroupSettings,
other => OutputGroupType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for OutputGroupType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OutputGroupType::from(s))
}
}
impl OutputGroupType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
OutputGroupType::CmafGroupSettings => "CMAF_GROUP_SETTINGS",
OutputGroupType::DashIsoGroupSettings => "DASH_ISO_GROUP_SETTINGS",
OutputGroupType::FileGroupSettings => "FILE_GROUP_SETTINGS",
OutputGroupType::HlsGroupSettings => "HLS_GROUP_SETTINGS",
OutputGroupType::MsSmoothGroupSettings => "MS_SMOOTH_GROUP_SETTINGS",
OutputGroupType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"CMAF_GROUP_SETTINGS",
"DASH_ISO_GROUP_SETTINGS",
"FILE_GROUP_SETTINGS",
"HLS_GROUP_SETTINGS",
"MS_SMOOTH_GROUP_SETTINGS",
]
}
}
impl AsRef<str> for OutputGroupType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to your Microsoft Smooth Streaming output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to MS_SMOOTH_GROUP_SETTINGS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MsSmoothGroupSettings {
/// By default, the service creates one .ism Microsoft Smooth Streaming manifest for each Microsoft Smooth Streaming output group in your job. This default manifest references every output in the output group. To create additional manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub additional_manifests:
std::option::Option<std::vec::Vec<crate::model::MsSmoothAdditionalManifest>>,
/// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across a Microsoft Smooth output group into a single audio stream.
pub audio_deduplication: std::option::Option<crate::model::MsSmoothAudioDeduplication>,
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub destination: std::option::Option<std::string::String>,
/// Settings associated with the destination. Will vary based on the type of destination
pub destination_settings: std::option::Option<crate::model::DestinationSettings>,
/// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify the value SpekeKeyProvider.
pub encryption: std::option::Option<crate::model::MsSmoothEncryptionSettings>,
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fragment_length: i32,
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fragment_length_control: std::option::Option<crate::model::MsSmoothFragmentLengthControl>,
/// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding format for the server and client manifest. Valid options are utf8 and utf16.
pub manifest_encoding: std::option::Option<crate::model::MsSmoothManifestEncoding>,
}
impl MsSmoothGroupSettings {
/// By default, the service creates one .ism Microsoft Smooth Streaming manifest for each Microsoft Smooth Streaming output group in your job. This default manifest references every output in the output group. To create additional manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn additional_manifests(
&self,
) -> std::option::Option<&[crate::model::MsSmoothAdditionalManifest]> {
self.additional_manifests.as_deref()
}
/// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across a Microsoft Smooth output group into a single audio stream.
pub fn audio_deduplication(
&self,
) -> std::option::Option<&crate::model::MsSmoothAudioDeduplication> {
self.audio_deduplication.as_ref()
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(&self) -> std::option::Option<&crate::model::DestinationSettings> {
self.destination_settings.as_ref()
}
/// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify the value SpekeKeyProvider.
pub fn encryption(&self) -> std::option::Option<&crate::model::MsSmoothEncryptionSettings> {
self.encryption.as_ref()
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn fragment_length(&self) -> i32 {
self.fragment_length
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn fragment_length_control(
&self,
) -> std::option::Option<&crate::model::MsSmoothFragmentLengthControl> {
self.fragment_length_control.as_ref()
}
/// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding format for the server and client manifest. Valid options are utf8 and utf16.
pub fn manifest_encoding(
&self,
) -> std::option::Option<&crate::model::MsSmoothManifestEncoding> {
self.manifest_encoding.as_ref()
}
}
impl std::fmt::Debug for MsSmoothGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MsSmoothGroupSettings");
formatter.field("additional_manifests", &self.additional_manifests);
formatter.field("audio_deduplication", &self.audio_deduplication);
formatter.field("destination", &self.destination);
formatter.field("destination_settings", &self.destination_settings);
formatter.field("encryption", &self.encryption);
formatter.field("fragment_length", &self.fragment_length);
formatter.field("fragment_length_control", &self.fragment_length_control);
formatter.field("manifest_encoding", &self.manifest_encoding);
formatter.finish()
}
}
/// See [`MsSmoothGroupSettings`](crate::model::MsSmoothGroupSettings)
pub mod ms_smooth_group_settings {
/// A builder for [`MsSmoothGroupSettings`](crate::model::MsSmoothGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) additional_manifests:
std::option::Option<std::vec::Vec<crate::model::MsSmoothAdditionalManifest>>,
pub(crate) audio_deduplication:
std::option::Option<crate::model::MsSmoothAudioDeduplication>,
pub(crate) destination: std::option::Option<std::string::String>,
pub(crate) destination_settings: std::option::Option<crate::model::DestinationSettings>,
pub(crate) encryption: std::option::Option<crate::model::MsSmoothEncryptionSettings>,
pub(crate) fragment_length: std::option::Option<i32>,
pub(crate) fragment_length_control:
std::option::Option<crate::model::MsSmoothFragmentLengthControl>,
pub(crate) manifest_encoding: std::option::Option<crate::model::MsSmoothManifestEncoding>,
}
impl Builder {
/// Appends an item to `additional_manifests`.
///
/// To override the contents of this collection use [`set_additional_manifests`](Self::set_additional_manifests).
///
/// By default, the service creates one .ism Microsoft Smooth Streaming manifest for each Microsoft Smooth Streaming output group in your job. This default manifest references every output in the output group. To create additional manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn additional_manifests(
mut self,
input: crate::model::MsSmoothAdditionalManifest,
) -> Self {
let mut v = self.additional_manifests.unwrap_or_default();
v.push(input);
self.additional_manifests = Some(v);
self
}
/// By default, the service creates one .ism Microsoft Smooth Streaming manifest for each Microsoft Smooth Streaming output group in your job. This default manifest references every output in the output group. To create additional manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn set_additional_manifests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MsSmoothAdditionalManifest>>,
) -> Self {
self.additional_manifests = input;
self
}
/// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across a Microsoft Smooth output group into a single audio stream.
pub fn audio_deduplication(
mut self,
input: crate::model::MsSmoothAudioDeduplication,
) -> Self {
self.audio_deduplication = Some(input);
self
}
/// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across a Microsoft Smooth output group into a single audio stream.
pub fn set_audio_deduplication(
mut self,
input: std::option::Option<crate::model::MsSmoothAudioDeduplication>,
) -> Self {
self.audio_deduplication = input;
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(mut self, input: crate::model::DestinationSettings) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::DestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify the value SpekeKeyProvider.
pub fn encryption(mut self, input: crate::model::MsSmoothEncryptionSettings) -> Self {
self.encryption = Some(input);
self
}
/// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify the value SpekeKeyProvider.
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::MsSmoothEncryptionSettings>,
) -> Self {
self.encryption = input;
self
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn fragment_length(mut self, input: i32) -> Self {
self.fragment_length = Some(input);
self
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn set_fragment_length(mut self, input: std::option::Option<i32>) -> Self {
self.fragment_length = input;
self
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn fragment_length_control(
mut self,
input: crate::model::MsSmoothFragmentLengthControl,
) -> Self {
self.fragment_length_control = Some(input);
self
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn set_fragment_length_control(
mut self,
input: std::option::Option<crate::model::MsSmoothFragmentLengthControl>,
) -> Self {
self.fragment_length_control = input;
self
}
/// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding format for the server and client manifest. Valid options are utf8 and utf16.
pub fn manifest_encoding(mut self, input: crate::model::MsSmoothManifestEncoding) -> Self {
self.manifest_encoding = Some(input);
self
}
/// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding format for the server and client manifest. Valid options are utf8 and utf16.
pub fn set_manifest_encoding(
mut self,
input: std::option::Option<crate::model::MsSmoothManifestEncoding>,
) -> Self {
self.manifest_encoding = input;
self
}
/// Consumes the builder and constructs a [`MsSmoothGroupSettings`](crate::model::MsSmoothGroupSettings)
pub fn build(self) -> crate::model::MsSmoothGroupSettings {
crate::model::MsSmoothGroupSettings {
additional_manifests: self.additional_manifests,
audio_deduplication: self.audio_deduplication,
destination: self.destination,
destination_settings: self.destination_settings,
encryption: self.encryption,
fragment_length: self.fragment_length.unwrap_or_default(),
fragment_length_control: self.fragment_length_control,
manifest_encoding: self.manifest_encoding,
}
}
}
}
impl MsSmoothGroupSettings {
/// Creates a new builder-style object to manufacture [`MsSmoothGroupSettings`](crate::model::MsSmoothGroupSettings)
pub fn builder() -> crate::model::ms_smooth_group_settings::Builder {
crate::model::ms_smooth_group_settings::Builder::default()
}
}
/// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding format for the server and client manifest. Valid options are utf8 and utf16.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MsSmoothManifestEncoding {
#[allow(missing_docs)] // documentation missing in model
Utf16,
#[allow(missing_docs)] // documentation missing in model
Utf8,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MsSmoothManifestEncoding {
fn from(s: &str) -> Self {
match s {
"UTF16" => MsSmoothManifestEncoding::Utf16,
"UTF8" => MsSmoothManifestEncoding::Utf8,
other => MsSmoothManifestEncoding::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MsSmoothManifestEncoding {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MsSmoothManifestEncoding::from(s))
}
}
impl MsSmoothManifestEncoding {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MsSmoothManifestEncoding::Utf16 => "UTF16",
MsSmoothManifestEncoding::Utf8 => "UTF8",
MsSmoothManifestEncoding::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["UTF16", "UTF8"]
}
}
impl AsRef<str> for MsSmoothManifestEncoding {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how you want MediaConvert to determine the fragment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Fragment length (FragmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MsSmoothFragmentLengthControl {
#[allow(missing_docs)] // documentation missing in model
Exact,
#[allow(missing_docs)] // documentation missing in model
GopMultiple,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MsSmoothFragmentLengthControl {
fn from(s: &str) -> Self {
match s {
"EXACT" => MsSmoothFragmentLengthControl::Exact,
"GOP_MULTIPLE" => MsSmoothFragmentLengthControl::GopMultiple,
other => MsSmoothFragmentLengthControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MsSmoothFragmentLengthControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MsSmoothFragmentLengthControl::from(s))
}
}
impl MsSmoothFragmentLengthControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MsSmoothFragmentLengthControl::Exact => "EXACT",
MsSmoothFragmentLengthControl::GopMultiple => "GOP_MULTIPLE",
MsSmoothFragmentLengthControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXACT", "GOP_MULTIPLE"]
}
}
impl AsRef<str> for MsSmoothFragmentLengthControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify the value SpekeKeyProvider.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MsSmoothEncryptionSettings {
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl MsSmoothEncryptionSettings {
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
self.speke_key_provider.as_ref()
}
}
impl std::fmt::Debug for MsSmoothEncryptionSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MsSmoothEncryptionSettings");
formatter.field("speke_key_provider", &self.speke_key_provider);
formatter.finish()
}
}
/// See [`MsSmoothEncryptionSettings`](crate::model::MsSmoothEncryptionSettings)
pub mod ms_smooth_encryption_settings {
/// A builder for [`MsSmoothEncryptionSettings`](crate::model::MsSmoothEncryptionSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl Builder {
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
self.speke_key_provider = Some(input);
self
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn set_speke_key_provider(
mut self,
input: std::option::Option<crate::model::SpekeKeyProvider>,
) -> Self {
self.speke_key_provider = input;
self
}
/// Consumes the builder and constructs a [`MsSmoothEncryptionSettings`](crate::model::MsSmoothEncryptionSettings)
pub fn build(self) -> crate::model::MsSmoothEncryptionSettings {
crate::model::MsSmoothEncryptionSettings {
speke_key_provider: self.speke_key_provider,
}
}
}
}
impl MsSmoothEncryptionSettings {
/// Creates a new builder-style object to manufacture [`MsSmoothEncryptionSettings`](crate::model::MsSmoothEncryptionSettings)
pub fn builder() -> crate::model::ms_smooth_encryption_settings::Builder {
crate::model::ms_smooth_encryption_settings::Builder::default()
}
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SpekeKeyProvider {
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub certificate_arn: std::option::Option<std::string::String>,
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub resource_id: std::option::Option<std::string::String>,
/// Relates to SPEKE implementation. DRM system identifiers. DASH output groups support a max of two system ids. Other group types support one system id. See https://dashif.org/identifiers/content_protection/ for more details.
pub system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub url: std::option::Option<std::string::String>,
}
impl SpekeKeyProvider {
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub fn certificate_arn(&self) -> std::option::Option<&str> {
self.certificate_arn.as_deref()
}
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
/// Relates to SPEKE implementation. DRM system identifiers. DASH output groups support a max of two system ids. Other group types support one system id. See https://dashif.org/identifiers/content_protection/ for more details.
pub fn system_ids(&self) -> std::option::Option<&[std::string::String]> {
self.system_ids.as_deref()
}
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
impl std::fmt::Debug for SpekeKeyProvider {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SpekeKeyProvider");
formatter.field("certificate_arn", &self.certificate_arn);
formatter.field("resource_id", &self.resource_id);
formatter.field("system_ids", &self.system_ids);
formatter.field("url", &self.url);
formatter.finish()
}
}
/// See [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
pub mod speke_key_provider {
/// A builder for [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) certificate_arn: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) url: std::option::Option<std::string::String>,
}
impl Builder {
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub fn certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.certificate_arn = Some(input.into());
self
}
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub fn set_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.certificate_arn = input;
self
}
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
/// Appends an item to `system_ids`.
///
/// To override the contents of this collection use [`set_system_ids`](Self::set_system_ids).
///
/// Relates to SPEKE implementation. DRM system identifiers. DASH output groups support a max of two system ids. Other group types support one system id. See https://dashif.org/identifiers/content_protection/ for more details.
pub fn system_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.system_ids.unwrap_or_default();
v.push(input.into());
self.system_ids = Some(v);
self
}
/// Relates to SPEKE implementation. DRM system identifiers. DASH output groups support a max of two system ids. Other group types support one system id. See https://dashif.org/identifiers/content_protection/ for more details.
pub fn set_system_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.system_ids = input;
self
}
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
/// Consumes the builder and constructs a [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
pub fn build(self) -> crate::model::SpekeKeyProvider {
crate::model::SpekeKeyProvider {
certificate_arn: self.certificate_arn,
resource_id: self.resource_id,
system_ids: self.system_ids,
url: self.url,
}
}
}
}
impl SpekeKeyProvider {
/// Creates a new builder-style object to manufacture [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
pub fn builder() -> crate::model::speke_key_provider::Builder {
crate::model::speke_key_provider::Builder::default()
}
}
/// Settings associated with the destination. Will vary based on the type of destination
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DestinationSettings {
/// Settings associated with S3 destination
pub s3_settings: std::option::Option<crate::model::S3DestinationSettings>,
}
impl DestinationSettings {
/// Settings associated with S3 destination
pub fn s3_settings(&self) -> std::option::Option<&crate::model::S3DestinationSettings> {
self.s3_settings.as_ref()
}
}
impl std::fmt::Debug for DestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DestinationSettings");
formatter.field("s3_settings", &self.s3_settings);
formatter.finish()
}
}
/// See [`DestinationSettings`](crate::model::DestinationSettings)
pub mod destination_settings {
/// A builder for [`DestinationSettings`](crate::model::DestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3_settings: std::option::Option<crate::model::S3DestinationSettings>,
}
impl Builder {
/// Settings associated with S3 destination
pub fn s3_settings(mut self, input: crate::model::S3DestinationSettings) -> Self {
self.s3_settings = Some(input);
self
}
/// Settings associated with S3 destination
pub fn set_s3_settings(
mut self,
input: std::option::Option<crate::model::S3DestinationSettings>,
) -> Self {
self.s3_settings = input;
self
}
/// Consumes the builder and constructs a [`DestinationSettings`](crate::model::DestinationSettings)
pub fn build(self) -> crate::model::DestinationSettings {
crate::model::DestinationSettings {
s3_settings: self.s3_settings,
}
}
}
}
impl DestinationSettings {
/// Creates a new builder-style object to manufacture [`DestinationSettings`](crate::model::DestinationSettings)
pub fn builder() -> crate::model::destination_settings::Builder {
crate::model::destination_settings::Builder::default()
}
}
/// Settings associated with S3 destination
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3DestinationSettings {
/// Optional. Have MediaConvert automatically apply Amazon S3 access control for the outputs in this output group. When you don't use this setting, S3 automatically applies the default access control list PRIVATE.
pub access_control: std::option::Option<crate::model::S3DestinationAccessControl>,
/// Settings for how your job outputs are encrypted as they are uploaded to Amazon S3.
pub encryption: std::option::Option<crate::model::S3EncryptionSettings>,
}
impl S3DestinationSettings {
/// Optional. Have MediaConvert automatically apply Amazon S3 access control for the outputs in this output group. When you don't use this setting, S3 automatically applies the default access control list PRIVATE.
pub fn access_control(&self) -> std::option::Option<&crate::model::S3DestinationAccessControl> {
self.access_control.as_ref()
}
/// Settings for how your job outputs are encrypted as they are uploaded to Amazon S3.
pub fn encryption(&self) -> std::option::Option<&crate::model::S3EncryptionSettings> {
self.encryption.as_ref()
}
}
impl std::fmt::Debug for S3DestinationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3DestinationSettings");
formatter.field("access_control", &self.access_control);
formatter.field("encryption", &self.encryption);
formatter.finish()
}
}
/// See [`S3DestinationSettings`](crate::model::S3DestinationSettings)
pub mod s3_destination_settings {
/// A builder for [`S3DestinationSettings`](crate::model::S3DestinationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) access_control: std::option::Option<crate::model::S3DestinationAccessControl>,
pub(crate) encryption: std::option::Option<crate::model::S3EncryptionSettings>,
}
impl Builder {
/// Optional. Have MediaConvert automatically apply Amazon S3 access control for the outputs in this output group. When you don't use this setting, S3 automatically applies the default access control list PRIVATE.
pub fn access_control(mut self, input: crate::model::S3DestinationAccessControl) -> Self {
self.access_control = Some(input);
self
}
/// Optional. Have MediaConvert automatically apply Amazon S3 access control for the outputs in this output group. When you don't use this setting, S3 automatically applies the default access control list PRIVATE.
pub fn set_access_control(
mut self,
input: std::option::Option<crate::model::S3DestinationAccessControl>,
) -> Self {
self.access_control = input;
self
}
/// Settings for how your job outputs are encrypted as they are uploaded to Amazon S3.
pub fn encryption(mut self, input: crate::model::S3EncryptionSettings) -> Self {
self.encryption = Some(input);
self
}
/// Settings for how your job outputs are encrypted as they are uploaded to Amazon S3.
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::S3EncryptionSettings>,
) -> Self {
self.encryption = input;
self
}
/// Consumes the builder and constructs a [`S3DestinationSettings`](crate::model::S3DestinationSettings)
pub fn build(self) -> crate::model::S3DestinationSettings {
crate::model::S3DestinationSettings {
access_control: self.access_control,
encryption: self.encryption,
}
}
}
}
impl S3DestinationSettings {
/// Creates a new builder-style object to manufacture [`S3DestinationSettings`](crate::model::S3DestinationSettings)
pub fn builder() -> crate::model::s3_destination_settings::Builder {
crate::model::s3_destination_settings::Builder::default()
}
}
/// Settings for how your job outputs are encrypted as they are uploaded to Amazon S3.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3EncryptionSettings {
/// Specify how you want your data keys managed. AWS uses data keys to encrypt your content. AWS also encrypts the data keys themselves, using a customer master key (CMK), and then stores the encrypted data keys alongside your encrypted content. Use this setting to specify which AWS service manages the CMK. For simplest set up, choose Amazon S3 (SERVER_SIDE_ENCRYPTION_S3). If you want your master key to be managed by AWS Key Management Service (KMS), choose AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). By default, when you choose AWS KMS, KMS uses the AWS managed customer master key (CMK) associated with Amazon S3 to encrypt your data keys. You can optionally choose to specify a different, customer managed CMK. Do so by specifying the Amazon Resource Name (ARN) of the key for the setting KMS ARN (kmsKeyArn).
pub encryption_type: std::option::Option<crate::model::S3ServerSideEncryptionType>,
/// Optionally, specify the encryption context that you want to use alongside your KMS key. AWS KMS uses this encryption context as additional authenticated data (AAD) to support authenticated encryption. This value must be a base64-encoded UTF-8 string holding JSON which represents a string-string map. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). For more information about encryption context, see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context.
pub kms_encryption_context: std::option::Option<std::string::String>,
/// Optionally, specify the customer master key (CMK) that you want to use to encrypt the data key that AWS uses to encrypt your output content. Enter the Amazon Resource Name (ARN) of the CMK. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). If you set Server-side encryption to AWS KMS but don't specify a CMK here, AWS uses the AWS managed CMK associated with Amazon S3.
pub kms_key_arn: std::option::Option<std::string::String>,
}
impl S3EncryptionSettings {
/// Specify how you want your data keys managed. AWS uses data keys to encrypt your content. AWS also encrypts the data keys themselves, using a customer master key (CMK), and then stores the encrypted data keys alongside your encrypted content. Use this setting to specify which AWS service manages the CMK. For simplest set up, choose Amazon S3 (SERVER_SIDE_ENCRYPTION_S3). If you want your master key to be managed by AWS Key Management Service (KMS), choose AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). By default, when you choose AWS KMS, KMS uses the AWS managed customer master key (CMK) associated with Amazon S3 to encrypt your data keys. You can optionally choose to specify a different, customer managed CMK. Do so by specifying the Amazon Resource Name (ARN) of the key for the setting KMS ARN (kmsKeyArn).
pub fn encryption_type(
&self,
) -> std::option::Option<&crate::model::S3ServerSideEncryptionType> {
self.encryption_type.as_ref()
}
/// Optionally, specify the encryption context that you want to use alongside your KMS key. AWS KMS uses this encryption context as additional authenticated data (AAD) to support authenticated encryption. This value must be a base64-encoded UTF-8 string holding JSON which represents a string-string map. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). For more information about encryption context, see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context.
pub fn kms_encryption_context(&self) -> std::option::Option<&str> {
self.kms_encryption_context.as_deref()
}
/// Optionally, specify the customer master key (CMK) that you want to use to encrypt the data key that AWS uses to encrypt your output content. Enter the Amazon Resource Name (ARN) of the CMK. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). If you set Server-side encryption to AWS KMS but don't specify a CMK here, AWS uses the AWS managed CMK associated with Amazon S3.
pub fn kms_key_arn(&self) -> std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
}
impl std::fmt::Debug for S3EncryptionSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3EncryptionSettings");
formatter.field("encryption_type", &self.encryption_type);
formatter.field("kms_encryption_context", &self.kms_encryption_context);
formatter.field("kms_key_arn", &self.kms_key_arn);
formatter.finish()
}
}
/// See [`S3EncryptionSettings`](crate::model::S3EncryptionSettings)
pub mod s3_encryption_settings {
/// A builder for [`S3EncryptionSettings`](crate::model::S3EncryptionSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) encryption_type: std::option::Option<crate::model::S3ServerSideEncryptionType>,
pub(crate) kms_encryption_context: std::option::Option<std::string::String>,
pub(crate) kms_key_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// Specify how you want your data keys managed. AWS uses data keys to encrypt your content. AWS also encrypts the data keys themselves, using a customer master key (CMK), and then stores the encrypted data keys alongside your encrypted content. Use this setting to specify which AWS service manages the CMK. For simplest set up, choose Amazon S3 (SERVER_SIDE_ENCRYPTION_S3). If you want your master key to be managed by AWS Key Management Service (KMS), choose AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). By default, when you choose AWS KMS, KMS uses the AWS managed customer master key (CMK) associated with Amazon S3 to encrypt your data keys. You can optionally choose to specify a different, customer managed CMK. Do so by specifying the Amazon Resource Name (ARN) of the key for the setting KMS ARN (kmsKeyArn).
pub fn encryption_type(mut self, input: crate::model::S3ServerSideEncryptionType) -> Self {
self.encryption_type = Some(input);
self
}
/// Specify how you want your data keys managed. AWS uses data keys to encrypt your content. AWS also encrypts the data keys themselves, using a customer master key (CMK), and then stores the encrypted data keys alongside your encrypted content. Use this setting to specify which AWS service manages the CMK. For simplest set up, choose Amazon S3 (SERVER_SIDE_ENCRYPTION_S3). If you want your master key to be managed by AWS Key Management Service (KMS), choose AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). By default, when you choose AWS KMS, KMS uses the AWS managed customer master key (CMK) associated with Amazon S3 to encrypt your data keys. You can optionally choose to specify a different, customer managed CMK. Do so by specifying the Amazon Resource Name (ARN) of the key for the setting KMS ARN (kmsKeyArn).
pub fn set_encryption_type(
mut self,
input: std::option::Option<crate::model::S3ServerSideEncryptionType>,
) -> Self {
self.encryption_type = input;
self
}
/// Optionally, specify the encryption context that you want to use alongside your KMS key. AWS KMS uses this encryption context as additional authenticated data (AAD) to support authenticated encryption. This value must be a base64-encoded UTF-8 string holding JSON which represents a string-string map. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). For more information about encryption context, see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context.
pub fn kms_encryption_context(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_encryption_context = Some(input.into());
self
}
/// Optionally, specify the encryption context that you want to use alongside your KMS key. AWS KMS uses this encryption context as additional authenticated data (AAD) to support authenticated encryption. This value must be a base64-encoded UTF-8 string holding JSON which represents a string-string map. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). For more information about encryption context, see: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context.
pub fn set_kms_encryption_context(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.kms_encryption_context = input;
self
}
/// Optionally, specify the customer master key (CMK) that you want to use to encrypt the data key that AWS uses to encrypt your output content. Enter the Amazon Resource Name (ARN) of the CMK. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). If you set Server-side encryption to AWS KMS but don't specify a CMK here, AWS uses the AWS managed CMK associated with Amazon S3.
pub fn kms_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_arn = Some(input.into());
self
}
/// Optionally, specify the customer master key (CMK) that you want to use to encrypt the data key that AWS uses to encrypt your output content. Enter the Amazon Resource Name (ARN) of the CMK. To use this setting, you must also set Server-side encryption (S3ServerSideEncryptionType) to AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). If you set Server-side encryption to AWS KMS but don't specify a CMK here, AWS uses the AWS managed CMK associated with Amazon S3.
pub fn set_kms_key_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
/// Consumes the builder and constructs a [`S3EncryptionSettings`](crate::model::S3EncryptionSettings)
pub fn build(self) -> crate::model::S3EncryptionSettings {
crate::model::S3EncryptionSettings {
encryption_type: self.encryption_type,
kms_encryption_context: self.kms_encryption_context,
kms_key_arn: self.kms_key_arn,
}
}
}
}
impl S3EncryptionSettings {
/// Creates a new builder-style object to manufacture [`S3EncryptionSettings`](crate::model::S3EncryptionSettings)
pub fn builder() -> crate::model::s3_encryption_settings::Builder {
crate::model::s3_encryption_settings::Builder::default()
}
}
/// Specify how you want your data keys managed. AWS uses data keys to encrypt your content. AWS also encrypts the data keys themselves, using a customer master key (CMK), and then stores the encrypted data keys alongside your encrypted content. Use this setting to specify which AWS service manages the CMK. For simplest set up, choose Amazon S3 (SERVER_SIDE_ENCRYPTION_S3). If you want your master key to be managed by AWS Key Management Service (KMS), choose AWS KMS (SERVER_SIDE_ENCRYPTION_KMS). By default, when you choose AWS KMS, KMS uses the AWS managed customer master key (CMK) associated with Amazon S3 to encrypt your data keys. You can optionally choose to specify a different, customer managed CMK. Do so by specifying the Amazon Resource Name (ARN) of the key for the setting KMS ARN (kmsKeyArn).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum S3ServerSideEncryptionType {
#[allow(missing_docs)] // documentation missing in model
ServerSideEncryptionKms,
#[allow(missing_docs)] // documentation missing in model
ServerSideEncryptionS3,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for S3ServerSideEncryptionType {
fn from(s: &str) -> Self {
match s {
"SERVER_SIDE_ENCRYPTION_KMS" => S3ServerSideEncryptionType::ServerSideEncryptionKms,
"SERVER_SIDE_ENCRYPTION_S3" => S3ServerSideEncryptionType::ServerSideEncryptionS3,
other => S3ServerSideEncryptionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for S3ServerSideEncryptionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(S3ServerSideEncryptionType::from(s))
}
}
impl S3ServerSideEncryptionType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
S3ServerSideEncryptionType::ServerSideEncryptionKms => "SERVER_SIDE_ENCRYPTION_KMS",
S3ServerSideEncryptionType::ServerSideEncryptionS3 => "SERVER_SIDE_ENCRYPTION_S3",
S3ServerSideEncryptionType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SERVER_SIDE_ENCRYPTION_KMS", "SERVER_SIDE_ENCRYPTION_S3"]
}
}
impl AsRef<str> for S3ServerSideEncryptionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. Have MediaConvert automatically apply Amazon S3 access control for the outputs in this output group. When you don't use this setting, S3 automatically applies the default access control list PRIVATE.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3DestinationAccessControl {
/// Choose an Amazon S3 canned ACL for MediaConvert to apply to this output.
pub canned_acl: std::option::Option<crate::model::S3ObjectCannedAcl>,
}
impl S3DestinationAccessControl {
/// Choose an Amazon S3 canned ACL for MediaConvert to apply to this output.
pub fn canned_acl(&self) -> std::option::Option<&crate::model::S3ObjectCannedAcl> {
self.canned_acl.as_ref()
}
}
impl std::fmt::Debug for S3DestinationAccessControl {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3DestinationAccessControl");
formatter.field("canned_acl", &self.canned_acl);
formatter.finish()
}
}
/// See [`S3DestinationAccessControl`](crate::model::S3DestinationAccessControl)
pub mod s3_destination_access_control {
/// A builder for [`S3DestinationAccessControl`](crate::model::S3DestinationAccessControl)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) canned_acl: std::option::Option<crate::model::S3ObjectCannedAcl>,
}
impl Builder {
/// Choose an Amazon S3 canned ACL for MediaConvert to apply to this output.
pub fn canned_acl(mut self, input: crate::model::S3ObjectCannedAcl) -> Self {
self.canned_acl = Some(input);
self
}
/// Choose an Amazon S3 canned ACL for MediaConvert to apply to this output.
pub fn set_canned_acl(
mut self,
input: std::option::Option<crate::model::S3ObjectCannedAcl>,
) -> Self {
self.canned_acl = input;
self
}
/// Consumes the builder and constructs a [`S3DestinationAccessControl`](crate::model::S3DestinationAccessControl)
pub fn build(self) -> crate::model::S3DestinationAccessControl {
crate::model::S3DestinationAccessControl {
canned_acl: self.canned_acl,
}
}
}
}
impl S3DestinationAccessControl {
/// Creates a new builder-style object to manufacture [`S3DestinationAccessControl`](crate::model::S3DestinationAccessControl)
pub fn builder() -> crate::model::s3_destination_access_control::Builder {
crate::model::s3_destination_access_control::Builder::default()
}
}
/// Choose an Amazon S3 canned ACL for MediaConvert to apply to this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum S3ObjectCannedAcl {
#[allow(missing_docs)] // documentation missing in model
AuthenticatedRead,
#[allow(missing_docs)] // documentation missing in model
BucketOwnerFullControl,
#[allow(missing_docs)] // documentation missing in model
BucketOwnerRead,
#[allow(missing_docs)] // documentation missing in model
PublicRead,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for S3ObjectCannedAcl {
fn from(s: &str) -> Self {
match s {
"AUTHENTICATED_READ" => S3ObjectCannedAcl::AuthenticatedRead,
"BUCKET_OWNER_FULL_CONTROL" => S3ObjectCannedAcl::BucketOwnerFullControl,
"BUCKET_OWNER_READ" => S3ObjectCannedAcl::BucketOwnerRead,
"PUBLIC_READ" => S3ObjectCannedAcl::PublicRead,
other => S3ObjectCannedAcl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for S3ObjectCannedAcl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(S3ObjectCannedAcl::from(s))
}
}
impl S3ObjectCannedAcl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
S3ObjectCannedAcl::AuthenticatedRead => "AUTHENTICATED_READ",
S3ObjectCannedAcl::BucketOwnerFullControl => "BUCKET_OWNER_FULL_CONTROL",
S3ObjectCannedAcl::BucketOwnerRead => "BUCKET_OWNER_READ",
S3ObjectCannedAcl::PublicRead => "PUBLIC_READ",
S3ObjectCannedAcl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTHENTICATED_READ",
"BUCKET_OWNER_FULL_CONTROL",
"BUCKET_OWNER_READ",
"PUBLIC_READ",
]
}
}
impl AsRef<str> for S3ObjectCannedAcl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across a Microsoft Smooth output group into a single audio stream.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MsSmoothAudioDeduplication {
#[allow(missing_docs)] // documentation missing in model
CombineDuplicateStreams,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MsSmoothAudioDeduplication {
fn from(s: &str) -> Self {
match s {
"COMBINE_DUPLICATE_STREAMS" => MsSmoothAudioDeduplication::CombineDuplicateStreams,
"NONE" => MsSmoothAudioDeduplication::None,
other => MsSmoothAudioDeduplication::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MsSmoothAudioDeduplication {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MsSmoothAudioDeduplication::from(s))
}
}
impl MsSmoothAudioDeduplication {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MsSmoothAudioDeduplication::CombineDuplicateStreams => "COMBINE_DUPLICATE_STREAMS",
MsSmoothAudioDeduplication::None => "NONE",
MsSmoothAudioDeduplication::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["COMBINE_DUPLICATE_STREAMS", "NONE"]
}
}
impl AsRef<str> for MsSmoothAudioDeduplication {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the details for each additional Microsoft Smooth Streaming manifest that you want the service to generate for this output group. Each manifest can reference a different subset of outputs in the group.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MsSmoothAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your Microsoft Smooth group is film-name.ismv. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.ismv.
pub manifest_name_modifier: std::option::Option<std::string::String>,
/// Specify the outputs that you want this additional top-level manifest to reference.
pub selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl MsSmoothAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your Microsoft Smooth group is film-name.ismv. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.ismv.
pub fn manifest_name_modifier(&self) -> std::option::Option<&str> {
self.manifest_name_modifier.as_deref()
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(&self) -> std::option::Option<&[std::string::String]> {
self.selected_outputs.as_deref()
}
}
impl std::fmt::Debug for MsSmoothAdditionalManifest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MsSmoothAdditionalManifest");
formatter.field("manifest_name_modifier", &self.manifest_name_modifier);
formatter.field("selected_outputs", &self.selected_outputs);
formatter.finish()
}
}
/// See [`MsSmoothAdditionalManifest`](crate::model::MsSmoothAdditionalManifest)
pub mod ms_smooth_additional_manifest {
/// A builder for [`MsSmoothAdditionalManifest`](crate::model::MsSmoothAdditionalManifest)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) manifest_name_modifier: std::option::Option<std::string::String>,
pub(crate) selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your Microsoft Smooth group is film-name.ismv. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.ismv.
pub fn manifest_name_modifier(mut self, input: impl Into<std::string::String>) -> Self {
self.manifest_name_modifier = Some(input.into());
self
}
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your Microsoft Smooth group is film-name.ismv. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.ismv.
pub fn set_manifest_name_modifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.manifest_name_modifier = input;
self
}
/// Appends an item to `selected_outputs`.
///
/// To override the contents of this collection use [`set_selected_outputs`](Self::set_selected_outputs).
///
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.selected_outputs.unwrap_or_default();
v.push(input.into());
self.selected_outputs = Some(v);
self
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn set_selected_outputs(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.selected_outputs = input;
self
}
/// Consumes the builder and constructs a [`MsSmoothAdditionalManifest`](crate::model::MsSmoothAdditionalManifest)
pub fn build(self) -> crate::model::MsSmoothAdditionalManifest {
crate::model::MsSmoothAdditionalManifest {
manifest_name_modifier: self.manifest_name_modifier,
selected_outputs: self.selected_outputs,
}
}
}
}
impl MsSmoothAdditionalManifest {
/// Creates a new builder-style object to manufacture [`MsSmoothAdditionalManifest`](crate::model::MsSmoothAdditionalManifest)
pub fn builder() -> crate::model::ms_smooth_additional_manifest::Builder {
crate::model::ms_smooth_additional_manifest::Builder::default()
}
}
/// Settings related to your HLS output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to HLS_GROUP_SETTINGS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsGroupSettings {
/// Choose one or more ad marker types to decorate your Apple HLS manifest. This setting does not determine whether SCTE-35 markers appear in the outputs themselves.
pub ad_markers: std::option::Option<std::vec::Vec<crate::model::HlsAdMarkers>>,
/// By default, the service creates one top-level .m3u8 HLS manifest for each HLS output group in your job. This default manifest references every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub additional_manifests:
std::option::Option<std::vec::Vec<crate::model::HlsAdditionalManifest>>,
/// Ignore this setting unless you are using FairPlay DRM with Verimatrix and you encounter playback issues. Keep the default value, Include (INCLUDE), to output audio-only headers. Choose Exclude (EXCLUDE) to remove the audio-only headers from your audio segments.
pub audio_only_header: std::option::Option<crate::model::HlsAudioOnlyHeader>,
/// A partial URI prefix that will be prepended to each output in the media .m3u8 file. Can be used if base manifest is delivered from a different URL than the main .m3u8 file.
pub base_url: std::option::Option<std::string::String>,
/// Language to be used on Caption outputs
pub caption_language_mappings:
std::option::Option<std::vec::Vec<crate::model::HlsCaptionLanguageMapping>>,
/// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS lines in the manifest. Specify at least one language in the CC1 Language Code field. One CLOSED-CAPTION line is added for each Language Code you specify. Make sure to specify the languages in the order in which they appear in the original source (if the source is embedded format) or the order of the caption selectors (if the source is other than embedded). Otherwise, languages in the manifest will not match up properly with the output captions. None: Include CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS line from the manifest.
pub caption_language_setting: std::option::Option<crate::model::HlsCaptionLanguageSetting>,
/// Set Caption segment length control (CaptionSegmentLengthControl) to Match video (MATCH_VIDEO) to create caption segments that align with the video segments from the first video output in this output group. For example, if the video segments are 2 seconds long, your WebVTT segments will also be 2 seconds long. Keep the default setting, Large segments (LARGE_SEGMENTS) to create caption segments that are 300 seconds long.
pub caption_segment_length_control:
std::option::Option<crate::model::HlsCaptionSegmentLengthControl>,
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub client_cache: std::option::Option<crate::model::HlsClientCache>,
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub codec_specification: std::option::Option<crate::model::HlsCodecSpecification>,
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub destination: std::option::Option<std::string::String>,
/// Settings associated with the destination. Will vary based on the type of destination
pub destination_settings: std::option::Option<crate::model::DestinationSettings>,
/// Indicates whether segments should be placed in subdirectories.
pub directory_structure: std::option::Option<crate::model::HlsDirectoryStructure>,
/// DRM settings.
pub encryption: std::option::Option<crate::model::HlsEncryptionSettings>,
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub image_based_trick_play: std::option::Option<crate::model::HlsImageBasedTrickPlay>,
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub image_based_trick_play_settings:
std::option::Option<crate::model::HlsImageBasedTrickPlaySettings>,
/// When set to GZIP, compresses HLS playlist.
pub manifest_compression: std::option::Option<crate::model::HlsManifestCompression>,
/// Indicates whether the output manifest should use floating point values for segment duration.
pub manifest_duration_format: std::option::Option<crate::model::HlsManifestDurationFormat>,
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub min_final_segment_length: f64,
/// When set, Minimum Segment Size is enforced by looking ahead and back within the specified range for a nearby avail and extending the segment size if needed.
pub min_segment_length: i32,
/// Indicates whether the .m3u8 manifest file should be generated for this HLS output group.
pub output_selection: std::option::Option<crate::model::HlsOutputSelection>,
/// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. The value is calculated as follows: either the program date and time are initialized using the input timecode source, or the time is initialized using the input timecode source and the date is initialized using the timestamp_offset.
pub program_date_time: std::option::Option<crate::model::HlsProgramDateTime>,
/// Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds.
pub program_date_time_period: i32,
/// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, uses #EXT-X-BYTERANGE tags to index segment for playback.
pub segment_control: std::option::Option<crate::model::HlsSegmentControl>,
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (HlsSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub segment_length: i32,
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub segment_length_control: std::option::Option<crate::model::HlsSegmentLengthControl>,
/// Number of segments to write to a subdirectory before starting a new one. directoryStructure must be SINGLE_DIRECTORY for this setting to have an effect.
pub segments_per_subdirectory: i32,
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub stream_inf_resolution: std::option::Option<crate::model::HlsStreamInfResolution>,
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub target_duration_compatibility_mode:
std::option::Option<crate::model::HlsTargetDurationCompatibilityMode>,
/// Specify the type of the ID3 frame (timedMetadataId3Frame) to use for ID3 timestamps (timedMetadataId3Period) in your output. To include ID3 timestamps: Specify PRIV (PRIV) or TDRL (TDRL) and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). To exclude ID3 timestamps: Set ID3 timestamp frame type to None (NONE).
pub timed_metadata_id3_frame: std::option::Option<crate::model::HlsTimedMetadataId3Frame>,
/// Specify the interval in seconds to write ID3 timestamps in your output. The first timestamp starts at the output timecode and date, and increases incrementally with each ID3 timestamp. To use the default interval of 10 seconds: Leave blank. To include this metadata in your output: Set ID3 timestamp frame type (timedMetadataId3Frame) to PRIV (PRIV) or TDRL (TDRL), and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub timed_metadata_id3_period: i32,
/// Provides an extra millisecond delta offset to fine tune the timestamps.
pub timestamp_delta_milliseconds: i32,
}
impl HlsGroupSettings {
/// Choose one or more ad marker types to decorate your Apple HLS manifest. This setting does not determine whether SCTE-35 markers appear in the outputs themselves.
pub fn ad_markers(&self) -> std::option::Option<&[crate::model::HlsAdMarkers]> {
self.ad_markers.as_deref()
}
/// By default, the service creates one top-level .m3u8 HLS manifest for each HLS output group in your job. This default manifest references every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn additional_manifests(
&self,
) -> std::option::Option<&[crate::model::HlsAdditionalManifest]> {
self.additional_manifests.as_deref()
}
/// Ignore this setting unless you are using FairPlay DRM with Verimatrix and you encounter playback issues. Keep the default value, Include (INCLUDE), to output audio-only headers. Choose Exclude (EXCLUDE) to remove the audio-only headers from your audio segments.
pub fn audio_only_header(&self) -> std::option::Option<&crate::model::HlsAudioOnlyHeader> {
self.audio_only_header.as_ref()
}
/// A partial URI prefix that will be prepended to each output in the media .m3u8 file. Can be used if base manifest is delivered from a different URL than the main .m3u8 file.
pub fn base_url(&self) -> std::option::Option<&str> {
self.base_url.as_deref()
}
/// Language to be used on Caption outputs
pub fn caption_language_mappings(
&self,
) -> std::option::Option<&[crate::model::HlsCaptionLanguageMapping]> {
self.caption_language_mappings.as_deref()
}
/// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS lines in the manifest. Specify at least one language in the CC1 Language Code field. One CLOSED-CAPTION line is added for each Language Code you specify. Make sure to specify the languages in the order in which they appear in the original source (if the source is embedded format) or the order of the caption selectors (if the source is other than embedded). Otherwise, languages in the manifest will not match up properly with the output captions. None: Include CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS line from the manifest.
pub fn caption_language_setting(
&self,
) -> std::option::Option<&crate::model::HlsCaptionLanguageSetting> {
self.caption_language_setting.as_ref()
}
/// Set Caption segment length control (CaptionSegmentLengthControl) to Match video (MATCH_VIDEO) to create caption segments that align with the video segments from the first video output in this output group. For example, if the video segments are 2 seconds long, your WebVTT segments will also be 2 seconds long. Keep the default setting, Large segments (LARGE_SEGMENTS) to create caption segments that are 300 seconds long.
pub fn caption_segment_length_control(
&self,
) -> std::option::Option<&crate::model::HlsCaptionSegmentLengthControl> {
self.caption_segment_length_control.as_ref()
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub fn client_cache(&self) -> std::option::Option<&crate::model::HlsClientCache> {
self.client_cache.as_ref()
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub fn codec_specification(&self) -> std::option::Option<&crate::model::HlsCodecSpecification> {
self.codec_specification.as_ref()
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(&self) -> std::option::Option<&crate::model::DestinationSettings> {
self.destination_settings.as_ref()
}
/// Indicates whether segments should be placed in subdirectories.
pub fn directory_structure(&self) -> std::option::Option<&crate::model::HlsDirectoryStructure> {
self.directory_structure.as_ref()
}
/// DRM settings.
pub fn encryption(&self) -> std::option::Option<&crate::model::HlsEncryptionSettings> {
self.encryption.as_ref()
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn image_based_trick_play(
&self,
) -> std::option::Option<&crate::model::HlsImageBasedTrickPlay> {
self.image_based_trick_play.as_ref()
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn image_based_trick_play_settings(
&self,
) -> std::option::Option<&crate::model::HlsImageBasedTrickPlaySettings> {
self.image_based_trick_play_settings.as_ref()
}
/// When set to GZIP, compresses HLS playlist.
pub fn manifest_compression(
&self,
) -> std::option::Option<&crate::model::HlsManifestCompression> {
self.manifest_compression.as_ref()
}
/// Indicates whether the output manifest should use floating point values for segment duration.
pub fn manifest_duration_format(
&self,
) -> std::option::Option<&crate::model::HlsManifestDurationFormat> {
self.manifest_duration_format.as_ref()
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn min_final_segment_length(&self) -> f64 {
self.min_final_segment_length
}
/// When set, Minimum Segment Size is enforced by looking ahead and back within the specified range for a nearby avail and extending the segment size if needed.
pub fn min_segment_length(&self) -> i32 {
self.min_segment_length
}
/// Indicates whether the .m3u8 manifest file should be generated for this HLS output group.
pub fn output_selection(&self) -> std::option::Option<&crate::model::HlsOutputSelection> {
self.output_selection.as_ref()
}
/// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. The value is calculated as follows: either the program date and time are initialized using the input timecode source, or the time is initialized using the input timecode source and the date is initialized using the timestamp_offset.
pub fn program_date_time(&self) -> std::option::Option<&crate::model::HlsProgramDateTime> {
self.program_date_time.as_ref()
}
/// Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds.
pub fn program_date_time_period(&self) -> i32 {
self.program_date_time_period
}
/// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, uses #EXT-X-BYTERANGE tags to index segment for playback.
pub fn segment_control(&self) -> std::option::Option<&crate::model::HlsSegmentControl> {
self.segment_control.as_ref()
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (HlsSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn segment_length(&self) -> i32 {
self.segment_length
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn segment_length_control(
&self,
) -> std::option::Option<&crate::model::HlsSegmentLengthControl> {
self.segment_length_control.as_ref()
}
/// Number of segments to write to a subdirectory before starting a new one. directoryStructure must be SINGLE_DIRECTORY for this setting to have an effect.
pub fn segments_per_subdirectory(&self) -> i32 {
self.segments_per_subdirectory
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub fn stream_inf_resolution(
&self,
) -> std::option::Option<&crate::model::HlsStreamInfResolution> {
self.stream_inf_resolution.as_ref()
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub fn target_duration_compatibility_mode(
&self,
) -> std::option::Option<&crate::model::HlsTargetDurationCompatibilityMode> {
self.target_duration_compatibility_mode.as_ref()
}
/// Specify the type of the ID3 frame (timedMetadataId3Frame) to use for ID3 timestamps (timedMetadataId3Period) in your output. To include ID3 timestamps: Specify PRIV (PRIV) or TDRL (TDRL) and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). To exclude ID3 timestamps: Set ID3 timestamp frame type to None (NONE).
pub fn timed_metadata_id3_frame(
&self,
) -> std::option::Option<&crate::model::HlsTimedMetadataId3Frame> {
self.timed_metadata_id3_frame.as_ref()
}
/// Specify the interval in seconds to write ID3 timestamps in your output. The first timestamp starts at the output timecode and date, and increases incrementally with each ID3 timestamp. To use the default interval of 10 seconds: Leave blank. To include this metadata in your output: Set ID3 timestamp frame type (timedMetadataId3Frame) to PRIV (PRIV) or TDRL (TDRL), and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn timed_metadata_id3_period(&self) -> i32 {
self.timed_metadata_id3_period
}
/// Provides an extra millisecond delta offset to fine tune the timestamps.
pub fn timestamp_delta_milliseconds(&self) -> i32 {
self.timestamp_delta_milliseconds
}
}
impl std::fmt::Debug for HlsGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsGroupSettings");
formatter.field("ad_markers", &self.ad_markers);
formatter.field("additional_manifests", &self.additional_manifests);
formatter.field("audio_only_header", &self.audio_only_header);
formatter.field("base_url", &self.base_url);
formatter.field("caption_language_mappings", &self.caption_language_mappings);
formatter.field("caption_language_setting", &self.caption_language_setting);
formatter.field(
"caption_segment_length_control",
&self.caption_segment_length_control,
);
formatter.field("client_cache", &self.client_cache);
formatter.field("codec_specification", &self.codec_specification);
formatter.field("destination", &self.destination);
formatter.field("destination_settings", &self.destination_settings);
formatter.field("directory_structure", &self.directory_structure);
formatter.field("encryption", &self.encryption);
formatter.field("image_based_trick_play", &self.image_based_trick_play);
formatter.field(
"image_based_trick_play_settings",
&self.image_based_trick_play_settings,
);
formatter.field("manifest_compression", &self.manifest_compression);
formatter.field("manifest_duration_format", &self.manifest_duration_format);
formatter.field("min_final_segment_length", &self.min_final_segment_length);
formatter.field("min_segment_length", &self.min_segment_length);
formatter.field("output_selection", &self.output_selection);
formatter.field("program_date_time", &self.program_date_time);
formatter.field("program_date_time_period", &self.program_date_time_period);
formatter.field("segment_control", &self.segment_control);
formatter.field("segment_length", &self.segment_length);
formatter.field("segment_length_control", &self.segment_length_control);
formatter.field("segments_per_subdirectory", &self.segments_per_subdirectory);
formatter.field("stream_inf_resolution", &self.stream_inf_resolution);
formatter.field(
"target_duration_compatibility_mode",
&self.target_duration_compatibility_mode,
);
formatter.field("timed_metadata_id3_frame", &self.timed_metadata_id3_frame);
formatter.field("timed_metadata_id3_period", &self.timed_metadata_id3_period);
formatter.field(
"timestamp_delta_milliseconds",
&self.timestamp_delta_milliseconds,
);
formatter.finish()
}
}
/// See [`HlsGroupSettings`](crate::model::HlsGroupSettings)
pub mod hls_group_settings {
/// A builder for [`HlsGroupSettings`](crate::model::HlsGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ad_markers: std::option::Option<std::vec::Vec<crate::model::HlsAdMarkers>>,
pub(crate) additional_manifests:
std::option::Option<std::vec::Vec<crate::model::HlsAdditionalManifest>>,
pub(crate) audio_only_header: std::option::Option<crate::model::HlsAudioOnlyHeader>,
pub(crate) base_url: std::option::Option<std::string::String>,
pub(crate) caption_language_mappings:
std::option::Option<std::vec::Vec<crate::model::HlsCaptionLanguageMapping>>,
pub(crate) caption_language_setting:
std::option::Option<crate::model::HlsCaptionLanguageSetting>,
pub(crate) caption_segment_length_control:
std::option::Option<crate::model::HlsCaptionSegmentLengthControl>,
pub(crate) client_cache: std::option::Option<crate::model::HlsClientCache>,
pub(crate) codec_specification: std::option::Option<crate::model::HlsCodecSpecification>,
pub(crate) destination: std::option::Option<std::string::String>,
pub(crate) destination_settings: std::option::Option<crate::model::DestinationSettings>,
pub(crate) directory_structure: std::option::Option<crate::model::HlsDirectoryStructure>,
pub(crate) encryption: std::option::Option<crate::model::HlsEncryptionSettings>,
pub(crate) image_based_trick_play:
std::option::Option<crate::model::HlsImageBasedTrickPlay>,
pub(crate) image_based_trick_play_settings:
std::option::Option<crate::model::HlsImageBasedTrickPlaySettings>,
pub(crate) manifest_compression: std::option::Option<crate::model::HlsManifestCompression>,
pub(crate) manifest_duration_format:
std::option::Option<crate::model::HlsManifestDurationFormat>,
pub(crate) min_final_segment_length: std::option::Option<f64>,
pub(crate) min_segment_length: std::option::Option<i32>,
pub(crate) output_selection: std::option::Option<crate::model::HlsOutputSelection>,
pub(crate) program_date_time: std::option::Option<crate::model::HlsProgramDateTime>,
pub(crate) program_date_time_period: std::option::Option<i32>,
pub(crate) segment_control: std::option::Option<crate::model::HlsSegmentControl>,
pub(crate) segment_length: std::option::Option<i32>,
pub(crate) segment_length_control:
std::option::Option<crate::model::HlsSegmentLengthControl>,
pub(crate) segments_per_subdirectory: std::option::Option<i32>,
pub(crate) stream_inf_resolution: std::option::Option<crate::model::HlsStreamInfResolution>,
pub(crate) target_duration_compatibility_mode:
std::option::Option<crate::model::HlsTargetDurationCompatibilityMode>,
pub(crate) timed_metadata_id3_frame:
std::option::Option<crate::model::HlsTimedMetadataId3Frame>,
pub(crate) timed_metadata_id3_period: std::option::Option<i32>,
pub(crate) timestamp_delta_milliseconds: std::option::Option<i32>,
}
impl Builder {
/// Appends an item to `ad_markers`.
///
/// To override the contents of this collection use [`set_ad_markers`](Self::set_ad_markers).
///
/// Choose one or more ad marker types to decorate your Apple HLS manifest. This setting does not determine whether SCTE-35 markers appear in the outputs themselves.
pub fn ad_markers(mut self, input: crate::model::HlsAdMarkers) -> Self {
let mut v = self.ad_markers.unwrap_or_default();
v.push(input);
self.ad_markers = Some(v);
self
}
/// Choose one or more ad marker types to decorate your Apple HLS manifest. This setting does not determine whether SCTE-35 markers appear in the outputs themselves.
pub fn set_ad_markers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::HlsAdMarkers>>,
) -> Self {
self.ad_markers = input;
self
}
/// Appends an item to `additional_manifests`.
///
/// To override the contents of this collection use [`set_additional_manifests`](Self::set_additional_manifests).
///
/// By default, the service creates one top-level .m3u8 HLS manifest for each HLS output group in your job. This default manifest references every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn additional_manifests(mut self, input: crate::model::HlsAdditionalManifest) -> Self {
let mut v = self.additional_manifests.unwrap_or_default();
v.push(input);
self.additional_manifests = Some(v);
self
}
/// By default, the service creates one top-level .m3u8 HLS manifest for each HLS output group in your job. This default manifest references every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn set_additional_manifests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::HlsAdditionalManifest>>,
) -> Self {
self.additional_manifests = input;
self
}
/// Ignore this setting unless you are using FairPlay DRM with Verimatrix and you encounter playback issues. Keep the default value, Include (INCLUDE), to output audio-only headers. Choose Exclude (EXCLUDE) to remove the audio-only headers from your audio segments.
pub fn audio_only_header(mut self, input: crate::model::HlsAudioOnlyHeader) -> Self {
self.audio_only_header = Some(input);
self
}
/// Ignore this setting unless you are using FairPlay DRM with Verimatrix and you encounter playback issues. Keep the default value, Include (INCLUDE), to output audio-only headers. Choose Exclude (EXCLUDE) to remove the audio-only headers from your audio segments.
pub fn set_audio_only_header(
mut self,
input: std::option::Option<crate::model::HlsAudioOnlyHeader>,
) -> Self {
self.audio_only_header = input;
self
}
/// A partial URI prefix that will be prepended to each output in the media .m3u8 file. Can be used if base manifest is delivered from a different URL than the main .m3u8 file.
pub fn base_url(mut self, input: impl Into<std::string::String>) -> Self {
self.base_url = Some(input.into());
self
}
/// A partial URI prefix that will be prepended to each output in the media .m3u8 file. Can be used if base manifest is delivered from a different URL than the main .m3u8 file.
pub fn set_base_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.base_url = input;
self
}
/// Appends an item to `caption_language_mappings`.
///
/// To override the contents of this collection use [`set_caption_language_mappings`](Self::set_caption_language_mappings).
///
/// Language to be used on Caption outputs
pub fn caption_language_mappings(
mut self,
input: crate::model::HlsCaptionLanguageMapping,
) -> Self {
let mut v = self.caption_language_mappings.unwrap_or_default();
v.push(input);
self.caption_language_mappings = Some(v);
self
}
/// Language to be used on Caption outputs
pub fn set_caption_language_mappings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::HlsCaptionLanguageMapping>>,
) -> Self {
self.caption_language_mappings = input;
self
}
/// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS lines in the manifest. Specify at least one language in the CC1 Language Code field. One CLOSED-CAPTION line is added for each Language Code you specify. Make sure to specify the languages in the order in which they appear in the original source (if the source is embedded format) or the order of the caption selectors (if the source is other than embedded). Otherwise, languages in the manifest will not match up properly with the output captions. None: Include CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS line from the manifest.
pub fn caption_language_setting(
mut self,
input: crate::model::HlsCaptionLanguageSetting,
) -> Self {
self.caption_language_setting = Some(input);
self
}
/// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS lines in the manifest. Specify at least one language in the CC1 Language Code field. One CLOSED-CAPTION line is added for each Language Code you specify. Make sure to specify the languages in the order in which they appear in the original source (if the source is embedded format) or the order of the caption selectors (if the source is other than embedded). Otherwise, languages in the manifest will not match up properly with the output captions. None: Include CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS line from the manifest.
pub fn set_caption_language_setting(
mut self,
input: std::option::Option<crate::model::HlsCaptionLanguageSetting>,
) -> Self {
self.caption_language_setting = input;
self
}
/// Set Caption segment length control (CaptionSegmentLengthControl) to Match video (MATCH_VIDEO) to create caption segments that align with the video segments from the first video output in this output group. For example, if the video segments are 2 seconds long, your WebVTT segments will also be 2 seconds long. Keep the default setting, Large segments (LARGE_SEGMENTS) to create caption segments that are 300 seconds long.
pub fn caption_segment_length_control(
mut self,
input: crate::model::HlsCaptionSegmentLengthControl,
) -> Self {
self.caption_segment_length_control = Some(input);
self
}
/// Set Caption segment length control (CaptionSegmentLengthControl) to Match video (MATCH_VIDEO) to create caption segments that align with the video segments from the first video output in this output group. For example, if the video segments are 2 seconds long, your WebVTT segments will also be 2 seconds long. Keep the default setting, Large segments (LARGE_SEGMENTS) to create caption segments that are 300 seconds long.
pub fn set_caption_segment_length_control(
mut self,
input: std::option::Option<crate::model::HlsCaptionSegmentLengthControl>,
) -> Self {
self.caption_segment_length_control = input;
self
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub fn client_cache(mut self, input: crate::model::HlsClientCache) -> Self {
self.client_cache = Some(input);
self
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub fn set_client_cache(
mut self,
input: std::option::Option<crate::model::HlsClientCache>,
) -> Self {
self.client_cache = input;
self
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub fn codec_specification(mut self, input: crate::model::HlsCodecSpecification) -> Self {
self.codec_specification = Some(input);
self
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub fn set_codec_specification(
mut self,
input: std::option::Option<crate::model::HlsCodecSpecification>,
) -> Self {
self.codec_specification = input;
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(mut self, input: crate::model::DestinationSettings) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::DestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// Indicates whether segments should be placed in subdirectories.
pub fn directory_structure(mut self, input: crate::model::HlsDirectoryStructure) -> Self {
self.directory_structure = Some(input);
self
}
/// Indicates whether segments should be placed in subdirectories.
pub fn set_directory_structure(
mut self,
input: std::option::Option<crate::model::HlsDirectoryStructure>,
) -> Self {
self.directory_structure = input;
self
}
/// DRM settings.
pub fn encryption(mut self, input: crate::model::HlsEncryptionSettings) -> Self {
self.encryption = Some(input);
self
}
/// DRM settings.
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::HlsEncryptionSettings>,
) -> Self {
self.encryption = input;
self
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn image_based_trick_play(
mut self,
input: crate::model::HlsImageBasedTrickPlay,
) -> Self {
self.image_based_trick_play = Some(input);
self
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn set_image_based_trick_play(
mut self,
input: std::option::Option<crate::model::HlsImageBasedTrickPlay>,
) -> Self {
self.image_based_trick_play = input;
self
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn image_based_trick_play_settings(
mut self,
input: crate::model::HlsImageBasedTrickPlaySettings,
) -> Self {
self.image_based_trick_play_settings = Some(input);
self
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn set_image_based_trick_play_settings(
mut self,
input: std::option::Option<crate::model::HlsImageBasedTrickPlaySettings>,
) -> Self {
self.image_based_trick_play_settings = input;
self
}
/// When set to GZIP, compresses HLS playlist.
pub fn manifest_compression(mut self, input: crate::model::HlsManifestCompression) -> Self {
self.manifest_compression = Some(input);
self
}
/// When set to GZIP, compresses HLS playlist.
pub fn set_manifest_compression(
mut self,
input: std::option::Option<crate::model::HlsManifestCompression>,
) -> Self {
self.manifest_compression = input;
self
}
/// Indicates whether the output manifest should use floating point values for segment duration.
pub fn manifest_duration_format(
mut self,
input: crate::model::HlsManifestDurationFormat,
) -> Self {
self.manifest_duration_format = Some(input);
self
}
/// Indicates whether the output manifest should use floating point values for segment duration.
pub fn set_manifest_duration_format(
mut self,
input: std::option::Option<crate::model::HlsManifestDurationFormat>,
) -> Self {
self.manifest_duration_format = input;
self
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn min_final_segment_length(mut self, input: f64) -> Self {
self.min_final_segment_length = Some(input);
self
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn set_min_final_segment_length(mut self, input: std::option::Option<f64>) -> Self {
self.min_final_segment_length = input;
self
}
/// When set, Minimum Segment Size is enforced by looking ahead and back within the specified range for a nearby avail and extending the segment size if needed.
pub fn min_segment_length(mut self, input: i32) -> Self {
self.min_segment_length = Some(input);
self
}
/// When set, Minimum Segment Size is enforced by looking ahead and back within the specified range for a nearby avail and extending the segment size if needed.
pub fn set_min_segment_length(mut self, input: std::option::Option<i32>) -> Self {
self.min_segment_length = input;
self
}
/// Indicates whether the .m3u8 manifest file should be generated for this HLS output group.
pub fn output_selection(mut self, input: crate::model::HlsOutputSelection) -> Self {
self.output_selection = Some(input);
self
}
/// Indicates whether the .m3u8 manifest file should be generated for this HLS output group.
pub fn set_output_selection(
mut self,
input: std::option::Option<crate::model::HlsOutputSelection>,
) -> Self {
self.output_selection = input;
self
}
/// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. The value is calculated as follows: either the program date and time are initialized using the input timecode source, or the time is initialized using the input timecode source and the date is initialized using the timestamp_offset.
pub fn program_date_time(mut self, input: crate::model::HlsProgramDateTime) -> Self {
self.program_date_time = Some(input);
self
}
/// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. The value is calculated as follows: either the program date and time are initialized using the input timecode source, or the time is initialized using the input timecode source and the date is initialized using the timestamp_offset.
pub fn set_program_date_time(
mut self,
input: std::option::Option<crate::model::HlsProgramDateTime>,
) -> Self {
self.program_date_time = input;
self
}
/// Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds.
pub fn program_date_time_period(mut self, input: i32) -> Self {
self.program_date_time_period = Some(input);
self
}
/// Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds.
pub fn set_program_date_time_period(mut self, input: std::option::Option<i32>) -> Self {
self.program_date_time_period = input;
self
}
/// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, uses #EXT-X-BYTERANGE tags to index segment for playback.
pub fn segment_control(mut self, input: crate::model::HlsSegmentControl) -> Self {
self.segment_control = Some(input);
self
}
/// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, uses #EXT-X-BYTERANGE tags to index segment for playback.
pub fn set_segment_control(
mut self,
input: std::option::Option<crate::model::HlsSegmentControl>,
) -> Self {
self.segment_control = input;
self
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (HlsSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn segment_length(mut self, input: i32) -> Self {
self.segment_length = Some(input);
self
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (HlsSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn set_segment_length(mut self, input: std::option::Option<i32>) -> Self {
self.segment_length = input;
self
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn segment_length_control(
mut self,
input: crate::model::HlsSegmentLengthControl,
) -> Self {
self.segment_length_control = Some(input);
self
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn set_segment_length_control(
mut self,
input: std::option::Option<crate::model::HlsSegmentLengthControl>,
) -> Self {
self.segment_length_control = input;
self
}
/// Number of segments to write to a subdirectory before starting a new one. directoryStructure must be SINGLE_DIRECTORY for this setting to have an effect.
pub fn segments_per_subdirectory(mut self, input: i32) -> Self {
self.segments_per_subdirectory = Some(input);
self
}
/// Number of segments to write to a subdirectory before starting a new one. directoryStructure must be SINGLE_DIRECTORY for this setting to have an effect.
pub fn set_segments_per_subdirectory(mut self, input: std::option::Option<i32>) -> Self {
self.segments_per_subdirectory = input;
self
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub fn stream_inf_resolution(
mut self,
input: crate::model::HlsStreamInfResolution,
) -> Self {
self.stream_inf_resolution = Some(input);
self
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub fn set_stream_inf_resolution(
mut self,
input: std::option::Option<crate::model::HlsStreamInfResolution>,
) -> Self {
self.stream_inf_resolution = input;
self
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub fn target_duration_compatibility_mode(
mut self,
input: crate::model::HlsTargetDurationCompatibilityMode,
) -> Self {
self.target_duration_compatibility_mode = Some(input);
self
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub fn set_target_duration_compatibility_mode(
mut self,
input: std::option::Option<crate::model::HlsTargetDurationCompatibilityMode>,
) -> Self {
self.target_duration_compatibility_mode = input;
self
}
/// Specify the type of the ID3 frame (timedMetadataId3Frame) to use for ID3 timestamps (timedMetadataId3Period) in your output. To include ID3 timestamps: Specify PRIV (PRIV) or TDRL (TDRL) and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). To exclude ID3 timestamps: Set ID3 timestamp frame type to None (NONE).
pub fn timed_metadata_id3_frame(
mut self,
input: crate::model::HlsTimedMetadataId3Frame,
) -> Self {
self.timed_metadata_id3_frame = Some(input);
self
}
/// Specify the type of the ID3 frame (timedMetadataId3Frame) to use for ID3 timestamps (timedMetadataId3Period) in your output. To include ID3 timestamps: Specify PRIV (PRIV) or TDRL (TDRL) and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). To exclude ID3 timestamps: Set ID3 timestamp frame type to None (NONE).
pub fn set_timed_metadata_id3_frame(
mut self,
input: std::option::Option<crate::model::HlsTimedMetadataId3Frame>,
) -> Self {
self.timed_metadata_id3_frame = input;
self
}
/// Specify the interval in seconds to write ID3 timestamps in your output. The first timestamp starts at the output timecode and date, and increases incrementally with each ID3 timestamp. To use the default interval of 10 seconds: Leave blank. To include this metadata in your output: Set ID3 timestamp frame type (timedMetadataId3Frame) to PRIV (PRIV) or TDRL (TDRL), and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn timed_metadata_id3_period(mut self, input: i32) -> Self {
self.timed_metadata_id3_period = Some(input);
self
}
/// Specify the interval in seconds to write ID3 timestamps in your output. The first timestamp starts at the output timecode and date, and increases incrementally with each ID3 timestamp. To use the default interval of 10 seconds: Leave blank. To include this metadata in your output: Set ID3 timestamp frame type (timedMetadataId3Frame) to PRIV (PRIV) or TDRL (TDRL), and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn set_timed_metadata_id3_period(mut self, input: std::option::Option<i32>) -> Self {
self.timed_metadata_id3_period = input;
self
}
/// Provides an extra millisecond delta offset to fine tune the timestamps.
pub fn timestamp_delta_milliseconds(mut self, input: i32) -> Self {
self.timestamp_delta_milliseconds = Some(input);
self
}
/// Provides an extra millisecond delta offset to fine tune the timestamps.
pub fn set_timestamp_delta_milliseconds(mut self, input: std::option::Option<i32>) -> Self {
self.timestamp_delta_milliseconds = input;
self
}
/// Consumes the builder and constructs a [`HlsGroupSettings`](crate::model::HlsGroupSettings)
pub fn build(self) -> crate::model::HlsGroupSettings {
crate::model::HlsGroupSettings {
ad_markers: self.ad_markers,
additional_manifests: self.additional_manifests,
audio_only_header: self.audio_only_header,
base_url: self.base_url,
caption_language_mappings: self.caption_language_mappings,
caption_language_setting: self.caption_language_setting,
caption_segment_length_control: self.caption_segment_length_control,
client_cache: self.client_cache,
codec_specification: self.codec_specification,
destination: self.destination,
destination_settings: self.destination_settings,
directory_structure: self.directory_structure,
encryption: self.encryption,
image_based_trick_play: self.image_based_trick_play,
image_based_trick_play_settings: self.image_based_trick_play_settings,
manifest_compression: self.manifest_compression,
manifest_duration_format: self.manifest_duration_format,
min_final_segment_length: self.min_final_segment_length.unwrap_or_default(),
min_segment_length: self.min_segment_length.unwrap_or_default(),
output_selection: self.output_selection,
program_date_time: self.program_date_time,
program_date_time_period: self.program_date_time_period.unwrap_or_default(),
segment_control: self.segment_control,
segment_length: self.segment_length.unwrap_or_default(),
segment_length_control: self.segment_length_control,
segments_per_subdirectory: self.segments_per_subdirectory.unwrap_or_default(),
stream_inf_resolution: self.stream_inf_resolution,
target_duration_compatibility_mode: self.target_duration_compatibility_mode,
timed_metadata_id3_frame: self.timed_metadata_id3_frame,
timed_metadata_id3_period: self.timed_metadata_id3_period.unwrap_or_default(),
timestamp_delta_milliseconds: self.timestamp_delta_milliseconds.unwrap_or_default(),
}
}
}
}
impl HlsGroupSettings {
/// Creates a new builder-style object to manufacture [`HlsGroupSettings`](crate::model::HlsGroupSettings)
pub fn builder() -> crate::model::hls_group_settings::Builder {
crate::model::hls_group_settings::Builder::default()
}
}
/// Specify the type of the ID3 frame (timedMetadataId3Frame) to use for ID3 timestamps (timedMetadataId3Period) in your output. To include ID3 timestamps: Specify PRIV (PRIV) or TDRL (TDRL) and set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH). To exclude ID3 timestamps: Set ID3 timestamp frame type to None (NONE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsTimedMetadataId3Frame {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Priv,
#[allow(missing_docs)] // documentation missing in model
Tdrl,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsTimedMetadataId3Frame {
fn from(s: &str) -> Self {
match s {
"NONE" => HlsTimedMetadataId3Frame::None,
"PRIV" => HlsTimedMetadataId3Frame::Priv,
"TDRL" => HlsTimedMetadataId3Frame::Tdrl,
other => HlsTimedMetadataId3Frame::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsTimedMetadataId3Frame {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsTimedMetadataId3Frame::from(s))
}
}
impl HlsTimedMetadataId3Frame {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsTimedMetadataId3Frame::None => "NONE",
HlsTimedMetadataId3Frame::Priv => "PRIV",
HlsTimedMetadataId3Frame::Tdrl => "TDRL",
HlsTimedMetadataId3Frame::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "PRIV", "TDRL"]
}
}
impl AsRef<str> for HlsTimedMetadataId3Frame {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsTargetDurationCompatibilityMode {
#[allow(missing_docs)] // documentation missing in model
Legacy,
#[allow(missing_docs)] // documentation missing in model
SpecCompliant,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsTargetDurationCompatibilityMode {
fn from(s: &str) -> Self {
match s {
"LEGACY" => HlsTargetDurationCompatibilityMode::Legacy,
"SPEC_COMPLIANT" => HlsTargetDurationCompatibilityMode::SpecCompliant,
other => HlsTargetDurationCompatibilityMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsTargetDurationCompatibilityMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsTargetDurationCompatibilityMode::from(s))
}
}
impl HlsTargetDurationCompatibilityMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsTargetDurationCompatibilityMode::Legacy => "LEGACY",
HlsTargetDurationCompatibilityMode::SpecCompliant => "SPEC_COMPLIANT",
HlsTargetDurationCompatibilityMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["LEGACY", "SPEC_COMPLIANT"]
}
}
impl AsRef<str> for HlsTargetDurationCompatibilityMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsStreamInfResolution {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsStreamInfResolution {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => HlsStreamInfResolution::Exclude,
"INCLUDE" => HlsStreamInfResolution::Include,
other => HlsStreamInfResolution::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsStreamInfResolution {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsStreamInfResolution::from(s))
}
}
impl HlsStreamInfResolution {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsStreamInfResolution::Exclude => "EXCLUDE",
HlsStreamInfResolution::Include => "INCLUDE",
HlsStreamInfResolution::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for HlsStreamInfResolution {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsSegmentLengthControl {
#[allow(missing_docs)] // documentation missing in model
Exact,
#[allow(missing_docs)] // documentation missing in model
GopMultiple,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsSegmentLengthControl {
fn from(s: &str) -> Self {
match s {
"EXACT" => HlsSegmentLengthControl::Exact,
"GOP_MULTIPLE" => HlsSegmentLengthControl::GopMultiple,
other => HlsSegmentLengthControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsSegmentLengthControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsSegmentLengthControl::from(s))
}
}
impl HlsSegmentLengthControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsSegmentLengthControl::Exact => "EXACT",
HlsSegmentLengthControl::GopMultiple => "GOP_MULTIPLE",
HlsSegmentLengthControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXACT", "GOP_MULTIPLE"]
}
}
impl AsRef<str> for HlsSegmentLengthControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, uses #EXT-X-BYTERANGE tags to index segment for playback.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsSegmentControl {
#[allow(missing_docs)] // documentation missing in model
SegmentedFiles,
#[allow(missing_docs)] // documentation missing in model
SingleFile,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsSegmentControl {
fn from(s: &str) -> Self {
match s {
"SEGMENTED_FILES" => HlsSegmentControl::SegmentedFiles,
"SINGLE_FILE" => HlsSegmentControl::SingleFile,
other => HlsSegmentControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsSegmentControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsSegmentControl::from(s))
}
}
impl HlsSegmentControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsSegmentControl::SegmentedFiles => "SEGMENTED_FILES",
HlsSegmentControl::SingleFile => "SINGLE_FILE",
HlsSegmentControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SEGMENTED_FILES", "SINGLE_FILE"]
}
}
impl AsRef<str> for HlsSegmentControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. The value is calculated as follows: either the program date and time are initialized using the input timecode source, or the time is initialized using the input timecode source and the date is initialized using the timestamp_offset.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsProgramDateTime {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsProgramDateTime {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => HlsProgramDateTime::Exclude,
"INCLUDE" => HlsProgramDateTime::Include,
other => HlsProgramDateTime::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsProgramDateTime {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsProgramDateTime::from(s))
}
}
impl HlsProgramDateTime {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsProgramDateTime::Exclude => "EXCLUDE",
HlsProgramDateTime::Include => "INCLUDE",
HlsProgramDateTime::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for HlsProgramDateTime {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Indicates whether the .m3u8 manifest file should be generated for this HLS output group.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsOutputSelection {
#[allow(missing_docs)] // documentation missing in model
ManifestsAndSegments,
#[allow(missing_docs)] // documentation missing in model
SegmentsOnly,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsOutputSelection {
fn from(s: &str) -> Self {
match s {
"MANIFESTS_AND_SEGMENTS" => HlsOutputSelection::ManifestsAndSegments,
"SEGMENTS_ONLY" => HlsOutputSelection::SegmentsOnly,
other => HlsOutputSelection::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsOutputSelection {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsOutputSelection::from(s))
}
}
impl HlsOutputSelection {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsOutputSelection::ManifestsAndSegments => "MANIFESTS_AND_SEGMENTS",
HlsOutputSelection::SegmentsOnly => "SEGMENTS_ONLY",
HlsOutputSelection::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MANIFESTS_AND_SEGMENTS", "SEGMENTS_ONLY"]
}
}
impl AsRef<str> for HlsOutputSelection {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Indicates whether the output manifest should use floating point values for segment duration.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsManifestDurationFormat {
#[allow(missing_docs)] // documentation missing in model
FloatingPoint,
#[allow(missing_docs)] // documentation missing in model
Integer,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsManifestDurationFormat {
fn from(s: &str) -> Self {
match s {
"FLOATING_POINT" => HlsManifestDurationFormat::FloatingPoint,
"INTEGER" => HlsManifestDurationFormat::Integer,
other => HlsManifestDurationFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsManifestDurationFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsManifestDurationFormat::from(s))
}
}
impl HlsManifestDurationFormat {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsManifestDurationFormat::FloatingPoint => "FLOATING_POINT",
HlsManifestDurationFormat::Integer => "INTEGER",
HlsManifestDurationFormat::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FLOATING_POINT", "INTEGER"]
}
}
impl AsRef<str> for HlsManifestDurationFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to GZIP, compresses HLS playlist.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsManifestCompression {
#[allow(missing_docs)] // documentation missing in model
Gzip,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsManifestCompression {
fn from(s: &str) -> Self {
match s {
"GZIP" => HlsManifestCompression::Gzip,
"NONE" => HlsManifestCompression::None,
other => HlsManifestCompression::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsManifestCompression {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsManifestCompression::from(s))
}
}
impl HlsManifestCompression {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsManifestCompression::Gzip => "GZIP",
HlsManifestCompression::None => "NONE",
HlsManifestCompression::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["GZIP", "NONE"]
}
}
impl AsRef<str> for HlsManifestCompression {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsImageBasedTrickPlaySettings {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub interval_cadence: std::option::Option<crate::model::HlsIntervalCadence>,
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub thumbnail_height: i32,
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub thumbnail_interval: f64,
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub thumbnail_width: i32,
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub tile_height: i32,
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub tile_width: i32,
}
impl HlsImageBasedTrickPlaySettings {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn interval_cadence(&self) -> std::option::Option<&crate::model::HlsIntervalCadence> {
self.interval_cadence.as_ref()
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn thumbnail_height(&self) -> i32 {
self.thumbnail_height
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn thumbnail_interval(&self) -> f64 {
self.thumbnail_interval
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn thumbnail_width(&self) -> i32 {
self.thumbnail_width
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn tile_height(&self) -> i32 {
self.tile_height
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn tile_width(&self) -> i32 {
self.tile_width
}
}
impl std::fmt::Debug for HlsImageBasedTrickPlaySettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsImageBasedTrickPlaySettings");
formatter.field("interval_cadence", &self.interval_cadence);
formatter.field("thumbnail_height", &self.thumbnail_height);
formatter.field("thumbnail_interval", &self.thumbnail_interval);
formatter.field("thumbnail_width", &self.thumbnail_width);
formatter.field("tile_height", &self.tile_height);
formatter.field("tile_width", &self.tile_width);
formatter.finish()
}
}
/// See [`HlsImageBasedTrickPlaySettings`](crate::model::HlsImageBasedTrickPlaySettings)
pub mod hls_image_based_trick_play_settings {
/// A builder for [`HlsImageBasedTrickPlaySettings`](crate::model::HlsImageBasedTrickPlaySettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) interval_cadence: std::option::Option<crate::model::HlsIntervalCadence>,
pub(crate) thumbnail_height: std::option::Option<i32>,
pub(crate) thumbnail_interval: std::option::Option<f64>,
pub(crate) thumbnail_width: std::option::Option<i32>,
pub(crate) tile_height: std::option::Option<i32>,
pub(crate) tile_width: std::option::Option<i32>,
}
impl Builder {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn interval_cadence(mut self, input: crate::model::HlsIntervalCadence) -> Self {
self.interval_cadence = Some(input);
self
}
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn set_interval_cadence(
mut self,
input: std::option::Option<crate::model::HlsIntervalCadence>,
) -> Self {
self.interval_cadence = input;
self
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn thumbnail_height(mut self, input: i32) -> Self {
self.thumbnail_height = Some(input);
self
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn set_thumbnail_height(mut self, input: std::option::Option<i32>) -> Self {
self.thumbnail_height = input;
self
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn thumbnail_interval(mut self, input: f64) -> Self {
self.thumbnail_interval = Some(input);
self
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn set_thumbnail_interval(mut self, input: std::option::Option<f64>) -> Self {
self.thumbnail_interval = input;
self
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn thumbnail_width(mut self, input: i32) -> Self {
self.thumbnail_width = Some(input);
self
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn set_thumbnail_width(mut self, input: std::option::Option<i32>) -> Self {
self.thumbnail_width = input;
self
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn tile_height(mut self, input: i32) -> Self {
self.tile_height = Some(input);
self
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn set_tile_height(mut self, input: std::option::Option<i32>) -> Self {
self.tile_height = input;
self
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn tile_width(mut self, input: i32) -> Self {
self.tile_width = Some(input);
self
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn set_tile_width(mut self, input: std::option::Option<i32>) -> Self {
self.tile_width = input;
self
}
/// Consumes the builder and constructs a [`HlsImageBasedTrickPlaySettings`](crate::model::HlsImageBasedTrickPlaySettings)
pub fn build(self) -> crate::model::HlsImageBasedTrickPlaySettings {
crate::model::HlsImageBasedTrickPlaySettings {
interval_cadence: self.interval_cadence,
thumbnail_height: self.thumbnail_height.unwrap_or_default(),
thumbnail_interval: self.thumbnail_interval.unwrap_or_default(),
thumbnail_width: self.thumbnail_width.unwrap_or_default(),
tile_height: self.tile_height.unwrap_or_default(),
tile_width: self.tile_width.unwrap_or_default(),
}
}
}
}
impl HlsImageBasedTrickPlaySettings {
/// Creates a new builder-style object to manufacture [`HlsImageBasedTrickPlaySettings`](crate::model::HlsImageBasedTrickPlaySettings)
pub fn builder() -> crate::model::hls_image_based_trick_play_settings::Builder {
crate::model::hls_image_based_trick_play_settings::Builder::default()
}
}
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsIntervalCadence {
#[allow(missing_docs)] // documentation missing in model
FollowCustom,
#[allow(missing_docs)] // documentation missing in model
FollowIframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsIntervalCadence {
fn from(s: &str) -> Self {
match s {
"FOLLOW_CUSTOM" => HlsIntervalCadence::FollowCustom,
"FOLLOW_IFRAME" => HlsIntervalCadence::FollowIframe,
other => HlsIntervalCadence::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsIntervalCadence {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsIntervalCadence::from(s))
}
}
impl HlsIntervalCadence {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsIntervalCadence::FollowCustom => "FOLLOW_CUSTOM",
HlsIntervalCadence::FollowIframe => "FOLLOW_IFRAME",
HlsIntervalCadence::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_CUSTOM", "FOLLOW_IFRAME"]
}
}
impl AsRef<str> for HlsIntervalCadence {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsImageBasedTrickPlay {
#[allow(missing_docs)] // documentation missing in model
Advanced,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Thumbnail,
#[allow(missing_docs)] // documentation missing in model
ThumbnailAndFullframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsImageBasedTrickPlay {
fn from(s: &str) -> Self {
match s {
"ADVANCED" => HlsImageBasedTrickPlay::Advanced,
"NONE" => HlsImageBasedTrickPlay::None,
"THUMBNAIL" => HlsImageBasedTrickPlay::Thumbnail,
"THUMBNAIL_AND_FULLFRAME" => HlsImageBasedTrickPlay::ThumbnailAndFullframe,
other => HlsImageBasedTrickPlay::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsImageBasedTrickPlay {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsImageBasedTrickPlay::from(s))
}
}
impl HlsImageBasedTrickPlay {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsImageBasedTrickPlay::Advanced => "ADVANCED",
HlsImageBasedTrickPlay::None => "NONE",
HlsImageBasedTrickPlay::Thumbnail => "THUMBNAIL",
HlsImageBasedTrickPlay::ThumbnailAndFullframe => "THUMBNAIL_AND_FULLFRAME",
HlsImageBasedTrickPlay::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADVANCED", "NONE", "THUMBNAIL", "THUMBNAIL_AND_FULLFRAME"]
}
}
impl AsRef<str> for HlsImageBasedTrickPlay {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for HLS encryption
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsEncryptionSettings {
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub constant_initialization_vector: std::option::Option<std::string::String>,
/// Encrypts the segments with the given encryption scheme. Leave blank to disable. Selecting 'Disabled' in the web interface also disables encryption.
pub encryption_method: std::option::Option<crate::model::HlsEncryptionType>,
/// The Initialization Vector is a 128-bit number used in conjunction with the key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed in the manifest. Otherwise Initialization Vector is not in the manifest.
pub initialization_vector_in_manifest:
std::option::Option<crate::model::HlsInitializationVectorInManifest>,
/// Enable this setting to insert the EXT-X-SESSION-KEY element into the master playlist. This allows for offline Apple HLS FairPlay content protection.
pub offline_encrypted: std::option::Option<crate::model::HlsOfflineEncrypted>,
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
/// Use these settings to set up encryption with a static key provider.
pub static_key_provider: std::option::Option<crate::model::StaticKeyProvider>,
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub r#type: std::option::Option<crate::model::HlsKeyProviderType>,
}
impl HlsEncryptionSettings {
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub fn constant_initialization_vector(&self) -> std::option::Option<&str> {
self.constant_initialization_vector.as_deref()
}
/// Encrypts the segments with the given encryption scheme. Leave blank to disable. Selecting 'Disabled' in the web interface also disables encryption.
pub fn encryption_method(&self) -> std::option::Option<&crate::model::HlsEncryptionType> {
self.encryption_method.as_ref()
}
/// The Initialization Vector is a 128-bit number used in conjunction with the key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed in the manifest. Otherwise Initialization Vector is not in the manifest.
pub fn initialization_vector_in_manifest(
&self,
) -> std::option::Option<&crate::model::HlsInitializationVectorInManifest> {
self.initialization_vector_in_manifest.as_ref()
}
/// Enable this setting to insert the EXT-X-SESSION-KEY element into the master playlist. This allows for offline Apple HLS FairPlay content protection.
pub fn offline_encrypted(&self) -> std::option::Option<&crate::model::HlsOfflineEncrypted> {
self.offline_encrypted.as_ref()
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
self.speke_key_provider.as_ref()
}
/// Use these settings to set up encryption with a static key provider.
pub fn static_key_provider(&self) -> std::option::Option<&crate::model::StaticKeyProvider> {
self.static_key_provider.as_ref()
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub fn r#type(&self) -> std::option::Option<&crate::model::HlsKeyProviderType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for HlsEncryptionSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsEncryptionSettings");
formatter.field(
"constant_initialization_vector",
&self.constant_initialization_vector,
);
formatter.field("encryption_method", &self.encryption_method);
formatter.field(
"initialization_vector_in_manifest",
&self.initialization_vector_in_manifest,
);
formatter.field("offline_encrypted", &self.offline_encrypted);
formatter.field("speke_key_provider", &self.speke_key_provider);
formatter.field("static_key_provider", &self.static_key_provider);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`HlsEncryptionSettings`](crate::model::HlsEncryptionSettings)
pub mod hls_encryption_settings {
/// A builder for [`HlsEncryptionSettings`](crate::model::HlsEncryptionSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) constant_initialization_vector: std::option::Option<std::string::String>,
pub(crate) encryption_method: std::option::Option<crate::model::HlsEncryptionType>,
pub(crate) initialization_vector_in_manifest:
std::option::Option<crate::model::HlsInitializationVectorInManifest>,
pub(crate) offline_encrypted: std::option::Option<crate::model::HlsOfflineEncrypted>,
pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
pub(crate) static_key_provider: std::option::Option<crate::model::StaticKeyProvider>,
pub(crate) r#type: std::option::Option<crate::model::HlsKeyProviderType>,
}
impl Builder {
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub fn constant_initialization_vector(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.constant_initialization_vector = Some(input.into());
self
}
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub fn set_constant_initialization_vector(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.constant_initialization_vector = input;
self
}
/// Encrypts the segments with the given encryption scheme. Leave blank to disable. Selecting 'Disabled' in the web interface also disables encryption.
pub fn encryption_method(mut self, input: crate::model::HlsEncryptionType) -> Self {
self.encryption_method = Some(input);
self
}
/// Encrypts the segments with the given encryption scheme. Leave blank to disable. Selecting 'Disabled' in the web interface also disables encryption.
pub fn set_encryption_method(
mut self,
input: std::option::Option<crate::model::HlsEncryptionType>,
) -> Self {
self.encryption_method = input;
self
}
/// The Initialization Vector is a 128-bit number used in conjunction with the key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed in the manifest. Otherwise Initialization Vector is not in the manifest.
pub fn initialization_vector_in_manifest(
mut self,
input: crate::model::HlsInitializationVectorInManifest,
) -> Self {
self.initialization_vector_in_manifest = Some(input);
self
}
/// The Initialization Vector is a 128-bit number used in conjunction with the key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed in the manifest. Otherwise Initialization Vector is not in the manifest.
pub fn set_initialization_vector_in_manifest(
mut self,
input: std::option::Option<crate::model::HlsInitializationVectorInManifest>,
) -> Self {
self.initialization_vector_in_manifest = input;
self
}
/// Enable this setting to insert the EXT-X-SESSION-KEY element into the master playlist. This allows for offline Apple HLS FairPlay content protection.
pub fn offline_encrypted(mut self, input: crate::model::HlsOfflineEncrypted) -> Self {
self.offline_encrypted = Some(input);
self
}
/// Enable this setting to insert the EXT-X-SESSION-KEY element into the master playlist. This allows for offline Apple HLS FairPlay content protection.
pub fn set_offline_encrypted(
mut self,
input: std::option::Option<crate::model::HlsOfflineEncrypted>,
) -> Self {
self.offline_encrypted = input;
self
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
self.speke_key_provider = Some(input);
self
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn set_speke_key_provider(
mut self,
input: std::option::Option<crate::model::SpekeKeyProvider>,
) -> Self {
self.speke_key_provider = input;
self
}
/// Use these settings to set up encryption with a static key provider.
pub fn static_key_provider(mut self, input: crate::model::StaticKeyProvider) -> Self {
self.static_key_provider = Some(input);
self
}
/// Use these settings to set up encryption with a static key provider.
pub fn set_static_key_provider(
mut self,
input: std::option::Option<crate::model::StaticKeyProvider>,
) -> Self {
self.static_key_provider = input;
self
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub fn r#type(mut self, input: crate::model::HlsKeyProviderType) -> Self {
self.r#type = Some(input);
self
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub fn set_type(
mut self,
input: std::option::Option<crate::model::HlsKeyProviderType>,
) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`HlsEncryptionSettings`](crate::model::HlsEncryptionSettings)
pub fn build(self) -> crate::model::HlsEncryptionSettings {
crate::model::HlsEncryptionSettings {
constant_initialization_vector: self.constant_initialization_vector,
encryption_method: self.encryption_method,
initialization_vector_in_manifest: self.initialization_vector_in_manifest,
offline_encrypted: self.offline_encrypted,
speke_key_provider: self.speke_key_provider,
static_key_provider: self.static_key_provider,
r#type: self.r#type,
}
}
}
}
impl HlsEncryptionSettings {
/// Creates a new builder-style object to manufacture [`HlsEncryptionSettings`](crate::model::HlsEncryptionSettings)
pub fn builder() -> crate::model::hls_encryption_settings::Builder {
crate::model::hls_encryption_settings::Builder::default()
}
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsKeyProviderType {
#[allow(missing_docs)] // documentation missing in model
Speke,
#[allow(missing_docs)] // documentation missing in model
StaticKey,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsKeyProviderType {
fn from(s: &str) -> Self {
match s {
"SPEKE" => HlsKeyProviderType::Speke,
"STATIC_KEY" => HlsKeyProviderType::StaticKey,
other => HlsKeyProviderType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsKeyProviderType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsKeyProviderType::from(s))
}
}
impl HlsKeyProviderType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsKeyProviderType::Speke => "SPEKE",
HlsKeyProviderType::StaticKey => "STATIC_KEY",
HlsKeyProviderType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SPEKE", "STATIC_KEY"]
}
}
impl AsRef<str> for HlsKeyProviderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use these settings to set up encryption with a static key provider.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StaticKeyProvider {
/// Relates to DRM implementation. Sets the value of the KEYFORMAT attribute. Must be 'identity' or a reverse DNS string. May be omitted to indicate an implicit value of 'identity'.
pub key_format: std::option::Option<std::string::String>,
/// Relates to DRM implementation. Either a single positive integer version value or a slash delimited list of version values (1/2/3).
pub key_format_versions: std::option::Option<std::string::String>,
/// Relates to DRM implementation. Use a 32-character hexidecimal string to specify Key Value (StaticKeyValue).
pub static_key_value: std::option::Option<std::string::String>,
/// Relates to DRM implementation. The location of the license server used for protecting content.
pub url: std::option::Option<std::string::String>,
}
impl StaticKeyProvider {
/// Relates to DRM implementation. Sets the value of the KEYFORMAT attribute. Must be 'identity' or a reverse DNS string. May be omitted to indicate an implicit value of 'identity'.
pub fn key_format(&self) -> std::option::Option<&str> {
self.key_format.as_deref()
}
/// Relates to DRM implementation. Either a single positive integer version value or a slash delimited list of version values (1/2/3).
pub fn key_format_versions(&self) -> std::option::Option<&str> {
self.key_format_versions.as_deref()
}
/// Relates to DRM implementation. Use a 32-character hexidecimal string to specify Key Value (StaticKeyValue).
pub fn static_key_value(&self) -> std::option::Option<&str> {
self.static_key_value.as_deref()
}
/// Relates to DRM implementation. The location of the license server used for protecting content.
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
impl std::fmt::Debug for StaticKeyProvider {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StaticKeyProvider");
formatter.field("key_format", &self.key_format);
formatter.field("key_format_versions", &self.key_format_versions);
formatter.field("static_key_value", &self.static_key_value);
formatter.field("url", &self.url);
formatter.finish()
}
}
/// See [`StaticKeyProvider`](crate::model::StaticKeyProvider)
pub mod static_key_provider {
/// A builder for [`StaticKeyProvider`](crate::model::StaticKeyProvider)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key_format: std::option::Option<std::string::String>,
pub(crate) key_format_versions: std::option::Option<std::string::String>,
pub(crate) static_key_value: std::option::Option<std::string::String>,
pub(crate) url: std::option::Option<std::string::String>,
}
impl Builder {
/// Relates to DRM implementation. Sets the value of the KEYFORMAT attribute. Must be 'identity' or a reverse DNS string. May be omitted to indicate an implicit value of 'identity'.
pub fn key_format(mut self, input: impl Into<std::string::String>) -> Self {
self.key_format = Some(input.into());
self
}
/// Relates to DRM implementation. Sets the value of the KEYFORMAT attribute. Must be 'identity' or a reverse DNS string. May be omitted to indicate an implicit value of 'identity'.
pub fn set_key_format(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key_format = input;
self
}
/// Relates to DRM implementation. Either a single positive integer version value or a slash delimited list of version values (1/2/3).
pub fn key_format_versions(mut self, input: impl Into<std::string::String>) -> Self {
self.key_format_versions = Some(input.into());
self
}
/// Relates to DRM implementation. Either a single positive integer version value or a slash delimited list of version values (1/2/3).
pub fn set_key_format_versions(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.key_format_versions = input;
self
}
/// Relates to DRM implementation. Use a 32-character hexidecimal string to specify Key Value (StaticKeyValue).
pub fn static_key_value(mut self, input: impl Into<std::string::String>) -> Self {
self.static_key_value = Some(input.into());
self
}
/// Relates to DRM implementation. Use a 32-character hexidecimal string to specify Key Value (StaticKeyValue).
pub fn set_static_key_value(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.static_key_value = input;
self
}
/// Relates to DRM implementation. The location of the license server used for protecting content.
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
/// Relates to DRM implementation. The location of the license server used for protecting content.
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
/// Consumes the builder and constructs a [`StaticKeyProvider`](crate::model::StaticKeyProvider)
pub fn build(self) -> crate::model::StaticKeyProvider {
crate::model::StaticKeyProvider {
key_format: self.key_format,
key_format_versions: self.key_format_versions,
static_key_value: self.static_key_value,
url: self.url,
}
}
}
}
impl StaticKeyProvider {
/// Creates a new builder-style object to manufacture [`StaticKeyProvider`](crate::model::StaticKeyProvider)
pub fn builder() -> crate::model::static_key_provider::Builder {
crate::model::static_key_provider::Builder::default()
}
}
/// Enable this setting to insert the EXT-X-SESSION-KEY element into the master playlist. This allows for offline Apple HLS FairPlay content protection.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsOfflineEncrypted {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsOfflineEncrypted {
fn from(s: &str) -> Self {
match s {
"DISABLED" => HlsOfflineEncrypted::Disabled,
"ENABLED" => HlsOfflineEncrypted::Enabled,
other => HlsOfflineEncrypted::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsOfflineEncrypted {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsOfflineEncrypted::from(s))
}
}
impl HlsOfflineEncrypted {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsOfflineEncrypted::Disabled => "DISABLED",
HlsOfflineEncrypted::Enabled => "ENABLED",
HlsOfflineEncrypted::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for HlsOfflineEncrypted {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The Initialization Vector is a 128-bit number used in conjunction with the key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed in the manifest. Otherwise Initialization Vector is not in the manifest.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsInitializationVectorInManifest {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsInitializationVectorInManifest {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => HlsInitializationVectorInManifest::Exclude,
"INCLUDE" => HlsInitializationVectorInManifest::Include,
other => HlsInitializationVectorInManifest::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsInitializationVectorInManifest {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsInitializationVectorInManifest::from(s))
}
}
impl HlsInitializationVectorInManifest {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsInitializationVectorInManifest::Exclude => "EXCLUDE",
HlsInitializationVectorInManifest::Include => "INCLUDE",
HlsInitializationVectorInManifest::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for HlsInitializationVectorInManifest {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Encrypts the segments with the given encryption scheme. Leave blank to disable. Selecting 'Disabled' in the web interface also disables encryption.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsEncryptionType {
#[allow(missing_docs)] // documentation missing in model
Aes128,
#[allow(missing_docs)] // documentation missing in model
SampleAes,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsEncryptionType {
fn from(s: &str) -> Self {
match s {
"AES128" => HlsEncryptionType::Aes128,
"SAMPLE_AES" => HlsEncryptionType::SampleAes,
other => HlsEncryptionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsEncryptionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsEncryptionType::from(s))
}
}
impl HlsEncryptionType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsEncryptionType::Aes128 => "AES128",
HlsEncryptionType::SampleAes => "SAMPLE_AES",
HlsEncryptionType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AES128", "SAMPLE_AES"]
}
}
impl AsRef<str> for HlsEncryptionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Indicates whether segments should be placed in subdirectories.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsDirectoryStructure {
#[allow(missing_docs)] // documentation missing in model
SingleDirectory,
#[allow(missing_docs)] // documentation missing in model
SubdirectoryPerStream,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsDirectoryStructure {
fn from(s: &str) -> Self {
match s {
"SINGLE_DIRECTORY" => HlsDirectoryStructure::SingleDirectory,
"SUBDIRECTORY_PER_STREAM" => HlsDirectoryStructure::SubdirectoryPerStream,
other => HlsDirectoryStructure::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsDirectoryStructure {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsDirectoryStructure::from(s))
}
}
impl HlsDirectoryStructure {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsDirectoryStructure::SingleDirectory => "SINGLE_DIRECTORY",
HlsDirectoryStructure::SubdirectoryPerStream => "SUBDIRECTORY_PER_STREAM",
HlsDirectoryStructure::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SINGLE_DIRECTORY", "SUBDIRECTORY_PER_STREAM"]
}
}
impl AsRef<str> for HlsDirectoryStructure {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsCodecSpecification {
#[allow(missing_docs)] // documentation missing in model
Rfc4281,
#[allow(missing_docs)] // documentation missing in model
Rfc6381,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsCodecSpecification {
fn from(s: &str) -> Self {
match s {
"RFC_4281" => HlsCodecSpecification::Rfc4281,
"RFC_6381" => HlsCodecSpecification::Rfc6381,
other => HlsCodecSpecification::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsCodecSpecification {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsCodecSpecification::from(s))
}
}
impl HlsCodecSpecification {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsCodecSpecification::Rfc4281 => "RFC_4281",
HlsCodecSpecification::Rfc6381 => "RFC_6381",
HlsCodecSpecification::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["RFC_4281", "RFC_6381"]
}
}
impl AsRef<str> for HlsCodecSpecification {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsClientCache {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsClientCache {
fn from(s: &str) -> Self {
match s {
"DISABLED" => HlsClientCache::Disabled,
"ENABLED" => HlsClientCache::Enabled,
other => HlsClientCache::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsClientCache {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsClientCache::from(s))
}
}
impl HlsClientCache {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsClientCache::Disabled => "DISABLED",
HlsClientCache::Enabled => "ENABLED",
HlsClientCache::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for HlsClientCache {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Set Caption segment length control (CaptionSegmentLengthControl) to Match video (MATCH_VIDEO) to create caption segments that align with the video segments from the first video output in this output group. For example, if the video segments are 2 seconds long, your WebVTT segments will also be 2 seconds long. Keep the default setting, Large segments (LARGE_SEGMENTS) to create caption segments that are 300 seconds long.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsCaptionSegmentLengthControl {
#[allow(missing_docs)] // documentation missing in model
LargeSegments,
#[allow(missing_docs)] // documentation missing in model
MatchVideo,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsCaptionSegmentLengthControl {
fn from(s: &str) -> Self {
match s {
"LARGE_SEGMENTS" => HlsCaptionSegmentLengthControl::LargeSegments,
"MATCH_VIDEO" => HlsCaptionSegmentLengthControl::MatchVideo,
other => HlsCaptionSegmentLengthControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsCaptionSegmentLengthControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsCaptionSegmentLengthControl::from(s))
}
}
impl HlsCaptionSegmentLengthControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsCaptionSegmentLengthControl::LargeSegments => "LARGE_SEGMENTS",
HlsCaptionSegmentLengthControl::MatchVideo => "MATCH_VIDEO",
HlsCaptionSegmentLengthControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["LARGE_SEGMENTS", "MATCH_VIDEO"]
}
}
impl AsRef<str> for HlsCaptionSegmentLengthControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS lines in the manifest. Specify at least one language in the CC1 Language Code field. One CLOSED-CAPTION line is added for each Language Code you specify. Make sure to specify the languages in the order in which they appear in the original source (if the source is embedded format) or the order of the caption selectors (if the source is other than embedded). Otherwise, languages in the manifest will not match up properly with the output captions. None: Include CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS line from the manifest.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsCaptionLanguageSetting {
#[allow(missing_docs)] // documentation missing in model
Insert,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Omit,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsCaptionLanguageSetting {
fn from(s: &str) -> Self {
match s {
"INSERT" => HlsCaptionLanguageSetting::Insert,
"NONE" => HlsCaptionLanguageSetting::None,
"OMIT" => HlsCaptionLanguageSetting::Omit,
other => HlsCaptionLanguageSetting::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsCaptionLanguageSetting {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsCaptionLanguageSetting::from(s))
}
}
impl HlsCaptionLanguageSetting {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsCaptionLanguageSetting::Insert => "INSERT",
HlsCaptionLanguageSetting::None => "NONE",
HlsCaptionLanguageSetting::Omit => "OMIT",
HlsCaptionLanguageSetting::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["INSERT", "NONE", "OMIT"]
}
}
impl AsRef<str> for HlsCaptionLanguageSetting {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Caption Language Mapping
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsCaptionLanguageMapping {
/// Caption channel.
pub caption_channel: i32,
/// Specify the language for this captions channel, using the ISO 639-2 or ISO 639-3 three-letter language code
pub custom_language_code: std::option::Option<std::string::String>,
/// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php.
pub language_code: std::option::Option<crate::model::LanguageCode>,
/// Caption language description.
pub language_description: std::option::Option<std::string::String>,
}
impl HlsCaptionLanguageMapping {
/// Caption channel.
pub fn caption_channel(&self) -> i32 {
self.caption_channel
}
/// Specify the language for this captions channel, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn custom_language_code(&self) -> std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php.
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
/// Caption language description.
pub fn language_description(&self) -> std::option::Option<&str> {
self.language_description.as_deref()
}
}
impl std::fmt::Debug for HlsCaptionLanguageMapping {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsCaptionLanguageMapping");
formatter.field("caption_channel", &self.caption_channel);
formatter.field("custom_language_code", &self.custom_language_code);
formatter.field("language_code", &self.language_code);
formatter.field("language_description", &self.language_description);
formatter.finish()
}
}
/// See [`HlsCaptionLanguageMapping`](crate::model::HlsCaptionLanguageMapping)
pub mod hls_caption_language_mapping {
/// A builder for [`HlsCaptionLanguageMapping`](crate::model::HlsCaptionLanguageMapping)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) caption_channel: std::option::Option<i32>,
pub(crate) custom_language_code: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) language_description: std::option::Option<std::string::String>,
}
impl Builder {
/// Caption channel.
pub fn caption_channel(mut self, input: i32) -> Self {
self.caption_channel = Some(input);
self
}
/// Caption channel.
pub fn set_caption_channel(mut self, input: std::option::Option<i32>) -> Self {
self.caption_channel = input;
self
}
/// Specify the language for this captions channel, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn custom_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_language_code = Some(input.into());
self
}
/// Specify the language for this captions channel, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn set_custom_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_language_code = input;
self
}
/// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php.
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
/// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php.
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
/// Caption language description.
pub fn language_description(mut self, input: impl Into<std::string::String>) -> Self {
self.language_description = Some(input.into());
self
}
/// Caption language description.
pub fn set_language_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.language_description = input;
self
}
/// Consumes the builder and constructs a [`HlsCaptionLanguageMapping`](crate::model::HlsCaptionLanguageMapping)
pub fn build(self) -> crate::model::HlsCaptionLanguageMapping {
crate::model::HlsCaptionLanguageMapping {
caption_channel: self.caption_channel.unwrap_or_default(),
custom_language_code: self.custom_language_code,
language_code: self.language_code,
language_description: self.language_description,
}
}
}
}
impl HlsCaptionLanguageMapping {
/// Creates a new builder-style object to manufacture [`HlsCaptionLanguageMapping`](crate::model::HlsCaptionLanguageMapping)
pub fn builder() -> crate::model::hls_caption_language_mapping::Builder {
crate::model::hls_caption_language_mapping::Builder::default()
}
}
/// Ignore this setting unless you are using FairPlay DRM with Verimatrix and you encounter playback issues. Keep the default value, Include (INCLUDE), to output audio-only headers. Choose Exclude (EXCLUDE) to remove the audio-only headers from your audio segments.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsAudioOnlyHeader {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsAudioOnlyHeader {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => HlsAudioOnlyHeader::Exclude,
"INCLUDE" => HlsAudioOnlyHeader::Include,
other => HlsAudioOnlyHeader::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsAudioOnlyHeader {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsAudioOnlyHeader::from(s))
}
}
impl HlsAudioOnlyHeader {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsAudioOnlyHeader::Exclude => "EXCLUDE",
HlsAudioOnlyHeader::Include => "INCLUDE",
HlsAudioOnlyHeader::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for HlsAudioOnlyHeader {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the details for each additional HLS manifest that you want the service to generate for this output group. Each manifest can reference a different subset of outputs in the group.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub manifest_name_modifier: std::option::Option<std::string::String>,
/// Specify the outputs that you want this additional top-level manifest to reference.
pub selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl HlsAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub fn manifest_name_modifier(&self) -> std::option::Option<&str> {
self.manifest_name_modifier.as_deref()
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(&self) -> std::option::Option<&[std::string::String]> {
self.selected_outputs.as_deref()
}
}
impl std::fmt::Debug for HlsAdditionalManifest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsAdditionalManifest");
formatter.field("manifest_name_modifier", &self.manifest_name_modifier);
formatter.field("selected_outputs", &self.selected_outputs);
formatter.finish()
}
}
/// See [`HlsAdditionalManifest`](crate::model::HlsAdditionalManifest)
pub mod hls_additional_manifest {
/// A builder for [`HlsAdditionalManifest`](crate::model::HlsAdditionalManifest)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) manifest_name_modifier: std::option::Option<std::string::String>,
pub(crate) selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub fn manifest_name_modifier(mut self, input: impl Into<std::string::String>) -> Self {
self.manifest_name_modifier = Some(input.into());
self
}
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub fn set_manifest_name_modifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.manifest_name_modifier = input;
self
}
/// Appends an item to `selected_outputs`.
///
/// To override the contents of this collection use [`set_selected_outputs`](Self::set_selected_outputs).
///
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.selected_outputs.unwrap_or_default();
v.push(input.into());
self.selected_outputs = Some(v);
self
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn set_selected_outputs(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.selected_outputs = input;
self
}
/// Consumes the builder and constructs a [`HlsAdditionalManifest`](crate::model::HlsAdditionalManifest)
pub fn build(self) -> crate::model::HlsAdditionalManifest {
crate::model::HlsAdditionalManifest {
manifest_name_modifier: self.manifest_name_modifier,
selected_outputs: self.selected_outputs,
}
}
}
}
impl HlsAdditionalManifest {
/// Creates a new builder-style object to manufacture [`HlsAdditionalManifest`](crate::model::HlsAdditionalManifest)
pub fn builder() -> crate::model::hls_additional_manifest::Builder {
crate::model::hls_additional_manifest::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HlsAdMarkers {
#[allow(missing_docs)] // documentation missing in model
Elemental,
#[allow(missing_docs)] // documentation missing in model
ElementalScte35,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HlsAdMarkers {
fn from(s: &str) -> Self {
match s {
"ELEMENTAL" => HlsAdMarkers::Elemental,
"ELEMENTAL_SCTE35" => HlsAdMarkers::ElementalScte35,
other => HlsAdMarkers::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HlsAdMarkers {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HlsAdMarkers::from(s))
}
}
impl HlsAdMarkers {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HlsAdMarkers::Elemental => "ELEMENTAL",
HlsAdMarkers::ElementalScte35 => "ELEMENTAL_SCTE35",
HlsAdMarkers::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ELEMENTAL", "ELEMENTAL_SCTE35"]
}
}
impl AsRef<str> for HlsAdMarkers {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings related to your File output group. MediaConvert uses this group of settings to generate a single standalone file, rather than a streaming package. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to FILE_GROUP_SETTINGS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FileGroupSettings {
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub destination: std::option::Option<std::string::String>,
/// Settings associated with the destination. Will vary based on the type of destination
pub destination_settings: std::option::Option<crate::model::DestinationSettings>,
}
impl FileGroupSettings {
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(&self) -> std::option::Option<&crate::model::DestinationSettings> {
self.destination_settings.as_ref()
}
}
impl std::fmt::Debug for FileGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("FileGroupSettings");
formatter.field("destination", &self.destination);
formatter.field("destination_settings", &self.destination_settings);
formatter.finish()
}
}
/// See [`FileGroupSettings`](crate::model::FileGroupSettings)
pub mod file_group_settings {
/// A builder for [`FileGroupSettings`](crate::model::FileGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination: std::option::Option<std::string::String>,
pub(crate) destination_settings: std::option::Option<crate::model::DestinationSettings>,
}
impl Builder {
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(mut self, input: crate::model::DestinationSettings) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::DestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// Consumes the builder and constructs a [`FileGroupSettings`](crate::model::FileGroupSettings)
pub fn build(self) -> crate::model::FileGroupSettings {
crate::model::FileGroupSettings {
destination: self.destination,
destination_settings: self.destination_settings,
}
}
}
}
impl FileGroupSettings {
/// Creates a new builder-style object to manufacture [`FileGroupSettings`](crate::model::FileGroupSettings)
pub fn builder() -> crate::model::file_group_settings::Builder {
crate::model::file_group_settings::Builder::default()
}
}
/// Settings related to your DASH output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to DASH_ISO_GROUP_SETTINGS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashIsoGroupSettings {
/// By default, the service creates one .mpd DASH manifest for each DASH ISO output group in your job. This default manifest references every output in the output group. To create additional DASH manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub additional_manifests:
std::option::Option<std::vec::Vec<crate::model::DashAdditionalManifest>>,
/// Use this setting only when your audio codec is a Dolby one (AC3, EAC3, or Atmos) and your downstream workflow requires that your DASH manifest use the Dolby channel configuration tag, rather than the MPEG one. For example, you might need to use this to make dynamic ad insertion work. Specify which audio channel configuration scheme ID URI MediaConvert writes in your DASH manifest. Keep the default value, MPEG channel configuration (MPEG_CHANNEL_CONFIGURATION), to have MediaConvert write this: urn:mpeg:mpegB:cicp:ChannelConfiguration. Choose Dolby channel configuration (DOLBY_CHANNEL_CONFIGURATION) to have MediaConvert write this instead: tag:dolby.com,2014:dash:audio_channel_configuration:2011.
pub audio_channel_config_scheme_id_uri:
std::option::Option<crate::model::DashIsoGroupAudioChannelConfigSchemeIdUri>,
/// A partial URI prefix that will be put in the manifest (.mpd) file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub base_url: std::option::Option<std::string::String>,
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub destination: std::option::Option<std::string::String>,
/// Settings associated with the destination. Will vary based on the type of destination
pub destination_settings: std::option::Option<crate::model::DestinationSettings>,
/// DRM settings.
pub encryption: std::option::Option<crate::model::DashIsoEncryptionSettings>,
/// Length of fragments to generate (in seconds). Fragment length must be compatible with GOP size and Framerate. Note that fragments will end on the next keyframe after this number of seconds, so actual fragment length may be longer. When Emit Single File is checked, the fragmentation is internal to a single output file and it does not cause the creation of many output files as in other output types.
pub fragment_length: i32,
/// Supports HbbTV specification as indicated
pub hbbtv_compliance: std::option::Option<crate::model::DashIsoHbbtvCompliance>,
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub image_based_trick_play: std::option::Option<crate::model::DashIsoImageBasedTrickPlay>,
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub image_based_trick_play_settings:
std::option::Option<crate::model::DashIsoImageBasedTrickPlaySettings>,
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub min_buffer_time: i32,
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub min_final_segment_length: f64,
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub mpd_profile: std::option::Option<crate::model::DashIsoMpdProfile>,
/// 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.
pub pts_offset_handling_for_b_frames:
std::option::Option<crate::model::DashIsoPtsOffsetHandlingForBFrames>,
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub segment_control: std::option::Option<crate::model::DashIsoSegmentControl>,
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 30. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (DashIsoSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub segment_length: i32,
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub segment_length_control: std::option::Option<crate::model::DashIsoSegmentLengthControl>,
/// If you get an HTTP error in the 400 range when you play back your DASH output, enable this setting and run your transcoding job again. When you enable this setting, the service writes precise segment durations in the DASH manifest. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When you don't enable this setting, the service writes approximate segment durations in your DASH manifest.
pub write_segment_timeline_in_representation:
std::option::Option<crate::model::DashIsoWriteSegmentTimelineInRepresentation>,
}
impl DashIsoGroupSettings {
/// By default, the service creates one .mpd DASH manifest for each DASH ISO output group in your job. This default manifest references every output in the output group. To create additional DASH manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn additional_manifests(
&self,
) -> std::option::Option<&[crate::model::DashAdditionalManifest]> {
self.additional_manifests.as_deref()
}
/// Use this setting only when your audio codec is a Dolby one (AC3, EAC3, or Atmos) and your downstream workflow requires that your DASH manifest use the Dolby channel configuration tag, rather than the MPEG one. For example, you might need to use this to make dynamic ad insertion work. Specify which audio channel configuration scheme ID URI MediaConvert writes in your DASH manifest. Keep the default value, MPEG channel configuration (MPEG_CHANNEL_CONFIGURATION), to have MediaConvert write this: urn:mpeg:mpegB:cicp:ChannelConfiguration. Choose Dolby channel configuration (DOLBY_CHANNEL_CONFIGURATION) to have MediaConvert write this instead: tag:dolby.com,2014:dash:audio_channel_configuration:2011.
pub fn audio_channel_config_scheme_id_uri(
&self,
) -> std::option::Option<&crate::model::DashIsoGroupAudioChannelConfigSchemeIdUri> {
self.audio_channel_config_scheme_id_uri.as_ref()
}
/// A partial URI prefix that will be put in the manifest (.mpd) file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub fn base_url(&self) -> std::option::Option<&str> {
self.base_url.as_deref()
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(&self) -> std::option::Option<&crate::model::DestinationSettings> {
self.destination_settings.as_ref()
}
/// DRM settings.
pub fn encryption(&self) -> std::option::Option<&crate::model::DashIsoEncryptionSettings> {
self.encryption.as_ref()
}
/// Length of fragments to generate (in seconds). Fragment length must be compatible with GOP size and Framerate. Note that fragments will end on the next keyframe after this number of seconds, so actual fragment length may be longer. When Emit Single File is checked, the fragmentation is internal to a single output file and it does not cause the creation of many output files as in other output types.
pub fn fragment_length(&self) -> i32 {
self.fragment_length
}
/// Supports HbbTV specification as indicated
pub fn hbbtv_compliance(&self) -> std::option::Option<&crate::model::DashIsoHbbtvCompliance> {
self.hbbtv_compliance.as_ref()
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn image_based_trick_play(
&self,
) -> std::option::Option<&crate::model::DashIsoImageBasedTrickPlay> {
self.image_based_trick_play.as_ref()
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn image_based_trick_play_settings(
&self,
) -> std::option::Option<&crate::model::DashIsoImageBasedTrickPlaySettings> {
self.image_based_trick_play_settings.as_ref()
}
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub fn min_buffer_time(&self) -> i32 {
self.min_buffer_time
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn min_final_segment_length(&self) -> f64 {
self.min_final_segment_length
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub fn mpd_profile(&self) -> std::option::Option<&crate::model::DashIsoMpdProfile> {
self.mpd_profile.as_ref()
}
/// 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.
pub fn pts_offset_handling_for_b_frames(
&self,
) -> std::option::Option<&crate::model::DashIsoPtsOffsetHandlingForBFrames> {
self.pts_offset_handling_for_b_frames.as_ref()
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub fn segment_control(&self) -> std::option::Option<&crate::model::DashIsoSegmentControl> {
self.segment_control.as_ref()
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 30. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (DashIsoSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn segment_length(&self) -> i32 {
self.segment_length
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn segment_length_control(
&self,
) -> std::option::Option<&crate::model::DashIsoSegmentLengthControl> {
self.segment_length_control.as_ref()
}
/// If you get an HTTP error in the 400 range when you play back your DASH output, enable this setting and run your transcoding job again. When you enable this setting, the service writes precise segment durations in the DASH manifest. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When you don't enable this setting, the service writes approximate segment durations in your DASH manifest.
pub fn write_segment_timeline_in_representation(
&self,
) -> std::option::Option<&crate::model::DashIsoWriteSegmentTimelineInRepresentation> {
self.write_segment_timeline_in_representation.as_ref()
}
}
impl std::fmt::Debug for DashIsoGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DashIsoGroupSettings");
formatter.field("additional_manifests", &self.additional_manifests);
formatter.field(
"audio_channel_config_scheme_id_uri",
&self.audio_channel_config_scheme_id_uri,
);
formatter.field("base_url", &self.base_url);
formatter.field("destination", &self.destination);
formatter.field("destination_settings", &self.destination_settings);
formatter.field("encryption", &self.encryption);
formatter.field("fragment_length", &self.fragment_length);
formatter.field("hbbtv_compliance", &self.hbbtv_compliance);
formatter.field("image_based_trick_play", &self.image_based_trick_play);
formatter.field(
"image_based_trick_play_settings",
&self.image_based_trick_play_settings,
);
formatter.field("min_buffer_time", &self.min_buffer_time);
formatter.field("min_final_segment_length", &self.min_final_segment_length);
formatter.field("mpd_profile", &self.mpd_profile);
formatter.field(
"pts_offset_handling_for_b_frames",
&self.pts_offset_handling_for_b_frames,
);
formatter.field("segment_control", &self.segment_control);
formatter.field("segment_length", &self.segment_length);
formatter.field("segment_length_control", &self.segment_length_control);
formatter.field(
"write_segment_timeline_in_representation",
&self.write_segment_timeline_in_representation,
);
formatter.finish()
}
}
/// See [`DashIsoGroupSettings`](crate::model::DashIsoGroupSettings)
pub mod dash_iso_group_settings {
/// A builder for [`DashIsoGroupSettings`](crate::model::DashIsoGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) additional_manifests:
std::option::Option<std::vec::Vec<crate::model::DashAdditionalManifest>>,
pub(crate) audio_channel_config_scheme_id_uri:
std::option::Option<crate::model::DashIsoGroupAudioChannelConfigSchemeIdUri>,
pub(crate) base_url: std::option::Option<std::string::String>,
pub(crate) destination: std::option::Option<std::string::String>,
pub(crate) destination_settings: std::option::Option<crate::model::DestinationSettings>,
pub(crate) encryption: std::option::Option<crate::model::DashIsoEncryptionSettings>,
pub(crate) fragment_length: std::option::Option<i32>,
pub(crate) hbbtv_compliance: std::option::Option<crate::model::DashIsoHbbtvCompliance>,
pub(crate) image_based_trick_play:
std::option::Option<crate::model::DashIsoImageBasedTrickPlay>,
pub(crate) image_based_trick_play_settings:
std::option::Option<crate::model::DashIsoImageBasedTrickPlaySettings>,
pub(crate) min_buffer_time: std::option::Option<i32>,
pub(crate) min_final_segment_length: std::option::Option<f64>,
pub(crate) mpd_profile: std::option::Option<crate::model::DashIsoMpdProfile>,
pub(crate) pts_offset_handling_for_b_frames:
std::option::Option<crate::model::DashIsoPtsOffsetHandlingForBFrames>,
pub(crate) segment_control: std::option::Option<crate::model::DashIsoSegmentControl>,
pub(crate) segment_length: std::option::Option<i32>,
pub(crate) segment_length_control:
std::option::Option<crate::model::DashIsoSegmentLengthControl>,
pub(crate) write_segment_timeline_in_representation:
std::option::Option<crate::model::DashIsoWriteSegmentTimelineInRepresentation>,
}
impl Builder {
/// Appends an item to `additional_manifests`.
///
/// To override the contents of this collection use [`set_additional_manifests`](Self::set_additional_manifests).
///
/// By default, the service creates one .mpd DASH manifest for each DASH ISO output group in your job. This default manifest references every output in the output group. To create additional DASH manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn additional_manifests(mut self, input: crate::model::DashAdditionalManifest) -> Self {
let mut v = self.additional_manifests.unwrap_or_default();
v.push(input);
self.additional_manifests = Some(v);
self
}
/// By default, the service creates one .mpd DASH manifest for each DASH ISO output group in your job. This default manifest references every output in the output group. To create additional DASH manifests that reference a subset of the outputs in the output group, specify a list of them here.
pub fn set_additional_manifests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DashAdditionalManifest>>,
) -> Self {
self.additional_manifests = input;
self
}
/// Use this setting only when your audio codec is a Dolby one (AC3, EAC3, or Atmos) and your downstream workflow requires that your DASH manifest use the Dolby channel configuration tag, rather than the MPEG one. For example, you might need to use this to make dynamic ad insertion work. Specify which audio channel configuration scheme ID URI MediaConvert writes in your DASH manifest. Keep the default value, MPEG channel configuration (MPEG_CHANNEL_CONFIGURATION), to have MediaConvert write this: urn:mpeg:mpegB:cicp:ChannelConfiguration. Choose Dolby channel configuration (DOLBY_CHANNEL_CONFIGURATION) to have MediaConvert write this instead: tag:dolby.com,2014:dash:audio_channel_configuration:2011.
pub fn audio_channel_config_scheme_id_uri(
mut self,
input: crate::model::DashIsoGroupAudioChannelConfigSchemeIdUri,
) -> Self {
self.audio_channel_config_scheme_id_uri = Some(input);
self
}
/// Use this setting only when your audio codec is a Dolby one (AC3, EAC3, or Atmos) and your downstream workflow requires that your DASH manifest use the Dolby channel configuration tag, rather than the MPEG one. For example, you might need to use this to make dynamic ad insertion work. Specify which audio channel configuration scheme ID URI MediaConvert writes in your DASH manifest. Keep the default value, MPEG channel configuration (MPEG_CHANNEL_CONFIGURATION), to have MediaConvert write this: urn:mpeg:mpegB:cicp:ChannelConfiguration. Choose Dolby channel configuration (DOLBY_CHANNEL_CONFIGURATION) to have MediaConvert write this instead: tag:dolby.com,2014:dash:audio_channel_configuration:2011.
pub fn set_audio_channel_config_scheme_id_uri(
mut self,
input: std::option::Option<crate::model::DashIsoGroupAudioChannelConfigSchemeIdUri>,
) -> Self {
self.audio_channel_config_scheme_id_uri = input;
self
}
/// A partial URI prefix that will be put in the manifest (.mpd) file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub fn base_url(mut self, input: impl Into<std::string::String>) -> Self {
self.base_url = Some(input.into());
self
}
/// A partial URI prefix that will be put in the manifest (.mpd) file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub fn set_base_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.base_url = input;
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(mut self, input: crate::model::DestinationSettings) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::DestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// DRM settings.
pub fn encryption(mut self, input: crate::model::DashIsoEncryptionSettings) -> Self {
self.encryption = Some(input);
self
}
/// DRM settings.
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::DashIsoEncryptionSettings>,
) -> Self {
self.encryption = input;
self
}
/// Length of fragments to generate (in seconds). Fragment length must be compatible with GOP size and Framerate. Note that fragments will end on the next keyframe after this number of seconds, so actual fragment length may be longer. When Emit Single File is checked, the fragmentation is internal to a single output file and it does not cause the creation of many output files as in other output types.
pub fn fragment_length(mut self, input: i32) -> Self {
self.fragment_length = Some(input);
self
}
/// Length of fragments to generate (in seconds). Fragment length must be compatible with GOP size and Framerate. Note that fragments will end on the next keyframe after this number of seconds, so actual fragment length may be longer. When Emit Single File is checked, the fragmentation is internal to a single output file and it does not cause the creation of many output files as in other output types.
pub fn set_fragment_length(mut self, input: std::option::Option<i32>) -> Self {
self.fragment_length = input;
self
}
/// Supports HbbTV specification as indicated
pub fn hbbtv_compliance(mut self, input: crate::model::DashIsoHbbtvCompliance) -> Self {
self.hbbtv_compliance = Some(input);
self
}
/// Supports HbbTV specification as indicated
pub fn set_hbbtv_compliance(
mut self,
input: std::option::Option<crate::model::DashIsoHbbtvCompliance>,
) -> Self {
self.hbbtv_compliance = input;
self
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn image_based_trick_play(
mut self,
input: crate::model::DashIsoImageBasedTrickPlay,
) -> Self {
self.image_based_trick_play = Some(input);
self
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn set_image_based_trick_play(
mut self,
input: std::option::Option<crate::model::DashIsoImageBasedTrickPlay>,
) -> Self {
self.image_based_trick_play = input;
self
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn image_based_trick_play_settings(
mut self,
input: crate::model::DashIsoImageBasedTrickPlaySettings,
) -> Self {
self.image_based_trick_play_settings = Some(input);
self
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn set_image_based_trick_play_settings(
mut self,
input: std::option::Option<crate::model::DashIsoImageBasedTrickPlaySettings>,
) -> Self {
self.image_based_trick_play_settings = input;
self
}
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub fn min_buffer_time(mut self, input: i32) -> Self {
self.min_buffer_time = Some(input);
self
}
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub fn set_min_buffer_time(mut self, input: std::option::Option<i32>) -> Self {
self.min_buffer_time = input;
self
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn min_final_segment_length(mut self, input: f64) -> Self {
self.min_final_segment_length = Some(input);
self
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn set_min_final_segment_length(mut self, input: std::option::Option<f64>) -> Self {
self.min_final_segment_length = input;
self
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub fn mpd_profile(mut self, input: crate::model::DashIsoMpdProfile) -> Self {
self.mpd_profile = Some(input);
self
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub fn set_mpd_profile(
mut self,
input: std::option::Option<crate::model::DashIsoMpdProfile>,
) -> Self {
self.mpd_profile = input;
self
}
/// 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.
pub fn pts_offset_handling_for_b_frames(
mut self,
input: crate::model::DashIsoPtsOffsetHandlingForBFrames,
) -> Self {
self.pts_offset_handling_for_b_frames = Some(input);
self
}
/// 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.
pub fn set_pts_offset_handling_for_b_frames(
mut self,
input: std::option::Option<crate::model::DashIsoPtsOffsetHandlingForBFrames>,
) -> Self {
self.pts_offset_handling_for_b_frames = input;
self
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub fn segment_control(mut self, input: crate::model::DashIsoSegmentControl) -> Self {
self.segment_control = Some(input);
self
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub fn set_segment_control(
mut self,
input: std::option::Option<crate::model::DashIsoSegmentControl>,
) -> Self {
self.segment_control = input;
self
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 30. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (DashIsoSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn segment_length(mut self, input: i32) -> Self {
self.segment_length = Some(input);
self
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 30. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (DashIsoSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn set_segment_length(mut self, input: std::option::Option<i32>) -> Self {
self.segment_length = input;
self
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn segment_length_control(
mut self,
input: crate::model::DashIsoSegmentLengthControl,
) -> Self {
self.segment_length_control = Some(input);
self
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn set_segment_length_control(
mut self,
input: std::option::Option<crate::model::DashIsoSegmentLengthControl>,
) -> Self {
self.segment_length_control = input;
self
}
/// If you get an HTTP error in the 400 range when you play back your DASH output, enable this setting and run your transcoding job again. When you enable this setting, the service writes precise segment durations in the DASH manifest. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When you don't enable this setting, the service writes approximate segment durations in your DASH manifest.
pub fn write_segment_timeline_in_representation(
mut self,
input: crate::model::DashIsoWriteSegmentTimelineInRepresentation,
) -> Self {
self.write_segment_timeline_in_representation = Some(input);
self
}
/// If you get an HTTP error in the 400 range when you play back your DASH output, enable this setting and run your transcoding job again. When you enable this setting, the service writes precise segment durations in the DASH manifest. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When you don't enable this setting, the service writes approximate segment durations in your DASH manifest.
pub fn set_write_segment_timeline_in_representation(
mut self,
input: std::option::Option<crate::model::DashIsoWriteSegmentTimelineInRepresentation>,
) -> Self {
self.write_segment_timeline_in_representation = input;
self
}
/// Consumes the builder and constructs a [`DashIsoGroupSettings`](crate::model::DashIsoGroupSettings)
pub fn build(self) -> crate::model::DashIsoGroupSettings {
crate::model::DashIsoGroupSettings {
additional_manifests: self.additional_manifests,
audio_channel_config_scheme_id_uri: self.audio_channel_config_scheme_id_uri,
base_url: self.base_url,
destination: self.destination,
destination_settings: self.destination_settings,
encryption: self.encryption,
fragment_length: self.fragment_length.unwrap_or_default(),
hbbtv_compliance: self.hbbtv_compliance,
image_based_trick_play: self.image_based_trick_play,
image_based_trick_play_settings: self.image_based_trick_play_settings,
min_buffer_time: self.min_buffer_time.unwrap_or_default(),
min_final_segment_length: self.min_final_segment_length.unwrap_or_default(),
mpd_profile: self.mpd_profile,
pts_offset_handling_for_b_frames: self.pts_offset_handling_for_b_frames,
segment_control: self.segment_control,
segment_length: self.segment_length.unwrap_or_default(),
segment_length_control: self.segment_length_control,
write_segment_timeline_in_representation: self
.write_segment_timeline_in_representation,
}
}
}
}
impl DashIsoGroupSettings {
/// Creates a new builder-style object to manufacture [`DashIsoGroupSettings`](crate::model::DashIsoGroupSettings)
pub fn builder() -> crate::model::dash_iso_group_settings::Builder {
crate::model::dash_iso_group_settings::Builder::default()
}
}
/// When you enable Precise segment duration in manifests (writeSegmentTimelineInRepresentation), your DASH manifest shows precise segment durations. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When this feature isn't enabled, the segment durations in your DASH manifest are approximate. The segment duration information appears in the duration attribute of the SegmentTemplate element.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoWriteSegmentTimelineInRepresentation {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoWriteSegmentTimelineInRepresentation {
fn from(s: &str) -> Self {
match s {
"DISABLED" => DashIsoWriteSegmentTimelineInRepresentation::Disabled,
"ENABLED" => DashIsoWriteSegmentTimelineInRepresentation::Enabled,
other => DashIsoWriteSegmentTimelineInRepresentation::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoWriteSegmentTimelineInRepresentation {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoWriteSegmentTimelineInRepresentation::from(s))
}
}
impl DashIsoWriteSegmentTimelineInRepresentation {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoWriteSegmentTimelineInRepresentation::Disabled => "DISABLED",
DashIsoWriteSegmentTimelineInRepresentation::Enabled => "ENABLED",
DashIsoWriteSegmentTimelineInRepresentation::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for DashIsoWriteSegmentTimelineInRepresentation {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoSegmentLengthControl {
#[allow(missing_docs)] // documentation missing in model
Exact,
#[allow(missing_docs)] // documentation missing in model
GopMultiple,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoSegmentLengthControl {
fn from(s: &str) -> Self {
match s {
"EXACT" => DashIsoSegmentLengthControl::Exact,
"GOP_MULTIPLE" => DashIsoSegmentLengthControl::GopMultiple,
other => DashIsoSegmentLengthControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoSegmentLengthControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoSegmentLengthControl::from(s))
}
}
impl DashIsoSegmentLengthControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoSegmentLengthControl::Exact => "EXACT",
DashIsoSegmentLengthControl::GopMultiple => "GOP_MULTIPLE",
DashIsoSegmentLengthControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXACT", "GOP_MULTIPLE"]
}
}
impl AsRef<str> for DashIsoSegmentLengthControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoSegmentControl {
#[allow(missing_docs)] // documentation missing in model
SegmentedFiles,
#[allow(missing_docs)] // documentation missing in model
SingleFile,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoSegmentControl {
fn from(s: &str) -> Self {
match s {
"SEGMENTED_FILES" => DashIsoSegmentControl::SegmentedFiles,
"SINGLE_FILE" => DashIsoSegmentControl::SingleFile,
other => DashIsoSegmentControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoSegmentControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoSegmentControl::from(s))
}
}
impl DashIsoSegmentControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoSegmentControl::SegmentedFiles => "SEGMENTED_FILES",
DashIsoSegmentControl::SingleFile => "SINGLE_FILE",
DashIsoSegmentControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SEGMENTED_FILES", "SINGLE_FILE"]
}
}
impl AsRef<str> for DashIsoSegmentControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoPtsOffsetHandlingForBFrames {
#[allow(missing_docs)] // documentation missing in model
MatchInitialPts,
#[allow(missing_docs)] // documentation missing in model
ZeroBased,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoPtsOffsetHandlingForBFrames {
fn from(s: &str) -> Self {
match s {
"MATCH_INITIAL_PTS" => DashIsoPtsOffsetHandlingForBFrames::MatchInitialPts,
"ZERO_BASED" => DashIsoPtsOffsetHandlingForBFrames::ZeroBased,
other => DashIsoPtsOffsetHandlingForBFrames::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoPtsOffsetHandlingForBFrames {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoPtsOffsetHandlingForBFrames::from(s))
}
}
impl DashIsoPtsOffsetHandlingForBFrames {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoPtsOffsetHandlingForBFrames::MatchInitialPts => "MATCH_INITIAL_PTS",
DashIsoPtsOffsetHandlingForBFrames::ZeroBased => "ZERO_BASED",
DashIsoPtsOffsetHandlingForBFrames::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MATCH_INITIAL_PTS", "ZERO_BASED"]
}
}
impl AsRef<str> for DashIsoPtsOffsetHandlingForBFrames {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoMpdProfile {
#[allow(missing_docs)] // documentation missing in model
MainProfile,
#[allow(missing_docs)] // documentation missing in model
OnDemandProfile,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoMpdProfile {
fn from(s: &str) -> Self {
match s {
"MAIN_PROFILE" => DashIsoMpdProfile::MainProfile,
"ON_DEMAND_PROFILE" => DashIsoMpdProfile::OnDemandProfile,
other => DashIsoMpdProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoMpdProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoMpdProfile::from(s))
}
}
impl DashIsoMpdProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoMpdProfile::MainProfile => "MAIN_PROFILE",
DashIsoMpdProfile::OnDemandProfile => "ON_DEMAND_PROFILE",
DashIsoMpdProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MAIN_PROFILE", "ON_DEMAND_PROFILE"]
}
}
impl AsRef<str> for DashIsoMpdProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashIsoImageBasedTrickPlaySettings {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub interval_cadence: std::option::Option<crate::model::DashIsoIntervalCadence>,
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub thumbnail_height: i32,
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub thumbnail_interval: f64,
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub thumbnail_width: i32,
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub tile_height: i32,
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub tile_width: i32,
}
impl DashIsoImageBasedTrickPlaySettings {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn interval_cadence(&self) -> std::option::Option<&crate::model::DashIsoIntervalCadence> {
self.interval_cadence.as_ref()
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn thumbnail_height(&self) -> i32 {
self.thumbnail_height
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn thumbnail_interval(&self) -> f64 {
self.thumbnail_interval
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn thumbnail_width(&self) -> i32 {
self.thumbnail_width
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn tile_height(&self) -> i32 {
self.tile_height
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn tile_width(&self) -> i32 {
self.tile_width
}
}
impl std::fmt::Debug for DashIsoImageBasedTrickPlaySettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DashIsoImageBasedTrickPlaySettings");
formatter.field("interval_cadence", &self.interval_cadence);
formatter.field("thumbnail_height", &self.thumbnail_height);
formatter.field("thumbnail_interval", &self.thumbnail_interval);
formatter.field("thumbnail_width", &self.thumbnail_width);
formatter.field("tile_height", &self.tile_height);
formatter.field("tile_width", &self.tile_width);
formatter.finish()
}
}
/// See [`DashIsoImageBasedTrickPlaySettings`](crate::model::DashIsoImageBasedTrickPlaySettings)
pub mod dash_iso_image_based_trick_play_settings {
/// A builder for [`DashIsoImageBasedTrickPlaySettings`](crate::model::DashIsoImageBasedTrickPlaySettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) interval_cadence: std::option::Option<crate::model::DashIsoIntervalCadence>,
pub(crate) thumbnail_height: std::option::Option<i32>,
pub(crate) thumbnail_interval: std::option::Option<f64>,
pub(crate) thumbnail_width: std::option::Option<i32>,
pub(crate) tile_height: std::option::Option<i32>,
pub(crate) tile_width: std::option::Option<i32>,
}
impl Builder {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn interval_cadence(mut self, input: crate::model::DashIsoIntervalCadence) -> Self {
self.interval_cadence = Some(input);
self
}
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn set_interval_cadence(
mut self,
input: std::option::Option<crate::model::DashIsoIntervalCadence>,
) -> Self {
self.interval_cadence = input;
self
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn thumbnail_height(mut self, input: i32) -> Self {
self.thumbnail_height = Some(input);
self
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn set_thumbnail_height(mut self, input: std::option::Option<i32>) -> Self {
self.thumbnail_height = input;
self
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn thumbnail_interval(mut self, input: f64) -> Self {
self.thumbnail_interval = Some(input);
self
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn set_thumbnail_interval(mut self, input: std::option::Option<f64>) -> Self {
self.thumbnail_interval = input;
self
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn thumbnail_width(mut self, input: i32) -> Self {
self.thumbnail_width = Some(input);
self
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn set_thumbnail_width(mut self, input: std::option::Option<i32>) -> Self {
self.thumbnail_width = input;
self
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn tile_height(mut self, input: i32) -> Self {
self.tile_height = Some(input);
self
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn set_tile_height(mut self, input: std::option::Option<i32>) -> Self {
self.tile_height = input;
self
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn tile_width(mut self, input: i32) -> Self {
self.tile_width = Some(input);
self
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn set_tile_width(mut self, input: std::option::Option<i32>) -> Self {
self.tile_width = input;
self
}
/// Consumes the builder and constructs a [`DashIsoImageBasedTrickPlaySettings`](crate::model::DashIsoImageBasedTrickPlaySettings)
pub fn build(self) -> crate::model::DashIsoImageBasedTrickPlaySettings {
crate::model::DashIsoImageBasedTrickPlaySettings {
interval_cadence: self.interval_cadence,
thumbnail_height: self.thumbnail_height.unwrap_or_default(),
thumbnail_interval: self.thumbnail_interval.unwrap_or_default(),
thumbnail_width: self.thumbnail_width.unwrap_or_default(),
tile_height: self.tile_height.unwrap_or_default(),
tile_width: self.tile_width.unwrap_or_default(),
}
}
}
}
impl DashIsoImageBasedTrickPlaySettings {
/// Creates a new builder-style object to manufacture [`DashIsoImageBasedTrickPlaySettings`](crate::model::DashIsoImageBasedTrickPlaySettings)
pub fn builder() -> crate::model::dash_iso_image_based_trick_play_settings::Builder {
crate::model::dash_iso_image_based_trick_play_settings::Builder::default()
}
}
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoIntervalCadence {
#[allow(missing_docs)] // documentation missing in model
FollowCustom,
#[allow(missing_docs)] // documentation missing in model
FollowIframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoIntervalCadence {
fn from(s: &str) -> Self {
match s {
"FOLLOW_CUSTOM" => DashIsoIntervalCadence::FollowCustom,
"FOLLOW_IFRAME" => DashIsoIntervalCadence::FollowIframe,
other => DashIsoIntervalCadence::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoIntervalCadence {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoIntervalCadence::from(s))
}
}
impl DashIsoIntervalCadence {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoIntervalCadence::FollowCustom => "FOLLOW_CUSTOM",
DashIsoIntervalCadence::FollowIframe => "FOLLOW_IFRAME",
DashIsoIntervalCadence::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_CUSTOM", "FOLLOW_IFRAME"]
}
}
impl AsRef<str> for DashIsoIntervalCadence {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoImageBasedTrickPlay {
#[allow(missing_docs)] // documentation missing in model
Advanced,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Thumbnail,
#[allow(missing_docs)] // documentation missing in model
ThumbnailAndFullframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoImageBasedTrickPlay {
fn from(s: &str) -> Self {
match s {
"ADVANCED" => DashIsoImageBasedTrickPlay::Advanced,
"NONE" => DashIsoImageBasedTrickPlay::None,
"THUMBNAIL" => DashIsoImageBasedTrickPlay::Thumbnail,
"THUMBNAIL_AND_FULLFRAME" => DashIsoImageBasedTrickPlay::ThumbnailAndFullframe,
other => DashIsoImageBasedTrickPlay::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoImageBasedTrickPlay {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoImageBasedTrickPlay::from(s))
}
}
impl DashIsoImageBasedTrickPlay {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoImageBasedTrickPlay::Advanced => "ADVANCED",
DashIsoImageBasedTrickPlay::None => "NONE",
DashIsoImageBasedTrickPlay::Thumbnail => "THUMBNAIL",
DashIsoImageBasedTrickPlay::ThumbnailAndFullframe => "THUMBNAIL_AND_FULLFRAME",
DashIsoImageBasedTrickPlay::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADVANCED", "NONE", "THUMBNAIL", "THUMBNAIL_AND_FULLFRAME"]
}
}
impl AsRef<str> for DashIsoImageBasedTrickPlay {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Supports HbbTV specification as indicated
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoHbbtvCompliance {
#[allow(missing_docs)] // documentation missing in model
Hbbtv15,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoHbbtvCompliance {
fn from(s: &str) -> Self {
match s {
"HBBTV_1_5" => DashIsoHbbtvCompliance::Hbbtv15,
"NONE" => DashIsoHbbtvCompliance::None,
other => DashIsoHbbtvCompliance::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoHbbtvCompliance {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoHbbtvCompliance::from(s))
}
}
impl DashIsoHbbtvCompliance {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoHbbtvCompliance::Hbbtv15 => "HBBTV_1_5",
DashIsoHbbtvCompliance::None => "NONE",
DashIsoHbbtvCompliance::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HBBTV_1_5", "NONE"]
}
}
impl AsRef<str> for DashIsoHbbtvCompliance {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specifies DRM settings for DASH outputs.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashIsoEncryptionSettings {
/// This setting can improve the compatibility of your output with video players on obsolete devices. It applies only to DASH H.264 outputs with DRM encryption. Choose Unencrypted SEI (UNENCRYPTED_SEI) only to correct problems with playback on older devices. Otherwise, keep the default setting CENC v1 (CENC_V1). If you choose Unencrypted SEI, for that output, the service will exclude the access unit delimiter and will leave the SEI NAL units unencrypted.
pub playback_device_compatibility:
std::option::Option<crate::model::DashIsoPlaybackDeviceCompatibility>,
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl DashIsoEncryptionSettings {
/// This setting can improve the compatibility of your output with video players on obsolete devices. It applies only to DASH H.264 outputs with DRM encryption. Choose Unencrypted SEI (UNENCRYPTED_SEI) only to correct problems with playback on older devices. Otherwise, keep the default setting CENC v1 (CENC_V1). If you choose Unencrypted SEI, for that output, the service will exclude the access unit delimiter and will leave the SEI NAL units unencrypted.
pub fn playback_device_compatibility(
&self,
) -> std::option::Option<&crate::model::DashIsoPlaybackDeviceCompatibility> {
self.playback_device_compatibility.as_ref()
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
self.speke_key_provider.as_ref()
}
}
impl std::fmt::Debug for DashIsoEncryptionSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DashIsoEncryptionSettings");
formatter.field(
"playback_device_compatibility",
&self.playback_device_compatibility,
);
formatter.field("speke_key_provider", &self.speke_key_provider);
formatter.finish()
}
}
/// See [`DashIsoEncryptionSettings`](crate::model::DashIsoEncryptionSettings)
pub mod dash_iso_encryption_settings {
/// A builder for [`DashIsoEncryptionSettings`](crate::model::DashIsoEncryptionSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) playback_device_compatibility:
std::option::Option<crate::model::DashIsoPlaybackDeviceCompatibility>,
pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl Builder {
/// This setting can improve the compatibility of your output with video players on obsolete devices. It applies only to DASH H.264 outputs with DRM encryption. Choose Unencrypted SEI (UNENCRYPTED_SEI) only to correct problems with playback on older devices. Otherwise, keep the default setting CENC v1 (CENC_V1). If you choose Unencrypted SEI, for that output, the service will exclude the access unit delimiter and will leave the SEI NAL units unencrypted.
pub fn playback_device_compatibility(
mut self,
input: crate::model::DashIsoPlaybackDeviceCompatibility,
) -> Self {
self.playback_device_compatibility = Some(input);
self
}
/// This setting can improve the compatibility of your output with video players on obsolete devices. It applies only to DASH H.264 outputs with DRM encryption. Choose Unencrypted SEI (UNENCRYPTED_SEI) only to correct problems with playback on older devices. Otherwise, keep the default setting CENC v1 (CENC_V1). If you choose Unencrypted SEI, for that output, the service will exclude the access unit delimiter and will leave the SEI NAL units unencrypted.
pub fn set_playback_device_compatibility(
mut self,
input: std::option::Option<crate::model::DashIsoPlaybackDeviceCompatibility>,
) -> Self {
self.playback_device_compatibility = input;
self
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
self.speke_key_provider = Some(input);
self
}
/// If your output group type is HLS, DASH, or Microsoft Smooth, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is CMAF, use the SpekeKeyProviderCmaf settings instead.
pub fn set_speke_key_provider(
mut self,
input: std::option::Option<crate::model::SpekeKeyProvider>,
) -> Self {
self.speke_key_provider = input;
self
}
/// Consumes the builder and constructs a [`DashIsoEncryptionSettings`](crate::model::DashIsoEncryptionSettings)
pub fn build(self) -> crate::model::DashIsoEncryptionSettings {
crate::model::DashIsoEncryptionSettings {
playback_device_compatibility: self.playback_device_compatibility,
speke_key_provider: self.speke_key_provider,
}
}
}
}
impl DashIsoEncryptionSettings {
/// Creates a new builder-style object to manufacture [`DashIsoEncryptionSettings`](crate::model::DashIsoEncryptionSettings)
pub fn builder() -> crate::model::dash_iso_encryption_settings::Builder {
crate::model::dash_iso_encryption_settings::Builder::default()
}
}
/// This setting can improve the compatibility of your output with video players on obsolete devices. It applies only to DASH H.264 outputs with DRM encryption. Choose Unencrypted SEI (UNENCRYPTED_SEI) only to correct problems with playback on older devices. Otherwise, keep the default setting CENC v1 (CENC_V1). If you choose Unencrypted SEI, for that output, the service will exclude the access unit delimiter and will leave the SEI NAL units unencrypted.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoPlaybackDeviceCompatibility {
#[allow(missing_docs)] // documentation missing in model
CencV1,
#[allow(missing_docs)] // documentation missing in model
UnencryptedSei,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoPlaybackDeviceCompatibility {
fn from(s: &str) -> Self {
match s {
"CENC_V1" => DashIsoPlaybackDeviceCompatibility::CencV1,
"UNENCRYPTED_SEI" => DashIsoPlaybackDeviceCompatibility::UnencryptedSei,
other => DashIsoPlaybackDeviceCompatibility::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoPlaybackDeviceCompatibility {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoPlaybackDeviceCompatibility::from(s))
}
}
impl DashIsoPlaybackDeviceCompatibility {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoPlaybackDeviceCompatibility::CencV1 => "CENC_V1",
DashIsoPlaybackDeviceCompatibility::UnencryptedSei => "UNENCRYPTED_SEI",
DashIsoPlaybackDeviceCompatibility::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CENC_V1", "UNENCRYPTED_SEI"]
}
}
impl AsRef<str> for DashIsoPlaybackDeviceCompatibility {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this setting only when your audio codec is a Dolby one (AC3, EAC3, or Atmos) and your downstream workflow requires that your DASH manifest use the Dolby channel configuration tag, rather than the MPEG one. For example, you might need to use this to make dynamic ad insertion work. Specify which audio channel configuration scheme ID URI MediaConvert writes in your DASH manifest. Keep the default value, MPEG channel configuration (MPEG_CHANNEL_CONFIGURATION), to have MediaConvert write this: urn:mpeg:mpegB:cicp:ChannelConfiguration. Choose Dolby channel configuration (DOLBY_CHANNEL_CONFIGURATION) to have MediaConvert write this instead: tag:dolby.com,2014:dash:audio_channel_configuration:2011.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DashIsoGroupAudioChannelConfigSchemeIdUri {
#[allow(missing_docs)] // documentation missing in model
DolbyChannelConfiguration,
#[allow(missing_docs)] // documentation missing in model
MpegChannelConfiguration,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DashIsoGroupAudioChannelConfigSchemeIdUri {
fn from(s: &str) -> Self {
match s {
"DOLBY_CHANNEL_CONFIGURATION" => {
DashIsoGroupAudioChannelConfigSchemeIdUri::DolbyChannelConfiguration
}
"MPEG_CHANNEL_CONFIGURATION" => {
DashIsoGroupAudioChannelConfigSchemeIdUri::MpegChannelConfiguration
}
other => DashIsoGroupAudioChannelConfigSchemeIdUri::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DashIsoGroupAudioChannelConfigSchemeIdUri {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DashIsoGroupAudioChannelConfigSchemeIdUri::from(s))
}
}
impl DashIsoGroupAudioChannelConfigSchemeIdUri {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DashIsoGroupAudioChannelConfigSchemeIdUri::DolbyChannelConfiguration => {
"DOLBY_CHANNEL_CONFIGURATION"
}
DashIsoGroupAudioChannelConfigSchemeIdUri::MpegChannelConfiguration => {
"MPEG_CHANNEL_CONFIGURATION"
}
DashIsoGroupAudioChannelConfigSchemeIdUri::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DOLBY_CHANNEL_CONFIGURATION", "MPEG_CHANNEL_CONFIGURATION"]
}
}
impl AsRef<str> for DashIsoGroupAudioChannelConfigSchemeIdUri {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the details for each additional DASH manifest that you want the service to generate for this output group. Each manifest can reference a different subset of outputs in the group.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your DASH group is film-name.mpd. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.mpd.
pub manifest_name_modifier: std::option::Option<std::string::String>,
/// Specify the outputs that you want this additional top-level manifest to reference.
pub selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DashAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your DASH group is film-name.mpd. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.mpd.
pub fn manifest_name_modifier(&self) -> std::option::Option<&str> {
self.manifest_name_modifier.as_deref()
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(&self) -> std::option::Option<&[std::string::String]> {
self.selected_outputs.as_deref()
}
}
impl std::fmt::Debug for DashAdditionalManifest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DashAdditionalManifest");
formatter.field("manifest_name_modifier", &self.manifest_name_modifier);
formatter.field("selected_outputs", &self.selected_outputs);
formatter.finish()
}
}
/// See [`DashAdditionalManifest`](crate::model::DashAdditionalManifest)
pub mod dash_additional_manifest {
/// A builder for [`DashAdditionalManifest`](crate::model::DashAdditionalManifest)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) manifest_name_modifier: std::option::Option<std::string::String>,
pub(crate) selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your DASH group is film-name.mpd. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.mpd.
pub fn manifest_name_modifier(mut self, input: impl Into<std::string::String>) -> Self {
self.manifest_name_modifier = Some(input.into());
self
}
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your DASH group is film-name.mpd. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.mpd.
pub fn set_manifest_name_modifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.manifest_name_modifier = input;
self
}
/// Appends an item to `selected_outputs`.
///
/// To override the contents of this collection use [`set_selected_outputs`](Self::set_selected_outputs).
///
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.selected_outputs.unwrap_or_default();
v.push(input.into());
self.selected_outputs = Some(v);
self
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn set_selected_outputs(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.selected_outputs = input;
self
}
/// Consumes the builder and constructs a [`DashAdditionalManifest`](crate::model::DashAdditionalManifest)
pub fn build(self) -> crate::model::DashAdditionalManifest {
crate::model::DashAdditionalManifest {
manifest_name_modifier: self.manifest_name_modifier,
selected_outputs: self.selected_outputs,
}
}
}
}
impl DashAdditionalManifest {
/// Creates a new builder-style object to manufacture [`DashAdditionalManifest`](crate::model::DashAdditionalManifest)
pub fn builder() -> crate::model::dash_additional_manifest::Builder {
crate::model::dash_additional_manifest::Builder::default()
}
}
/// Settings related to your CMAF output package. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/outputs-file-ABR.html. When you work directly in your JSON job specification, include this object and any required children when you set Type, under OutputGroupSettings, to CMAF_GROUP_SETTINGS.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafGroupSettings {
/// By default, the service creates one top-level .m3u8 HLS manifest and one top -level .mpd DASH manifest for each CMAF output group in your job. These default manifests reference every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here. For each additional manifest that you specify, the service creates one HLS manifest and one DASH manifest.
pub additional_manifests:
std::option::Option<std::vec::Vec<crate::model::CmafAdditionalManifest>>,
/// A partial URI prefix that will be put in the manifest file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub base_url: std::option::Option<std::string::String>,
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub client_cache: std::option::Option<crate::model::CmafClientCache>,
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub codec_specification: std::option::Option<crate::model::CmafCodecSpecification>,
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub destination: std::option::Option<std::string::String>,
/// Settings associated with the destination. Will vary based on the type of destination
pub destination_settings: std::option::Option<crate::model::DestinationSettings>,
/// DRM settings.
pub encryption: std::option::Option<crate::model::CmafEncryptionSettings>,
/// Specify the length, in whole seconds, of the mp4 fragments. When you don't specify a value, MediaConvert defaults to 2. Related setting: Use Fragment length control (FragmentLengthControl) to specify whether the encoder enforces this value strictly.
pub fragment_length: i32,
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. When you enable Write HLS manifest (WriteHlsManifest), MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. When you enable Write DASH manifest (WriteDashManifest), MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub image_based_trick_play: std::option::Option<crate::model::CmafImageBasedTrickPlay>,
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub image_based_trick_play_settings:
std::option::Option<crate::model::CmafImageBasedTrickPlaySettings>,
/// When set to GZIP, compresses HLS playlist.
pub manifest_compression: std::option::Option<crate::model::CmafManifestCompression>,
/// Indicates whether the output manifest should use floating point values for segment duration.
pub manifest_duration_format: std::option::Option<crate::model::CmafManifestDurationFormat>,
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub min_buffer_time: i32,
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub min_final_segment_length: f64,
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub mpd_profile: std::option::Option<crate::model::CmafMpdProfile>,
/// 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.
pub pts_offset_handling_for_b_frames:
std::option::Option<crate::model::CmafPtsOffsetHandlingForBFrames>,
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub segment_control: std::option::Option<crate::model::CmafSegmentControl>,
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (CmafSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub segment_length: i32,
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub segment_length_control: std::option::Option<crate::model::CmafSegmentLengthControl>,
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub stream_inf_resolution: std::option::Option<crate::model::CmafStreamInfResolution>,
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub target_duration_compatibility_mode:
std::option::Option<crate::model::CmafTargetDurationCompatibilityMode>,
/// When set to ENABLED, a DASH MPD manifest will be generated for this output.
pub write_dash_manifest: std::option::Option<crate::model::CmafWriteDashManifest>,
/// When set to ENABLED, an Apple HLS manifest will be generated for this output.
pub write_hls_manifest: std::option::Option<crate::model::CmafWriteHlsManifest>,
/// When you enable Precise segment duration in DASH manifests (writeSegmentTimelineInRepresentation), your DASH manifest shows precise segment durations. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When this feature isn't enabled, the segment durations in your DASH manifest are approximate. The segment duration information appears in the duration attribute of the SegmentTemplate element.
pub write_segment_timeline_in_representation:
std::option::Option<crate::model::CmafWriteSegmentTimelineInRepresentation>,
}
impl CmafGroupSettings {
/// By default, the service creates one top-level .m3u8 HLS manifest and one top -level .mpd DASH manifest for each CMAF output group in your job. These default manifests reference every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here. For each additional manifest that you specify, the service creates one HLS manifest and one DASH manifest.
pub fn additional_manifests(
&self,
) -> std::option::Option<&[crate::model::CmafAdditionalManifest]> {
self.additional_manifests.as_deref()
}
/// A partial URI prefix that will be put in the manifest file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub fn base_url(&self) -> std::option::Option<&str> {
self.base_url.as_deref()
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub fn client_cache(&self) -> std::option::Option<&crate::model::CmafClientCache> {
self.client_cache.as_ref()
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub fn codec_specification(
&self,
) -> std::option::Option<&crate::model::CmafCodecSpecification> {
self.codec_specification.as_ref()
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(&self) -> std::option::Option<&crate::model::DestinationSettings> {
self.destination_settings.as_ref()
}
/// DRM settings.
pub fn encryption(&self) -> std::option::Option<&crate::model::CmafEncryptionSettings> {
self.encryption.as_ref()
}
/// Specify the length, in whole seconds, of the mp4 fragments. When you don't specify a value, MediaConvert defaults to 2. Related setting: Use Fragment length control (FragmentLengthControl) to specify whether the encoder enforces this value strictly.
pub fn fragment_length(&self) -> i32 {
self.fragment_length
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. When you enable Write HLS manifest (WriteHlsManifest), MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. When you enable Write DASH manifest (WriteDashManifest), MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn image_based_trick_play(
&self,
) -> std::option::Option<&crate::model::CmafImageBasedTrickPlay> {
self.image_based_trick_play.as_ref()
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn image_based_trick_play_settings(
&self,
) -> std::option::Option<&crate::model::CmafImageBasedTrickPlaySettings> {
self.image_based_trick_play_settings.as_ref()
}
/// When set to GZIP, compresses HLS playlist.
pub fn manifest_compression(
&self,
) -> std::option::Option<&crate::model::CmafManifestCompression> {
self.manifest_compression.as_ref()
}
/// Indicates whether the output manifest should use floating point values for segment duration.
pub fn manifest_duration_format(
&self,
) -> std::option::Option<&crate::model::CmafManifestDurationFormat> {
self.manifest_duration_format.as_ref()
}
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub fn min_buffer_time(&self) -> i32 {
self.min_buffer_time
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn min_final_segment_length(&self) -> f64 {
self.min_final_segment_length
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub fn mpd_profile(&self) -> std::option::Option<&crate::model::CmafMpdProfile> {
self.mpd_profile.as_ref()
}
/// 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.
pub fn pts_offset_handling_for_b_frames(
&self,
) -> std::option::Option<&crate::model::CmafPtsOffsetHandlingForBFrames> {
self.pts_offset_handling_for_b_frames.as_ref()
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub fn segment_control(&self) -> std::option::Option<&crate::model::CmafSegmentControl> {
self.segment_control.as_ref()
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (CmafSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn segment_length(&self) -> i32 {
self.segment_length
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn segment_length_control(
&self,
) -> std::option::Option<&crate::model::CmafSegmentLengthControl> {
self.segment_length_control.as_ref()
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub fn stream_inf_resolution(
&self,
) -> std::option::Option<&crate::model::CmafStreamInfResolution> {
self.stream_inf_resolution.as_ref()
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub fn target_duration_compatibility_mode(
&self,
) -> std::option::Option<&crate::model::CmafTargetDurationCompatibilityMode> {
self.target_duration_compatibility_mode.as_ref()
}
/// When set to ENABLED, a DASH MPD manifest will be generated for this output.
pub fn write_dash_manifest(&self) -> std::option::Option<&crate::model::CmafWriteDashManifest> {
self.write_dash_manifest.as_ref()
}
/// When set to ENABLED, an Apple HLS manifest will be generated for this output.
pub fn write_hls_manifest(&self) -> std::option::Option<&crate::model::CmafWriteHlsManifest> {
self.write_hls_manifest.as_ref()
}
/// When you enable Precise segment duration in DASH manifests (writeSegmentTimelineInRepresentation), your DASH manifest shows precise segment durations. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When this feature isn't enabled, the segment durations in your DASH manifest are approximate. The segment duration information appears in the duration attribute of the SegmentTemplate element.
pub fn write_segment_timeline_in_representation(
&self,
) -> std::option::Option<&crate::model::CmafWriteSegmentTimelineInRepresentation> {
self.write_segment_timeline_in_representation.as_ref()
}
}
impl std::fmt::Debug for CmafGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CmafGroupSettings");
formatter.field("additional_manifests", &self.additional_manifests);
formatter.field("base_url", &self.base_url);
formatter.field("client_cache", &self.client_cache);
formatter.field("codec_specification", &self.codec_specification);
formatter.field("destination", &self.destination);
formatter.field("destination_settings", &self.destination_settings);
formatter.field("encryption", &self.encryption);
formatter.field("fragment_length", &self.fragment_length);
formatter.field("image_based_trick_play", &self.image_based_trick_play);
formatter.field(
"image_based_trick_play_settings",
&self.image_based_trick_play_settings,
);
formatter.field("manifest_compression", &self.manifest_compression);
formatter.field("manifest_duration_format", &self.manifest_duration_format);
formatter.field("min_buffer_time", &self.min_buffer_time);
formatter.field("min_final_segment_length", &self.min_final_segment_length);
formatter.field("mpd_profile", &self.mpd_profile);
formatter.field(
"pts_offset_handling_for_b_frames",
&self.pts_offset_handling_for_b_frames,
);
formatter.field("segment_control", &self.segment_control);
formatter.field("segment_length", &self.segment_length);
formatter.field("segment_length_control", &self.segment_length_control);
formatter.field("stream_inf_resolution", &self.stream_inf_resolution);
formatter.field(
"target_duration_compatibility_mode",
&self.target_duration_compatibility_mode,
);
formatter.field("write_dash_manifest", &self.write_dash_manifest);
formatter.field("write_hls_manifest", &self.write_hls_manifest);
formatter.field(
"write_segment_timeline_in_representation",
&self.write_segment_timeline_in_representation,
);
formatter.finish()
}
}
/// See [`CmafGroupSettings`](crate::model::CmafGroupSettings)
pub mod cmaf_group_settings {
/// A builder for [`CmafGroupSettings`](crate::model::CmafGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) additional_manifests:
std::option::Option<std::vec::Vec<crate::model::CmafAdditionalManifest>>,
pub(crate) base_url: std::option::Option<std::string::String>,
pub(crate) client_cache: std::option::Option<crate::model::CmafClientCache>,
pub(crate) codec_specification: std::option::Option<crate::model::CmafCodecSpecification>,
pub(crate) destination: std::option::Option<std::string::String>,
pub(crate) destination_settings: std::option::Option<crate::model::DestinationSettings>,
pub(crate) encryption: std::option::Option<crate::model::CmafEncryptionSettings>,
pub(crate) fragment_length: std::option::Option<i32>,
pub(crate) image_based_trick_play:
std::option::Option<crate::model::CmafImageBasedTrickPlay>,
pub(crate) image_based_trick_play_settings:
std::option::Option<crate::model::CmafImageBasedTrickPlaySettings>,
pub(crate) manifest_compression: std::option::Option<crate::model::CmafManifestCompression>,
pub(crate) manifest_duration_format:
std::option::Option<crate::model::CmafManifestDurationFormat>,
pub(crate) min_buffer_time: std::option::Option<i32>,
pub(crate) min_final_segment_length: std::option::Option<f64>,
pub(crate) mpd_profile: std::option::Option<crate::model::CmafMpdProfile>,
pub(crate) pts_offset_handling_for_b_frames:
std::option::Option<crate::model::CmafPtsOffsetHandlingForBFrames>,
pub(crate) segment_control: std::option::Option<crate::model::CmafSegmentControl>,
pub(crate) segment_length: std::option::Option<i32>,
pub(crate) segment_length_control:
std::option::Option<crate::model::CmafSegmentLengthControl>,
pub(crate) stream_inf_resolution:
std::option::Option<crate::model::CmafStreamInfResolution>,
pub(crate) target_duration_compatibility_mode:
std::option::Option<crate::model::CmafTargetDurationCompatibilityMode>,
pub(crate) write_dash_manifest: std::option::Option<crate::model::CmafWriteDashManifest>,
pub(crate) write_hls_manifest: std::option::Option<crate::model::CmafWriteHlsManifest>,
pub(crate) write_segment_timeline_in_representation:
std::option::Option<crate::model::CmafWriteSegmentTimelineInRepresentation>,
}
impl Builder {
/// Appends an item to `additional_manifests`.
///
/// To override the contents of this collection use [`set_additional_manifests`](Self::set_additional_manifests).
///
/// By default, the service creates one top-level .m3u8 HLS manifest and one top -level .mpd DASH manifest for each CMAF output group in your job. These default manifests reference every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here. For each additional manifest that you specify, the service creates one HLS manifest and one DASH manifest.
pub fn additional_manifests(mut self, input: crate::model::CmafAdditionalManifest) -> Self {
let mut v = self.additional_manifests.unwrap_or_default();
v.push(input);
self.additional_manifests = Some(v);
self
}
/// By default, the service creates one top-level .m3u8 HLS manifest and one top -level .mpd DASH manifest for each CMAF output group in your job. These default manifests reference every output in the output group. To create additional top-level manifests that reference a subset of the outputs in the output group, specify a list of them here. For each additional manifest that you specify, the service creates one HLS manifest and one DASH manifest.
pub fn set_additional_manifests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CmafAdditionalManifest>>,
) -> Self {
self.additional_manifests = input;
self
}
/// A partial URI prefix that will be put in the manifest file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub fn base_url(mut self, input: impl Into<std::string::String>) -> Self {
self.base_url = Some(input.into());
self
}
/// A partial URI prefix that will be put in the manifest file at the top level BaseURL element. Can be used if streams are delivered from a different URL than the manifest file.
pub fn set_base_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.base_url = input;
self
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub fn client_cache(mut self, input: crate::model::CmafClientCache) -> Self {
self.client_cache = Some(input);
self
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
pub fn set_client_cache(
mut self,
input: std::option::Option<crate::model::CmafClientCache>,
) -> Self {
self.client_cache = input;
self
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub fn codec_specification(mut self, input: crate::model::CmafCodecSpecification) -> Self {
self.codec_specification = Some(input);
self
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
pub fn set_codec_specification(
mut self,
input: std::option::Option<crate::model::CmafCodecSpecification>,
) -> Self {
self.codec_specification = input;
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
/// Use Destination (Destination) to specify the S3 output location and the output filename base. Destination accepts format identifiers. If you do not specify the base filename in the URI, the service will use the filename of the input file. If your job has multiple inputs, the service uses the filename of the first input file.
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn destination_settings(mut self, input: crate::model::DestinationSettings) -> Self {
self.destination_settings = Some(input);
self
}
/// Settings associated with the destination. Will vary based on the type of destination
pub fn set_destination_settings(
mut self,
input: std::option::Option<crate::model::DestinationSettings>,
) -> Self {
self.destination_settings = input;
self
}
/// DRM settings.
pub fn encryption(mut self, input: crate::model::CmafEncryptionSettings) -> Self {
self.encryption = Some(input);
self
}
/// DRM settings.
pub fn set_encryption(
mut self,
input: std::option::Option<crate::model::CmafEncryptionSettings>,
) -> Self {
self.encryption = input;
self
}
/// Specify the length, in whole seconds, of the mp4 fragments. When you don't specify a value, MediaConvert defaults to 2. Related setting: Use Fragment length control (FragmentLengthControl) to specify whether the encoder enforces this value strictly.
pub fn fragment_length(mut self, input: i32) -> Self {
self.fragment_length = Some(input);
self
}
/// Specify the length, in whole seconds, of the mp4 fragments. When you don't specify a value, MediaConvert defaults to 2. Related setting: Use Fragment length control (FragmentLengthControl) to specify whether the encoder enforces this value strictly.
pub fn set_fragment_length(mut self, input: std::option::Option<i32>) -> Self {
self.fragment_length = input;
self
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. When you enable Write HLS manifest (WriteHlsManifest), MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. When you enable Write DASH manifest (WriteDashManifest), MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn image_based_trick_play(
mut self,
input: crate::model::CmafImageBasedTrickPlay,
) -> Self {
self.image_based_trick_play = Some(input);
self
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. When you enable Write HLS manifest (WriteHlsManifest), MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. When you enable Write DASH manifest (WriteDashManifest), MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
pub fn set_image_based_trick_play(
mut self,
input: std::option::Option<crate::model::CmafImageBasedTrickPlay>,
) -> Self {
self.image_based_trick_play = input;
self
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn image_based_trick_play_settings(
mut self,
input: crate::model::CmafImageBasedTrickPlaySettings,
) -> Self {
self.image_based_trick_play_settings = Some(input);
self
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
pub fn set_image_based_trick_play_settings(
mut self,
input: std::option::Option<crate::model::CmafImageBasedTrickPlaySettings>,
) -> Self {
self.image_based_trick_play_settings = input;
self
}
/// When set to GZIP, compresses HLS playlist.
pub fn manifest_compression(
mut self,
input: crate::model::CmafManifestCompression,
) -> Self {
self.manifest_compression = Some(input);
self
}
/// When set to GZIP, compresses HLS playlist.
pub fn set_manifest_compression(
mut self,
input: std::option::Option<crate::model::CmafManifestCompression>,
) -> Self {
self.manifest_compression = input;
self
}
/// Indicates whether the output manifest should use floating point values for segment duration.
pub fn manifest_duration_format(
mut self,
input: crate::model::CmafManifestDurationFormat,
) -> Self {
self.manifest_duration_format = Some(input);
self
}
/// Indicates whether the output manifest should use floating point values for segment duration.
pub fn set_manifest_duration_format(
mut self,
input: std::option::Option<crate::model::CmafManifestDurationFormat>,
) -> Self {
self.manifest_duration_format = input;
self
}
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub fn min_buffer_time(mut self, input: i32) -> Self {
self.min_buffer_time = Some(input);
self
}
/// Minimum time of initially buffered media that is needed to ensure smooth playout.
pub fn set_min_buffer_time(mut self, input: std::option::Option<i32>) -> Self {
self.min_buffer_time = input;
self
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn min_final_segment_length(mut self, input: f64) -> Self {
self.min_final_segment_length = Some(input);
self
}
/// Keep this setting at the default value of 0, unless you are troubleshooting a problem with how devices play back the end of your video asset. If you know that player devices are hanging on the final segment of your video because the length of your final segment is too short, use this setting to specify a minimum final segment length, in seconds. Choose a value that is greater than or equal to 1 and less than your segment length. When you specify a value for this setting, the encoder will combine any final segment that is shorter than the length that you specify with the previous segment. For example, your segment length is 3 seconds and your final segment is .5 seconds without a minimum final segment length; when you set the minimum final segment length to 1, your final segment is 3.5 seconds.
pub fn set_min_final_segment_length(mut self, input: std::option::Option<f64>) -> Self {
self.min_final_segment_length = input;
self
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub fn mpd_profile(mut self, input: crate::model::CmafMpdProfile) -> Self {
self.mpd_profile = Some(input);
self
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
pub fn set_mpd_profile(
mut self,
input: std::option::Option<crate::model::CmafMpdProfile>,
) -> Self {
self.mpd_profile = input;
self
}
/// 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.
pub fn pts_offset_handling_for_b_frames(
mut self,
input: crate::model::CmafPtsOffsetHandlingForBFrames,
) -> Self {
self.pts_offset_handling_for_b_frames = Some(input);
self
}
/// 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.
pub fn set_pts_offset_handling_for_b_frames(
mut self,
input: std::option::Option<crate::model::CmafPtsOffsetHandlingForBFrames>,
) -> Self {
self.pts_offset_handling_for_b_frames = input;
self
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub fn segment_control(mut self, input: crate::model::CmafSegmentControl) -> Self {
self.segment_control = Some(input);
self
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
pub fn set_segment_control(
mut self,
input: std::option::Option<crate::model::CmafSegmentControl>,
) -> Self {
self.segment_control = input;
self
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (CmafSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn segment_length(mut self, input: i32) -> Self {
self.segment_length = Some(input);
self
}
/// Specify the length, in whole seconds, of each segment. When you don't specify a value, MediaConvert defaults to 10. Related settings: Use Segment length control (SegmentLengthControl) to specify whether the encoder enforces this value strictly. Use Segment control (CmafSegmentControl) to specify whether MediaConvert creates separate segment files or one content file that has metadata to mark the segment boundaries.
pub fn set_segment_length(mut self, input: std::option::Option<i32>) -> Self {
self.segment_length = input;
self
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn segment_length_control(
mut self,
input: crate::model::CmafSegmentLengthControl,
) -> Self {
self.segment_length_control = Some(input);
self
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
pub fn set_segment_length_control(
mut self,
input: std::option::Option<crate::model::CmafSegmentLengthControl>,
) -> Self {
self.segment_length_control = input;
self
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub fn stream_inf_resolution(
mut self,
input: crate::model::CmafStreamInfResolution,
) -> Self {
self.stream_inf_resolution = Some(input);
self
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
pub fn set_stream_inf_resolution(
mut self,
input: std::option::Option<crate::model::CmafStreamInfResolution>,
) -> Self {
self.stream_inf_resolution = input;
self
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub fn target_duration_compatibility_mode(
mut self,
input: crate::model::CmafTargetDurationCompatibilityMode,
) -> Self {
self.target_duration_compatibility_mode = Some(input);
self
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
pub fn set_target_duration_compatibility_mode(
mut self,
input: std::option::Option<crate::model::CmafTargetDurationCompatibilityMode>,
) -> Self {
self.target_duration_compatibility_mode = input;
self
}
/// When set to ENABLED, a DASH MPD manifest will be generated for this output.
pub fn write_dash_manifest(mut self, input: crate::model::CmafWriteDashManifest) -> Self {
self.write_dash_manifest = Some(input);
self
}
/// When set to ENABLED, a DASH MPD manifest will be generated for this output.
pub fn set_write_dash_manifest(
mut self,
input: std::option::Option<crate::model::CmafWriteDashManifest>,
) -> Self {
self.write_dash_manifest = input;
self
}
/// When set to ENABLED, an Apple HLS manifest will be generated for this output.
pub fn write_hls_manifest(mut self, input: crate::model::CmafWriteHlsManifest) -> Self {
self.write_hls_manifest = Some(input);
self
}
/// When set to ENABLED, an Apple HLS manifest will be generated for this output.
pub fn set_write_hls_manifest(
mut self,
input: std::option::Option<crate::model::CmafWriteHlsManifest>,
) -> Self {
self.write_hls_manifest = input;
self
}
/// When you enable Precise segment duration in DASH manifests (writeSegmentTimelineInRepresentation), your DASH manifest shows precise segment durations. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When this feature isn't enabled, the segment durations in your DASH manifest are approximate. The segment duration information appears in the duration attribute of the SegmentTemplate element.
pub fn write_segment_timeline_in_representation(
mut self,
input: crate::model::CmafWriteSegmentTimelineInRepresentation,
) -> Self {
self.write_segment_timeline_in_representation = Some(input);
self
}
/// When you enable Precise segment duration in DASH manifests (writeSegmentTimelineInRepresentation), your DASH manifest shows precise segment durations. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When this feature isn't enabled, the segment durations in your DASH manifest are approximate. The segment duration information appears in the duration attribute of the SegmentTemplate element.
pub fn set_write_segment_timeline_in_representation(
mut self,
input: std::option::Option<crate::model::CmafWriteSegmentTimelineInRepresentation>,
) -> Self {
self.write_segment_timeline_in_representation = input;
self
}
/// Consumes the builder and constructs a [`CmafGroupSettings`](crate::model::CmafGroupSettings)
pub fn build(self) -> crate::model::CmafGroupSettings {
crate::model::CmafGroupSettings {
additional_manifests: self.additional_manifests,
base_url: self.base_url,
client_cache: self.client_cache,
codec_specification: self.codec_specification,
destination: self.destination,
destination_settings: self.destination_settings,
encryption: self.encryption,
fragment_length: self.fragment_length.unwrap_or_default(),
image_based_trick_play: self.image_based_trick_play,
image_based_trick_play_settings: self.image_based_trick_play_settings,
manifest_compression: self.manifest_compression,
manifest_duration_format: self.manifest_duration_format,
min_buffer_time: self.min_buffer_time.unwrap_or_default(),
min_final_segment_length: self.min_final_segment_length.unwrap_or_default(),
mpd_profile: self.mpd_profile,
pts_offset_handling_for_b_frames: self.pts_offset_handling_for_b_frames,
segment_control: self.segment_control,
segment_length: self.segment_length.unwrap_or_default(),
segment_length_control: self.segment_length_control,
stream_inf_resolution: self.stream_inf_resolution,
target_duration_compatibility_mode: self.target_duration_compatibility_mode,
write_dash_manifest: self.write_dash_manifest,
write_hls_manifest: self.write_hls_manifest,
write_segment_timeline_in_representation: self
.write_segment_timeline_in_representation,
}
}
}
}
impl CmafGroupSettings {
/// Creates a new builder-style object to manufacture [`CmafGroupSettings`](crate::model::CmafGroupSettings)
pub fn builder() -> crate::model::cmaf_group_settings::Builder {
crate::model::cmaf_group_settings::Builder::default()
}
}
/// When you enable Precise segment duration in DASH manifests (writeSegmentTimelineInRepresentation), your DASH manifest shows precise segment durations. The segment duration information appears inside the SegmentTimeline element, inside SegmentTemplate at the Representation level. When this feature isn't enabled, the segment durations in your DASH manifest are approximate. The segment duration information appears in the duration attribute of the SegmentTemplate element.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafWriteSegmentTimelineInRepresentation {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafWriteSegmentTimelineInRepresentation {
fn from(s: &str) -> Self {
match s {
"DISABLED" => CmafWriteSegmentTimelineInRepresentation::Disabled,
"ENABLED" => CmafWriteSegmentTimelineInRepresentation::Enabled,
other => CmafWriteSegmentTimelineInRepresentation::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafWriteSegmentTimelineInRepresentation {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafWriteSegmentTimelineInRepresentation::from(s))
}
}
impl CmafWriteSegmentTimelineInRepresentation {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafWriteSegmentTimelineInRepresentation::Disabled => "DISABLED",
CmafWriteSegmentTimelineInRepresentation::Enabled => "ENABLED",
CmafWriteSegmentTimelineInRepresentation::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for CmafWriteSegmentTimelineInRepresentation {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to ENABLED, an Apple HLS manifest will be generated for this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafWriteHlsManifest {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafWriteHlsManifest {
fn from(s: &str) -> Self {
match s {
"DISABLED" => CmafWriteHlsManifest::Disabled,
"ENABLED" => CmafWriteHlsManifest::Enabled,
other => CmafWriteHlsManifest::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafWriteHlsManifest {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafWriteHlsManifest::from(s))
}
}
impl CmafWriteHlsManifest {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafWriteHlsManifest::Disabled => "DISABLED",
CmafWriteHlsManifest::Enabled => "ENABLED",
CmafWriteHlsManifest::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for CmafWriteHlsManifest {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to ENABLED, a DASH MPD manifest will be generated for this output.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafWriteDashManifest {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafWriteDashManifest {
fn from(s: &str) -> Self {
match s {
"DISABLED" => CmafWriteDashManifest::Disabled,
"ENABLED" => CmafWriteDashManifest::Enabled,
other => CmafWriteDashManifest::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafWriteDashManifest {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafWriteDashManifest::from(s))
}
}
impl CmafWriteDashManifest {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafWriteDashManifest::Disabled => "DISABLED",
CmafWriteDashManifest::Enabled => "ENABLED",
CmafWriteDashManifest::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for CmafWriteDashManifest {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to LEGACY, the segment target duration is always rounded up to the nearest integer value above its current value in seconds. When set to SPEC\\_COMPLIANT, the segment target duration is rounded up to the nearest integer value if fraction seconds are greater than or equal to 0.5 (>= 0.5) and rounded down if less than 0.5 (< 0.5). You may need to use LEGACY if your client needs to ensure that the target duration is always longer than the actual duration of the segment. Some older players may experience interrupted playback when the actual duration of a track in a segment is longer than the target duration.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafTargetDurationCompatibilityMode {
#[allow(missing_docs)] // documentation missing in model
Legacy,
#[allow(missing_docs)] // documentation missing in model
SpecCompliant,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafTargetDurationCompatibilityMode {
fn from(s: &str) -> Self {
match s {
"LEGACY" => CmafTargetDurationCompatibilityMode::Legacy,
"SPEC_COMPLIANT" => CmafTargetDurationCompatibilityMode::SpecCompliant,
other => CmafTargetDurationCompatibilityMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafTargetDurationCompatibilityMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafTargetDurationCompatibilityMode::from(s))
}
}
impl CmafTargetDurationCompatibilityMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafTargetDurationCompatibilityMode::Legacy => "LEGACY",
CmafTargetDurationCompatibilityMode::SpecCompliant => "SPEC_COMPLIANT",
CmafTargetDurationCompatibilityMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["LEGACY", "SPEC_COMPLIANT"]
}
}
impl AsRef<str> for CmafTargetDurationCompatibilityMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag of variant manifest.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafStreamInfResolution {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafStreamInfResolution {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => CmafStreamInfResolution::Exclude,
"INCLUDE" => CmafStreamInfResolution::Include,
other => CmafStreamInfResolution::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafStreamInfResolution {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafStreamInfResolution::from(s))
}
}
impl CmafStreamInfResolution {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafStreamInfResolution::Exclude => "EXCLUDE",
CmafStreamInfResolution::Include => "INCLUDE",
CmafStreamInfResolution::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for CmafStreamInfResolution {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify how you want MediaConvert to determine the segment length. Choose Exact (EXACT) to have the encoder use the exact length that you specify with the setting Segment length (SegmentLength). This might result in extra I-frames. Choose Multiple of GOP (GOP_MULTIPLE) to have the encoder round up the segment lengths to match the next GOP boundary.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafSegmentLengthControl {
#[allow(missing_docs)] // documentation missing in model
Exact,
#[allow(missing_docs)] // documentation missing in model
GopMultiple,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafSegmentLengthControl {
fn from(s: &str) -> Self {
match s {
"EXACT" => CmafSegmentLengthControl::Exact,
"GOP_MULTIPLE" => CmafSegmentLengthControl::GopMultiple,
other => CmafSegmentLengthControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafSegmentLengthControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafSegmentLengthControl::from(s))
}
}
impl CmafSegmentLengthControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafSegmentLengthControl::Exact => "EXACT",
CmafSegmentLengthControl::GopMultiple => "GOP_MULTIPLE",
CmafSegmentLengthControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXACT", "GOP_MULTIPLE"]
}
}
impl AsRef<str> for CmafSegmentLengthControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to SINGLE_FILE, a single output file is generated, which is internally segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, separate segment files will be created.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafSegmentControl {
#[allow(missing_docs)] // documentation missing in model
SegmentedFiles,
#[allow(missing_docs)] // documentation missing in model
SingleFile,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafSegmentControl {
fn from(s: &str) -> Self {
match s {
"SEGMENTED_FILES" => CmafSegmentControl::SegmentedFiles,
"SINGLE_FILE" => CmafSegmentControl::SingleFile,
other => CmafSegmentControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafSegmentControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafSegmentControl::from(s))
}
}
impl CmafSegmentControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafSegmentControl::SegmentedFiles => "SEGMENTED_FILES",
CmafSegmentControl::SingleFile => "SINGLE_FILE",
CmafSegmentControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SEGMENTED_FILES", "SINGLE_FILE"]
}
}
impl AsRef<str> for CmafSegmentControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafPtsOffsetHandlingForBFrames {
#[allow(missing_docs)] // documentation missing in model
MatchInitialPts,
#[allow(missing_docs)] // documentation missing in model
ZeroBased,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafPtsOffsetHandlingForBFrames {
fn from(s: &str) -> Self {
match s {
"MATCH_INITIAL_PTS" => CmafPtsOffsetHandlingForBFrames::MatchInitialPts,
"ZERO_BASED" => CmafPtsOffsetHandlingForBFrames::ZeroBased,
other => CmafPtsOffsetHandlingForBFrames::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafPtsOffsetHandlingForBFrames {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafPtsOffsetHandlingForBFrames::from(s))
}
}
impl CmafPtsOffsetHandlingForBFrames {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafPtsOffsetHandlingForBFrames::MatchInitialPts => "MATCH_INITIAL_PTS",
CmafPtsOffsetHandlingForBFrames::ZeroBased => "ZERO_BASED",
CmafPtsOffsetHandlingForBFrames::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MATCH_INITIAL_PTS", "ZERO_BASED"]
}
}
impl AsRef<str> for CmafPtsOffsetHandlingForBFrames {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether your DASH profile is on-demand or main. When you choose Main profile (MAIN_PROFILE), the service signals urn:mpeg:dash:profile:isoff-main:2011 in your .mpd DASH manifest. When you choose On-demand (ON_DEMAND_PROFILE), the service signals urn:mpeg:dash:profile:isoff-on-demand:2011 in your .mpd. When you choose On-demand, you must also set the output group setting Segment control (SegmentControl) to Single file (SINGLE_FILE).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafMpdProfile {
#[allow(missing_docs)] // documentation missing in model
MainProfile,
#[allow(missing_docs)] // documentation missing in model
OnDemandProfile,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafMpdProfile {
fn from(s: &str) -> Self {
match s {
"MAIN_PROFILE" => CmafMpdProfile::MainProfile,
"ON_DEMAND_PROFILE" => CmafMpdProfile::OnDemandProfile,
other => CmafMpdProfile::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafMpdProfile {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafMpdProfile::from(s))
}
}
impl CmafMpdProfile {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafMpdProfile::MainProfile => "MAIN_PROFILE",
CmafMpdProfile::OnDemandProfile => "ON_DEMAND_PROFILE",
CmafMpdProfile::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MAIN_PROFILE", "ON_DEMAND_PROFILE"]
}
}
impl AsRef<str> for CmafMpdProfile {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Indicates whether the output manifest should use floating point values for segment duration.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafManifestDurationFormat {
#[allow(missing_docs)] // documentation missing in model
FloatingPoint,
#[allow(missing_docs)] // documentation missing in model
Integer,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafManifestDurationFormat {
fn from(s: &str) -> Self {
match s {
"FLOATING_POINT" => CmafManifestDurationFormat::FloatingPoint,
"INTEGER" => CmafManifestDurationFormat::Integer,
other => CmafManifestDurationFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafManifestDurationFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafManifestDurationFormat::from(s))
}
}
impl CmafManifestDurationFormat {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafManifestDurationFormat::FloatingPoint => "FLOATING_POINT",
CmafManifestDurationFormat::Integer => "INTEGER",
CmafManifestDurationFormat::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FLOATING_POINT", "INTEGER"]
}
}
impl AsRef<str> for CmafManifestDurationFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When set to GZIP, compresses HLS playlist.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafManifestCompression {
#[allow(missing_docs)] // documentation missing in model
Gzip,
#[allow(missing_docs)] // documentation missing in model
None,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafManifestCompression {
fn from(s: &str) -> Self {
match s {
"GZIP" => CmafManifestCompression::Gzip,
"NONE" => CmafManifestCompression::None,
other => CmafManifestCompression::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafManifestCompression {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafManifestCompression::from(s))
}
}
impl CmafManifestCompression {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafManifestCompression::Gzip => "GZIP",
CmafManifestCompression::None => "NONE",
CmafManifestCompression::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["GZIP", "NONE"]
}
}
impl AsRef<str> for CmafManifestCompression {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Tile and thumbnail settings applicable when imageBasedTrickPlay is ADVANCED
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafImageBasedTrickPlaySettings {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub interval_cadence: std::option::Option<crate::model::CmafIntervalCadence>,
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub thumbnail_height: i32,
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub thumbnail_interval: f64,
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub thumbnail_width: i32,
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub tile_height: i32,
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub tile_width: i32,
}
impl CmafImageBasedTrickPlaySettings {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn interval_cadence(&self) -> std::option::Option<&crate::model::CmafIntervalCadence> {
self.interval_cadence.as_ref()
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn thumbnail_height(&self) -> i32 {
self.thumbnail_height
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn thumbnail_interval(&self) -> f64 {
self.thumbnail_interval
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn thumbnail_width(&self) -> i32 {
self.thumbnail_width
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn tile_height(&self) -> i32 {
self.tile_height
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn tile_width(&self) -> i32 {
self.tile_width
}
}
impl std::fmt::Debug for CmafImageBasedTrickPlaySettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CmafImageBasedTrickPlaySettings");
formatter.field("interval_cadence", &self.interval_cadence);
formatter.field("thumbnail_height", &self.thumbnail_height);
formatter.field("thumbnail_interval", &self.thumbnail_interval);
formatter.field("thumbnail_width", &self.thumbnail_width);
formatter.field("tile_height", &self.tile_height);
formatter.field("tile_width", &self.tile_width);
formatter.finish()
}
}
/// See [`CmafImageBasedTrickPlaySettings`](crate::model::CmafImageBasedTrickPlaySettings)
pub mod cmaf_image_based_trick_play_settings {
/// A builder for [`CmafImageBasedTrickPlaySettings`](crate::model::CmafImageBasedTrickPlaySettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) interval_cadence: std::option::Option<crate::model::CmafIntervalCadence>,
pub(crate) thumbnail_height: std::option::Option<i32>,
pub(crate) thumbnail_interval: std::option::Option<f64>,
pub(crate) thumbnail_width: std::option::Option<i32>,
pub(crate) tile_height: std::option::Option<i32>,
pub(crate) tile_width: std::option::Option<i32>,
}
impl Builder {
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn interval_cadence(mut self, input: crate::model::CmafIntervalCadence) -> Self {
self.interval_cadence = Some(input);
self
}
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
pub fn set_interval_cadence(
mut self,
input: std::option::Option<crate::model::CmafIntervalCadence>,
) -> Self {
self.interval_cadence = input;
self
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn thumbnail_height(mut self, input: i32) -> Self {
self.thumbnail_height = Some(input);
self
}
/// Height of each thumbnail within each tile image, in pixels. Leave blank to maintain aspect ratio with thumbnail width. If following the aspect ratio would lead to a total tile height greater than 4096, then the job will be rejected. Must be divisible by 2.
pub fn set_thumbnail_height(mut self, input: std::option::Option<i32>) -> Self {
self.thumbnail_height = input;
self
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn thumbnail_interval(mut self, input: f64) -> Self {
self.thumbnail_interval = Some(input);
self
}
/// Enter the interval, in seconds, that MediaConvert uses to generate thumbnails. If the interval you enter doesn't align with the output frame rate, MediaConvert automatically rounds the interval to align with the output frame rate. For example, if the output frame rate is 29.97 frames per second and you enter 5, MediaConvert uses a 150 frame interval to generate thumbnails.
pub fn set_thumbnail_interval(mut self, input: std::option::Option<f64>) -> Self {
self.thumbnail_interval = input;
self
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn thumbnail_width(mut self, input: i32) -> Self {
self.thumbnail_width = Some(input);
self
}
/// Width of each thumbnail within each tile image, in pixels. Default is 312. Must be divisible by 8.
pub fn set_thumbnail_width(mut self, input: std::option::Option<i32>) -> Self {
self.thumbnail_width = input;
self
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn tile_height(mut self, input: i32) -> Self {
self.tile_height = Some(input);
self
}
/// Number of thumbnails in each column of a tile image. Set a value between 2 and 2048. Must be divisible by 2.
pub fn set_tile_height(mut self, input: std::option::Option<i32>) -> Self {
self.tile_height = input;
self
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn tile_width(mut self, input: i32) -> Self {
self.tile_width = Some(input);
self
}
/// Number of thumbnails in each row of a tile image. Set a value between 1 and 512.
pub fn set_tile_width(mut self, input: std::option::Option<i32>) -> Self {
self.tile_width = input;
self
}
/// Consumes the builder and constructs a [`CmafImageBasedTrickPlaySettings`](crate::model::CmafImageBasedTrickPlaySettings)
pub fn build(self) -> crate::model::CmafImageBasedTrickPlaySettings {
crate::model::CmafImageBasedTrickPlaySettings {
interval_cadence: self.interval_cadence,
thumbnail_height: self.thumbnail_height.unwrap_or_default(),
thumbnail_interval: self.thumbnail_interval.unwrap_or_default(),
thumbnail_width: self.thumbnail_width.unwrap_or_default(),
tile_height: self.tile_height.unwrap_or_default(),
tile_width: self.tile_width.unwrap_or_default(),
}
}
}
}
impl CmafImageBasedTrickPlaySettings {
/// Creates a new builder-style object to manufacture [`CmafImageBasedTrickPlaySettings`](crate::model::CmafImageBasedTrickPlaySettings)
pub fn builder() -> crate::model::cmaf_image_based_trick_play_settings::Builder {
crate::model::cmaf_image_based_trick_play_settings::Builder::default()
}
}
/// The cadence MediaConvert follows for generating thumbnails. If set to FOLLOW_IFRAME, MediaConvert generates thumbnails for each IDR frame in the output (matching the GOP cadence). If set to FOLLOW_CUSTOM, MediaConvert generates thumbnails according to the interval you specify in thumbnailInterval.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafIntervalCadence {
#[allow(missing_docs)] // documentation missing in model
FollowCustom,
#[allow(missing_docs)] // documentation missing in model
FollowIframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafIntervalCadence {
fn from(s: &str) -> Self {
match s {
"FOLLOW_CUSTOM" => CmafIntervalCadence::FollowCustom,
"FOLLOW_IFRAME" => CmafIntervalCadence::FollowIframe,
other => CmafIntervalCadence::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafIntervalCadence {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafIntervalCadence::from(s))
}
}
impl CmafIntervalCadence {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafIntervalCadence::FollowCustom => "FOLLOW_CUSTOM",
CmafIntervalCadence::FollowIframe => "FOLLOW_IFRAME",
CmafIntervalCadence::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW_CUSTOM", "FOLLOW_IFRAME"]
}
}
impl AsRef<str> for CmafIntervalCadence {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether MediaConvert generates images for trick play. Keep the default value, None (NONE), to not generate any images. Choose Thumbnail (THUMBNAIL) to generate tiled thumbnails. Choose Thumbnail and full frame (THUMBNAIL_AND_FULLFRAME) to generate tiled thumbnails and full-resolution images of single frames. When you enable Write HLS manifest (WriteHlsManifest), MediaConvert creates a child manifest for each set of images that you generate and adds corresponding entries to the parent manifest. When you enable Write DASH manifest (WriteDashManifest), MediaConvert adds an entry in the .mpd manifest for each set of images that you generate. A common application for these images is Roku trick mode. The thumbnails and full-frame images that MediaConvert creates with this feature are compatible with this Roku specification: https://developer.roku.com/docs/developer-program/media-playback/trick-mode/hls-and-dash.md
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafImageBasedTrickPlay {
#[allow(missing_docs)] // documentation missing in model
Advanced,
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
Thumbnail,
#[allow(missing_docs)] // documentation missing in model
ThumbnailAndFullframe,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafImageBasedTrickPlay {
fn from(s: &str) -> Self {
match s {
"ADVANCED" => CmafImageBasedTrickPlay::Advanced,
"NONE" => CmafImageBasedTrickPlay::None,
"THUMBNAIL" => CmafImageBasedTrickPlay::Thumbnail,
"THUMBNAIL_AND_FULLFRAME" => CmafImageBasedTrickPlay::ThumbnailAndFullframe,
other => CmafImageBasedTrickPlay::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafImageBasedTrickPlay {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafImageBasedTrickPlay::from(s))
}
}
impl CmafImageBasedTrickPlay {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafImageBasedTrickPlay::Advanced => "ADVANCED",
CmafImageBasedTrickPlay::None => "NONE",
CmafImageBasedTrickPlay::Thumbnail => "THUMBNAIL",
CmafImageBasedTrickPlay::ThumbnailAndFullframe => "THUMBNAIL_AND_FULLFRAME",
CmafImageBasedTrickPlay::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ADVANCED", "NONE", "THUMBNAIL", "THUMBNAIL_AND_FULLFRAME"]
}
}
impl AsRef<str> for CmafImageBasedTrickPlay {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for CMAF encryption
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafEncryptionSettings {
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub constant_initialization_vector: std::option::Option<std::string::String>,
/// Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample (SAMPLE-AES) or AES_CTR (AES-CTR).
pub encryption_method: std::option::Option<crate::model::CmafEncryptionType>,
/// When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
pub initialization_vector_in_manifest:
std::option::Option<crate::model::CmafInitializationVectorInManifest>,
/// If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProviderCmaf>,
/// Use these settings to set up encryption with a static key provider.
pub static_key_provider: std::option::Option<crate::model::StaticKeyProvider>,
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub r#type: std::option::Option<crate::model::CmafKeyProviderType>,
}
impl CmafEncryptionSettings {
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub fn constant_initialization_vector(&self) -> std::option::Option<&str> {
self.constant_initialization_vector.as_deref()
}
/// Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample (SAMPLE-AES) or AES_CTR (AES-CTR).
pub fn encryption_method(&self) -> std::option::Option<&crate::model::CmafEncryptionType> {
self.encryption_method.as_ref()
}
/// When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
pub fn initialization_vector_in_manifest(
&self,
) -> std::option::Option<&crate::model::CmafInitializationVectorInManifest> {
self.initialization_vector_in_manifest.as_ref()
}
/// If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProviderCmaf> {
self.speke_key_provider.as_ref()
}
/// Use these settings to set up encryption with a static key provider.
pub fn static_key_provider(&self) -> std::option::Option<&crate::model::StaticKeyProvider> {
self.static_key_provider.as_ref()
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub fn r#type(&self) -> std::option::Option<&crate::model::CmafKeyProviderType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for CmafEncryptionSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CmafEncryptionSettings");
formatter.field(
"constant_initialization_vector",
&self.constant_initialization_vector,
);
formatter.field("encryption_method", &self.encryption_method);
formatter.field(
"initialization_vector_in_manifest",
&self.initialization_vector_in_manifest,
);
formatter.field("speke_key_provider", &self.speke_key_provider);
formatter.field("static_key_provider", &self.static_key_provider);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`CmafEncryptionSettings`](crate::model::CmafEncryptionSettings)
pub mod cmaf_encryption_settings {
/// A builder for [`CmafEncryptionSettings`](crate::model::CmafEncryptionSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) constant_initialization_vector: std::option::Option<std::string::String>,
pub(crate) encryption_method: std::option::Option<crate::model::CmafEncryptionType>,
pub(crate) initialization_vector_in_manifest:
std::option::Option<crate::model::CmafInitializationVectorInManifest>,
pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProviderCmaf>,
pub(crate) static_key_provider: std::option::Option<crate::model::StaticKeyProvider>,
pub(crate) r#type: std::option::Option<crate::model::CmafKeyProviderType>,
}
impl Builder {
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub fn constant_initialization_vector(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.constant_initialization_vector = Some(input.into());
self
}
/// This is a 128-bit, 16-byte hex value represented by a 32-character text string. If this parameter is not set then the Initialization Vector will follow the segment number by default.
pub fn set_constant_initialization_vector(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.constant_initialization_vector = input;
self
}
/// Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample (SAMPLE-AES) or AES_CTR (AES-CTR).
pub fn encryption_method(mut self, input: crate::model::CmafEncryptionType) -> Self {
self.encryption_method = Some(input);
self
}
/// Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample (SAMPLE-AES) or AES_CTR (AES-CTR).
pub fn set_encryption_method(
mut self,
input: std::option::Option<crate::model::CmafEncryptionType>,
) -> Self {
self.encryption_method = input;
self
}
/// When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
pub fn initialization_vector_in_manifest(
mut self,
input: crate::model::CmafInitializationVectorInManifest,
) -> Self {
self.initialization_vector_in_manifest = Some(input);
self
}
/// When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
pub fn set_initialization_vector_in_manifest(
mut self,
input: std::option::Option<crate::model::CmafInitializationVectorInManifest>,
) -> Self {
self.initialization_vector_in_manifest = input;
self
}
/// If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProviderCmaf) -> Self {
self.speke_key_provider = Some(input);
self
}
/// If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
pub fn set_speke_key_provider(
mut self,
input: std::option::Option<crate::model::SpekeKeyProviderCmaf>,
) -> Self {
self.speke_key_provider = input;
self
}
/// Use these settings to set up encryption with a static key provider.
pub fn static_key_provider(mut self, input: crate::model::StaticKeyProvider) -> Self {
self.static_key_provider = Some(input);
self
}
/// Use these settings to set up encryption with a static key provider.
pub fn set_static_key_provider(
mut self,
input: std::option::Option<crate::model::StaticKeyProvider>,
) -> Self {
self.static_key_provider = input;
self
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub fn r#type(mut self, input: crate::model::CmafKeyProviderType) -> Self {
self.r#type = Some(input);
self
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
pub fn set_type(
mut self,
input: std::option::Option<crate::model::CmafKeyProviderType>,
) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`CmafEncryptionSettings`](crate::model::CmafEncryptionSettings)
pub fn build(self) -> crate::model::CmafEncryptionSettings {
crate::model::CmafEncryptionSettings {
constant_initialization_vector: self.constant_initialization_vector,
encryption_method: self.encryption_method,
initialization_vector_in_manifest: self.initialization_vector_in_manifest,
speke_key_provider: self.speke_key_provider,
static_key_provider: self.static_key_provider,
r#type: self.r#type,
}
}
}
}
impl CmafEncryptionSettings {
/// Creates a new builder-style object to manufacture [`CmafEncryptionSettings`](crate::model::CmafEncryptionSettings)
pub fn builder() -> crate::model::cmaf_encryption_settings::Builder {
crate::model::cmaf_encryption_settings::Builder::default()
}
}
/// Specify whether your DRM encryption key is static or from a key provider that follows the SPEKE standard. For more information about SPEKE, see https://docs.aws.amazon.com/speke/latest/documentation/what-is-speke.html.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafKeyProviderType {
#[allow(missing_docs)] // documentation missing in model
Speke,
#[allow(missing_docs)] // documentation missing in model
StaticKey,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafKeyProviderType {
fn from(s: &str) -> Self {
match s {
"SPEKE" => CmafKeyProviderType::Speke,
"STATIC_KEY" => CmafKeyProviderType::StaticKey,
other => CmafKeyProviderType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafKeyProviderType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafKeyProviderType::from(s))
}
}
impl CmafKeyProviderType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafKeyProviderType::Speke => "SPEKE",
CmafKeyProviderType::StaticKey => "STATIC_KEY",
CmafKeyProviderType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["SPEKE", "STATIC_KEY"]
}
}
impl AsRef<str> for CmafKeyProviderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If your output group type is CMAF, use these settings when doing DRM encryption with a SPEKE-compliant key provider. If your output group type is HLS, DASH, or Microsoft Smooth, use the SpekeKeyProvider settings instead.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SpekeKeyProviderCmaf {
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub certificate_arn: std::option::Option<std::string::String>,
/// Specify the DRM system IDs that you want signaled in the DASH manifest that MediaConvert creates as part of this CMAF package. The DASH manifest can currently signal up to three system IDs. For more information, see https://dashif.org/identifiers/content_protection/.
pub dash_signaled_system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
/// Specify the DRM system ID that you want signaled in the HLS manifest that MediaConvert creates as part of this CMAF package. The HLS manifest can currently signal only one system ID. For more information, see https://dashif.org/identifiers/content_protection/.
pub hls_signaled_system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub resource_id: std::option::Option<std::string::String>,
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub url: std::option::Option<std::string::String>,
}
impl SpekeKeyProviderCmaf {
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub fn certificate_arn(&self) -> std::option::Option<&str> {
self.certificate_arn.as_deref()
}
/// Specify the DRM system IDs that you want signaled in the DASH manifest that MediaConvert creates as part of this CMAF package. The DASH manifest can currently signal up to three system IDs. For more information, see https://dashif.org/identifiers/content_protection/.
pub fn dash_signaled_system_ids(&self) -> std::option::Option<&[std::string::String]> {
self.dash_signaled_system_ids.as_deref()
}
/// Specify the DRM system ID that you want signaled in the HLS manifest that MediaConvert creates as part of this CMAF package. The HLS manifest can currently signal only one system ID. For more information, see https://dashif.org/identifiers/content_protection/.
pub fn hls_signaled_system_ids(&self) -> std::option::Option<&[std::string::String]> {
self.hls_signaled_system_ids.as_deref()
}
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
impl std::fmt::Debug for SpekeKeyProviderCmaf {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SpekeKeyProviderCmaf");
formatter.field("certificate_arn", &self.certificate_arn);
formatter.field("dash_signaled_system_ids", &self.dash_signaled_system_ids);
formatter.field("hls_signaled_system_ids", &self.hls_signaled_system_ids);
formatter.field("resource_id", &self.resource_id);
formatter.field("url", &self.url);
formatter.finish()
}
}
/// See [`SpekeKeyProviderCmaf`](crate::model::SpekeKeyProviderCmaf)
pub mod speke_key_provider_cmaf {
/// A builder for [`SpekeKeyProviderCmaf`](crate::model::SpekeKeyProviderCmaf)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) certificate_arn: std::option::Option<std::string::String>,
pub(crate) dash_signaled_system_ids:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) hls_signaled_system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) url: std::option::Option<std::string::String>,
}
impl Builder {
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub fn certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.certificate_arn = Some(input.into());
self
}
/// If you want your key provider to encrypt the content keys that it provides to MediaConvert, set up a certificate with a master key using AWS Certificate Manager. Specify the certificate's Amazon Resource Name (ARN) here.
pub fn set_certificate_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.certificate_arn = input;
self
}
/// Appends an item to `dash_signaled_system_ids`.
///
/// To override the contents of this collection use [`set_dash_signaled_system_ids`](Self::set_dash_signaled_system_ids).
///
/// Specify the DRM system IDs that you want signaled in the DASH manifest that MediaConvert creates as part of this CMAF package. The DASH manifest can currently signal up to three system IDs. For more information, see https://dashif.org/identifiers/content_protection/.
pub fn dash_signaled_system_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.dash_signaled_system_ids.unwrap_or_default();
v.push(input.into());
self.dash_signaled_system_ids = Some(v);
self
}
/// Specify the DRM system IDs that you want signaled in the DASH manifest that MediaConvert creates as part of this CMAF package. The DASH manifest can currently signal up to three system IDs. For more information, see https://dashif.org/identifiers/content_protection/.
pub fn set_dash_signaled_system_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.dash_signaled_system_ids = input;
self
}
/// Appends an item to `hls_signaled_system_ids`.
///
/// To override the contents of this collection use [`set_hls_signaled_system_ids`](Self::set_hls_signaled_system_ids).
///
/// Specify the DRM system ID that you want signaled in the HLS manifest that MediaConvert creates as part of this CMAF package. The HLS manifest can currently signal only one system ID. For more information, see https://dashif.org/identifiers/content_protection/.
pub fn hls_signaled_system_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.hls_signaled_system_ids.unwrap_or_default();
v.push(input.into());
self.hls_signaled_system_ids = Some(v);
self
}
/// Specify the DRM system ID that you want signaled in the HLS manifest that MediaConvert creates as part of this CMAF package. The HLS manifest can currently signal only one system ID. For more information, see https://dashif.org/identifiers/content_protection/.
pub fn set_hls_signaled_system_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.hls_signaled_system_ids = input;
self
}
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
/// Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
/// Specify the URL to the key server that your SPEKE-compliant DRM key provider uses to provide keys for encrypting your content.
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
/// Consumes the builder and constructs a [`SpekeKeyProviderCmaf`](crate::model::SpekeKeyProviderCmaf)
pub fn build(self) -> crate::model::SpekeKeyProviderCmaf {
crate::model::SpekeKeyProviderCmaf {
certificate_arn: self.certificate_arn,
dash_signaled_system_ids: self.dash_signaled_system_ids,
hls_signaled_system_ids: self.hls_signaled_system_ids,
resource_id: self.resource_id,
url: self.url,
}
}
}
}
impl SpekeKeyProviderCmaf {
/// Creates a new builder-style object to manufacture [`SpekeKeyProviderCmaf`](crate::model::SpekeKeyProviderCmaf)
pub fn builder() -> crate::model::speke_key_provider_cmaf::Builder {
crate::model::speke_key_provider_cmaf::Builder::default()
}
}
/// When you use DRM with CMAF outputs, choose whether the service writes the 128-bit encryption initialization vector in the HLS and DASH manifests.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafInitializationVectorInManifest {
#[allow(missing_docs)] // documentation missing in model
Exclude,
#[allow(missing_docs)] // documentation missing in model
Include,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafInitializationVectorInManifest {
fn from(s: &str) -> Self {
match s {
"EXCLUDE" => CmafInitializationVectorInManifest::Exclude,
"INCLUDE" => CmafInitializationVectorInManifest::Include,
other => CmafInitializationVectorInManifest::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafInitializationVectorInManifest {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafInitializationVectorInManifest::from(s))
}
}
impl CmafInitializationVectorInManifest {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafInitializationVectorInManifest::Exclude => "EXCLUDE",
CmafInitializationVectorInManifest::Include => "INCLUDE",
CmafInitializationVectorInManifest::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EXCLUDE", "INCLUDE"]
}
}
impl AsRef<str> for CmafInitializationVectorInManifest {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the encryption scheme that you want the service to use when encrypting your CMAF segments. Choose AES-CBC subsample (SAMPLE-AES) or AES_CTR (AES-CTR).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafEncryptionType {
#[allow(missing_docs)] // documentation missing in model
AesCtr,
#[allow(missing_docs)] // documentation missing in model
SampleAes,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafEncryptionType {
fn from(s: &str) -> Self {
match s {
"AES_CTR" => CmafEncryptionType::AesCtr,
"SAMPLE_AES" => CmafEncryptionType::SampleAes,
other => CmafEncryptionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafEncryptionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafEncryptionType::from(s))
}
}
impl CmafEncryptionType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafEncryptionType::AesCtr => "AES_CTR",
CmafEncryptionType::SampleAes => "SAMPLE_AES",
CmafEncryptionType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AES_CTR", "SAMPLE_AES"]
}
}
impl AsRef<str> for CmafEncryptionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist generation.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafCodecSpecification {
#[allow(missing_docs)] // documentation missing in model
Rfc4281,
#[allow(missing_docs)] // documentation missing in model
Rfc6381,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafCodecSpecification {
fn from(s: &str) -> Self {
match s {
"RFC_4281" => CmafCodecSpecification::Rfc4281,
"RFC_6381" => CmafCodecSpecification::Rfc6381,
other => CmafCodecSpecification::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafCodecSpecification {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafCodecSpecification::from(s))
}
}
impl CmafCodecSpecification {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafCodecSpecification::Rfc4281 => "RFC_4281",
CmafCodecSpecification::Rfc6381 => "RFC_6381",
CmafCodecSpecification::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["RFC_4281", "RFC_6381"]
}
}
impl AsRef<str> for CmafCodecSpecification {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Disable this setting only when your workflow requires the #EXT-X-ALLOW-CACHE:no tag. Otherwise, keep the default value Enabled (ENABLED) and control caching in your video distribution set up. For example, use the Cache-Control http header.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CmafClientCache {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CmafClientCache {
fn from(s: &str) -> Self {
match s {
"DISABLED" => CmafClientCache::Disabled,
"ENABLED" => CmafClientCache::Enabled,
other => CmafClientCache::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CmafClientCache {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CmafClientCache::from(s))
}
}
impl CmafClientCache {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CmafClientCache::Disabled => "DISABLED",
CmafClientCache::Enabled => "ENABLED",
CmafClientCache::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for CmafClientCache {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the details for each pair of HLS and DASH additional manifests that you want the service to generate for this CMAF output group. Each pair of manifests can reference a different subset of outputs in the group.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub manifest_name_modifier: std::option::Option<std::string::String>,
/// Specify the outputs that you want this additional top-level manifest to reference.
pub selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CmafAdditionalManifest {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub fn manifest_name_modifier(&self) -> std::option::Option<&str> {
self.manifest_name_modifier.as_deref()
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(&self) -> std::option::Option<&[std::string::String]> {
self.selected_outputs.as_deref()
}
}
impl std::fmt::Debug for CmafAdditionalManifest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CmafAdditionalManifest");
formatter.field("manifest_name_modifier", &self.manifest_name_modifier);
formatter.field("selected_outputs", &self.selected_outputs);
formatter.finish()
}
}
/// See [`CmafAdditionalManifest`](crate::model::CmafAdditionalManifest)
pub mod cmaf_additional_manifest {
/// A builder for [`CmafAdditionalManifest`](crate::model::CmafAdditionalManifest)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) manifest_name_modifier: std::option::Option<std::string::String>,
pub(crate) selected_outputs: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub fn manifest_name_modifier(mut self, input: impl Into<std::string::String>) -> Self {
self.manifest_name_modifier = Some(input.into());
self
}
/// Specify a name modifier that the service adds to the name of this manifest to make it different from the file names of the other main manifests in the output group. For example, say that the default main manifest for your HLS group is film-name.m3u8. If you enter "-no-premium" for this setting, then the file name the service generates for this top-level manifest is film-name-no-premium.m3u8. For HLS output groups, specify a manifestNameModifier that is different from the nameModifier of the output. The service uses the output name modifier to create unique names for the individual variant manifests.
pub fn set_manifest_name_modifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.manifest_name_modifier = input;
self
}
/// Appends an item to `selected_outputs`.
///
/// To override the contents of this collection use [`set_selected_outputs`](Self::set_selected_outputs).
///
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn selected_outputs(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.selected_outputs.unwrap_or_default();
v.push(input.into());
self.selected_outputs = Some(v);
self
}
/// Specify the outputs that you want this additional top-level manifest to reference.
pub fn set_selected_outputs(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.selected_outputs = input;
self
}
/// Consumes the builder and constructs a [`CmafAdditionalManifest`](crate::model::CmafAdditionalManifest)
pub fn build(self) -> crate::model::CmafAdditionalManifest {
crate::model::CmafAdditionalManifest {
manifest_name_modifier: self.manifest_name_modifier,
selected_outputs: self.selected_outputs,
}
}
}
}
impl CmafAdditionalManifest {
/// Creates a new builder-style object to manufacture [`CmafAdditionalManifest`](crate::model::CmafAdditionalManifest)
pub fn builder() -> crate::model::cmaf_additional_manifest::Builder {
crate::model::cmaf_additional_manifest::Builder::default()
}
}
/// Use automated encoding to have MediaConvert choose your encoding settings for you, based on characteristics of your input video.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AutomatedEncodingSettings {
/// Use automated ABR to have MediaConvert set up the renditions in your ABR package for you automatically, based on characteristics of your input video. This feature optimizes video quality while minimizing the overall size of your ABR package.
pub abr_settings: std::option::Option<crate::model::AutomatedAbrSettings>,
}
impl AutomatedEncodingSettings {
/// Use automated ABR to have MediaConvert set up the renditions in your ABR package for you automatically, based on characteristics of your input video. This feature optimizes video quality while minimizing the overall size of your ABR package.
pub fn abr_settings(&self) -> std::option::Option<&crate::model::AutomatedAbrSettings> {
self.abr_settings.as_ref()
}
}
impl std::fmt::Debug for AutomatedEncodingSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AutomatedEncodingSettings");
formatter.field("abr_settings", &self.abr_settings);
formatter.finish()
}
}
/// See [`AutomatedEncodingSettings`](crate::model::AutomatedEncodingSettings)
pub mod automated_encoding_settings {
/// A builder for [`AutomatedEncodingSettings`](crate::model::AutomatedEncodingSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) abr_settings: std::option::Option<crate::model::AutomatedAbrSettings>,
}
impl Builder {
/// Use automated ABR to have MediaConvert set up the renditions in your ABR package for you automatically, based on characteristics of your input video. This feature optimizes video quality while minimizing the overall size of your ABR package.
pub fn abr_settings(mut self, input: crate::model::AutomatedAbrSettings) -> Self {
self.abr_settings = Some(input);
self
}
/// Use automated ABR to have MediaConvert set up the renditions in your ABR package for you automatically, based on characteristics of your input video. This feature optimizes video quality while minimizing the overall size of your ABR package.
pub fn set_abr_settings(
mut self,
input: std::option::Option<crate::model::AutomatedAbrSettings>,
) -> Self {
self.abr_settings = input;
self
}
/// Consumes the builder and constructs a [`AutomatedEncodingSettings`](crate::model::AutomatedEncodingSettings)
pub fn build(self) -> crate::model::AutomatedEncodingSettings {
crate::model::AutomatedEncodingSettings {
abr_settings: self.abr_settings,
}
}
}
}
impl AutomatedEncodingSettings {
/// Creates a new builder-style object to manufacture [`AutomatedEncodingSettings`](crate::model::AutomatedEncodingSettings)
pub fn builder() -> crate::model::automated_encoding_settings::Builder {
crate::model::automated_encoding_settings::Builder::default()
}
}
/// Use automated ABR to have MediaConvert set up the renditions in your ABR package for you automatically, based on characteristics of your input video. This feature optimizes video quality while minimizing the overall size of your ABR package.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AutomatedAbrSettings {
/// Optional. The maximum target bit rate used in your automated ABR stack. Use this value to set an upper limit on the bandwidth consumed by the highest-quality rendition. This is the rendition that is delivered to viewers with the fastest internet connections. If you don't specify a value, MediaConvert uses 8,000,000 (8 mb/s) by default.
pub max_abr_bitrate: i32,
/// Optional. The maximum number of renditions that MediaConvert will create in your automated ABR stack. The number of renditions is determined automatically, based on analysis of each job, but will never exceed this limit. When you set this to Auto in the console, which is equivalent to excluding it from your JSON job specification, MediaConvert defaults to a limit of 15.
pub max_renditions: i32,
/// Optional. The minimum target bitrate used in your automated ABR stack. Use this value to set a lower limit on the bitrate of video delivered to viewers with slow internet connections. If you don't specify a value, MediaConvert uses 600,000 (600 kb/s) by default.
pub min_abr_bitrate: i32,
/// Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you still want MediaConvert to optimize for video quality and overall file size.
pub rules: std::option::Option<std::vec::Vec<crate::model::AutomatedAbrRule>>,
}
impl AutomatedAbrSettings {
/// Optional. The maximum target bit rate used in your automated ABR stack. Use this value to set an upper limit on the bandwidth consumed by the highest-quality rendition. This is the rendition that is delivered to viewers with the fastest internet connections. If you don't specify a value, MediaConvert uses 8,000,000 (8 mb/s) by default.
pub fn max_abr_bitrate(&self) -> i32 {
self.max_abr_bitrate
}
/// Optional. The maximum number of renditions that MediaConvert will create in your automated ABR stack. The number of renditions is determined automatically, based on analysis of each job, but will never exceed this limit. When you set this to Auto in the console, which is equivalent to excluding it from your JSON job specification, MediaConvert defaults to a limit of 15.
pub fn max_renditions(&self) -> i32 {
self.max_renditions
}
/// Optional. The minimum target bitrate used in your automated ABR stack. Use this value to set a lower limit on the bitrate of video delivered to viewers with slow internet connections. If you don't specify a value, MediaConvert uses 600,000 (600 kb/s) by default.
pub fn min_abr_bitrate(&self) -> i32 {
self.min_abr_bitrate
}
/// Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you still want MediaConvert to optimize for video quality and overall file size.
pub fn rules(&self) -> std::option::Option<&[crate::model::AutomatedAbrRule]> {
self.rules.as_deref()
}
}
impl std::fmt::Debug for AutomatedAbrSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AutomatedAbrSettings");
formatter.field("max_abr_bitrate", &self.max_abr_bitrate);
formatter.field("max_renditions", &self.max_renditions);
formatter.field("min_abr_bitrate", &self.min_abr_bitrate);
formatter.field("rules", &self.rules);
formatter.finish()
}
}
/// See [`AutomatedAbrSettings`](crate::model::AutomatedAbrSettings)
pub mod automated_abr_settings {
/// A builder for [`AutomatedAbrSettings`](crate::model::AutomatedAbrSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_abr_bitrate: std::option::Option<i32>,
pub(crate) max_renditions: std::option::Option<i32>,
pub(crate) min_abr_bitrate: std::option::Option<i32>,
pub(crate) rules: std::option::Option<std::vec::Vec<crate::model::AutomatedAbrRule>>,
}
impl Builder {
/// Optional. The maximum target bit rate used in your automated ABR stack. Use this value to set an upper limit on the bandwidth consumed by the highest-quality rendition. This is the rendition that is delivered to viewers with the fastest internet connections. If you don't specify a value, MediaConvert uses 8,000,000 (8 mb/s) by default.
pub fn max_abr_bitrate(mut self, input: i32) -> Self {
self.max_abr_bitrate = Some(input);
self
}
/// Optional. The maximum target bit rate used in your automated ABR stack. Use this value to set an upper limit on the bandwidth consumed by the highest-quality rendition. This is the rendition that is delivered to viewers with the fastest internet connections. If you don't specify a value, MediaConvert uses 8,000,000 (8 mb/s) by default.
pub fn set_max_abr_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.max_abr_bitrate = input;
self
}
/// Optional. The maximum number of renditions that MediaConvert will create in your automated ABR stack. The number of renditions is determined automatically, based on analysis of each job, but will never exceed this limit. When you set this to Auto in the console, which is equivalent to excluding it from your JSON job specification, MediaConvert defaults to a limit of 15.
pub fn max_renditions(mut self, input: i32) -> Self {
self.max_renditions = Some(input);
self
}
/// Optional. The maximum number of renditions that MediaConvert will create in your automated ABR stack. The number of renditions is determined automatically, based on analysis of each job, but will never exceed this limit. When you set this to Auto in the console, which is equivalent to excluding it from your JSON job specification, MediaConvert defaults to a limit of 15.
pub fn set_max_renditions(mut self, input: std::option::Option<i32>) -> Self {
self.max_renditions = input;
self
}
/// Optional. The minimum target bitrate used in your automated ABR stack. Use this value to set a lower limit on the bitrate of video delivered to viewers with slow internet connections. If you don't specify a value, MediaConvert uses 600,000 (600 kb/s) by default.
pub fn min_abr_bitrate(mut self, input: i32) -> Self {
self.min_abr_bitrate = Some(input);
self
}
/// Optional. The minimum target bitrate used in your automated ABR stack. Use this value to set a lower limit on the bitrate of video delivered to viewers with slow internet connections. If you don't specify a value, MediaConvert uses 600,000 (600 kb/s) by default.
pub fn set_min_abr_bitrate(mut self, input: std::option::Option<i32>) -> Self {
self.min_abr_bitrate = input;
self
}
/// Appends an item to `rules`.
///
/// To override the contents of this collection use [`set_rules`](Self::set_rules).
///
/// Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you still want MediaConvert to optimize for video quality and overall file size.
pub fn rules(mut self, input: crate::model::AutomatedAbrRule) -> Self {
let mut v = self.rules.unwrap_or_default();
v.push(input);
self.rules = Some(v);
self
}
/// Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you still want MediaConvert to optimize for video quality and overall file size.
pub fn set_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AutomatedAbrRule>>,
) -> Self {
self.rules = input;
self
}
/// Consumes the builder and constructs a [`AutomatedAbrSettings`](crate::model::AutomatedAbrSettings)
pub fn build(self) -> crate::model::AutomatedAbrSettings {
crate::model::AutomatedAbrSettings {
max_abr_bitrate: self.max_abr_bitrate.unwrap_or_default(),
max_renditions: self.max_renditions.unwrap_or_default(),
min_abr_bitrate: self.min_abr_bitrate.unwrap_or_default(),
rules: self.rules,
}
}
}
}
impl AutomatedAbrSettings {
/// Creates a new builder-style object to manufacture [`AutomatedAbrSettings`](crate::model::AutomatedAbrSettings)
pub fn builder() -> crate::model::automated_abr_settings::Builder {
crate::model::automated_abr_settings::Builder::default()
}
}
/// Specify one or more Automated ABR rule types. Note: Force include and Allowed renditions are mutually exclusive.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AutomatedAbrRule {
/// When customer adds the allowed renditions rule for auto ABR ladder, they are required to add at leat one rendition to allowedRenditions list
pub allowed_renditions: std::option::Option<std::vec::Vec<crate::model::AllowedRenditionSize>>,
/// When customer adds the force include renditions rule for auto ABR ladder, they are required to add at leat one rendition to forceIncludeRenditions list
pub force_include_renditions:
std::option::Option<std::vec::Vec<crate::model::ForceIncludeRenditionSize>>,
/// Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size.
pub min_bottom_rendition_size: std::option::Option<crate::model::MinBottomRenditionSize>,
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution.
pub min_top_rendition_size: std::option::Option<crate::model::MinTopRenditionSize>,
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.
pub r#type: std::option::Option<crate::model::RuleType>,
}
impl AutomatedAbrRule {
/// When customer adds the allowed renditions rule for auto ABR ladder, they are required to add at leat one rendition to allowedRenditions list
pub fn allowed_renditions(&self) -> std::option::Option<&[crate::model::AllowedRenditionSize]> {
self.allowed_renditions.as_deref()
}
/// When customer adds the force include renditions rule for auto ABR ladder, they are required to add at leat one rendition to forceIncludeRenditions list
pub fn force_include_renditions(
&self,
) -> std::option::Option<&[crate::model::ForceIncludeRenditionSize]> {
self.force_include_renditions.as_deref()
}
/// Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size.
pub fn min_bottom_rendition_size(
&self,
) -> std::option::Option<&crate::model::MinBottomRenditionSize> {
self.min_bottom_rendition_size.as_ref()
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution.
pub fn min_top_rendition_size(
&self,
) -> std::option::Option<&crate::model::MinTopRenditionSize> {
self.min_top_rendition_size.as_ref()
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.
pub fn r#type(&self) -> std::option::Option<&crate::model::RuleType> {
self.r#type.as_ref()
}
}
impl std::fmt::Debug for AutomatedAbrRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AutomatedAbrRule");
formatter.field("allowed_renditions", &self.allowed_renditions);
formatter.field("force_include_renditions", &self.force_include_renditions);
formatter.field("min_bottom_rendition_size", &self.min_bottom_rendition_size);
formatter.field("min_top_rendition_size", &self.min_top_rendition_size);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
/// See [`AutomatedAbrRule`](crate::model::AutomatedAbrRule)
pub mod automated_abr_rule {
/// A builder for [`AutomatedAbrRule`](crate::model::AutomatedAbrRule)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) allowed_renditions:
std::option::Option<std::vec::Vec<crate::model::AllowedRenditionSize>>,
pub(crate) force_include_renditions:
std::option::Option<std::vec::Vec<crate::model::ForceIncludeRenditionSize>>,
pub(crate) min_bottom_rendition_size:
std::option::Option<crate::model::MinBottomRenditionSize>,
pub(crate) min_top_rendition_size: std::option::Option<crate::model::MinTopRenditionSize>,
pub(crate) r#type: std::option::Option<crate::model::RuleType>,
}
impl Builder {
/// Appends an item to `allowed_renditions`.
///
/// To override the contents of this collection use [`set_allowed_renditions`](Self::set_allowed_renditions).
///
/// When customer adds the allowed renditions rule for auto ABR ladder, they are required to add at leat one rendition to allowedRenditions list
pub fn allowed_renditions(mut self, input: crate::model::AllowedRenditionSize) -> Self {
let mut v = self.allowed_renditions.unwrap_or_default();
v.push(input);
self.allowed_renditions = Some(v);
self
}
/// When customer adds the allowed renditions rule for auto ABR ladder, they are required to add at leat one rendition to allowedRenditions list
pub fn set_allowed_renditions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AllowedRenditionSize>>,
) -> Self {
self.allowed_renditions = input;
self
}
/// Appends an item to `force_include_renditions`.
///
/// To override the contents of this collection use [`set_force_include_renditions`](Self::set_force_include_renditions).
///
/// When customer adds the force include renditions rule for auto ABR ladder, they are required to add at leat one rendition to forceIncludeRenditions list
pub fn force_include_renditions(
mut self,
input: crate::model::ForceIncludeRenditionSize,
) -> Self {
let mut v = self.force_include_renditions.unwrap_or_default();
v.push(input);
self.force_include_renditions = Some(v);
self
}
/// When customer adds the force include renditions rule for auto ABR ladder, they are required to add at leat one rendition to forceIncludeRenditions list
pub fn set_force_include_renditions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ForceIncludeRenditionSize>>,
) -> Self {
self.force_include_renditions = input;
self
}
/// Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size.
pub fn min_bottom_rendition_size(
mut self,
input: crate::model::MinBottomRenditionSize,
) -> Self {
self.min_bottom_rendition_size = Some(input);
self
}
/// Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size.
pub fn set_min_bottom_rendition_size(
mut self,
input: std::option::Option<crate::model::MinBottomRenditionSize>,
) -> Self {
self.min_bottom_rendition_size = input;
self
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution.
pub fn min_top_rendition_size(mut self, input: crate::model::MinTopRenditionSize) -> Self {
self.min_top_rendition_size = Some(input);
self
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution.
pub fn set_min_top_rendition_size(
mut self,
input: std::option::Option<crate::model::MinTopRenditionSize>,
) -> Self {
self.min_top_rendition_size = input;
self
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.
pub fn r#type(mut self, input: crate::model::RuleType) -> Self {
self.r#type = Some(input);
self
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.
pub fn set_type(mut self, input: std::option::Option<crate::model::RuleType>) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`AutomatedAbrRule`](crate::model::AutomatedAbrRule)
pub fn build(self) -> crate::model::AutomatedAbrRule {
crate::model::AutomatedAbrRule {
allowed_renditions: self.allowed_renditions,
force_include_renditions: self.force_include_renditions,
min_bottom_rendition_size: self.min_bottom_rendition_size,
min_top_rendition_size: self.min_top_rendition_size,
r#type: self.r#type,
}
}
}
}
impl AutomatedAbrRule {
/// Creates a new builder-style object to manufacture [`AutomatedAbrRule`](crate::model::AutomatedAbrRule)
pub fn builder() -> crate::model::automated_abr_rule::Builder {
crate::model::automated_abr_rule::Builder::default()
}
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution. Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size. Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting. Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * (Required) The number of resolutions that you specify must be equal to, or greater than, the Max renditions setting. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum RuleType {
#[allow(missing_docs)] // documentation missing in model
AllowedRenditions,
#[allow(missing_docs)] // documentation missing in model
ForceIncludeRenditions,
#[allow(missing_docs)] // documentation missing in model
MinBottomRenditionSize,
#[allow(missing_docs)] // documentation missing in model
MinTopRenditionSize,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for RuleType {
fn from(s: &str) -> Self {
match s {
"ALLOWED_RENDITIONS" => RuleType::AllowedRenditions,
"FORCE_INCLUDE_RENDITIONS" => RuleType::ForceIncludeRenditions,
"MIN_BOTTOM_RENDITION_SIZE" => RuleType::MinBottomRenditionSize,
"MIN_TOP_RENDITION_SIZE" => RuleType::MinTopRenditionSize,
other => RuleType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RuleType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RuleType::from(s))
}
}
impl RuleType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
RuleType::AllowedRenditions => "ALLOWED_RENDITIONS",
RuleType::ForceIncludeRenditions => "FORCE_INCLUDE_RENDITIONS",
RuleType::MinBottomRenditionSize => "MIN_BOTTOM_RENDITION_SIZE",
RuleType::MinTopRenditionSize => "MIN_TOP_RENDITION_SIZE",
RuleType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ALLOWED_RENDITIONS",
"FORCE_INCLUDE_RENDITIONS",
"MIN_BOTTOM_RENDITION_SIZE",
"MIN_TOP_RENDITION_SIZE",
]
}
}
impl AsRef<str> for RuleType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Min top rendition size to specify a minimum size for the highest resolution in your ABR stack. * The highest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 1280x720 the highest resolution in your ABR stack will be equal to or greater than 1280x720. * If you specify a value for Max resolution, the value that you specify for Min top rendition size must be less than, or equal to, Max resolution.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MinTopRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub height: i32,
/// Use Width to define the video resolution width, in pixels, for this rule.
pub width: i32,
}
impl MinTopRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(&self) -> i32 {
self.height
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(&self) -> i32 {
self.width
}
}
impl std::fmt::Debug for MinTopRenditionSize {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MinTopRenditionSize");
formatter.field("height", &self.height);
formatter.field("width", &self.width);
formatter.finish()
}
}
/// See [`MinTopRenditionSize`](crate::model::MinTopRenditionSize)
pub mod min_top_rendition_size {
/// A builder for [`MinTopRenditionSize`](crate::model::MinTopRenditionSize)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) height: std::option::Option<i32>,
pub(crate) width: std::option::Option<i32>,
}
impl Builder {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Consumes the builder and constructs a [`MinTopRenditionSize`](crate::model::MinTopRenditionSize)
pub fn build(self) -> crate::model::MinTopRenditionSize {
crate::model::MinTopRenditionSize {
height: self.height.unwrap_or_default(),
width: self.width.unwrap_or_default(),
}
}
}
}
impl MinTopRenditionSize {
/// Creates a new builder-style object to manufacture [`MinTopRenditionSize`](crate::model::MinTopRenditionSize)
pub fn builder() -> crate::model::min_top_rendition_size::Builder {
crate::model::min_top_rendition_size::Builder::default()
}
}
/// Use Min bottom rendition size to specify a minimum size for the lowest resolution in your ABR stack. * The lowest resolution in your ABR stack will be equal to or greater than the value that you enter. For example: If you specify 640x360 the lowest resolution in your ABR stack will be equal to or greater than to 640x360. * If you specify a Min top rendition size rule, the value that you specify for Min bottom rendition size must be less than, or equal to, Min top rendition size.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MinBottomRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub height: i32,
/// Use Width to define the video resolution width, in pixels, for this rule.
pub width: i32,
}
impl MinBottomRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(&self) -> i32 {
self.height
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(&self) -> i32 {
self.width
}
}
impl std::fmt::Debug for MinBottomRenditionSize {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MinBottomRenditionSize");
formatter.field("height", &self.height);
formatter.field("width", &self.width);
formatter.finish()
}
}
/// See [`MinBottomRenditionSize`](crate::model::MinBottomRenditionSize)
pub mod min_bottom_rendition_size {
/// A builder for [`MinBottomRenditionSize`](crate::model::MinBottomRenditionSize)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) height: std::option::Option<i32>,
pub(crate) width: std::option::Option<i32>,
}
impl Builder {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Consumes the builder and constructs a [`MinBottomRenditionSize`](crate::model::MinBottomRenditionSize)
pub fn build(self) -> crate::model::MinBottomRenditionSize {
crate::model::MinBottomRenditionSize {
height: self.height.unwrap_or_default(),
width: self.width.unwrap_or_default(),
}
}
}
}
impl MinBottomRenditionSize {
/// Creates a new builder-style object to manufacture [`MinBottomRenditionSize`](crate::model::MinBottomRenditionSize)
pub fn builder() -> crate::model::min_bottom_rendition_size::Builder {
crate::model::min_bottom_rendition_size::Builder::default()
}
}
/// Use Force include renditions to specify one or more resolutions to include your ABR stack. * (Recommended) To optimize automated ABR, specify as few resolutions as possible. * (Required) The number of resolutions that you specify must be equal to, or less than, the Max renditions setting. * If you specify a Min top rendition size rule, specify at least one resolution that is equal to, or greater than, Min top rendition size. * If you specify a Min bottom rendition size rule, only specify resolutions that are equal to, or greater than, Min bottom rendition size. * If you specify a Force include renditions rule, do not specify a separate rule for Allowed renditions. * Note: The ABR stack may include other resolutions that you do not specify here, depending on the Max renditions setting.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ForceIncludeRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub height: i32,
/// Use Width to define the video resolution width, in pixels, for this rule.
pub width: i32,
}
impl ForceIncludeRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(&self) -> i32 {
self.height
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(&self) -> i32 {
self.width
}
}
impl std::fmt::Debug for ForceIncludeRenditionSize {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ForceIncludeRenditionSize");
formatter.field("height", &self.height);
formatter.field("width", &self.width);
formatter.finish()
}
}
/// See [`ForceIncludeRenditionSize`](crate::model::ForceIncludeRenditionSize)
pub mod force_include_rendition_size {
/// A builder for [`ForceIncludeRenditionSize`](crate::model::ForceIncludeRenditionSize)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) height: std::option::Option<i32>,
pub(crate) width: std::option::Option<i32>,
}
impl Builder {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Consumes the builder and constructs a [`ForceIncludeRenditionSize`](crate::model::ForceIncludeRenditionSize)
pub fn build(self) -> crate::model::ForceIncludeRenditionSize {
crate::model::ForceIncludeRenditionSize {
height: self.height.unwrap_or_default(),
width: self.width.unwrap_or_default(),
}
}
}
}
impl ForceIncludeRenditionSize {
/// Creates a new builder-style object to manufacture [`ForceIncludeRenditionSize`](crate::model::ForceIncludeRenditionSize)
pub fn builder() -> crate::model::force_include_rendition_size::Builder {
crate::model::force_include_rendition_size::Builder::default()
}
}
/// Use Allowed renditions to specify a list of possible resolutions in your ABR stack. * MediaConvert will create an ABR stack exclusively from the list of resolutions that you specify. * Some resolutions in the Allowed renditions list may not be included, however you can force a resolution to be included by setting Required to ENABLED. * You must specify at least one resolution that is greater than or equal to any resolutions that you specify in Min top rendition size or Min bottom rendition size. * If you specify Allowed renditions, you must not specify a separate rule for Force include renditions.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AllowedRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub height: i32,
/// Set to ENABLED to force a rendition to be included.
pub required: std::option::Option<crate::model::RequiredFlag>,
/// Use Width to define the video resolution width, in pixels, for this rule.
pub width: i32,
}
impl AllowedRenditionSize {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(&self) -> i32 {
self.height
}
/// Set to ENABLED to force a rendition to be included.
pub fn required(&self) -> std::option::Option<&crate::model::RequiredFlag> {
self.required.as_ref()
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(&self) -> i32 {
self.width
}
}
impl std::fmt::Debug for AllowedRenditionSize {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AllowedRenditionSize");
formatter.field("height", &self.height);
formatter.field("required", &self.required);
formatter.field("width", &self.width);
formatter.finish()
}
}
/// See [`AllowedRenditionSize`](crate::model::AllowedRenditionSize)
pub mod allowed_rendition_size {
/// A builder for [`AllowedRenditionSize`](crate::model::AllowedRenditionSize)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) height: std::option::Option<i32>,
pub(crate) required: std::option::Option<crate::model::RequiredFlag>,
pub(crate) width: std::option::Option<i32>,
}
impl Builder {
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn height(mut self, input: i32) -> Self {
self.height = Some(input);
self
}
/// Use Height to define the video resolution height, in pixels, for this rule.
pub fn set_height(mut self, input: std::option::Option<i32>) -> Self {
self.height = input;
self
}
/// Set to ENABLED to force a rendition to be included.
pub fn required(mut self, input: crate::model::RequiredFlag) -> Self {
self.required = Some(input);
self
}
/// Set to ENABLED to force a rendition to be included.
pub fn set_required(
mut self,
input: std::option::Option<crate::model::RequiredFlag>,
) -> Self {
self.required = input;
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn width(mut self, input: i32) -> Self {
self.width = Some(input);
self
}
/// Use Width to define the video resolution width, in pixels, for this rule.
pub fn set_width(mut self, input: std::option::Option<i32>) -> Self {
self.width = input;
self
}
/// Consumes the builder and constructs a [`AllowedRenditionSize`](crate::model::AllowedRenditionSize)
pub fn build(self) -> crate::model::AllowedRenditionSize {
crate::model::AllowedRenditionSize {
height: self.height.unwrap_or_default(),
required: self.required,
width: self.width.unwrap_or_default(),
}
}
}
}
impl AllowedRenditionSize {
/// Creates a new builder-style object to manufacture [`AllowedRenditionSize`](crate::model::AllowedRenditionSize)
pub fn builder() -> crate::model::allowed_rendition_size::Builder {
crate::model::allowed_rendition_size::Builder::default()
}
}
/// Set to ENABLED to force a rendition to be included.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum RequiredFlag {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for RequiredFlag {
fn from(s: &str) -> Self {
match s {
"DISABLED" => RequiredFlag::Disabled,
"ENABLED" => RequiredFlag::Enabled,
other => RequiredFlag::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RequiredFlag {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RequiredFlag::from(s))
}
}
impl RequiredFlag {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
RequiredFlag::Disabled => "DISABLED",
RequiredFlag::Enabled => "ENABLED",
RequiredFlag::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for RequiredFlag {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NielsenNonLinearWatermarkSettings {
/// Choose the type of Nielsen watermarks that you want in your outputs. When you choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting SID (sourceId). When you choose CBET (CBET), you must provide a value for the setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
pub active_watermark_process:
std::option::Option<crate::model::NielsenActiveWatermarkProcessType>,
/// Optional. Use this setting when you want the service to include an ADI file in the Nielsen metadata .zip file. To provide an ADI file, store it in Amazon S3 and provide a URL to it here. The URL should be in the following format: S3://bucket/path/ADI-file. For more information about the metadata .zip file, see the setting Metadata destination (metadataDestination).
pub adi_filename: std::option::Option<std::string::String>,
/// Use the asset ID that you provide to Nielsen to uniquely identify this asset. Required for all Nielsen non-linear watermarking.
pub asset_id: std::option::Option<std::string::String>,
/// Use the asset name that you provide to Nielsen for this asset. Required for all Nielsen non-linear watermarking.
pub asset_name: std::option::Option<std::string::String>,
/// Use the CSID that Nielsen provides to you. This CBET source ID should be unique to your Nielsen account but common to all of your output assets that have CBET watermarking. Required when you choose a value for the setting Watermark types (ActiveWatermarkProcess) that includes CBET.
pub cbet_source_id: std::option::Option<std::string::String>,
/// Optional. If this asset uses an episode ID with Nielsen, provide it here.
pub episode_id: std::option::Option<std::string::String>,
/// Specify the Amazon S3 location where you want MediaConvert to save your Nielsen non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region as the one where you do your MediaConvert transcoding. If you want to include an ADI file in this .zip file, use the setting ADI file (adiFilename) to specify it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You are responsible for delivering the metadata .zip files to Nielsen.
pub metadata_destination: std::option::Option<std::string::String>,
/// Use the SID that Nielsen provides to you. This source ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking. This ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking.
pub source_id: i32,
/// Required. Specify whether your source content already contains Nielsen non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the service fails the job. Nielsen requires that you add non-linear watermarking to only clean content that doesn't already have non-linear Nielsen watermarks.
pub source_watermark_status:
std::option::Option<crate::model::NielsenSourceWatermarkStatusType>,
/// Specify the endpoint for the TIC server that you have deployed and configured in the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert can't connect directly to a TIC server. Instead, you must use API Gateway to provide a RESTful interface between MediaConvert and a TIC server that you deploy in your AWS account. For more information on deploying a TIC server in your AWS account and the required API Gateway, contact Nielsen support.
pub tic_server_url: std::option::Option<std::string::String>,
/// To create assets that have the same TIC values in each audio track, keep the default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have unique TIC values for each audio track, choose Use unique TICs (RESERVE_UNIQUE_TICS_PER_TRACK).
pub unique_tic_per_audio_track:
std::option::Option<crate::model::NielsenUniqueTicPerAudioTrackType>,
}
impl NielsenNonLinearWatermarkSettings {
/// Choose the type of Nielsen watermarks that you want in your outputs. When you choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting SID (sourceId). When you choose CBET (CBET), you must provide a value for the setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
pub fn active_watermark_process(
&self,
) -> std::option::Option<&crate::model::NielsenActiveWatermarkProcessType> {
self.active_watermark_process.as_ref()
}
/// Optional. Use this setting when you want the service to include an ADI file in the Nielsen metadata .zip file. To provide an ADI file, store it in Amazon S3 and provide a URL to it here. The URL should be in the following format: S3://bucket/path/ADI-file. For more information about the metadata .zip file, see the setting Metadata destination (metadataDestination).
pub fn adi_filename(&self) -> std::option::Option<&str> {
self.adi_filename.as_deref()
}
/// Use the asset ID that you provide to Nielsen to uniquely identify this asset. Required for all Nielsen non-linear watermarking.
pub fn asset_id(&self) -> std::option::Option<&str> {
self.asset_id.as_deref()
}
/// Use the asset name that you provide to Nielsen for this asset. Required for all Nielsen non-linear watermarking.
pub fn asset_name(&self) -> std::option::Option<&str> {
self.asset_name.as_deref()
}
/// Use the CSID that Nielsen provides to you. This CBET source ID should be unique to your Nielsen account but common to all of your output assets that have CBET watermarking. Required when you choose a value for the setting Watermark types (ActiveWatermarkProcess) that includes CBET.
pub fn cbet_source_id(&self) -> std::option::Option<&str> {
self.cbet_source_id.as_deref()
}
/// Optional. If this asset uses an episode ID with Nielsen, provide it here.
pub fn episode_id(&self) -> std::option::Option<&str> {
self.episode_id.as_deref()
}
/// Specify the Amazon S3 location where you want MediaConvert to save your Nielsen non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region as the one where you do your MediaConvert transcoding. If you want to include an ADI file in this .zip file, use the setting ADI file (adiFilename) to specify it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You are responsible for delivering the metadata .zip files to Nielsen.
pub fn metadata_destination(&self) -> std::option::Option<&str> {
self.metadata_destination.as_deref()
}
/// Use the SID that Nielsen provides to you. This source ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking. This ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking.
pub fn source_id(&self) -> i32 {
self.source_id
}
/// Required. Specify whether your source content already contains Nielsen non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the service fails the job. Nielsen requires that you add non-linear watermarking to only clean content that doesn't already have non-linear Nielsen watermarks.
pub fn source_watermark_status(
&self,
) -> std::option::Option<&crate::model::NielsenSourceWatermarkStatusType> {
self.source_watermark_status.as_ref()
}
/// Specify the endpoint for the TIC server that you have deployed and configured in the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert can't connect directly to a TIC server. Instead, you must use API Gateway to provide a RESTful interface between MediaConvert and a TIC server that you deploy in your AWS account. For more information on deploying a TIC server in your AWS account and the required API Gateway, contact Nielsen support.
pub fn tic_server_url(&self) -> std::option::Option<&str> {
self.tic_server_url.as_deref()
}
/// To create assets that have the same TIC values in each audio track, keep the default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have unique TIC values for each audio track, choose Use unique TICs (RESERVE_UNIQUE_TICS_PER_TRACK).
pub fn unique_tic_per_audio_track(
&self,
) -> std::option::Option<&crate::model::NielsenUniqueTicPerAudioTrackType> {
self.unique_tic_per_audio_track.as_ref()
}
}
impl std::fmt::Debug for NielsenNonLinearWatermarkSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NielsenNonLinearWatermarkSettings");
formatter.field("active_watermark_process", &self.active_watermark_process);
formatter.field("adi_filename", &self.adi_filename);
formatter.field("asset_id", &self.asset_id);
formatter.field("asset_name", &self.asset_name);
formatter.field("cbet_source_id", &self.cbet_source_id);
formatter.field("episode_id", &self.episode_id);
formatter.field("metadata_destination", &self.metadata_destination);
formatter.field("source_id", &self.source_id);
formatter.field("source_watermark_status", &self.source_watermark_status);
formatter.field("tic_server_url", &self.tic_server_url);
formatter.field(
"unique_tic_per_audio_track",
&self.unique_tic_per_audio_track,
);
formatter.finish()
}
}
/// See [`NielsenNonLinearWatermarkSettings`](crate::model::NielsenNonLinearWatermarkSettings)
pub mod nielsen_non_linear_watermark_settings {
/// A builder for [`NielsenNonLinearWatermarkSettings`](crate::model::NielsenNonLinearWatermarkSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) active_watermark_process:
std::option::Option<crate::model::NielsenActiveWatermarkProcessType>,
pub(crate) adi_filename: std::option::Option<std::string::String>,
pub(crate) asset_id: std::option::Option<std::string::String>,
pub(crate) asset_name: std::option::Option<std::string::String>,
pub(crate) cbet_source_id: std::option::Option<std::string::String>,
pub(crate) episode_id: std::option::Option<std::string::String>,
pub(crate) metadata_destination: std::option::Option<std::string::String>,
pub(crate) source_id: std::option::Option<i32>,
pub(crate) source_watermark_status:
std::option::Option<crate::model::NielsenSourceWatermarkStatusType>,
pub(crate) tic_server_url: std::option::Option<std::string::String>,
pub(crate) unique_tic_per_audio_track:
std::option::Option<crate::model::NielsenUniqueTicPerAudioTrackType>,
}
impl Builder {
/// Choose the type of Nielsen watermarks that you want in your outputs. When you choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting SID (sourceId). When you choose CBET (CBET), you must provide a value for the setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
pub fn active_watermark_process(
mut self,
input: crate::model::NielsenActiveWatermarkProcessType,
) -> Self {
self.active_watermark_process = Some(input);
self
}
/// Choose the type of Nielsen watermarks that you want in your outputs. When you choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting SID (sourceId). When you choose CBET (CBET), you must provide a value for the setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
pub fn set_active_watermark_process(
mut self,
input: std::option::Option<crate::model::NielsenActiveWatermarkProcessType>,
) -> Self {
self.active_watermark_process = input;
self
}
/// Optional. Use this setting when you want the service to include an ADI file in the Nielsen metadata .zip file. To provide an ADI file, store it in Amazon S3 and provide a URL to it here. The URL should be in the following format: S3://bucket/path/ADI-file. For more information about the metadata .zip file, see the setting Metadata destination (metadataDestination).
pub fn adi_filename(mut self, input: impl Into<std::string::String>) -> Self {
self.adi_filename = Some(input.into());
self
}
/// Optional. Use this setting when you want the service to include an ADI file in the Nielsen metadata .zip file. To provide an ADI file, store it in Amazon S3 and provide a URL to it here. The URL should be in the following format: S3://bucket/path/ADI-file. For more information about the metadata .zip file, see the setting Metadata destination (metadataDestination).
pub fn set_adi_filename(mut self, input: std::option::Option<std::string::String>) -> Self {
self.adi_filename = input;
self
}
/// Use the asset ID that you provide to Nielsen to uniquely identify this asset. Required for all Nielsen non-linear watermarking.
pub fn asset_id(mut self, input: impl Into<std::string::String>) -> Self {
self.asset_id = Some(input.into());
self
}
/// Use the asset ID that you provide to Nielsen to uniquely identify this asset. Required for all Nielsen non-linear watermarking.
pub fn set_asset_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.asset_id = input;
self
}
/// Use the asset name that you provide to Nielsen for this asset. Required for all Nielsen non-linear watermarking.
pub fn asset_name(mut self, input: impl Into<std::string::String>) -> Self {
self.asset_name = Some(input.into());
self
}
/// Use the asset name that you provide to Nielsen for this asset. Required for all Nielsen non-linear watermarking.
pub fn set_asset_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.asset_name = input;
self
}
/// Use the CSID that Nielsen provides to you. This CBET source ID should be unique to your Nielsen account but common to all of your output assets that have CBET watermarking. Required when you choose a value for the setting Watermark types (ActiveWatermarkProcess) that includes CBET.
pub fn cbet_source_id(mut self, input: impl Into<std::string::String>) -> Self {
self.cbet_source_id = Some(input.into());
self
}
/// Use the CSID that Nielsen provides to you. This CBET source ID should be unique to your Nielsen account but common to all of your output assets that have CBET watermarking. Required when you choose a value for the setting Watermark types (ActiveWatermarkProcess) that includes CBET.
pub fn set_cbet_source_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.cbet_source_id = input;
self
}
/// Optional. If this asset uses an episode ID with Nielsen, provide it here.
pub fn episode_id(mut self, input: impl Into<std::string::String>) -> Self {
self.episode_id = Some(input.into());
self
}
/// Optional. If this asset uses an episode ID with Nielsen, provide it here.
pub fn set_episode_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.episode_id = input;
self
}
/// Specify the Amazon S3 location where you want MediaConvert to save your Nielsen non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region as the one where you do your MediaConvert transcoding. If you want to include an ADI file in this .zip file, use the setting ADI file (adiFilename) to specify it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You are responsible for delivering the metadata .zip files to Nielsen.
pub fn metadata_destination(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata_destination = Some(input.into());
self
}
/// Specify the Amazon S3 location where you want MediaConvert to save your Nielsen non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region as the one where you do your MediaConvert transcoding. If you want to include an ADI file in this .zip file, use the setting ADI file (adiFilename) to specify it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You are responsible for delivering the metadata .zip files to Nielsen.
pub fn set_metadata_destination(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.metadata_destination = input;
self
}
/// Use the SID that Nielsen provides to you. This source ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking. This ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking.
pub fn source_id(mut self, input: i32) -> Self {
self.source_id = Some(input);
self
}
/// Use the SID that Nielsen provides to you. This source ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking. This ID should be unique to your Nielsen account but common to all of your output assets. Required for all Nielsen non-linear watermarking.
pub fn set_source_id(mut self, input: std::option::Option<i32>) -> Self {
self.source_id = input;
self
}
/// Required. Specify whether your source content already contains Nielsen non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the service fails the job. Nielsen requires that you add non-linear watermarking to only clean content that doesn't already have non-linear Nielsen watermarks.
pub fn source_watermark_status(
mut self,
input: crate::model::NielsenSourceWatermarkStatusType,
) -> Self {
self.source_watermark_status = Some(input);
self
}
/// Required. Specify whether your source content already contains Nielsen non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the service fails the job. Nielsen requires that you add non-linear watermarking to only clean content that doesn't already have non-linear Nielsen watermarks.
pub fn set_source_watermark_status(
mut self,
input: std::option::Option<crate::model::NielsenSourceWatermarkStatusType>,
) -> Self {
self.source_watermark_status = input;
self
}
/// Specify the endpoint for the TIC server that you have deployed and configured in the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert can't connect directly to a TIC server. Instead, you must use API Gateway to provide a RESTful interface between MediaConvert and a TIC server that you deploy in your AWS account. For more information on deploying a TIC server in your AWS account and the required API Gateway, contact Nielsen support.
pub fn tic_server_url(mut self, input: impl Into<std::string::String>) -> Self {
self.tic_server_url = Some(input.into());
self
}
/// Specify the endpoint for the TIC server that you have deployed and configured in the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert can't connect directly to a TIC server. Instead, you must use API Gateway to provide a RESTful interface between MediaConvert and a TIC server that you deploy in your AWS account. For more information on deploying a TIC server in your AWS account and the required API Gateway, contact Nielsen support.
pub fn set_tic_server_url(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.tic_server_url = input;
self
}
/// To create assets that have the same TIC values in each audio track, keep the default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have unique TIC values for each audio track, choose Use unique TICs (RESERVE_UNIQUE_TICS_PER_TRACK).
pub fn unique_tic_per_audio_track(
mut self,
input: crate::model::NielsenUniqueTicPerAudioTrackType,
) -> Self {
self.unique_tic_per_audio_track = Some(input);
self
}
/// To create assets that have the same TIC values in each audio track, keep the default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have unique TIC values for each audio track, choose Use unique TICs (RESERVE_UNIQUE_TICS_PER_TRACK).
pub fn set_unique_tic_per_audio_track(
mut self,
input: std::option::Option<crate::model::NielsenUniqueTicPerAudioTrackType>,
) -> Self {
self.unique_tic_per_audio_track = input;
self
}
/// Consumes the builder and constructs a [`NielsenNonLinearWatermarkSettings`](crate::model::NielsenNonLinearWatermarkSettings)
pub fn build(self) -> crate::model::NielsenNonLinearWatermarkSettings {
crate::model::NielsenNonLinearWatermarkSettings {
active_watermark_process: self.active_watermark_process,
adi_filename: self.adi_filename,
asset_id: self.asset_id,
asset_name: self.asset_name,
cbet_source_id: self.cbet_source_id,
episode_id: self.episode_id,
metadata_destination: self.metadata_destination,
source_id: self.source_id.unwrap_or_default(),
source_watermark_status: self.source_watermark_status,
tic_server_url: self.tic_server_url,
unique_tic_per_audio_track: self.unique_tic_per_audio_track,
}
}
}
}
impl NielsenNonLinearWatermarkSettings {
/// Creates a new builder-style object to manufacture [`NielsenNonLinearWatermarkSettings`](crate::model::NielsenNonLinearWatermarkSettings)
pub fn builder() -> crate::model::nielsen_non_linear_watermark_settings::Builder {
crate::model::nielsen_non_linear_watermark_settings::Builder::default()
}
}
/// To create assets that have the same TIC values in each audio track, keep the default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have unique TIC values for each audio track, choose Use unique TICs (RESERVE_UNIQUE_TICS_PER_TRACK).
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NielsenUniqueTicPerAudioTrackType {
#[allow(missing_docs)] // documentation missing in model
ReserveUniqueTicsPerTrack,
#[allow(missing_docs)] // documentation missing in model
SameTicsPerTrack,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NielsenUniqueTicPerAudioTrackType {
fn from(s: &str) -> Self {
match s {
"RESERVE_UNIQUE_TICS_PER_TRACK" => {
NielsenUniqueTicPerAudioTrackType::ReserveUniqueTicsPerTrack
}
"SAME_TICS_PER_TRACK" => NielsenUniqueTicPerAudioTrackType::SameTicsPerTrack,
other => NielsenUniqueTicPerAudioTrackType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NielsenUniqueTicPerAudioTrackType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NielsenUniqueTicPerAudioTrackType::from(s))
}
}
impl NielsenUniqueTicPerAudioTrackType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NielsenUniqueTicPerAudioTrackType::ReserveUniqueTicsPerTrack => {
"RESERVE_UNIQUE_TICS_PER_TRACK"
}
NielsenUniqueTicPerAudioTrackType::SameTicsPerTrack => "SAME_TICS_PER_TRACK",
NielsenUniqueTicPerAudioTrackType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["RESERVE_UNIQUE_TICS_PER_TRACK", "SAME_TICS_PER_TRACK"]
}
}
impl AsRef<str> for NielsenUniqueTicPerAudioTrackType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Required. Specify whether your source content already contains Nielsen non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the service fails the job. Nielsen requires that you add non-linear watermarking to only clean content that doesn't already have non-linear Nielsen watermarks.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NielsenSourceWatermarkStatusType {
#[allow(missing_docs)] // documentation missing in model
Clean,
#[allow(missing_docs)] // documentation missing in model
Watermarked,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NielsenSourceWatermarkStatusType {
fn from(s: &str) -> Self {
match s {
"CLEAN" => NielsenSourceWatermarkStatusType::Clean,
"WATERMARKED" => NielsenSourceWatermarkStatusType::Watermarked,
other => NielsenSourceWatermarkStatusType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NielsenSourceWatermarkStatusType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NielsenSourceWatermarkStatusType::from(s))
}
}
impl NielsenSourceWatermarkStatusType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NielsenSourceWatermarkStatusType::Clean => "CLEAN",
NielsenSourceWatermarkStatusType::Watermarked => "WATERMARKED",
NielsenSourceWatermarkStatusType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CLEAN", "WATERMARKED"]
}
}
impl AsRef<str> for NielsenSourceWatermarkStatusType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Choose the type of Nielsen watermarks that you want in your outputs. When you choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting SID (sourceId). When you choose CBET (CBET), you must provide a value for the setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NielsenActiveWatermarkProcessType {
#[allow(missing_docs)] // documentation missing in model
Cbet,
#[allow(missing_docs)] // documentation missing in model
Naes2AndNw,
#[allow(missing_docs)] // documentation missing in model
Naes2AndNwAndCbet,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NielsenActiveWatermarkProcessType {
fn from(s: &str) -> Self {
match s {
"CBET" => NielsenActiveWatermarkProcessType::Cbet,
"NAES2_AND_NW" => NielsenActiveWatermarkProcessType::Naes2AndNw,
"NAES2_AND_NW_AND_CBET" => NielsenActiveWatermarkProcessType::Naes2AndNwAndCbet,
other => NielsenActiveWatermarkProcessType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NielsenActiveWatermarkProcessType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NielsenActiveWatermarkProcessType::from(s))
}
}
impl NielsenActiveWatermarkProcessType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NielsenActiveWatermarkProcessType::Cbet => "CBET",
NielsenActiveWatermarkProcessType::Naes2AndNw => "NAES2_AND_NW",
NielsenActiveWatermarkProcessType::Naes2AndNwAndCbet => "NAES2_AND_NW_AND_CBET",
NielsenActiveWatermarkProcessType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CBET", "NAES2_AND_NW", "NAES2_AND_NW_AND_CBET"]
}
}
impl AsRef<str> for NielsenActiveWatermarkProcessType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NielsenConfiguration {
/// Nielsen has discontinued the use of breakout code functionality. If you must include this property, set the value to zero.
pub breakout_code: i32,
/// Use Distributor ID (DistributorID) to specify the distributor ID that is assigned to your organization by Neilsen.
pub distributor_id: std::option::Option<std::string::String>,
}
impl NielsenConfiguration {
/// Nielsen has discontinued the use of breakout code functionality. If you must include this property, set the value to zero.
pub fn breakout_code(&self) -> i32 {
self.breakout_code
}
/// Use Distributor ID (DistributorID) to specify the distributor ID that is assigned to your organization by Neilsen.
pub fn distributor_id(&self) -> std::option::Option<&str> {
self.distributor_id.as_deref()
}
}
impl std::fmt::Debug for NielsenConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NielsenConfiguration");
formatter.field("breakout_code", &self.breakout_code);
formatter.field("distributor_id", &self.distributor_id);
formatter.finish()
}
}
/// See [`NielsenConfiguration`](crate::model::NielsenConfiguration)
pub mod nielsen_configuration {
/// A builder for [`NielsenConfiguration`](crate::model::NielsenConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) breakout_code: std::option::Option<i32>,
pub(crate) distributor_id: std::option::Option<std::string::String>,
}
impl Builder {
/// Nielsen has discontinued the use of breakout code functionality. If you must include this property, set the value to zero.
pub fn breakout_code(mut self, input: i32) -> Self {
self.breakout_code = Some(input);
self
}
/// Nielsen has discontinued the use of breakout code functionality. If you must include this property, set the value to zero.
pub fn set_breakout_code(mut self, input: std::option::Option<i32>) -> Self {
self.breakout_code = input;
self
}
/// Use Distributor ID (DistributorID) to specify the distributor ID that is assigned to your organization by Neilsen.
pub fn distributor_id(mut self, input: impl Into<std::string::String>) -> Self {
self.distributor_id = Some(input.into());
self
}
/// Use Distributor ID (DistributorID) to specify the distributor ID that is assigned to your organization by Neilsen.
pub fn set_distributor_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distributor_id = input;
self
}
/// Consumes the builder and constructs a [`NielsenConfiguration`](crate::model::NielsenConfiguration)
pub fn build(self) -> crate::model::NielsenConfiguration {
crate::model::NielsenConfiguration {
breakout_code: self.breakout_code.unwrap_or_default(),
distributor_id: self.distributor_id,
}
}
}
}
impl NielsenConfiguration {
/// Creates a new builder-style object to manufacture [`NielsenConfiguration`](crate::model::NielsenConfiguration)
pub fn builder() -> crate::model::nielsen_configuration::Builder {
crate::model::nielsen_configuration::Builder::default()
}
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MotionImageInserter {
/// If your motion graphic asset is a .mov file, keep this setting unspecified. If your motion graphic asset is a series of .png files, specify the frame rate of the overlay in frames per second, as a fraction. For example, specify 24 fps as 24/1. Make sure that the number of images in your series matches the frame rate and your intended overlay duration. For example, if you want a 30-second overlay at 30 fps, you should have 900 .png images. This overlay frame rate doesn't need to match the frame rate of the underlying video.
pub framerate: std::option::Option<crate::model::MotionImageInsertionFramerate>,
/// Specify the .mov file or series of .png files that you want to overlay on your video. For .png files, provide the file name of the first file in the series. Make sure that the names of the .png files end with sequential numbers that specify the order that they are played in. For example, overlay_000.png, overlay_001.png, overlay_002.png, and so on. The sequence must start at zero, and each image file name must have the same number of digits. Pad your initial file names with enough zeros to complete the sequence. For example, if the first image is overlay_0.png, there can be only 10 images in the sequence, with the last image being overlay_9.png. But if the first image is overlay_00.png, there can be 100 images in the sequence.
pub input: std::option::Option<std::string::String>,
/// Choose the type of motion graphic asset that you are providing for your overlay. You can choose either a .mov file or a series of .png files.
pub insertion_mode: std::option::Option<crate::model::MotionImageInsertionMode>,
/// Use Offset to specify the placement of your motion graphic overlay on the video frame. Specify in pixels, from the upper-left corner of the frame. If you don't specify an offset, the service scales your overlay to the full size of the frame. Otherwise, the service inserts the overlay at its native resolution and scales the size up or down with any video scaling.
pub offset: std::option::Option<crate::model::MotionImageInsertionOffset>,
/// Specify whether your motion graphic overlay repeats on a loop or plays only once.
pub playback: std::option::Option<crate::model::MotionImagePlayback>,
/// Specify when the motion overlay begins. Use timecode format (HH:MM:SS:FF or HH:MM:SS;FF). Make sure that the timecode you provide here takes into account how you have set up your timecode configuration under both job settings and input settings. The simplest way to do that is to set both to start at 0. If you need to set up your job to follow timecodes embedded in your source that don't start at zero, make sure that you specify a start time that is after the first embedded timecode. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-timecode.html Find job-wide and input timecode configuration settings in your JSON job settings specification at settings>timecodeConfig>source and settings>inputs>timecodeSource.
pub start_time: std::option::Option<std::string::String>,
}
impl MotionImageInserter {
/// If your motion graphic asset is a .mov file, keep this setting unspecified. If your motion graphic asset is a series of .png files, specify the frame rate of the overlay in frames per second, as a fraction. For example, specify 24 fps as 24/1. Make sure that the number of images in your series matches the frame rate and your intended overlay duration. For example, if you want a 30-second overlay at 30 fps, you should have 900 .png images. This overlay frame rate doesn't need to match the frame rate of the underlying video.
pub fn framerate(&self) -> std::option::Option<&crate::model::MotionImageInsertionFramerate> {
self.framerate.as_ref()
}
/// Specify the .mov file or series of .png files that you want to overlay on your video. For .png files, provide the file name of the first file in the series. Make sure that the names of the .png files end with sequential numbers that specify the order that they are played in. For example, overlay_000.png, overlay_001.png, overlay_002.png, and so on. The sequence must start at zero, and each image file name must have the same number of digits. Pad your initial file names with enough zeros to complete the sequence. For example, if the first image is overlay_0.png, there can be only 10 images in the sequence, with the last image being overlay_9.png. But if the first image is overlay_00.png, there can be 100 images in the sequence.
pub fn input(&self) -> std::option::Option<&str> {
self.input.as_deref()
}
/// Choose the type of motion graphic asset that you are providing for your overlay. You can choose either a .mov file or a series of .png files.
pub fn insertion_mode(&self) -> std::option::Option<&crate::model::MotionImageInsertionMode> {
self.insertion_mode.as_ref()
}
/// Use Offset to specify the placement of your motion graphic overlay on the video frame. Specify in pixels, from the upper-left corner of the frame. If you don't specify an offset, the service scales your overlay to the full size of the frame. Otherwise, the service inserts the overlay at its native resolution and scales the size up or down with any video scaling.
pub fn offset(&self) -> std::option::Option<&crate::model::MotionImageInsertionOffset> {
self.offset.as_ref()
}
/// Specify whether your motion graphic overlay repeats on a loop or plays only once.
pub fn playback(&self) -> std::option::Option<&crate::model::MotionImagePlayback> {
self.playback.as_ref()
}
/// Specify when the motion overlay begins. Use timecode format (HH:MM:SS:FF or HH:MM:SS;FF). Make sure that the timecode you provide here takes into account how you have set up your timecode configuration under both job settings and input settings. The simplest way to do that is to set both to start at 0. If you need to set up your job to follow timecodes embedded in your source that don't start at zero, make sure that you specify a start time that is after the first embedded timecode. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-timecode.html Find job-wide and input timecode configuration settings in your JSON job settings specification at settings>timecodeConfig>source and settings>inputs>timecodeSource.
pub fn start_time(&self) -> std::option::Option<&str> {
self.start_time.as_deref()
}
}
impl std::fmt::Debug for MotionImageInserter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MotionImageInserter");
formatter.field("framerate", &self.framerate);
formatter.field("input", &self.input);
formatter.field("insertion_mode", &self.insertion_mode);
formatter.field("offset", &self.offset);
formatter.field("playback", &self.playback);
formatter.field("start_time", &self.start_time);
formatter.finish()
}
}
/// See [`MotionImageInserter`](crate::model::MotionImageInserter)
pub mod motion_image_inserter {
/// A builder for [`MotionImageInserter`](crate::model::MotionImageInserter)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framerate: std::option::Option<crate::model::MotionImageInsertionFramerate>,
pub(crate) input: std::option::Option<std::string::String>,
pub(crate) insertion_mode: std::option::Option<crate::model::MotionImageInsertionMode>,
pub(crate) offset: std::option::Option<crate::model::MotionImageInsertionOffset>,
pub(crate) playback: std::option::Option<crate::model::MotionImagePlayback>,
pub(crate) start_time: std::option::Option<std::string::String>,
}
impl Builder {
/// If your motion graphic asset is a .mov file, keep this setting unspecified. If your motion graphic asset is a series of .png files, specify the frame rate of the overlay in frames per second, as a fraction. For example, specify 24 fps as 24/1. Make sure that the number of images in your series matches the frame rate and your intended overlay duration. For example, if you want a 30-second overlay at 30 fps, you should have 900 .png images. This overlay frame rate doesn't need to match the frame rate of the underlying video.
pub fn framerate(mut self, input: crate::model::MotionImageInsertionFramerate) -> Self {
self.framerate = Some(input);
self
}
/// If your motion graphic asset is a .mov file, keep this setting unspecified. If your motion graphic asset is a series of .png files, specify the frame rate of the overlay in frames per second, as a fraction. For example, specify 24 fps as 24/1. Make sure that the number of images in your series matches the frame rate and your intended overlay duration. For example, if you want a 30-second overlay at 30 fps, you should have 900 .png images. This overlay frame rate doesn't need to match the frame rate of the underlying video.
pub fn set_framerate(
mut self,
input: std::option::Option<crate::model::MotionImageInsertionFramerate>,
) -> Self {
self.framerate = input;
self
}
/// Specify the .mov file or series of .png files that you want to overlay on your video. For .png files, provide the file name of the first file in the series. Make sure that the names of the .png files end with sequential numbers that specify the order that they are played in. For example, overlay_000.png, overlay_001.png, overlay_002.png, and so on. The sequence must start at zero, and each image file name must have the same number of digits. Pad your initial file names with enough zeros to complete the sequence. For example, if the first image is overlay_0.png, there can be only 10 images in the sequence, with the last image being overlay_9.png. But if the first image is overlay_00.png, there can be 100 images in the sequence.
pub fn input(mut self, input: impl Into<std::string::String>) -> Self {
self.input = Some(input.into());
self
}
/// Specify the .mov file or series of .png files that you want to overlay on your video. For .png files, provide the file name of the first file in the series. Make sure that the names of the .png files end with sequential numbers that specify the order that they are played in. For example, overlay_000.png, overlay_001.png, overlay_002.png, and so on. The sequence must start at zero, and each image file name must have the same number of digits. Pad your initial file names with enough zeros to complete the sequence. For example, if the first image is overlay_0.png, there can be only 10 images in the sequence, with the last image being overlay_9.png. But if the first image is overlay_00.png, there can be 100 images in the sequence.
pub fn set_input(mut self, input: std::option::Option<std::string::String>) -> Self {
self.input = input;
self
}
/// Choose the type of motion graphic asset that you are providing for your overlay. You can choose either a .mov file or a series of .png files.
pub fn insertion_mode(mut self, input: crate::model::MotionImageInsertionMode) -> Self {
self.insertion_mode = Some(input);
self
}
/// Choose the type of motion graphic asset that you are providing for your overlay. You can choose either a .mov file or a series of .png files.
pub fn set_insertion_mode(
mut self,
input: std::option::Option<crate::model::MotionImageInsertionMode>,
) -> Self {
self.insertion_mode = input;
self
}
/// Use Offset to specify the placement of your motion graphic overlay on the video frame. Specify in pixels, from the upper-left corner of the frame. If you don't specify an offset, the service scales your overlay to the full size of the frame. Otherwise, the service inserts the overlay at its native resolution and scales the size up or down with any video scaling.
pub fn offset(mut self, input: crate::model::MotionImageInsertionOffset) -> Self {
self.offset = Some(input);
self
}
/// Use Offset to specify the placement of your motion graphic overlay on the video frame. Specify in pixels, from the upper-left corner of the frame. If you don't specify an offset, the service scales your overlay to the full size of the frame. Otherwise, the service inserts the overlay at its native resolution and scales the size up or down with any video scaling.
pub fn set_offset(
mut self,
input: std::option::Option<crate::model::MotionImageInsertionOffset>,
) -> Self {
self.offset = input;
self
}
/// Specify whether your motion graphic overlay repeats on a loop or plays only once.
pub fn playback(mut self, input: crate::model::MotionImagePlayback) -> Self {
self.playback = Some(input);
self
}
/// Specify whether your motion graphic overlay repeats on a loop or plays only once.
pub fn set_playback(
mut self,
input: std::option::Option<crate::model::MotionImagePlayback>,
) -> Self {
self.playback = input;
self
}
/// Specify when the motion overlay begins. Use timecode format (HH:MM:SS:FF or HH:MM:SS;FF). Make sure that the timecode you provide here takes into account how you have set up your timecode configuration under both job settings and input settings. The simplest way to do that is to set both to start at 0. If you need to set up your job to follow timecodes embedded in your source that don't start at zero, make sure that you specify a start time that is after the first embedded timecode. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-timecode.html Find job-wide and input timecode configuration settings in your JSON job settings specification at settings>timecodeConfig>source and settings>inputs>timecodeSource.
pub fn start_time(mut self, input: impl Into<std::string::String>) -> Self {
self.start_time = Some(input.into());
self
}
/// Specify when the motion overlay begins. Use timecode format (HH:MM:SS:FF or HH:MM:SS;FF). Make sure that the timecode you provide here takes into account how you have set up your timecode configuration under both job settings and input settings. The simplest way to do that is to set both to start at 0. If you need to set up your job to follow timecodes embedded in your source that don't start at zero, make sure that you specify a start time that is after the first embedded timecode. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-timecode.html Find job-wide and input timecode configuration settings in your JSON job settings specification at settings>timecodeConfig>source and settings>inputs>timecodeSource.
pub fn set_start_time(mut self, input: std::option::Option<std::string::String>) -> Self {
self.start_time = input;
self
}
/// Consumes the builder and constructs a [`MotionImageInserter`](crate::model::MotionImageInserter)
pub fn build(self) -> crate::model::MotionImageInserter {
crate::model::MotionImageInserter {
framerate: self.framerate,
input: self.input,
insertion_mode: self.insertion_mode,
offset: self.offset,
playback: self.playback,
start_time: self.start_time,
}
}
}
}
impl MotionImageInserter {
/// Creates a new builder-style object to manufacture [`MotionImageInserter`](crate::model::MotionImageInserter)
pub fn builder() -> crate::model::motion_image_inserter::Builder {
crate::model::motion_image_inserter::Builder::default()
}
}
/// Specify whether your motion graphic overlay repeats on a loop or plays only once.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MotionImagePlayback {
#[allow(missing_docs)] // documentation missing in model
Once,
#[allow(missing_docs)] // documentation missing in model
Repeat,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MotionImagePlayback {
fn from(s: &str) -> Self {
match s {
"ONCE" => MotionImagePlayback::Once,
"REPEAT" => MotionImagePlayback::Repeat,
other => MotionImagePlayback::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MotionImagePlayback {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MotionImagePlayback::from(s))
}
}
impl MotionImagePlayback {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MotionImagePlayback::Once => "ONCE",
MotionImagePlayback::Repeat => "REPEAT",
MotionImagePlayback::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ONCE", "REPEAT"]
}
}
impl AsRef<str> for MotionImagePlayback {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify the offset between the upper-left corner of the video frame and the top left corner of the overlay.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MotionImageInsertionOffset {
/// Set the distance, in pixels, between the overlay and the left edge of the video frame.
pub image_x: i32,
/// Set the distance, in pixels, between the overlay and the top edge of the video frame.
pub image_y: i32,
}
impl MotionImageInsertionOffset {
/// Set the distance, in pixels, between the overlay and the left edge of the video frame.
pub fn image_x(&self) -> i32 {
self.image_x
}
/// Set the distance, in pixels, between the overlay and the top edge of the video frame.
pub fn image_y(&self) -> i32 {
self.image_y
}
}
impl std::fmt::Debug for MotionImageInsertionOffset {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MotionImageInsertionOffset");
formatter.field("image_x", &self.image_x);
formatter.field("image_y", &self.image_y);
formatter.finish()
}
}
/// See [`MotionImageInsertionOffset`](crate::model::MotionImageInsertionOffset)
pub mod motion_image_insertion_offset {
/// A builder for [`MotionImageInsertionOffset`](crate::model::MotionImageInsertionOffset)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_x: std::option::Option<i32>,
pub(crate) image_y: std::option::Option<i32>,
}
impl Builder {
/// Set the distance, in pixels, between the overlay and the left edge of the video frame.
pub fn image_x(mut self, input: i32) -> Self {
self.image_x = Some(input);
self
}
/// Set the distance, in pixels, between the overlay and the left edge of the video frame.
pub fn set_image_x(mut self, input: std::option::Option<i32>) -> Self {
self.image_x = input;
self
}
/// Set the distance, in pixels, between the overlay and the top edge of the video frame.
pub fn image_y(mut self, input: i32) -> Self {
self.image_y = Some(input);
self
}
/// Set the distance, in pixels, between the overlay and the top edge of the video frame.
pub fn set_image_y(mut self, input: std::option::Option<i32>) -> Self {
self.image_y = input;
self
}
/// Consumes the builder and constructs a [`MotionImageInsertionOffset`](crate::model::MotionImageInsertionOffset)
pub fn build(self) -> crate::model::MotionImageInsertionOffset {
crate::model::MotionImageInsertionOffset {
image_x: self.image_x.unwrap_or_default(),
image_y: self.image_y.unwrap_or_default(),
}
}
}
}
impl MotionImageInsertionOffset {
/// Creates a new builder-style object to manufacture [`MotionImageInsertionOffset`](crate::model::MotionImageInsertionOffset)
pub fn builder() -> crate::model::motion_image_insertion_offset::Builder {
crate::model::motion_image_insertion_offset::Builder::default()
}
}
/// Choose the type of motion graphic asset that you are providing for your overlay. You can choose either a .mov file or a series of .png files.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MotionImageInsertionMode {
#[allow(missing_docs)] // documentation missing in model
Mov,
#[allow(missing_docs)] // documentation missing in model
Png,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for MotionImageInsertionMode {
fn from(s: &str) -> Self {
match s {
"MOV" => MotionImageInsertionMode::Mov,
"PNG" => MotionImageInsertionMode::Png,
other => MotionImageInsertionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for MotionImageInsertionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MotionImageInsertionMode::from(s))
}
}
impl MotionImageInsertionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
MotionImageInsertionMode::Mov => "MOV",
MotionImageInsertionMode::Png => "PNG",
MotionImageInsertionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MOV", "PNG"]
}
}
impl AsRef<str> for MotionImageInsertionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// For motion overlays that don't have a built-in frame rate, specify the frame rate of the overlay in frames per second, as a fraction. For example, specify 24 fps as 24/1. The overlay frame rate doesn't need to match the frame rate of the underlying video.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MotionImageInsertionFramerate {
/// The bottom of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 1.
pub framerate_denominator: i32,
/// The top of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 24.
pub framerate_numerator: i32,
}
impl MotionImageInsertionFramerate {
/// The bottom of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 1.
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// The top of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 24.
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
}
impl std::fmt::Debug for MotionImageInsertionFramerate {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MotionImageInsertionFramerate");
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.finish()
}
}
/// See [`MotionImageInsertionFramerate`](crate::model::MotionImageInsertionFramerate)
pub mod motion_image_insertion_framerate {
/// A builder for [`MotionImageInsertionFramerate`](crate::model::MotionImageInsertionFramerate)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
}
impl Builder {
/// The bottom of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 1.
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// The bottom of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 1.
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// The top of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 24.
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// The top of the fraction that expresses your overlay frame rate. For example, if your frame rate is 24 fps, set this value to 24.
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Consumes the builder and constructs a [`MotionImageInsertionFramerate`](crate::model::MotionImageInsertionFramerate)
pub fn build(self) -> crate::model::MotionImageInsertionFramerate {
crate::model::MotionImageInsertionFramerate {
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
}
}
}
}
impl MotionImageInsertionFramerate {
/// Creates a new builder-style object to manufacture [`MotionImageInsertionFramerate`](crate::model::MotionImageInsertionFramerate)
pub fn builder() -> crate::model::motion_image_insertion_framerate::Builder {
crate::model::motion_image_insertion_framerate::Builder::default()
}
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct KantarWatermarkSettings {
/// Provide an audio channel name from your Kantar audio license.
pub channel_name: std::option::Option<std::string::String>,
/// Specify a unique identifier for Kantar to use for this piece of content.
pub content_reference: std::option::Option<std::string::String>,
/// Provide the name of the AWS Secrets Manager secret where your Kantar credentials are stored. Note that your MediaConvert service role must provide access to this secret. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/granting-permissions-for-mediaconvert-to-access-secrets-manager-secret.html. For instructions on creating a secret, see https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html, in the AWS Secrets Manager User Guide.
pub credentials_secret_name: std::option::Option<std::string::String>,
/// Optional. Specify an offset, in whole seconds, from the start of your output and the beginning of the watermarking. When you don't specify an offset, Kantar defaults to zero.
pub file_offset: f64,
/// Provide your Kantar license ID number. You should get this number from Kantar.
pub kantar_license_id: i32,
/// Provide the HTTPS endpoint to the Kantar server. You should get this endpoint from Kantar.
pub kantar_server_url: std::option::Option<std::string::String>,
/// Optional. Specify the Amazon S3 bucket where you want MediaConvert to store your Kantar watermark XML logs. When you don't specify a bucket, MediaConvert doesn't save these logs. Note that your MediaConvert service role must provide access to this location. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub log_destination: std::option::Option<std::string::String>,
/// You can optionally use this field to specify the first timestamp that Kantar embeds during watermarking. Kantar suggests that you be very cautious when using this Kantar feature, and that you use it only on channels that are managed specifically for use with this feature by your Audience Measurement Operator. For more information about this feature, contact Kantar technical support.
pub metadata3: std::option::Option<std::string::String>,
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub metadata4: std::option::Option<std::string::String>,
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub metadata5: std::option::Option<std::string::String>,
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub metadata6: std::option::Option<std::string::String>,
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub metadata7: std::option::Option<std::string::String>,
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub metadata8: std::option::Option<std::string::String>,
}
impl KantarWatermarkSettings {
/// Provide an audio channel name from your Kantar audio license.
pub fn channel_name(&self) -> std::option::Option<&str> {
self.channel_name.as_deref()
}
/// Specify a unique identifier for Kantar to use for this piece of content.
pub fn content_reference(&self) -> std::option::Option<&str> {
self.content_reference.as_deref()
}
/// Provide the name of the AWS Secrets Manager secret where your Kantar credentials are stored. Note that your MediaConvert service role must provide access to this secret. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/granting-permissions-for-mediaconvert-to-access-secrets-manager-secret.html. For instructions on creating a secret, see https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html, in the AWS Secrets Manager User Guide.
pub fn credentials_secret_name(&self) -> std::option::Option<&str> {
self.credentials_secret_name.as_deref()
}
/// Optional. Specify an offset, in whole seconds, from the start of your output and the beginning of the watermarking. When you don't specify an offset, Kantar defaults to zero.
pub fn file_offset(&self) -> f64 {
self.file_offset
}
/// Provide your Kantar license ID number. You should get this number from Kantar.
pub fn kantar_license_id(&self) -> i32 {
self.kantar_license_id
}
/// Provide the HTTPS endpoint to the Kantar server. You should get this endpoint from Kantar.
pub fn kantar_server_url(&self) -> std::option::Option<&str> {
self.kantar_server_url.as_deref()
}
/// Optional. Specify the Amazon S3 bucket where you want MediaConvert to store your Kantar watermark XML logs. When you don't specify a bucket, MediaConvert doesn't save these logs. Note that your MediaConvert service role must provide access to this location. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub fn log_destination(&self) -> std::option::Option<&str> {
self.log_destination.as_deref()
}
/// You can optionally use this field to specify the first timestamp that Kantar embeds during watermarking. Kantar suggests that you be very cautious when using this Kantar feature, and that you use it only on channels that are managed specifically for use with this feature by your Audience Measurement Operator. For more information about this feature, contact Kantar technical support.
pub fn metadata3(&self) -> std::option::Option<&str> {
self.metadata3.as_deref()
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata4(&self) -> std::option::Option<&str> {
self.metadata4.as_deref()
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata5(&self) -> std::option::Option<&str> {
self.metadata5.as_deref()
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata6(&self) -> std::option::Option<&str> {
self.metadata6.as_deref()
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata7(&self) -> std::option::Option<&str> {
self.metadata7.as_deref()
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata8(&self) -> std::option::Option<&str> {
self.metadata8.as_deref()
}
}
impl std::fmt::Debug for KantarWatermarkSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("KantarWatermarkSettings");
formatter.field("channel_name", &self.channel_name);
formatter.field("content_reference", &self.content_reference);
formatter.field("credentials_secret_name", &self.credentials_secret_name);
formatter.field("file_offset", &self.file_offset);
formatter.field("kantar_license_id", &self.kantar_license_id);
formatter.field("kantar_server_url", &self.kantar_server_url);
formatter.field("log_destination", &self.log_destination);
formatter.field("metadata3", &self.metadata3);
formatter.field("metadata4", &self.metadata4);
formatter.field("metadata5", &self.metadata5);
formatter.field("metadata6", &self.metadata6);
formatter.field("metadata7", &self.metadata7);
formatter.field("metadata8", &self.metadata8);
formatter.finish()
}
}
/// See [`KantarWatermarkSettings`](crate::model::KantarWatermarkSettings)
pub mod kantar_watermark_settings {
/// A builder for [`KantarWatermarkSettings`](crate::model::KantarWatermarkSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) channel_name: std::option::Option<std::string::String>,
pub(crate) content_reference: std::option::Option<std::string::String>,
pub(crate) credentials_secret_name: std::option::Option<std::string::String>,
pub(crate) file_offset: std::option::Option<f64>,
pub(crate) kantar_license_id: std::option::Option<i32>,
pub(crate) kantar_server_url: std::option::Option<std::string::String>,
pub(crate) log_destination: std::option::Option<std::string::String>,
pub(crate) metadata3: std::option::Option<std::string::String>,
pub(crate) metadata4: std::option::Option<std::string::String>,
pub(crate) metadata5: std::option::Option<std::string::String>,
pub(crate) metadata6: std::option::Option<std::string::String>,
pub(crate) metadata7: std::option::Option<std::string::String>,
pub(crate) metadata8: std::option::Option<std::string::String>,
}
impl Builder {
/// Provide an audio channel name from your Kantar audio license.
pub fn channel_name(mut self, input: impl Into<std::string::String>) -> Self {
self.channel_name = Some(input.into());
self
}
/// Provide an audio channel name from your Kantar audio license.
pub fn set_channel_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.channel_name = input;
self
}
/// Specify a unique identifier for Kantar to use for this piece of content.
pub fn content_reference(mut self, input: impl Into<std::string::String>) -> Self {
self.content_reference = Some(input.into());
self
}
/// Specify a unique identifier for Kantar to use for this piece of content.
pub fn set_content_reference(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.content_reference = input;
self
}
/// Provide the name of the AWS Secrets Manager secret where your Kantar credentials are stored. Note that your MediaConvert service role must provide access to this secret. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/granting-permissions-for-mediaconvert-to-access-secrets-manager-secret.html. For instructions on creating a secret, see https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html, in the AWS Secrets Manager User Guide.
pub fn credentials_secret_name(mut self, input: impl Into<std::string::String>) -> Self {
self.credentials_secret_name = Some(input.into());
self
}
/// Provide the name of the AWS Secrets Manager secret where your Kantar credentials are stored. Note that your MediaConvert service role must provide access to this secret. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/granting-permissions-for-mediaconvert-to-access-secrets-manager-secret.html. For instructions on creating a secret, see https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html, in the AWS Secrets Manager User Guide.
pub fn set_credentials_secret_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.credentials_secret_name = input;
self
}
/// Optional. Specify an offset, in whole seconds, from the start of your output and the beginning of the watermarking. When you don't specify an offset, Kantar defaults to zero.
pub fn file_offset(mut self, input: f64) -> Self {
self.file_offset = Some(input);
self
}
/// Optional. Specify an offset, in whole seconds, from the start of your output and the beginning of the watermarking. When you don't specify an offset, Kantar defaults to zero.
pub fn set_file_offset(mut self, input: std::option::Option<f64>) -> Self {
self.file_offset = input;
self
}
/// Provide your Kantar license ID number. You should get this number from Kantar.
pub fn kantar_license_id(mut self, input: i32) -> Self {
self.kantar_license_id = Some(input);
self
}
/// Provide your Kantar license ID number. You should get this number from Kantar.
pub fn set_kantar_license_id(mut self, input: std::option::Option<i32>) -> Self {
self.kantar_license_id = input;
self
}
/// Provide the HTTPS endpoint to the Kantar server. You should get this endpoint from Kantar.
pub fn kantar_server_url(mut self, input: impl Into<std::string::String>) -> Self {
self.kantar_server_url = Some(input.into());
self
}
/// Provide the HTTPS endpoint to the Kantar server. You should get this endpoint from Kantar.
pub fn set_kantar_server_url(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.kantar_server_url = input;
self
}
/// Optional. Specify the Amazon S3 bucket where you want MediaConvert to store your Kantar watermark XML logs. When you don't specify a bucket, MediaConvert doesn't save these logs. Note that your MediaConvert service role must provide access to this location. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub fn log_destination(mut self, input: impl Into<std::string::String>) -> Self {
self.log_destination = Some(input.into());
self
}
/// Optional. Specify the Amazon S3 bucket where you want MediaConvert to store your Kantar watermark XML logs. When you don't specify a bucket, MediaConvert doesn't save these logs. Note that your MediaConvert service role must provide access to this location. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub fn set_log_destination(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.log_destination = input;
self
}
/// You can optionally use this field to specify the first timestamp that Kantar embeds during watermarking. Kantar suggests that you be very cautious when using this Kantar feature, and that you use it only on channels that are managed specifically for use with this feature by your Audience Measurement Operator. For more information about this feature, contact Kantar technical support.
pub fn metadata3(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata3 = Some(input.into());
self
}
/// You can optionally use this field to specify the first timestamp that Kantar embeds during watermarking. Kantar suggests that you be very cautious when using this Kantar feature, and that you use it only on channels that are managed specifically for use with this feature by your Audience Measurement Operator. For more information about this feature, contact Kantar technical support.
pub fn set_metadata3(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metadata3 = input;
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata4(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata4 = Some(input.into());
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn set_metadata4(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metadata4 = input;
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata5(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata5 = Some(input.into());
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn set_metadata5(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metadata5 = input;
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata6(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata6 = Some(input.into());
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn set_metadata6(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metadata6 = input;
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata7(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata7 = Some(input.into());
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn set_metadata7(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metadata7 = input;
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn metadata8(mut self, input: impl Into<std::string::String>) -> Self {
self.metadata8 = Some(input.into());
self
}
/// Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.
pub fn set_metadata8(mut self, input: std::option::Option<std::string::String>) -> Self {
self.metadata8 = input;
self
}
/// Consumes the builder and constructs a [`KantarWatermarkSettings`](crate::model::KantarWatermarkSettings)
pub fn build(self) -> crate::model::KantarWatermarkSettings {
crate::model::KantarWatermarkSettings {
channel_name: self.channel_name,
content_reference: self.content_reference,
credentials_secret_name: self.credentials_secret_name,
file_offset: self.file_offset.unwrap_or_default(),
kantar_license_id: self.kantar_license_id.unwrap_or_default(),
kantar_server_url: self.kantar_server_url,
log_destination: self.log_destination,
metadata3: self.metadata3,
metadata4: self.metadata4,
metadata5: self.metadata5,
metadata6: self.metadata6,
metadata7: self.metadata7,
metadata8: self.metadata8,
}
}
}
}
impl KantarWatermarkSettings {
/// Creates a new builder-style object to manufacture [`KantarWatermarkSettings`](crate::model::KantarWatermarkSettings)
pub fn builder() -> crate::model::kantar_watermark_settings::Builder {
crate::model::kantar_watermark_settings::Builder::default()
}
}
/// Specified video input in a template.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InputTemplate {
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub audio_selector_groups: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
>,
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub audio_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
>,
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub caption_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
>,
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub crop: std::option::Option<crate::model::Rectangle>,
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub deblock_filter: std::option::Option<crate::model::InputDeblockFilter>,
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub denoise_filter: std::option::Option<crate::model::InputDenoiseFilter>,
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub dolby_vision_metadata_xml: std::option::Option<std::string::String>,
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub filter_enable: std::option::Option<crate::model::InputFilterEnable>,
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub filter_strength: i32,
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub image_inserter: std::option::Option<crate::model::ImageInserter>,
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub input_clippings: std::option::Option<std::vec::Vec<crate::model::InputClipping>>,
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub input_scan_type: std::option::Option<crate::model::InputScanType>,
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub position: std::option::Option<crate::model::Rectangle>,
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub program_number: i32,
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub psi_control: std::option::Option<crate::model::InputPsiControl>,
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub timecode_source: std::option::Option<crate::model::InputTimecodeSource>,
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub timecode_start: std::option::Option<std::string::String>,
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub video_selector: std::option::Option<crate::model::VideoSelector>,
}
impl InputTemplate {
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub fn audio_selector_groups(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
> {
self.audio_selector_groups.as_ref()
}
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub fn audio_selectors(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
> {
self.audio_selectors.as_ref()
}
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub fn caption_selectors(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
> {
self.caption_selectors.as_ref()
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub fn crop(&self) -> std::option::Option<&crate::model::Rectangle> {
self.crop.as_ref()
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub fn deblock_filter(&self) -> std::option::Option<&crate::model::InputDeblockFilter> {
self.deblock_filter.as_ref()
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub fn denoise_filter(&self) -> std::option::Option<&crate::model::InputDenoiseFilter> {
self.denoise_filter.as_ref()
}
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub fn dolby_vision_metadata_xml(&self) -> std::option::Option<&str> {
self.dolby_vision_metadata_xml.as_deref()
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub fn filter_enable(&self) -> std::option::Option<&crate::model::InputFilterEnable> {
self.filter_enable.as_ref()
}
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub fn filter_strength(&self) -> i32 {
self.filter_strength
}
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub fn image_inserter(&self) -> std::option::Option<&crate::model::ImageInserter> {
self.image_inserter.as_ref()
}
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub fn input_clippings(&self) -> std::option::Option<&[crate::model::InputClipping]> {
self.input_clippings.as_deref()
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub fn input_scan_type(&self) -> std::option::Option<&crate::model::InputScanType> {
self.input_scan_type.as_ref()
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub fn position(&self) -> std::option::Option<&crate::model::Rectangle> {
self.position.as_ref()
}
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub fn program_number(&self) -> i32 {
self.program_number
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub fn psi_control(&self) -> std::option::Option<&crate::model::InputPsiControl> {
self.psi_control.as_ref()
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_source(&self) -> std::option::Option<&crate::model::InputTimecodeSource> {
self.timecode_source.as_ref()
}
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_start(&self) -> std::option::Option<&str> {
self.timecode_start.as_deref()
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub fn video_selector(&self) -> std::option::Option<&crate::model::VideoSelector> {
self.video_selector.as_ref()
}
}
impl std::fmt::Debug for InputTemplate {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InputTemplate");
formatter.field("audio_selector_groups", &self.audio_selector_groups);
formatter.field("audio_selectors", &self.audio_selectors);
formatter.field("caption_selectors", &self.caption_selectors);
formatter.field("crop", &self.crop);
formatter.field("deblock_filter", &self.deblock_filter);
formatter.field("denoise_filter", &self.denoise_filter);
formatter.field("dolby_vision_metadata_xml", &self.dolby_vision_metadata_xml);
formatter.field("filter_enable", &self.filter_enable);
formatter.field("filter_strength", &self.filter_strength);
formatter.field("image_inserter", &self.image_inserter);
formatter.field("input_clippings", &self.input_clippings);
formatter.field("input_scan_type", &self.input_scan_type);
formatter.field("position", &self.position);
formatter.field("program_number", &self.program_number);
formatter.field("psi_control", &self.psi_control);
formatter.field("timecode_source", &self.timecode_source);
formatter.field("timecode_start", &self.timecode_start);
formatter.field("video_selector", &self.video_selector);
formatter.finish()
}
}
/// See [`InputTemplate`](crate::model::InputTemplate)
pub mod input_template {
/// A builder for [`InputTemplate`](crate::model::InputTemplate)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_selector_groups: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
>,
pub(crate) audio_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
>,
pub(crate) caption_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
>,
pub(crate) crop: std::option::Option<crate::model::Rectangle>,
pub(crate) deblock_filter: std::option::Option<crate::model::InputDeblockFilter>,
pub(crate) denoise_filter: std::option::Option<crate::model::InputDenoiseFilter>,
pub(crate) dolby_vision_metadata_xml: std::option::Option<std::string::String>,
pub(crate) filter_enable: std::option::Option<crate::model::InputFilterEnable>,
pub(crate) filter_strength: std::option::Option<i32>,
pub(crate) image_inserter: std::option::Option<crate::model::ImageInserter>,
pub(crate) input_clippings: std::option::Option<std::vec::Vec<crate::model::InputClipping>>,
pub(crate) input_scan_type: std::option::Option<crate::model::InputScanType>,
pub(crate) position: std::option::Option<crate::model::Rectangle>,
pub(crate) program_number: std::option::Option<i32>,
pub(crate) psi_control: std::option::Option<crate::model::InputPsiControl>,
pub(crate) timecode_source: std::option::Option<crate::model::InputTimecodeSource>,
pub(crate) timecode_start: std::option::Option<std::string::String>,
pub(crate) video_selector: std::option::Option<crate::model::VideoSelector>,
}
impl Builder {
/// Adds a key-value pair to `audio_selector_groups`.
///
/// To override the contents of this collection use [`set_audio_selector_groups`](Self::set_audio_selector_groups).
///
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub fn audio_selector_groups(
mut self,
k: impl Into<std::string::String>,
v: crate::model::AudioSelectorGroup,
) -> Self {
let mut hash_map = self.audio_selector_groups.unwrap_or_default();
hash_map.insert(k.into(), v);
self.audio_selector_groups = Some(hash_map);
self
}
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub fn set_audio_selector_groups(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
>,
) -> Self {
self.audio_selector_groups = input;
self
}
/// Adds a key-value pair to `audio_selectors`.
///
/// To override the contents of this collection use [`set_audio_selectors`](Self::set_audio_selectors).
///
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub fn audio_selectors(
mut self,
k: impl Into<std::string::String>,
v: crate::model::AudioSelector,
) -> Self {
let mut hash_map = self.audio_selectors.unwrap_or_default();
hash_map.insert(k.into(), v);
self.audio_selectors = Some(hash_map);
self
}
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub fn set_audio_selectors(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
>,
) -> Self {
self.audio_selectors = input;
self
}
/// Adds a key-value pair to `caption_selectors`.
///
/// To override the contents of this collection use [`set_caption_selectors`](Self::set_caption_selectors).
///
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub fn caption_selectors(
mut self,
k: impl Into<std::string::String>,
v: crate::model::CaptionSelector,
) -> Self {
let mut hash_map = self.caption_selectors.unwrap_or_default();
hash_map.insert(k.into(), v);
self.caption_selectors = Some(hash_map);
self
}
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub fn set_caption_selectors(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
>,
) -> Self {
self.caption_selectors = input;
self
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub fn crop(mut self, input: crate::model::Rectangle) -> Self {
self.crop = Some(input);
self
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub fn set_crop(mut self, input: std::option::Option<crate::model::Rectangle>) -> Self {
self.crop = input;
self
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub fn deblock_filter(mut self, input: crate::model::InputDeblockFilter) -> Self {
self.deblock_filter = Some(input);
self
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub fn set_deblock_filter(
mut self,
input: std::option::Option<crate::model::InputDeblockFilter>,
) -> Self {
self.deblock_filter = input;
self
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub fn denoise_filter(mut self, input: crate::model::InputDenoiseFilter) -> Self {
self.denoise_filter = Some(input);
self
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub fn set_denoise_filter(
mut self,
input: std::option::Option<crate::model::InputDenoiseFilter>,
) -> Self {
self.denoise_filter = input;
self
}
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub fn dolby_vision_metadata_xml(mut self, input: impl Into<std::string::String>) -> Self {
self.dolby_vision_metadata_xml = Some(input.into());
self
}
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub fn set_dolby_vision_metadata_xml(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.dolby_vision_metadata_xml = input;
self
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub fn filter_enable(mut self, input: crate::model::InputFilterEnable) -> Self {
self.filter_enable = Some(input);
self
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub fn set_filter_enable(
mut self,
input: std::option::Option<crate::model::InputFilterEnable>,
) -> Self {
self.filter_enable = input;
self
}
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub fn filter_strength(mut self, input: i32) -> Self {
self.filter_strength = Some(input);
self
}
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub fn set_filter_strength(mut self, input: std::option::Option<i32>) -> Self {
self.filter_strength = input;
self
}
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub fn image_inserter(mut self, input: crate::model::ImageInserter) -> Self {
self.image_inserter = Some(input);
self
}
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub fn set_image_inserter(
mut self,
input: std::option::Option<crate::model::ImageInserter>,
) -> Self {
self.image_inserter = input;
self
}
/// Appends an item to `input_clippings`.
///
/// To override the contents of this collection use [`set_input_clippings`](Self::set_input_clippings).
///
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub fn input_clippings(mut self, input: crate::model::InputClipping) -> Self {
let mut v = self.input_clippings.unwrap_or_default();
v.push(input);
self.input_clippings = Some(v);
self
}
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub fn set_input_clippings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InputClipping>>,
) -> Self {
self.input_clippings = input;
self
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub fn input_scan_type(mut self, input: crate::model::InputScanType) -> Self {
self.input_scan_type = Some(input);
self
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub fn set_input_scan_type(
mut self,
input: std::option::Option<crate::model::InputScanType>,
) -> Self {
self.input_scan_type = input;
self
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub fn position(mut self, input: crate::model::Rectangle) -> Self {
self.position = Some(input);
self
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub fn set_position(mut self, input: std::option::Option<crate::model::Rectangle>) -> Self {
self.position = input;
self
}
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub fn program_number(mut self, input: i32) -> Self {
self.program_number = Some(input);
self
}
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub fn set_program_number(mut self, input: std::option::Option<i32>) -> Self {
self.program_number = input;
self
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub fn psi_control(mut self, input: crate::model::InputPsiControl) -> Self {
self.psi_control = Some(input);
self
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub fn set_psi_control(
mut self,
input: std::option::Option<crate::model::InputPsiControl>,
) -> Self {
self.psi_control = input;
self
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_source(mut self, input: crate::model::InputTimecodeSource) -> Self {
self.timecode_source = Some(input);
self
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn set_timecode_source(
mut self,
input: std::option::Option<crate::model::InputTimecodeSource>,
) -> Self {
self.timecode_source = input;
self
}
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_start(mut self, input: impl Into<std::string::String>) -> Self {
self.timecode_start = Some(input.into());
self
}
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn set_timecode_start(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.timecode_start = input;
self
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub fn video_selector(mut self, input: crate::model::VideoSelector) -> Self {
self.video_selector = Some(input);
self
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub fn set_video_selector(
mut self,
input: std::option::Option<crate::model::VideoSelector>,
) -> Self {
self.video_selector = input;
self
}
/// Consumes the builder and constructs a [`InputTemplate`](crate::model::InputTemplate)
pub fn build(self) -> crate::model::InputTemplate {
crate::model::InputTemplate {
audio_selector_groups: self.audio_selector_groups,
audio_selectors: self.audio_selectors,
caption_selectors: self.caption_selectors,
crop: self.crop,
deblock_filter: self.deblock_filter,
denoise_filter: self.denoise_filter,
dolby_vision_metadata_xml: self.dolby_vision_metadata_xml,
filter_enable: self.filter_enable,
filter_strength: self.filter_strength.unwrap_or_default(),
image_inserter: self.image_inserter,
input_clippings: self.input_clippings,
input_scan_type: self.input_scan_type,
position: self.position,
program_number: self.program_number.unwrap_or_default(),
psi_control: self.psi_control,
timecode_source: self.timecode_source,
timecode_start: self.timecode_start,
video_selector: self.video_selector,
}
}
}
}
impl InputTemplate {
/// Creates a new builder-style object to manufacture [`InputTemplate`](crate::model::InputTemplate)
pub fn builder() -> crate::model::input_template::Builder {
crate::model::input_template::Builder::default()
}
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct 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.
pub alpha_behavior: std::option::Option<crate::model::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 (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 (FORCE_HDR10) here and specify correct values in the input HDR 10 metadata (Hdr10Metadata) settings. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub color_space: std::option::Option<crate::model::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.
pub color_space_usage: std::option::Option<crate::model::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.
pub embedded_timecode_override: std::option::Option<crate::model::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.
pub hdr10_metadata: std::option::Option<crate::model::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.
pub pad_video: std::option::Option<crate::model::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.
pub pid: i32,
/// Selects a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported.
pub program_number: i32,
/// 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.
pub rotate: std::option::Option<crate::model::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.
pub sample_range: std::option::Option<crate::model::InputSampleRange>,
}
impl 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.
pub fn alpha_behavior(&self) -> std::option::Option<&crate::model::AlphaBehavior> {
self.alpha_behavior.as_ref()
}
/// 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 (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 (FORCE_HDR10) here and specify correct values in the input HDR 10 metadata (Hdr10Metadata) settings. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub fn color_space(&self) -> std::option::Option<&crate::model::ColorSpace> {
self.color_space.as_ref()
}
/// 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.
pub fn color_space_usage(&self) -> std::option::Option<&crate::model::ColorSpaceUsage> {
self.color_space_usage.as_ref()
}
/// 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.
pub fn embedded_timecode_override(
&self,
) -> std::option::Option<&crate::model::EmbeddedTimecodeOverride> {
self.embedded_timecode_override.as_ref()
}
/// 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.
pub fn hdr10_metadata(&self) -> std::option::Option<&crate::model::Hdr10Metadata> {
self.hdr10_metadata.as_ref()
}
/// 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.
pub fn pad_video(&self) -> std::option::Option<&crate::model::PadVideo> {
self.pad_video.as_ref()
}
/// 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.
pub fn pid(&self) -> i32 {
self.pid
}
/// Selects a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported.
pub fn program_number(&self) -> i32 {
self.program_number
}
/// 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.
pub fn rotate(&self) -> std::option::Option<&crate::model::InputRotate> {
self.rotate.as_ref()
}
/// 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.
pub fn sample_range(&self) -> std::option::Option<&crate::model::InputSampleRange> {
self.sample_range.as_ref()
}
}
impl std::fmt::Debug for VideoSelector {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VideoSelector");
formatter.field("alpha_behavior", &self.alpha_behavior);
formatter.field("color_space", &self.color_space);
formatter.field("color_space_usage", &self.color_space_usage);
formatter.field(
"embedded_timecode_override",
&self.embedded_timecode_override,
);
formatter.field("hdr10_metadata", &self.hdr10_metadata);
formatter.field("pad_video", &self.pad_video);
formatter.field("pid", &self.pid);
formatter.field("program_number", &self.program_number);
formatter.field("rotate", &self.rotate);
formatter.field("sample_range", &self.sample_range);
formatter.finish()
}
}
/// See [`VideoSelector`](crate::model::VideoSelector)
pub mod video_selector {
/// A builder for [`VideoSelector`](crate::model::VideoSelector)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) alpha_behavior: std::option::Option<crate::model::AlphaBehavior>,
pub(crate) color_space: std::option::Option<crate::model::ColorSpace>,
pub(crate) color_space_usage: std::option::Option<crate::model::ColorSpaceUsage>,
pub(crate) embedded_timecode_override:
std::option::Option<crate::model::EmbeddedTimecodeOverride>,
pub(crate) hdr10_metadata: std::option::Option<crate::model::Hdr10Metadata>,
pub(crate) pad_video: std::option::Option<crate::model::PadVideo>,
pub(crate) pid: std::option::Option<i32>,
pub(crate) program_number: std::option::Option<i32>,
pub(crate) rotate: std::option::Option<crate::model::InputRotate>,
pub(crate) sample_range: std::option::Option<crate::model::InputSampleRange>,
}
impl Builder {
/// 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.
pub fn alpha_behavior(mut self, input: crate::model::AlphaBehavior) -> Self {
self.alpha_behavior = Some(input);
self
}
/// 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.
pub fn set_alpha_behavior(
mut self,
input: std::option::Option<crate::model::AlphaBehavior>,
) -> Self {
self.alpha_behavior = input;
self
}
/// 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 (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 (FORCE_HDR10) here and specify correct values in the input HDR 10 metadata (Hdr10Metadata) settings. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub fn color_space(mut self, input: crate::model::ColorSpace) -> Self {
self.color_space = Some(input);
self
}
/// 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 (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 (FORCE_HDR10) here and specify correct values in the input HDR 10 metadata (Hdr10Metadata) settings. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
pub fn set_color_space(
mut self,
input: std::option::Option<crate::model::ColorSpace>,
) -> Self {
self.color_space = input;
self
}
/// 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.
pub fn color_space_usage(mut self, input: crate::model::ColorSpaceUsage) -> Self {
self.color_space_usage = Some(input);
self
}
/// 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.
pub fn set_color_space_usage(
mut self,
input: std::option::Option<crate::model::ColorSpaceUsage>,
) -> Self {
self.color_space_usage = input;
self
}
/// 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.
pub fn embedded_timecode_override(
mut self,
input: crate::model::EmbeddedTimecodeOverride,
) -> Self {
self.embedded_timecode_override = Some(input);
self
}
/// 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.
pub fn set_embedded_timecode_override(
mut self,
input: std::option::Option<crate::model::EmbeddedTimecodeOverride>,
) -> Self {
self.embedded_timecode_override = input;
self
}
/// 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.
pub fn hdr10_metadata(mut self, input: crate::model::Hdr10Metadata) -> Self {
self.hdr10_metadata = Some(input);
self
}
/// 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.
pub fn set_hdr10_metadata(
mut self,
input: std::option::Option<crate::model::Hdr10Metadata>,
) -> Self {
self.hdr10_metadata = input;
self
}
/// 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.
pub fn pad_video(mut self, input: crate::model::PadVideo) -> Self {
self.pad_video = Some(input);
self
}
/// 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.
pub fn set_pad_video(mut self, input: std::option::Option<crate::model::PadVideo>) -> Self {
self.pad_video = input;
self
}
/// 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.
pub fn pid(mut self, input: i32) -> Self {
self.pid = Some(input);
self
}
/// 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.
pub fn set_pid(mut self, input: std::option::Option<i32>) -> Self {
self.pid = input;
self
}
/// Selects a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported.
pub fn program_number(mut self, input: i32) -> Self {
self.program_number = Some(input);
self
}
/// Selects a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported.
pub fn set_program_number(mut self, input: std::option::Option<i32>) -> Self {
self.program_number = input;
self
}
/// 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.
pub fn rotate(mut self, input: crate::model::InputRotate) -> Self {
self.rotate = Some(input);
self
}
/// 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.
pub fn set_rotate(mut self, input: std::option::Option<crate::model::InputRotate>) -> Self {
self.rotate = input;
self
}
/// 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.
pub fn sample_range(mut self, input: crate::model::InputSampleRange) -> Self {
self.sample_range = Some(input);
self
}
/// 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.
pub fn set_sample_range(
mut self,
input: std::option::Option<crate::model::InputSampleRange>,
) -> Self {
self.sample_range = input;
self
}
/// Consumes the builder and constructs a [`VideoSelector`](crate::model::VideoSelector)
pub fn build(self) -> crate::model::VideoSelector {
crate::model::VideoSelector {
alpha_behavior: self.alpha_behavior,
color_space: self.color_space,
color_space_usage: self.color_space_usage,
embedded_timecode_override: self.embedded_timecode_override,
hdr10_metadata: self.hdr10_metadata,
pad_video: self.pad_video,
pid: self.pid.unwrap_or_default(),
program_number: self.program_number.unwrap_or_default(),
rotate: self.rotate,
sample_range: self.sample_range,
}
}
}
}
impl VideoSelector {
/// Creates a new builder-style object to manufacture [`VideoSelector`](crate::model::VideoSelector)
pub fn builder() -> crate::model::video_selector::Builder {
crate::model::video_selector::Builder::default()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputSampleRange {
#[allow(missing_docs)] // documentation missing in model
Follow,
#[allow(missing_docs)] // documentation missing in model
FullRange,
#[allow(missing_docs)] // documentation missing in model
LimitedRange,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputSampleRange {
fn from(s: &str) -> Self {
match s {
"FOLLOW" => InputSampleRange::Follow,
"FULL_RANGE" => InputSampleRange::FullRange,
"LIMITED_RANGE" => InputSampleRange::LimitedRange,
other => InputSampleRange::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputSampleRange {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputSampleRange::from(s))
}
}
impl InputSampleRange {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputSampleRange::Follow => "FOLLOW",
InputSampleRange::FullRange => "FULL_RANGE",
InputSampleRange::LimitedRange => "LIMITED_RANGE",
InputSampleRange::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW", "FULL_RANGE", "LIMITED_RANGE"]
}
}
impl AsRef<str> for InputSampleRange {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputRotate {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Degrees180,
#[allow(missing_docs)] // documentation missing in model
Degrees270,
#[allow(missing_docs)] // documentation missing in model
Degrees90,
#[allow(missing_docs)] // documentation missing in model
Degree0,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputRotate {
fn from(s: &str) -> Self {
match s {
"AUTO" => InputRotate::Auto,
"DEGREES_180" => InputRotate::Degrees180,
"DEGREES_270" => InputRotate::Degrees270,
"DEGREES_90" => InputRotate::Degrees90,
"DEGREE_0" => InputRotate::Degree0,
other => InputRotate::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputRotate {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputRotate::from(s))
}
}
impl InputRotate {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputRotate::Auto => "AUTO",
InputRotate::Degrees180 => "DEGREES_180",
InputRotate::Degrees270 => "DEGREES_270",
InputRotate::Degrees90 => "DEGREES_90",
InputRotate::Degree0 => "DEGREE_0",
InputRotate::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AUTO",
"DEGREES_180",
"DEGREES_270",
"DEGREES_90",
"DEGREE_0",
]
}
}
impl AsRef<str> for InputRotate {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PadVideo {
#[allow(missing_docs)] // documentation missing in model
Black,
#[allow(missing_docs)] // documentation missing in model
Disabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for PadVideo {
fn from(s: &str) -> Self {
match s {
"BLACK" => PadVideo::Black,
"DISABLED" => PadVideo::Disabled,
other => PadVideo::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PadVideo {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PadVideo::from(s))
}
}
impl PadVideo {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
PadVideo::Black => "BLACK",
PadVideo::Disabled => "DISABLED",
PadVideo::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["BLACK", "DISABLED"]
}
}
impl AsRef<str> for PadVideo {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EmbeddedTimecodeOverride {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
UseMdpm,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for EmbeddedTimecodeOverride {
fn from(s: &str) -> Self {
match s {
"NONE" => EmbeddedTimecodeOverride::None,
"USE_MDPM" => EmbeddedTimecodeOverride::UseMdpm,
other => EmbeddedTimecodeOverride::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for EmbeddedTimecodeOverride {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EmbeddedTimecodeOverride::from(s))
}
}
impl EmbeddedTimecodeOverride {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
EmbeddedTimecodeOverride::None => "NONE",
EmbeddedTimecodeOverride::UseMdpm => "USE_MDPM",
EmbeddedTimecodeOverride::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "USE_MDPM"]
}
}
impl AsRef<str> for EmbeddedTimecodeOverride {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ColorSpaceUsage {
#[allow(missing_docs)] // documentation missing in model
Fallback,
#[allow(missing_docs)] // documentation missing in model
Force,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ColorSpaceUsage {
fn from(s: &str) -> Self {
match s {
"FALLBACK" => ColorSpaceUsage::Fallback,
"FORCE" => ColorSpaceUsage::Force,
other => ColorSpaceUsage::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ColorSpaceUsage {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ColorSpaceUsage::from(s))
}
}
impl ColorSpaceUsage {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ColorSpaceUsage::Fallback => "FALLBACK",
ColorSpaceUsage::Force => "FORCE",
ColorSpaceUsage::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FALLBACK", "FORCE"]
}
}
impl AsRef<str> for ColorSpaceUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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 (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 (FORCE_HDR10) here and specify correct values in the input HDR 10 metadata (Hdr10Metadata) settings. For more information about MediaConvert HDR jobs, see https://docs.aws.amazon.com/console/mediaconvert/hdr.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ColorSpace {
#[allow(missing_docs)] // documentation missing in model
Follow,
#[allow(missing_docs)] // documentation missing in model
Hdr10,
#[allow(missing_docs)] // documentation missing in model
Hlg2020,
#[allow(missing_docs)] // documentation missing in model
Rec601,
#[allow(missing_docs)] // documentation missing in model
Rec709,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ColorSpace {
fn from(s: &str) -> Self {
match s {
"FOLLOW" => ColorSpace::Follow,
"HDR10" => ColorSpace::Hdr10,
"HLG_2020" => ColorSpace::Hlg2020,
"REC_601" => ColorSpace::Rec601,
"REC_709" => ColorSpace::Rec709,
other => ColorSpace::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ColorSpace {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ColorSpace::from(s))
}
}
impl ColorSpace {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ColorSpace::Follow => "FOLLOW",
ColorSpace::Hdr10 => "HDR10",
ColorSpace::Hlg2020 => "HLG_2020",
ColorSpace::Rec601 => "REC_601",
ColorSpace::Rec709 => "REC_709",
ColorSpace::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["FOLLOW", "HDR10", "HLG_2020", "REC_601", "REC_709"]
}
}
impl AsRef<str> for ColorSpace {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// 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.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AlphaBehavior {
#[allow(missing_docs)] // documentation missing in model
Discard,
#[allow(missing_docs)] // documentation missing in model
RemapToLuma,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AlphaBehavior {
fn from(s: &str) -> Self {
match s {
"DISCARD" => AlphaBehavior::Discard,
"REMAP_TO_LUMA" => AlphaBehavior::RemapToLuma,
other => AlphaBehavior::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AlphaBehavior {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AlphaBehavior::from(s))
}
}
impl AlphaBehavior {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AlphaBehavior::Discard => "DISCARD",
AlphaBehavior::RemapToLuma => "REMAP_TO_LUMA",
AlphaBehavior::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISCARD", "REMAP_TO_LUMA"]
}
}
impl AsRef<str> for AlphaBehavior {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputTimecodeSource {
#[allow(missing_docs)] // documentation missing in model
Embedded,
#[allow(missing_docs)] // documentation missing in model
Specifiedstart,
#[allow(missing_docs)] // documentation missing in model
Zerobased,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputTimecodeSource {
fn from(s: &str) -> Self {
match s {
"EMBEDDED" => InputTimecodeSource::Embedded,
"SPECIFIEDSTART" => InputTimecodeSource::Specifiedstart,
"ZEROBASED" => InputTimecodeSource::Zerobased,
other => InputTimecodeSource::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputTimecodeSource {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputTimecodeSource::from(s))
}
}
impl InputTimecodeSource {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputTimecodeSource::Embedded => "EMBEDDED",
InputTimecodeSource::Specifiedstart => "SPECIFIEDSTART",
InputTimecodeSource::Zerobased => "ZEROBASED",
InputTimecodeSource::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["EMBEDDED", "SPECIFIEDSTART", "ZEROBASED"]
}
}
impl AsRef<str> for InputTimecodeSource {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputPsiControl {
#[allow(missing_docs)] // documentation missing in model
IgnorePsi,
#[allow(missing_docs)] // documentation missing in model
UsePsi,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputPsiControl {
fn from(s: &str) -> Self {
match s {
"IGNORE_PSI" => InputPsiControl::IgnorePsi,
"USE_PSI" => InputPsiControl::UsePsi,
other => InputPsiControl::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputPsiControl {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputPsiControl::from(s))
}
}
impl InputPsiControl {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputPsiControl::IgnorePsi => "IGNORE_PSI",
InputPsiControl::UsePsi => "USE_PSI",
InputPsiControl::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["IGNORE_PSI", "USE_PSI"]
}
}
impl AsRef<str> for InputPsiControl {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputScanType {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Psf,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputScanType {
fn from(s: &str) -> Self {
match s {
"AUTO" => InputScanType::Auto,
"PSF" => InputScanType::Psf,
other => InputScanType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputScanType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputScanType::from(s))
}
}
impl InputScanType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputScanType::Auto => "AUTO",
InputScanType::Psf => "PSF",
InputScanType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "PSF"]
}
}
impl AsRef<str> for InputScanType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// To transcode only portions of your input, include one input clip for each part of your input that you want in your output. All input clips that you specify will be included in every output of the job. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/assembling-multiple-inputs-and-input-clips.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InputClipping {
/// Set End timecode (EndTimecode) to the end of the portion of the input you are clipping. The frame corresponding to the End timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for timecode source under input settings (InputTimecodeSource). For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to end six minutes into the video, use 01:06:00:00.
pub end_timecode: std::option::Option<std::string::String>,
/// Set Start timecode (StartTimecode) to the beginning of the portion of the input you are clipping. The frame corresponding to the Start timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for Input timecode source. For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to begin five minutes into the video, use 01:05:00:00.
pub start_timecode: std::option::Option<std::string::String>,
}
impl InputClipping {
/// Set End timecode (EndTimecode) to the end of the portion of the input you are clipping. The frame corresponding to the End timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for timecode source under input settings (InputTimecodeSource). For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to end six minutes into the video, use 01:06:00:00.
pub fn end_timecode(&self) -> std::option::Option<&str> {
self.end_timecode.as_deref()
}
/// Set Start timecode (StartTimecode) to the beginning of the portion of the input you are clipping. The frame corresponding to the Start timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for Input timecode source. For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to begin five minutes into the video, use 01:05:00:00.
pub fn start_timecode(&self) -> std::option::Option<&str> {
self.start_timecode.as_deref()
}
}
impl std::fmt::Debug for InputClipping {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InputClipping");
formatter.field("end_timecode", &self.end_timecode);
formatter.field("start_timecode", &self.start_timecode);
formatter.finish()
}
}
/// See [`InputClipping`](crate::model::InputClipping)
pub mod input_clipping {
/// A builder for [`InputClipping`](crate::model::InputClipping)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) end_timecode: std::option::Option<std::string::String>,
pub(crate) start_timecode: std::option::Option<std::string::String>,
}
impl Builder {
/// Set End timecode (EndTimecode) to the end of the portion of the input you are clipping. The frame corresponding to the End timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for timecode source under input settings (InputTimecodeSource). For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to end six minutes into the video, use 01:06:00:00.
pub fn end_timecode(mut self, input: impl Into<std::string::String>) -> Self {
self.end_timecode = Some(input.into());
self
}
/// Set End timecode (EndTimecode) to the end of the portion of the input you are clipping. The frame corresponding to the End timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for timecode source under input settings (InputTimecodeSource). For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to end six minutes into the video, use 01:06:00:00.
pub fn set_end_timecode(mut self, input: std::option::Option<std::string::String>) -> Self {
self.end_timecode = input;
self
}
/// Set Start timecode (StartTimecode) to the beginning of the portion of the input you are clipping. The frame corresponding to the Start timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for Input timecode source. For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to begin five minutes into the video, use 01:05:00:00.
pub fn start_timecode(mut self, input: impl Into<std::string::String>) -> Self {
self.start_timecode = Some(input.into());
self
}
/// Set Start timecode (StartTimecode) to the beginning of the portion of the input you are clipping. The frame corresponding to the Start timecode value is included in the clip. Start timecode or End timecode may be left blank, but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. When choosing this value, take into account your setting for Input timecode source. For example, if you have embedded timecodes that start at 01:00:00:00 and you want your clip to begin five minutes into the video, use 01:05:00:00.
pub fn set_start_timecode(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.start_timecode = input;
self
}
/// Consumes the builder and constructs a [`InputClipping`](crate::model::InputClipping)
pub fn build(self) -> crate::model::InputClipping {
crate::model::InputClipping {
end_timecode: self.end_timecode,
start_timecode: self.start_timecode,
}
}
}
}
impl InputClipping {
/// Creates a new builder-style object to manufacture [`InputClipping`](crate::model::InputClipping)
pub fn builder() -> crate::model::input_clipping::Builder {
crate::model::input_clipping::Builder::default()
}
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputFilterEnable {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Disable,
#[allow(missing_docs)] // documentation missing in model
Force,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputFilterEnable {
fn from(s: &str) -> Self {
match s {
"AUTO" => InputFilterEnable::Auto,
"DISABLE" => InputFilterEnable::Disable,
"FORCE" => InputFilterEnable::Force,
other => InputFilterEnable::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputFilterEnable {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputFilterEnable::from(s))
}
}
impl InputFilterEnable {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputFilterEnable::Auto => "AUTO",
InputFilterEnable::Disable => "DISABLE",
InputFilterEnable::Force => "FORCE",
InputFilterEnable::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "DISABLE", "FORCE"]
}
}
impl AsRef<str> for InputFilterEnable {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputDenoiseFilter {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputDenoiseFilter {
fn from(s: &str) -> Self {
match s {
"DISABLED" => InputDenoiseFilter::Disabled,
"ENABLED" => InputDenoiseFilter::Enabled,
other => InputDenoiseFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputDenoiseFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputDenoiseFilter::from(s))
}
}
impl InputDenoiseFilter {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputDenoiseFilter::Disabled => "DISABLED",
InputDenoiseFilter::Enabled => "ENABLED",
InputDenoiseFilter::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for InputDenoiseFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputDeblockFilter {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputDeblockFilter {
fn from(s: &str) -> Self {
match s {
"DISABLED" => InputDeblockFilter::Disabled,
"ENABLED" => InputDeblockFilter::Enabled,
other => InputDeblockFilter::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputDeblockFilter {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputDeblockFilter::from(s))
}
}
impl InputDeblockFilter {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputDeblockFilter::Disabled => "DISABLED",
InputDeblockFilter::Enabled => "ENABLED",
InputDeblockFilter::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for InputDeblockFilter {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptionSelector {
/// The specific language to extract from source, using the ISO 639-2 or ISO 639-3 three-letter language code. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub custom_language_code: std::option::Option<std::string::String>,
/// The specific language to extract from source. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub language_code: std::option::Option<crate::model::LanguageCode>,
/// If your input captions are SCC, TTML, STL, SMI, SRT, or IMSC in an xml file, specify the URI of the input captions source file. If your input captions are IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub source_settings: std::option::Option<crate::model::CaptionSourceSettings>,
}
impl CaptionSelector {
/// The specific language to extract from source, using the ISO 639-2 or ISO 639-3 three-letter language code. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub fn custom_language_code(&self) -> std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// The specific language to extract from source. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
/// If your input captions are SCC, TTML, STL, SMI, SRT, or IMSC in an xml file, specify the URI of the input captions source file. If your input captions are IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub fn source_settings(&self) -> std::option::Option<&crate::model::CaptionSourceSettings> {
self.source_settings.as_ref()
}
}
impl std::fmt::Debug for CaptionSelector {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptionSelector");
formatter.field("custom_language_code", &self.custom_language_code);
formatter.field("language_code", &self.language_code);
formatter.field("source_settings", &self.source_settings);
formatter.finish()
}
}
/// See [`CaptionSelector`](crate::model::CaptionSelector)
pub mod caption_selector {
/// A builder for [`CaptionSelector`](crate::model::CaptionSelector)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) custom_language_code: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) source_settings: std::option::Option<crate::model::CaptionSourceSettings>,
}
impl Builder {
/// The specific language to extract from source, using the ISO 639-2 or ISO 639-3 three-letter language code. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub fn custom_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_language_code = Some(input.into());
self
}
/// The specific language to extract from source, using the ISO 639-2 or ISO 639-3 three-letter language code. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub fn set_custom_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_language_code = input;
self
}
/// The specific language to extract from source. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
/// The specific language to extract from source. If input is SCTE-27, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or PID to select the caption language to extract. If input is DVB-Sub that is being passed through, omit this field (and PID field); there is no way to extract a specific language with pass-through captions.
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
/// If your input captions are SCC, TTML, STL, SMI, SRT, or IMSC in an xml file, specify the URI of the input captions source file. If your input captions are IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub fn source_settings(mut self, input: crate::model::CaptionSourceSettings) -> Self {
self.source_settings = Some(input);
self
}
/// If your input captions are SCC, TTML, STL, SMI, SRT, or IMSC in an xml file, specify the URI of the input captions source file. If your input captions are IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub fn set_source_settings(
mut self,
input: std::option::Option<crate::model::CaptionSourceSettings>,
) -> Self {
self.source_settings = input;
self
}
/// Consumes the builder and constructs a [`CaptionSelector`](crate::model::CaptionSelector)
pub fn build(self) -> crate::model::CaptionSelector {
crate::model::CaptionSelector {
custom_language_code: self.custom_language_code,
language_code: self.language_code,
source_settings: self.source_settings,
}
}
}
}
impl CaptionSelector {
/// Creates a new builder-style object to manufacture [`CaptionSelector`](crate::model::CaptionSelector)
pub fn builder() -> crate::model::caption_selector::Builder {
crate::model::caption_selector::Builder::default()
}
}
/// If your input captions are SCC, TTML, STL, SMI, SRT, or IMSC in an xml file, specify the URI of the input captions source file. If your input captions are IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptionSourceSettings {
/// Settings for ancillary captions source.
pub ancillary_source_settings: std::option::Option<crate::model::AncillarySourceSettings>,
/// DVB Sub Source Settings
pub dvb_sub_source_settings: std::option::Option<crate::model::DvbSubSourceSettings>,
/// Settings for embedded captions Source
pub embedded_source_settings: std::option::Option<crate::model::EmbeddedSourceSettings>,
/// If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1 in an xml file, specify the URI of the input caption source file. If your caption source is IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub file_source_settings: std::option::Option<crate::model::FileSourceSettings>,
/// Use Source (SourceType) to identify the format of your input captions. The service cannot auto-detect caption format.
pub source_type: std::option::Option<crate::model::CaptionSourceType>,
/// Settings specific to Teletext caption sources, including Page number.
pub teletext_source_settings: std::option::Option<crate::model::TeletextSourceSettings>,
/// Settings specific to caption sources that are specified by track number. Currently, this is only IMSC captions in an IMF package. If your caption source is IMSC 1.1 in a separate xml file, use FileSourceSettings instead of TrackSourceSettings.
pub track_source_settings: std::option::Option<crate::model::TrackSourceSettings>,
/// Settings specific to WebVTT sources in HLS alternative rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique subtitle track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the specified properties, the job fails. If there is only one subtitle track in the rendition group, the settings can be left empty and the default subtitle track will be chosen. If your caption source is a sidecar file, use FileSourceSettings instead of WebvttHlsSourceSettings.
pub webvtt_hls_source_settings: std::option::Option<crate::model::WebvttHlsSourceSettings>,
}
impl CaptionSourceSettings {
/// Settings for ancillary captions source.
pub fn ancillary_source_settings(
&self,
) -> std::option::Option<&crate::model::AncillarySourceSettings> {
self.ancillary_source_settings.as_ref()
}
/// DVB Sub Source Settings
pub fn dvb_sub_source_settings(
&self,
) -> std::option::Option<&crate::model::DvbSubSourceSettings> {
self.dvb_sub_source_settings.as_ref()
}
/// Settings for embedded captions Source
pub fn embedded_source_settings(
&self,
) -> std::option::Option<&crate::model::EmbeddedSourceSettings> {
self.embedded_source_settings.as_ref()
}
/// If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1 in an xml file, specify the URI of the input caption source file. If your caption source is IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub fn file_source_settings(&self) -> std::option::Option<&crate::model::FileSourceSettings> {
self.file_source_settings.as_ref()
}
/// Use Source (SourceType) to identify the format of your input captions. The service cannot auto-detect caption format.
pub fn source_type(&self) -> std::option::Option<&crate::model::CaptionSourceType> {
self.source_type.as_ref()
}
/// Settings specific to Teletext caption sources, including Page number.
pub fn teletext_source_settings(
&self,
) -> std::option::Option<&crate::model::TeletextSourceSettings> {
self.teletext_source_settings.as_ref()
}
/// Settings specific to caption sources that are specified by track number. Currently, this is only IMSC captions in an IMF package. If your caption source is IMSC 1.1 in a separate xml file, use FileSourceSettings instead of TrackSourceSettings.
pub fn track_source_settings(&self) -> std::option::Option<&crate::model::TrackSourceSettings> {
self.track_source_settings.as_ref()
}
/// Settings specific to WebVTT sources in HLS alternative rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique subtitle track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the specified properties, the job fails. If there is only one subtitle track in the rendition group, the settings can be left empty and the default subtitle track will be chosen. If your caption source is a sidecar file, use FileSourceSettings instead of WebvttHlsSourceSettings.
pub fn webvtt_hls_source_settings(
&self,
) -> std::option::Option<&crate::model::WebvttHlsSourceSettings> {
self.webvtt_hls_source_settings.as_ref()
}
}
impl std::fmt::Debug for CaptionSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptionSourceSettings");
formatter.field("ancillary_source_settings", &self.ancillary_source_settings);
formatter.field("dvb_sub_source_settings", &self.dvb_sub_source_settings);
formatter.field("embedded_source_settings", &self.embedded_source_settings);
formatter.field("file_source_settings", &self.file_source_settings);
formatter.field("source_type", &self.source_type);
formatter.field("teletext_source_settings", &self.teletext_source_settings);
formatter.field("track_source_settings", &self.track_source_settings);
formatter.field(
"webvtt_hls_source_settings",
&self.webvtt_hls_source_settings,
);
formatter.finish()
}
}
/// See [`CaptionSourceSettings`](crate::model::CaptionSourceSettings)
pub mod caption_source_settings {
/// A builder for [`CaptionSourceSettings`](crate::model::CaptionSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ancillary_source_settings:
std::option::Option<crate::model::AncillarySourceSettings>,
pub(crate) dvb_sub_source_settings: std::option::Option<crate::model::DvbSubSourceSettings>,
pub(crate) embedded_source_settings:
std::option::Option<crate::model::EmbeddedSourceSettings>,
pub(crate) file_source_settings: std::option::Option<crate::model::FileSourceSettings>,
pub(crate) source_type: std::option::Option<crate::model::CaptionSourceType>,
pub(crate) teletext_source_settings:
std::option::Option<crate::model::TeletextSourceSettings>,
pub(crate) track_source_settings: std::option::Option<crate::model::TrackSourceSettings>,
pub(crate) webvtt_hls_source_settings:
std::option::Option<crate::model::WebvttHlsSourceSettings>,
}
impl Builder {
/// Settings for ancillary captions source.
pub fn ancillary_source_settings(
mut self,
input: crate::model::AncillarySourceSettings,
) -> Self {
self.ancillary_source_settings = Some(input);
self
}
/// Settings for ancillary captions source.
pub fn set_ancillary_source_settings(
mut self,
input: std::option::Option<crate::model::AncillarySourceSettings>,
) -> Self {
self.ancillary_source_settings = input;
self
}
/// DVB Sub Source Settings
pub fn dvb_sub_source_settings(
mut self,
input: crate::model::DvbSubSourceSettings,
) -> Self {
self.dvb_sub_source_settings = Some(input);
self
}
/// DVB Sub Source Settings
pub fn set_dvb_sub_source_settings(
mut self,
input: std::option::Option<crate::model::DvbSubSourceSettings>,
) -> Self {
self.dvb_sub_source_settings = input;
self
}
/// Settings for embedded captions Source
pub fn embedded_source_settings(
mut self,
input: crate::model::EmbeddedSourceSettings,
) -> Self {
self.embedded_source_settings = Some(input);
self
}
/// Settings for embedded captions Source
pub fn set_embedded_source_settings(
mut self,
input: std::option::Option<crate::model::EmbeddedSourceSettings>,
) -> Self {
self.embedded_source_settings = input;
self
}
/// If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1 in an xml file, specify the URI of the input caption source file. If your caption source is IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub fn file_source_settings(mut self, input: crate::model::FileSourceSettings) -> Self {
self.file_source_settings = Some(input);
self
}
/// If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1 in an xml file, specify the URI of the input caption source file. If your caption source is IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
pub fn set_file_source_settings(
mut self,
input: std::option::Option<crate::model::FileSourceSettings>,
) -> Self {
self.file_source_settings = input;
self
}
/// Use Source (SourceType) to identify the format of your input captions. The service cannot auto-detect caption format.
pub fn source_type(mut self, input: crate::model::CaptionSourceType) -> Self {
self.source_type = Some(input);
self
}
/// Use Source (SourceType) to identify the format of your input captions. The service cannot auto-detect caption format.
pub fn set_source_type(
mut self,
input: std::option::Option<crate::model::CaptionSourceType>,
) -> Self {
self.source_type = input;
self
}
/// Settings specific to Teletext caption sources, including Page number.
pub fn teletext_source_settings(
mut self,
input: crate::model::TeletextSourceSettings,
) -> Self {
self.teletext_source_settings = Some(input);
self
}
/// Settings specific to Teletext caption sources, including Page number.
pub fn set_teletext_source_settings(
mut self,
input: std::option::Option<crate::model::TeletextSourceSettings>,
) -> Self {
self.teletext_source_settings = input;
self
}
/// Settings specific to caption sources that are specified by track number. Currently, this is only IMSC captions in an IMF package. If your caption source is IMSC 1.1 in a separate xml file, use FileSourceSettings instead of TrackSourceSettings.
pub fn track_source_settings(mut self, input: crate::model::TrackSourceSettings) -> Self {
self.track_source_settings = Some(input);
self
}
/// Settings specific to caption sources that are specified by track number. Currently, this is only IMSC captions in an IMF package. If your caption source is IMSC 1.1 in a separate xml file, use FileSourceSettings instead of TrackSourceSettings.
pub fn set_track_source_settings(
mut self,
input: std::option::Option<crate::model::TrackSourceSettings>,
) -> Self {
self.track_source_settings = input;
self
}
/// Settings specific to WebVTT sources in HLS alternative rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique subtitle track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the specified properties, the job fails. If there is only one subtitle track in the rendition group, the settings can be left empty and the default subtitle track will be chosen. If your caption source is a sidecar file, use FileSourceSettings instead of WebvttHlsSourceSettings.
pub fn webvtt_hls_source_settings(
mut self,
input: crate::model::WebvttHlsSourceSettings,
) -> Self {
self.webvtt_hls_source_settings = Some(input);
self
}
/// Settings specific to WebVTT sources in HLS alternative rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique subtitle track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the specified properties, the job fails. If there is only one subtitle track in the rendition group, the settings can be left empty and the default subtitle track will be chosen. If your caption source is a sidecar file, use FileSourceSettings instead of WebvttHlsSourceSettings.
pub fn set_webvtt_hls_source_settings(
mut self,
input: std::option::Option<crate::model::WebvttHlsSourceSettings>,
) -> Self {
self.webvtt_hls_source_settings = input;
self
}
/// Consumes the builder and constructs a [`CaptionSourceSettings`](crate::model::CaptionSourceSettings)
pub fn build(self) -> crate::model::CaptionSourceSettings {
crate::model::CaptionSourceSettings {
ancillary_source_settings: self.ancillary_source_settings,
dvb_sub_source_settings: self.dvb_sub_source_settings,
embedded_source_settings: self.embedded_source_settings,
file_source_settings: self.file_source_settings,
source_type: self.source_type,
teletext_source_settings: self.teletext_source_settings,
track_source_settings: self.track_source_settings,
webvtt_hls_source_settings: self.webvtt_hls_source_settings,
}
}
}
}
impl CaptionSourceSettings {
/// Creates a new builder-style object to manufacture [`CaptionSourceSettings`](crate::model::CaptionSourceSettings)
pub fn builder() -> crate::model::caption_source_settings::Builder {
crate::model::caption_source_settings::Builder::default()
}
}
/// Settings specific to WebVTT sources in HLS alternative rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique subtitle track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the specified properties, the job fails. If there is only one subtitle track in the rendition group, the settings can be left empty and the default subtitle track will be chosen. If your caption source is a sidecar file, use FileSourceSettings instead of WebvttHlsSourceSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WebvttHlsSourceSettings {
/// Optional. Specify alternative group ID
pub rendition_group_id: std::option::Option<std::string::String>,
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub rendition_language_code: std::option::Option<crate::model::LanguageCode>,
/// Optional. Specify media name
pub rendition_name: std::option::Option<std::string::String>,
}
impl WebvttHlsSourceSettings {
/// Optional. Specify alternative group ID
pub fn rendition_group_id(&self) -> std::option::Option<&str> {
self.rendition_group_id.as_deref()
}
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub fn rendition_language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.rendition_language_code.as_ref()
}
/// Optional. Specify media name
pub fn rendition_name(&self) -> std::option::Option<&str> {
self.rendition_name.as_deref()
}
}
impl std::fmt::Debug for WebvttHlsSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WebvttHlsSourceSettings");
formatter.field("rendition_group_id", &self.rendition_group_id);
formatter.field("rendition_language_code", &self.rendition_language_code);
formatter.field("rendition_name", &self.rendition_name);
formatter.finish()
}
}
/// See [`WebvttHlsSourceSettings`](crate::model::WebvttHlsSourceSettings)
pub mod webvtt_hls_source_settings {
/// A builder for [`WebvttHlsSourceSettings`](crate::model::WebvttHlsSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) rendition_group_id: std::option::Option<std::string::String>,
pub(crate) rendition_language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) rendition_name: std::option::Option<std::string::String>,
}
impl Builder {
/// Optional. Specify alternative group ID
pub fn rendition_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.rendition_group_id = Some(input.into());
self
}
/// Optional. Specify alternative group ID
pub fn set_rendition_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.rendition_group_id = input;
self
}
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub fn rendition_language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.rendition_language_code = Some(input);
self
}
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub fn set_rendition_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.rendition_language_code = input;
self
}
/// Optional. Specify media name
pub fn rendition_name(mut self, input: impl Into<std::string::String>) -> Self {
self.rendition_name = Some(input.into());
self
}
/// Optional. Specify media name
pub fn set_rendition_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.rendition_name = input;
self
}
/// Consumes the builder and constructs a [`WebvttHlsSourceSettings`](crate::model::WebvttHlsSourceSettings)
pub fn build(self) -> crate::model::WebvttHlsSourceSettings {
crate::model::WebvttHlsSourceSettings {
rendition_group_id: self.rendition_group_id,
rendition_language_code: self.rendition_language_code,
rendition_name: self.rendition_name,
}
}
}
}
impl WebvttHlsSourceSettings {
/// Creates a new builder-style object to manufacture [`WebvttHlsSourceSettings`](crate::model::WebvttHlsSourceSettings)
pub fn builder() -> crate::model::webvtt_hls_source_settings::Builder {
crate::model::webvtt_hls_source_settings::Builder::default()
}
}
/// Settings specific to caption sources that are specified by track number. Currently, this is only IMSC captions in an IMF package. If your caption source is IMSC 1.1 in a separate xml file, use FileSourceSettings instead of TrackSourceSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TrackSourceSettings {
/// Use this setting to select a single captions track from a source. Track numbers correspond to the order in the captions source file. For IMF sources, track numbering is based on the order that the captions appear in the CPL. For example, use 1 to select the captions asset that is listed first in the CPL. To include more than one captions track in your job outputs, create multiple input captions selectors. Specify one track per selector.
pub track_number: i32,
}
impl TrackSourceSettings {
/// Use this setting to select a single captions track from a source. Track numbers correspond to the order in the captions source file. For IMF sources, track numbering is based on the order that the captions appear in the CPL. For example, use 1 to select the captions asset that is listed first in the CPL. To include more than one captions track in your job outputs, create multiple input captions selectors. Specify one track per selector.
pub fn track_number(&self) -> i32 {
self.track_number
}
}
impl std::fmt::Debug for TrackSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TrackSourceSettings");
formatter.field("track_number", &self.track_number);
formatter.finish()
}
}
/// See [`TrackSourceSettings`](crate::model::TrackSourceSettings)
pub mod track_source_settings {
/// A builder for [`TrackSourceSettings`](crate::model::TrackSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) track_number: std::option::Option<i32>,
}
impl Builder {
/// Use this setting to select a single captions track from a source. Track numbers correspond to the order in the captions source file. For IMF sources, track numbering is based on the order that the captions appear in the CPL. For example, use 1 to select the captions asset that is listed first in the CPL. To include more than one captions track in your job outputs, create multiple input captions selectors. Specify one track per selector.
pub fn track_number(mut self, input: i32) -> Self {
self.track_number = Some(input);
self
}
/// Use this setting to select a single captions track from a source. Track numbers correspond to the order in the captions source file. For IMF sources, track numbering is based on the order that the captions appear in the CPL. For example, use 1 to select the captions asset that is listed first in the CPL. To include more than one captions track in your job outputs, create multiple input captions selectors. Specify one track per selector.
pub fn set_track_number(mut self, input: std::option::Option<i32>) -> Self {
self.track_number = input;
self
}
/// Consumes the builder and constructs a [`TrackSourceSettings`](crate::model::TrackSourceSettings)
pub fn build(self) -> crate::model::TrackSourceSettings {
crate::model::TrackSourceSettings {
track_number: self.track_number.unwrap_or_default(),
}
}
}
}
impl TrackSourceSettings {
/// Creates a new builder-style object to manufacture [`TrackSourceSettings`](crate::model::TrackSourceSettings)
pub fn builder() -> crate::model::track_source_settings::Builder {
crate::model::track_source_settings::Builder::default()
}
}
/// Settings specific to Teletext caption sources, including Page number.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TeletextSourceSettings {
/// Use Page Number (PageNumber) to specify the three-digit hexadecimal page number that will be used for Teletext captions. Do not use this setting if you are passing through teletext from the input source to output.
pub page_number: std::option::Option<std::string::String>,
}
impl TeletextSourceSettings {
/// Use Page Number (PageNumber) to specify the three-digit hexadecimal page number that will be used for Teletext captions. Do not use this setting if you are passing through teletext from the input source to output.
pub fn page_number(&self) -> std::option::Option<&str> {
self.page_number.as_deref()
}
}
impl std::fmt::Debug for TeletextSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TeletextSourceSettings");
formatter.field("page_number", &self.page_number);
formatter.finish()
}
}
/// See [`TeletextSourceSettings`](crate::model::TeletextSourceSettings)
pub mod teletext_source_settings {
/// A builder for [`TeletextSourceSettings`](crate::model::TeletextSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) page_number: std::option::Option<std::string::String>,
}
impl Builder {
/// Use Page Number (PageNumber) to specify the three-digit hexadecimal page number that will be used for Teletext captions. Do not use this setting if you are passing through teletext from the input source to output.
pub fn page_number(mut self, input: impl Into<std::string::String>) -> Self {
self.page_number = Some(input.into());
self
}
/// Use Page Number (PageNumber) to specify the three-digit hexadecimal page number that will be used for Teletext captions. Do not use this setting if you are passing through teletext from the input source to output.
pub fn set_page_number(mut self, input: std::option::Option<std::string::String>) -> Self {
self.page_number = input;
self
}
/// Consumes the builder and constructs a [`TeletextSourceSettings`](crate::model::TeletextSourceSettings)
pub fn build(self) -> crate::model::TeletextSourceSettings {
crate::model::TeletextSourceSettings {
page_number: self.page_number,
}
}
}
}
impl TeletextSourceSettings {
/// Creates a new builder-style object to manufacture [`TeletextSourceSettings`](crate::model::TeletextSourceSettings)
pub fn builder() -> crate::model::teletext_source_settings::Builder {
crate::model::teletext_source_settings::Builder::default()
}
}
/// Use Source (SourceType) to identify the format of your input captions. The service cannot auto-detect caption format.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CaptionSourceType {
#[allow(missing_docs)] // documentation missing in model
Ancillary,
#[allow(missing_docs)] // documentation missing in model
DvbSub,
#[allow(missing_docs)] // documentation missing in model
Embedded,
#[allow(missing_docs)] // documentation missing in model
Imsc,
#[allow(missing_docs)] // documentation missing in model
NullSource,
#[allow(missing_docs)] // documentation missing in model
Scc,
#[allow(missing_docs)] // documentation missing in model
Scte20,
#[allow(missing_docs)] // documentation missing in model
Smi,
#[allow(missing_docs)] // documentation missing in model
SmpteTt,
#[allow(missing_docs)] // documentation missing in model
Srt,
#[allow(missing_docs)] // documentation missing in model
Stl,
#[allow(missing_docs)] // documentation missing in model
Teletext,
#[allow(missing_docs)] // documentation missing in model
Ttml,
#[allow(missing_docs)] // documentation missing in model
Webvtt,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CaptionSourceType {
fn from(s: &str) -> Self {
match s {
"ANCILLARY" => CaptionSourceType::Ancillary,
"DVB_SUB" => CaptionSourceType::DvbSub,
"EMBEDDED" => CaptionSourceType::Embedded,
"IMSC" => CaptionSourceType::Imsc,
"NULL_SOURCE" => CaptionSourceType::NullSource,
"SCC" => CaptionSourceType::Scc,
"SCTE20" => CaptionSourceType::Scte20,
"SMI" => CaptionSourceType::Smi,
"SMPTE_TT" => CaptionSourceType::SmpteTt,
"SRT" => CaptionSourceType::Srt,
"STL" => CaptionSourceType::Stl,
"TELETEXT" => CaptionSourceType::Teletext,
"TTML" => CaptionSourceType::Ttml,
"WEBVTT" => CaptionSourceType::Webvtt,
other => CaptionSourceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CaptionSourceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CaptionSourceType::from(s))
}
}
impl CaptionSourceType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CaptionSourceType::Ancillary => "ANCILLARY",
CaptionSourceType::DvbSub => "DVB_SUB",
CaptionSourceType::Embedded => "EMBEDDED",
CaptionSourceType::Imsc => "IMSC",
CaptionSourceType::NullSource => "NULL_SOURCE",
CaptionSourceType::Scc => "SCC",
CaptionSourceType::Scte20 => "SCTE20",
CaptionSourceType::Smi => "SMI",
CaptionSourceType::SmpteTt => "SMPTE_TT",
CaptionSourceType::Srt => "SRT",
CaptionSourceType::Stl => "STL",
CaptionSourceType::Teletext => "TELETEXT",
CaptionSourceType::Ttml => "TTML",
CaptionSourceType::Webvtt => "WEBVTT",
CaptionSourceType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ANCILLARY",
"DVB_SUB",
"EMBEDDED",
"IMSC",
"NULL_SOURCE",
"SCC",
"SCTE20",
"SMI",
"SMPTE_TT",
"SRT",
"STL",
"TELETEXT",
"TTML",
"WEBVTT",
]
}
}
impl AsRef<str> for CaptionSourceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1 in an xml file, specify the URI of the input caption source file. If your caption source is IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FileSourceSettings {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub convert608_to708: std::option::Option<crate::model::FileSourceConvert608To708>,
/// Ignore this setting unless your input captions format is SCC. To have the service compensate for differing frame rates between your input captions and input video, specify the frame rate of the captions file. Specify this value as a fraction. When you work directly in your JSON job specification, use the settings framerateNumerator and framerateDenominator. For example, you might specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or 30000 / 1001 for 29.97 fps.
pub framerate: std::option::Option<crate::model::CaptionSourceFramerate>,
/// External caption file used for loading captions. Accepted file extensions are 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
pub source_file: std::option::Option<std::string::String>,
/// Optional. Use this setting when you need to adjust the sync between your sidecar captions and your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html. Enter a positive or negative number to modify the times in the captions file. For example, type 15 to add 15 seconds to all the times in the captions file. Type -5 to subtract 5 seconds from the times in the captions file. You can optionally specify your time delta in milliseconds instead of seconds. When you do so, set the related setting, Time delta units (TimeDeltaUnits) to Milliseconds (MILLISECONDS). Note that, when you specify a time delta for timecode-based caption sources, such as SCC and STL, and your time delta isn't a multiple of the input frame rate, MediaConvert snaps the captions to the nearest frame. For example, when your input video frame rate is 25 fps and you specify 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
pub time_delta: i32,
/// When you use the setting Time delta (TimeDelta) to adjust the sync between your sidecar captions and your video, use this setting to specify the units for the delta that you specify. When you don't specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses seconds by default.
pub time_delta_units: std::option::Option<crate::model::FileSourceTimeDeltaUnits>,
}
impl FileSourceSettings {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn convert608_to708(
&self,
) -> std::option::Option<&crate::model::FileSourceConvert608To708> {
self.convert608_to708.as_ref()
}
/// Ignore this setting unless your input captions format is SCC. To have the service compensate for differing frame rates between your input captions and input video, specify the frame rate of the captions file. Specify this value as a fraction. When you work directly in your JSON job specification, use the settings framerateNumerator and framerateDenominator. For example, you might specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or 30000 / 1001 for 29.97 fps.
pub fn framerate(&self) -> std::option::Option<&crate::model::CaptionSourceFramerate> {
self.framerate.as_ref()
}
/// External caption file used for loading captions. Accepted file extensions are 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
pub fn source_file(&self) -> std::option::Option<&str> {
self.source_file.as_deref()
}
/// Optional. Use this setting when you need to adjust the sync between your sidecar captions and your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html. Enter a positive or negative number to modify the times in the captions file. For example, type 15 to add 15 seconds to all the times in the captions file. Type -5 to subtract 5 seconds from the times in the captions file. You can optionally specify your time delta in milliseconds instead of seconds. When you do so, set the related setting, Time delta units (TimeDeltaUnits) to Milliseconds (MILLISECONDS). Note that, when you specify a time delta for timecode-based caption sources, such as SCC and STL, and your time delta isn't a multiple of the input frame rate, MediaConvert snaps the captions to the nearest frame. For example, when your input video frame rate is 25 fps and you specify 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
pub fn time_delta(&self) -> i32 {
self.time_delta
}
/// When you use the setting Time delta (TimeDelta) to adjust the sync between your sidecar captions and your video, use this setting to specify the units for the delta that you specify. When you don't specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses seconds by default.
pub fn time_delta_units(&self) -> std::option::Option<&crate::model::FileSourceTimeDeltaUnits> {
self.time_delta_units.as_ref()
}
}
impl std::fmt::Debug for FileSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("FileSourceSettings");
formatter.field("convert608_to708", &self.convert608_to708);
formatter.field("framerate", &self.framerate);
formatter.field("source_file", &self.source_file);
formatter.field("time_delta", &self.time_delta);
formatter.field("time_delta_units", &self.time_delta_units);
formatter.finish()
}
}
/// See [`FileSourceSettings`](crate::model::FileSourceSettings)
pub mod file_source_settings {
/// A builder for [`FileSourceSettings`](crate::model::FileSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) convert608_to708: std::option::Option<crate::model::FileSourceConvert608To708>,
pub(crate) framerate: std::option::Option<crate::model::CaptionSourceFramerate>,
pub(crate) source_file: std::option::Option<std::string::String>,
pub(crate) time_delta: std::option::Option<i32>,
pub(crate) time_delta_units: std::option::Option<crate::model::FileSourceTimeDeltaUnits>,
}
impl Builder {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn convert608_to708(mut self, input: crate::model::FileSourceConvert608To708) -> Self {
self.convert608_to708 = Some(input);
self
}
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn set_convert608_to708(
mut self,
input: std::option::Option<crate::model::FileSourceConvert608To708>,
) -> Self {
self.convert608_to708 = input;
self
}
/// Ignore this setting unless your input captions format is SCC. To have the service compensate for differing frame rates between your input captions and input video, specify the frame rate of the captions file. Specify this value as a fraction. When you work directly in your JSON job specification, use the settings framerateNumerator and framerateDenominator. For example, you might specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or 30000 / 1001 for 29.97 fps.
pub fn framerate(mut self, input: crate::model::CaptionSourceFramerate) -> Self {
self.framerate = Some(input);
self
}
/// Ignore this setting unless your input captions format is SCC. To have the service compensate for differing frame rates between your input captions and input video, specify the frame rate of the captions file. Specify this value as a fraction. When you work directly in your JSON job specification, use the settings framerateNumerator and framerateDenominator. For example, you might specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or 30000 / 1001 for 29.97 fps.
pub fn set_framerate(
mut self,
input: std::option::Option<crate::model::CaptionSourceFramerate>,
) -> Self {
self.framerate = input;
self
}
/// External caption file used for loading captions. Accepted file extensions are 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
pub fn source_file(mut self, input: impl Into<std::string::String>) -> Self {
self.source_file = Some(input.into());
self
}
/// External caption file used for loading captions. Accepted file extensions are 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
pub fn set_source_file(mut self, input: std::option::Option<std::string::String>) -> Self {
self.source_file = input;
self
}
/// Optional. Use this setting when you need to adjust the sync between your sidecar captions and your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html. Enter a positive or negative number to modify the times in the captions file. For example, type 15 to add 15 seconds to all the times in the captions file. Type -5 to subtract 5 seconds from the times in the captions file. You can optionally specify your time delta in milliseconds instead of seconds. When you do so, set the related setting, Time delta units (TimeDeltaUnits) to Milliseconds (MILLISECONDS). Note that, when you specify a time delta for timecode-based caption sources, such as SCC and STL, and your time delta isn't a multiple of the input frame rate, MediaConvert snaps the captions to the nearest frame. For example, when your input video frame rate is 25 fps and you specify 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
pub fn time_delta(mut self, input: i32) -> Self {
self.time_delta = Some(input);
self
}
/// Optional. Use this setting when you need to adjust the sync between your sidecar captions and your video. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html. Enter a positive or negative number to modify the times in the captions file. For example, type 15 to add 15 seconds to all the times in the captions file. Type -5 to subtract 5 seconds from the times in the captions file. You can optionally specify your time delta in milliseconds instead of seconds. When you do so, set the related setting, Time delta units (TimeDeltaUnits) to Milliseconds (MILLISECONDS). Note that, when you specify a time delta for timecode-based caption sources, such as SCC and STL, and your time delta isn't a multiple of the input frame rate, MediaConvert snaps the captions to the nearest frame. For example, when your input video frame rate is 25 fps and you specify 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
pub fn set_time_delta(mut self, input: std::option::Option<i32>) -> Self {
self.time_delta = input;
self
}
/// When you use the setting Time delta (TimeDelta) to adjust the sync between your sidecar captions and your video, use this setting to specify the units for the delta that you specify. When you don't specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses seconds by default.
pub fn time_delta_units(mut self, input: crate::model::FileSourceTimeDeltaUnits) -> Self {
self.time_delta_units = Some(input);
self
}
/// When you use the setting Time delta (TimeDelta) to adjust the sync between your sidecar captions and your video, use this setting to specify the units for the delta that you specify. When you don't specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses seconds by default.
pub fn set_time_delta_units(
mut self,
input: std::option::Option<crate::model::FileSourceTimeDeltaUnits>,
) -> Self {
self.time_delta_units = input;
self
}
/// Consumes the builder and constructs a [`FileSourceSettings`](crate::model::FileSourceSettings)
pub fn build(self) -> crate::model::FileSourceSettings {
crate::model::FileSourceSettings {
convert608_to708: self.convert608_to708,
framerate: self.framerate,
source_file: self.source_file,
time_delta: self.time_delta.unwrap_or_default(),
time_delta_units: self.time_delta_units,
}
}
}
}
impl FileSourceSettings {
/// Creates a new builder-style object to manufacture [`FileSourceSettings`](crate::model::FileSourceSettings)
pub fn builder() -> crate::model::file_source_settings::Builder {
crate::model::file_source_settings::Builder::default()
}
}
/// When you use the setting Time delta (TimeDelta) to adjust the sync between your sidecar captions and your video, use this setting to specify the units for the delta that you specify. When you don't specify a value for Time delta units (TimeDeltaUnits), MediaConvert uses seconds by default.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum FileSourceTimeDeltaUnits {
#[allow(missing_docs)] // documentation missing in model
Milliseconds,
#[allow(missing_docs)] // documentation missing in model
Seconds,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for FileSourceTimeDeltaUnits {
fn from(s: &str) -> Self {
match s {
"MILLISECONDS" => FileSourceTimeDeltaUnits::Milliseconds,
"SECONDS" => FileSourceTimeDeltaUnits::Seconds,
other => FileSourceTimeDeltaUnits::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for FileSourceTimeDeltaUnits {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FileSourceTimeDeltaUnits::from(s))
}
}
impl FileSourceTimeDeltaUnits {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
FileSourceTimeDeltaUnits::Milliseconds => "MILLISECONDS",
FileSourceTimeDeltaUnits::Seconds => "SECONDS",
FileSourceTimeDeltaUnits::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["MILLISECONDS", "SECONDS"]
}
}
impl AsRef<str> for FileSourceTimeDeltaUnits {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Ignore this setting unless your input captions format is SCC. To have the service compensate for differing frame rates between your input captions and input video, specify the frame rate of the captions file. Specify this value as a fraction. When you work directly in your JSON job specification, use the settings framerateNumerator and framerateDenominator. For example, you might specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or 30000 / 1001 for 29.97 fps.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CaptionSourceFramerate {
/// Specify the denominator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate numerator (framerateNumerator).
pub framerate_denominator: i32,
/// Specify the numerator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate denominator (framerateDenominator).
pub framerate_numerator: i32,
}
impl CaptionSourceFramerate {
/// Specify the denominator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate numerator (framerateNumerator).
pub fn framerate_denominator(&self) -> i32 {
self.framerate_denominator
}
/// Specify the numerator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate denominator (framerateDenominator).
pub fn framerate_numerator(&self) -> i32 {
self.framerate_numerator
}
}
impl std::fmt::Debug for CaptionSourceFramerate {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CaptionSourceFramerate");
formatter.field("framerate_denominator", &self.framerate_denominator);
formatter.field("framerate_numerator", &self.framerate_numerator);
formatter.finish()
}
}
/// See [`CaptionSourceFramerate`](crate::model::CaptionSourceFramerate)
pub mod caption_source_framerate {
/// A builder for [`CaptionSourceFramerate`](crate::model::CaptionSourceFramerate)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framerate_denominator: std::option::Option<i32>,
pub(crate) framerate_numerator: std::option::Option<i32>,
}
impl Builder {
/// Specify the denominator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate numerator (framerateNumerator).
pub fn framerate_denominator(mut self, input: i32) -> Self {
self.framerate_denominator = Some(input);
self
}
/// Specify the denominator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate numerator (framerateNumerator).
pub fn set_framerate_denominator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_denominator = input;
self
}
/// Specify the numerator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate denominator (framerateDenominator).
pub fn framerate_numerator(mut self, input: i32) -> Self {
self.framerate_numerator = Some(input);
self
}
/// Specify the numerator of the fraction that represents the frame rate for the setting Caption source frame rate (CaptionSourceFramerate). Use this setting along with the setting Framerate denominator (framerateDenominator).
pub fn set_framerate_numerator(mut self, input: std::option::Option<i32>) -> Self {
self.framerate_numerator = input;
self
}
/// Consumes the builder and constructs a [`CaptionSourceFramerate`](crate::model::CaptionSourceFramerate)
pub fn build(self) -> crate::model::CaptionSourceFramerate {
crate::model::CaptionSourceFramerate {
framerate_denominator: self.framerate_denominator.unwrap_or_default(),
framerate_numerator: self.framerate_numerator.unwrap_or_default(),
}
}
}
}
impl CaptionSourceFramerate {
/// Creates a new builder-style object to manufacture [`CaptionSourceFramerate`](crate::model::CaptionSourceFramerate)
pub fn builder() -> crate::model::caption_source_framerate::Builder {
crate::model::caption_source_framerate::Builder::default()
}
}
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum FileSourceConvert608To708 {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Upconvert,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for FileSourceConvert608To708 {
fn from(s: &str) -> Self {
match s {
"DISABLED" => FileSourceConvert608To708::Disabled,
"UPCONVERT" => FileSourceConvert608To708::Upconvert,
other => FileSourceConvert608To708::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for FileSourceConvert608To708 {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FileSourceConvert608To708::from(s))
}
}
impl FileSourceConvert608To708 {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
FileSourceConvert608To708::Disabled => "DISABLED",
FileSourceConvert608To708::Upconvert => "UPCONVERT",
FileSourceConvert608To708::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "UPCONVERT"]
}
}
impl AsRef<str> for FileSourceConvert608To708 {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for embedded captions Source
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EmbeddedSourceSettings {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub convert608_to708: std::option::Option<crate::model::EmbeddedConvert608To708>,
/// Specifies the 608/708 channel number within the video track from which to extract captions. Unused for passthrough.
pub source608_channel_number: i32,
/// Specifies the video track index used for extracting captions. The system only supports one input video track, so this should always be set to '1'.
pub source608_track_number: i32,
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub terminate_captions: std::option::Option<crate::model::EmbeddedTerminateCaptions>,
}
impl EmbeddedSourceSettings {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn convert608_to708(&self) -> std::option::Option<&crate::model::EmbeddedConvert608To708> {
self.convert608_to708.as_ref()
}
/// Specifies the 608/708 channel number within the video track from which to extract captions. Unused for passthrough.
pub fn source608_channel_number(&self) -> i32 {
self.source608_channel_number
}
/// Specifies the video track index used for extracting captions. The system only supports one input video track, so this should always be set to '1'.
pub fn source608_track_number(&self) -> i32 {
self.source608_track_number
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub fn terminate_captions(
&self,
) -> std::option::Option<&crate::model::EmbeddedTerminateCaptions> {
self.terminate_captions.as_ref()
}
}
impl std::fmt::Debug for EmbeddedSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EmbeddedSourceSettings");
formatter.field("convert608_to708", &self.convert608_to708);
formatter.field("source608_channel_number", &self.source608_channel_number);
formatter.field("source608_track_number", &self.source608_track_number);
formatter.field("terminate_captions", &self.terminate_captions);
formatter.finish()
}
}
/// See [`EmbeddedSourceSettings`](crate::model::EmbeddedSourceSettings)
pub mod embedded_source_settings {
/// A builder for [`EmbeddedSourceSettings`](crate::model::EmbeddedSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) convert608_to708: std::option::Option<crate::model::EmbeddedConvert608To708>,
pub(crate) source608_channel_number: std::option::Option<i32>,
pub(crate) source608_track_number: std::option::Option<i32>,
pub(crate) terminate_captions: std::option::Option<crate::model::EmbeddedTerminateCaptions>,
}
impl Builder {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn convert608_to708(mut self, input: crate::model::EmbeddedConvert608To708) -> Self {
self.convert608_to708 = Some(input);
self
}
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn set_convert608_to708(
mut self,
input: std::option::Option<crate::model::EmbeddedConvert608To708>,
) -> Self {
self.convert608_to708 = input;
self
}
/// Specifies the 608/708 channel number within the video track from which to extract captions. Unused for passthrough.
pub fn source608_channel_number(mut self, input: i32) -> Self {
self.source608_channel_number = Some(input);
self
}
/// Specifies the 608/708 channel number within the video track from which to extract captions. Unused for passthrough.
pub fn set_source608_channel_number(mut self, input: std::option::Option<i32>) -> Self {
self.source608_channel_number = input;
self
}
/// Specifies the video track index used for extracting captions. The system only supports one input video track, so this should always be set to '1'.
pub fn source608_track_number(mut self, input: i32) -> Self {
self.source608_track_number = Some(input);
self
}
/// Specifies the video track index used for extracting captions. The system only supports one input video track, so this should always be set to '1'.
pub fn set_source608_track_number(mut self, input: std::option::Option<i32>) -> Self {
self.source608_track_number = input;
self
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub fn terminate_captions(
mut self,
input: crate::model::EmbeddedTerminateCaptions,
) -> Self {
self.terminate_captions = Some(input);
self
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub fn set_terminate_captions(
mut self,
input: std::option::Option<crate::model::EmbeddedTerminateCaptions>,
) -> Self {
self.terminate_captions = input;
self
}
/// Consumes the builder and constructs a [`EmbeddedSourceSettings`](crate::model::EmbeddedSourceSettings)
pub fn build(self) -> crate::model::EmbeddedSourceSettings {
crate::model::EmbeddedSourceSettings {
convert608_to708: self.convert608_to708,
source608_channel_number: self.source608_channel_number.unwrap_or_default(),
source608_track_number: self.source608_track_number.unwrap_or_default(),
terminate_captions: self.terminate_captions,
}
}
}
}
impl EmbeddedSourceSettings {
/// Creates a new builder-style object to manufacture [`EmbeddedSourceSettings`](crate::model::EmbeddedSourceSettings)
pub fn builder() -> crate::model::embedded_source_settings::Builder {
crate::model::embedded_source_settings::Builder::default()
}
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EmbeddedTerminateCaptions {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
EndOfInput,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for EmbeddedTerminateCaptions {
fn from(s: &str) -> Self {
match s {
"DISABLED" => EmbeddedTerminateCaptions::Disabled,
"END_OF_INPUT" => EmbeddedTerminateCaptions::EndOfInput,
other => EmbeddedTerminateCaptions::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for EmbeddedTerminateCaptions {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EmbeddedTerminateCaptions::from(s))
}
}
impl EmbeddedTerminateCaptions {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
EmbeddedTerminateCaptions::Disabled => "DISABLED",
EmbeddedTerminateCaptions::EndOfInput => "END_OF_INPUT",
EmbeddedTerminateCaptions::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "END_OF_INPUT"]
}
}
impl AsRef<str> for EmbeddedTerminateCaptions {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EmbeddedConvert608To708 {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Upconvert,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for EmbeddedConvert608To708 {
fn from(s: &str) -> Self {
match s {
"DISABLED" => EmbeddedConvert608To708::Disabled,
"UPCONVERT" => EmbeddedConvert608To708::Upconvert,
other => EmbeddedConvert608To708::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for EmbeddedConvert608To708 {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EmbeddedConvert608To708::from(s))
}
}
impl EmbeddedConvert608To708 {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
EmbeddedConvert608To708::Disabled => "DISABLED",
EmbeddedConvert608To708::Upconvert => "UPCONVERT",
EmbeddedConvert608To708::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "UPCONVERT"]
}
}
impl AsRef<str> for EmbeddedConvert608To708 {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// DVB Sub Source Settings
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DvbSubSourceSettings {
/// When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, regardless of selectors.
pub pid: i32,
}
impl DvbSubSourceSettings {
/// When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, regardless of selectors.
pub fn pid(&self) -> i32 {
self.pid
}
}
impl std::fmt::Debug for DvbSubSourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DvbSubSourceSettings");
formatter.field("pid", &self.pid);
formatter.finish()
}
}
/// See [`DvbSubSourceSettings`](crate::model::DvbSubSourceSettings)
pub mod dvb_sub_source_settings {
/// A builder for [`DvbSubSourceSettings`](crate::model::DvbSubSourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) pid: std::option::Option<i32>,
}
impl Builder {
/// When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, regardless of selectors.
pub fn pid(mut self, input: i32) -> Self {
self.pid = Some(input);
self
}
/// When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, regardless of selectors.
pub fn set_pid(mut self, input: std::option::Option<i32>) -> Self {
self.pid = input;
self
}
/// Consumes the builder and constructs a [`DvbSubSourceSettings`](crate::model::DvbSubSourceSettings)
pub fn build(self) -> crate::model::DvbSubSourceSettings {
crate::model::DvbSubSourceSettings {
pid: self.pid.unwrap_or_default(),
}
}
}
}
impl DvbSubSourceSettings {
/// Creates a new builder-style object to manufacture [`DvbSubSourceSettings`](crate::model::DvbSubSourceSettings)
pub fn builder() -> crate::model::dvb_sub_source_settings::Builder {
crate::model::dvb_sub_source_settings::Builder::default()
}
}
/// Settings for ancillary captions source.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AncillarySourceSettings {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub convert608_to708: std::option::Option<crate::model::AncillaryConvert608To708>,
/// Specifies the 608 channel number in the ancillary data track from which to extract captions. Unused for passthrough.
pub source_ancillary_channel_number: i32,
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub terminate_captions: std::option::Option<crate::model::AncillaryTerminateCaptions>,
}
impl AncillarySourceSettings {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn convert608_to708(&self) -> std::option::Option<&crate::model::AncillaryConvert608To708> {
self.convert608_to708.as_ref()
}
/// Specifies the 608 channel number in the ancillary data track from which to extract captions. Unused for passthrough.
pub fn source_ancillary_channel_number(&self) -> i32 {
self.source_ancillary_channel_number
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub fn terminate_captions(
&self,
) -> std::option::Option<&crate::model::AncillaryTerminateCaptions> {
self.terminate_captions.as_ref()
}
}
impl std::fmt::Debug for AncillarySourceSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AncillarySourceSettings");
formatter.field("convert608_to708", &self.convert608_to708);
formatter.field(
"source_ancillary_channel_number",
&self.source_ancillary_channel_number,
);
formatter.field("terminate_captions", &self.terminate_captions);
formatter.finish()
}
}
/// See [`AncillarySourceSettings`](crate::model::AncillarySourceSettings)
pub mod ancillary_source_settings {
/// A builder for [`AncillarySourceSettings`](crate::model::AncillarySourceSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) convert608_to708: std::option::Option<crate::model::AncillaryConvert608To708>,
pub(crate) source_ancillary_channel_number: std::option::Option<i32>,
pub(crate) terminate_captions:
std::option::Option<crate::model::AncillaryTerminateCaptions>,
}
impl Builder {
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn convert608_to708(mut self, input: crate::model::AncillaryConvert608To708) -> Self {
self.convert608_to708 = Some(input);
self
}
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
pub fn set_convert608_to708(
mut self,
input: std::option::Option<crate::model::AncillaryConvert608To708>,
) -> Self {
self.convert608_to708 = input;
self
}
/// Specifies the 608 channel number in the ancillary data track from which to extract captions. Unused for passthrough.
pub fn source_ancillary_channel_number(mut self, input: i32) -> Self {
self.source_ancillary_channel_number = Some(input);
self
}
/// Specifies the 608 channel number in the ancillary data track from which to extract captions. Unused for passthrough.
pub fn set_source_ancillary_channel_number(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.source_ancillary_channel_number = input;
self
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub fn terminate_captions(
mut self,
input: crate::model::AncillaryTerminateCaptions,
) -> Self {
self.terminate_captions = Some(input);
self
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
pub fn set_terminate_captions(
mut self,
input: std::option::Option<crate::model::AncillaryTerminateCaptions>,
) -> Self {
self.terminate_captions = input;
self
}
/// Consumes the builder and constructs a [`AncillarySourceSettings`](crate::model::AncillarySourceSettings)
pub fn build(self) -> crate::model::AncillarySourceSettings {
crate::model::AncillarySourceSettings {
convert608_to708: self.convert608_to708,
source_ancillary_channel_number: self
.source_ancillary_channel_number
.unwrap_or_default(),
terminate_captions: self.terminate_captions,
}
}
}
}
impl AncillarySourceSettings {
/// Creates a new builder-style object to manufacture [`AncillarySourceSettings`](crate::model::AncillarySourceSettings)
pub fn builder() -> crate::model::ancillary_source_settings::Builder {
crate::model::ancillary_source_settings::Builder::default()
}
}
/// By default, the service terminates any unterminated captions at the end of each input. If you want the caption to continue onto your next input, disable this setting.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AncillaryTerminateCaptions {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
EndOfInput,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AncillaryTerminateCaptions {
fn from(s: &str) -> Self {
match s {
"DISABLED" => AncillaryTerminateCaptions::Disabled,
"END_OF_INPUT" => AncillaryTerminateCaptions::EndOfInput,
other => AncillaryTerminateCaptions::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AncillaryTerminateCaptions {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AncillaryTerminateCaptions::from(s))
}
}
impl AncillaryTerminateCaptions {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AncillaryTerminateCaptions::Disabled => "DISABLED",
AncillaryTerminateCaptions::EndOfInput => "END_OF_INPUT",
AncillaryTerminateCaptions::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "END_OF_INPUT"]
}
}
impl AsRef<str> for AncillaryTerminateCaptions {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 compatibility bytes fields of the 708 wrapper, and it also translates the 608 data into 708.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AncillaryConvert608To708 {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Upconvert,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AncillaryConvert608To708 {
fn from(s: &str) -> Self {
match s {
"DISABLED" => AncillaryConvert608To708::Disabled,
"UPCONVERT" => AncillaryConvert608To708::Upconvert,
other => AncillaryConvert608To708::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AncillaryConvert608To708 {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AncillaryConvert608To708::from(s))
}
}
impl AncillaryConvert608To708 {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AncillaryConvert608To708::Disabled => "DISABLED",
AncillaryConvert608To708::Upconvert => "UPCONVERT",
AncillaryConvert608To708::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "UPCONVERT"]
}
}
impl AsRef<str> for AncillaryConvert608To708 {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AudioSelector {
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub audio_duration_correction: std::option::Option<crate::model::AudioDurationCorrection>,
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub custom_language_code: std::option::Option<std::string::String>,
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub default_selection: std::option::Option<crate::model::AudioDefaultSelection>,
/// Specifies audio data from an external file source.
pub external_audio_file_input: std::option::Option<std::string::String>,
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub hls_rendition_group_settings: std::option::Option<crate::model::HlsRenditionGroupSettings>,
/// Selects a specific language code from within an audio source.
pub language_code: std::option::Option<crate::model::LanguageCode>,
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub offset: i32,
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub pids: std::option::Option<std::vec::Vec<i32>>,
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If you are sending a JSON file, provide the program ID, which is part of the audio metadata. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub program_selection: i32,
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub remix_settings: std::option::Option<crate::model::RemixSettings>,
/// Specifies the type of the audio selector.
pub selector_type: std::option::Option<crate::model::AudioSelectorType>,
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For examle, type "1,2,3" to include tracks 1 through 3. Specifying directly in your JSON job file, provide the track numbers in an array. For example, "tracks": [1,2,3].
pub tracks: std::option::Option<std::vec::Vec<i32>>,
}
impl AudioSelector {
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn audio_duration_correction(
&self,
) -> std::option::Option<&crate::model::AudioDurationCorrection> {
self.audio_duration_correction.as_ref()
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn custom_language_code(&self) -> std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn default_selection(&self) -> std::option::Option<&crate::model::AudioDefaultSelection> {
self.default_selection.as_ref()
}
/// Specifies audio data from an external file source.
pub fn external_audio_file_input(&self) -> std::option::Option<&str> {
self.external_audio_file_input.as_deref()
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn hls_rendition_group_settings(
&self,
) -> std::option::Option<&crate::model::HlsRenditionGroupSettings> {
self.hls_rendition_group_settings.as_ref()
}
/// Selects a specific language code from within an audio source.
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn offset(&self) -> i32 {
self.offset
}
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub fn pids(&self) -> std::option::Option<&[i32]> {
self.pids.as_deref()
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If you are sending a JSON file, provide the program ID, which is part of the audio metadata. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn program_selection(&self) -> i32 {
self.program_selection
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn remix_settings(&self) -> std::option::Option<&crate::model::RemixSettings> {
self.remix_settings.as_ref()
}
/// Specifies the type of the audio selector.
pub fn selector_type(&self) -> std::option::Option<&crate::model::AudioSelectorType> {
self.selector_type.as_ref()
}
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For examle, type "1,2,3" to include tracks 1 through 3. Specifying directly in your JSON job file, provide the track numbers in an array. For example, "tracks": [1,2,3].
pub fn tracks(&self) -> std::option::Option<&[i32]> {
self.tracks.as_deref()
}
}
impl std::fmt::Debug for AudioSelector {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AudioSelector");
formatter.field("audio_duration_correction", &self.audio_duration_correction);
formatter.field("custom_language_code", &self.custom_language_code);
formatter.field("default_selection", &self.default_selection);
formatter.field("external_audio_file_input", &self.external_audio_file_input);
formatter.field(
"hls_rendition_group_settings",
&self.hls_rendition_group_settings,
);
formatter.field("language_code", &self.language_code);
formatter.field("offset", &self.offset);
formatter.field("pids", &self.pids);
formatter.field("program_selection", &self.program_selection);
formatter.field("remix_settings", &self.remix_settings);
formatter.field("selector_type", &self.selector_type);
formatter.field("tracks", &self.tracks);
formatter.finish()
}
}
/// See [`AudioSelector`](crate::model::AudioSelector)
pub mod audio_selector {
/// A builder for [`AudioSelector`](crate::model::AudioSelector)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_duration_correction:
std::option::Option<crate::model::AudioDurationCorrection>,
pub(crate) custom_language_code: std::option::Option<std::string::String>,
pub(crate) default_selection: std::option::Option<crate::model::AudioDefaultSelection>,
pub(crate) external_audio_file_input: std::option::Option<std::string::String>,
pub(crate) hls_rendition_group_settings:
std::option::Option<crate::model::HlsRenditionGroupSettings>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) offset: std::option::Option<i32>,
pub(crate) pids: std::option::Option<std::vec::Vec<i32>>,
pub(crate) program_selection: std::option::Option<i32>,
pub(crate) remix_settings: std::option::Option<crate::model::RemixSettings>,
pub(crate) selector_type: std::option::Option<crate::model::AudioSelectorType>,
pub(crate) tracks: std::option::Option<std::vec::Vec<i32>>,
}
impl Builder {
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn audio_duration_correction(
mut self,
input: crate::model::AudioDurationCorrection,
) -> Self {
self.audio_duration_correction = Some(input);
self
}
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn set_audio_duration_correction(
mut self,
input: std::option::Option<crate::model::AudioDurationCorrection>,
) -> Self {
self.audio_duration_correction = input;
self
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn custom_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_language_code = Some(input.into());
self
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn set_custom_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_language_code = input;
self
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn default_selection(mut self, input: crate::model::AudioDefaultSelection) -> Self {
self.default_selection = Some(input);
self
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn set_default_selection(
mut self,
input: std::option::Option<crate::model::AudioDefaultSelection>,
) -> Self {
self.default_selection = input;
self
}
/// Specifies audio data from an external file source.
pub fn external_audio_file_input(mut self, input: impl Into<std::string::String>) -> Self {
self.external_audio_file_input = Some(input.into());
self
}
/// Specifies audio data from an external file source.
pub fn set_external_audio_file_input(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.external_audio_file_input = input;
self
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn hls_rendition_group_settings(
mut self,
input: crate::model::HlsRenditionGroupSettings,
) -> Self {
self.hls_rendition_group_settings = Some(input);
self
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn set_hls_rendition_group_settings(
mut self,
input: std::option::Option<crate::model::HlsRenditionGroupSettings>,
) -> Self {
self.hls_rendition_group_settings = input;
self
}
/// Selects a specific language code from within an audio source.
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
/// Selects a specific language code from within an audio source.
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn offset(mut self, input: i32) -> Self {
self.offset = Some(input);
self
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn set_offset(mut self, input: std::option::Option<i32>) -> Self {
self.offset = input;
self
}
/// Appends an item to `pids`.
///
/// To override the contents of this collection use [`set_pids`](Self::set_pids).
///
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub fn pids(mut self, input: i32) -> Self {
let mut v = self.pids.unwrap_or_default();
v.push(input);
self.pids = Some(v);
self
}
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub fn set_pids(mut self, input: std::option::Option<std::vec::Vec<i32>>) -> Self {
self.pids = input;
self
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If you are sending a JSON file, provide the program ID, which is part of the audio metadata. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn program_selection(mut self, input: i32) -> Self {
self.program_selection = Some(input);
self
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If you are sending a JSON file, provide the program ID, which is part of the audio metadata. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn set_program_selection(mut self, input: std::option::Option<i32>) -> Self {
self.program_selection = input;
self
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn remix_settings(mut self, input: crate::model::RemixSettings) -> Self {
self.remix_settings = Some(input);
self
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn set_remix_settings(
mut self,
input: std::option::Option<crate::model::RemixSettings>,
) -> Self {
self.remix_settings = input;
self
}
/// Specifies the type of the audio selector.
pub fn selector_type(mut self, input: crate::model::AudioSelectorType) -> Self {
self.selector_type = Some(input);
self
}
/// Specifies the type of the audio selector.
pub fn set_selector_type(
mut self,
input: std::option::Option<crate::model::AudioSelectorType>,
) -> Self {
self.selector_type = input;
self
}
/// Appends an item to `tracks`.
///
/// To override the contents of this collection use [`set_tracks`](Self::set_tracks).
///
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For examle, type "1,2,3" to include tracks 1 through 3. Specifying directly in your JSON job file, provide the track numbers in an array. For example, "tracks": [1,2,3].
pub fn tracks(mut self, input: i32) -> Self {
let mut v = self.tracks.unwrap_or_default();
v.push(input);
self.tracks = Some(v);
self
}
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For examle, type "1,2,3" to include tracks 1 through 3. Specifying directly in your JSON job file, provide the track numbers in an array. For example, "tracks": [1,2,3].
pub fn set_tracks(mut self, input: std::option::Option<std::vec::Vec<i32>>) -> Self {
self.tracks = input;
self
}
/// Consumes the builder and constructs a [`AudioSelector`](crate::model::AudioSelector)
pub fn build(self) -> crate::model::AudioSelector {
crate::model::AudioSelector {
audio_duration_correction: self.audio_duration_correction,
custom_language_code: self.custom_language_code,
default_selection: self.default_selection,
external_audio_file_input: self.external_audio_file_input,
hls_rendition_group_settings: self.hls_rendition_group_settings,
language_code: self.language_code,
offset: self.offset.unwrap_or_default(),
pids: self.pids,
program_selection: self.program_selection.unwrap_or_default(),
remix_settings: self.remix_settings,
selector_type: self.selector_type,
tracks: self.tracks,
}
}
}
}
impl AudioSelector {
/// Creates a new builder-style object to manufacture [`AudioSelector`](crate::model::AudioSelector)
pub fn builder() -> crate::model::audio_selector::Builder {
crate::model::audio_selector::Builder::default()
}
}
/// Specifies the type of the audio selector.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioSelectorType {
#[allow(missing_docs)] // documentation missing in model
HlsRenditionGroup,
#[allow(missing_docs)] // documentation missing in model
LanguageCode,
#[allow(missing_docs)] // documentation missing in model
Pid,
#[allow(missing_docs)] // documentation missing in model
Track,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioSelectorType {
fn from(s: &str) -> Self {
match s {
"HLS_RENDITION_GROUP" => AudioSelectorType::HlsRenditionGroup,
"LANGUAGE_CODE" => AudioSelectorType::LanguageCode,
"PID" => AudioSelectorType::Pid,
"TRACK" => AudioSelectorType::Track,
other => AudioSelectorType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioSelectorType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioSelectorType::from(s))
}
}
impl AudioSelectorType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioSelectorType::HlsRenditionGroup => "HLS_RENDITION_GROUP",
AudioSelectorType::LanguageCode => "LANGUAGE_CODE",
AudioSelectorType::Pid => "PID",
AudioSelectorType::Track => "TRACK",
AudioSelectorType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HLS_RENDITION_GROUP", "LANGUAGE_CODE", "PID", "TRACK"]
}
}
impl AsRef<str> for AudioSelectorType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsRenditionGroupSettings {
/// Optional. Specify alternative group ID
pub rendition_group_id: std::option::Option<std::string::String>,
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub rendition_language_code: std::option::Option<crate::model::LanguageCode>,
/// Optional. Specify media name
pub rendition_name: std::option::Option<std::string::String>,
}
impl HlsRenditionGroupSettings {
/// Optional. Specify alternative group ID
pub fn rendition_group_id(&self) -> std::option::Option<&str> {
self.rendition_group_id.as_deref()
}
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub fn rendition_language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.rendition_language_code.as_ref()
}
/// Optional. Specify media name
pub fn rendition_name(&self) -> std::option::Option<&str> {
self.rendition_name.as_deref()
}
}
impl std::fmt::Debug for HlsRenditionGroupSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HlsRenditionGroupSettings");
formatter.field("rendition_group_id", &self.rendition_group_id);
formatter.field("rendition_language_code", &self.rendition_language_code);
formatter.field("rendition_name", &self.rendition_name);
formatter.finish()
}
}
/// See [`HlsRenditionGroupSettings`](crate::model::HlsRenditionGroupSettings)
pub mod hls_rendition_group_settings {
/// A builder for [`HlsRenditionGroupSettings`](crate::model::HlsRenditionGroupSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) rendition_group_id: std::option::Option<std::string::String>,
pub(crate) rendition_language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) rendition_name: std::option::Option<std::string::String>,
}
impl Builder {
/// Optional. Specify alternative group ID
pub fn rendition_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.rendition_group_id = Some(input.into());
self
}
/// Optional. Specify alternative group ID
pub fn set_rendition_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.rendition_group_id = input;
self
}
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub fn rendition_language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.rendition_language_code = Some(input);
self
}
/// Optional. Specify ISO 639-2 or ISO 639-3 code in the language property
pub fn set_rendition_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.rendition_language_code = input;
self
}
/// Optional. Specify media name
pub fn rendition_name(mut self, input: impl Into<std::string::String>) -> Self {
self.rendition_name = Some(input.into());
self
}
/// Optional. Specify media name
pub fn set_rendition_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.rendition_name = input;
self
}
/// Consumes the builder and constructs a [`HlsRenditionGroupSettings`](crate::model::HlsRenditionGroupSettings)
pub fn build(self) -> crate::model::HlsRenditionGroupSettings {
crate::model::HlsRenditionGroupSettings {
rendition_group_id: self.rendition_group_id,
rendition_language_code: self.rendition_language_code,
rendition_name: self.rendition_name,
}
}
}
}
impl HlsRenditionGroupSettings {
/// Creates a new builder-style object to manufacture [`HlsRenditionGroupSettings`](crate::model::HlsRenditionGroupSettings)
pub fn builder() -> crate::model::hls_rendition_group_settings::Builder {
crate::model::hls_rendition_group_settings::Builder::default()
}
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioDefaultSelection {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
NotDefault,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioDefaultSelection {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => AudioDefaultSelection::Default,
"NOT_DEFAULT" => AudioDefaultSelection::NotDefault,
other => AudioDefaultSelection::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioDefaultSelection {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioDefaultSelection::from(s))
}
}
impl AudioDefaultSelection {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioDefaultSelection::Default => "DEFAULT",
AudioDefaultSelection::NotDefault => "NOT_DEFAULT",
AudioDefaultSelection::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "NOT_DEFAULT"]
}
}
impl AsRef<str> for AudioDefaultSelection {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AudioDurationCorrection {
#[allow(missing_docs)] // documentation missing in model
Auto,
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Frame,
#[allow(missing_docs)] // documentation missing in model
Track,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AudioDurationCorrection {
fn from(s: &str) -> Self {
match s {
"AUTO" => AudioDurationCorrection::Auto,
"DISABLED" => AudioDurationCorrection::Disabled,
"FRAME" => AudioDurationCorrection::Frame,
"TRACK" => AudioDurationCorrection::Track,
other => AudioDurationCorrection::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AudioDurationCorrection {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AudioDurationCorrection::from(s))
}
}
impl AudioDurationCorrection {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AudioDurationCorrection::Auto => "AUTO",
AudioDurationCorrection::Disabled => "DISABLED",
AudioDurationCorrection::Frame => "FRAME",
AudioDurationCorrection::Track => "TRACK",
AudioDurationCorrection::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AUTO", "DISABLED", "FRAME", "TRACK"]
}
}
impl AsRef<str> for AudioDurationCorrection {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AudioSelectorGroup {
/// Name of an Audio Selector within the same input to include in the group. Audio selector names are standardized, based on their order within the input (e.g., "Audio Selector 1"). The audio selector name parameter can be repeated to add any number of audio selectors to the group.
pub audio_selector_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl AudioSelectorGroup {
/// Name of an Audio Selector within the same input to include in the group. Audio selector names are standardized, based on their order within the input (e.g., "Audio Selector 1"). The audio selector name parameter can be repeated to add any number of audio selectors to the group.
pub fn audio_selector_names(&self) -> std::option::Option<&[std::string::String]> {
self.audio_selector_names.as_deref()
}
}
impl std::fmt::Debug for AudioSelectorGroup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AudioSelectorGroup");
formatter.field("audio_selector_names", &self.audio_selector_names);
formatter.finish()
}
}
/// See [`AudioSelectorGroup`](crate::model::AudioSelectorGroup)
pub mod audio_selector_group {
/// A builder for [`AudioSelectorGroup`](crate::model::AudioSelectorGroup)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_selector_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Appends an item to `audio_selector_names`.
///
/// To override the contents of this collection use [`set_audio_selector_names`](Self::set_audio_selector_names).
///
/// Name of an Audio Selector within the same input to include in the group. Audio selector names are standardized, based on their order within the input (e.g., "Audio Selector 1"). The audio selector name parameter can be repeated to add any number of audio selectors to the group.
pub fn audio_selector_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.audio_selector_names.unwrap_or_default();
v.push(input.into());
self.audio_selector_names = Some(v);
self
}
/// Name of an Audio Selector within the same input to include in the group. Audio selector names are standardized, based on their order within the input (e.g., "Audio Selector 1"). The audio selector name parameter can be repeated to add any number of audio selectors to the group.
pub fn set_audio_selector_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.audio_selector_names = input;
self
}
/// Consumes the builder and constructs a [`AudioSelectorGroup`](crate::model::AudioSelectorGroup)
pub fn build(self) -> crate::model::AudioSelectorGroup {
crate::model::AudioSelectorGroup {
audio_selector_names: self.audio_selector_names,
}
}
}
}
impl AudioSelectorGroup {
/// Creates a new builder-style object to manufacture [`AudioSelectorGroup`](crate::model::AudioSelectorGroup)
pub fn builder() -> crate::model::audio_selector_group::Builder {
crate::model::audio_selector_group::Builder::default()
}
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExtendedDataServices {
/// The action to take on copy and redistribution control XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub copy_protection_action: std::option::Option<crate::model::CopyProtectionAction>,
/// The action to take on content advisory XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub vchip_action: std::option::Option<crate::model::VchipAction>,
}
impl ExtendedDataServices {
/// The action to take on copy and redistribution control XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub fn copy_protection_action(
&self,
) -> std::option::Option<&crate::model::CopyProtectionAction> {
self.copy_protection_action.as_ref()
}
/// The action to take on content advisory XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub fn vchip_action(&self) -> std::option::Option<&crate::model::VchipAction> {
self.vchip_action.as_ref()
}
}
impl std::fmt::Debug for ExtendedDataServices {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ExtendedDataServices");
formatter.field("copy_protection_action", &self.copy_protection_action);
formatter.field("vchip_action", &self.vchip_action);
formatter.finish()
}
}
/// See [`ExtendedDataServices`](crate::model::ExtendedDataServices)
pub mod extended_data_services {
/// A builder for [`ExtendedDataServices`](crate::model::ExtendedDataServices)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) copy_protection_action: std::option::Option<crate::model::CopyProtectionAction>,
pub(crate) vchip_action: std::option::Option<crate::model::VchipAction>,
}
impl Builder {
/// The action to take on copy and redistribution control XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub fn copy_protection_action(mut self, input: crate::model::CopyProtectionAction) -> Self {
self.copy_protection_action = Some(input);
self
}
/// The action to take on copy and redistribution control XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub fn set_copy_protection_action(
mut self,
input: std::option::Option<crate::model::CopyProtectionAction>,
) -> Self {
self.copy_protection_action = input;
self
}
/// The action to take on content advisory XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub fn vchip_action(mut self, input: crate::model::VchipAction) -> Self {
self.vchip_action = Some(input);
self
}
/// The action to take on content advisory XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
pub fn set_vchip_action(
mut self,
input: std::option::Option<crate::model::VchipAction>,
) -> Self {
self.vchip_action = input;
self
}
/// Consumes the builder and constructs a [`ExtendedDataServices`](crate::model::ExtendedDataServices)
pub fn build(self) -> crate::model::ExtendedDataServices {
crate::model::ExtendedDataServices {
copy_protection_action: self.copy_protection_action,
vchip_action: self.vchip_action,
}
}
}
}
impl ExtendedDataServices {
/// Creates a new builder-style object to manufacture [`ExtendedDataServices`](crate::model::ExtendedDataServices)
pub fn builder() -> crate::model::extended_data_services::Builder {
crate::model::extended_data_services::Builder::default()
}
}
/// The action to take on content advisory XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum VchipAction {
#[allow(missing_docs)] // documentation missing in model
Passthrough,
#[allow(missing_docs)] // documentation missing in model
Strip,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for VchipAction {
fn from(s: &str) -> Self {
match s {
"PASSTHROUGH" => VchipAction::Passthrough,
"STRIP" => VchipAction::Strip,
other => VchipAction::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for VchipAction {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(VchipAction::from(s))
}
}
impl VchipAction {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
VchipAction::Passthrough => "PASSTHROUGH",
VchipAction::Strip => "STRIP",
VchipAction::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["PASSTHROUGH", "STRIP"]
}
}
impl AsRef<str> for VchipAction {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The action to take on copy and redistribution control XDS packets. If you select PASSTHROUGH, packets will not be changed. If you select STRIP, any packets will be removed in output captions.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CopyProtectionAction {
#[allow(missing_docs)] // documentation missing in model
Passthrough,
#[allow(missing_docs)] // documentation missing in model
Strip,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CopyProtectionAction {
fn from(s: &str) -> Self {
match s {
"PASSTHROUGH" => CopyProtectionAction::Passthrough,
"STRIP" => CopyProtectionAction::Strip,
other => CopyProtectionAction::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CopyProtectionAction {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CopyProtectionAction::from(s))
}
}
impl CopyProtectionAction {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CopyProtectionAction::Passthrough => "PASSTHROUGH",
CopyProtectionAction::Strip => "STRIP",
CopyProtectionAction::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["PASSTHROUGH", "STRIP"]
}
}
impl AsRef<str> for CopyProtectionAction {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EsamSettings {
/// Specifies an ESAM ManifestConfirmConditionNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the manifest conditioning instructions that you provide in the setting MCC XML (mccXml).
pub manifest_confirm_condition_notification:
std::option::Option<crate::model::EsamManifestConfirmConditionNotification>,
/// Specifies the stream distance, in milliseconds, between the SCTE 35 messages that the transcoder places and the splice points that they refer to. If the time between the start of the asset and the SCTE-35 message is less than this value, then the transcoder places the SCTE-35 marker at the beginning of the stream.
pub response_signal_preroll: i32,
/// Specifies an ESAM SignalProcessingNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the signal processing instructions that you provide in the setting SCC XML (sccXml).
pub signal_processing_notification:
std::option::Option<crate::model::EsamSignalProcessingNotification>,
}
impl EsamSettings {
/// Specifies an ESAM ManifestConfirmConditionNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the manifest conditioning instructions that you provide in the setting MCC XML (mccXml).
pub fn manifest_confirm_condition_notification(
&self,
) -> std::option::Option<&crate::model::EsamManifestConfirmConditionNotification> {
self.manifest_confirm_condition_notification.as_ref()
}
/// Specifies the stream distance, in milliseconds, between the SCTE 35 messages that the transcoder places and the splice points that they refer to. If the time between the start of the asset and the SCTE-35 message is less than this value, then the transcoder places the SCTE-35 marker at the beginning of the stream.
pub fn response_signal_preroll(&self) -> i32 {
self.response_signal_preroll
}
/// Specifies an ESAM SignalProcessingNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the signal processing instructions that you provide in the setting SCC XML (sccXml).
pub fn signal_processing_notification(
&self,
) -> std::option::Option<&crate::model::EsamSignalProcessingNotification> {
self.signal_processing_notification.as_ref()
}
}
impl std::fmt::Debug for EsamSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EsamSettings");
formatter.field(
"manifest_confirm_condition_notification",
&self.manifest_confirm_condition_notification,
);
formatter.field("response_signal_preroll", &self.response_signal_preroll);
formatter.field(
"signal_processing_notification",
&self.signal_processing_notification,
);
formatter.finish()
}
}
/// See [`EsamSettings`](crate::model::EsamSettings)
pub mod esam_settings {
/// A builder for [`EsamSettings`](crate::model::EsamSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) manifest_confirm_condition_notification:
std::option::Option<crate::model::EsamManifestConfirmConditionNotification>,
pub(crate) response_signal_preroll: std::option::Option<i32>,
pub(crate) signal_processing_notification:
std::option::Option<crate::model::EsamSignalProcessingNotification>,
}
impl Builder {
/// Specifies an ESAM ManifestConfirmConditionNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the manifest conditioning instructions that you provide in the setting MCC XML (mccXml).
pub fn manifest_confirm_condition_notification(
mut self,
input: crate::model::EsamManifestConfirmConditionNotification,
) -> Self {
self.manifest_confirm_condition_notification = Some(input);
self
}
/// Specifies an ESAM ManifestConfirmConditionNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the manifest conditioning instructions that you provide in the setting MCC XML (mccXml).
pub fn set_manifest_confirm_condition_notification(
mut self,
input: std::option::Option<crate::model::EsamManifestConfirmConditionNotification>,
) -> Self {
self.manifest_confirm_condition_notification = input;
self
}
/// Specifies the stream distance, in milliseconds, between the SCTE 35 messages that the transcoder places and the splice points that they refer to. If the time between the start of the asset and the SCTE-35 message is less than this value, then the transcoder places the SCTE-35 marker at the beginning of the stream.
pub fn response_signal_preroll(mut self, input: i32) -> Self {
self.response_signal_preroll = Some(input);
self
}
/// Specifies the stream distance, in milliseconds, between the SCTE 35 messages that the transcoder places and the splice points that they refer to. If the time between the start of the asset and the SCTE-35 message is less than this value, then the transcoder places the SCTE-35 marker at the beginning of the stream.
pub fn set_response_signal_preroll(mut self, input: std::option::Option<i32>) -> Self {
self.response_signal_preroll = input;
self
}
/// Specifies an ESAM SignalProcessingNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the signal processing instructions that you provide in the setting SCC XML (sccXml).
pub fn signal_processing_notification(
mut self,
input: crate::model::EsamSignalProcessingNotification,
) -> Self {
self.signal_processing_notification = Some(input);
self
}
/// Specifies an ESAM SignalProcessingNotification XML as per OC-SP-ESAM-API-I03-131025. The transcoder uses the signal processing instructions that you provide in the setting SCC XML (sccXml).
pub fn set_signal_processing_notification(
mut self,
input: std::option::Option<crate::model::EsamSignalProcessingNotification>,
) -> Self {
self.signal_processing_notification = input;
self
}
/// Consumes the builder and constructs a [`EsamSettings`](crate::model::EsamSettings)
pub fn build(self) -> crate::model::EsamSettings {
crate::model::EsamSettings {
manifest_confirm_condition_notification: self
.manifest_confirm_condition_notification,
response_signal_preroll: self.response_signal_preroll.unwrap_or_default(),
signal_processing_notification: self.signal_processing_notification,
}
}
}
}
impl EsamSettings {
/// Creates a new builder-style object to manufacture [`EsamSettings`](crate::model::EsamSettings)
pub fn builder() -> crate::model::esam_settings::Builder {
crate::model::esam_settings::Builder::default()
}
}
/// ESAM SignalProcessingNotification data defined by OC-SP-ESAM-API-I03-131025.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EsamSignalProcessingNotification {
/// Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the signal processing instructions in the message that you supply. Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. For your MPEG2-TS file outputs, if you want the service to place SCTE-35 markers at the insertion points you specify in the XML document, you must also enable SCTE-35 ESAM (scte35Esam). Note that you can either specify an ESAM XML document or enable SCTE-35 passthrough. You can't do both.
pub scc_xml: std::option::Option<std::string::String>,
}
impl EsamSignalProcessingNotification {
/// Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the signal processing instructions in the message that you supply. Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. For your MPEG2-TS file outputs, if you want the service to place SCTE-35 markers at the insertion points you specify in the XML document, you must also enable SCTE-35 ESAM (scte35Esam). Note that you can either specify an ESAM XML document or enable SCTE-35 passthrough. You can't do both.
pub fn scc_xml(&self) -> std::option::Option<&str> {
self.scc_xml.as_deref()
}
}
impl std::fmt::Debug for EsamSignalProcessingNotification {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EsamSignalProcessingNotification");
formatter.field("scc_xml", &self.scc_xml);
formatter.finish()
}
}
/// See [`EsamSignalProcessingNotification`](crate::model::EsamSignalProcessingNotification)
pub mod esam_signal_processing_notification {
/// A builder for [`EsamSignalProcessingNotification`](crate::model::EsamSignalProcessingNotification)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) scc_xml: std::option::Option<std::string::String>,
}
impl Builder {
/// Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the signal processing instructions in the message that you supply. Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. For your MPEG2-TS file outputs, if you want the service to place SCTE-35 markers at the insertion points you specify in the XML document, you must also enable SCTE-35 ESAM (scte35Esam). Note that you can either specify an ESAM XML document or enable SCTE-35 passthrough. You can't do both.
pub fn scc_xml(mut self, input: impl Into<std::string::String>) -> Self {
self.scc_xml = Some(input.into());
self
}
/// Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the signal processing instructions in the message that you supply. Provide your ESAM SignalProcessingNotification XML document inside your JSON job settings. For your MPEG2-TS file outputs, if you want the service to place SCTE-35 markers at the insertion points you specify in the XML document, you must also enable SCTE-35 ESAM (scte35Esam). Note that you can either specify an ESAM XML document or enable SCTE-35 passthrough. You can't do both.
pub fn set_scc_xml(mut self, input: std::option::Option<std::string::String>) -> Self {
self.scc_xml = input;
self
}
/// Consumes the builder and constructs a [`EsamSignalProcessingNotification`](crate::model::EsamSignalProcessingNotification)
pub fn build(self) -> crate::model::EsamSignalProcessingNotification {
crate::model::EsamSignalProcessingNotification {
scc_xml: self.scc_xml,
}
}
}
}
impl EsamSignalProcessingNotification {
/// Creates a new builder-style object to manufacture [`EsamSignalProcessingNotification`](crate::model::EsamSignalProcessingNotification)
pub fn builder() -> crate::model::esam_signal_processing_notification::Builder {
crate::model::esam_signal_processing_notification::Builder::default()
}
}
/// ESAM ManifestConfirmConditionNotification defined by OC-SP-ESAM-API-I03-131025.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EsamManifestConfirmConditionNotification {
/// Provide your ESAM ManifestConfirmConditionNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the Manifest Conditioning instructions in the message that you supply.
pub mcc_xml: std::option::Option<std::string::String>,
}
impl EsamManifestConfirmConditionNotification {
/// Provide your ESAM ManifestConfirmConditionNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the Manifest Conditioning instructions in the message that you supply.
pub fn mcc_xml(&self) -> std::option::Option<&str> {
self.mcc_xml.as_deref()
}
}
impl std::fmt::Debug for EsamManifestConfirmConditionNotification {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EsamManifestConfirmConditionNotification");
formatter.field("mcc_xml", &self.mcc_xml);
formatter.finish()
}
}
/// See [`EsamManifestConfirmConditionNotification`](crate::model::EsamManifestConfirmConditionNotification)
pub mod esam_manifest_confirm_condition_notification {
/// A builder for [`EsamManifestConfirmConditionNotification`](crate::model::EsamManifestConfirmConditionNotification)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mcc_xml: std::option::Option<std::string::String>,
}
impl Builder {
/// Provide your ESAM ManifestConfirmConditionNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the Manifest Conditioning instructions in the message that you supply.
pub fn mcc_xml(mut self, input: impl Into<std::string::String>) -> Self {
self.mcc_xml = Some(input.into());
self
}
/// Provide your ESAM ManifestConfirmConditionNotification XML document inside your JSON job settings. Form the XML document as per OC-SP-ESAM-API-I03-131025. The transcoder will use the Manifest Conditioning instructions in the message that you supply.
pub fn set_mcc_xml(mut self, input: std::option::Option<std::string::String>) -> Self {
self.mcc_xml = input;
self
}
/// Consumes the builder and constructs a [`EsamManifestConfirmConditionNotification`](crate::model::EsamManifestConfirmConditionNotification)
pub fn build(self) -> crate::model::EsamManifestConfirmConditionNotification {
crate::model::EsamManifestConfirmConditionNotification {
mcc_xml: self.mcc_xml,
}
}
}
}
impl EsamManifestConfirmConditionNotification {
/// Creates a new builder-style object to manufacture [`EsamManifestConfirmConditionNotification`](crate::model::EsamManifestConfirmConditionNotification)
pub fn builder() -> crate::model::esam_manifest_confirm_condition_notification::Builder {
crate::model::esam_manifest_confirm_condition_notification::Builder::default()
}
}
/// Use ad avail blanking settings to specify your output content during SCTE-35 triggered ad avails. You can blank your video or overlay it with an image. MediaConvert also removes any audio and embedded captions during the ad avail. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/ad-avail-blanking.html.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AvailBlanking {
/// Blanking image to be used. Leave empty for solid black. Only bmp and png images are supported.
pub avail_blanking_image: std::option::Option<std::string::String>,
}
impl AvailBlanking {
/// Blanking image to be used. Leave empty for solid black. Only bmp and png images are supported.
pub fn avail_blanking_image(&self) -> std::option::Option<&str> {
self.avail_blanking_image.as_deref()
}
}
impl std::fmt::Debug for AvailBlanking {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AvailBlanking");
formatter.field("avail_blanking_image", &self.avail_blanking_image);
formatter.finish()
}
}
/// See [`AvailBlanking`](crate::model::AvailBlanking)
pub mod avail_blanking {
/// A builder for [`AvailBlanking`](crate::model::AvailBlanking)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) avail_blanking_image: std::option::Option<std::string::String>,
}
impl Builder {
/// Blanking image to be used. Leave empty for solid black. Only bmp and png images are supported.
pub fn avail_blanking_image(mut self, input: impl Into<std::string::String>) -> Self {
self.avail_blanking_image = Some(input.into());
self
}
/// Blanking image to be used. Leave empty for solid black. Only bmp and png images are supported.
pub fn set_avail_blanking_image(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.avail_blanking_image = input;
self
}
/// Consumes the builder and constructs a [`AvailBlanking`](crate::model::AvailBlanking)
pub fn build(self) -> crate::model::AvailBlanking {
crate::model::AvailBlanking {
avail_blanking_image: self.avail_blanking_image,
}
}
}
}
impl AvailBlanking {
/// Creates a new builder-style object to manufacture [`AvailBlanking`](crate::model::AvailBlanking)
pub fn builder() -> crate::model::avail_blanking::Builder {
crate::model::avail_blanking::Builder::default()
}
}
/// Optional. Configuration for a destination queue to which the job can hop once a customer-defined minimum wait time has passed.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HopDestination {
/// Optional. When you set up a job to use queue hopping, you can specify a different relative priority for the job in the destination queue. If you don't specify, the relative priority will remain the same as in the previous queue.
pub priority: i32,
/// Optional unless the job is submitted on the default queue. When you set up a job to use queue hopping, you can specify a destination queue. This queue cannot be the original queue to which the job is submitted. If the original queue isn't the default queue and you don't specify the destination queue, the job will move to the default queue.
pub queue: std::option::Option<std::string::String>,
/// Required for setting up a job to use queue hopping. Minimum wait time in minutes until the job can hop to the destination queue. Valid range is 1 to 1440 minutes, inclusive.
pub wait_minutes: i32,
}
impl HopDestination {
/// Optional. When you set up a job to use queue hopping, you can specify a different relative priority for the job in the destination queue. If you don't specify, the relative priority will remain the same as in the previous queue.
pub fn priority(&self) -> i32 {
self.priority
}
/// Optional unless the job is submitted on the default queue. When you set up a job to use queue hopping, you can specify a destination queue. This queue cannot be the original queue to which the job is submitted. If the original queue isn't the default queue and you don't specify the destination queue, the job will move to the default queue.
pub fn queue(&self) -> std::option::Option<&str> {
self.queue.as_deref()
}
/// Required for setting up a job to use queue hopping. Minimum wait time in minutes until the job can hop to the destination queue. Valid range is 1 to 1440 minutes, inclusive.
pub fn wait_minutes(&self) -> i32 {
self.wait_minutes
}
}
impl std::fmt::Debug for HopDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HopDestination");
formatter.field("priority", &self.priority);
formatter.field("queue", &self.queue);
formatter.field("wait_minutes", &self.wait_minutes);
formatter.finish()
}
}
/// See [`HopDestination`](crate::model::HopDestination)
pub mod hop_destination {
/// A builder for [`HopDestination`](crate::model::HopDestination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) priority: std::option::Option<i32>,
pub(crate) queue: std::option::Option<std::string::String>,
pub(crate) wait_minutes: std::option::Option<i32>,
}
impl Builder {
/// Optional. When you set up a job to use queue hopping, you can specify a different relative priority for the job in the destination queue. If you don't specify, the relative priority will remain the same as in the previous queue.
pub fn priority(mut self, input: i32) -> Self {
self.priority = Some(input);
self
}
/// Optional. When you set up a job to use queue hopping, you can specify a different relative priority for the job in the destination queue. If you don't specify, the relative priority will remain the same as in the previous queue.
pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
self.priority = input;
self
}
/// Optional unless the job is submitted on the default queue. When you set up a job to use queue hopping, you can specify a destination queue. This queue cannot be the original queue to which the job is submitted. If the original queue isn't the default queue and you don't specify the destination queue, the job will move to the default queue.
pub fn queue(mut self, input: impl Into<std::string::String>) -> Self {
self.queue = Some(input.into());
self
}
/// Optional unless the job is submitted on the default queue. When you set up a job to use queue hopping, you can specify a destination queue. This queue cannot be the original queue to which the job is submitted. If the original queue isn't the default queue and you don't specify the destination queue, the job will move to the default queue.
pub fn set_queue(mut self, input: std::option::Option<std::string::String>) -> Self {
self.queue = input;
self
}
/// Required for setting up a job to use queue hopping. Minimum wait time in minutes until the job can hop to the destination queue. Valid range is 1 to 1440 minutes, inclusive.
pub fn wait_minutes(mut self, input: i32) -> Self {
self.wait_minutes = Some(input);
self
}
/// Required for setting up a job to use queue hopping. Minimum wait time in minutes until the job can hop to the destination queue. Valid range is 1 to 1440 minutes, inclusive.
pub fn set_wait_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.wait_minutes = input;
self
}
/// Consumes the builder and constructs a [`HopDestination`](crate::model::HopDestination)
pub fn build(self) -> crate::model::HopDestination {
crate::model::HopDestination {
priority: self.priority.unwrap_or_default(),
queue: self.queue,
wait_minutes: self.wait_minutes.unwrap_or_default(),
}
}
}
}
impl HopDestination {
/// Creates a new builder-style object to manufacture [`HopDestination`](crate::model::HopDestination)
pub fn builder() -> crate::model::hop_destination::Builder {
crate::model::hop_destination::Builder::default()
}
}
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccelerationSettings {
/// Specify the conditions when the service will run your job with accelerated transcoding.
pub mode: std::option::Option<crate::model::AccelerationMode>,
}
impl AccelerationSettings {
/// Specify the conditions when the service will run your job with accelerated transcoding.
pub fn mode(&self) -> std::option::Option<&crate::model::AccelerationMode> {
self.mode.as_ref()
}
}
impl std::fmt::Debug for AccelerationSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccelerationSettings");
formatter.field("mode", &self.mode);
formatter.finish()
}
}
/// See [`AccelerationSettings`](crate::model::AccelerationSettings)
pub mod acceleration_settings {
/// A builder for [`AccelerationSettings`](crate::model::AccelerationSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mode: std::option::Option<crate::model::AccelerationMode>,
}
impl Builder {
/// Specify the conditions when the service will run your job with accelerated transcoding.
pub fn mode(mut self, input: crate::model::AccelerationMode) -> Self {
self.mode = Some(input);
self
}
/// Specify the conditions when the service will run your job with accelerated transcoding.
pub fn set_mode(
mut self,
input: std::option::Option<crate::model::AccelerationMode>,
) -> Self {
self.mode = input;
self
}
/// Consumes the builder and constructs a [`AccelerationSettings`](crate::model::AccelerationSettings)
pub fn build(self) -> crate::model::AccelerationSettings {
crate::model::AccelerationSettings { mode: self.mode }
}
}
}
impl AccelerationSettings {
/// Creates a new builder-style object to manufacture [`AccelerationSettings`](crate::model::AccelerationSettings)
pub fn builder() -> crate::model::acceleration_settings::Builder {
crate::model::acceleration_settings::Builder::default()
}
}
/// Specify whether the service runs your job with accelerated transcoding. Choose DISABLED if you don't want accelerated transcoding. Choose ENABLED if you want your job to run with accelerated transcoding and to fail if your input files or your job settings aren't compatible with accelerated transcoding. Choose PREFERRED if you want your job to run with accelerated transcoding if the job is compatible with the feature and to run at standard speed if it's not.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AccelerationMode {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
Preferred,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AccelerationMode {
fn from(s: &str) -> Self {
match s {
"DISABLED" => AccelerationMode::Disabled,
"ENABLED" => AccelerationMode::Enabled,
"PREFERRED" => AccelerationMode::Preferred,
other => AccelerationMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AccelerationMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AccelerationMode::from(s))
}
}
impl AccelerationMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AccelerationMode::Disabled => "DISABLED",
AccelerationMode::Enabled => "ENABLED",
AccelerationMode::Preferred => "PREFERRED",
AccelerationMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED", "PREFERRED"]
}
}
impl AsRef<str> for AccelerationMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// A policy configures behavior that you allow or disallow for your account. For information about MediaConvert policies, see the user guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Policy {
/// Allow or disallow jobs that specify HTTP inputs.
pub http_inputs: std::option::Option<crate::model::InputPolicy>,
/// Allow or disallow jobs that specify HTTPS inputs.
pub https_inputs: std::option::Option<crate::model::InputPolicy>,
/// Allow or disallow jobs that specify Amazon S3 inputs.
pub s3_inputs: std::option::Option<crate::model::InputPolicy>,
}
impl Policy {
/// Allow or disallow jobs that specify HTTP inputs.
pub fn http_inputs(&self) -> std::option::Option<&crate::model::InputPolicy> {
self.http_inputs.as_ref()
}
/// Allow or disallow jobs that specify HTTPS inputs.
pub fn https_inputs(&self) -> std::option::Option<&crate::model::InputPolicy> {
self.https_inputs.as_ref()
}
/// Allow or disallow jobs that specify Amazon S3 inputs.
pub fn s3_inputs(&self) -> std::option::Option<&crate::model::InputPolicy> {
self.s3_inputs.as_ref()
}
}
impl std::fmt::Debug for Policy {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Policy");
formatter.field("http_inputs", &self.http_inputs);
formatter.field("https_inputs", &self.https_inputs);
formatter.field("s3_inputs", &self.s3_inputs);
formatter.finish()
}
}
/// See [`Policy`](crate::model::Policy)
pub mod policy {
/// A builder for [`Policy`](crate::model::Policy)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) http_inputs: std::option::Option<crate::model::InputPolicy>,
pub(crate) https_inputs: std::option::Option<crate::model::InputPolicy>,
pub(crate) s3_inputs: std::option::Option<crate::model::InputPolicy>,
}
impl Builder {
/// Allow or disallow jobs that specify HTTP inputs.
pub fn http_inputs(mut self, input: crate::model::InputPolicy) -> Self {
self.http_inputs = Some(input);
self
}
/// Allow or disallow jobs that specify HTTP inputs.
pub fn set_http_inputs(
mut self,
input: std::option::Option<crate::model::InputPolicy>,
) -> Self {
self.http_inputs = input;
self
}
/// Allow or disallow jobs that specify HTTPS inputs.
pub fn https_inputs(mut self, input: crate::model::InputPolicy) -> Self {
self.https_inputs = Some(input);
self
}
/// Allow or disallow jobs that specify HTTPS inputs.
pub fn set_https_inputs(
mut self,
input: std::option::Option<crate::model::InputPolicy>,
) -> Self {
self.https_inputs = input;
self
}
/// Allow or disallow jobs that specify Amazon S3 inputs.
pub fn s3_inputs(mut self, input: crate::model::InputPolicy) -> Self {
self.s3_inputs = Some(input);
self
}
/// Allow or disallow jobs that specify Amazon S3 inputs.
pub fn set_s3_inputs(
mut self,
input: std::option::Option<crate::model::InputPolicy>,
) -> Self {
self.s3_inputs = input;
self
}
/// Consumes the builder and constructs a [`Policy`](crate::model::Policy)
pub fn build(self) -> crate::model::Policy {
crate::model::Policy {
http_inputs: self.http_inputs,
https_inputs: self.https_inputs,
s3_inputs: self.s3_inputs,
}
}
}
}
impl Policy {
/// Creates a new builder-style object to manufacture [`Policy`](crate::model::Policy)
pub fn builder() -> crate::model::policy::Builder {
crate::model::policy::Builder::default()
}
}
/// An input policy allows or disallows a job you submit to run based on the conditions that you specify.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InputPolicy {
#[allow(missing_docs)] // documentation missing in model
Allowed,
#[allow(missing_docs)] // documentation missing in model
Disallowed,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InputPolicy {
fn from(s: &str) -> Self {
match s {
"ALLOWED" => InputPolicy::Allowed,
"DISALLOWED" => InputPolicy::Disallowed,
other => InputPolicy::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InputPolicy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InputPolicy::from(s))
}
}
impl InputPolicy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InputPolicy::Allowed => "ALLOWED",
InputPolicy::Disallowed => "DISALLOWED",
InputPolicy::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALLOWED", "DISALLOWED"]
}
}
impl AsRef<str> for InputPolicy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert resource.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceTags {
/// The Amazon Resource Name (ARN) of the resource.
pub arn: std::option::Option<std::string::String>,
/// The tags for the resource.
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl ResourceTags {
/// The Amazon Resource Name (ARN) of the resource.
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// The tags for the resource.
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for ResourceTags {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceTags");
formatter.field("arn", &self.arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
/// See [`ResourceTags`](crate::model::ResourceTags)
pub mod resource_tags {
/// A builder for [`ResourceTags`](crate::model::ResourceTags)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
/// The Amazon Resource Name (ARN) of the resource.
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// The Amazon Resource Name (ARN) of the resource.
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// The tags for the resource.
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
/// The tags for the resource.
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
/// Consumes the builder and constructs a [`ResourceTags`](crate::model::ResourceTags)
pub fn build(self) -> crate::model::ResourceTags {
crate::model::ResourceTags {
arn: self.arn,
tags: self.tags,
}
}
}
}
impl ResourceTags {
/// Creates a new builder-style object to manufacture [`ResourceTags`](crate::model::ResourceTags)
pub fn builder() -> crate::model::resource_tags::Builder {
crate::model::resource_tags::Builder::default()
}
}
/// Optional. When you request lists of resources, you can specify whether they are sorted in ASCENDING or DESCENDING order. Default varies by resource.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Order {
#[allow(missing_docs)] // documentation missing in model
Ascending,
#[allow(missing_docs)] // documentation missing in model
Descending,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Order {
fn from(s: &str) -> Self {
match s {
"ASCENDING" => Order::Ascending,
"DESCENDING" => Order::Descending,
other => Order::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Order {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Order::from(s))
}
}
impl Order {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Order::Ascending => "ASCENDING",
Order::Descending => "DESCENDING",
Order::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ASCENDING", "DESCENDING"]
}
}
impl AsRef<str> for Order {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. When you request a list of queues, you can choose to list them alphabetically by NAME or chronologically by CREATION_DATE. If you don't specify, the service will list them by creation date.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum QueueListBy {
#[allow(missing_docs)] // documentation missing in model
CreationDate,
#[allow(missing_docs)] // documentation missing in model
Name,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for QueueListBy {
fn from(s: &str) -> Self {
match s {
"CREATION_DATE" => QueueListBy::CreationDate,
"NAME" => QueueListBy::Name,
other => QueueListBy::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for QueueListBy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(QueueListBy::from(s))
}
}
impl QueueListBy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
QueueListBy::CreationDate => "CREATION_DATE",
QueueListBy::Name => "NAME",
QueueListBy::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CREATION_DATE", "NAME"]
}
}
impl AsRef<str> for QueueListBy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. When you request a list of presets, you can choose to list them alphabetically by NAME or chronologically by CREATION_DATE. If you don't specify, the service will list them by name.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PresetListBy {
#[allow(missing_docs)] // documentation missing in model
CreationDate,
#[allow(missing_docs)] // documentation missing in model
Name,
#[allow(missing_docs)] // documentation missing in model
System,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for PresetListBy {
fn from(s: &str) -> Self {
match s {
"CREATION_DATE" => PresetListBy::CreationDate,
"NAME" => PresetListBy::Name,
"SYSTEM" => PresetListBy::System,
other => PresetListBy::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PresetListBy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PresetListBy::from(s))
}
}
impl PresetListBy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
PresetListBy::CreationDate => "CREATION_DATE",
PresetListBy::Name => "NAME",
PresetListBy::System => "SYSTEM",
PresetListBy::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CREATION_DATE", "NAME", "SYSTEM"]
}
}
impl AsRef<str> for PresetListBy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Optional. When you request a list of job templates, you can choose to list them alphabetically by NAME or chronologically by CREATION_DATE. If you don't specify, the service will list them by name.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum JobTemplateListBy {
#[allow(missing_docs)] // documentation missing in model
CreationDate,
#[allow(missing_docs)] // documentation missing in model
Name,
#[allow(missing_docs)] // documentation missing in model
System,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for JobTemplateListBy {
fn from(s: &str) -> Self {
match s {
"CREATION_DATE" => JobTemplateListBy::CreationDate,
"NAME" => JobTemplateListBy::Name,
"SYSTEM" => JobTemplateListBy::System,
other => JobTemplateListBy::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for JobTemplateListBy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(JobTemplateListBy::from(s))
}
}
impl JobTemplateListBy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
JobTemplateListBy::CreationDate => "CREATION_DATE",
JobTemplateListBy::Name => "NAME",
JobTemplateListBy::System => "SYSTEM",
JobTemplateListBy::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CREATION_DATE", "NAME", "SYSTEM"]
}
}
impl AsRef<str> for JobTemplateListBy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Each job converts an input file into an output file or files. For more information, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Job {
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub acceleration_settings: std::option::Option<crate::model::AccelerationSettings>,
/// Describes whether the current job is running with accelerated transcoding. For jobs that have Acceleration (AccelerationMode) set to DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that have Acceleration (AccelerationMode) set to ENABLED or PREFERRED, AccelerationStatus is one of the other states. AccelerationStatus is IN_PROGRESS initially, while the service determines whether the input files and job settings are compatible with accelerated transcoding. If they are, AcclerationStatus is ACCELERATED. If your input files and job settings aren't compatible with accelerated transcoding, the service either fails your job or runs it without accelerated transcoding, depending on how you set Acceleration (AccelerationMode). When the service runs your job without accelerated transcoding, AccelerationStatus is NOT_ACCELERATED.
pub acceleration_status: std::option::Option<crate::model::AccelerationStatus>,
/// An identifier for this resource that is unique within all of AWS.
pub arn: std::option::Option<std::string::String>,
/// The tag type that AWS Billing and Cost Management will use to sort your AWS Elemental MediaConvert costs on any billing report that you set up.
pub billing_tags_source: std::option::Option<crate::model::BillingTagsSource>,
/// The time, in Unix epoch format in seconds, when the job got created.
pub created_at: std::option::Option<aws_smithy_types::DateTime>,
/// A job's phase can be PROBING, TRANSCODING OR UPLOADING
pub current_phase: std::option::Option<crate::model::JobPhase>,
/// Error code for the job
pub error_code: i32,
/// Error message of Job
pub error_message: std::option::Option<std::string::String>,
/// Optional list of hop destinations.
pub hop_destinations: std::option::Option<std::vec::Vec<crate::model::HopDestination>>,
/// A portion of the job's ARN, unique within your AWS Elemental MediaConvert resources
pub id: std::option::Option<std::string::String>,
/// An estimate of how far your job has progressed. This estimate is shown as a percentage of the total time from when your job leaves its queue to when your output files appear in your output Amazon S3 bucket. AWS Elemental MediaConvert provides jobPercentComplete in CloudWatch STATUS_UPDATE events and in the response to GetJob and ListJobs requests. The jobPercentComplete estimate is reliable for the following input containers: Quicktime, Transport Stream, MP4, and MXF. For some jobs, the service can't provide information about job progress. In those cases, jobPercentComplete returns a null value.
pub job_percent_complete: i32,
/// The job template that the job is created from, if it is created from a job template.
pub job_template: std::option::Option<std::string::String>,
/// Provides messages from the service about jobs that you have already successfully submitted.
pub messages: std::option::Option<crate::model::JobMessages>,
/// List of output group details
pub output_group_details: std::option::Option<std::vec::Vec<crate::model::OutputGroupDetail>>,
/// Relative priority on the job.
pub priority: i32,
/// When you create a job, you can specify a queue to send it to. If you don't specify, the job will go to the default queue. For more about queues, see the User Guide topic at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
pub queue: std::option::Option<std::string::String>,
/// The job's queue hopping history.
pub queue_transitions: std::option::Option<std::vec::Vec<crate::model::QueueTransition>>,
/// The number of times that the service automatically attempted to process your job after encountering an error.
pub retry_count: i32,
/// The IAM role you use for creating this job. For details about permissions, see the User Guide topic at the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub role: std::option::Option<std::string::String>,
/// JobSettings contains all the transcode settings for a job.
pub settings: std::option::Option<crate::model::JobSettings>,
/// Enable this setting when you run a test job to estimate how many reserved transcoding slots (RTS) you need. When this is enabled, MediaConvert runs your job from an on-demand queue with similar performance to what you will see with one RTS in a reserved queue. This setting is disabled by default.
pub simulate_reserved_queue: std::option::Option<crate::model::SimulateReservedQueue>,
/// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR.
pub status: std::option::Option<crate::model::JobStatus>,
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub status_update_interval: std::option::Option<crate::model::StatusUpdateInterval>,
/// Information about when jobs are submitted, started, and finished is specified in Unix epoch format in seconds.
pub timing: std::option::Option<crate::model::Timing>,
/// User-defined metadata that you want to associate with an MediaConvert job. You specify metadata in key/value pairs.
pub user_metadata:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl Job {
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub fn acceleration_settings(
&self,
) -> std::option::Option<&crate::model::AccelerationSettings> {
self.acceleration_settings.as_ref()
}
/// Describes whether the current job is running with accelerated transcoding. For jobs that have Acceleration (AccelerationMode) set to DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that have Acceleration (AccelerationMode) set to ENABLED or PREFERRED, AccelerationStatus is one of the other states. AccelerationStatus is IN_PROGRESS initially, while the service determines whether the input files and job settings are compatible with accelerated transcoding. If they are, AcclerationStatus is ACCELERATED. If your input files and job settings aren't compatible with accelerated transcoding, the service either fails your job or runs it without accelerated transcoding, depending on how you set Acceleration (AccelerationMode). When the service runs your job without accelerated transcoding, AccelerationStatus is NOT_ACCELERATED.
pub fn acceleration_status(&self) -> std::option::Option<&crate::model::AccelerationStatus> {
self.acceleration_status.as_ref()
}
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// The tag type that AWS Billing and Cost Management will use to sort your AWS Elemental MediaConvert costs on any billing report that you set up.
pub fn billing_tags_source(&self) -> std::option::Option<&crate::model::BillingTagsSource> {
self.billing_tags_source.as_ref()
}
/// The time, in Unix epoch format in seconds, when the job got created.
pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// A job's phase can be PROBING, TRANSCODING OR UPLOADING
pub fn current_phase(&self) -> std::option::Option<&crate::model::JobPhase> {
self.current_phase.as_ref()
}
/// Error code for the job
pub fn error_code(&self) -> i32 {
self.error_code
}
/// Error message of Job
pub fn error_message(&self) -> std::option::Option<&str> {
self.error_message.as_deref()
}
/// Optional list of hop destinations.
pub fn hop_destinations(&self) -> std::option::Option<&[crate::model::HopDestination]> {
self.hop_destinations.as_deref()
}
/// A portion of the job's ARN, unique within your AWS Elemental MediaConvert resources
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// An estimate of how far your job has progressed. This estimate is shown as a percentage of the total time from when your job leaves its queue to when your output files appear in your output Amazon S3 bucket. AWS Elemental MediaConvert provides jobPercentComplete in CloudWatch STATUS_UPDATE events and in the response to GetJob and ListJobs requests. The jobPercentComplete estimate is reliable for the following input containers: Quicktime, Transport Stream, MP4, and MXF. For some jobs, the service can't provide information about job progress. In those cases, jobPercentComplete returns a null value.
pub fn job_percent_complete(&self) -> i32 {
self.job_percent_complete
}
/// The job template that the job is created from, if it is created from a job template.
pub fn job_template(&self) -> std::option::Option<&str> {
self.job_template.as_deref()
}
/// Provides messages from the service about jobs that you have already successfully submitted.
pub fn messages(&self) -> std::option::Option<&crate::model::JobMessages> {
self.messages.as_ref()
}
/// List of output group details
pub fn output_group_details(&self) -> std::option::Option<&[crate::model::OutputGroupDetail]> {
self.output_group_details.as_deref()
}
/// Relative priority on the job.
pub fn priority(&self) -> i32 {
self.priority
}
/// When you create a job, you can specify a queue to send it to. If you don't specify, the job will go to the default queue. For more about queues, see the User Guide topic at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
pub fn queue(&self) -> std::option::Option<&str> {
self.queue.as_deref()
}
/// The job's queue hopping history.
pub fn queue_transitions(&self) -> std::option::Option<&[crate::model::QueueTransition]> {
self.queue_transitions.as_deref()
}
/// The number of times that the service automatically attempted to process your job after encountering an error.
pub fn retry_count(&self) -> i32 {
self.retry_count
}
/// The IAM role you use for creating this job. For details about permissions, see the User Guide topic at the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub fn role(&self) -> std::option::Option<&str> {
self.role.as_deref()
}
/// JobSettings contains all the transcode settings for a job.
pub fn settings(&self) -> std::option::Option<&crate::model::JobSettings> {
self.settings.as_ref()
}
/// Enable this setting when you run a test job to estimate how many reserved transcoding slots (RTS) you need. When this is enabled, MediaConvert runs your job from an on-demand queue with similar performance to what you will see with one RTS in a reserved queue. This setting is disabled by default.
pub fn simulate_reserved_queue(
&self,
) -> std::option::Option<&crate::model::SimulateReservedQueue> {
self.simulate_reserved_queue.as_ref()
}
/// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR.
pub fn status(&self) -> std::option::Option<&crate::model::JobStatus> {
self.status.as_ref()
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub fn status_update_interval(
&self,
) -> std::option::Option<&crate::model::StatusUpdateInterval> {
self.status_update_interval.as_ref()
}
/// Information about when jobs are submitted, started, and finished is specified in Unix epoch format in seconds.
pub fn timing(&self) -> std::option::Option<&crate::model::Timing> {
self.timing.as_ref()
}
/// User-defined metadata that you want to associate with an MediaConvert job. You specify metadata in key/value pairs.
pub fn user_metadata(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.user_metadata.as_ref()
}
}
impl std::fmt::Debug for Job {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Job");
formatter.field("acceleration_settings", &self.acceleration_settings);
formatter.field("acceleration_status", &self.acceleration_status);
formatter.field("arn", &self.arn);
formatter.field("billing_tags_source", &self.billing_tags_source);
formatter.field("created_at", &self.created_at);
formatter.field("current_phase", &self.current_phase);
formatter.field("error_code", &self.error_code);
formatter.field("error_message", &self.error_message);
formatter.field("hop_destinations", &self.hop_destinations);
formatter.field("id", &self.id);
formatter.field("job_percent_complete", &self.job_percent_complete);
formatter.field("job_template", &self.job_template);
formatter.field("messages", &self.messages);
formatter.field("output_group_details", &self.output_group_details);
formatter.field("priority", &self.priority);
formatter.field("queue", &self.queue);
formatter.field("queue_transitions", &self.queue_transitions);
formatter.field("retry_count", &self.retry_count);
formatter.field("role", &self.role);
formatter.field("settings", &self.settings);
formatter.field("simulate_reserved_queue", &self.simulate_reserved_queue);
formatter.field("status", &self.status);
formatter.field("status_update_interval", &self.status_update_interval);
formatter.field("timing", &self.timing);
formatter.field("user_metadata", &self.user_metadata);
formatter.finish()
}
}
/// See [`Job`](crate::model::Job)
pub mod job {
/// A builder for [`Job`](crate::model::Job)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) acceleration_settings: std::option::Option<crate::model::AccelerationSettings>,
pub(crate) acceleration_status: std::option::Option<crate::model::AccelerationStatus>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) billing_tags_source: std::option::Option<crate::model::BillingTagsSource>,
pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) current_phase: std::option::Option<crate::model::JobPhase>,
pub(crate) error_code: std::option::Option<i32>,
pub(crate) error_message: std::option::Option<std::string::String>,
pub(crate) hop_destinations:
std::option::Option<std::vec::Vec<crate::model::HopDestination>>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) job_percent_complete: std::option::Option<i32>,
pub(crate) job_template: std::option::Option<std::string::String>,
pub(crate) messages: std::option::Option<crate::model::JobMessages>,
pub(crate) output_group_details:
std::option::Option<std::vec::Vec<crate::model::OutputGroupDetail>>,
pub(crate) priority: std::option::Option<i32>,
pub(crate) queue: std::option::Option<std::string::String>,
pub(crate) queue_transitions:
std::option::Option<std::vec::Vec<crate::model::QueueTransition>>,
pub(crate) retry_count: std::option::Option<i32>,
pub(crate) role: std::option::Option<std::string::String>,
pub(crate) settings: std::option::Option<crate::model::JobSettings>,
pub(crate) simulate_reserved_queue:
std::option::Option<crate::model::SimulateReservedQueue>,
pub(crate) status: std::option::Option<crate::model::JobStatus>,
pub(crate) status_update_interval: std::option::Option<crate::model::StatusUpdateInterval>,
pub(crate) timing: std::option::Option<crate::model::Timing>,
pub(crate) user_metadata: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub fn acceleration_settings(mut self, input: crate::model::AccelerationSettings) -> Self {
self.acceleration_settings = Some(input);
self
}
/// Accelerated transcoding can significantly speed up jobs with long, visually complex content.
pub fn set_acceleration_settings(
mut self,
input: std::option::Option<crate::model::AccelerationSettings>,
) -> Self {
self.acceleration_settings = input;
self
}
/// Describes whether the current job is running with accelerated transcoding. For jobs that have Acceleration (AccelerationMode) set to DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that have Acceleration (AccelerationMode) set to ENABLED or PREFERRED, AccelerationStatus is one of the other states. AccelerationStatus is IN_PROGRESS initially, while the service determines whether the input files and job settings are compatible with accelerated transcoding. If they are, AcclerationStatus is ACCELERATED. If your input files and job settings aren't compatible with accelerated transcoding, the service either fails your job or runs it without accelerated transcoding, depending on how you set Acceleration (AccelerationMode). When the service runs your job without accelerated transcoding, AccelerationStatus is NOT_ACCELERATED.
pub fn acceleration_status(mut self, input: crate::model::AccelerationStatus) -> Self {
self.acceleration_status = Some(input);
self
}
/// Describes whether the current job is running with accelerated transcoding. For jobs that have Acceleration (AccelerationMode) set to DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that have Acceleration (AccelerationMode) set to ENABLED or PREFERRED, AccelerationStatus is one of the other states. AccelerationStatus is IN_PROGRESS initially, while the service determines whether the input files and job settings are compatible with accelerated transcoding. If they are, AcclerationStatus is ACCELERATED. If your input files and job settings aren't compatible with accelerated transcoding, the service either fails your job or runs it without accelerated transcoding, depending on how you set Acceleration (AccelerationMode). When the service runs your job without accelerated transcoding, AccelerationStatus is NOT_ACCELERATED.
pub fn set_acceleration_status(
mut self,
input: std::option::Option<crate::model::AccelerationStatus>,
) -> Self {
self.acceleration_status = input;
self
}
/// An identifier for this resource that is unique within all of AWS.
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// An identifier for this resource that is unique within all of AWS.
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// The tag type that AWS Billing and Cost Management will use to sort your AWS Elemental MediaConvert costs on any billing report that you set up.
pub fn billing_tags_source(mut self, input: crate::model::BillingTagsSource) -> Self {
self.billing_tags_source = Some(input);
self
}
/// The tag type that AWS Billing and Cost Management will use to sort your AWS Elemental MediaConvert costs on any billing report that you set up.
pub fn set_billing_tags_source(
mut self,
input: std::option::Option<crate::model::BillingTagsSource>,
) -> Self {
self.billing_tags_source = input;
self
}
/// The time, in Unix epoch format in seconds, when the job got created.
pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_at = Some(input);
self
}
/// The time, in Unix epoch format in seconds, when the job got created.
pub fn set_created_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_at = input;
self
}
/// A job's phase can be PROBING, TRANSCODING OR UPLOADING
pub fn current_phase(mut self, input: crate::model::JobPhase) -> Self {
self.current_phase = Some(input);
self
}
/// A job's phase can be PROBING, TRANSCODING OR UPLOADING
pub fn set_current_phase(
mut self,
input: std::option::Option<crate::model::JobPhase>,
) -> Self {
self.current_phase = input;
self
}
/// Error code for the job
pub fn error_code(mut self, input: i32) -> Self {
self.error_code = Some(input);
self
}
/// Error code for the job
pub fn set_error_code(mut self, input: std::option::Option<i32>) -> Self {
self.error_code = input;
self
}
/// Error message of Job
pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
self.error_message = Some(input.into());
self
}
/// Error message of Job
pub fn set_error_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.error_message = input;
self
}
/// Appends an item to `hop_destinations`.
///
/// To override the contents of this collection use [`set_hop_destinations`](Self::set_hop_destinations).
///
/// Optional list of hop destinations.
pub fn hop_destinations(mut self, input: crate::model::HopDestination) -> Self {
let mut v = self.hop_destinations.unwrap_or_default();
v.push(input);
self.hop_destinations = Some(v);
self
}
/// Optional list of hop destinations.
pub fn set_hop_destinations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::HopDestination>>,
) -> Self {
self.hop_destinations = input;
self
}
/// A portion of the job's ARN, unique within your AWS Elemental MediaConvert resources
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// A portion of the job's ARN, unique within your AWS Elemental MediaConvert resources
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// An estimate of how far your job has progressed. This estimate is shown as a percentage of the total time from when your job leaves its queue to when your output files appear in your output Amazon S3 bucket. AWS Elemental MediaConvert provides jobPercentComplete in CloudWatch STATUS_UPDATE events and in the response to GetJob and ListJobs requests. The jobPercentComplete estimate is reliable for the following input containers: Quicktime, Transport Stream, MP4, and MXF. For some jobs, the service can't provide information about job progress. In those cases, jobPercentComplete returns a null value.
pub fn job_percent_complete(mut self, input: i32) -> Self {
self.job_percent_complete = Some(input);
self
}
/// An estimate of how far your job has progressed. This estimate is shown as a percentage of the total time from when your job leaves its queue to when your output files appear in your output Amazon S3 bucket. AWS Elemental MediaConvert provides jobPercentComplete in CloudWatch STATUS_UPDATE events and in the response to GetJob and ListJobs requests. The jobPercentComplete estimate is reliable for the following input containers: Quicktime, Transport Stream, MP4, and MXF. For some jobs, the service can't provide information about job progress. In those cases, jobPercentComplete returns a null value.
pub fn set_job_percent_complete(mut self, input: std::option::Option<i32>) -> Self {
self.job_percent_complete = input;
self
}
/// The job template that the job is created from, if it is created from a job template.
pub fn job_template(mut self, input: impl Into<std::string::String>) -> Self {
self.job_template = Some(input.into());
self
}
/// The job template that the job is created from, if it is created from a job template.
pub fn set_job_template(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_template = input;
self
}
/// Provides messages from the service about jobs that you have already successfully submitted.
pub fn messages(mut self, input: crate::model::JobMessages) -> Self {
self.messages = Some(input);
self
}
/// Provides messages from the service about jobs that you have already successfully submitted.
pub fn set_messages(
mut self,
input: std::option::Option<crate::model::JobMessages>,
) -> Self {
self.messages = input;
self
}
/// Appends an item to `output_group_details`.
///
/// To override the contents of this collection use [`set_output_group_details`](Self::set_output_group_details).
///
/// List of output group details
pub fn output_group_details(mut self, input: crate::model::OutputGroupDetail) -> Self {
let mut v = self.output_group_details.unwrap_or_default();
v.push(input);
self.output_group_details = Some(v);
self
}
/// List of output group details
pub fn set_output_group_details(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OutputGroupDetail>>,
) -> Self {
self.output_group_details = input;
self
}
/// Relative priority on the job.
pub fn priority(mut self, input: i32) -> Self {
self.priority = Some(input);
self
}
/// Relative priority on the job.
pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
self.priority = input;
self
}
/// When you create a job, you can specify a queue to send it to. If you don't specify, the job will go to the default queue. For more about queues, see the User Guide topic at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
pub fn queue(mut self, input: impl Into<std::string::String>) -> Self {
self.queue = Some(input.into());
self
}
/// When you create a job, you can specify a queue to send it to. If you don't specify, the job will go to the default queue. For more about queues, see the User Guide topic at https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html
pub fn set_queue(mut self, input: std::option::Option<std::string::String>) -> Self {
self.queue = input;
self
}
/// Appends an item to `queue_transitions`.
///
/// To override the contents of this collection use [`set_queue_transitions`](Self::set_queue_transitions).
///
/// The job's queue hopping history.
pub fn queue_transitions(mut self, input: crate::model::QueueTransition) -> Self {
let mut v = self.queue_transitions.unwrap_or_default();
v.push(input);
self.queue_transitions = Some(v);
self
}
/// The job's queue hopping history.
pub fn set_queue_transitions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::QueueTransition>>,
) -> Self {
self.queue_transitions = input;
self
}
/// The number of times that the service automatically attempted to process your job after encountering an error.
pub fn retry_count(mut self, input: i32) -> Self {
self.retry_count = Some(input);
self
}
/// The number of times that the service automatically attempted to process your job after encountering an error.
pub fn set_retry_count(mut self, input: std::option::Option<i32>) -> Self {
self.retry_count = input;
self
}
/// The IAM role you use for creating this job. For details about permissions, see the User Guide topic at the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub fn role(mut self, input: impl Into<std::string::String>) -> Self {
self.role = Some(input.into());
self
}
/// The IAM role you use for creating this job. For details about permissions, see the User Guide topic at the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html
pub fn set_role(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role = input;
self
}
/// JobSettings contains all the transcode settings for a job.
pub fn settings(mut self, input: crate::model::JobSettings) -> Self {
self.settings = Some(input);
self
}
/// JobSettings contains all the transcode settings for a job.
pub fn set_settings(
mut self,
input: std::option::Option<crate::model::JobSettings>,
) -> Self {
self.settings = input;
self
}
/// Enable this setting when you run a test job to estimate how many reserved transcoding slots (RTS) you need. When this is enabled, MediaConvert runs your job from an on-demand queue with similar performance to what you will see with one RTS in a reserved queue. This setting is disabled by default.
pub fn simulate_reserved_queue(
mut self,
input: crate::model::SimulateReservedQueue,
) -> Self {
self.simulate_reserved_queue = Some(input);
self
}
/// Enable this setting when you run a test job to estimate how many reserved transcoding slots (RTS) you need. When this is enabled, MediaConvert runs your job from an on-demand queue with similar performance to what you will see with one RTS in a reserved queue. This setting is disabled by default.
pub fn set_simulate_reserved_queue(
mut self,
input: std::option::Option<crate::model::SimulateReservedQueue>,
) -> Self {
self.simulate_reserved_queue = input;
self
}
/// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR.
pub fn status(mut self, input: crate::model::JobStatus) -> Self {
self.status = Some(input);
self
}
/// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR.
pub fn set_status(mut self, input: std::option::Option<crate::model::JobStatus>) -> Self {
self.status = input;
self
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub fn status_update_interval(mut self, input: crate::model::StatusUpdateInterval) -> Self {
self.status_update_interval = Some(input);
self
}
/// Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch Events. Set the interval, in seconds, between status updates. MediaConvert sends an update at this interval from the time the service begins processing your job to the time it completes the transcode or encounters an error.
pub fn set_status_update_interval(
mut self,
input: std::option::Option<crate::model::StatusUpdateInterval>,
) -> Self {
self.status_update_interval = input;
self
}
/// Information about when jobs are submitted, started, and finished is specified in Unix epoch format in seconds.
pub fn timing(mut self, input: crate::model::Timing) -> Self {
self.timing = Some(input);
self
}
/// Information about when jobs are submitted, started, and finished is specified in Unix epoch format in seconds.
pub fn set_timing(mut self, input: std::option::Option<crate::model::Timing>) -> Self {
self.timing = input;
self
}
/// Adds a key-value pair to `user_metadata`.
///
/// To override the contents of this collection use [`set_user_metadata`](Self::set_user_metadata).
///
/// User-defined metadata that you want to associate with an MediaConvert job. You specify metadata in key/value pairs.
pub fn user_metadata(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.user_metadata.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.user_metadata = Some(hash_map);
self
}
/// User-defined metadata that you want to associate with an MediaConvert job. You specify metadata in key/value pairs.
pub fn set_user_metadata(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.user_metadata = input;
self
}
/// Consumes the builder and constructs a [`Job`](crate::model::Job)
pub fn build(self) -> crate::model::Job {
crate::model::Job {
acceleration_settings: self.acceleration_settings,
acceleration_status: self.acceleration_status,
arn: self.arn,
billing_tags_source: self.billing_tags_source,
created_at: self.created_at,
current_phase: self.current_phase,
error_code: self.error_code.unwrap_or_default(),
error_message: self.error_message,
hop_destinations: self.hop_destinations,
id: self.id,
job_percent_complete: self.job_percent_complete.unwrap_or_default(),
job_template: self.job_template,
messages: self.messages,
output_group_details: self.output_group_details,
priority: self.priority.unwrap_or_default(),
queue: self.queue,
queue_transitions: self.queue_transitions,
retry_count: self.retry_count.unwrap_or_default(),
role: self.role,
settings: self.settings,
simulate_reserved_queue: self.simulate_reserved_queue,
status: self.status,
status_update_interval: self.status_update_interval,
timing: self.timing,
user_metadata: self.user_metadata,
}
}
}
}
impl Job {
/// Creates a new builder-style object to manufacture [`Job`](crate::model::Job)
pub fn builder() -> crate::model::job::Builder {
crate::model::job::Builder::default()
}
}
/// Information about when jobs are submitted, started, and finished is specified in Unix epoch format in seconds.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Timing {
/// The time, in Unix epoch format, that the transcoding job finished
pub finish_time: std::option::Option<aws_smithy_types::DateTime>,
/// The time, in Unix epoch format, that transcoding for the job began.
pub start_time: std::option::Option<aws_smithy_types::DateTime>,
/// The time, in Unix epoch format, that you submitted the job.
pub submit_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Timing {
/// The time, in Unix epoch format, that the transcoding job finished
pub fn finish_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.finish_time.as_ref()
}
/// The time, in Unix epoch format, that transcoding for the job began.
pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
/// The time, in Unix epoch format, that you submitted the job.
pub fn submit_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.submit_time.as_ref()
}
}
impl std::fmt::Debug for Timing {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Timing");
formatter.field("finish_time", &self.finish_time);
formatter.field("start_time", &self.start_time);
formatter.field("submit_time", &self.submit_time);
formatter.finish()
}
}
/// See [`Timing`](crate::model::Timing)
pub mod timing {
/// A builder for [`Timing`](crate::model::Timing)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) finish_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) submit_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// The time, in Unix epoch format, that the transcoding job finished
pub fn finish_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.finish_time = Some(input);
self
}
/// The time, in Unix epoch format, that the transcoding job finished
pub fn set_finish_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.finish_time = input;
self
}
/// The time, in Unix epoch format, that transcoding for the job began.
pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.start_time = Some(input);
self
}
/// The time, in Unix epoch format, that transcoding for the job began.
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.start_time = input;
self
}
/// The time, in Unix epoch format, that you submitted the job.
pub fn submit_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.submit_time = Some(input);
self
}
/// The time, in Unix epoch format, that you submitted the job.
pub fn set_submit_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.submit_time = input;
self
}
/// Consumes the builder and constructs a [`Timing`](crate::model::Timing)
pub fn build(self) -> crate::model::Timing {
crate::model::Timing {
finish_time: self.finish_time,
start_time: self.start_time,
submit_time: self.submit_time,
}
}
}
}
impl Timing {
/// Creates a new builder-style object to manufacture [`Timing`](crate::model::Timing)
pub fn builder() -> crate::model::timing::Builder {
crate::model::timing::Builder::default()
}
}
/// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum JobStatus {
#[allow(missing_docs)] // documentation missing in model
Canceled,
#[allow(missing_docs)] // documentation missing in model
Complete,
#[allow(missing_docs)] // documentation missing in model
Error,
#[allow(missing_docs)] // documentation missing in model
Progressing,
#[allow(missing_docs)] // documentation missing in model
Submitted,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for JobStatus {
fn from(s: &str) -> Self {
match s {
"CANCELED" => JobStatus::Canceled,
"COMPLETE" => JobStatus::Complete,
"ERROR" => JobStatus::Error,
"PROGRESSING" => JobStatus::Progressing,
"SUBMITTED" => JobStatus::Submitted,
other => JobStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for JobStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(JobStatus::from(s))
}
}
impl JobStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
JobStatus::Canceled => "CANCELED",
JobStatus::Complete => "COMPLETE",
JobStatus::Error => "ERROR",
JobStatus::Progressing => "PROGRESSING",
JobStatus::Submitted => "SUBMITTED",
JobStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CANCELED", "COMPLETE", "ERROR", "PROGRESSING", "SUBMITTED"]
}
}
impl AsRef<str> for JobStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Enable this setting when you run a test job to estimate how many reserved transcoding slots (RTS) you need. When this is enabled, MediaConvert runs your job from an on-demand queue with similar performance to what you will see with one RTS in a reserved queue. This setting is disabled by default.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SimulateReservedQueue {
#[allow(missing_docs)] // documentation missing in model
Disabled,
#[allow(missing_docs)] // documentation missing in model
Enabled,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for SimulateReservedQueue {
fn from(s: &str) -> Self {
match s {
"DISABLED" => SimulateReservedQueue::Disabled,
"ENABLED" => SimulateReservedQueue::Enabled,
other => SimulateReservedQueue::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SimulateReservedQueue {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SimulateReservedQueue::from(s))
}
}
impl SimulateReservedQueue {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
SimulateReservedQueue::Disabled => "DISABLED",
SimulateReservedQueue::Enabled => "ENABLED",
SimulateReservedQueue::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DISABLED", "ENABLED"]
}
}
impl AsRef<str> for SimulateReservedQueue {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// JobSettings contains all the transcode settings for a job.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JobSettings {
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub ad_avail_offset: i32,
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub avail_blanking: std::option::Option<crate::model::AvailBlanking>,
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub esam: std::option::Option<crate::model::EsamSettings>,
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub extended_data_services: std::option::Option<crate::model::ExtendedDataServices>,
/// Use Inputs (inputs) to define source file used in the transcode job. There can be multiple inputs add in a job. These inputs will be concantenated together to create the output.
pub inputs: std::option::Option<std::vec::Vec<crate::model::Input>>,
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub kantar_watermark: std::option::Option<crate::model::KantarWatermarkSettings>,
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub motion_image_inserter: std::option::Option<crate::model::MotionImageInserter>,
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub nielsen_configuration: std::option::Option<crate::model::NielsenConfiguration>,
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub nielsen_non_linear_watermark:
std::option::Option<crate::model::NielsenNonLinearWatermarkSettings>,
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub output_groups: std::option::Option<std::vec::Vec<crate::model::OutputGroup>>,
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub timecode_config: std::option::Option<crate::model::TimecodeConfig>,
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub timed_metadata_insertion: std::option::Option<crate::model::TimedMetadataInsertion>,
}
impl JobSettings {
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub fn ad_avail_offset(&self) -> i32 {
self.ad_avail_offset
}
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub fn avail_blanking(&self) -> std::option::Option<&crate::model::AvailBlanking> {
self.avail_blanking.as_ref()
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub fn esam(&self) -> std::option::Option<&crate::model::EsamSettings> {
self.esam.as_ref()
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub fn extended_data_services(
&self,
) -> std::option::Option<&crate::model::ExtendedDataServices> {
self.extended_data_services.as_ref()
}
/// Use Inputs (inputs) to define source file used in the transcode job. There can be multiple inputs add in a job. These inputs will be concantenated together to create the output.
pub fn inputs(&self) -> std::option::Option<&[crate::model::Input]> {
self.inputs.as_deref()
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub fn kantar_watermark(&self) -> std::option::Option<&crate::model::KantarWatermarkSettings> {
self.kantar_watermark.as_ref()
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub fn motion_image_inserter(&self) -> std::option::Option<&crate::model::MotionImageInserter> {
self.motion_image_inserter.as_ref()
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub fn nielsen_configuration(
&self,
) -> std::option::Option<&crate::model::NielsenConfiguration> {
self.nielsen_configuration.as_ref()
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub fn nielsen_non_linear_watermark(
&self,
) -> std::option::Option<&crate::model::NielsenNonLinearWatermarkSettings> {
self.nielsen_non_linear_watermark.as_ref()
}
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub fn output_groups(&self) -> std::option::Option<&[crate::model::OutputGroup]> {
self.output_groups.as_deref()
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub fn timecode_config(&self) -> std::option::Option<&crate::model::TimecodeConfig> {
self.timecode_config.as_ref()
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn timed_metadata_insertion(
&self,
) -> std::option::Option<&crate::model::TimedMetadataInsertion> {
self.timed_metadata_insertion.as_ref()
}
}
impl std::fmt::Debug for JobSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JobSettings");
formatter.field("ad_avail_offset", &self.ad_avail_offset);
formatter.field("avail_blanking", &self.avail_blanking);
formatter.field("esam", &self.esam);
formatter.field("extended_data_services", &self.extended_data_services);
formatter.field("inputs", &self.inputs);
formatter.field("kantar_watermark", &self.kantar_watermark);
formatter.field("motion_image_inserter", &self.motion_image_inserter);
formatter.field("nielsen_configuration", &self.nielsen_configuration);
formatter.field(
"nielsen_non_linear_watermark",
&self.nielsen_non_linear_watermark,
);
formatter.field("output_groups", &self.output_groups);
formatter.field("timecode_config", &self.timecode_config);
formatter.field("timed_metadata_insertion", &self.timed_metadata_insertion);
formatter.finish()
}
}
/// See [`JobSettings`](crate::model::JobSettings)
pub mod job_settings {
/// A builder for [`JobSettings`](crate::model::JobSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ad_avail_offset: std::option::Option<i32>,
pub(crate) avail_blanking: std::option::Option<crate::model::AvailBlanking>,
pub(crate) esam: std::option::Option<crate::model::EsamSettings>,
pub(crate) extended_data_services: std::option::Option<crate::model::ExtendedDataServices>,
pub(crate) inputs: std::option::Option<std::vec::Vec<crate::model::Input>>,
pub(crate) kantar_watermark: std::option::Option<crate::model::KantarWatermarkSettings>,
pub(crate) motion_image_inserter: std::option::Option<crate::model::MotionImageInserter>,
pub(crate) nielsen_configuration: std::option::Option<crate::model::NielsenConfiguration>,
pub(crate) nielsen_non_linear_watermark:
std::option::Option<crate::model::NielsenNonLinearWatermarkSettings>,
pub(crate) output_groups: std::option::Option<std::vec::Vec<crate::model::OutputGroup>>,
pub(crate) timecode_config: std::option::Option<crate::model::TimecodeConfig>,
pub(crate) timed_metadata_insertion:
std::option::Option<crate::model::TimedMetadataInsertion>,
}
impl Builder {
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub fn ad_avail_offset(mut self, input: i32) -> Self {
self.ad_avail_offset = Some(input);
self
}
/// When specified, this offset (in milliseconds) is added to the input Ad Avail PTS time.
pub fn set_ad_avail_offset(mut self, input: std::option::Option<i32>) -> Self {
self.ad_avail_offset = input;
self
}
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub fn avail_blanking(mut self, input: crate::model::AvailBlanking) -> Self {
self.avail_blanking = Some(input);
self
}
/// Settings for ad avail blanking. Video can be blanked or overlaid with an image, and audio muted during SCTE-35 triggered ad avails.
pub fn set_avail_blanking(
mut self,
input: std::option::Option<crate::model::AvailBlanking>,
) -> Self {
self.avail_blanking = input;
self
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub fn esam(mut self, input: crate::model::EsamSettings) -> Self {
self.esam = Some(input);
self
}
/// Settings for Event Signaling And Messaging (ESAM). If you don't do ad insertion, you can ignore these settings.
pub fn set_esam(mut self, input: std::option::Option<crate::model::EsamSettings>) -> Self {
self.esam = input;
self
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub fn extended_data_services(mut self, input: crate::model::ExtendedDataServices) -> Self {
self.extended_data_services = Some(input);
self
}
/// If your source content has EIA-608 Line 21 Data Services, enable this feature to specify what MediaConvert does with the Extended Data Services (XDS) packets. You can choose to pass through XDS packets, or remove them from the output. For more information about XDS, see EIA-608 Line Data Services, section 9.5.1.5 05h Content Advisory.
pub fn set_extended_data_services(
mut self,
input: std::option::Option<crate::model::ExtendedDataServices>,
) -> Self {
self.extended_data_services = input;
self
}
/// Appends an item to `inputs`.
///
/// To override the contents of this collection use [`set_inputs`](Self::set_inputs).
///
/// Use Inputs (inputs) to define source file used in the transcode job. There can be multiple inputs add in a job. These inputs will be concantenated together to create the output.
pub fn inputs(mut self, input: crate::model::Input) -> Self {
let mut v = self.inputs.unwrap_or_default();
v.push(input);
self.inputs = Some(v);
self
}
/// Use Inputs (inputs) to define source file used in the transcode job. There can be multiple inputs add in a job. These inputs will be concantenated together to create the output.
pub fn set_inputs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Input>>,
) -> Self {
self.inputs = input;
self
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub fn kantar_watermark(mut self, input: crate::model::KantarWatermarkSettings) -> Self {
self.kantar_watermark = Some(input);
self
}
/// Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.
pub fn set_kantar_watermark(
mut self,
input: std::option::Option<crate::model::KantarWatermarkSettings>,
) -> Self {
self.kantar_watermark = input;
self
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub fn motion_image_inserter(mut self, input: crate::model::MotionImageInserter) -> Self {
self.motion_image_inserter = Some(input);
self
}
/// Overlay motion graphics on top of your video. The motion graphics that you specify here appear on all outputs in all output groups. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/motion-graphic-overlay.html.
pub fn set_motion_image_inserter(
mut self,
input: std::option::Option<crate::model::MotionImageInserter>,
) -> Self {
self.motion_image_inserter = input;
self
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub fn nielsen_configuration(mut self, input: crate::model::NielsenConfiguration) -> Self {
self.nielsen_configuration = Some(input);
self
}
/// Settings for your Nielsen configuration. If you don't do Nielsen measurement and analytics, ignore these settings. When you enable Nielsen configuration (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs in the job. To enable Nielsen configuration programmatically, include an instance of nielsenConfiguration in your JSON job specification. Even if you don't include any children of nielsenConfiguration, you still enable the setting.
pub fn set_nielsen_configuration(
mut self,
input: std::option::Option<crate::model::NielsenConfiguration>,
) -> Self {
self.nielsen_configuration = input;
self
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub fn nielsen_non_linear_watermark(
mut self,
input: crate::model::NielsenNonLinearWatermarkSettings,
) -> Self {
self.nielsen_non_linear_watermark = Some(input);
self
}
/// Ignore these settings unless you are using Nielsen non-linear watermarking. Specify the values that MediaConvert uses to generate and place Nielsen watermarks in your output audio. In addition to specifying these values, you also need to set up your cloud TIC server. These settings apply to every output in your job. The MediaConvert implementation is currently with the following Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version [5.0.0]
pub fn set_nielsen_non_linear_watermark(
mut self,
input: std::option::Option<crate::model::NielsenNonLinearWatermarkSettings>,
) -> Self {
self.nielsen_non_linear_watermark = input;
self
}
/// Appends an item to `output_groups`.
///
/// To override the contents of this collection use [`set_output_groups`](Self::set_output_groups).
///
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub fn output_groups(mut self, input: crate::model::OutputGroup) -> Self {
let mut v = self.output_groups.unwrap_or_default();
v.push(input);
self.output_groups = Some(v);
self
}
/// (OutputGroups) contains one group of settings for each set of outputs that share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, MXF, and no container) are grouped in a single output group as well. Required in (OutputGroups) is a group of settings that apply to the whole group. This required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, CmafGroupSettings
pub fn set_output_groups(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OutputGroup>>,
) -> Self {
self.output_groups = input;
self
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub fn timecode_config(mut self, input: crate::model::TimecodeConfig) -> Self {
self.timecode_config = Some(input);
self
}
/// These settings control how the service handles timecodes throughout the job. These settings don't affect input clipping.
pub fn set_timecode_config(
mut self,
input: std::option::Option<crate::model::TimecodeConfig>,
) -> Self {
self.timecode_config = input;
self
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn timed_metadata_insertion(
mut self,
input: crate::model::TimedMetadataInsertion,
) -> Self {
self.timed_metadata_insertion = Some(input);
self
}
/// Insert user-defined custom ID3 metadata (id3) at timecodes (timecode) that you specify. In each output that you want to include this metadata, you must set ID3 metadata (timedMetadata) to Passthrough (PASSTHROUGH).
pub fn set_timed_metadata_insertion(
mut self,
input: std::option::Option<crate::model::TimedMetadataInsertion>,
) -> Self {
self.timed_metadata_insertion = input;
self
}
/// Consumes the builder and constructs a [`JobSettings`](crate::model::JobSettings)
pub fn build(self) -> crate::model::JobSettings {
crate::model::JobSettings {
ad_avail_offset: self.ad_avail_offset.unwrap_or_default(),
avail_blanking: self.avail_blanking,
esam: self.esam,
extended_data_services: self.extended_data_services,
inputs: self.inputs,
kantar_watermark: self.kantar_watermark,
motion_image_inserter: self.motion_image_inserter,
nielsen_configuration: self.nielsen_configuration,
nielsen_non_linear_watermark: self.nielsen_non_linear_watermark,
output_groups: self.output_groups,
timecode_config: self.timecode_config,
timed_metadata_insertion: self.timed_metadata_insertion,
}
}
}
}
impl JobSettings {
/// Creates a new builder-style object to manufacture [`JobSettings`](crate::model::JobSettings)
pub fn builder() -> crate::model::job_settings::Builder {
crate::model::job_settings::Builder::default()
}
}
/// Use inputs to define the source files used in your transcoding job. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/specify-input-settings.html. You can use multiple video inputs to do input stitching. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/assembling-multiple-inputs-and-input-clips.html
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Input {
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub audio_selector_groups: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
>,
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub audio_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
>,
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub caption_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
>,
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub crop: std::option::Option<crate::model::Rectangle>,
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub deblock_filter: std::option::Option<crate::model::InputDeblockFilter>,
/// Settings for decrypting any input files that you encrypt before you upload them to Amazon S3. MediaConvert can decrypt files only when you use AWS Key Management Service (KMS) to encrypt the data key that you use to encrypt your content.
pub decryption_settings: std::option::Option<crate::model::InputDecryptionSettings>,
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub denoise_filter: std::option::Option<crate::model::InputDenoiseFilter>,
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub dolby_vision_metadata_xml: std::option::Option<std::string::String>,
/// Specify the source file for your transcoding job. You can use multiple inputs in a single job. The service concatenates these inputs, in the order that you specify them in the job, to create the outputs. If your input format is IMF, specify your input by providing the path to your CPL. For example, "s3://bucket/vf/cpl.xml". If the CPL is in an incomplete IMP, make sure to use *Supplemental IMPs* (SupplementalImps) to specify any supplemental IMPs that contain assets referenced by the CPL.
pub file_input: std::option::Option<std::string::String>,
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub filter_enable: std::option::Option<crate::model::InputFilterEnable>,
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub filter_strength: i32,
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub image_inserter: std::option::Option<crate::model::ImageInserter>,
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub input_clippings: std::option::Option<std::vec::Vec<crate::model::InputClipping>>,
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub input_scan_type: std::option::Option<crate::model::InputScanType>,
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub position: std::option::Option<crate::model::Rectangle>,
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub program_number: i32,
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub psi_control: std::option::Option<crate::model::InputPsiControl>,
/// Provide a list of any necessary supplemental IMPs. You need supplemental IMPs if the CPL that you're using for your input is in an incomplete IMP. Specify either the supplemental IMP directories with a trailing slash or the ASSETMAP.xml files. For example ["s3://bucket/ov/", "s3://bucket/vf2/ASSETMAP.xml"]. You don't need to specify the IMP that contains your input CPL, because the service automatically detects it.
pub supplemental_imps: std::option::Option<std::vec::Vec<std::string::String>>,
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub timecode_source: std::option::Option<crate::model::InputTimecodeSource>,
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub timecode_start: std::option::Option<std::string::String>,
/// When you include Video generator, MediaConvert creates a video input with black frames. Use this setting if you do not have a video input or if you want to add black video frames before, or after, other inputs. You can specify Video generator, or you can specify an Input file, but you cannot specify both. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-generator.html
pub video_generator: std::option::Option<crate::model::InputVideoGenerator>,
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub video_selector: std::option::Option<crate::model::VideoSelector>,
}
impl Input {
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub fn audio_selector_groups(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
> {
self.audio_selector_groups.as_ref()
}
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub fn audio_selectors(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
> {
self.audio_selectors.as_ref()
}
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub fn caption_selectors(
&self,
) -> std::option::Option<
&std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
> {
self.caption_selectors.as_ref()
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub fn crop(&self) -> std::option::Option<&crate::model::Rectangle> {
self.crop.as_ref()
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub fn deblock_filter(&self) -> std::option::Option<&crate::model::InputDeblockFilter> {
self.deblock_filter.as_ref()
}
/// Settings for decrypting any input files that you encrypt before you upload them to Amazon S3. MediaConvert can decrypt files only when you use AWS Key Management Service (KMS) to encrypt the data key that you use to encrypt your content.
pub fn decryption_settings(
&self,
) -> std::option::Option<&crate::model::InputDecryptionSettings> {
self.decryption_settings.as_ref()
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub fn denoise_filter(&self) -> std::option::Option<&crate::model::InputDenoiseFilter> {
self.denoise_filter.as_ref()
}
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub fn dolby_vision_metadata_xml(&self) -> std::option::Option<&str> {
self.dolby_vision_metadata_xml.as_deref()
}
/// Specify the source file for your transcoding job. You can use multiple inputs in a single job. The service concatenates these inputs, in the order that you specify them in the job, to create the outputs. If your input format is IMF, specify your input by providing the path to your CPL. For example, "s3://bucket/vf/cpl.xml". If the CPL is in an incomplete IMP, make sure to use *Supplemental IMPs* (SupplementalImps) to specify any supplemental IMPs that contain assets referenced by the CPL.
pub fn file_input(&self) -> std::option::Option<&str> {
self.file_input.as_deref()
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub fn filter_enable(&self) -> std::option::Option<&crate::model::InputFilterEnable> {
self.filter_enable.as_ref()
}
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub fn filter_strength(&self) -> i32 {
self.filter_strength
}
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub fn image_inserter(&self) -> std::option::Option<&crate::model::ImageInserter> {
self.image_inserter.as_ref()
}
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub fn input_clippings(&self) -> std::option::Option<&[crate::model::InputClipping]> {
self.input_clippings.as_deref()
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub fn input_scan_type(&self) -> std::option::Option<&crate::model::InputScanType> {
self.input_scan_type.as_ref()
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub fn position(&self) -> std::option::Option<&crate::model::Rectangle> {
self.position.as_ref()
}
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub fn program_number(&self) -> i32 {
self.program_number
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub fn psi_control(&self) -> std::option::Option<&crate::model::InputPsiControl> {
self.psi_control.as_ref()
}
/// Provide a list of any necessary supplemental IMPs. You need supplemental IMPs if the CPL that you're using for your input is in an incomplete IMP. Specify either the supplemental IMP directories with a trailing slash or the ASSETMAP.xml files. For example ["s3://bucket/ov/", "s3://bucket/vf2/ASSETMAP.xml"]. You don't need to specify the IMP that contains your input CPL, because the service automatically detects it.
pub fn supplemental_imps(&self) -> std::option::Option<&[std::string::String]> {
self.supplemental_imps.as_deref()
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_source(&self) -> std::option::Option<&crate::model::InputTimecodeSource> {
self.timecode_source.as_ref()
}
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_start(&self) -> std::option::Option<&str> {
self.timecode_start.as_deref()
}
/// When you include Video generator, MediaConvert creates a video input with black frames. Use this setting if you do not have a video input or if you want to add black video frames before, or after, other inputs. You can specify Video generator, or you can specify an Input file, but you cannot specify both. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-generator.html
pub fn video_generator(&self) -> std::option::Option<&crate::model::InputVideoGenerator> {
self.video_generator.as_ref()
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub fn video_selector(&self) -> std::option::Option<&crate::model::VideoSelector> {
self.video_selector.as_ref()
}
}
impl std::fmt::Debug for Input {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Input");
formatter.field("audio_selector_groups", &self.audio_selector_groups);
formatter.field("audio_selectors", &self.audio_selectors);
formatter.field("caption_selectors", &self.caption_selectors);
formatter.field("crop", &self.crop);
formatter.field("deblock_filter", &self.deblock_filter);
formatter.field("decryption_settings", &self.decryption_settings);
formatter.field("denoise_filter", &self.denoise_filter);
formatter.field("dolby_vision_metadata_xml", &self.dolby_vision_metadata_xml);
formatter.field("file_input", &self.file_input);
formatter.field("filter_enable", &self.filter_enable);
formatter.field("filter_strength", &self.filter_strength);
formatter.field("image_inserter", &self.image_inserter);
formatter.field("input_clippings", &self.input_clippings);
formatter.field("input_scan_type", &self.input_scan_type);
formatter.field("position", &self.position);
formatter.field("program_number", &self.program_number);
formatter.field("psi_control", &self.psi_control);
formatter.field("supplemental_imps", &self.supplemental_imps);
formatter.field("timecode_source", &self.timecode_source);
formatter.field("timecode_start", &self.timecode_start);
formatter.field("video_generator", &self.video_generator);
formatter.field("video_selector", &self.video_selector);
formatter.finish()
}
}
/// See [`Input`](crate::model::Input)
pub mod input {
/// A builder for [`Input`](crate::model::Input)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) audio_selector_groups: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
>,
pub(crate) audio_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
>,
pub(crate) caption_selectors: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
>,
pub(crate) crop: std::option::Option<crate::model::Rectangle>,
pub(crate) deblock_filter: std::option::Option<crate::model::InputDeblockFilter>,
pub(crate) decryption_settings: std::option::Option<crate::model::InputDecryptionSettings>,
pub(crate) denoise_filter: std::option::Option<crate::model::InputDenoiseFilter>,
pub(crate) dolby_vision_metadata_xml: std::option::Option<std::string::String>,
pub(crate) file_input: std::option::Option<std::string::String>,
pub(crate) filter_enable: std::option::Option<crate::model::InputFilterEnable>,
pub(crate) filter_strength: std::option::Option<i32>,
pub(crate) image_inserter: std::option::Option<crate::model::ImageInserter>,
pub(crate) input_clippings: std::option::Option<std::vec::Vec<crate::model::InputClipping>>,
pub(crate) input_scan_type: std::option::Option<crate::model::InputScanType>,
pub(crate) position: std::option::Option<crate::model::Rectangle>,
pub(crate) program_number: std::option::Option<i32>,
pub(crate) psi_control: std::option::Option<crate::model::InputPsiControl>,
pub(crate) supplemental_imps: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) timecode_source: std::option::Option<crate::model::InputTimecodeSource>,
pub(crate) timecode_start: std::option::Option<std::string::String>,
pub(crate) video_generator: std::option::Option<crate::model::InputVideoGenerator>,
pub(crate) video_selector: std::option::Option<crate::model::VideoSelector>,
}
impl Builder {
/// Adds a key-value pair to `audio_selector_groups`.
///
/// To override the contents of this collection use [`set_audio_selector_groups`](Self::set_audio_selector_groups).
///
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub fn audio_selector_groups(
mut self,
k: impl Into<std::string::String>,
v: crate::model::AudioSelectorGroup,
) -> Self {
let mut hash_map = self.audio_selector_groups.unwrap_or_default();
hash_map.insert(k.into(), v);
self.audio_selector_groups = Some(hash_map);
self
}
/// Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab (AudioDescription). Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
pub fn set_audio_selector_groups(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelectorGroup>,
>,
) -> Self {
self.audio_selector_groups = input;
self
}
/// Adds a key-value pair to `audio_selectors`.
///
/// To override the contents of this collection use [`set_audio_selectors`](Self::set_audio_selectors).
///
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub fn audio_selectors(
mut self,
k: impl Into<std::string::String>,
v: crate::model::AudioSelector,
) -> Self {
let mut hash_map = self.audio_selectors.unwrap_or_default();
hash_map.insert(k.into(), v);
self.audio_selectors = Some(hash_map);
self
}
/// Use Audio selectors (AudioSelectors) to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
pub fn set_audio_selectors(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::AudioSelector>,
>,
) -> Self {
self.audio_selectors = input;
self
}
/// Adds a key-value pair to `caption_selectors`.
///
/// To override the contents of this collection use [`set_caption_selectors`](Self::set_caption_selectors).
///
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub fn caption_selectors(
mut self,
k: impl Into<std::string::String>,
v: crate::model::CaptionSelector,
) -> Self {
let mut hash_map = self.caption_selectors.unwrap_or_default();
hash_map.insert(k.into(), v);
self.caption_selectors = Some(hash_map);
self
}
/// Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 20 captions selectors per input.
pub fn set_caption_selectors(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, crate::model::CaptionSelector>,
>,
) -> Self {
self.caption_selectors = input;
self
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub fn crop(mut self, input: crate::model::Rectangle) -> Self {
self.crop = Some(input);
self
}
/// Use Cropping selection (crop) to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection (crop).
pub fn set_crop(mut self, input: std::option::Option<crate::model::Rectangle>) -> Self {
self.crop = input;
self
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub fn deblock_filter(mut self, input: crate::model::InputDeblockFilter) -> Self {
self.deblock_filter = Some(input);
self
}
/// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
pub fn set_deblock_filter(
mut self,
input: std::option::Option<crate::model::InputDeblockFilter>,
) -> Self {
self.deblock_filter = input;
self
}
/// Settings for decrypting any input files that you encrypt before you upload them to Amazon S3. MediaConvert can decrypt files only when you use AWS Key Management Service (KMS) to encrypt the data key that you use to encrypt your content.
pub fn decryption_settings(mut self, input: crate::model::InputDecryptionSettings) -> Self {
self.decryption_settings = Some(input);
self
}
/// Settings for decrypting any input files that you encrypt before you upload them to Amazon S3. MediaConvert can decrypt files only when you use AWS Key Management Service (KMS) to encrypt the data key that you use to encrypt your content.
pub fn set_decryption_settings(
mut self,
input: std::option::Option<crate::model::InputDecryptionSettings>,
) -> Self {
self.decryption_settings = input;
self
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub fn denoise_filter(mut self, input: crate::model::InputDenoiseFilter) -> Self {
self.denoise_filter = Some(input);
self
}
/// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
pub fn set_denoise_filter(
mut self,
input: std::option::Option<crate::model::InputDenoiseFilter>,
) -> Self {
self.denoise_filter = input;
self
}
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub fn dolby_vision_metadata_xml(mut self, input: impl Into<std::string::String>) -> Self {
self.dolby_vision_metadata_xml = Some(input.into());
self
}
/// Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
pub fn set_dolby_vision_metadata_xml(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.dolby_vision_metadata_xml = input;
self
}
/// Specify the source file for your transcoding job. You can use multiple inputs in a single job. The service concatenates these inputs, in the order that you specify them in the job, to create the outputs. If your input format is IMF, specify your input by providing the path to your CPL. For example, "s3://bucket/vf/cpl.xml". If the CPL is in an incomplete IMP, make sure to use *Supplemental IMPs* (SupplementalImps) to specify any supplemental IMPs that contain assets referenced by the CPL.
pub fn file_input(mut self, input: impl Into<std::string::String>) -> Self {
self.file_input = Some(input.into());
self
}
/// Specify the source file for your transcoding job. You can use multiple inputs in a single job. The service concatenates these inputs, in the order that you specify them in the job, to create the outputs. If your input format is IMF, specify your input by providing the path to your CPL. For example, "s3://bucket/vf/cpl.xml". If the CPL is in an incomplete IMP, make sure to use *Supplemental IMPs* (SupplementalImps) to specify any supplemental IMPs that contain assets referenced by the CPL.
pub fn set_file_input(mut self, input: std::option::Option<std::string::String>) -> Self {
self.file_input = input;
self
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub fn filter_enable(mut self, input: crate::model::InputFilterEnable) -> Self {
self.filter_enable = Some(input);
self
}
/// Specify how the transcoding service applies the denoise and deblock filters. You must also enable the filters separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). * Auto - The transcoding service determines whether to apply filtering, depending on input type and quality. * Disable - The input is not filtered. This is true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). * Force - The input is filtered regardless of input type.
pub fn set_filter_enable(
mut self,
input: std::option::Option<crate::model::InputFilterEnable>,
) -> Self {
self.filter_enable = input;
self
}
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub fn filter_strength(mut self, input: i32) -> Self {
self.filter_strength = Some(input);
self
}
/// Use Filter strength (FilterStrength) to adjust the magnitude the input filter settings (Deblock and Denoise). The range is -5 to 5. Default is 0.
pub fn set_filter_strength(mut self, input: std::option::Option<i32>) -> Self {
self.filter_strength = input;
self
}
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub fn image_inserter(mut self, input: crate::model::ImageInserter) -> Self {
self.image_inserter = Some(input);
self
}
/// Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
pub fn set_image_inserter(
mut self,
input: std::option::Option<crate::model::ImageInserter>,
) -> Self {
self.image_inserter = input;
self
}
/// Appends an item to `input_clippings`.
///
/// To override the contents of this collection use [`set_input_clippings`](Self::set_input_clippings).
///
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub fn input_clippings(mut self, input: crate::model::InputClipping) -> Self {
let mut v = self.input_clippings.unwrap_or_default();
v.push(input);
self.input_clippings = Some(v);
self
}
/// (InputClippings) contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
pub fn set_input_clippings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InputClipping>>,
) -> Self {
self.input_clippings = input;
self
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub fn input_scan_type(mut self, input: crate::model::InputScanType) -> Self {
self.input_scan_type = Some(input);
self
}
/// When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto (AUTO). Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
pub fn set_input_scan_type(
mut self,
input: std::option::Option<crate::model::InputScanType>,
) -> Self {
self.input_scan_type = input;
self
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub fn position(mut self, input: crate::model::Rectangle) -> Self {
self.position = Some(input);
self
}
/// Use Selection placement (position) to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement (position). If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD (RespondToAfd) to Respond (RESPOND). If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior (scalingBehavior).
pub fn set_position(mut self, input: std::option::Option<crate::model::Rectangle>) -> Self {
self.position = input;
self
}
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub fn program_number(mut self, input: i32) -> Self {
self.program_number = Some(input);
self
}
/// Use Program (programNumber) to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
pub fn set_program_number(mut self, input: std::option::Option<i32>) -> Self {
self.program_number = input;
self
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub fn psi_control(mut self, input: crate::model::InputPsiControl) -> Self {
self.psi_control = Some(input);
self
}
/// Set PSI control (InputPsiControl) for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
pub fn set_psi_control(
mut self,
input: std::option::Option<crate::model::InputPsiControl>,
) -> Self {
self.psi_control = input;
self
}
/// Appends an item to `supplemental_imps`.
///
/// To override the contents of this collection use [`set_supplemental_imps`](Self::set_supplemental_imps).
///
/// Provide a list of any necessary supplemental IMPs. You need supplemental IMPs if the CPL that you're using for your input is in an incomplete IMP. Specify either the supplemental IMP directories with a trailing slash or the ASSETMAP.xml files. For example ["s3://bucket/ov/", "s3://bucket/vf2/ASSETMAP.xml"]. You don't need to specify the IMP that contains your input CPL, because the service automatically detects it.
pub fn supplemental_imps(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.supplemental_imps.unwrap_or_default();
v.push(input.into());
self.supplemental_imps = Some(v);
self
}
/// Provide a list of any necessary supplemental IMPs. You need supplemental IMPs if the CPL that you're using for your input is in an incomplete IMP. Specify either the supplemental IMP directories with a trailing slash or the ASSETMAP.xml files. For example ["s3://bucket/ov/", "s3://bucket/vf2/ASSETMAP.xml"]. You don't need to specify the IMP that contains your input CPL, because the service automatically detects it.
pub fn set_supplemental_imps(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.supplemental_imps = input;
self
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_source(mut self, input: crate::model::InputTimecodeSource) -> Self {
self.timecode_source = Some(input);
self
}
/// Use this Timecode source setting, located under the input settings (InputTimecodeSource), to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded (EMBEDDED) to use the timecodes in your input video. Choose Start at zero (ZEROBASED) to start the first frame at zero. Choose Specified start (SPECIFIEDSTART) to start the first frame at the timecode that you specify in the setting Start timecode (timecodeStart). If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn set_timecode_source(
mut self,
input: std::option::Option<crate::model::InputTimecodeSource>,
) -> Self {
self.timecode_source = input;
self
}
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn timecode_start(mut self, input: impl Into<std::string::String>) -> Self {
self.timecode_start = Some(input.into());
self
}
/// Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings (InputTimecodeSource), to Specified start (SPECIFIEDSTART). For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
pub fn set_timecode_start(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.timecode_start = input;
self
}
/// When you include Video generator, MediaConvert creates a video input with black frames. Use this setting if you do not have a video input or if you want to add black video frames before, or after, other inputs. You can specify Video generator, or you can specify an Input file, but you cannot specify both. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-generator.html
pub fn video_generator(mut self, input: crate::model::InputVideoGenerator) -> Self {
self.video_generator = Some(input);
self
}
/// When you include Video generator, MediaConvert creates a video input with black frames. Use this setting if you do not have a video input or if you want to add black video frames before, or after, other inputs. You can specify Video generator, or you can specify an Input file, but you cannot specify both. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-generator.html
pub fn set_video_generator(
mut self,
input: std::option::Option<crate::model::InputVideoGenerator>,
) -> Self {
self.video_generator = input;
self
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub fn video_selector(mut self, input: crate::model::VideoSelector) -> Self {
self.video_selector = Some(input);
self
}
/// Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
pub fn set_video_selector(
mut self,
input: std::option::Option<crate::model::VideoSelector>,
) -> Self {
self.video_selector = input;
self
}
/// Consumes the builder and constructs a [`Input`](crate::model::Input)
pub fn build(self) -> crate::model::Input {
crate::model::Input {
audio_selector_groups: self.audio_selector_groups,
audio_selectors: self.audio_selectors,
caption_selectors: self.caption_selectors,
crop: self.crop,
deblock_filter: self.deblock_filter,
decryption_settings: self.decryption_settings,
denoise_filter: self.denoise_filter,
dolby_vision_metadata_xml: self.dolby_vision_metadata_xml,
file_input: self.file_input,
filter_enable: self.filter_enable,
filter_strength: self.filter_strength.unwrap_or_default(),
image_inserter: self.image_inserter,
input_clippings: self.input_clippings,
input_scan_type: self.input_scan_type,
position: self.position,
program_number: self.program_number.unwrap_or_default(),
psi_control: self.psi_control,
supplemental_imps: self.supplemental_imps,
timecode_source: self.timecode_source,
timecode_start: self.timecode_start,
video_generator: self.video_generator,
video_selector: self.video_selector,
}
}
}
}
impl Input {
/// Creates a new builder-style object to manufacture [`Input`](crate::model::Input)
pub fn builder() -> crate::model::input::Builder {
crate::model::input::Builder::default()
}
}
/// When you include Video generator, MediaConvert creates a video input with black frames. Use this setting if you do not have a video input or if you want to add black video frames before, or after, other inputs. You can specify Video generator, or you can specify an Input file, but you cannot specify both. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-generator.html
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InputVideoGenerator {
/// Specify an integer value for Black video duration from 50 to 86400000 to generate a black video input for that many milliseconds. Required when you include Video generator.
pub duration: i32,
}
impl InputVideoGenerator {
/// Specify an integer value for Black video duration from 50 to 86400000 to generate a black video input for that many milliseconds. Required when you include Video generator.
pub fn duration(&self) -> i32 {
self.duration
}
}
impl std::fmt::Debug for InputVideoGenerator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InputVideoGenerator");
formatter.field("duration", &self.duration);
formatter.finish()
}
}
/// See [`InputVideoGenerator`](crate::model::InputVideoGenerator)
pub mod input_video_generator {
/// A builder for [`InputVideoGenerator`](crate::model::InputVideoGenerator)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) duration: std::option::Option<i32>,
}
impl Builder {
/// Specify an integer value for Black video duration from 50 to 86400000 to generate a black video input for that many milliseconds. Required when you include Video generator.
pub fn duration(mut self, input: i32) -> Self {
self.duration = Some(input);
self
}
/// Specify an integer value for Black video duration from 50 to 86400000 to generate a black video input for that many milliseconds. Required when you include Video generator.
pub fn set_duration(mut self, input: std::option::Option<i32>) -> Self {
self.duration = input;
self
}
/// Consumes the builder and constructs a [`InputVideoGenerator`](crate::model::InputVideoGenerator)
pub fn build(self) -> crate::model::InputVideoGenerator {
crate::model::InputVideoGenerator {
duration: self.duration.unwrap_or_default(),
}
}
}
}
impl InputVideoGenerator {
/// Creates a new builder-style object to manufacture [`InputVideoGenerator`](crate::model::InputVideoGenerator)
pub fn builder() -> crate::model::input_video_generator::Builder {
crate::model::input_video_generator::Builder::default()
}
}
/// Settings for decrypting any input files that you encrypt before you upload them to Amazon S3. MediaConvert can decrypt files only when you use AWS Key Management Service (KMS) to encrypt the data key that you use to encrypt your content.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InputDecryptionSettings {
/// Specify the encryption mode that you used to encrypt your input files.
pub decryption_mode: std::option::Option<crate::model::DecryptionMode>,
/// Warning! Don't provide your encryption key in plaintext. Your job settings could be intercepted, making your encrypted content vulnerable. Specify the encrypted version of the data key that you used to encrypt your content. The data key must be encrypted by AWS Key Management Service (KMS). The key can be 128, 192, or 256 bits.
pub encrypted_decryption_key: std::option::Option<std::string::String>,
/// Specify the initialization vector that you used when you encrypted your content before uploading it to Amazon S3. You can use a 16-byte initialization vector with any encryption mode. Or, you can use a 12-byte initialization vector with GCM or CTR. MediaConvert accepts only initialization vectors that are base64-encoded.
pub initialization_vector: std::option::Option<std::string::String>,
/// Specify the AWS Region for AWS Key Management Service (KMS) that you used to encrypt your data key, if that Region is different from the one you are using for AWS Elemental MediaConvert.
pub kms_key_region: std::option::Option<std::string::String>,
}
impl InputDecryptionSettings {
/// Specify the encryption mode that you used to encrypt your input files.
pub fn decryption_mode(&self) -> std::option::Option<&crate::model::DecryptionMode> {
self.decryption_mode.as_ref()
}
/// Warning! Don't provide your encryption key in plaintext. Your job settings could be intercepted, making your encrypted content vulnerable. Specify the encrypted version of the data key that you used to encrypt your content. The data key must be encrypted by AWS Key Management Service (KMS). The key can be 128, 192, or 256 bits.
pub fn encrypted_decryption_key(&self) -> std::option::Option<&str> {
self.encrypted_decryption_key.as_deref()
}
/// Specify the initialization vector that you used when you encrypted your content before uploading it to Amazon S3. You can use a 16-byte initialization vector with any encryption mode. Or, you can use a 12-byte initialization vector with GCM or CTR. MediaConvert accepts only initialization vectors that are base64-encoded.
pub fn initialization_vector(&self) -> std::option::Option<&str> {
self.initialization_vector.as_deref()
}
/// Specify the AWS Region for AWS Key Management Service (KMS) that you used to encrypt your data key, if that Region is different from the one you are using for AWS Elemental MediaConvert.
pub fn kms_key_region(&self) -> std::option::Option<&str> {
self.kms_key_region.as_deref()
}
}
impl std::fmt::Debug for InputDecryptionSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InputDecryptionSettings");
formatter.field("decryption_mode", &self.decryption_mode);
formatter.field("encrypted_decryption_key", &self.encrypted_decryption_key);
formatter.field("initialization_vector", &self.initialization_vector);
formatter.field("kms_key_region", &self.kms_key_region);
formatter.finish()
}
}
/// See [`InputDecryptionSettings`](crate::model::InputDecryptionSettings)
pub mod input_decryption_settings {
/// A builder for [`InputDecryptionSettings`](crate::model::InputDecryptionSettings)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) decryption_mode: std::option::Option<crate::model::DecryptionMode>,
pub(crate) encrypted_decryption_key: std::option::Option<std::string::String>,
pub(crate) initialization_vector: std::option::Option<std::string::String>,
pub(crate) kms_key_region: std::option::Option<std::string::String>,
}
impl Builder {
/// Specify the encryption mode that you used to encrypt your input files.
pub fn decryption_mode(mut self, input: crate::model::DecryptionMode) -> Self {
self.decryption_mode = Some(input);
self
}
/// Specify the encryption mode that you used to encrypt your input files.
pub fn set_decryption_mode(
mut self,
input: std::option::Option<crate::model::DecryptionMode>,
) -> Self {
self.decryption_mode = input;
self
}
/// Warning! Don't provide your encryption key in plaintext. Your job settings could be intercepted, making your encrypted content vulnerable. Specify the encrypted version of the data key that you used to encrypt your content. The data key must be encrypted by AWS Key Management Service (KMS). The key can be 128, 192, or 256 bits.
pub fn encrypted_decryption_key(mut self, input: impl Into<std::string::String>) -> Self {
self.encrypted_decryption_key = Some(input.into());
self
}
/// Warning! Don't provide your encryption key in plaintext. Your job settings could be intercepted, making your encrypted content vulnerable. Specify the encrypted version of the data key that you used to encrypt your content. The data key must be encrypted by AWS Key Management Service (KMS). The key can be 128, 192, or 256 bits.
pub fn set_encrypted_decryption_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encrypted_decryption_key = input;
self
}
/// Specify the initialization vector that you used when you encrypted your content before uploading it to Amazon S3. You can use a 16-byte initialization vector with any encryption mode. Or, you can use a 12-byte initialization vector with GCM or CTR. MediaConvert accepts only initialization vectors that are base64-encoded.
pub fn initialization_vector(mut self, input: impl Into<std::string::String>) -> Self {
self.initialization_vector = Some(input.into());
self
}
/// Specify the initialization vector that you used when you encrypted your content before uploading it to Amazon S3. You can use a 16-byte initialization vector with any encryption mode. Or, you can use a 12-byte initialization vector with GCM or CTR. MediaConvert accepts only initialization vectors that are base64-encoded.
pub fn set_initialization_vector(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.initialization_vector = input;
self
}
/// Specify the AWS Region for AWS Key Management Service (KMS) that you used to encrypt your data key, if that Region is different from the one you are using for AWS Elemental MediaConvert.
pub fn kms_key_region(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_region = Some(input.into());
self
}
/// Specify the AWS Region for AWS Key Management Service (KMS) that you used to encrypt your data key, if that Region is different from the one you are using for AWS Elemental MediaConvert.
pub fn set_kms_key_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.kms_key_region = input;
self
}
/// Consumes the builder and constructs a [`InputDecryptionSettings`](crate::model::InputDecryptionSettings)
pub fn build(self) -> crate::model::InputDecryptionSettings {
crate::model::InputDecryptionSettings {
decryption_mode: self.decryption_mode,
encrypted_decryption_key: self.encrypted_decryption_key,
initialization_vector: self.initialization_vector,
kms_key_region: self.kms_key_region,
}
}
}
}
impl InputDecryptionSettings {
/// Creates a new builder-style object to manufacture [`InputDecryptionSettings`](crate::model::InputDecryptionSettings)
pub fn builder() -> crate::model::input_decryption_settings::Builder {
crate::model::input_decryption_settings::Builder::default()
}
}
/// Specify the encryption mode that you used to encrypt your input files.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DecryptionMode {
#[allow(missing_docs)] // documentation missing in model
AesCbc,
#[allow(missing_docs)] // documentation missing in model
AesCtr,
#[allow(missing_docs)] // documentation missing in model
AesGcm,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DecryptionMode {
fn from(s: &str) -> Self {
match s {
"AES_CBC" => DecryptionMode::AesCbc,
"AES_CTR" => DecryptionMode::AesCtr,
"AES_GCM" => DecryptionMode::AesGcm,
other => DecryptionMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DecryptionMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DecryptionMode::from(s))
}
}
impl DecryptionMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DecryptionMode::AesCbc => "AES_CBC",
DecryptionMode::AesCtr => "AES_CTR",
DecryptionMode::AesGcm => "AES_GCM",
DecryptionMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["AES_CBC", "AES_CTR", "AES_GCM"]
}
}
impl AsRef<str> for DecryptionMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Description of the source and destination queues between which the job has moved, along with the timestamp of the move
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueueTransition {
/// The queue that the job was on after the transition.
pub destination_queue: std::option::Option<std::string::String>,
/// The queue that the job was on before the transition.
pub source_queue: std::option::Option<std::string::String>,
/// The time, in Unix epoch format, that the job moved from the source queue to the destination queue.
pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl QueueTransition {
/// The queue that the job was on after the transition.
pub fn destination_queue(&self) -> std::option::Option<&str> {
self.destination_queue.as_deref()
}
/// The queue that the job was on before the transition.
pub fn source_queue(&self) -> std::option::Option<&str> {
self.source_queue.as_deref()
}
/// The time, in Unix epoch format, that the job moved from the source queue to the destination queue.
pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.timestamp.as_ref()
}
}
impl std::fmt::Debug for QueueTransition {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("QueueTransition");
formatter.field("destination_queue", &self.destination_queue);
formatter.field("source_queue", &self.source_queue);
formatter.field("timestamp", &self.timestamp);
formatter.finish()
}
}
/// See [`QueueTransition`](crate::model::QueueTransition)
pub mod queue_transition {
/// A builder for [`QueueTransition`](crate::model::QueueTransition)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination_queue: std::option::Option<std::string::String>,
pub(crate) source_queue: std::option::Option<std::string::String>,
pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// The queue that the job was on after the transition.
pub fn destination_queue(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_queue = Some(input.into());
self
}
/// The queue that the job was on after the transition.
pub fn set_destination_queue(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_queue = input;
self
}
/// The queue that the job was on before the transition.
pub fn source_queue(mut self, input: impl Into<std::string::String>) -> Self {
self.source_queue = Some(input.into());
self
}
/// The queue that the job was on before the transition.
pub fn set_source_queue(mut self, input: std::option::Option<std::string::String>) -> Self {
self.source_queue = input;
self
}
/// The time, in Unix epoch format, that the job moved from the source queue to the destination queue.
pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.timestamp = Some(input);
self
}
/// The time, in Unix epoch format, that the job moved from the source queue to the destination queue.
pub fn set_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.timestamp = input;
self
}
/// Consumes the builder and constructs a [`QueueTransition`](crate::model::QueueTransition)
pub fn build(self) -> crate::model::QueueTransition {
crate::model::QueueTransition {
destination_queue: self.destination_queue,
source_queue: self.source_queue,
timestamp: self.timestamp,
}
}
}
}
impl QueueTransition {
/// Creates a new builder-style object to manufacture [`QueueTransition`](crate::model::QueueTransition)
pub fn builder() -> crate::model::queue_transition::Builder {
crate::model::queue_transition::Builder::default()
}
}
/// Contains details about the output groups specified in the job settings.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputGroupDetail {
/// Details about the output
pub output_details: std::option::Option<std::vec::Vec<crate::model::OutputDetail>>,
}
impl OutputGroupDetail {
/// Details about the output
pub fn output_details(&self) -> std::option::Option<&[crate::model::OutputDetail]> {
self.output_details.as_deref()
}
}
impl std::fmt::Debug for OutputGroupDetail {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputGroupDetail");
formatter.field("output_details", &self.output_details);
formatter.finish()
}
}
/// See [`OutputGroupDetail`](crate::model::OutputGroupDetail)
pub mod output_group_detail {
/// A builder for [`OutputGroupDetail`](crate::model::OutputGroupDetail)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) output_details: std::option::Option<std::vec::Vec<crate::model::OutputDetail>>,
}
impl Builder {
/// Appends an item to `output_details`.
///
/// To override the contents of this collection use [`set_output_details`](Self::set_output_details).
///
/// Details about the output
pub fn output_details(mut self, input: crate::model::OutputDetail) -> Self {
let mut v = self.output_details.unwrap_or_default();
v.push(input);
self.output_details = Some(v);
self
}
/// Details about the output
pub fn set_output_details(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OutputDetail>>,
) -> Self {
self.output_details = input;
self
}
/// Consumes the builder and constructs a [`OutputGroupDetail`](crate::model::OutputGroupDetail)
pub fn build(self) -> crate::model::OutputGroupDetail {
crate::model::OutputGroupDetail {
output_details: self.output_details,
}
}
}
}
impl OutputGroupDetail {
/// Creates a new builder-style object to manufacture [`OutputGroupDetail`](crate::model::OutputGroupDetail)
pub fn builder() -> crate::model::output_group_detail::Builder {
crate::model::output_group_detail::Builder::default()
}
}
/// Details regarding output
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputDetail {
/// Duration in milliseconds
pub duration_in_ms: i32,
/// Contains details about the output's video stream
pub video_details: std::option::Option<crate::model::VideoDetail>,
}
impl OutputDetail {
/// Duration in milliseconds
pub fn duration_in_ms(&self) -> i32 {
self.duration_in_ms
}
/// Contains details about the output's video stream
pub fn video_details(&self) -> std::option::Option<&crate::model::VideoDetail> {
self.video_details.as_ref()
}
}
impl std::fmt::Debug for OutputDetail {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OutputDetail");
formatter.field("duration_in_ms", &self.duration_in_ms);
formatter.field("video_details", &self.video_details);
formatter.finish()
}
}
/// See [`OutputDetail`](crate::model::OutputDetail)
pub mod output_detail {
/// A builder for [`OutputDetail`](crate::model::OutputDetail)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) duration_in_ms: std::option::Option<i32>,
pub(crate) video_details: std::option::Option<crate::model::VideoDetail>,
}
impl Builder {
/// Duration in milliseconds
pub fn duration_in_ms(mut self, input: i32) -> Self {
self.duration_in_ms = Some(input);
self
}
/// Duration in milliseconds
pub fn set_duration_in_ms(mut self, input: std::option::Option<i32>) -> Self {
self.duration_in_ms = input;
self
}
/// Contains details about the output's video stream
pub fn video_details(mut self, input: crate::model::VideoDetail) -> Self {
self.video_details = Some(input);
self
}
/// Contains details about the output's video stream
pub fn set_video_details(
mut self,
input: std::option::Option<crate::model::VideoDetail>,
) -> Self {
self.video_details = input;
self
}
/// Consumes the builder and constructs a [`OutputDetail`](crate::model::OutputDetail)
pub fn build(self) -> crate::model::OutputDetail {
crate::model::OutputDetail {
duration_in_ms: self.duration_in_ms.unwrap_or_default(),
video_details: self.video_details,
}
}
}
}
impl OutputDetail {
/// Creates a new builder-style object to manufacture [`OutputDetail`](crate::model::OutputDetail)
pub fn builder() -> crate::model::output_detail::Builder {
crate::model::output_detail::Builder::default()
}
}
/// Contains details about the output's video stream
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct VideoDetail {
/// Height in pixels for the output
pub height_in_px: i32,
/// Width in pixels for the output
pub width_in_px: i32,
}
impl VideoDetail {
/// Height in pixels for the output
pub fn height_in_px(&self) -> i32 {
self.height_in_px
}
/// Width in pixels for the output
pub fn width_in_px(&self) -> i32 {
self.width_in_px
}
}
impl std::fmt::Debug for VideoDetail {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("VideoDetail");
formatter.field("height_in_px", &self.height_in_px);
formatter.field("width_in_px", &self.width_in_px);
formatter.finish()
}
}
/// See [`VideoDetail`](crate::model::VideoDetail)
pub mod video_detail {
/// A builder for [`VideoDetail`](crate::model::VideoDetail)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) height_in_px: std::option::Option<i32>,
pub(crate) width_in_px: std::option::Option<i32>,
}
impl Builder {
/// Height in pixels for the output
pub fn height_in_px(mut self, input: i32) -> Self {
self.height_in_px = Some(input);
self
}
/// Height in pixels for the output
pub fn set_height_in_px(mut self, input: std::option::Option<i32>) -> Self {
self.height_in_px = input;
self
}
/// Width in pixels for the output
pub fn width_in_px(mut self, input: i32) -> Self {
self.width_in_px = Some(input);
self
}
/// Width in pixels for the output
pub fn set_width_in_px(mut self, input: std::option::Option<i32>) -> Self {
self.width_in_px = input;
self
}
/// Consumes the builder and constructs a [`VideoDetail`](crate::model::VideoDetail)
pub fn build(self) -> crate::model::VideoDetail {
crate::model::VideoDetail {
height_in_px: self.height_in_px.unwrap_or_default(),
width_in_px: self.width_in_px.unwrap_or_default(),
}
}
}
}
impl VideoDetail {
/// Creates a new builder-style object to manufacture [`VideoDetail`](crate::model::VideoDetail)
pub fn builder() -> crate::model::video_detail::Builder {
crate::model::video_detail::Builder::default()
}
}
/// Provides messages from the service about jobs that you have already successfully submitted.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JobMessages {
/// List of messages that are informational only and don't indicate a problem with your job.
pub info: std::option::Option<std::vec::Vec<std::string::String>>,
/// List of messages that warn about conditions that might cause your job not to run or to fail.
pub warning: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl JobMessages {
/// List of messages that are informational only and don't indicate a problem with your job.
pub fn info(&self) -> std::option::Option<&[std::string::String]> {
self.info.as_deref()
}
/// List of messages that warn about conditions that might cause your job not to run or to fail.
pub fn warning(&self) -> std::option::Option<&[std::string::String]> {
self.warning.as_deref()
}
}
impl std::fmt::Debug for JobMessages {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JobMessages");
formatter.field("info", &self.info);
formatter.field("warning", &self.warning);
formatter.finish()
}
}
/// See [`JobMessages`](crate::model::JobMessages)
pub mod job_messages {
/// A builder for [`JobMessages`](crate::model::JobMessages)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) info: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) warning: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Appends an item to `info`.
///
/// To override the contents of this collection use [`set_info`](Self::set_info).
///
/// List of messages that are informational only and don't indicate a problem with your job.
pub fn info(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.info.unwrap_or_default();
v.push(input.into());
self.info = Some(v);
self
}
/// List of messages that are informational only and don't indicate a problem with your job.
pub fn set_info(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.info = input;
self
}
/// Appends an item to `warning`.
///
/// To override the contents of this collection use [`set_warning`](Self::set_warning).
///
/// List of messages that warn about conditions that might cause your job not to run or to fail.
pub fn warning(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.warning.unwrap_or_default();
v.push(input.into());
self.warning = Some(v);
self
}
/// List of messages that warn about conditions that might cause your job not to run or to fail.
pub fn set_warning(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.warning = input;
self
}
/// Consumes the builder and constructs a [`JobMessages`](crate::model::JobMessages)
pub fn build(self) -> crate::model::JobMessages {
crate::model::JobMessages {
info: self.info,
warning: self.warning,
}
}
}
}
impl JobMessages {
/// Creates a new builder-style object to manufacture [`JobMessages`](crate::model::JobMessages)
pub fn builder() -> crate::model::job_messages::Builder {
crate::model::job_messages::Builder::default()
}
}
/// A job's phase can be PROBING, TRANSCODING OR UPLOADING
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum JobPhase {
#[allow(missing_docs)] // documentation missing in model
Probing,
#[allow(missing_docs)] // documentation missing in model
Transcoding,
#[allow(missing_docs)] // documentation missing in model
Uploading,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for JobPhase {
fn from(s: &str) -> Self {
match s {
"PROBING" => JobPhase::Probing,
"TRANSCODING" => JobPhase::Transcoding,
"UPLOADING" => JobPhase::Uploading,
other => JobPhase::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for JobPhase {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(JobPhase::from(s))
}
}
impl JobPhase {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
JobPhase::Probing => "PROBING",
JobPhase::Transcoding => "TRANSCODING",
JobPhase::Uploading => "UPLOADING",
JobPhase::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["PROBING", "TRANSCODING", "UPLOADING"]
}
}
impl AsRef<str> for JobPhase {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// The tag type that AWS Billing and Cost Management will use to sort your AWS Elemental MediaConvert costs on any billing report that you set up.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BillingTagsSource {
#[allow(missing_docs)] // documentation missing in model
Job,
#[allow(missing_docs)] // documentation missing in model
JobTemplate,
#[allow(missing_docs)] // documentation missing in model
Preset,
#[allow(missing_docs)] // documentation missing in model
Queue,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BillingTagsSource {
fn from(s: &str) -> Self {
match s {
"JOB" => BillingTagsSource::Job,
"JOB_TEMPLATE" => BillingTagsSource::JobTemplate,
"PRESET" => BillingTagsSource::Preset,
"QUEUE" => BillingTagsSource::Queue,
other => BillingTagsSource::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BillingTagsSource {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BillingTagsSource::from(s))
}
}
impl BillingTagsSource {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BillingTagsSource::Job => "JOB",
BillingTagsSource::JobTemplate => "JOB_TEMPLATE",
BillingTagsSource::Preset => "PRESET",
BillingTagsSource::Queue => "QUEUE",
BillingTagsSource::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["JOB", "JOB_TEMPLATE", "PRESET", "QUEUE"]
}
}
impl AsRef<str> for BillingTagsSource {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Describes whether the current job is running with accelerated transcoding. For jobs that have Acceleration (AccelerationMode) set to DISABLED, AccelerationStatus is always NOT_APPLICABLE. For jobs that have Acceleration (AccelerationMode) set to ENABLED or PREFERRED, AccelerationStatus is one of the other states. AccelerationStatus is IN_PROGRESS initially, while the service determines whether the input files and job settings are compatible with accelerated transcoding. If they are, AcclerationStatus is ACCELERATED. If your input files and job settings aren't compatible with accelerated transcoding, the service either fails your job or runs it without accelerated transcoding, depending on how you set Acceleration (AccelerationMode). When the service runs your job without accelerated transcoding, AccelerationStatus is NOT_ACCELERATED.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AccelerationStatus {
#[allow(missing_docs)] // documentation missing in model
Accelerated,
#[allow(missing_docs)] // documentation missing in model
InProgress,
#[allow(missing_docs)] // documentation missing in model
NotAccelerated,
#[allow(missing_docs)] // documentation missing in model
NotApplicable,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AccelerationStatus {
fn from(s: &str) -> Self {
match s {
"ACCELERATED" => AccelerationStatus::Accelerated,
"IN_PROGRESS" => AccelerationStatus::InProgress,
"NOT_ACCELERATED" => AccelerationStatus::NotAccelerated,
"NOT_APPLICABLE" => AccelerationStatus::NotApplicable,
other => AccelerationStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AccelerationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AccelerationStatus::from(s))
}
}
impl AccelerationStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AccelerationStatus::Accelerated => "ACCELERATED",
AccelerationStatus::InProgress => "IN_PROGRESS",
AccelerationStatus::NotAccelerated => "NOT_ACCELERATED",
AccelerationStatus::NotApplicable => "NOT_APPLICABLE",
AccelerationStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ACCELERATED",
"IN_PROGRESS",
"NOT_ACCELERATED",
"NOT_APPLICABLE",
]
}
}
impl AsRef<str> for AccelerationStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// Describes an account-specific API endpoint.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Endpoint {
/// URL of endpoint
pub url: std::option::Option<std::string::String>,
}
impl Endpoint {
/// URL of endpoint
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
impl std::fmt::Debug for Endpoint {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Endpoint");
formatter.field("url", &self.url);
formatter.finish()
}
}
/// See [`Endpoint`](crate::model::Endpoint)
pub mod endpoint {
/// A builder for [`Endpoint`](crate::model::Endpoint)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) url: std::option::Option<std::string::String>,
}
impl Builder {
/// URL of endpoint
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
/// URL of endpoint
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
/// Consumes the builder and constructs a [`Endpoint`](crate::model::Endpoint)
pub fn build(self) -> crate::model::Endpoint {
crate::model::Endpoint { url: self.url }
}
}
}
impl Endpoint {
/// Creates a new builder-style object to manufacture [`Endpoint`](crate::model::Endpoint)
pub fn builder() -> crate::model::endpoint::Builder {
crate::model::endpoint::Builder::default()
}
}
/// Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to return your endpoints if any exist, or to create an endpoint for you and return it if one doesn't already exist. Specify GET_ONLY to return your endpoints if any exist, or an empty list if none exist.
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DescribeEndpointsMode {
#[allow(missing_docs)] // documentation missing in model
Default,
#[allow(missing_docs)] // documentation missing in model
GetOnly,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DescribeEndpointsMode {
fn from(s: &str) -> Self {
match s {
"DEFAULT" => DescribeEndpointsMode::Default,
"GET_ONLY" => DescribeEndpointsMode::GetOnly,
other => DescribeEndpointsMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DescribeEndpointsMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DescribeEndpointsMode::from(s))
}
}
impl DescribeEndpointsMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DescribeEndpointsMode::Default => "DEFAULT",
DescribeEndpointsMode::GetOnly => "GET_ONLY",
DescribeEndpointsMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEFAULT", "GET_ONLY"]
}
}
impl AsRef<str> for DescribeEndpointsMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}