Example usage for com.amazonaws.services.elastictranscoder.model VideoParameters getPaddingPolicy

List of usage examples for com.amazonaws.services.elastictranscoder.model VideoParameters getPaddingPolicy

Introduction

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

Prototype


public String getPaddingPolicy() 

Source Link

Document

When you set PaddingPolicy to Pad, Elastic Transcoder may add black bars to the top and bottom and/or left and right sides of the output video to make the total size of the output video match the values that you specified for MaxWidth and MaxHeight.

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);
    }//from   www .  j  a  va  2  s. co m

    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;
}