Mercurial > libavcodec.hg
comparison avcodec.h @ 2279:cadd9e82b362 libavcodec
broken mess removial
author | michael |
---|---|
date | Wed, 29 Sep 2004 23:12:16 +0000 |
parents | c443a6af19a7 |
children | 2b75dff01118 |
comparison
equal
deleted
inserted
replaced
2278:870597ca3e7a | 2279:cadd9e82b362 |
---|---|
2101 * rescale a 64bit integer with specified rounding. | 2101 * rescale a 64bit integer with specified rounding. |
2102 * a simple a*b/c isnt possible as it can overflow | 2102 * a simple a*b/c isnt possible as it can overflow |
2103 */ | 2103 */ |
2104 int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding); | 2104 int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding); |
2105 | 2105 |
2106 /** | |
2107 * Interface for 0.5.0 version | |
2108 * | |
2109 * do not even think about it's usage for this moment | |
2110 */ | |
2111 | |
2112 typedef struct { | |
2113 /// compressed size used from given memory buffer | |
2114 int size; | |
2115 /// I/P/B frame type | |
2116 int frame_type; | |
2117 } avc_enc_result_t; | |
2118 | |
2119 /** | |
2120 * Commands | |
2121 * order can't be changed - once it was defined | |
2122 */ | |
2123 typedef enum { | |
2124 // general commands | |
2125 AVC_OPEN_BY_NAME = 0xACA000, | |
2126 AVC_OPEN_BY_CODEC_ID, | |
2127 AVC_OPEN_BY_FOURCC, | |
2128 AVC_CLOSE, | |
2129 | |
2130 AVC_FLUSH, | |
2131 // pin - struct { uint8_t* src, uint_t src_size } | |
2132 // pout - struct { AVPicture* img, consumed_bytes, | |
2133 AVC_DECODE, | |
2134 // pin - struct { AVPicture* img, uint8_t* dest, uint_t dest_size } | |
2135 // pout - uint_t used_from_dest_size | |
2136 AVC_ENCODE, | |
2137 | |
2138 // query/get video commands | |
2139 AVC_GET_VERSION = 0xACB000, | |
2140 AVC_GET_WIDTH, | |
2141 AVC_GET_HEIGHT, | |
2142 AVC_GET_DELAY, | |
2143 AVC_GET_QUANT_TABLE, | |
2144 // ... | |
2145 | |
2146 // query/get audio commands | |
2147 AVC_GET_FRAME_SIZE = 0xABC000, | |
2148 | |
2149 // maybe define some simple structure which | |
2150 // might be passed to the user - but they can't | |
2151 // contain any codec specific parts and these | |
2152 // calls are usualy necessary only few times | |
2153 | |
2154 // set video commands | |
2155 AVC_SET_WIDTH = 0xACD000, | |
2156 AVC_SET_HEIGHT, | |
2157 | |
2158 // set video encoding commands | |
2159 AVC_SET_FRAME_RATE = 0xACD800, | |
2160 AVC_SET_QUALITY, | |
2161 AVC_SET_HURRY_UP, | |
2162 | |
2163 // set audio commands | |
2164 AVC_SET_SAMPLE_RATE = 0xACE000, | |
2165 AVC_SET_CHANNELS, | |
2166 | |
2167 } avc_cmd_t; | |
2168 | |
2169 /** | |
2170 * \param handle allocated private structure by libavcodec | |
2171 * for initialization pass NULL - will be returned pout | |
2172 * user is supposed to know nothing about its structure | |
2173 * \param cmd type of operation to be performed | |
2174 * \param pint input parameter | |
2175 * \param pout output parameter | |
2176 * | |
2177 * \returns command status - eventually for query command it might return | |
2178 * integer resulting value | |
2179 */ | |
2180 int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout); | |
2181 | |
2182 /* frame parsing */ | 2106 /* frame parsing */ |
2183 typedef struct AVCodecParserContext { | 2107 typedef struct AVCodecParserContext { |
2184 void *priv_data; | 2108 void *priv_data; |
2185 struct AVCodecParser *parser; | 2109 struct AVCodecParser *parser; |
2186 int64_t frame_offset; /* offset of the current frame */ | 2110 int64_t frame_offset; /* offset of the current frame */ |