1
mirror of https://github.com/mpv-player/mpv synced 2024-10-30 04:46:41 +01:00
mpv/stream
wm4 236577af09 cache: use threads instead of fork()
Basically rewrite all the code supporting the cache (i.e. anything other
than the ringbuffer logic). The underlying design is untouched.

Note that the old cache2.c (on which this code is based) already had a
threading implementation. This was mostly unused on Linux, and had some
problems, such as using shared volatile variables for communication and
uninterruptible timeouts, instead of using locks for synchronization.

This commit does use proper locking, while still retaining the way the
old cache worked. It's basically a big refactor.

Simplify the code too. Since we don't need to copy stream ctrl args
anymore (we're always guaranteed a shared address space now), lots of
annoying code just goes away. Likewise, we don't need to care about
sector sizes. The cache uses the high-level stream API to read from
other streams, and sector sizes are handled transparently.
2013-06-16 22:05:09 +02:00
..
ai_alsa1x.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
ai_oss.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asf_mmst_streaming.c cache: simplify further 2012-12-03 21:08:51 +01:00
asf_mmst_streaming.h Add header for asf_mmst_streaming_start() instead of forward declaring it. 2010-02-21 23:26:16 +00:00
asf_streaming.c stream: implement some HTTP specific options for stream_lavf 2013-01-24 17:45:13 +01:00
audio_in.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
audio_in.h Add license header to all files missing it in the stream subdirectory. 2010-01-30 22:26:47 +00:00
cache.c cache: use threads instead of fork() 2013-06-16 22:05:09 +02:00
cdd.h stream_cddb: move structs to the file they're used in 2010-11-02 04:11:07 +02:00
cdinfo.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
cookies.c Fix some cppcheck / scan-build warnings 2013-05-06 23:11:11 +02:00
cookies.h stream: implement some HTTP specific options for stream_lavf 2013-01-24 17:45:13 +01:00
dvb_tune.c Fix some cppcheck / scan-build warnings 2013-05-06 23:11:11 +02:00
dvb_tune.h Add header for exported DVB-related functions. 2010-02-21 21:00:08 +00:00
dvbin.h stream/dvbin.h: Use angular brackets for system #includes. 2010-11-02 04:11:07 +02:00
frequencies.c Add license header to all files missing it in the stream subdirectory. 2010-01-30 22:26:47 +00:00
frequencies.h Add license header to all files missing it in the stream subdirectory. 2010-01-30 22:26:47 +00:00
http.c Fix some cppcheck / scan-build warnings 2013-05-06 23:11:11 +02:00
http.h stream/: delete base64_encode(), use libavutil av_base64_encode() 2010-12-16 05:16:50 +02:00
network.c network: set default user-agent to MPlayer's 2013-02-26 01:55:52 +01:00
network.h stream: implement some HTTP specific options for stream_lavf 2013-01-24 17:45:13 +01:00
pvr.h Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
stream_avdevice.c demux_lavf: add support for libavdevice 2012-12-03 21:08:51 +01:00
stream_bluray.c stream_bluray: report chapter times 2013-05-09 18:49:16 +02:00
stream_cdda.c stream_cdda, stream_vcd: check read buffer size 2013-06-09 22:06:03 +02:00
stream_cddb.c Silence some compiler warnings 2013-05-21 00:04:27 +02:00
stream_dvb.c Check return values of some mp_find_..._config_file function calls for NULL 2013-02-09 00:21:18 +01:00
stream_dvd_common.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stream_dvd_common.h Add license header to all files missing it in the stream subdirectory. 2010-01-30 22:26:47 +00:00
stream_dvd.c stream_dvd: remove some deadly insane code 2013-06-09 22:06:02 +02:00
stream_dvd.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stream_file.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
stream_ftp.c stream_ftp: cleanups 2012-12-03 21:08:52 +01:00
stream_lavf.c build: make it work on somewhat older ffmpeg versions 2013-01-31 17:42:21 +01:00
stream_mf.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stream_null.c Add license header to all files missing it in the stream subdirectory. 2010-01-30 22:26:47 +00:00
stream_pvr.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stream_radio.c cache: make the stream cache a proper stream that wraps other streams 2013-06-16 22:05:09 +02:00
stream_radio.h Remove BSD legacy TV/radio support (BT848 stuff) 2013-02-06 23:03:39 +01:00
stream_smb.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
stream_tv.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stream_udp.c stream: implement some HTTP specific options for stream_lavf 2013-01-24 17:45:13 +01:00
stream_vcd.c stream: move VCD specific stuff to stream_vcd 2013-06-09 22:06:03 +02:00
stream_vstream.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
stream.c cache: use threads instead of fork() 2013-06-16 22:05:09 +02:00
stream.h cache: use threads instead of fork() 2013-06-16 22:05:09 +02:00
tcp.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
tcp.h Use standard license headers with standard formatting. 2008-05-14 17:20:42 +00:00
tv.c Replace all calls to GetTimer()/GetTimerMS() 2013-05-26 16:44:20 +02:00
tv.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
tvi_def.h video: decouple internal pixel formats from FourCCs 2013-01-13 20:04:11 +01:00
tvi_dummy.c video: decouple internal pixel formats from FourCCs 2013-01-13 20:04:11 +01:00
tvi_v4l2.c Fix some cppcheck / scan-build warnings 2013-05-06 23:11:11 +02:00
udp.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
udp.h Use standard license headers with standard formatting. 2008-05-14 17:20:42 +00:00
url.c Fix lots of bugs in mp_http URL handling 2013-01-10 14:11:26 +01:00
url.h stream: fix redirection for proxy URLs 2012-10-30 19:50:20 +01:00
vcd_read_darwin.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
vcd_read_fbsd.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
vcd_read_win32.h vcd_read_win32.h: fix compilation on MinGW-w64 2013-04-06 00:00:16 +02:00
vcd_read.h vcd_read: cleanup ifdefs 2013-04-04 14:03:22 +02:00