<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: livekit_egress.proto

namespace Livekit;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>livekit.EncodingOptions</code>
 */
class EncodingOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * (default 1920)
     *
     * Generated from protobuf field <code>int32 width = 1;</code>
     */
    protected $width = 0;
    /**
     * (default 1080)
     *
     * Generated from protobuf field <code>int32 height = 2;</code>
     */
    protected $height = 0;
    /**
     * (default 24)
     *
     * Generated from protobuf field <code>int32 depth = 3;</code>
     */
    protected $depth = 0;
    /**
     * (default 30)
     *
     * Generated from protobuf field <code>int32 framerate = 4;</code>
     */
    protected $framerate = 0;
    /**
     * (default OPUS)
     *
     * Generated from protobuf field <code>.livekit.AudioCodec audio_codec = 5;</code>
     */
    protected $audio_codec = 0;
    /**
     * (default 128)
     *
     * Generated from protobuf field <code>int32 audio_bitrate = 6;</code>
     */
    protected $audio_bitrate = 0;
    /**
     * quality setting on audio encoder
     *
     * Generated from protobuf field <code>int32 audio_quality = 11;</code>
     */
    protected $audio_quality = 0;
    /**
     * (default 44100)
     *
     * Generated from protobuf field <code>int32 audio_frequency = 7;</code>
     */
    protected $audio_frequency = 0;
    /**
     * (default H264_MAIN)
     *
     * Generated from protobuf field <code>.livekit.VideoCodec video_codec = 8;</code>
     */
    protected $video_codec = 0;
    /**
     * (default 4500)
     *
     * Generated from protobuf field <code>int32 video_bitrate = 9;</code>
     */
    protected $video_bitrate = 0;
    /**
     * quality setting on video encoder
     *
     * Generated from protobuf field <code>int32 video_quality = 12;</code>
     */
    protected $video_quality = 0;
    /**
     * in seconds (default 4s for streaming, segment duration for segmented output, encoder default for files)
     *
     * Generated from protobuf field <code>double key_frame_interval = 10;</code>
     */
    protected $key_frame_interval = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $width
     *           (default 1920)
     *     @type int $height
     *           (default 1080)
     *     @type int $depth
     *           (default 24)
     *     @type int $framerate
     *           (default 30)
     *     @type int $audio_codec
     *           (default OPUS)
     *     @type int $audio_bitrate
     *           (default 128)
     *     @type int $audio_quality
     *           quality setting on audio encoder
     *     @type int $audio_frequency
     *           (default 44100)
     *     @type int $video_codec
     *           (default H264_MAIN)
     *     @type int $video_bitrate
     *           (default 4500)
     *     @type int $video_quality
     *           quality setting on video encoder
     *     @type float $key_frame_interval
     *           in seconds (default 4s for streaming, segment duration for segmented output, encoder default for files)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * (default 1920)
     *
     * Generated from protobuf field <code>int32 width = 1;</code>
     * @return int
     */
    public function getWidth()
    {
        return $this->width;
    }

    /**
     * (default 1920)
     *
     * Generated from protobuf field <code>int32 width = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setWidth($var)
    {
        GPBUtil::checkInt32($var);
        $this->width = $var;

        return $this;
    }

    /**
     * (default 1080)
     *
     * Generated from protobuf field <code>int32 height = 2;</code>
     * @return int
     */
    public function getHeight()
    {
        return $this->height;
    }

    /**
     * (default 1080)
     *
     * Generated from protobuf field <code>int32 height = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setHeight($var)
    {
        GPBUtil::checkInt32($var);
        $this->height = $var;

        return $this;
    }

    /**
     * (default 24)
     *
     * Generated from protobuf field <code>int32 depth = 3;</code>
     * @return int
     */
    public function getDepth()
    {
        return $this->depth;
    }

    /**
     * (default 24)
     *
     * Generated from protobuf field <code>int32 depth = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setDepth($var)
    {
        GPBUtil::checkInt32($var);
        $this->depth = $var;

        return $this;
    }

    /**
     * (default 30)
     *
     * Generated from protobuf field <code>int32 framerate = 4;</code>
     * @return int
     */
    public function getFramerate()
    {
        return $this->framerate;
    }

    /**
     * (default 30)
     *
     * Generated from protobuf field <code>int32 framerate = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setFramerate($var)
    {
        GPBUtil::checkInt32($var);
        $this->framerate = $var;

        return $this;
    }

    /**
     * (default OPUS)
     *
     * Generated from protobuf field <code>.livekit.AudioCodec audio_codec = 5;</code>
     * @return int
     */
    public function getAudioCodec()
    {
        return $this->audio_codec;
    }

    /**
     * (default OPUS)
     *
     * Generated from protobuf field <code>.livekit.AudioCodec audio_codec = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setAudioCodec($var)
    {
        GPBUtil::checkEnum($var, \Livekit\AudioCodec::class);
        $this->audio_codec = $var;

        return $this;
    }

    /**
     * (default 128)
     *
     * Generated from protobuf field <code>int32 audio_bitrate = 6;</code>
     * @return int
     */
    public function getAudioBitrate()
    {
        return $this->audio_bitrate;
    }

    /**
     * (default 128)
     *
     * Generated from protobuf field <code>int32 audio_bitrate = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setAudioBitrate($var)
    {
        GPBUtil::checkInt32($var);
        $this->audio_bitrate = $var;

        return $this;
    }

    /**
     * quality setting on audio encoder
     *
     * Generated from protobuf field <code>int32 audio_quality = 11;</code>
     * @return int
     */
    public function getAudioQuality()
    {
        return $this->audio_quality;
    }

    /**
     * quality setting on audio encoder
     *
     * Generated from protobuf field <code>int32 audio_quality = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setAudioQuality($var)
    {
        GPBUtil::checkInt32($var);
        $this->audio_quality = $var;

        return $this;
    }

    /**
     * (default 44100)
     *
     * Generated from protobuf field <code>int32 audio_frequency = 7;</code>
     * @return int
     */
    public function getAudioFrequency()
    {
        return $this->audio_frequency;
    }

    /**
     * (default 44100)
     *
     * Generated from protobuf field <code>int32 audio_frequency = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setAudioFrequency($var)
    {
        GPBUtil::checkInt32($var);
        $this->audio_frequency = $var;

        return $this;
    }

    /**
     * (default H264_MAIN)
     *
     * Generated from protobuf field <code>.livekit.VideoCodec video_codec = 8;</code>
     * @return int
     */
    public function getVideoCodec()
    {
        return $this->video_codec;
    }

    /**
     * (default H264_MAIN)
     *
     * Generated from protobuf field <code>.livekit.VideoCodec video_codec = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setVideoCodec($var)
    {
        GPBUtil::checkEnum($var, \Livekit\VideoCodec::class);
        $this->video_codec = $var;

        return $this;
    }

    /**
     * (default 4500)
     *
     * Generated from protobuf field <code>int32 video_bitrate = 9;</code>
     * @return int
     */
    public function getVideoBitrate()
    {
        return $this->video_bitrate;
    }

    /**
     * (default 4500)
     *
     * Generated from protobuf field <code>int32 video_bitrate = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setVideoBitrate($var)
    {
        GPBUtil::checkInt32($var);
        $this->video_bitrate = $var;

        return $this;
    }

    /**
     * quality setting on video encoder
     *
     * Generated from protobuf field <code>int32 video_quality = 12;</code>
     * @return int
     */
    public function getVideoQuality()
    {
        return $this->video_quality;
    }

    /**
     * quality setting on video encoder
     *
     * Generated from protobuf field <code>int32 video_quality = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setVideoQuality($var)
    {
        GPBUtil::checkInt32($var);
        $this->video_quality = $var;

        return $this;
    }

    /**
     * in seconds (default 4s for streaming, segment duration for segmented output, encoder default for files)
     *
     * Generated from protobuf field <code>double key_frame_interval = 10;</code>
     * @return float
     */
    public function getKeyFrameInterval()
    {
        return $this->key_frame_interval;
    }

    /**
     * in seconds (default 4s for streaming, segment duration for segmented output, encoder default for files)
     *
     * Generated from protobuf field <code>double key_frame_interval = 10;</code>
     * @param float $var
     * @return $this
     */
    public function setKeyFrameInterval($var)
    {
        GPBUtil::checkDouble($var);
        $this->key_frame_interval = $var;

        return $this;
    }

}

