org.freedesktop.gstreamer.gst.BufferCopyFlags 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.*;
/**
* A set of flags that can be provided to the gst_buffer_copy_into()
* function to specify which items should be copied.
*/
public class BufferCopyFlags extends io.github.jwharm.javagi.base.Bitfield {
/**
* Get the GType of the GstBufferCopyFlags class.
* @return the GType
*/
public static org.gnome.glib.Type getType() {
return Interop.getType("gst_buffer_copy_flags_get_type");
}
/**
* copy nothing
*/
public static final BufferCopyFlags NONE = new BufferCopyFlags(0);
/**
* flag indicating that buffer flags should be copied
*/
public static final BufferCopyFlags FLAGS = new BufferCopyFlags(1);
/**
* flag indicating that buffer pts, dts,
* duration, offset and offset_end should be copied
*/
public static final BufferCopyFlags TIMESTAMPS = new BufferCopyFlags(2);
/**
* flag indicating that buffer meta should be
* copied
*/
public static final BufferCopyFlags META = new BufferCopyFlags(4);
/**
* flag indicating that buffer memory should be reffed
* and appended to already existing memory. Unless the memory is marked as
* NO_SHARE, no actual copy of the memory is made but it is simply reffed.
* Add {@code GST_BUFFER_COPY_DEEP} to force a real copy.
*/
public static final BufferCopyFlags MEMORY = new BufferCopyFlags(8);
/**
* flag indicating that buffer memory should be
* merged
*/
public static final BufferCopyFlags MERGE = new BufferCopyFlags(16);
/**
* flag indicating that memory should always be copied instead of reffed
*/
public static final BufferCopyFlags DEEP = new BufferCopyFlags(32);
/**
* Create a new BufferCopyFlags with the provided value
*/
public BufferCopyFlags(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 BufferCopyFlags or(BufferCopyFlags... masks) {
int value = this.getValue();
for (BufferCopyFlags arg : masks) {
value |= arg.getValue();
}
return new BufferCopyFlags(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 BufferCopyFlags combined(BufferCopyFlags mask, BufferCopyFlags... masks) {
int value = mask.getValue();
for (BufferCopyFlags arg : masks) {
value |= arg.getValue();
}
return new BufferCopyFlags(value);
}
}