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

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

Introduction

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

Prototype


public String getSizingPolicy() 

Source Link

Document

Specify one of the following values to control scaling of the output video:

  • Fit: Elastic Transcoder scales the output video so it matches the value that you specified in either MaxWidth or MaxHeight without exceeding the other value.

    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 . ja  v  a  2 s .  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;
    }