Mercurial > libavcodec.hg
comparison os2thread.c @ 11492:7bfe7456e372 libavcodec
Remove avcodec_thread_execute from avcodec.h, and make static functions that
need it in *thread.c.
| author | benoit |
|---|---|
| date | Mon, 15 Mar 2010 14:03:01 +0000 |
| parents | d7ef6611a49e |
| children |
comparison
equal
deleted
inserted
replaced
| 11491:63837bcce840 | 11492:7bfe7456e372 |
|---|---|
| 37 void *arg; | 37 void *arg; |
| 38 int ret; | 38 int ret; |
| 39 }ThreadContext; | 39 }ThreadContext; |
| 40 | 40 |
| 41 | 41 |
| 42 void attribute_align_arg thread_func(void *v){ | 42 static void attribute_align_arg thread_func(void *v){ |
| 43 ThreadContext *c= v; | 43 ThreadContext *c= v; |
| 44 | 44 |
| 45 for(;;){ | 45 for(;;){ |
| 46 //printf("thread_func %X enter wait\n", (int)v); fflush(stdout); | 46 //printf("thread_func %X enter wait\n", (int)v); fflush(stdout); |
| 47 DosWaitEventSem(c->work_sem, SEM_INDEFINITE_WAIT); | 47 DosWaitEventSem(c->work_sem, SEM_INDEFINITE_WAIT); |
| 79 } | 79 } |
| 80 | 80 |
| 81 av_freep(&s->thread_opaque); | 81 av_freep(&s->thread_opaque); |
| 82 } | 82 } |
| 83 | 83 |
| 84 int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){ | 84 static int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){ |
| 85 ThreadContext *c= s->thread_opaque; | 85 ThreadContext *c= s->thread_opaque; |
| 86 int i; | 86 int i; |
| 87 | 87 |
| 88 assert(s == c->avctx); | 88 assert(s == c->avctx); |
| 89 assert(count <= s->thread_count); | 89 assert(count <= s->thread_count); |
