org.freedesktop.gstreamer.gst.ClockFlags Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gst Show documentation
Show all versions of gst Show documentation
Java language bindings for Gst, generated with Java-GI
/* 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.*;
/**
* The capabilities of this clock
*/
public class ClockFlags extends io.github.jwharm.javagi.base.Bitfield {
/**
* Get the GType of the GstClockFlags class.
* @return the GType
*/
public static org.gnome.glib.Type getType() {
return Interop.getType("gst_clock_flags_get_type");
}
/**
* clock can do a single sync timeout request
*/
public static final ClockFlags CAN_DO_SINGLE_SYNC = new ClockFlags(16);
/**
* clock can do a single async timeout request
*/
public static final ClockFlags CAN_DO_SINGLE_ASYNC = new ClockFlags(32);
/**
* clock can do sync periodic timeout requests
*/
public static final ClockFlags CAN_DO_PERIODIC_SYNC = new ClockFlags(64);
/**
* clock can do async periodic timeout callbacks
*/
public static final ClockFlags CAN_DO_PERIODIC_ASYNC = new ClockFlags(128);
/**
* clock's resolution can be changed
*/
public static final ClockFlags CAN_SET_RESOLUTION = new ClockFlags(256);
/**
* clock can be slaved to a master clock
*/
public static final ClockFlags CAN_SET_MASTER = new ClockFlags(512);
/**
* clock needs to be synced before it can be used
*/
public static final ClockFlags NEEDS_STARTUP_SYNC = new ClockFlags(1024);
/**
* subclasses can add additional flags starting from this flag
*/
public static final ClockFlags LAST = new ClockFlags(4096);
/**
* Create a new ClockFlags with the provided value
*/
public ClockFlags(int value) {
super(value);
}
/**
* Combine (bitwise OR) operation
* @param masks one or more values to combine with
* @return the combined value by calculating {@code this | mask}
*/
public ClockFlags or(ClockFlags... masks) {
int value = this.getValue();
for (ClockFlags arg : masks) {
value |= arg.getValue();
}
return new ClockFlags(value);
}
/**
* Combine (bitwise OR) operation
* @param mask the first value to combine
* @param masks the other values to combine
* @return the combined value by calculating {@code mask | masks[0] | masks[1] | ...}
*/
public static ClockFlags combined(ClockFlags mask, ClockFlags... masks) {
int value = mask.getValue();
for (ClockFlags arg : masks) {
value |= arg.getValue();
}
return new ClockFlags(value);
}
}