AVCodecContext.execute2

The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. Also see avcodec_thread_init and e.g. the --enable-pthread configure option. @param c context passed also to func @param count the number of things to execute @param arg2 argument passed unchanged to func @param ret return values of executed functions, must have space for "count" values. May be NULL. @param func function that will be called count times, with jobnr from 0 to count-1. threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no two instances of func executing at the same time will have the same threadnr. @return always 0 currently, but code should handle a future improvement where when any call to func returns < 0 no further calls to func may be done and < 0 is returned. - encoding: Set by libavcodec, user can override. - decoding: Set by libavcodec, user can override.

struct AVCodecContext
int function(AVCodecContext* c, int function(AVCodecContext* c2, void* arg, int jobnr, int threadnr) func, void* arg2, int* ret, int count) execute2;

Meta