<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_ingress.proto

namespace Livekit;

use UnexpectedValueException;

/**
 * Protobuf type <code>livekit.IngressVideoEncodingPreset</code>
 */
class IngressVideoEncodingPreset
{
    /**
     * 1280x720,  30fps, 1900kbps main layer, 3 layers total
     *
     * Generated from protobuf enum <code>H264_720P_30FPS_3_LAYERS = 0;</code>
     */
    const H264_720P_30FPS_3_LAYERS = 0;
    /**
     * 1980x1080, 30fps, 3500kbps main layer, 3 layers total
     *
     * Generated from protobuf enum <code>H264_1080P_30FPS_3_LAYERS = 1;</code>
     */
    const H264_1080P_30FPS_3_LAYERS = 1;
    /**
     *  960x540,  25fps, 1000kbps  main layer, 2 layers total
     *
     * Generated from protobuf enum <code>H264_540P_25FPS_2_LAYERS = 2;</code>
     */
    const H264_540P_25FPS_2_LAYERS = 2;
    /**
     * 1280x720,  30fps, 1900kbps, no simulcast
     *
     * Generated from protobuf enum <code>H264_720P_30FPS_1_LAYER = 3;</code>
     */
    const H264_720P_30FPS_1_LAYER = 3;
    /**
     * 1980x1080, 30fps, 3500kbps, no simulcast
     *
     * Generated from protobuf enum <code>H264_1080P_30FPS_1_LAYER = 4;</code>
     */
    const H264_1080P_30FPS_1_LAYER = 4;
    /**
     * 1280x720,  30fps, 2500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content
     *
     * Generated from protobuf enum <code>H264_720P_30FPS_3_LAYERS_HIGH_MOTION = 5;</code>
     */
    const H264_720P_30FPS_3_LAYERS_HIGH_MOTION = 5;
    /**
     * 1980x1080, 30fps, 4500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content
     *
     * Generated from protobuf enum <code>H264_1080P_30FPS_3_LAYERS_HIGH_MOTION = 6;</code>
     */
    const H264_1080P_30FPS_3_LAYERS_HIGH_MOTION = 6;
    /**
     *  960x540,  25fps, 1300kbps  main layer, 2 layers total, higher bitrate for high motion, harder to encode content
     *
     * Generated from protobuf enum <code>H264_540P_25FPS_2_LAYERS_HIGH_MOTION = 7;</code>
     */
    const H264_540P_25FPS_2_LAYERS_HIGH_MOTION = 7;
    /**
     * 1280x720,  30fps, 2500kbps, no simulcast, higher bitrate for high motion, harder to encode content
     *
     * Generated from protobuf enum <code>H264_720P_30FPS_1_LAYER_HIGH_MOTION = 8;</code>
     */
    const H264_720P_30FPS_1_LAYER_HIGH_MOTION = 8;
    /**
     * 1980x1080, 30fps, 4500kbps, no simulcast, higher bitrate for high motion, harder to encode content
     *
     * Generated from protobuf enum <code>H264_1080P_30FPS_1_LAYER_HIGH_MOTION = 9;</code>
     */
    const H264_1080P_30FPS_1_LAYER_HIGH_MOTION = 9;

    private static $valueToName = [
        self::H264_720P_30FPS_3_LAYERS => 'H264_720P_30FPS_3_LAYERS',
        self::H264_1080P_30FPS_3_LAYERS => 'H264_1080P_30FPS_3_LAYERS',
        self::H264_540P_25FPS_2_LAYERS => 'H264_540P_25FPS_2_LAYERS',
        self::H264_720P_30FPS_1_LAYER => 'H264_720P_30FPS_1_LAYER',
        self::H264_1080P_30FPS_1_LAYER => 'H264_1080P_30FPS_1_LAYER',
        self::H264_720P_30FPS_3_LAYERS_HIGH_MOTION => 'H264_720P_30FPS_3_LAYERS_HIGH_MOTION',
        self::H264_1080P_30FPS_3_LAYERS_HIGH_MOTION => 'H264_1080P_30FPS_3_LAYERS_HIGH_MOTION',
        self::H264_540P_25FPS_2_LAYERS_HIGH_MOTION => 'H264_540P_25FPS_2_LAYERS_HIGH_MOTION',
        self::H264_720P_30FPS_1_LAYER_HIGH_MOTION => 'H264_720P_30FPS_1_LAYER_HIGH_MOTION',
        self::H264_1080P_30FPS_1_LAYER_HIGH_MOTION => 'H264_1080P_30FPS_1_LAYER_HIGH_MOTION',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

