mpv/stream
wm4 7a7d8d50e2 dvd: try to improve seeking
libdvdnav is garbage. Seeking by time is incredibly inexact, which is in
part due to the fact that it does not use the DVD seek tables. Instead,
it assumes CBR for certain ranges within the DVD, which makes especially
small seeks unreliable.

I have no good fix for this, other than hacking libdvdnav (I'd rather
prefer to remove mpv DVD support completely than doing this). So here's
a shitty hack that tries to workaround these problems. A basic
observation is that seeking in VLC seems to work quite well; however it
seems to be based on seeking by blocks (unless there is a subtle "trick"
I didn't see in the source code). mpv usually seeks by timestamps, so
this is not an option for us. However, we can pretend we are doing this
in the DVD layer.

The previous commit added a way to pass through relative seeks. This
commit uses the relative seek. STREAM_CTRL_SEEK_TO_TIME is backwards
compatible (there's still dvdread and bluray), so most code is about
extracing the relative seek information and turning it into a block
seek.

(Another way would have been using SEEK_FACTOR stuff, but that would
probably make for a less reliable way to handle this situation.)

Additionally, if a hr-seek is done, add an offset by 10 seconds. As long
as the error done by libdvdnav is not worse, this should help with hr-
seeks - although it makes them much slower.
2015-01-19 21:30:05 +01:00
..
ai_alsa1x.c
ai_oss.c Do not call strerror() 2014-11-26 21:21:56 +01:00
ai_sndio.c
audio_in.c Do not call strerror() 2014-11-26 21:21:56 +01:00
audio_in.h
cache.c cache: cache-position needs to be int64_t 2015-01-13 02:39:16 +01:00
cache_file.c
cookies.c
cookies.h
discnav.h dvd, bd: don't unnecessarily block on demuxer/stream all the time 2014-12-04 22:42:07 +01:00
dvb_tune.c dvb: uncrustify 2015-01-06 20:19:49 +01:00
dvb_tune.h stream_dvb: Also demux PMT if possible, reactivate TPID parsing. 2015-01-06 19:52:27 +01:00
dvbin.h dvb: uncrustify 2015-01-06 20:19:49 +01:00
frequencies.c
frequencies.h
rar.c Remove some unneeded NULL checks 2014-11-21 09:58:09 +01:00
rar.h
stream.c stream: always make stream dumping/capturing append to output file 2014-12-27 21:20:57 +01:00
stream.h command, dvd: add property which returns list of DVD titles 2014-12-13 20:25:56 +01:00
stream_avdevice.c
stream_bluray.c
stream_cdda.c stream_cdda: don't return number of tracks as number of titles 2014-12-13 20:25:56 +01:00
stream_dvb.c stream_dvb: silence bogus compiler warning 2015-01-19 17:58:37 +01:00
stream_dvd.c command, dvd: add property which returns list of DVD titles 2014-12-13 20:25:56 +01:00
stream_dvd_common.c
stream_dvd_common.h
stream_dvdnav.c dvd: try to improve seeking 2015-01-19 21:30:05 +01:00
stream_edl.c stream: always disable cache for pseudo-streams 2014-12-24 14:33:34 +01:00
stream_file.c Do not call strerror() 2014-11-26 21:21:56 +01:00
stream_lavf.c demux_lavf, stream_lavf: drop local buffers on time-seeks 2014-10-30 22:50:44 +01:00
stream_memory.c
stream_mf.c
stream_null.c
stream_pvr.c stream_pvr: uncrustify 2015-01-06 20:27:36 +01:00
stream_rar.c
stream_smb.c
stream_tv.c
tv.c
tv.h
tvi_def.h
tvi_dummy.c
tvi_v4l2.c Do not call strerror() 2014-11-26 21:21:56 +01:00