Example usage for com.amazonaws.services.elastictranscoder.model Preset getDescription

List of usage examples for com.amazonaws.services.elastictranscoder.model Preset getDescription

Introduction

In this page you can find the example usage for com.amazonaws.services.elastictranscoder.model Preset getDescription.

Prototype


public String getDescription() 

Source Link

Document

A description of the preset.

Usage

From source file:org.alanwilliamson.amazon.transcoder.presets.List.java

License:Open Source License

protected cfStructData getPreset(Preset preset) throws cfmRunTimeException {
    cfStructData s = new cfStructData();

    s.setData("id", new cfStringData(preset.getId()));
    s.setData("name", new cfStringData(preset.getName()));
    s.setData("container", new cfStringData(preset.getContainer()));
    s.setData("description", new cfStringData(preset.getDescription()));
    s.setData("type", new cfStringData(preset.getType()));
    s.setData("arn", new cfStringData(preset.getArn()));

    AudioParameters ap = preset.getAudio();
    if (ap != null) {
        cfStructData a = new cfStructData();
        a.setData("bitrate", new cfStringData(ap.getBitRate()));
        a.setData("channels", new cfStringData(ap.getChannels()));
        a.setData("codec", new cfStringData(ap.getCodec()));
        a.setData("samplerate", new cfStringData(ap.getSampleRate()));
        s.setData("audio", a);
    }/* w w  w . j av a  2s  .  c  om*/

    VideoParameters vp = preset.getVideo();
    if (vp != null) {
        cfStructData a = new cfStructData();
        a.setData("aspectratio", new cfStringData(vp.getAspectRatio()));
        a.setData("bitrate", new cfStringData(vp.getBitRate()));
        a.setData("codec", new cfStringData(vp.getCodec()));
        a.setData("displayaspectratio", new cfStringData(vp.getDisplayAspectRatio()));
        a.setData("fixedgop", new cfStringData(vp.getFixedGOP()));
        a.setData("framerate", new cfStringData(vp.getFrameRate()));
        a.setData("keyframesmaxdist", new cfStringData(vp.getKeyframesMaxDist()));
        a.setData("maxframesrate", new cfStringData(vp.getMaxFrameRate()));
        a.setData("maxheight", new cfStringData(vp.getMaxHeight()));
        a.setData("maxwidth", new cfStringData(vp.getMaxWidth()));
        a.setData("paddingpolicy", new cfStringData(vp.getPaddingPolicy()));
        a.setData("resolution", new cfStringData(vp.getResolution()));
        a.setData("sizingpolicy", new cfStringData(vp.getSizingPolicy()));
        s.setData("video", a);
    }

    return s;
}