All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.freedesktop.gstreamer.gst.TracerValueScope Maven / Gradle / Ivy

There is a newer version: 0.10.2
Show newest version
/* Java-GI - Java language bindings for GObject-Introspection-based libraries
 * Copyright (C) 2022-2023 Jan-Willem Harmannij
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see .
 */

 /* This file has been generated with Java-GI.
  * Do not edit this file directly!
  * Visit https://jwharm.github.io/java-gi for more information.
  */

package org.freedesktop.gstreamer.gst;

import io.github.jwharm.javagi.gobject.*;
import io.github.jwharm.javagi.gobject.types.*;
import io.github.jwharm.javagi.base.*;
import io.github.jwharm.javagi.interop.*;
import java.lang.foreign.*;
import java.lang.invoke.*;
import org.jetbrains.annotations.*;

/**
 * Tracing record will contain fields that contain a measured value or extra
 * meta-data. One such meta data are values that tell where a measurement was
 * taken. This enumerating declares to which scope such a meta data field
 * relates to. If it is e.g. {@link TracerValueScope#PAD}, then each of the log
 * events may contain values for different {@code GstPads}.
 * @version 1.8
 */
public enum TracerValueScope implements io.github.jwharm.javagi.base.Enumeration {
    
    /**
     * the value is related to the process
     */
    PROCESS(0),
    
    /**
     * the value is related to a thread
     */
    THREAD(1),
    
    /**
     * the value is related to an {@link Element}
     */
    ELEMENT(2),
    
    /**
     * the value is related to a {@link Pad}
     */
    PAD(3);
    
    /**
     * Get the GType of the GstTracerValueScope class.
     * @return the GType
     */
    public static org.gnome.glib.Type getType() {
        return Interop.getType("gst_tracer_value_scope_get_type");
    }
    
    private final int value;
    
    /**
     * Create a new TracerValueScope for the provided value
     * @param value the enum value
     */
    TracerValueScope(int value) {
        this.value = value;
    }
    
    /**
     * Get the numeric value of this enum
     * @return the enum value
     */
    @Override
    public int getValue() {
        return value;
    }
    
    /**
     * Create a new TracerValueScope for the provided value
     * @param value the enum value
     * @return the enum for the provided value
     */
    public static TracerValueScope of(int value) {
        return switch (value) {
            case 0 -> PROCESS;
            case 1 -> THREAD;
            case 2 -> ELEMENT;
            case 3 -> PAD;
            default -> throw new IllegalStateException("Unexpected value: " + value);
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy