00001 package net.sf.ffmpeg_java; 00002 import com.sun.jna.Library; 00003 import com.sun.jna.Pointer; 00004 import com.sun.jna.Structure; 00005 00015 public interface FFMPEGLibrary extends Library 00016 { 00017 //------------------------------------------------------------------------------------------------------------------------ 00018 // libavutil/log.h: 00019 00020 // struct AVCLASS { 00021 // const char* class_name; 00022 // const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext 00023 // or AVFormatContext, which begin with an AVClass. 00024 // Needed because av_log is in libavcodec and has no visibility 00025 // of AVIn/OutputFormat */ 00026 // const struct AVOption *option; 00027 //}; 00028 00029 public static class AVClass extends Structure 00030 { 00031 public String class_name; 00032 public Pointer item_name; 00033 public Pointer option; 00034 } 00035 00036 00037 00038 // TODO: other structures from log.h 00039 // end log.h 00040 //------------------------------------------------------------------------------------------------------------------------ 00041 00042 00043 //------------------------------------------------------------------------------------------------------------------------ 00044 // libavutil/rational.h: 00045 00046 // /** 00047 // * Rational number num/den. 00048 // */ 00049 // typedef struct AVRational{ 00050 // int num; ///< numerator 00051 // int den; ///< denominator 00052 // } AVRational; 00053 00054 public static class AVRational extends Structure 00055 { 00056 public int num; 00057 public int den; 00058 00059 public AVRational() 00060 { super(); 00061 } 00062 00063 public AVRational(int num, int den) 00064 { 00065 super(); 00066 this.num = num; 00067 this.den = den; 00068 } 00069 00070 00071 }; 00072 00073 00074 // TODO: other structures from rational.h 00075 // end rational.h 00076 //------------------------------------------------------------------------------------------------------------------------ 00077 00078 00079 //------------------------------------------------------------------------------------------------------------------------ 00080 // libavutil/avutil.h: 00081 00082 // /** 00083 // * Pixel format. Notes: 00084 // * 00085 // * PIX_FMT_RGB32 is handled in an endian-specific manner. A RGBA 00086 // * color is put together as: 00087 // * (A << 24) | (R << 16) | (G << 8) | B 00088 // * This is stored as BGRA on little endian CPU architectures and ARGB on 00089 // * big endian CPUs. 00090 // * 00091 // * When the pixel format is palettized RGB (PIX_FMT_PAL8), the palettized 00092 // * image data is stored in AVFrame.data[0]. The palette is transported in 00093 // * AVFrame.data[1] and, is 1024 bytes long (256 4-byte entries) and is 00094 // * formatted the same as in PIX_FMT_RGB32 described above (i.e., it is 00095 // * also endian-specific). Note also that the individual RGB palette 00096 // * components stored in AVFrame.data[1] should be in the range 0..255. 00097 // * This is important as many custom PAL8 video codecs that were designed 00098 // * to run on the IBM VGA graphics adapter use 6-bit palette components. 00099 // */ 00100 // enum PixelFormat { 00101 // PIX_FMT_NONE= -1, 00102 // PIX_FMT_YUV420P, ///< Planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples) 00103 // PIX_FMT_YUYV422, ///< Packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr 00104 // PIX_FMT_RGB24, ///< Packed RGB 8:8:8, 24bpp, RGBRGB... 00105 // PIX_FMT_BGR24, ///< Packed RGB 8:8:8, 24bpp, BGRBGR... 00106 // PIX_FMT_YUV422P, ///< Planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) 00107 // PIX_FMT_YUV444P, ///< Planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples) 00108 // PIX_FMT_RGB32, ///< Packed RGB 8:8:8, 32bpp, (msb)8A 8R 8G 8B(lsb), in cpu endianness 00109 // PIX_FMT_YUV410P, ///< Planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples) 00110 // PIX_FMT_YUV411P, ///< Planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) 00111 // PIX_FMT_RGB565, ///< Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), in cpu endianness 00112 // PIX_FMT_RGB555, ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in cpu endianness most significant bit to 0 00113 // PIX_FMT_GRAY8, ///< Y , 8bpp 00114 // PIX_FMT_MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black 00115 // PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white 00116 // PIX_FMT_PAL8, ///< 8 bit with PIX_FMT_RGB32 palette 00117 // PIX_FMT_YUVJ420P, ///< Planar YUV 4:2:0, 12bpp, full scale (jpeg) 00118 // PIX_FMT_YUVJ422P, ///< Planar YUV 4:2:2, 16bpp, full scale (jpeg) 00119 // PIX_FMT_YUVJ444P, ///< Planar YUV 4:4:4, 24bpp, full scale (jpeg) 00120 // PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing(xvmc_render.h) 00121 // PIX_FMT_XVMC_MPEG2_IDCT, 00122 // PIX_FMT_UYVY422, ///< Packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1 00123 // PIX_FMT_UYYVYY411, ///< Packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3 00124 // PIX_FMT_BGR32, ///< Packed RGB 8:8:8, 32bpp, (msb)8A 8B 8G 8R(lsb), in cpu endianness 00125 // PIX_FMT_BGR565, ///< Packed RGB 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), in cpu endianness 00126 // PIX_FMT_BGR555, ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), in cpu endianness most significant bit to 1 00127 // PIX_FMT_BGR8, ///< Packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) 00128 // PIX_FMT_BGR4, ///< Packed RGB 1:2:1, 4bpp, (msb)1B 2G 1R(lsb) 00129 // PIX_FMT_BGR4_BYTE, ///< Packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb) 00130 // PIX_FMT_RGB8, ///< Packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb) 00131 // PIX_FMT_RGB4, ///< Packed RGB 1:2:1, 4bpp, (msb)2R 3G 3B(lsb) 00132 // PIX_FMT_RGB4_BYTE, ///< Packed RGB 1:2:1, 8bpp, (msb)2R 3G 3B(lsb) 00133 // PIX_FMT_NV12, ///< Planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 for UV 00134 // PIX_FMT_NV21, ///< as above, but U and V bytes are swapped 00135 // 00136 // PIX_FMT_RGB32_1, ///< Packed RGB 8:8:8, 32bpp, (msb)8R 8G 8B 8A(lsb), in cpu endianness 00137 // PIX_FMT_BGR32_1, ///< Packed RGB 8:8:8, 32bpp, (msb)8B 8G 8R 8A(lsb), in cpu endianness 00138 // 00139 // PIX_FMT_GRAY16BE, ///< Y , 16bpp, big-endian 00140 // PIX_FMT_GRAY16LE, ///< Y , 16bpp, little-endian 00141 // PIX_FMT_YUV440P, ///< Planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples) 00142 // PIX_FMT_YUVJ440P, ///< Planar YUV 4:4:0 full scale (jpeg) 00143 // PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions 00144 // }; 00145 00146 public static final int PIX_FMT_NONE = -1; 00147 public static final int PIX_FMT_YUV420P = 0; 00148 public static final int PIX_FMT_YUYV422 = 1; 00149 public static final int PIX_FMT_RGB24 = 2; 00150 public static final int PIX_FMT_BGR24 = 3; 00151 public static final int PIX_FMT_YUV422P = 4; 00152 public static final int PIX_FMT_YUV444P = 5; 00153 public static final int PIX_FMT_RGB32 = 6; 00154 public static final int PIX_FMT_YUV410P = 7; 00155 public static final int PIX_FMT_YUV411P = 8; 00156 public static final int PIX_FMT_RGB565 = 9; 00157 public static final int PIX_FMT_RGB555 = 10; 00158 public static final int PIX_FMT_GRAY8 = 11; 00159 public static final int PIX_FMT_MONOWHITE = 12; 00160 public static final int PIX_FMT_MONOBLACK = 13; 00161 public static final int PIX_FMT_PAL8 = 14; 00162 public static final int PIX_FMT_YUVJ420P = 15; 00163 public static final int PIX_FMT_YUVJ422P = 16; 00164 public static final int PIX_FMT_YUVJ444P = 17; 00165 public static final int PIX_FMT_XVMC_MPEG2_MC = 18; 00166 public static final int PIX_FMT_XVMC_MPEG2_IDCT = 19; 00167 public static final int PIX_FMT_UYVY422 = 20; 00168 public static final int PIX_FMT_UYYVYY411 = 21; 00169 public static final int PIX_FMT_BGR32 = 22; 00170 public static final int PIX_FMT_BGR565 = 23; 00171 public static final int PIX_FMT_BGR555 = 24; 00172 public static final int PIX_FMT_BGR8 = 25; 00173 public static final int PIX_FMT_BGR4 = 26; 00174 public static final int PIX_FMT_BGR4_BYTE = 27; 00175 public static final int PIX_FMT_RGB8 = 28; 00176 public static final int PIX_FMT_RGB4 = 29; 00177 public static final int PIX_FMT_RGB4_BYTE = 30; 00178 public static final int PIX_FMT_NV12 = 31; 00179 public static final int PIX_FMT_NV21 = 32; 00180 public static final int PIX_FMT_RGB32_1 = 33; 00181 public static final int PIX_FMT_BGR32_1 = 34; 00182 public static final int PIX_FMT_GRAY16BE = 35; 00183 public static final int PIX_FMT_GRAY16LE = 36; 00184 public static final int PIX_FMT_YUV440P = 37; 00185 public static final int PIX_FMT_YUVJ440P = 38; 00186 public static final int PIX_FMT_NB = 39; 00187 00188 // TODO: other definitions from libavutil/avutil.h 00189 00190 // end libavutil/avutil.h 00191 //------------------------------------------------------------------------------------------------------------------------ 00192 00193 }