summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lua: implement input_enable_section/input_disable_section via commandswm42015-08-066-44/+31
| | | | | | | | | | | | | | | Removes some more internal API calls from the Lua scripting backend. Which is good, because ideally the scripting backend would use libmpv functions only. One awkwardness is that mouse sections are still not supported by the public commands (and probably will never), so flags like allow-hide- cursor make no sense to an outside user. Also, the way flags are passed to the Lua function changes. But that's ok, because they're only undocumented internal functions, and not supposed to be used by script users. osc.lua only does due to historical reasons.
* command: define-section with empty contents removes a sectionwm42015-08-062-1/+3
|
* lua: make mp.input_define_section use the define-section commandwm42015-08-062-21/+7
|
* command: add a command for defining input bindingswm42015-08-064-0/+32
| | | | | | This was requested. It was more or less present internally already and used for Lua scripting. Lua will switch to the "public" functions in the following commits.
* demux: add options to control maximum queue sizewm42015-08-056-6/+27
| | | | | | | | | | | | | | Add --demuxer-max-packets and --demuxer-max-bytes, which control the maximum size of the packet queue. These can be helpful to avoid excessive memory usage. Memory usage is the reason why there's a limit in the first place. If a file is more or less broken, and audio and video don't line up, the decoders will fill up the packet queue trying to read more audio or video, and the maximum sizes are required to avoid unbounded memory allocation. Being able to override the maximum sizes is useful; either for restricting memory usage further, or enlarging the sizes when attempting to play various broken files.
* demux: remove options to control minimum packet queue sizewm42015-08-055-27/+1
| | | | | | | | Remove --demuxer-readahead-packets and --demuxer-readahead-bytes. These were a bit useless. They could force a minimum packet queue size, but controlling the queue size with --demuxer-readahead-secs is much nicer. It's fairly certain nobody ever used these options.
* old-configure: add dummies for recently added config.h entrieswm42015-08-051-0/+9
| | | | | | | Also add a note that you should not use the old build system. (It's only kept because of the "asshole maintainer" rule: no matter how broken or pointless someting is, as long as you're the maintainer and want to keep it, it stays in the repo.)
* DOCS: document video-aspect behavior changewm42015-08-051-0/+3
| | | | Forgotten in commit ae2f8fd0.
* vf_vdpaurb: Don't segfault if input mpi is nullPhilip Langdale2015-08-051-0/+4
| | | | | This will happen when input EOF is reached but output frames remain to be shown.
* build: fix conditions for building gl_hwdec_vda.cwm42015-08-051-1/+1
| | | | | This contains code for the VT and VDA case, thus must be build if at least 1 of them is enabled.
* hwdec: add VideoToolbox supportSebastien Zwickert2015-08-0511-12/+198
| | | | | | | | VDA is being deprecated in OS X 10.11 so this is needed to keep hwdec working. The code needs libavcodec support which was added recently (to FFmpeg git, libav doesn't support it). Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* vo_vdpau: fix frame scheduling if display FPS is unknownwm42015-08-042-3/+3
| | | | | | | | | | | Pretty stupid: vo_get_vsync_interval() returns a negative value if the display FPS is unknown (e.g. xrandr not compiled), and the comparison whether the value is below 0 fails later because it's assigned to an unsigned int. Regression since commit e3d85ad4. Also, fix some comments in vo.c.
* charset_conv: use our own UTF-8 check with ENCA onlywm42015-08-041-6/+5
| | | | | | | | | | Some charsets can look like valid UTF-8, but aren't UTF-8. One example is ISO-2022-JP. While ENCA apparently likes to get misdetect real UTF-8, this is not the case with uchardet. uchardet can detect ISO-2022-JP correctly, but didn't even get to try, because our own UTF-8 check succeeded. So run the UTF-8 check when using ENCA only. Fixes #2195.
* command: always make video-aspect property accessiblewm42015-08-041-14/+14
| | | | | | Now it can always be read. Normally returns the value of the video- aspect option. Writing it sets the option. If the aspect is not forced, it will attempt to return whatever is the current video aspect.
* command: fix video-aspect property update notificationwm42015-08-041-1/+1
| | | | Fixes #2194.
* osc: completely disable if no VO window existswm42015-08-041-1/+7
| | | | | Fixes relatively excessive CPU usage when paused while playing audio only.
* command: make auto-deinterlacing output at field ratewm42015-08-041-1/+1
| | | | | | This was requested by a user. The vdpau and vaapi deinterlacers already do this.
* player: warn against using HLS URLs with --playlistwm42015-08-042-1/+8
| | | | | | | | | That just makes no sense, but seems to be a somewhat common user error. The detection is not perfect. It's conceivable that EXT-X-... headers are used in normal m3u playlists. After all, HLS playlists are by definition a compatible extension to m3u playlists, as stupid as it sounds.
* charset_conv: "auto" encoding detection now uses uchardet.Jehan2015-08-042-5/+8
| | | | | If mpv is not built with uchardet, "enca" is still the fallback default encoding detection.
* input.conf: remap d/D keyswm42015-08-043-7/+4
| | | | | | | | | | Drop d for toggling framedrop. Toggling this is way too special to be at such a prominent place, and in fact I believe toggling it is pointless. Remap deinterlacing from D to d. It's relatively useful and non- destructive. As suggested in #973 (almost).
* player: use demux_open_url() to open main fileswm42015-08-043-65/+41
| | | | | | | | | | | | | | | | Instead of opening a stream and then a demuxer, do both at once with demux_open_url(). This requires some awkward additions to demuxer_params, because there are some weird features associated with opening the main file. E.g. the relatively useless --stream-capture features requires enabling capturing on the stream before the demuxer is opened, but on the other hand shouldn't be done on secondary files like external subtitles. Also relatively bad: since demux_open_url() returns just a demuxer pointer or NULL, additional error reporting is done via demuxer_params. Still, at least conceptually, it's ok, and simpler than before.
* stream: remove remaining DVD/BD menu definitionswm42015-08-032-88/+0
|
* stream_bluray: remove menu implementationwm42015-08-031-358/+11
|
* stream_dvdnav: rip out lower-level menu implementationwm42015-08-031-255/+7
| | | | Separate because it might cause regressions.
* player: remove higher-level remains of DVD/BD menu supportwm42015-08-0320-541/+1
| | | | | | | | | | | | | | | Nobody wanted to restore this, so it gets the boot. If anyone still wants to volunteer to restore menu support, this would be welcome. (I might even try it myself if I feel masochistic and like wasting a lot of time for nothing.) But if it does get restored, it should be done differently. There were many stupid things about how it was done. For example, it somehow tried to pull mp_nav_events through all the layers (including needing to "buffer" them in the demuxer), which was needlessly complicated. It could be done simpler. This code was already inactive, so this commit actually changes nothing. Also keep in mind that normal DVD/BD playback still works.
* video: unbreak EOF with video-only files that have timestamp resetswm42015-08-031-1/+2
| | | | | | | Normally when there's a timestamp reset, we make audio resync to make sure audio and video line up (again). But in video-only mode, just setting audio to resyncing breaks EOF detection, because there's no code which would get audio_status out of this bogus state.
* vo: fix inverted conditionwm42015-08-031-1/+1
| | | | | | | | When full_redraw is set, we always need to take the draw_image path. If it's not set, we can try VOCTRL_REDRAW_FRAME (and fallback to draw_image if that fails). Fixes #2184.
* audio: fix --end handling (again)wm42015-08-031-5/+2
| | | | | | | | | | Commit c5818046 fixed one case of audio EOF handling, and caused a new one. This time, the ao_buffer doesn't actually contain everyting that should be played - because if --end is used, only a part of it is played. Of course this is stupid, and it will be changed later. For now, this smaller change fixes the bug. Fixes #2189.
* charset_conv: fix switched parameterswm42015-08-021-1/+1
| | | | Fixes #2186.
* image_writer: don't use jpeg baseline, and remove useless jpeg optionswm42015-08-021-6/+1
| | | | | | | | | The jpeg-optimize and jpeg-baseline options were undocumented, and they're also pretty useless. There's no reason to ever change them. Also, don't write jpeg baseline images. This just makes compression worse for the sake of rather questionable compatibility with ancient decoders.
* build: make charset detectors dependent on iconv and group themwm42015-08-021-4/+11
|
* charset_conv: add uchardet supportwm42015-08-023-0/+47
| | | | | | | | | | | | | | For now, it needs to be explicitly selected. ENCA is still the default. This assumes uchardet returns iconv names. This doesn't seem to be always the case, and the result are lots of iconv errors. So explicitly check for this situation, and print a warning if it occurs. It's entirely possible that uchardet support is actually useless, because names are not necessarily iconv-compatible (but uchardet doesn't seem to document whether it attempts to return iconv-compatible names if possible). Fixes #908.
* charset_conv: make it possible to return an allocated string as guesswm42015-08-013-10/+14
| | | | | | | | | uchardet is written in C++, and thus doesn't appreciate the value of using static strings, and internally stores the guessed charset as allocated std::string. Add a minimal hack to deal with this. (I don't appreciate that the code is potentially harder to understand by returning either a static or allocated string, but I do appreciate for not having to litter the existing code with strdups.)
* audio: remove questionable speed change adjustmentwm42015-08-011-3/+0
| | | | | | | | | time_frame is when the next video frame should be shown. It's normally overwritten by the video timing code. This also says something about "nosound mode" (--no-audio today), but at least these days we don't use it at all if video is disabled. Remove it; it likely has no function at all.
* video: move frame duration code to a separate functionwm42015-08-011-11/+23
| | | | Minor preparation for something else.
* vo: correctly account for dropped frameswm42015-08-011-4/+4
| | | | | | If the framedrop count happens to be incremented with vo_increment_drop_count() during rendering, these increments were counted twice, because these events also set in->dropped_frame.
* terminal: disable terminal foreground state pollingwm42015-08-011-2/+1
| | | | | | | This was originally done for zsh; but zsh can manage the terminal state correctly when foregrounding/backgrounding applications if you enable it with "ttyctl -f". So I see no reason to wake up the mpv process once every second anymore.
* audio: remove af_dummywm42015-08-014-65/+0
| | | | Was used internally once; has no function anymore.
* old-configure: some adjustmentswm42015-08-011-2/+2
|
* vo_opengl: minor simplificationswm42015-08-011-4/+2
| | | | No functional changes.
* win32: revert wchar_t changeswm42015-08-0113-50/+48
| | | | | | | | | | | 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 replacementswm42015-07-309-17/+18
| | | | | | | | | | | | | 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.
* vo_direct3d: create multithreaded IDirect3DDevice9wm42015-07-301-1/+2
| | | | | | | | | | | | | | | A user complains that it leads to the dxva driver failing, leading to messages like this: [ffmpeg/video] h264: Failed to execute: 0x8007000e [ffmpeg/video] h264: hardware accelerator failed to decode picture Reportedly, this happens only with vo_direct3d, not with vo_opengl. The only difference is that vo_direct3d attempts to share the D3D device with the decoder. Possibly the error is that the device in the VO is not created with D3DCREATE_MULTITHREADED. Change this. Probably fixes #2178.
* TOOLS: remove youtube-starttime.luawm42015-07-291-34/+0
| | | | Obsolete due to native youtube-dl start time support.
* ytdl: get start_timeRicardo Constantino2015-07-291-0/+6
|
* ytdl: print command in debug modeRicardo Constantino2015-07-291-0/+1
|
* demux_playlist: skip hidden directorieswm42015-07-291-1/+1
| | | | | | | | The user probably doesn't want these. Conveniently, this also skips the unwanted "." and ".." entries. (This code is triggered if the input stream is a directory - and it's in demux_playlist.c because it's convenient.)
* command: let track properties return option value in idle modewm42015-07-291-1/+5
| | | | | In idle mode (no file playing), the track properties such as vid/sid/aid should return the option setting, instead of the value "no".
* win32: replace wchar_t with WCHARwm42015-07-297-32/+33
| | | | | | | | | | | | | WCHAR is more portable. While at least MinGW, Cygwin, and MSVC actually use 16 bit wchar_t, Midipix will have 32 bit wchar_t. In that context, using WCHAR instead is more portable. This affects only non-MinGW parts, so not all uses of wchar_t need to be changed. For example, terminal-win.c won't be used on Midipix at all. (Most of io.c won't either, so the search & replace here is more than necessary, but also not harmful.) (Midipix is not useable yet, so this is just preparation.)
* video: move up vo_frame setupwm42015-07-281-12/+12
|
* vo_opengl: framebuffers work under GLES 2wm42015-07-271-1/+1
| | | | | They are not entirely full-featured in GLES 2, but they appear to provide all we need. Thus we can enable them.
* vo_opengl: slightly more informative message when disabling scalerswm42015-07-271-4/+4
|
* win32: pthread: don't play dirty tricks for mutex initwm42015-07-272-28/+10
| | | | | | | | | | | | | | | | | | | | We used double-checked locking on pthread_mutex_t.requires_init in order to lazily initialize static mutexes (since CRITICAL_SECTION has no native way to do this). This was kind of unclean: we relied on MSVC semantics for volatile (which apparently means all accesses are weakly atomic), which is not such a good idea since mpv can't even be compiled with MSVC. Since it's too much of a pain to get weak atomics, just use INIT_ONCE for initializing the CRITICAL_SECTION. Microsoft most likely implemented this in an extremely efficient way. Essentially, it provides a mechanism for correct double-checked locking without having to deal with the tricky details. We still use an extra flag to avoid calling it at all for normal locks. (To get weak atomics, we could have used stdatomic.h, which modern MinGW provides just fine. But I don't want this wrapper depend on MinGW specifics if possible.)
* win32: add portable config modewm42015-07-272-9/+38
| | | | | | | | | | | See manpage additions. The main reason for adding this is that we can't guess whether the user wants his config in his Windows profile or not. The user basically has to tell mpv what should be done, and the "portable_config" directory does this implicitly. Fixes #2042 (approximately).
* vo_rpi: determine and return display refresh ratewm42015-07-271-0/+24
| | | | Reverse engineered from tvservice.c.
* audio: fix restoring volumeshdown2015-07-271-1/+1
| | | | | Was broken by 68bbab0e42e141896545f1f6e9699bcad2d685f8, which changed the number of fields to scan, but not the expected return value.
* video: always decode at least 2 frames in advancewm42015-07-261-5/+1
| | | | | | | Remove the exception for decoding only 1 frame if VO framedrop is disabled. This was originally done to be able to test potential regressions when we enabled VO framedrop and decoding 2 frames by default. It's not needed anymore.
* Copyright: mention that more liberal licenses are ok toowm42015-07-261-1/+1
| | | | In fact, some source files do this.
* vo_opengl: minor cleanup to hwdec texture setting codewm42015-07-261-14/+9
| | | | | | Instead of special-casing hwdec in the place where the video textures are used, just set the textures in the image upload function. The renderer code doesn't need to know whether hwdec interop is used at all.
* build: remove useless classStefano Pigozzi2015-07-266-48/+37
|
* manpage: document --audio-channels=auto caveatswm42015-07-252-2/+11
| | | | | | | This is an unfortunate fact of life. Maybe making this the default wasn't such a good idea after all. Also update etc/example.conf. It used an obsolete alias for "auto".
* Require contributions in LGPLv2.1+wm42015-07-242-2/+13
| | | | | | | | | | | As suggested in #2033. Additionally, change "LGPLv2+" to "LGPLv2.1+". Since this was always used with the "and later" phrase, this doesn't require any further discussion. Also clarify that the "+" means "or later". This should be clear to anyone with a brain, but you never know with copyright.
* vo_opengl: remove legacy GL detectionwm42015-07-241-23/+1
| | | | | | | | | | This detected whether an OpenGL context still provided legacy OpenGL if the OpenGL version is modern (>= 3.0). This was actually only needed for vo_opengl_old, because it relied on legacy functions. Since it's gone, this code isn't needed either. (Also, the removed comment about OpenGL 3.0 was wrong: you could just query GL_CONTEXT_FLAGS and see if the forward compatible bit was set.)
* audio: remove an unused parameterwm42015-07-241-3/+2
|
* audio: fix EOF state with --keep-openwm42015-07-241-1/+1
| | | | | | | | | | In paused mode, we never entered the audio EOF state. This shows e.g. in --keep-open mode, which will not set the eof-reached property correctly. Regression since commit c06cd1b9. This commit was the wrong fix. We need to respect the buffer state, and pausing has nothing to do with this. Fixes #2167.
* command: add property indicating per-file optionswm42015-07-235-0/+11
| | | | Fixes #2165, more or less.
* vo_opengl: fix scale=oversample's threshold calculationsNiklas Haas2015-07-231-1/+1
| | | | | This resulted in wrong behavior for values of scale-param1 between 0.0 and 0.5 (not inclusive).
* video: don't restrict --vd-lavc-threads to a maximum of 16wm42015-07-232-4/+5
| | | | | | Only do it when the number of threads is autodetected, as more than 1