package com.nativelibs4java.ffmpeg.avfilter;
import com.nativelibs4java.ffmpeg.avutil.AVRational;
import java.util.Collections;
import java.util.Iterator;
import org.bridj.FlagSet;
import org.bridj.IntValuedEnum;
import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ValuedEnum;
import org.bridj.ann.Field;
import org.bridj.ann.Library;
/**
 * A link between two filters. This contains pointers to the source and<br>
 * destination filters between which this link exists, and the indexes of<br>
 * the pads involved. In addition, this link also contains the parameters<br>
 * which have been negotiated and agreed upon between the filter, such as<br>
 * image dimensions, format, etc.<br>
 * <i>native declaration : libavfilter/avfilter.h:561</i><br>
 * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
 * a tool written by <a href="http://ochafik.free.fr/">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 AVFilterLink extends StructObject {
	public AVFilterLink() {
		super();
	}
	public AVFilterLink(Pointer pointer) {
		super(pointer);
	}
	/**
	 * < source filter<br>
	 * C type : AVFilterContext*
	 */
	@Field(0) 
	public Pointer<AVFilterContext > src() {
		return this.io.getPointerField(this, 0);
	}
	/**
	 * < source filter<br>
	 * C type : AVFilterContext*
	 */
	@Field(0) 
	public AVFilterLink src(Pointer<AVFilterContext > src) {
		this.io.setPointerField(this, 0, src);
		return this;
	}
	/// C type : AVFilterContext*
	public final Pointer<AVFilterContext > src_$eq(Pointer<AVFilterContext > src) {
		src(src);
		return src;
	}
	/**
	 * < output pad on the source filter<br>
	 * C type : AVFilterPad*
	 */
	@Field(1) 
	public Pointer<AVFilterPad > srcpad() {
		return this.io.getPointerField(this, 1);
	}
	/**
	 * < output pad on the source filter<br>
	 * C type : AVFilterPad*
	 */
	@Field(1) 
	public AVFilterLink srcpad(Pointer<AVFilterPad > srcpad) {
		this.io.setPointerField(this, 1, srcpad);
		return this;
	}
	/// C type : AVFilterPad*
	public final Pointer<AVFilterPad > srcpad_$eq(Pointer<AVFilterPad > srcpad) {
		srcpad(srcpad);
		return srcpad;
	}
	/**
	 * < dest filter<br>
	 * C type : AVFilterContext*
	 */
	@Field(2) 
	public Pointer<AVFilterContext > dst() {
		return this.io.getPointerField(this, 2);
	}
	/**
	 * < dest filter<br>
	 * C type : AVFilterContext*
	 */
	@Field(2) 
	public AVFilterLink dst(Pointer<AVFilterContext > dst) {
		this.io.setPointerField(this, 2, dst);
		return this;
	}
	/// C type : AVFilterContext*
	public final Pointer<AVFilterContext > dst_$eq(Pointer<AVFilterContext > dst) {
		dst(dst);
		return dst;
	}
	/**
	 * < input pad on the dest filter<br>
	 * C type : AVFilterPad*
	 */
	@Field(3) 
	public Pointer<AVFilterPad > dstpad() {
		return this.io.getPointerField(this, 3);
	}
	/**
	 * < input pad on the dest filter<br>
	 * C type : AVFilterPad*
	 */
	@Field(3) 
	public AVFilterLink dstpad(Pointer<AVFilterPad > dstpad) {
		this.io.setPointerField(this, 3, dstpad);
		return this;
	}
	/// C type : AVFilterPad*
	public final Pointer<AVFilterPad > dstpad_$eq(Pointer<AVFilterPad > dstpad) {
		dstpad(dstpad);
		return dstpad;
	}
	/**
	 * These two parameters apply only to video<br>
	 * < agreed upon image width
	 */
	@Field(6) 
	public int w() {
		return this.io.getIntField(this, 6);
	}
	/**
	 * These two parameters apply only to video<br>
	 * < agreed upon image width
	 */
	@Field(6) 
	public AVFilterLink w(int w) {
		this.io.setIntField(this, 6, w);
		return this;
	}
	public final int w_$eq(int w) {
		w(w);
		return w;
	}
	/// < agreed upon image height
	@Field(7) 
	public int h() {
		return this.io.getIntField(this, 7);
	}
	/// < agreed upon image height
	@Field(7) 
	public AVFilterLink h(int h) {
		this.io.setIntField(this, 7, h);
		return this;
	}
	public final int h_$eq(int h) {
		h(h);
		return h;
	}
	/**
	 * These two parameters apply only to audio<br>
	 * < channel layout of current buffer (see libavcore/audioconvert.h)
	 */
	@Field(8) 
	public long channel_layout() {
		return this.io.getLongField(this, 8);
	}
	/**
	 * These two parameters apply only to audio<br>
	 * < channel layout of current buffer (see libavcore/audioconvert.h)
	 */
	@Field(8) 
	public AVFilterLink channel_layout(long channel_layout) {
		this.io.setLongField(this, 8, channel_layout);
		return this;
	}
	public final long channel_layout_$eq(long channel_layout) {
		channel_layout(channel_layout);
		return channel_layout;
	}
	/// < samples per second
	@Field(9) 
	public long sample_rate() {
		return this.io.getLongField(this, 9);
	}
	/// < samples per second
	@Field(9) 
	public AVFilterLink sample_rate(long sample_rate) {
		this.io.setLongField(this, 9, sample_rate);
		return this;
	}
	public final long sample_rate_$eq(long sample_rate) {
		sample_rate(sample_rate);
		return sample_rate;
	}
	/// < agreed upon media format
	@Field(10) 
	public int format() {
		return this.io.getIntField(this, 10);
	}
	/// < agreed upon media format
	@Field(10) 
	public AVFilterLink format(int format) {
		this.io.setIntField(this, 10, format);
		return this;
	}
	public final int format_$eq(int format) {
		format(format);
		return format;
	}
	/**
	 * Lists of formats supported by the input and output filters respectively.<br>
	 * These lists are used for negotiating the format to actually be used,<br>
	 * which will be loaded into the format member, above, when chosen.<br>
	 * C type : AVFilterFormats*
	 */
	@Field(11) 
	public Pointer<AVFilterFormats > in_formats() {
		return this.io.getPointerField(this, 11);
	}
	/**
	 * Lists of formats supported by the input and output filters respectively.<br>
	 * These lists are used for negotiating the format to actually be used,<br>
	 * which will be loaded into the format member, above, when chosen.<br>
	 * C type : AVFilterFormats*
	 */
	@Field(11) 
	public AVFilterLink in_formats(Pointer<AVFilterFormats > in_formats) {
		this.io.setPointerField(this, 11, in_formats);
		return this;
	}
	/// C type : AVFilterFormats*
	public final Pointer<AVFilterFormats > in_formats_$eq(Pointer<AVFilterFormats > in_formats) {
		in_formats(in_formats);
		return in_formats;
	}
	/// C type : AVFilterFormats*
	@Field(12) 
	public Pointer<AVFilterFormats > out_formats() {
		return this.io.getPointerField(this, 12);
	}
	/// C type : AVFilterFormats*
	@Field(12) 
	public AVFilterLink out_formats(Pointer<AVFilterFormats > out_formats) {
		this.io.setPointerField(this, 12, out_formats);
		return this;
	}
	/// C type : AVFilterFormats*
	public final Pointer<AVFilterFormats > out_formats_$eq(Pointer<AVFilterFormats > out_formats) {
		out_formats(out_formats);
		return out_formats;
	}
	/**
	 * The buffer reference currently being sent across the link by the source<br>
	 * filter. This is used internally by the filter system to allow<br>
	 * automatic copying of buffers which do not have sufficient permissions<br>
	 * for the destination. This should not be accessed directly by the<br>
	 * filters.<br>
	 * C type : AVFilterBufferRef*
	 */
	@Field(13) 
	public Pointer<AVFilterBufferRef > src_buf() {
		return this.io.getPointerField(this, 13);
	}
	/**
	 * The buffer reference currently being sent across the link by the source<br>
	 * filter. This is used internally by the filter system to allow<br>
	 * automatic copying of buffers which do not have sufficient permissions<br>
	 * for the destination. This should not be accessed directly by the<br>
	 * filters.<br>
	 * C type : AVFilterBufferRef*
	 */
	@Field(13) 
	public AVFilterLink src_buf(Pointer<AVFilterBufferRef > src_buf) {
		this.io.setPointerField(this, 13, src_buf);
		return this;
	}
	/// C type : AVFilterBufferRef*
	public final Pointer<AVFilterBufferRef > src_buf_$eq(Pointer<AVFilterBufferRef > src_buf) {
		src_buf(src_buf);
		return src_buf;
	}
	/// C type : AVFilterBufferRef*
	@Field(14) 
	public Pointer<AVFilterBufferRef > cur_buf() {
		return this.io.getPointerField(this, 14);
	}
	/// C type : AVFilterBufferRef*
	@Field(14) 
	public AVFilterLink cur_buf(Pointer<AVFilterBufferRef > cur_buf) {
		this.io.setPointerField(this, 14, cur_buf);
		return this;
	}
	/// C type : AVFilterBufferRef*
	public final Pointer<AVFilterBufferRef > cur_buf_$eq(Pointer<AVFilterBufferRef > cur_buf) {
		cur_buf(cur_buf);
		return cur_buf;
	}
	/// C type : AVFilterBufferRef*
	@Field(15) 
	public Pointer<AVFilterBufferRef > out_buf() {
		return this.io.getPointerField(this, 15);
	}
	/// C type : AVFilterBufferRef*
	@Field(15) 
	public AVFilterLink out_buf(Pointer<AVFilterBufferRef > out_buf) {
		this.io.setPointerField(this, 15, out_buf);
		return this;
	}
	/// C type : AVFilterBufferRef*
	public final Pointer<AVFilterBufferRef > out_buf_$eq(Pointer<AVFilterBufferRef > out_buf) {
		out_buf(out_buf);
		return out_buf;
	}
	/**
	 * Define the time base used by the PTS of the frames/samples<br>
	 * which will pass through this link.<br>
	 * During the configuration stage, each filter is supposed to<br>
	 * change only the output timebase, while the timebase of the<br>
	 * input link is assumed to be an unchangeable property.<br>
	 * C type : AVRational
	 */
	@Field(16) 
	public AVRational time_base() {
		return this.io.getNativeObjectField(this, 16);
	}
	public enum init_state_enum implements IntValuedEnum<init_state_enum > {
		AVLINK_UNINIT(0),
		AVLINK_STARTINIT(1),
		AVLINK_INIT(2);
		init_state_enum(long value) {
			this.value = value;
		}
		public final long value;
		public long value() {
			return this.value;
		}
		public Iterator<init_state_enum > iterator() {
			return Collections.singleton(this).iterator();
		}
		public static ValuedEnum<init_state_enum > fromValue(long value) {
			return FlagSet.fromValue(value, values());
		}
	};
}
