@@ -78,17 +78,6 @@ the log.
7878'''
7979_loglevel_inverse = {v:k for k, v in loglevels.iteritems()}
8080
81- codecs_enc = get_codecs(encode = True , video = True )
82- ''' A list of all the codecs available for encoding video. '''
83- codecs_dec = get_codecs(decode = True , video = True , audio = True )
84- ''' A list of all the codecs available for decoding video and audio. '''
85- pix_fmts = list_pixfmts()
86- ''' A list of all the pixel formats available to ffmpeg. '''
87- formats_in = get_fmts(input = True )[0 ]
88- ''' A list of all the formats (e.g. file formats) available for reading. '''
89- formats_out = get_fmts(output = True )[0 ]
90- ''' A list of all the formats (e.g. file formats) available for writing. '''
91-
9281cdef object _log_callback = None
9382cdef MTMutex _log_mutex= MTMutex(SDL_MT)
9483cdef int log_level = AV_LOG_WARNING
@@ -105,7 +94,7 @@ cdef void call_callback(char *line, int level) nogil:
10594 with gil:
10695 gil_call_callback(line, level)
10796
108- cdef void _log_callback_func(void * ptr, int level, const char * fmt, va_list vl) nogil:
97+ cdef void _log_callback_func(void * ptr, int level, const char * fmt, va_list vl) noexcept nogil:
10998 cdef char line[2048 ]
11099 if fmt == NULL or level > log_level:
111100 return
@@ -278,6 +267,11 @@ cpdef get_codecs(
278267 codec = av_codec_iterate(& iter_codec)
279268 return sorted (codecs)
280269
270+ codecs_enc = get_codecs(encode = True , video = True )
271+ ''' A list of all the codecs available for encoding video. '''
272+ codecs_dec = get_codecs(decode = True , video = True , audio = True )
273+ ''' A list of all the codecs available for decoding video and audio. '''
274+
281275cdef list list_pixfmts():
282276 cdef list fmts = []
283277 cdef const AVPixFmtDescriptor * desc = NULL
@@ -288,6 +282,9 @@ cdef list list_pixfmts():
288282 desc = av_pix_fmt_desc_next(desc)
289283 return sorted (fmts)
290284
285+ pix_fmts = list_pixfmts()
286+ ''' A list of all the pixel formats available to ffmpeg. '''
287+
291288cpdef get_fmts(int input = False , int output = False ):
292289 ''' Returns the formats available in FFmpeg.
293290
@@ -350,6 +347,10 @@ cpdef get_fmts(int input=False, int output=False):
350347 fmts = sorted (fmts)
351348 return fmts, full_names, exts
352349
350+ formats_in = get_fmts(input = True )[0 ]
351+ ''' A list of all the formats (e.g. file formats) available for reading. '''
352+ formats_out = get_fmts(output = True )[0 ]
353+ ''' A list of all the formats (e.g. file formats) available for writing. '''
353354
354355def get_format_codec (filename = None , fmt = None ):
355356 ''' Returns the best codec associated with the file format. The format
0 commit comments