@@ -11,7 +11,6 @@ cdef extern from "libavutil/rational.h" nogil:
1111 cdef int av_reduce(int * dst_num, int * dst_den, int64_t num, int64_t den, int64_t max )
1212
1313cdef extern from " libavutil/avutil.h" nogil:
14-
1514 cdef const char * av_version_info()
1615 cdef int avutil_version()
1716 cdef char * avutil_configuration()
@@ -107,13 +106,9 @@ cdef extern from "libavutil/avutil.h" nogil:
107106 AVCOL_TRC_ARIB_STD_B67
108107 AVCOL_TRC_NB
109108
110- cdef double M_PI
111-
112109 cdef void * av_malloc(size_t size)
113110 cdef void * av_mallocz(size_t size)
114- cdef void * av_calloc(size_t nmemb, size_t size)
115- cdef void * av_realloc(void * ptr, size_t size)
116-
111+ cdef void * av_realloc(void * ptr, size_t size)
117112 cdef void av_free(void * ptr)
118113 cdef void av_freep(void * ptr)
119114
@@ -126,56 +121,15 @@ cdef extern from "libavutil/avutil.h" nogil:
126121 AVSampleFormat sample_fmt,
127122 int align
128123 )
129-
130- # See: http://ffmpeg.org/doxygen/trunk/structAVRational.html
131124 ctypedef struct AVRational:
132125 int num
133126 int den
134-
135127 cdef AVRational AV_TIME_BASE_Q
136-
137- # Rescales from one time base to another
138- cdef int64_t av_rescale_q(
139- int64_t a, # time stamp
140- AVRational bq, # source time base
141- AVRational cq # target time base
142- )
143-
144- # Rescale a 64-bit integer with specified rounding.
145- # A simple a*b/c isn't possible as it can overflow
146- cdef int64_t av_rescale_rnd(
147- int64_t a,
148- int64_t b,
149- int64_t c,
150- int r # should be AVRounding, but then we can't use bitwise logic.
151- )
152-
153- cdef int64_t av_rescale_q_rnd(
154- int64_t a,
155- AVRational bq,
156- AVRational cq,
157- int r # should be AVRounding, but then we can't use bitwise logic.
158- )
159-
160- cdef int64_t av_rescale(
161- int64_t a,
162- int64_t b,
163- int64_t c
164- )
165-
166- cdef char * av_strdup(char * s)
167-
168- cdef int av_opt_set_int(
169- void * obj,
170- char * name,
171- int64_t value,
172- int search_flags
173- )
174-
128+ cdef int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
129+ cdef int64_t av_rescale(int64_t a, int64_t b, int64_t c)
175130 cdef const char * av_get_media_type_string(AVMediaType media_type)
176131
177132cdef extern from " libavutil/pixdesc.h" nogil:
178-
179133 # See: http://ffmpeg.org/doxygen/trunk/structAVComponentDescriptor.html
180134 cdef struct AVComponentDescriptor:
181135 unsigned int plane
@@ -215,56 +169,25 @@ cdef extern from "libavutil/pixdesc.h" nogil:
215169 int av_get_padded_bits_per_pixel(AVPixFmtDescriptor * pixdesc)
216170
217171
218- cdef extern from " libavutil/channel_layout.h" nogil:
219-
220- # Layouts.
221- cdef uint64_t av_get_channel_layout(char * name)
222- cdef int av_get_channel_layout_nb_channels(uint64_t channel_layout)
223- cdef int64_t av_get_default_channel_layout(int nb_channels)
224-
225- # Channels.
226- cdef uint64_t av_channel_layout_extract_channel(uint64_t layout, int index)
227- cdef char * av_get_channel_name(uint64_t channel)
228- cdef char * av_get_channel_description(uint64_t channel)
229-
230-
231172cdef extern from " libavutil/audio_fifo.h" nogil:
232-
233173 cdef struct AVAudioFifo:
234174 pass
235175
236176 cdef void av_audio_fifo_free(AVAudioFifo * af)
237-
238177 cdef AVAudioFifo* av_audio_fifo_alloc(
239- AVSampleFormat sample_fmt,
240- int channels,
241- int nb_samples
178+ AVSampleFormat sample_fmt, int channels, int nb_samples
242179 )
243-
244- cdef int av_audio_fifo_write(
245- AVAudioFifo * af,
246- void ** data,
247- int nb_samples
248- )
249-
250- cdef int av_audio_fifo_read(
251- AVAudioFifo * af,
252- void ** data,
253- int nb_samples
254- )
255-
180+ cdef int av_audio_fifo_write(AVAudioFifo * af, void ** data, int nb_samples)
181+ cdef int av_audio_fifo_read(AVAudioFifo * af, void ** data, int nb_samples)
256182 cdef int av_audio_fifo_size(AVAudioFifo * af)
257- cdef int av_audio_fifo_space (AVAudioFifo * af)
258183
259184
260185cdef extern from " stdarg.h" nogil:
261- # For logging. Should really be in another PXD.
262186 ctypedef struct va_list:
263187 pass
264188
265189
266190cdef extern from " Python.h" nogil:
267- # For logging. See av/logging.pyx for an explanation.
268191 cdef int Py_AddPendingCall(void * , void * )
269192 void PyErr_PrintEx(int set_sys_last_vars)
270193 int Py_IsInitialized()
@@ -310,7 +233,6 @@ cdef extern from "libavutil/opt.h" nogil:
310233 AV_OPT_FLAG_FILTERING_PARAM
311234
312235 cdef struct AVOption:
313-
314236 const char * name
315237 const char * help
316238 AVOptionType type
@@ -325,7 +247,6 @@ cdef extern from "libavutil/opt.h" nogil:
325247
326248
327249cdef extern from " libavutil/imgutils.h" nogil:
328-
329250 cdef int av_image_alloc(
330251 uint8_t * pointers[4 ],
331252 int linesizes[4 ],
@@ -341,37 +262,12 @@ cdef extern from "libavutil/imgutils.h" nogil:
341262 uint8_t * ptr,
342263 const int linesizes[4 ]
343264 )
344- cdef int av_image_fill_linesizes(
345- int linesizes[4 ],
346- AVPixelFormat pix_fmt,
347- int width,
348- )
349-
350265
351266cdef extern from " libavutil/log.h" nogil:
352-
353- cdef enum AVClassCategory:
354- AV_CLASS_CATEGORY_NA
355- AV_CLASS_CATEGORY_INPUT
356- AV_CLASS_CATEGORY_OUTPUT
357- AV_CLASS_CATEGORY_MUXER
358- AV_CLASS_CATEGORY_DEMUXER
359- AV_CLASS_CATEGORY_ENCODER
360- AV_CLASS_CATEGORY_DECODER
361- AV_CLASS_CATEGORY_FILTER
362- AV_CLASS_CATEGORY_BITSTREAM_FILTER
363- AV_CLASS_CATEGORY_SWSCALER
364- AV_CLASS_CATEGORY_SWRESAMPLER
365- AV_CLASS_CATEGORY_NB
366-
367267 cdef struct AVClass:
368-
369268 const char * class_name
370269 const char * (* item_name)(void * ) nogil
371-
372- AVClassCategory category
373270 int parent_log_context_offset
374-
375271 const AVOption * option
376272
377273 cdef enum :
@@ -386,10 +282,7 @@ cdef extern from "libavutil/log.h" nogil:
386282 AV_LOG_TRACE
387283 AV_LOG_MAX_OFFSET
388284
389- # Send a log.
390285 void av_log(void * ptr, int level, const char * fmt, ...)
391-
392- # Get the logs.
393286 ctypedef void (* av_log_callback)(void * , int , const char * , va_list)
394287 void av_log_default_callback(void * , int , const char * , va_list)
395288 void av_log_set_callback (av_log_callback callback)
0 commit comments