package com.nativelibs4java.ffmpeg.avfilter;
import org.bridj.Callback;
import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ann.Array;
import org.bridj.ann.Field;
import org.bridj.ann.Library;
/**
 * <i>native declaration : libavfilter/avfilter.h</i><br>
 * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
 * a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
 * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> .
 */
@Library("avfilter") 
public class AVFilterBuffer extends StructObject {
	public AVFilterBuffer() {
		super();
	}
	public AVFilterBuffer(Pointer pointer) {
		super(pointer);
	}
	/**
	 * < buffer data for each plane/channel<br>
	 * C type : uint8_t*[8]
	 */
	@Array({8}) 
	@Field(0) 
	public Pointer<Pointer<Byte > > data() {
		return this.io.getPointerField(this, 0);
	}
	/**
	 * < number of bytes per line<br>
	 * C type : int[8]
	 */
	@Array({8}) 
	@Field(1) 
	public Pointer<Integer > linesize() {
		return this.io.getPointerField(this, 1);
	}
	/// < number of references to this buffer
	@Field(2) 
	public int refcount() {
		return this.io.getIntField(this, 2);
	}
	/// < number of references to this buffer
	@Field(2) 
	public AVFilterBuffer refcount(int refcount) {
		this.io.setIntField(this, 2, refcount);
		return this;
	}
	public final int refcount_$eq(int refcount) {
		refcount(refcount);
		return refcount;
	}
	/**
	 * private data to be used by a custom free function<br>
	 * C type : void*
	 */
	@Field(3) 
	public Pointer<? > priv() {
		return this.io.getPointerField(this, 3);
	}
	/**
	 * private data to be used by a custom free function<br>
	 * C type : void*
	 */
	@Field(3) 
	public AVFilterBuffer priv(Pointer<? > priv) {
		this.io.setPointerField(this, 3, priv);
		return this;
	}
	/// C type : void*
	public final Pointer<? > priv_$eq(Pointer<? > priv) {
		priv(priv);
		return priv;
	}
	/**
	 * A pointer to the function to deallocate this buffer if the default<br>
	 * function is not sufficient. This could, for example, add the memory<br>
	 * back into a memory pool to be reused later without the overhead of<br>
	 * reallocating it from scratch.<br>
	 * C type : free_callback
	 */
	@Field(4) 
	public Pointer<AVFilterBuffer.free_callback > free() {
		return this.io.getPointerField(this, 4);
	}
	/**
	 * A pointer to the function to deallocate this buffer if the default<br>
	 * function is not sufficient. This could, for example, add the memory<br>
	 * back into a memory pool to be reused later without the overhead of<br>
	 * reallocating it from scratch.<br>
	 * C type : free_callback
	 */
	@Field(4) 
	public AVFilterBuffer free(Pointer<AVFilterBuffer.free_callback > free) {
		this.io.setPointerField(this, 4, free);
		return this;
	}
	/// C type : free_callback
	public final Pointer<AVFilterBuffer.free_callback > free_$eq(Pointer<AVFilterBuffer.free_callback > free) {
		free(free);
		return free;
	}
	/// < media format
	@Field(5) 
	public int format() {
		return this.io.getIntField(this, 5);
	}
	/// < media format
	@Field(5) 
	public AVFilterBuffer format(int format) {
		this.io.setIntField(this, 5, format);
		return this;
	}
	public final int format_$eq(int format) {
		format(format);
		return format;
	}
	/// < width and height of the allocated buffer
	@Field(6) 
	public int w() {
		return this.io.getIntField(this, 6);
	}
	/// < width and height of the allocated buffer
	@Field(6) 
	public AVFilterBuffer w(int w) {
		this.io.setIntField(this, 6, w);
		return this;
	}
	public final int w_$eq(int w) {
		w(w);
		return w;
	}
	/// < width and height of the allocated buffer
	@Field(7) 
	public int h() {
		return this.io.getIntField(this, 7);
	}
	/// < width and height of the allocated buffer
	@Field(7) 
	public AVFilterBuffer h(int h) {
		this.io.setIntField(this, 7, h);
		return this;
	}
	public final int h_$eq(int h) {
		h(h);
		return h;
	}
	/// <i>native declaration : libavfilter/avfilter.h</i>
	public static abstract class free_callback extends Callback<free_callback > {
		public abstract void apply(Pointer<AVFilterBuffer > buf);
	};
}
