aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* TOOLS/zsh.pl: die if we can't parse main optionsGravatar Philip Sequeira2016-09-10
| | | | | | | | | | | | | | | | This will catch cases where mpv runs without error, but the --list-options output isn't what we expect. Otherwise, we'll make a broken completion file that will result in cryptic errors when pressing tab, like: _mpv:18: command not found: *:files:->mfiles That's been the case for most of the zsh completion issues we've had reported, that I can remember. Also make uninitialized variable access fatal so that failures to parse other options will also make the script die eventually, albeit with a less nice message.
* options: fix --list-options after previous commitGravatar wm42016-09-10
| | | | Fixes #3509.
* options: make --h list options according to a pattern passed to itGravatar wm42016-09-10
| | | | | | Useless feature, but I want it. Won't work on Windows due to missing fnmatch().
* m_config: remove another unused leftoverGravatar wm42016-09-10
|
* stream_cb: don't add "*://" to protocol listGravatar wm42016-09-10
| | | | | | | | | --list-protocol was printing a *:// entry, which looked strange at best. The "*" protocol was used to always match everything, so stream_cb.c could hook in custom protocols with a prefix chosen by the API user. Change it instead so that an empty protocol list means "match all", which also gets rid of the special-cased "*" entry.
* command: do not call mp_switch_track() before proper initializationGravatar wm42016-09-10
| | | | | | | | | | | This is an awful corner-case party, because we've started to allow the user to send track-switching related commands before stream selection is done in the loading stage. If mp_switch_track() is called before this stream selection, it can behave inconsistently. So if we're in the pre-loading phase, we must set the stream selection options to get streams selected later, instead of calling this function. There seem to be some annoying circumstances that exclude mp_switch_track() from handling this logic too, so do it at all call-sites.
* man: fix typoGravatar bugdone2016-09-10
|
* hwdec_cuda: Use the non-deprecated CUDA-GL interop APIGravatar Philip Langdale2016-09-10
| | | | | | | | | | The nvidia examples use the old (as in CUDA 3.x) interop API which is deprecated, and I think not even functional on recent versions of CUDA for windows. As I was following the examples, I used this old API. So, let's update to the new API, and hopefully, it'll start working on windows too.
* player: fix average frame duration calculationGravatar sda89ha92016-09-09
|
* stream, demux, config: remove some dead/unneeded option-related codeGravatar wm42016-09-09
| | | | | | | | | | This has all been made unnecessary recently. The change not to copy the global option struct in particular can be made because now nothing accesses the global options anymore in the demux and stream layers. Some code that was accidentally added/changed in commit 5e30e7a0 is also removed, because it was simply committed accidentally, and was never used.
* stream_cdda: remove weird option parsing stuffGravatar wm42016-09-09
| | | | | | | | | | Mostly untested. This is not compatible. It removes the URL fields for track range and cdrom speed (what did this even do). The device is not not to be prefixed with an additional "/" if it's put into the URL. I can't be bothered to keep these things compatible, just rip your damn CDs instead.
* tv: remove weird option parsing stuffGravatar wm42016-09-09
| | | | Mostly untested.
* stream_dvb: remove weird option parsing stuffGravatar wm42016-09-09
| | | | Mostly untested.
* man/options: Document cuda hwdec.Gravatar Philip Langdale2016-09-09
|
* client API: fix error code stringGravatar wm42016-09-09
| | | | Said "audio" instead of "video".
* client API: make mpv_opengl_cb_uninit_gl() behavior slightly nicerGravatar wm42016-09-09
| | | | | | Instead of deselecting the video stream plainly, use the slightly more robust error_on_track() function. Also give it an error code (although I'm not sure if this one is confusing, it's better than the one before).
* stream_dvd, stream_dvdnav: remove weird option parsing stuffGravatar wm42016-09-08
| | | | | | Same deal as with stream_bluray. Untested because I don't give a fuck about your shitty DVDs.
* options: drop unreferenced --bluray-angle optionGravatar wm42016-09-08
| | | | | Uh, what? It wasn't used at all. It was probably accidentally dropped at one point, or it was never used at all. Whatever, who cares.
* stream_bluray: fix a minor memory leakGravatar wm42016-09-08
|
* stream_bluray: remove weird option parsing stuffGravatar wm42016-09-08
| | | | | | | Instead, parse manually. This is to get rid of the option API usages, which seem unnecessary and shoehorned. (Just look at the URL pseudo parsing and the dumb url_options map. They were pretty much artifacts from refactoring old mplayer code.)
* vo: remove unused VOCTRL_GET_PANSCANGravatar wm42016-09-08
| | | | | | It was used to determine whether the VO supports VOCTRL_SET_PANSCAN. With all those changes to property semantics this became unnecessary, and its only use was dropped at some point.
* vo: don't access global options unsynchronizedGravatar wm42016-09-08
| | | | | And since there's no proper fine-grained option change notification mechanism yet, intercept updates to "framedrop" manually.
* vo_opengl: use dedicated image unref function in config caseGravatar wm42016-09-08
| | | | | | | Just another corner-caseish potential issue. Unlike unreffing the image manually, unref_current_image() also takes care of properly unmapping hwdec frames. (The corner-case part of this is that it's probably never mapped at this point, but it's apparently not entirely guaranteed.)
* vo_opengl: simplify a conditionGravatar wm42016-09-08
| | | | | | | | | | | The " || vimg->mpi" part virtually never seems to trigger, but on the other hand could possibly create unintended corner cases (for example by trying to upload a NULL image, which would then be marked as an error and render a blue screen). I guess it's a leftover from over times, where a NULL image meant "redraw the current frame". This is now handled by actually passing along the current frame.
* hwdec/opengl: Add support for CUDA and cuvid/NvDecodeGravatar Philip Langdale2016-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nvidia's "NvDecode" API (up until recently called "cuvid" is a cross platform, but nvidia proprietary API that exposes their hardware video decoding capabilities. It is analogous to their DXVA or VDPAU support on Windows or Linux but without using platform specific API calls. As a rule, you'd rather use DXVA or VDPAU as these are more mature and well supported APIs, but on Linux, VDPAU is falling behind the hardware capabilities, and there's no sign that nvidia are making the investments to update it. Most concretely, this means that there is no VP8/9 or HEVC Main10 support in VDPAU. On the other hand, NvDecode does export vp8/9 and partial support for HEVC Main10 (more on that below). ffmpeg already has support in the form of the "cuvid" family of decoders. Due to the design of the API, it is best exposed as a full decoder rather than an hwaccel. As such, there are decoders like h264_cuvid, hevc_cuvid, etc. These decoders support two output paths today - in both cases, NV12 frames are returned, either in CUDA device memory or regular system memory. In the case of the system memory path, the decoders can be used as-is in mpv today with a command line like: mpv --vd=lavc:h264_cuvid foobar.mp4 Doing this will take advantage of hardware decoding, but the cost of the memcpy to system memory adds up, especially for high resolution video (4K etc). To avoid that, we need an hwdec that takes advantage of CUDA's OpenGL interop to copy from device memory into OpenGL textures. That is what this change implements. The process is relatively simple as only basic device context aquisition needs to be done by us - the CUDA buffer pool is managed by the decoder - thankfully. The hwdec looks a bit like the vdpau interop one - the hwdec maintains a single set of plane textures and each output frame is repeatedly mapped into these textures to pass on. The frames are always in NV12 format, at least until 10bit output supports emerges. The only slightly interesting part of the copying process is that CUDA works by associating PBOs, so we need to define these for each of the textures. TODO Items: * I need to add a download_image function for screenshots. This would do the same copy to system memory that the decoder's system memory output does. * There are items to investigate on the ffmpeg side. There appears to be a problem with timestamps for some content. Final note: I mentioned HEVC Main10. While there is no 10bit output support, NvDecode can return dithered 8bit NV12 so you can take advantage of the hardware acceleration. This particular mode requires compiling ffmpeg with a modified header (or possibly the CUDA 8 RC) and is not upstream in ffmpeg yet. Usage: You will need to specify vo=opengl and hwdec=cuda. Note that hwdec=auto will probably not work as it will try to use vdpau first. mpv --hwdec=cuda --vo=opengl foobar.mp4 If you want to use filters that require frames in system memory, just use the decoder directly without the hwdec, as documented above.
* vo_opengl: fix incorrect video rendering after vdpau preemption recoveryGravatar wm42016-09-07
| | | | | This could also trigger in certain other cases, whenever it falls back to dumb mode.
* vo_opengl: fix another potential vdpau preemption issueGravatar wm42016-09-07
| | | | | | reinit() will change the image params fields, so give it a copy. Will fix potential crashes if preemption happens more than once.
* ao_rsound: fix compilationGravatar wm42016-09-07
| | | | Probably fixes #3501.
* sub: fix previous commit with older libass releasesGravatar wm42016-09-07
|
* sub: actually apply text alignment options to non-ASS subtitlesGravatar wm42016-09-07
| | | | | | | | | | | This is a bug fix, and the text alignment functionality probably got lost sometime along the way. For ASS subtitles, this could have unintended consequences, so it's hard to get right - thus it's not applied to ASS subtitles. For other text subtitles, this should be fine, though. It still works on ASS subtitles as promised by the manpage if --no-sub-ass is used.
* manpage: remove more references to deprecated sub-option syntaxGravatar wm42016-09-07
| | | | Fixes #3497.
* ao_pcm: remove some useless messagesGravatar wm42016-09-07
| | | | | | The first one is printed even if the user disabled video (or there's no video), so just remove it. The second one uses deprecated sub-option syntax, so remove that as well.
* osdep: rename atomics.h to atomic.hGravatar wm42016-09-07
| | | | | The standard header is stdatomic.h, so the extra "s" freaks me out every time I look at it.
* atomics: readd some emulationGravatar wm42016-09-06
| | | | | | | | | | | This time it's emulation that's supposed to work (not just dummied out). Unlike the previous emulation, no mpv code has to be disabled, and everything should work (albeit possibly a bit slowly). On the other hand, it's not possible to implement this kind of emulation without compiler support. We use GNU statement expressions and __typeof__ in this case. This code is inactive if stdatomic.h is available.
* DOCS/interface-changes.rst: list exact sub-option replacementsGravatar wm42016-09-06
| | | | | Actually, only link to a wiki page doing that, because these are too many options.
* demux: do not access global optionsGravatar wm42016-09-06
| | | | | | | | | | | | | | | | | Don't access MPOpts directly, and always use the new m_config.h functions for accessing them in a thread-safe way. The goal is eventually removing the mpv_global.opts field, and the demuxer/stream-layer specific hack that copies MPOpts to deal with thread-safety issues. This moves around a lot of options. For one, we often change the physical storage location of options to make them more localized, but these changes are not user-visible (or should not be). For shared options on the other hand it's better to do messy direct access, which is worrying as in that somehow renaming an option or changing its type would break code reading them manually, without causing a compilation error.
* input, demux_tv: remove some older option access methodsGravatar wm42016-09-06
|
* demux_mkv: don't crash if --ordered-chapters-files failsGravatar wm42016-09-06
| | | | It just crashed.
* vo_vdpau: rename some sub-optionsGravatar wm42016-09-06
| | | | | Since the sub-options have been deprecated very recently, and are redirected to global options, we don't need to document this change.
* common: use char array for version stringGravatar wm42016-09-06
| | | | | Use a char array instead of a pointer, which allows using the version variables in a constant context.
* vo_opengl: simplify option handlingGravatar wm42016-09-06
| | | | | | | | | | | | | Instead of copying the options around... just don't. video.c now has full control over when options are updated. (It still gets notified from outside, but it decides when the updated options are copied: when m_config_cache_update() is called.) So there's no need for tricky stuff, and it can be simplified a bit. Also change lcms.c. We could do it like video.c, and get the options from the global config store. But it seems simpler to just provide a pointer to an option struct, which is arbitrarily mutated from the outside (from the perspective of lcms.c).
* vo_opengl: fix --icc-profile initial behaviorGravatar wm42016-09-06
| | | | | | | | | Setting --icc-profile had no effect, until a vo_opengl option was changed at runtime. We must initialize the renderer for the initial option state too. For some reason, the ICC profile gets loaded twice. The next commit happens to fix this.
* wscript: fix typoGravatar pavelxdd2016-09-06
|
* m_config: avoid accidentally causing deprecation warningsGravatar wm42016-09-05
| | | | | | | | | It has to copy each option, whether it's deprecated or not. This would print a warning on every deprecated sub-option, even if it's not used. Yep, this is very stupid. At least m_config_get_co() gets actually slightly cleaner, because it separates the search and the deprecation handling.
* audio/out: deprecate "exclusive" sub-optionsGravatar wm42016-09-05
| | | | | | | And introduce a global option which does this. Or more precisely, this deprecates the global wasapi and coreaudio options, and adds a new one that merges their functionality. (Due to the way the sub-option deprecation mechanism works, this is simpler.)
* audio/out: deprecate device sub-optionsGravatar wm42016-09-05
| | | | | We have --audio-device, which can force the device. Also add something describing to this extent to the manpage.
* options: deprecate suboptions for the remaining AO/VOsGravatar wm42016-09-05
|
* options: add automagic hack for handling sub-option deprecationsGravatar wm42016-09-05
| | | | | | | | | | | | | | | | | I decided that it's too much work to convert all the VO/AOs to the new option system manually at once. So here's a shitty hack instead, which achieves almost the same thing. (The only user-visible difference is that e.g. --vo=name:help will list the sub-options normally, instead of showing them as deprecation placeholders. Also, the sub-option parser will verify each option normally, instead of deferring to the global option parser.) Another advantage is that once we drop the deprecated options, converting the remaining things will be easier, because we obviously don't need to add the compatibility hacks. Using this mechanism is separate in the next commit to keep the diff noise down.
* vo_direct3d: deprecate direct3d_shaders aliasGravatar wm42016-09-05
| | | | | And remove the difference between the aliases. This is needed to make the sub-option changes less painful.
* vo_image: move to global optionsGravatar wm42016-09-05
| | | | | This is a bit "special", because the config tree wants unique m_sub_options pointers in the whole thing.