aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream
Commit message (Collapse)AuthorAge
* stream_libarchive: make libarchive seek callback lazyGravatar Kevin Mitchell2015-11-09
| | | | This fixes problems seeking http streams to their end.
* stream_libarchive: add multivolume supportGravatar Kevin Mitchell2015-11-09
| | | | | | | | | | | | | | This commit introduces logic to read other volumes from the same source as the primary archive. Both .rar formats as well as 7z are supported for now. It also changes the libarchive callback structure to be per-volume consistent with the libarchive intenal client data array constructed with archive_read_append_callback_data. Added open, close and switch callbacks. Only the latter is strictly required to make sure that the streams always start at position 0, but leaving all volumes open can eat a lot of memory for archives with many parts.
* libarchive: remove redundant log prefixGravatar Kevin Mitchell2015-11-09
| | | | "libarchive:" is already added by the logging system
* stream/audio: fix unchecked strdupsGravatar wm42015-10-30
| | | | | See #2435. It's literally a waste of time trying to fix minor memory leaks in this old, unused, and crappy code.
* options: add support for client certificate authenticationGravatar Joschka Tillmanns2015-10-20
| | | | | | | | Client certificates are supported by ffmpeg as documented here: > https://www.ffmpeg.org/ffmpeg-protocols.html#tls Signed-off-by: wm4 <wm4@nowhere>
* stream: minor cleanup to verbose loggingGravatar wm42015-09-30
| | | | | | Don't print the URL that is opened twice. stream.c and stream_lavf.c each printed it once. Remove the logging from stream_lavf.c, and move the log call to a more interesting point.
* cache: do not include backbuffer size in total stream cache sizeGravatar wm42015-09-10
| | | | | | | | | This causes weirdness with the "cache-size" property and option. Only the read handler of the property included the backbuffer, while all others did not. Make it consistent, and subtract the backbuffer size from the cache size. Fixes #2305.
* stream_libarchive: read tar only in "unsafe" modeGravatar wm42015-08-22
| | | | | | | | | | As expected, probing with libarchive is a disaster. Both libavformat and libarchive are too eager to misdetect file formats just because files "might" be of a specific type. In this case, it's mp3 vs. tar. To be fair, neither file format has an actual header. I'm not sure why we'd need tar support, but since libarchive provides it, and idiots on the internet apparently pack media files in tar sometimes (really, idiots), keep it for now, and probe tar last.
* stream_libarchive: disable raw filterGravatar wm42015-08-20
| | | | | Too many false positives (it accepts things like unspecific text files), and also relatively useless.
* stream_libarchive: fix libarchive callback signatureGravatar wm42015-08-20
| | | | | | | | | | | libarchive uses a quite confusing ifdeffery mess for some of the types used in callbacks. Currently, archive_read_set_seek_callback() causes a warning at least on Windows due to mismatching return type. The header file uses __LA_INT64_T as return type, so I think the user is intended to use int64_t. (The ssize_t return type for the read_cb seems correct, on the other hand.)
* stream_libarchive: restrict number of allowed formatsGravatar wm42015-08-18
| | | | | Most of what is not in this list is extremely obscure, or increases the file format misdetection rate.
* stream: provide a stream_get_size() convenience functionGravatar wm42015-08-18
| | | | | And use it everywhere, instead of retrieving the size manually. Slight simplification.
* demux_libarchive: open flat compressed filesGravatar wm42015-08-17
| | | | | | | | Things like .gz etc., which have no real file header. A mixed bag, because it e.g. tends to misdetect mp3 files as compressed files or something (of course it has no mp3 support - I don't know as what it detects them). But requested by someone (or maybe not, I'm not sure how to interpret that).
* stream: libarchive wrapper for reading compressed archivesGravatar wm42015-08-17
| | | | | | | | | | | | | | | | | | | | This works similar to the existing .rar support, but uses libarchive. libarchive supports a number of formats, including zip and (most of) rar. Unfortunately, seeking does not work too well. Most libarchive readers do not support seeking, so it's emulated by skipping data until the target position. On backwards seek, the file is reopened. This works fine on a local machine (and if the file is not too large), but will perform not so well over network connection. This is disabled by default for now. One reason is that we try libarchive on every file we open, before trying libavformat, and I'm not sure if I trust libarchive that much yet. Another reason is that this breaks multivolume rar support. While libarchive supports seeking in rar, and (probably) supports multivolume archive, our support of libarchive (probably) does not. I don't care about multivolume rar, but vocal users do.
* stream: remove remaining DVD/BD menu definitionsGravatar wm42015-08-03
|
* stream_bluray: remove menu implementationGravatar wm42015-08-03
|
* stream_dvdnav: rip out lower-level menu implementationGravatar wm42015-08-03
| | | | Separate because it might cause regressions.
* win32: revert wchar_t changesGravatar wm42015-08-01
| | | | | | | | | | | Revert "win32: more wchar_t -> WCHAR replacements" Revert "win32: replace wchar_t with WCHAR" Doing a "partial" port of this makes no sense anymore from my perspective. Revert the changes, as they're confusing without context, maintenance, and progress. These changes were a bit premature anyway, and might actually cause other issues (locale neutrality etc. as it was pointed out).
* win32: more wchar_t -> WCHAR replacementsGravatar wm42015-07-30
| | | | | | | | | | | | | This was essentially missing from commit 0b52ac8a. Since L"..." string literals have the type wchar_t[], we can't use them for UTF-16 strings. Use C11 u"..." string literals instead. These have the type char16_t[], but we simply assume char16_t is the same underlying type as WCHAR. In practice, they're both unsigned short. For this reason use -std=c11 on Windows. Since Windows is a "special" environment (we require either MinGW or Cygwin), we don't need to worry too much about compiler compatibility.
* cache: make backbuffer size configurableGravatar wm42015-07-22
| | | | | | | | | | Allow setting an arbitrary amount, instead of the fixed 50%. This is nto striclty backwards compatible. The defaults don't change, but the --cache/--cache-default options now set the readahead portion. So in practice, users who configured this until now will see the double amount of cache being used, _plus_ the 75MB default backbuffer will be in use.
* cache: fix backbuffer logicGravatar wm42015-07-22
| | | | | | Currently, this is perfectly equivalent, because back_size is hardcoded to buffer_size/2. But this fixes the logic for the case the back_size can be configured freely.
* stream_file: remove an indirectionGravatar wm42015-07-10
| | | | Remove the "fd" local variable, and always use "p->fd" directly.
* stream_file: cosmetics: shorten variable nameGravatar wm42015-07-10
| | | | Can't be bothered to type this much.
* stream_file: initialize `fd`Gravatar Ben Boeckel2015-07-09
| | | | | Use the fd variable and delay assignment to priv->fd to mirror other branches of the if/else tree.
* stream_file: add fd:// protocolGravatar wm42015-07-09
|
* Disable DVD and BD menu support (to be removed)Gravatar wm42015-06-26
| | | | | | | | | | | | | | | | | | DVD/BD menu support never worked right, and are a pain to maintain. In particular, DVD menus never actually worked correctly, because highlights were not rendered correctly. Fixing this requires major effort, which I'm not interested to spend. Most importantly, the requirement to switch streams without losing the DVD/BD state caused major weirdness in the playback core. It was implemented by somehow syncing the playback state to the DVD/BD implementation (in stream_dvdnav.c etc.), and then reloading the demuxer without destroying and recreating the stream. This caused a bunch of special-cases which I'm looking forward to remove. For now, don't just remove everything related to menu support and just disable it. If someone volunteers, it can be restored (i.e. rewritten) in a reasonable way. If nobody volunteers soon, it goes.
* cache: limit readahead size to half the cache size at the beginningGravatar wm42015-05-29
| | | | | | | | | | | | | | | | | | | | | | Normally, the cache keeps 50% of the buffer for seeking backwards. Until now, the cache just used the full buffer size at the beginning of a file, because the 50% normally reserved for the backbuffer are unused. This caused a problem: when streaming from http, the player would first read about 150MB (default cache size), then stop until 75MB of the cache has been played. (Until the 75MB position, the cache is fully used, so nothing new can be read. After that, part of the backbuffer starts getting unreserved, and can be used for readahead.) This long read pause can cause the server to terminate the connection. Reconnecting may be possible, but if youtube-dl is used, the media URL may have become invalid. Fix this by limiting readahead to 50% even if unnecessary. The only exception is when the whole file would fit in the cache. In this case, it won't matter if we can't reconnect, because the cache covers everything anyway, and hopefully the cache will stay valid. Likely fixes #2000.
* vo_opengl: add support for custom shadersGravatar Niklas Haas2015-05-27
|
* command: add protocol-list propertyGravatar wm42015-05-23
| | | | Fixes #1972.
* Remove trailing whitespacesGravatar Michael Vetter2015-05-15
|
* threads: use utility+POSIX functions instead of weird wrappersGravatar wm42015-05-11
| | | | | | | There is not much of a reason to have these wrappers around. Use POSIX standard functions directly, and use a separate utility function to take care of the timespec calculations. (Course POSIX for using this weird format for time values.)
* path: make mp_path_join accept normal C stringsGravatar wm42015-05-09
| | | | | Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
* stream: don't print reconnection message if no stream supportGravatar wm42015-04-29
| | | | | | | This code does not know whether the stream supports reconnecting until STREAM_CTRL_RECONNECT is called. So the message should be printed after it. To avoid that reconnects that succeed on the first try go unnoticed, print a warning on success.
* cache: exit early on cancellationGravatar wm42015-04-21
| | | | | | | An approximate measure to make it exit possibly slightly earlier. Relatively speaking, some time will pass between cancellation and the cache actually being requested to exit, so it's good if the cache returns EOF immediately.
* cache: another minor simplificationGravatar wm42015-04-21
| | | | | | | | The caller can check for cache interruption instead. There's no need to define special return values and such. It would be rather hard to make waiting for the condition and stream cancellation atomic too (and pointless, since the underlying stream will also be "cancelled" and exit early), so nothing about cancellation being a separate call will change.
* cache: simplify the check for printing the "cache stuck" messageGravatar wm42015-04-21
| | | | | | | | | | | | This put some effort into distinguishing between two messages to print - all worthless. Even more so, this kept printing the message, which doesn't feel overly useful either. (The message will be printed repeatedly anyway if network recovers for a while and then gets stuck again.) All in all, the demuxer cache triggering the buffering state does a better job here. But don't remove it completely, since knowing that the network did nothing for a relatively short time is still useful.
* command: disc-mouse-on-button propertyGravatar xylosper2015-04-21
| | | | | This property indicates whether mouse cursor is located on button or not for disc naviation.
* stream_file: minor simplificationGravatar wm42015-04-17
| | | | | Now all this platform-specific code doesn't depend on stream or stream_file internals anymore.
* player: allow playing directoriesGravatar wm42015-04-17
| | | | | | | | | | | If a directory is encountered, replace it with its contents in the internal playlist. This is messed into demux_playlist.c, because why not. STREAMTYPE_DIR could be avoided by unconditonally trying opendir() in demux_playlist.c, but it seems nicer not to do weird things like calling it on real files. This does not work on Windows, because msvcrt is retarded.
* Update license headersGravatar Marcin Kurczewski2015-04-13
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream_rar: update commentGravatar wm42015-03-29
| | | | The stream filter non-sense was removed, which makes it much easier.
* stream_lavf: workaround broken rtmp "timeout" optionGravatar wm42015-03-19
| | | | | | | | | | The libavformat rtmp protocol's "timeout" option has two problems: 1) Unlike all other protocols, it's in seconds and not microseconds 2) It enables "listen" mode, which breaks playback Make the --network-timeout do nothing in the rtmp case. Fixes #1704.
* options: introduce --cache=yes choiceGravatar wm42015-03-12
| | | | | | I think this is what I alwass missed ever since I found the MPlayer cache options: a way to enable the cache on local files with the default settings, whatever they are.
* stream: use relaxed atomic loads for checking playback abortsGravatar wm42015-03-09
| | | | | | | Seems appropriate, and will probably avoid performance surprises with scary architectures which don't have trivial implementations for atomic loads. (Consider that demux_mkv calls this very often now, and libavformat demuxers and streams did this for a while now.)
* stream/smb: mark as network stream for --cache=autoGravatar Kevin Mitchell2015-03-09
| | | | | | | This causes the cache to be enabled with --cache=auto. It was not done previously because the small cache size 320k actually led to worse performance. However, with the current default cache size of 25000kb, caching notably improves performance.
* options: add M_OPT_FILE to new options that are missing itGravatar Philip Sequeira2015-03-07
| | | | Fixes shell completion.
* cache: assume file size from EOF positionGravatar wm42015-03-04
| | | | | | If we're caching a stream with unknown size, and we reach EOF, then consider the EOF position the file size. Typically makes sense when reading from a pipe or a http connection that did not send a size.
* stream_cdda: add option to enable cdtext, and disable it by defaultGravatar wm42015-03-03
| | | | Fixes #1615.
* stream_cdda: fix parameter passingGravatar wm42015-03-03
| | | | | All cdda options (except --cdrom-drive) were ignored, because the priv struct (with the options set) was just replaced. Oops.
* player: refine rar:// playlist-safety handlingGravatar wm42015-03-02
| | | | | | | | | | | | It was possible to make the player play local files by putting rar:// links into remote playlists, and some other potentially unsafe things. Redo the handling of it. Now the rar-redirector (the thing in demux_playlist.c) sets disable_safety, which makes the player open any playlist entries returned. This is fine, because it redirects to the same file anyway (just with different selection/interpretation of the contents). On the other hand, rar:// itself is now considered fully unsafe, which means that it is ignored if found in normal playlists.