Commit Graph

38 Commits

Author SHA1 Message Date
wm4 9c5cbbf5d7 vo_drm: remove 2 redundant include statements
They're already pulled in by drm_common.h.
2017-01-09 16:23:27 +01:00
wm4 854651f4f5 drm: include <poll.h> instead of <sys/poll.h>
I'm not sure what systems have <sys/poll.h> (maybe there are historical
reasons why some would), but POSIX defines <poll.h>. Although this code
is full of highly OS specific calls (like ioctl()), there's no reason
not to use the more standard include path.
2017-01-09 16:21:28 +01:00
wm4 1a2319f3e4 options: remove deprecated sub-option handling for --vo and --ao
Long planned. Leads to some sanity.

There still are some rather gross things. Especially g_groups is ugly,
and a hack that can hopefully be removed. (There is a plan for it, but
whether it's implemented depends on how much energy is left.)
2016-11-25 21:17:25 +01:00
rr- 403f489f6c vo_drm: change CLI options + refactors
- Change connector selection to accept human readable names (such as
  eDP-1, HDMI-A-2) rather than arbitrary numbers.
- Change GPU selection to accept GPU number rather than device paths.
- Merge connector and GPU selection into one --drm-connector.
- Add support for --drm-connector=help.
- Add support for --drm-* in EGL backend.
- Refactor KMS; reduce state sharing across drm_common.
2016-10-07 00:22:23 +02:00
rr- ea1b183f4c vo_drm: fix segfault when using invalid card 2016-10-06 20:09:37 +02:00
rr- 1648ff8a0f vo_drm: refactor getting display fps
Reduces code duplication between OpenGL backend and DRM VO.

(The control() for OpenGL backend isn't sufficiently similar to the
VO's control() to consider merging it as a whole - I extracted only the
FPS code.)
2016-10-04 13:23:11 +02:00
rr- 0fe3e9ca5e vo_drm: provide display fps 2016-09-26 19:26:31 +02:00
wm4 7177ef3e1c vo: remove unused VOCTRL_GET_PANSCAN
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.
2016-09-08 18:59:21 +02:00
wm4 69283bc0f8 options: deprecate suboptions for the remaining AO/VOs 2016-09-05 21:26:39 +02:00
wm4 bd9c0a10e5 vo_opengl: allow backends to provide callbacks for custom event loops
Until now, this has been either handled over vo.event_fd (which should
go away), or by putting event handling on a separate thread. The
backends which do the latter do it for a reason and won't need this, but
X11 and Wayland will, in order to get rid of event_fd.
2016-07-20 20:42:30 +02:00
wm4 e4ec0f42e4 Change GPL/LGPL dual-licensed files to LGPL
Do this to make the license situation less confusing.

This change should be of no consequence, since LGPL is compatible with
GPL anyway, and making it LGPL-only does not restrict the use with GPL
code.

Additionally, the wording implies that this is allowed, and that we can
just remove the GPL part.
2016-01-19 18:36:34 +01:00
wm4 0a0bb9059f video: switch from using display aspect to sample aspect
MPlayer traditionally always used the display aspect ratio, e.g. 16:9,
while FFmpeg uses the sample (aka pixel) aspect ratio.

Both have a bunch of advantages and disadvantages. Actually, it seems
using sample aspect ratio is generally nicer. The main reason for the
change is making mpv closer to how FFmpeg works in order to make life
easier. It's also nice that everything uses integer fractions instead
of floats now (except --video-aspect option/property).

Note that there is at least 1 user-visible change: vf_dsize now does
not set the display size, only the display aspect ratio. This is
because the image_params d_w/d_h fields did not just set the display
aspect, but also the size (except in encoding mode).
2015-12-19 20:45:36 +01:00
rr- 03013e0fd7 vo_drm: relicense to LGPL
Also removed authorship information (as per convention seen in other
files)
2015-11-08 15:00:15 +01:00
rr- 62f261a7b8 vo_drm: use bool rather than integer return values
Since the errors weren't used for anything other than simple
success/fail checks, I simplified things a bit.
2015-11-08 15:00:15 +01:00
rr- 67caea357c vo_drm: move initialization to drm_common
Makes KMS initialization procedures reusable so that they can be used by
the upcoming DRM EGL adapter.
2015-11-08 14:58:34 +01:00
Paul B Mahol 532f05b83d vo_drm: show osd in audio only mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-29 12:59:13 +01:00
wm4 291f301c10 video/out: remove an unused parameter
This parameter has been unused for years (the last flag was removed in
commit d658b115). Get rid of it.

This affects the general VO API, as well as the vo_opengl backend API,
so it touches a lot of files.

The VOFLAGs are still used to control OpenGL context creation, so move
them to the OpenGL backend code.
2015-10-03 18:20:16 +02:00
rr- 745cc7a8cd vo_drm: make VT switching non mandatory 2015-06-28 17:11:51 +02:00
Marcin Kurczewski 8d6c22def4 vo_drm: fixed crashes with --profile=pseudo-gui 2015-06-13 16:18:11 +02:00
Marcin Kurczewski 20bc56b22d vo_drm: fix not using BUF_COUNT 2015-05-29 18:42:20 +02:00
Marcin Kurczewski 4763718728 vo_drm: fix centering with regard to stride 2015-05-29 18:42:04 +02:00
Marcin Kurczewski ce0bf9692f vo_drm: Expose mode ID option to users 2015-05-28 21:51:49 +02:00
Marcin Kurczewski eea625736f vo_drm: Fix resolution not restored after exiting 2015-05-28 21:51:49 +02:00
Marcin Kurczewski 5a1ef9d8db vo_drm: Fix stride problem for certain devices 2015-05-28 21:51:48 +02:00
wm4 5631060569 vo_drm: allow changing video rectangle settings
Now among other things panscan can be changed during playback.

Unfortunately, it flickers. The issue is that reconfig() clears the
framebuffer. Removing the clearing shows that the "unused" parts of
the picture are not cleared - even though OSD could render there. As
such, this is a separate issue.
2015-05-08 22:38:42 +02:00
wm4 859ddc9906 vo_drm: don't mutate the current frame when clamping for panscan
When running with --panscan=1, this could crash - because the current
frame was reduced in size each time the image was redrawn, which would
result in a failed assertion the second time it's drawn.
2015-05-08 22:36:04 +02:00
akemi-san 1e2e504349 vo_drm: zero screen buffers in reconfig function. 2015-04-27 09:22:10 +02:00
Marcin Kurczewski 5f21a68ce9 vo_drm: add window screenshots support 2015-04-26 20:09:26 +02:00
Marcin Kurczewski 445527d45c vo_drm: fix return value for void function 2015-04-21 12:04:35 +02:00
Marcin Kurczewski dedb15a429 vo_drm: fix coding style to adhere to guidelines 2015-04-21 11:54:14 +02:00
Marcin Kurczewski 7f29172baf vo_drm: fix releasing VT if received signal twice
If user switched terminals frantically, mpv could get SIGUSR1 twice in a
row, which, up until now, resulted in destroying CRTC twice. This caused
it to segfault. After this fix, double SIGUSR1 should be ignored.
2015-04-21 11:45:55 +02:00
Marcin Kurczewski a7cf35c1ca vo_drm: add vertical sync 2015-04-21 11:45:53 +02:00
Marcin Kurczewski 34d5b73fbb vo_drm: extract vt_switcher to drm_common 2015-04-19 21:18:15 +02:00
Marcin Kurczewski bd5d047c89 vo_drm: disable VT switcher for non-Linux systems 2015-04-19 21:18:12 +02:00
Marcin Kurczewski c96404d824 vo_drm: fix logging problems with connectors
Logging was meant to be silenced only when user uses connector
auto-detection feature. If user supplies connector ID manually, he
should see exact reason why connecting to this specific connector
failed.
2015-04-18 21:20:45 +02:00
Marcin Kurczewski 3313eba1bf vo_drm: fix VT behavior with auxiliary screens
Fixes #1828
2015-04-18 21:20:42 +02:00
Marcin Kurczewski f3c8c613ba vo_drm: fix VT switching
Fixes #1827
2015-04-18 20:53:17 +02:00
Marcin Kurczewski 7ee18376a9 vo_drm: add KMS/DRM renderer support
Signed-off-by: wm4 <wm4@nowhere>
2015-04-16 21:07:25 +02:00