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

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

Introduction

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

Prototype


public String getResolution() 

Source Link

Document

To better control resolution and aspect ratio of output videos, we recommend that you use the values MaxWidth, MaxHeight, SizingPolicy, PaddingPolicy, and DisplayAspectRatio instead of Resolution and AspectRatio.

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 ww w  . ja  v  a2s  .  c  o  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;
}