1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00
mpv/stream
wm4 5e727c314e stream: fix bad cache behavior introduced by recent commit
Commit 4d14a42, a seemingly harmless change, introduced very bad cache
behavior when the cache isn't forked, such as on Windows, where it uses
threads. Apparently the cache code was designed for forking, and an
unknown obscure condition causes severe performance degradation if a
STREAM_CTRL is sent to the cache on every frame.

Since the cache code is literally insane (uses shared memory + fork(),
and has hacks to make it work with threads, is messed into the stream
code in extra-hacky ways), we just fix it by caching the STREAM_CTRL in
question.

This is also done for some other STREAM_CTRLs that are called on each
frame, such as playback duration. This indicates that the cache code has
some inherent problem with answering such requests in a timely matter,
and that there's no easy way around this.

(Even if the cache is eventually rewritten, these things will probably
have to be cached, otherwise you'd have to forcibly block until the
stream implementation is done with a blocking read. The real question
is why it worked fine with the forked cache, though.)
2013-05-05 21:50:43 +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
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
cache2.c stream: fix bad cache behavior introduced by recent commit 2013-05-05 21:50:43 +02:00
cache2.h cache: simplify further 2012-12-03 21:08:51 +01:00
cdd.h
cdinfo.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
cookies.c stream: implement some HTTP specific options for stream_lavf 2013-01-24 17:45:13 +01:00
cookies.h stream: implement some HTTP specific options for stream_lavf 2013-01-24 17:45:13 +01:00
dvb_tune.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
dvb_tune.h
dvbin.h
frequencies.c
frequencies.h
http.c http: handle broken QuickTime Streaming Server headers 2013-04-04 14:08:07 +02:00
http.h
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
stream_avdevice.c demux_lavf: add support for libavdevice 2012-12-03 21:08:51 +01:00
stream_bluray.c stream_bluray: remove the broken -bluray-chapter option 2013-04-27 15:28:57 +02:00
stream_cdda.c options: untangle track range parsing for stream_cdda 2013-04-21 03:48:30 +02:00
stream_cddb.c stream_cddb: fix compilation on MinGW-w64 2013-04-06 00:00:21 +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
stream_dvd.c stream: add start time reporting 2013-05-05 18:44:24 +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
stream_pvr.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stream_radio.c Remove BSD legacy TV/radio support (BT848 stuff) 2013-02-06 23:03:39 +01: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, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
stream_vstream.c stream, demux: replace off_t with int64_t 2012-11-20 18:00:15 +01:00
stream.c core: don't report byte-based playback position with dvd 2013-05-05 18:44:23 +02:00
stream.h stream: add start time reporting 2013-05-05 18:44:24 +02:00
tcp.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
tcp.h
tv.c core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01: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 video: decouple internal pixel formats from FourCCs 2013-01-13 20:04:11 +01:00
udp.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
udp.h
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