| 159 | #endif /* HAVE_THREADS */ |
| 160 | |
| 161 | int av_thread_message_queue_send(AVThreadMessageQueue *mq, |
| 162 | void *msg, |
| 163 | unsigned flags) |
| 164 | { |
| 165 | #if HAVE_THREADS |
| 166 | int ret; |
| 167 | |
| 168 | pthread_mutex_lock(&mq->lock); |
| 169 | ret = av_thread_message_queue_send_locked(mq, msg, flags); |
| 170 | pthread_mutex_unlock(&mq->lock); |
| 171 | return ret; |
| 172 | #else |
| 173 | return AVERROR(ENOSYS); |
| 174 | #endif /* HAVE_THREADS */ |
| 175 | } |
| 176 | |
| 177 | int av_thread_message_queue_recv(AVThreadMessageQueue *mq, |
| 178 | void *msg, |