aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream
Commit message (Collapse)AuthorAge
* Basic xdg directory implementationGravatar Kenneth Zhou2014-06-26
| | | | | | | | | | Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files. This also negates the need to have separate user and global variants of mp_find_config_file() Closes #864, #109. Signed-off-by: wm4 <wm4@nowhere>
* stream: add a file cacheGravatar wm42014-06-22
| | | | | | | | | For remarks, pretty much see the manpage additions. Could help with network streams that require too much seeking (maybe), or might be extended to help with the use case of watching and downloading a file at the same time. In general, it might be a useless feature and could be removed again.
* stream: minor cleanupsGravatar wm42014-06-22
| | | | | Remove unused stream type constants. Move some now DVD specific crap to stream_dvd.c.
* stream_dvd, stream_dvdnav: map dvd:// to dvdnavGravatar wm42014-06-20
| | | | The old stream_dvd.c implementation is still available under dvdread://.
* stream_dvd: fix potential endless loop on seekingGravatar wm42014-06-20
| | | | | Attempt to fix a reported freeze with some DVDs. Unknown if this helps, and it still might read the whole DVD before terminating.
* cache: avoid race condition between cache wakeup and idlingGravatar wm42014-06-16
| | | | | | | | | | When the reader is out of data, it tries to wake up the cache thread to get more data. In theory, there's a small race condition, which could cause the cache to miss the wakeup and idle before reaction. Most certainly didn't cause real issues, because even if this extremely unlikely race condition happens, the cache won't idle for longer than 1 second (the hardcoded cache idle time).
* tv: if timestamp is unset, return NOPTSGravatar wm42014-06-14
| | | | | | Well, not sure if this really improves anything, but at least it's less of a WTF to the playback core than always returning the same timestamp for every frame.
* tv: remove some non-senseGravatar wm42014-06-14
| | | | | | There's really no need to convert this to float and then back. This is mostly of cosmetic nature, double precision was probably enough to avoid rounding.
* tv: fix compilation without clock_gettime, don't claim to be MPlayerGravatar wm42014-06-14
| | | | mp_msg() doesn't exist anymore in this form. Oops.
* tv: add missing header for clock_gettimeGravatar wm42014-06-13
| | | | | | | Not sure how this symbol becomes visible in glibc (probably accidental or mandatory recursive inclusion via the other standard or Linux- specific headers), but normally this include file is needed to get the symbol.
* cache: print cache size only in verbose modeGravatar wm42014-06-12
| | | | Seems pretty useless in general, so this reduces output noise.
* tv: fix a hidden static variableGravatar wm42014-06-12
|
* stream_bluray: fix some const declarationsGravatar wm42014-06-12
| | | | Like in commit 99f5fe.
* tv: use correct timestampsGravatar iive2014-06-12
| | | | | | | | | | | | | | | | | | Squashed from the following mplayer-svn commits. The '#' is removed from the bug ID to prevent github from doing something stupid. Instead of adding the mplayer configure check for clock_gettime(), the POSIX identifiers are used for checking presence of the function. Use correct type of timestamps when recording from v4l2. Fix 2176 Patch by Jarek Czekalski <jarekczek at poczta onet pl>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37222 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow building of v4l2 without clock_gettime(). Add overly verbose message in case monotone timestamps are required by the kernel. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37223 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add more constGravatar wm42014-06-11
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* stream_dvd: minor cleanupsGravatar wm42014-06-11
| | | | | We don't need a separate stream_dvd.h header file anymore. Some dead functions become apparent; remove them.
* stream_dvd, stream_dvdnav, stream_bluray: remove global option variablesGravatar wm42014-06-11
|
* stream_dvb: remove global option variablesGravatar wm42014-06-11
|
* stream_cdda: remove global option variablesGravatar wm42014-06-11
|
* stream: add a generic way to setup stream priv defaultsGravatar wm42014-06-11
| | | | | | | | | | | | | | | Usually, each stream driver declares the size and option list of its private data. This was pretty natural for when most streams still used global variables to setup their defaults. They did by pointing priv_defaults to the (mutable) struct containing the option values. But falls short when storing the option values in MPOpts. So provide a somewhat inelegant but simple way to let the stream implementation setup the priv struct at initialization time. This is done with the get_defaults callback. It should return a copy of the struct used in MPOpts. (A copy, because if MPOpts is changed, string fields might be deallocated, and if that field is not described by stream_info.options, it won't be copied on init.)
* stream_pvr: remove global option variablesGravatar wm42014-06-11
|
* tv: remove printing of useless comment informationGravatar wm42014-06-11
|
* tv: remove global option variablesGravatar wm42014-06-11
| | | | | | Pretty much nothing changes, but using -tv-scan with suboptions doesn't work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat options ("-tv-scan-x") stay compatible.
* command: redo ancient TV/DVB/PVR commandsGravatar wm42014-06-11
| | | | | | | | | | | | | | | | | | Convert all these commands to properties. (Except tv_last_channel, not sure what to do with this.) Also, internally, don't access stream details directly, but dispatch commands with stream ctrls. Many of the new properties are a bit strange, because they're write- only. Also remove some OSD output these commands produced, because I couldn't be bothered to port these. In general, this makes everything much cleaner, and will also make it easier to e.g. move the demuxer to its own thread. Don't bother updating input.conf, but changes.rst documents how old commands map to the new ones. Mostly untested, due to lack of hardware.
* stream/cache: handle failure of seeking underlying streamGravatar wm42014-06-05
| | | | | | | | | | | | This could for example happen when serving an incomplete file from http, and the demuxer tries reading data from the end of the file when opening it (e.g. with avi). Seeking past EOF fails with http, so the file could never be opened, and the cache would get stuck trying to seek to the position. We can't really make the cache report seek failure directly (it would suck for various reasons), so just make the cache report EOF if seeking fails.
* stream: remove VCD supportGravatar wm42014-06-01
| | | | | | | | | If a single person complains, I will readd it. But I don't expect that this will happen. The main reason for removing this is that it's some of the most unclean code remaining, it's unmaintained, and I've never ever heard of someone using it.
* tv: remove sysinfo() usageGravatar wm42014-05-30
| | | | | | This call was used limited the buffer size if installed RAM was below 16 MB. This stopped being useful a decade ago. The check could also overflow on 32 bit systems. Just get rid of it.
* af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriateGravatar Marcoen Hirschberg2014-05-28
| | | | | | In most places where af_fmt2bits is called to get the bits/sample, the result is immediately converted to bytes/sample. Avoid this by getting bytes/sample directly by introducing af_fmt2bps.
* audio: rename i_bps to 'bitrate' to avoid confusionGravatar Marcoen Hirschberg2014-05-28
| | | | Since i_bps now contains bits/sec, rename it to reflect this change.
* audio: change values from bytes-per-second to bits-per-secondGravatar Marcoen Hirschberg2014-05-28
| | | | | | | The i_bps members of the sh_audio and dev_video structs are mostly used for displaying the average audio and video bitrates. Keeping them in bits-per-second avoids truncating them to bytes-per-second and changing them back lateron.
* stream: unbreak writeable streamsGravatar wm42014-05-27
| | | | | | | | | So, basically this worked only with streams that were not local files, because stream_dvd.c "intercepts" local files to check whether they point to DVD images. This means if a stream is not writeable, we have to try the next stream implementation. Unbreaks 2-pass encoding.
* stream_cdda: fix compilationGravatar wm42014-05-24
| | | | See previous commit. Sigh...
* stream_smb: fix compilationGravatar wm42014-05-24
| | | | Accidentally forgotten in commit a4d487.
* stream_file: readjust some windows ifdefferyGravatar wm42014-05-24
| | | | | | | | | | Also sneak in some cosmetics. setmode() exists on Windows/msvcrt only, so there's no need for a config test. I couldn't reproduce the problem with seekable pipes on wine, so axe it. (I'm aware that it still could be an issue on real Windows.)
* stream: remove chaos related to writeable streamsGravatar wm42014-05-24
| | | | | | | | | | For some reason, we support writeable streams. (Only encoding uses that, and the use of it looks messy enough that I want to replace it with FILE or avio today.) It's a chaos: most streams do not actually check the mode parameter like they should. Simplify it, and let streams signal availability of write mode by setting a flag in the stream info struct.
* stream_lavf: remove redundant message prefixesGravatar wm42014-05-24
|
* stream: don't use end_posGravatar wm42014-05-24
| | | | | | | | | | | | | | | | | | | Stop using it in most places, and prefer STREAM_CTRL_GET_SIZE. The advantage is that always the correct size will be used. There can be no doubt anymore whether the end_pos value is outdated (as it happens often with files that are being downloaded). Some streams still use end_pos. They don't change size, and it's easier to emulate STREAM_CTRL_GET_SIZE using end_pos, instead of adding a STREAM_CTRL_GET_SIZE implementation to these streams. Make sure int64_t is always used for STREAM_CTRL_GET_SIZE (it was uint64_t before). Remove the seek flags mess, and replace them with a seekable flag. Every stream must set it consistently now, and an assertion in stream.c checks this. Don't distinguish between streams that can only be forward or backwards seeked, since we have no such stream types.
* stream: kill start_pos, remove --sb optionGravatar wm42014-05-24
| | | | | | | | | | | | | | | | | | | | stream.start_pos was needed for optical media only, and (apparently) not for very good reasons. Just get rid of it. For stream_dvd, we don't need to do anything. Byte seeking was already removed from it earlier. For stream_cdda and stream_vcd, emulate the start_pos by offsetting the stream pos as seen by the rest of mpv. The bits in discnav.c and loadfile.c were for dealing with the code seeking back to the start in demux.c. Handle this differently by assuming the demuxer is always initialized with the stream at start position, and instead seek back if initializing the demuxer fails. Remove the --sb option, which worked by modifying stream.start_pos. If someone really wants this option, it could be added back by creating a "slice" stream (actually ffmpeg already has such a thing).
* cache: be silent if no initial fill is requestedGravatar wm42014-05-22
| | | | Hides the "Cache fill:" message with default settings.
* cache: redo options and default settingsGravatar wm42014-05-20
| | | | | | | | | | | | Some options change from percentages to number of kilobytes; there are no cache options using percentages anymore. Raise the default values. The cache is now 25000 kilobytes, although if your connection is slow enough, the maximum is probably never reached. (Although all the memory will still be used as seekback-cache.) Remove the separate --audio-file-cache option, and use the cache default settings for it.
* threads: use mpv time for mpthread_cond_timedwait wrapperGravatar wm42014-05-18
| | | | | | Use the time as returned by mp_time_us() for mpthread_cond_timedwait(), instead of calculating the struct timespec value based on a timeout. This (probably) makes it easier to wait for a specific deadline.
* stream_smb: increase to 128k read_chuuk from default 8kGravatar Kevin Mitchell2014-05-12
| | | | | | | | | | | | | | | | | Previous to this commit, read_chunk was not set in stream_smb. The cache was therefore filled in small 8K chunks. This resulted in poor performance when compared to, for example, smbnetfs on the same network. The value of 128k is chosen both because it is emperically the "levelling off point" for throughput into mpv's cache, and because it is the value chosen by smbnetfs when serving smb shares to mpv. Note that this change has no effect unless --cache is explicitly specified as smb:// streams do not activate cache by default. This is because the default cache size of 320K is so small it actually makes smb:// perfomance worse. For best results use at least --cache=1024.
* stream_bluray: remove unused variablesGravatar wm42014-05-04
| | | | | They were used for printing slave mode stuff, which was recently removed.
* options: remove deprecated --identifyGravatar Martin Herkt2014-05-04
| | | | | | | Also remove MSGL_SMODE and friends. Note: The indent in options.rst was added to work around a bug in ReportLab that causes the PDF manual build to fail.
* stream: use libavformat interrupt callbackGravatar wm42014-04-25
| | | | | | This will allow to cancel opening slow/stuck network streams faster. How well his work probably depends on the protocol implementation in libavformat.
* stream: remove interrupt callback global variablesGravatar wm42014-04-25
| | | | | | | | | | | | This used global variables for the asynchronous interrupt callback. Pick the simple and dumb solution and stuff the callback into mpv_global. Do this because interrupt checking should also work in the connect phase, and currently stream creation equates connecting. Ideally, this would be passed to the stream on creation instead, or connecting would be separated from creation. But since I don't know yet which is better, and since moving stream/demuxer into their own thread is something that will happen later, go with the mpv_global solution.
* stream: use uninterruptible sleep on reconnectingGravatar wm42014-04-25
| | | | | | | | | | This is the only function which actually used the time argument of stream_check_interrupt(). Considering that the whole player freezes anyway, this is not worth the complication. Also generally reduce the maximum wait time due to timeout. Introduce exponential backoff, which makes the first reconnect retries faster, but still waits up to 500ms in the later retries.
* stream: remove unused functionsGravatar wm42014-04-25
| | | | | | | Interestingly, their last use was removed with commit bbbea793, over 4 months ago. Also remove a stray struct demux_stream forward declaration.
* cache: remove redundant log prefixGravatar wm42014-04-23
|
* threads: fix function nameGravatar wm42014-04-23
| | | | Closer to the corresponding standard function pthread_cond_timedwait.