package com.nativelibs4java.ffmpeg.avcodec;
import org.bridj.Callback;
import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ann.Field;
import org.bridj.ann.Library;
/**
 * <i>native declaration : libavcodec/avcodec.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.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("avcodec") 
public class AVHWAccel extends StructObject {
	public AVHWAccel() {
		super();
	}
	public AVHWAccel(Pointer pointer) {
		super(pointer);
	}
	/**
	 * Name of the hardware accelerated codec.<br>
	 * The name is globally unique among encoders and among decoders (but an<br>
	 * encoder and a decoder can share the same name).<br>
	 * C type : const char*
	 */
	@Field(0) 
	public Pointer<Byte > name() {
		return this.io.getPointerField(this, 0);
	}
	/**
	 * Name of the hardware accelerated codec.<br>
	 * The name is globally unique among encoders and among decoders (but an<br>
	 * encoder and a decoder can share the same name).<br>
	 * C type : const char*
	 */
	@Field(0) 
	public AVHWAccel name(Pointer<Byte > name) {
		this.io.setPointerField(this, 0, name);
		return this;
	}
	/// C type : const char*
	public final Pointer<Byte > name_$eq(Pointer<Byte > name) {
		name(name);
		return name;
	}
	/**
	 * Hardware accelerated codec capabilities.<br>
	 * see FF_HWACCEL_CODEC_CAP_*
	 */
	@Field(4) 
	public int capabilities() {
		return this.io.getIntField(this, 4);
	}
	/**
	 * Hardware accelerated codec capabilities.<br>
	 * see FF_HWACCEL_CODEC_CAP_*
	 */
	@Field(4) 
	public AVHWAccel capabilities(int capabilities) {
		this.io.setIntField(this, 4, capabilities);
		return this;
	}
	public final int capabilities_$eq(int capabilities) {
		capabilities(capabilities);
		return capabilities;
	}
	/// C type : AVHWAccel*
	@Field(5) 
	public Pointer<AVHWAccel > next() {
		return this.io.getPointerField(this, 5);
	}
	/// C type : AVHWAccel*
	@Field(5) 
	public AVHWAccel next(Pointer<AVHWAccel > next) {
		this.io.setPointerField(this, 5, next);
		return this;
	}
	/// C type : AVHWAccel*
	public final Pointer<AVHWAccel > next_$eq(Pointer<AVHWAccel > next) {
		next(next);
		return next;
	}
	/**
	 * Called at the beginning of each frame or field picture.<br>
	 * * Meaningful frame information (codec specific) is guaranteed to<br>
	 * be parsed at this point. This function is mandatory.<br>
	 * * Note that buf can be NULL along with buf_size set to 0.<br>
	 * Otherwise, this means the whole frame is available at this point.<br>
	 * * @param avctx the codec context<br>
	 * @param buf the frame data buffer base<br>
	 * @param buf_size the size of the frame in bytes<br>
	 * @return zero if successful, a negative value otherwise<br>
	 * C type : start_frame_callback
	 */
	@Field(6) 
	public Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.start_frame_callback > start_frame() {
		return this.io.getPointerField(this, 6);
	}
	/**
	 * Called at the beginning of each frame or field picture.<br>
	 * * Meaningful frame information (codec specific) is guaranteed to<br>
	 * be parsed at this point. This function is mandatory.<br>
	 * * Note that buf can be NULL along with buf_size set to 0.<br>
	 * Otherwise, this means the whole frame is available at this point.<br>
	 * * @param avctx the codec context<br>
	 * @param buf the frame data buffer base<br>
	 * @param buf_size the size of the frame in bytes<br>
	 * @return zero if successful, a negative value otherwise<br>
	 * C type : start_frame_callback
	 */
	@Field(6) 
	public AVHWAccel start_frame(Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.start_frame_callback > start_frame) {
		this.io.setPointerField(this, 6, start_frame);
		return this;
	}
	/// C type : start_frame_callback
	public final Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.start_frame_callback > start_frame_$eq(Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.start_frame_callback > start_frame) {
		start_frame(start_frame);
		return start_frame;
	}
	/**
	 * Callback for each slice.<br>
	 * * Meaningful slice information (codec specific) is guaranteed to<br>
	 * be parsed at this point. This function is mandatory.<br>
	 * * @param avctx the codec context<br>
	 * @param buf the slice data buffer base<br>
	 * @param buf_size the size of the slice in bytes<br>
	 * @return zero if successful, a negative value otherwise<br>
	 * C type : decode_slice_callback
	 */
	@Field(7) 
	public Pointer<AVHWAccel.decode_slice_callback > decode_slice() {
		return this.io.getPointerField(this, 7);
	}
	/**
	 * Callback for each slice.<br>
	 * * Meaningful slice information (codec specific) is guaranteed to<br>
	 * be parsed at this point. This function is mandatory.<br>
	 * * @param avctx the codec context<br>
	 * @param buf the slice data buffer base<br>
	 * @param buf_size the size of the slice in bytes<br>
	 * @return zero if successful, a negative value otherwise<br>
	 * C type : decode_slice_callback
	 */
	@Field(7) 
	public AVHWAccel decode_slice(Pointer<AVHWAccel.decode_slice_callback > decode_slice) {
		this.io.setPointerField(this, 7, decode_slice);
		return this;
	}
	/// C type : decode_slice_callback
	public final Pointer<AVHWAccel.decode_slice_callback > decode_slice_$eq(Pointer<AVHWAccel.decode_slice_callback > decode_slice) {
		decode_slice(decode_slice);
		return decode_slice;
	}
	/**
	 * Called at the end of each frame or field picture.<br>
	 * * The whole picture is parsed at this point and can now be sent<br>
	 * to the hardware accelerator. This function is mandatory.<br>
	 * * @param avctx the codec context<br>
	 * @return zero if successful, a negative value otherwise<br>
	 * C type : end_frame_callback
	 */
	@Field(8) 
	public Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.end_frame_callback > end_frame() {
		return this.io.getPointerField(this, 8);
	}
	/**
	 * Called at the end of each frame or field picture.<br>
	 * * The whole picture is parsed at this point and can now be sent<br>
	 * to the hardware accelerator. This function is mandatory.<br>
	 * * @param avctx the codec context<br>
	 * @return zero if successful, a negative value otherwise<br>
	 * C type : end_frame_callback
	 */
	@Field(8) 
	public AVHWAccel end_frame(Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.end_frame_callback > end_frame) {
		this.io.setPointerField(this, 8, end_frame);
		return this;
	}
	/// C type : end_frame_callback
	public final Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.end_frame_callback > end_frame_$eq(Pointer<com.nativelibs4java.ffmpeg.avfilter.AVFilterPad.end_frame_callback > end_frame) {
		end_frame(end_frame);
		return end_frame;
	}
	/**
	 * Size of HW accelerator private data.<br>
	 * * Private data is allocated with av_mallocz() before<br>
	 * AVCodecContext.get_buffer() and deallocated after<br>
	 * AVCodecContext.release_buffer().
	 */
	@Field(9) 
	public int priv_data_size() {
		return this.io.getIntField(this, 9);
	}
	/**
	 * Size of HW accelerator private data.<br>
	 * * Private data is allocated with av_mallocz() before<br>
	 * AVCodecContext.get_buffer() and deallocated after<br>
	 * AVCodecContext.release_buffer().
	 */
	@Field(9) 
	public AVHWAccel priv_data_size(int priv_data_size) {
		this.io.setIntField(this, 9, priv_data_size);
		return this;
	}
	public final int priv_data_size_$eq(int priv_data_size) {
		priv_data_size(priv_data_size);
		return priv_data_size;
	}
	/// <i>native declaration : libavcodec/avcodec.h</i>
	public static abstract class start_frame_callback extends Callback<start_frame_callback > {
		public abstract int apply(Pointer<AVCodecContext > avctx, Pointer<Byte > buf, int buf_size);
	};
	/// <i>native declaration : libavcodec/avcodec.h</i>
	public static abstract class decode_slice_callback extends Callback<decode_slice_callback > {
		public abstract int apply(Pointer<AVCodecContext > avctx, Pointer<Byte > buf, int buf_size);
	};
	/// <i>native declaration : libavcodec/avcodec.h</i>
	public static abstract class end_frame_callback extends Callback<end_frame_callback > {
		public abstract int apply(Pointer<AVCodecContext > avctx);
	};
}
