FFmpeg/libavdevice
Aaron Levinson 9e86a61870 avdevice/decklink: remove pthread dependency
Purpose: avdevice/decklink: Removed pthread dependency by replacing
semaphore used in code appropriately.  Doing so makes it easier to
build ffmpeg using Visual C++ on Windows.  This is a contination of
Kyle Schwarz's "avdevice/decklink: Remove pthread dependency" patch
that is available at https://patchwork.ffmpeg.org/patch/2654/ .  This
patch wasn't accepted, and as far as I can tell, there was no
follow-up after it was rejected.

Notes: Used Visual Studio 2015 (with update 3) for this.

Comments:

-- configure: Eliminated pthreads dependency for decklink_indev_deps
   and decklink_outdev_deps and replaced with threads dependency

-- libavdevice/decklink_common.cpp / .h:
a) Eliminated semaphore and replaced with a combination of a mutex,
   condition variable, and a counter (frames_buffer_available_spots).
b) Removed include of pthread.h and semaphore.h and now using
   libavutil/thread.h instead.

-- libavdevice/decklink_dec.cpp: Eliminated include of pthread.h and
   semaphore.h.

-- libavdevice/decklink_enc.cpp:
a) Eliminated include of pthread.h and semaphore.h.
b) Replaced use of semaphore with the equivalent using a combination
   of a mutex, condition variable, and a counter
   (frames_buffer_available_spots).  In theory, libavutil/thread.h and
   the associated code could have been modified instead to add
   cross-platform implementations of the sem_ functions, but an
   inspection of the ffmpeg source base indicates that there are only
   two cases in which semaphores are used (including this one that was
   replaced), so it was deemed to not be worth the effort.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-04-15 12:26:21 +02:00
..
tests Merge commit '93fed46a92bab8be176d3e67be4354189a8dbe7f' 2017-03-19 16:08:27 +01:00
alldevices.c Merge commit '5ed4644d6de7f6112431dc2d9a5cfe9a0a75a688' 2017-03-15 22:19:56 +01:00
alsa.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
alsa.h
alsa_dec.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
alsa_enc.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
avdevice.c
avdevice.h Merge commit '5ed4644d6de7f6112431dc2d9a5cfe9a0a75a688' 2017-03-15 22:19:56 +01:00
avdeviceres.rc
avfoundation.m avdevice: Fix max value of AV_OPT_TYPE_VIDEO_RATE 2016-06-09 10:34:42 +02:00
bktr.c Merge commit '2f806622e1270d3ed1d41a53049a19673dafbe70' 2017-03-24 12:41:31 +01:00
caca.c avdevice/caca: switch to codecpar 2016-04-11 01:34:02 +02:00
decklink_common.cpp avdevice/decklink: remove pthread dependency 2017-04-15 12:26:21 +02:00
decklink_common.h avdevice/decklink: remove pthread dependency 2017-04-15 12:26:21 +02:00
decklink_common_c.h avdevice/decklink: new option 'format_code' to set video format by fourCC 2017-03-22 02:07:50 +01:00
decklink_dec.cpp avdevice/decklink: remove pthread dependency 2017-04-15 12:26:21 +02:00
decklink_dec.h cosmetics: Correct comments in decklink_dec 2016-08-02 13:01:12 -07:00
decklink_dec_c.c avdevice/decklink: new option 'format_code' to set video format by fourCC 2017-03-22 02:07:50 +01:00
decklink_enc.cpp avdevice/decklink: remove pthread dependency 2017-04-15 12:26:21 +02:00
decklink_enc.h all: Add missing header guards 2016-01-28 19:49:48 -08:00
decklink_enc_c.c avdevice/decklink_enc: convert AVFMT_RAWPICTURE to AV_CODEC_ID_WRAPPED_AVFRAME 2017-02-26 22:47:33 +01:00
dshow.c dshow: avoid duplicate NULL check before free 2016-06-23 03:18:16 +02:00
dshow_capture.h dshow: don't add two instances of same device to graphs 2016-06-23 03:18:16 +02:00
dshow_common.c
dshow_crossbar.c lavd/dshow_crossbar: remove trailing whitespace 2016-03-28 13:31:38 -08:00
dshow_enummediatypes.c
dshow_enumpins.c
dshow_filter.c avdevice/dshow: satisfy alloc contract better 2016-08-20 12:06:50 +02:00
dshow_pin.c
dv1394.c cosmetics: fix some misspelled words 2016-07-17 13:10:27 -03:00
dv1394.h
fbdev_common.c
fbdev_common.h
fbdev_dec.c avdevice: Fix max value of AV_OPT_TYPE_VIDEO_RATE 2016-06-09 10:34:42 +02:00
fbdev_enc.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
file_open.c
gdigrab.c avdevice: Fix max value of AV_OPT_TYPE_VIDEO_RATE 2016-06-09 10:34:42 +02:00
iec61883.c avdevice/iec61883: free packet on buffer allocation error 2017-02-19 16:41:43 +01:00
internal.h
jack.c avdev/jack: remove duplicated dispatch macros 2016-07-26 23:10:47 +01:00
lavfi.c lavd/lavfi: use buffersink accessors. 2017-01-12 14:06:16 +01:00
libavdevice.v Merge commit '535a742c2695a9e0c586b50d7fa76e318232ff24' 2016-06-27 17:56:47 +02:00
libcdio.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
libdc1394.c Merge commit '4a1ef543983b7480e2822f6ac281ba361d1f893d' 2017-04-09 14:22:43 +02:00
Makefile Merge commit '5ed4644d6de7f6112431dc2d9a5cfe9a0a75a688' 2017-03-15 22:19:56 +01:00
openal-dec.c lavd/openal: don't return zero sized packet if no samples are available 2016-10-03 21:15:48 +02:00
opengl_enc.c lavd/opengl_enc: Fix a typo. 2017-02-23 00:11:43 +01:00
opengl_enc_shaders.h all: Make header guard names consistent 2016-01-31 15:44:11 -08:00
oss.c
oss.h
oss_dec.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
oss_enc.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
pulse_audio_common.c
pulse_audio_common.h
pulse_audio_dec.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
pulse_audio_enc.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
qtkit.m
sdl2.c lavd/sdl2: add sdl alias 2016-09-25 18:08:06 +01:00
sndio.c
sndio.h
sndio_dec.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
sndio_enc.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
timefilter.c Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13' 2016-05-11 19:13:03 +01:00
timefilter.h
utils.c
v4l.c
v4l2-common.c
v4l2-common.h Merge commit '3a165c187da7d74f46f6c1778294e8c5a3a7151f' 2017-03-22 17:55:18 +01:00
v4l2.c Merge commit '3a165c187da7d74f46f6c1778294e8c5a3a7151f' 2017-03-22 17:55:18 +01:00
v4l2enc.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00
version.h Bump versions for master after 3.3 2017-04-02 19:54:12 +02:00
vfwcap.c Merge commit '67deba8a416d818f3d95aef0aa916589090396e2' 2017-03-31 10:40:34 +02:00
xcbgrab.c Merge commit '67deba8a416d818f3d95aef0aa916589090396e2' 2017-03-31 10:40:34 +02:00
xv.c Merge commit '9200514ad8717c63f82101dc394f4378854325bf' 2016-04-10 20:59:55 +01:00