aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* manpage: add some minor documenation fixesGravatar Leo Izen2017-12-04
| | | | | | - replace the incorrect reference to --opengl-shader - document a caveat when using --image-display-duration - add some documentation on --vf=lavfi=
* Copyright: remove removed file from GPL listGravatar wm42017-12-05
|
* player/misc.c: allow both --length and --end to control play endpointGravatar Leo Izen2017-12-04
| | | | | | | | | | Most options that change the playback endpoint coexist and playback stops when it reaches any of them. (e.g. --ab-loop-b, --end, or --chapter). This patch extends that behavior to --length so it isn't automatically trumped by --end if both are present. These two will interact now as the other options do. This change is also documented in DOCS/man/options.rst.
* vo_gpu: d3d11_helpers: use better formatting for PCI IDsGravatar James Ross-Gowan2017-12-04
| | | | | The old format was definitely misleading, since it used an 0x prefix and formatted the device IDs with %d.
* player/playloop.c: respect playback start time when using --loop-fileGravatar Leo Izen2017-12-03
| | | | | | | Using --loop-file should now seek to the position denoted by --start or equivalent option, rather than always seeking to the beginning as it had done before. --loop-playlist already behaves this way, so this brings --loop-file in line for added consistency.
* player: use start timestamp for ab-looping if --ab-loop-a is absentGravatar Leo Izen2017-12-03
| | | | | | | If --ab-loop-b is present, then ab-looping will be enabled and will attempt to seek to the beginning of the file. This patch changes it so it will instead seek to the start of playback, either via --start or some equivalent, rather than always to the beginning of the file.
* player: add get_play_start_ptsGravatar Leo Izen2017-12-03
| | | | | | | | | | Added a get_play_start_pts function to coincide with the already-existing get_play_end_pts. This prevents code duplication and also serves to make it so code that probes the start time (such as get_current_pos_ratio) will work correctly with chapters. Included is a bug fix for misc.c/rel_time_to_abs that makes it work correctly with chapters when --rebase-start-time=no is set.
* TOOLS/autoload.lua: update extensionsGravatar Ckat2017-12-03
| | | | | * duplicated 'ogv' renamed to 'ogm' * 'ogg' and 'opus' added as common audio file extensions
* stream_libarchive: Fix locale includes on macOSGravatar sfan52017-12-03
| | | | Fixes #5108
* Fix various typos in log messagesGravatar Nicolas F2017-12-03
|
* manpage: vaapi-copy is not limited to Intel GPUsGravatar Mariusz Skoneczko2017-12-03
| | | vaapi-copy works with some AMD cards
* video: probe format of primary plane in drm/egl contextGravatar Anton Kindestam2017-12-03
| | | | | | | | | We need to support hardware/drivers which do not support ARGB8888 in their primary plane. We also use p->primary_plane_format when creating the gbm surface, to make sure it always matches (in actuality there should be little difference).
* hwdec: whitespace cleanup in hwdec_drmprime_drm.cGravatar Anton Kindestam2017-12-03
|
* video: fix use of possibly-NULL pointer in drm_egl_initGravatar Anton Kindestam2017-12-03
|
* video: fix double free in drm_atomic_create_contextGravatar Anton Kindestam2017-12-03
| | | | | | | | | | | | Passing in an invalid DRM overlay id with the --drm-overlay option would cause drmplane to be freed twice: once in the for-loop and once at the error-handler label fail. Solve by setting drmpanel to NULL after freeing it. Also the 'return false' statement after the error handler label should probably be 'return NULL', given that the return type of drm_atomic_create_context returns a pointer.
* travis: remove Libav check for nowGravatar wm42017-12-02
| | | | | I sure hope they merge the patches for the required hwdec info API, which is already in FFmpeg.
* build: remove nanosleep() checkGravatar wm42017-12-02
| | | | Also guaranteed by POSIX.
* build: remove termios checkGravatar wm42017-12-02
| | | | Also should be fully covered by POSIX.
* build: remove POSIX/sysv shared memory testGravatar wm42017-12-02
| | | | | | vo_x11 and vo_xv need this. According to the Linux manpage, all involved functions are POSIX-2001 anyway. (I just assumed they were not, because they're mostly System V UNIX legacy garbage.)
* vd_lavc: don't request native pixfmt with -copy and METHOD_INTERNALGravatar wm42017-12-02
| | | | | | | | | If the codec uses AV_CODEC_HW_CONFIG_METHOD_INTERNAL, and we're using the -copy method, then don't request the native pix_fmt. It might not have a AVFrame.hw_frames_ctx set, and we couldn't read back at all. On top of that, most of those decoders probably don't provide read-back when using such opaque formats anyway, while providing separate decoding modes to decode to RAM.
* man: remove incorrect note about default opengl backendGravatar Martin Herkt2017-12-02
|
* video: remove some more hwdec legacy stuffGravatar wm42017-12-02
| | | | | | | | | Finally get rid of all the HWDEC_* things, and instead rely on the libavutil equivalents. vdpau still uses a shitty hack, but fuck the vdpau code. Remove all the now unneeded remains. The vdpau preemption thing was not unused anymore; if someone cares this could probably be restored.
* vd_lavc, vdpau, vaapi: restore emulated API avoidanceGravatar wm42017-12-02
| | | | | | This code is for trying to avoid using an emulation layer when using auto probing, so that we end up using the actual API the drivers provide. It was destroyed in the recent refactor.
* hwdec: don't require setting legacy hwdec fieldsGravatar wm42017-12-02
| | | | | | | | | | With the recent changes, mpv's internal mechanisms got synced to libavcodec's once more. Some things are still needed for filters (until the mechanism gets replaced), but there's no need to require other hwdec methods to use these fields. So remove them where they are unnecessary. Also fix some minor leaks in the dxva2 backends, and set the driver_name field in the Apple ones. Untested on Apple crap.
* vd_lavc: simpler way to check for opque hw frameGravatar wm42017-12-02
| | | | The ->fmt shit is something I'd like to phase out.
* vd_lavc: sort -copy hwdec modes to end of listGravatar wm42017-12-02
| | | | | | | | | | | | | | | Otherwise, if e.g. "nvdec" didn't work, but "nvdec-copy" did, it would never try "vdpau", which is actually the next non-copy mode on the autprobe list. It's really expected that it selects "vdpau". Fix this by sorting the -copy modes to the end of the final hwdec list. But we still don't want preferred -copy modes like "nvdec-copy" to be sorted after fragile non-preferred modes like "cuda", and --hwdec=auto should prefer "nvdec-copy" over it, so make sure the copying mode does not get precedence over preferred vs. non-preferred mode. Also simplify the existing auto_pos sorting condition, and fix the fallback sort order (although that doesn't matter too much).
* vd_lavc: allow forcing single implementations with --hwdecGravatar wm42017-12-02
|
* vd_lavc: slightly simplifyGravatar wm42017-12-02
| | | | | | Factor the somewhat-duplicated code into an append function. Also fix setting the copying flag in one of the cases. This also ensures some uniformity.
* vd_lavc: coding styleGravatar wm42017-12-02
|
* hwdec: remove unused HWDEC_* constantsGravatar wm42017-12-01
| | | | Removing the rest requires replacing some other mechanisms, later.
* vd_lavc: fix dumb nonsenseGravatar wm42017-12-01
|
* vd_lavc, mp_image: remove weird mpv specific palette constantGravatar wm42017-12-01
| | | | | Was for times when we were trying to be less dependent on libav* I guess.
* vd_lavc: merge redundant headerGravatar wm42017-12-01
| | | | This is not needed anymore.
* audio: fix missing volume update on init and reinitGravatar wm42017-12-01
| | | | | | This is never updated after the AO inits, so there are several cases where the volume would stay at 100%, even if it shouldn't. This affects initial volume as well as track switching or switching between files.
* scripting: report dlerror() outputGravatar Nicolas F2017-12-01
| | | | | | | | | dlopen() and dlsym() can fail in various ways, and we can find out how it failed by calling dlerror(). This is particularly useful if you typo the filename of a script when explicitly passing it with --script, and dlopen actually tells you that the file doesn't exist instead of leading you down a rabbit hole of disassembling your shared object file to figure out why the thing won't load.
* vd_lavc: rewrite how --hwdec is handledGravatar wm42017-12-01
| | | | | | | | | | | | | | | | Change it from explicit metadata about every hwaccel method to trying to get it from libavcodec. As shown by add_all_hwdec_methods(), this is a quite bumpy road, and a bit worse than expected. This will probably cause a bunch of regressions. In particular I didn't check all the strange decoder wrappers, which all cause some sort of special cases each. You're volunteering for beta testing by using this commit. One interesting thing is that we completely get rid of mp_hwdec_ctx in vd_lavc.c, and that HWDEC_* mostly goes away (some filters still use it, and the VO hwdec interops still have a lot of code to set it up, so it's not going away completely for now).
* options: rename empty string special case for option valuesGravatar wm42017-12-01
| | | | | "--bla" behaved differently from "--bla=". Change this, in line with how options have been changed in general over the last few years.
* av_common: drop old hack against ancient lavc vdpau wrapperGravatar wm42017-12-01
| | | | | | | Seems like they finally got rid of this. It was the first lavc vdpau API, and mpv stopped supporting it in favor of newer APIs a long time ago, causing confusion to users who tried to enable vdpau decoding by forcing the decoders (MPlayer style).
* vd_lavc: drop mediacodec direct rendering support temporarilyGravatar wm42017-12-01
| | | | | | | | | | | | The libavcodec mediacodec support does not conform to the new hwaccel APIs yet. It has been agreed uppon that this glue code can be deleted for now, and support for it will be restored at a later point. Readding would require that it supports the AVCodecContext.hw_device_ctx API. The hw_device_ctx would then contain the surface ID. vo_mediacodec_embed would actually perform the task of creating vo.hwdec_devs and adding a mp_hwdec_ctx, whose av_device_ref is a AVHWDeviceContext containing the android surface.
* video: move d3d.c out of decode sub directoryGravatar wm42017-12-01
| | | | | | It makes more sense to have it in the general video directory (along with vdpau.c and vaapi.c), since the decoder source files don't even access it anymore.
* vd_lavc: delete hw_d3d11va.c/hw_dxva2.c and merge leftoversGravatar wm42017-12-01
| | | | | | Like with all hwaccels, there's little that is actually specific to decoding (which has been moved away anyway), and what is left are declarations (which will also go away soon).
* hw_dxva2: move dxva2 code to d3d.cGravatar wm42017-12-01
| | | | This source file will disappear, so just collect the leftovers in d3d.c.
* video: refactor hw device creation for hwdec copy modesGravatar wm42017-12-01
| | | | | | | | | | Lots of shit code for nothing. We probably could just use libavutil's code for all of this. But for now go with this, since it tends to prevent stupid terminal messages during probing (libavutil has no mechanism to selectively suppress errors specifically during probing). Ignores the "emulated" API flag (for avoiding vaapi/vdpau wrappers), but it doesn't matter that much for -copy anyway.
* video: fix memory leaks with hwdec copy modesGravatar wm42017-12-01
| | | | | | | This leaked 2 unreffed AVFrame structs (roughly 1KB) per decoded frame. Can I blame the FFmpeg API and the weird difference between freeing and unreffing an AVFrame?
* vd_lavc: move entrypoint for hwframes_refineGravatar wm42017-12-01
| | | | | | | The idea is to get rid of vd_lavc_hwdec, so special functionality like this has to go somewhere else. At this point, hwframes_refine is only needed for d3d11, and it doesn't do much, so for now the new callback has no context. In can be made more fancy if really needed.
* vd_lavc: remove process_image callbackGravatar wm42017-12-01
| | | | Now unused.
* d3d11: move code for d3d11eglrgb hackGravatar wm42017-12-01
|
* vo_gpu: hwdec: remove redundant fieldsGravatar wm42017-12-01
| | | | | | | | | | | | | The testing_only field is not referenced anymore with vaglx removed and the previous commit dropping all uses. The ra_hwdec_driver.api field became unused with the previous commit, but all hwdec interop drivers still initialized it. Since this touches highly OS-specific code, build regressions are possible (plus the previous commit might break hw decoding at runtime). At least hwdec_cuda.c still used the .api field, other than initializing it.
* vo_gpu: make it possible to load multiple hwdec interop driversGravatar wm42017-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the VO<->decoder interface capable of supporting multiple hwdec APIs at once. The main gain is that this simplifies autoprobing a lot. Before this change, it could happen that the VO loaded the "wrong" hwdec API, and the decoder was stuck with the choice (breaking hw decoding). With the change applied, the VO simply loads all available APIs, so autoprobing trickery is left entirely to the decoder. In the past, we were quite careful about not accidentally loading the wrong interop drivers. This was in part to make sure autoprobing works, but also because libva had this obnoxious bug of dumping garbage to stderr when using the API. libva was fixed, so this is not a problem anymore. The --opengl-hwdec-interop option is changed in various ways (again...), and renamed to --gpu-hwdec-interop. It does not have much use anymore, other than debugging. It's notable that the order in the hwdec interop array ra_hwdec_drivers[] still matters if multiple drivers support the same image formats, so the option can explicitly force one, if that should ever be necessary, or more likely, for debugging. One example are the ra_hwdec_d3d11egl and ra_hwdec_d3d11eglrgb drivers, which both support d3d11 input. vo_gpu now always loads the interop lazily by default, but when it does, it loads them all. vo_opengl_cb now always loads them when the GL context handle is initialized. I don't expect that this causes any problems. It's now possible to do things like changing between vdpau and nvdec decoding at runtime. This is also preparation for cleaning up vd_lavc.c hwdec autoprobing. It's another reason why hwdec_devices_request_all() does not take a hwdec type anymore.
* vo_opengl: hwdec_vaegl: Reenable vaExportSurfaceHandle()Gravatar Mark Thompson2017-11-30
| | | | It will be present from libva 2.1 (VAAPI 1.1.0 or higher).