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

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

Introduction

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

Prototype


public String getCodec() 

Source Link

Document

The video codec for the output file.

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