All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elastictranscoder.model.CaptionFormat Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not
 * use this file except in compliance with the License. A copy of the License is
 * located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.services.elastictranscoder.model;

import java.io.Serializable;

/**
 * 

* The file format of the output captions. If you leave this value blank, * Elastic Transcoder returns an error. *

*/ public class CaptionFormat implements Serializable, Cloneable { /** *

* The format you specify determines whether Elastic Transcoder generates an * embedded or sidecar caption for this output. *

*
    *
  • *

    * Valid Embedded Caption Formats: *

    *
      *
    • *

      * for FLAC: None *

      *
    • *
    • *

      * For MP3: None *

      *
    • *
    • *

      * For MP4: mov-text *

      *
    • *
    • *

      * For MPEG-TS: None *

      *
    • *
    • *

      * For ogg: None *

      *
    • *
    • *

      * For webm: None *

      *
    • *
    *
  • *
  • *

    * Valid Sidecar Caption Formats: Elastic Transcoder supports dfxp * (first div element only), scc, srt, and webvtt. If you want ttml or * smpte-tt compatible captions, specify dfxp as your output format. *

    *
      *
    • *

      * For FMP4: dfxp *

      *
    • *
    • *

      * Non-FMP4 outputs: All sidecar types *

      *
    • *
    *

    * fmp4 captions have an extension of .ismt *

    *
  • *
*/ private String format; /** *

* The prefix for caption filenames, in the form description- * {language}, where: *

*
    *
  • description is a description of the video.
  • *
  • {language} is a literal value that Elastic Transcoder * replaces with the two- or three-letter code for the language of the * caption in the output file names.
  • *
*

* If you don't include {language} in the file name * pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically appends the * count to the end of the segment files. *

*

* For example, suppose you're transcoding into srt format. When you * enter "Sydney-{language}-sunrise", and the language of the captions is * English (en), the name of the first caption file will be * Sydney-en-sunrise00000.srt. *

*/ private String pattern; /** *

* The encryption settings, if any, that you want Elastic Transcoder to * apply to your caption formats. *

*/ private Encryption encryption; /** *

* The format you specify determines whether Elastic Transcoder generates an * embedded or sidecar caption for this output. *

*
    *
  • *

    * Valid Embedded Caption Formats: *

    *
      *
    • *

      * for FLAC: None *

      *
    • *
    • *

      * For MP3: None *

      *
    • *
    • *

      * For MP4: mov-text *

      *
    • *
    • *

      * For MPEG-TS: None *

      *
    • *
    • *

      * For ogg: None *

      *
    • *
    • *

      * For webm: None *

      *
    • *
    *
  • *
  • *

    * Valid Sidecar Caption Formats: Elastic Transcoder supports dfxp * (first div element only), scc, srt, and webvtt. If you want ttml or * smpte-tt compatible captions, specify dfxp as your output format. *

    *
      *
    • *

      * For FMP4: dfxp *

      *
    • *
    • *

      * Non-FMP4 outputs: All sidecar types *

      *
    • *
    *

    * fmp4 captions have an extension of .ismt *

    *
  • *
* * @param format * The format you specify determines whether Elastic Transcoder * generates an embedded or sidecar caption for this output.

*
    *
  • *

    * Valid Embedded Caption Formats: *

    *
      *
    • *

      * for FLAC: None *

      *
    • *
    • *

      * For MP3: None *

      *
    • *
    • *

      * For MP4: mov-text *

      *
    • *
    • *

      * For MPEG-TS: None *

      *
    • *
    • *

      * For ogg: None *

      *
    • *
    • *

      * For webm: None *

      *
    • *
    *
  • *
  • *

    * Valid Sidecar Caption Formats: Elastic Transcoder supports * dfxp (first div element only), scc, srt, and webvtt. If you want * ttml or smpte-tt compatible captions, specify dfxp as your output * format. *

    *
      *
    • *

      * For FMP4: dfxp *

      *
    • *
    • *

      * Non-FMP4 outputs: All sidecar types *

      *
    • *
    *

    * fmp4 captions have an extension of .ismt *

    *
  • */ public void setFormat(String format) { this.format = format; } /** *

    * The format you specify determines whether Elastic Transcoder generates an * embedded or sidecar caption for this output. *

    *
      *
    • *

      * Valid Embedded Caption Formats: *

      *
        *
      • *

        * for FLAC: None *

        *
      • *
      • *

        * For MP3: None *

        *
      • *
      • *

        * For MP4: mov-text *

        *
      • *
      • *

        * For MPEG-TS: None *

        *
      • *
      • *

        * For ogg: None *

        *
      • *
      • *

        * For webm: None *

        *
      • *
      *
    • *
    • *

      * Valid Sidecar Caption Formats: Elastic Transcoder supports dfxp * (first div element only), scc, srt, and webvtt. If you want ttml or * smpte-tt compatible captions, specify dfxp as your output format. *

      *
        *
      • *

        * For FMP4: dfxp *

        *
      • *
      • *

        * Non-FMP4 outputs: All sidecar types *

        *
      • *
      *

      * fmp4 captions have an extension of .ismt *

      *
    • *
    * * @return The format you specify determines whether Elastic Transcoder * generates an embedded or sidecar caption for this output.

    *
      *
    • *

      * Valid Embedded Caption Formats: *

      *
        *
      • *

        * for FLAC: None *

        *
      • *
      • *

        * For MP3: None *

        *
      • *
      • *

        * For MP4: mov-text *

        *
      • *
      • *

        * For MPEG-TS: None *

        *
      • *
      • *

        * For ogg: None *

        *
      • *
      • *

        * For webm: None *

        *
      • *
      *
    • *
    • *

      * Valid Sidecar Caption Formats: Elastic Transcoder supports * dfxp (first div element only), scc, srt, and webvtt. If you want * ttml or smpte-tt compatible captions, specify dfxp as your output * format. *

      *
        *
      • *

        * For FMP4: dfxp *

        *
      • *
      • *

        * Non-FMP4 outputs: All sidecar types *

        *
      • *
      *

      * fmp4 captions have an extension of * .ismt *

      *
    • */ public String getFormat() { return this.format; } /** *

      * The format you specify determines whether Elastic Transcoder generates an * embedded or sidecar caption for this output. *

      *
        *
      • *

        * Valid Embedded Caption Formats: *

        *
          *
        • *

          * for FLAC: None *

          *
        • *
        • *

          * For MP3: None *

          *
        • *
        • *

          * For MP4: mov-text *

          *
        • *
        • *

          * For MPEG-TS: None *

          *
        • *
        • *

          * For ogg: None *

          *
        • *
        • *

          * For webm: None *

          *
        • *
        *
      • *
      • *

        * Valid Sidecar Caption Formats: Elastic Transcoder supports dfxp * (first div element only), scc, srt, and webvtt. If you want ttml or * smpte-tt compatible captions, specify dfxp as your output format. *

        *
          *
        • *

          * For FMP4: dfxp *

          *
        • *
        • *

          * Non-FMP4 outputs: All sidecar types *

          *
        • *
        *

        * fmp4 captions have an extension of .ismt *

        *
      • *
      * * @param format * The format you specify determines whether Elastic Transcoder * generates an embedded or sidecar caption for this output.

      *
        *
      • *

        * Valid Embedded Caption Formats: *

        *
          *
        • *

          * for FLAC: None *

          *
        • *
        • *

          * For MP3: None *

          *
        • *
        • *

          * For MP4: mov-text *

          *
        • *
        • *

          * For MPEG-TS: None *

          *
        • *
        • *

          * For ogg: None *

          *
        • *
        • *

          * For webm: None *

          *
        • *
        *
      • *
      • *

        * Valid Sidecar Caption Formats: Elastic Transcoder supports * dfxp (first div element only), scc, srt, and webvtt. If you want * ttml or smpte-tt compatible captions, specify dfxp as your output * format. *

        *
          *
        • *

          * For FMP4: dfxp *

          *
        • *
        • *

          * Non-FMP4 outputs: All sidecar types *

          *
        • *
        *

        * fmp4 captions have an extension of .ismt *

        *
      • * @return Returns a reference to this object so that method calls can be * chained together. */ public CaptionFormat withFormat(String format) { setFormat(format); return this; } /** *

        * The prefix for caption filenames, in the form description- * {language}, where: *

        *
          *
        • description is a description of the video.
        • *
        • {language} is a literal value that Elastic Transcoder * replaces with the two- or three-letter code for the language of the * caption in the output file names.
        • *
        *

        * If you don't include {language} in the file name * pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically appends the * count to the end of the segment files. *

        *

        * For example, suppose you're transcoding into srt format. When you * enter "Sydney-{language}-sunrise", and the language of the captions is * English (en), the name of the first caption file will be * Sydney-en-sunrise00000.srt. *

        * * @param pattern * The prefix for caption filenames, in the form description- * {language}, where:

        *
          *
        • description is a description of the video.
        • *
        • {language} is a literal value that Elastic * Transcoder replaces with the two- or three-letter code for the * language of the caption in the output file names.
        • *
        *

        * If you don't include {language} in the file name * pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically appends * the count to the end of the segment files. *

        *

        * For example, suppose you're transcoding into srt format. When * you enter "Sydney-{language}-sunrise", and the language of the * captions is English (en), the name of the first caption file will * be Sydney-en-sunrise00000.srt. */ public void setPattern(String pattern) { this.pattern = pattern; } /** *

        * The prefix for caption filenames, in the form description- * {language}, where: *

        *
          *
        • description is a description of the video.
        • *
        • {language} is a literal value that Elastic Transcoder * replaces with the two- or three-letter code for the language of the * caption in the output file names.
        • *
        *

        * If you don't include {language} in the file name * pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically appends the * count to the end of the segment files. *

        *

        * For example, suppose you're transcoding into srt format. When you * enter "Sydney-{language}-sunrise", and the language of the captions is * English (en), the name of the first caption file will be * Sydney-en-sunrise00000.srt. *

        * * @return The prefix for caption filenames, in the form description- * {language}, where:

        *
          *
        • description is a description of the video.
        • *
        • {language} is a literal value that Elastic * Transcoder replaces with the two- or three-letter code for the * language of the caption in the output file names.
        • *
        *

        * If you don't include {language} in the file * name pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically * appends the count to the end of the segment files. *

        *

        * For example, suppose you're transcoding into srt format. * When you enter "Sydney-{language}-sunrise", and the language of * the captions is English (en), the name of the first caption file * will be Sydney-en-sunrise00000.srt. */ public String getPattern() { return this.pattern; } /** *

        * The prefix for caption filenames, in the form description- * {language}, where: *

        *
          *
        • description is a description of the video.
        • *
        • {language} is a literal value that Elastic Transcoder * replaces with the two- or three-letter code for the language of the * caption in the output file names.
        • *
        *

        * If you don't include {language} in the file name * pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically appends the * count to the end of the segment files. *

        *

        * For example, suppose you're transcoding into srt format. When you * enter "Sydney-{language}-sunrise", and the language of the captions is * English (en), the name of the first caption file will be * Sydney-en-sunrise00000.srt. *

        * * @param pattern * The prefix for caption filenames, in the form description- * {language}, where:

        *
          *
        • description is a description of the video.
        • *
        • {language} is a literal value that Elastic * Transcoder replaces with the two- or three-letter code for the * language of the caption in the output file names.
        • *
        *

        * If you don't include {language} in the file name * pattern, Elastic Transcoder automatically appends " * {language}" to the value that you specify for the * description. In addition, Elastic Transcoder automatically appends * the count to the end of the segment files. *

        *

        * For example, suppose you're transcoding into srt format. When * you enter "Sydney-{language}-sunrise", and the language of the * captions is English (en), the name of the first caption file will * be Sydney-en-sunrise00000.srt. * @return Returns a reference to this object so that method calls can be * chained together. */ public CaptionFormat withPattern(String pattern) { setPattern(pattern); return this; } /** *

        * The encryption settings, if any, that you want Elastic Transcoder to * apply to your caption formats. *

        * * @param encryption * The encryption settings, if any, that you want Elastic Transcoder * to apply to your caption formats. */ public void setEncryption(Encryption encryption) { this.encryption = encryption; } /** *

        * The encryption settings, if any, that you want Elastic Transcoder to * apply to your caption formats. *

        * * @return The encryption settings, if any, that you want Elastic Transcoder * to apply to your caption formats. */ public Encryption getEncryption() { return this.encryption; } /** *

        * The encryption settings, if any, that you want Elastic Transcoder to * apply to your caption formats. *

        * * @param encryption * The encryption settings, if any, that you want Elastic Transcoder * to apply to your caption formats. * @return Returns a reference to this object so that method calls can be * chained together. */ public CaptionFormat withEncryption(Encryption encryption) { setEncryption(encryption); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFormat() != null) sb.append("Format: " + getFormat() + ","); if (getPattern() != null) sb.append("Pattern: " + getPattern() + ","); if (getEncryption() != null) sb.append("Encryption: " + getEncryption()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CaptionFormat == false) return false; CaptionFormat other = (CaptionFormat) obj; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; if (other.getPattern() == null ^ this.getPattern() == null) return false; if (other.getPattern() != null && other.getPattern().equals(this.getPattern()) == false) return false; if (other.getEncryption() == null ^ this.getEncryption() == null) return false; if (other.getEncryption() != null && other.getEncryption().equals(this.getEncryption()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getPattern() == null) ? 0 : getPattern().hashCode()); hashCode = prime * hashCode + ((getEncryption() == null) ? 0 : getEncryption().hashCode()); return hashCode; } @Override public CaptionFormat clone() { try { return (CaptionFormat) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy