YzgFileConvertBase.java 2.12 KB
Newer Older
yanzg's avatar
yanzg committed
1
package com.yanzuoguang.util.vo.file;
yanzg's avatar
yanzg committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

import io.swagger.annotations.ApiModelProperty;

/**
 * 转换基础类
 *
 * @author 颜佐光
 */
public class YzgFileConvertBase {

    /**
     * 高质量品质
     */
    public static final YzgFileConvertBase VIDEO_TYPE_HIGH = new YzgFileConvertBase(
            0.01f, 0.01f, 1920, 1080, 8311136
    );
    /**
     * 常规品质
     */
    public static final YzgFileConvertBase VIDEO_TYPE_COMMON = new YzgFileConvertBase(
            0.01f, 0.01f, 800, 600, 600000
    );
    /**
     * 低质量品质
     */
    public static final YzgFileConvertBase VIDEO_TYPE_LOW = new YzgFileConvertBase(
            0.01f, 0.01f, 960, 0, 2955811
    );

    @ApiModelProperty(notes = "压缩尺寸比例,默认为1,范围在0~1之间.")
    protected float size = 1f;

    @ApiModelProperty(notes = "质量压缩比例,默认为1,范围在0~1之间.")
    protected float quote = 1f;

    @ApiModelProperty(notes = "最低宽度,如: 1920*1080中的1920.")
    protected int width = 0;

    @ApiModelProperty(notes = "最低高度,如: 1920*1080中的1080.")
    protected int height = 0;

    @ApiModelProperty(notes = "最低质量值")
    protected int bitrate = 0;

    public YzgFileConvertBase() {
    }

    public YzgFileConvertBase(float size, float quote, int width, int height, int bitrate) {
        this.size = size;
        this.quote = quote;
        this.width = width;
        this.height = height;
        this.bitrate = bitrate;
    }

    public float getSize() {
        return size;
    }

    public void setSize(float size) {
        this.size = size;
    }

    public float getQuote() {
        return quote;
    }

    public void setQuote(float quote) {
        this.quote = quote;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getBitrate() {
        return bitrate;
    }

    public void setBitrate(int bitrate) {
        this.bitrate = bitrate;
    }
}