Commit Graph

37449 Commits

Author SHA1 Message Date
Nyx0uf 0f8558a723 cocoa: allow to drag and drop URLs
This commit also improves the visual feedback to the user by showing a plus
icon in the mouse cursor when dragging supported types.

Fixes #469
2014-01-10 10:48:54 +01:00
wm4 b6907a7bb5 demux_lavf: add hack for MicroDVD for assuming frame based timing
MicroDVD files _can_ contain real timestamps instead of frame timestamps
if they declare a FPS. But this seems to be rare, so ignore that if the
FPS happens to match with the libavformat microdvd parser's default FPS.

This might actually break files that declare 23.976 FPS, but the video
file is not 23.976 FPS, but the chance that this happens is probably
very low, and the commit fixes the more common breakage with 25 FPS
video.
2014-01-10 00:02:06 +01:00
wm4 cf02369aaf sub: fix frame based subtitle timestamp handling
Subtitle formats with frame based timing require using the video FPS to
compute proper subtitle timestamps. But it looks like the calculation to
do that was inversed.
2014-01-09 23:04:38 +01:00
wm4 09bf69afdb options: don't reset pause mode when switching to next file
This basically reverts the default as set by commit 812798c5. This seems
to be a matter of taste, but personally I think keeping the pause
setting is better.
2014-01-09 21:23:19 +01:00
wm4 72743ef6fe command: don't access VO for output parameters
Use the video chain for this instead. This is for facilitating coming
changes, which will clean up the vo->aspdat stuff, and this code would
be in the way.
2014-01-09 21:19:19 +01:00
Alexander Preisinger c555b2ae55 wayland: properly empty output list 2014-01-08 22:16:41 +01:00
Alexander Preisinger 525c7f1add wayland/shm: don't crash if initialization failed 2014-01-08 22:15:40 +01:00
wm4 34abe7e255 wayland: fix crash when initialization fails
On X11, if no wayland compositor is running, wl_list_init() will never
be called. This will cause destroy_display() to segfault when trying to
iterate over the list.
2014-01-08 21:49:18 +01:00
wm4 1d2a111337 player: strip 'file://' from filenames on playback start
This fixes two things:

1. Dropping files on the VO window will auto-load subtitles (since most
   drag & drop code prefixes the filenames with 'file://', and the
   subtitle auto-load code considers 'file://' non-local)
2. Fix behavior of the %x screenshot filename template (similar problem)

One could force all that code to special-case 'file://' URLs, but just
replacing the filename on playback start is simpler.
2014-01-08 21:46:42 +01:00
wm4 59c6fa2201 screenshot: add format specifiers to get file directory path
Useful if you want to put the screenshot into the same directory as the
file that is being played.
2014-01-08 21:09:01 +01:00
Alexander Preisinger 3e6fdc94d6 wayland/shm: tone down warnings
Those warnings are printed far too often and actually aren't usefull at all.
2014-01-08 21:03:57 +01:00
Alexander Preisinger 4b10255008 wayland: fix memory leaks
There are still some leaks from wayland-cursor stuff, but there is no way to
free the memory as user of the cursor library.
2014-01-08 20:59:40 +01:00
wm4 0b1ba0bf64 player: fix setting smaller timeout on Windows systems
On Windows, we don't have proper input event wakeup handling, so we
need to lower the playloop timeout in order to react fast to input.

Closes #387.
2014-01-08 19:16:30 +01:00
Martin Herkt cbc344236c waf: do not use TaskGen for PDF build rule
No longer necessary.
2014-01-08 16:46:31 +01:00
Alexander Preisinger 61e5670684 wayland: cleanup registry_handle_global
The wl_registry object is already passed as a parameter. No need to create
a temporary variable.
2014-01-08 16:23:19 +01:00
Alexander Preisinger 74d9504b65 wayland: remove set_user_data from seat_listener
The user_data is passed on add_listener and can later be changed with
set_user_data. But because we don't want to change it later and because it is
the same object remove the set_user_data call.

This might be a copy&paste leftover from the initial draft for the wayland
backend.
2014-01-08 16:23:19 +01:00
Alexander Preisinger fa5f1e7800 wayland: use static consistently
Declare everything that is only needed inside wayland_common.c as static.
2014-01-08 16:23:11 +01:00
Martin Herkt c2fe43361f Switch PDF manual generation to rst2pdf
This finally gets rid of the LaTeX dependency.

We should actually be using docultils directly here, but I didn't
do this because of all the potential Python 2/3 breakage.
2014-01-08 16:00:40 +01:00
wm4 49646f10f0 terminal: don't initialize termcap etc. if stdout is not a terminal
Otherwise, it seems one of the term* libraries will write escape
sequences to stdout, for whatever reason.
2014-01-07 23:57:46 +01:00
wm4 e0d7876eca ao_pulse: lower default buffer size from 1000ms to 250ms
1000ms is a bit insane. It makes behavior on playback speed changes
worse (because the player has to catch up the dropped audio due to
audio-chain reset), and perhaps makes seeking slower.

Note that the problem of playback speed changes misbehaving will be
fixed in the future, but even then we don't want to have a buffer that
large.
2014-01-07 23:52:18 +01:00
wm4 a220a3aae6 ao_pulse: add suboption to control buffer size 2014-01-07 23:50:22 +01:00
Alexander Preisinger 374f40de30 wayland: fix fullscreen & resizing for good
I added enough logic to never set ontop or fullscreen twitce.
This commit keeps also the size of the video if multiple videos are played.
If the ratio differs the width will be kept at the same size and only the
height changes.
2014-01-07 21:12:24 +01:00
wm4 bde15f3301 manpage: mention how to get a list of codecs for use with --hwdec-codecs 2014-01-07 17:14:05 +01:00
wm4 2c4c912c15 wayland: silence annoying libwayland-client message
libwayland-client contains the following code [1]:

	runtime_dir = getenv("XDG_RUNTIME_DIR");
	if (!runtime_dir) {
		fprintf(stderr,
			"error: XDG_RUNTIME_DIR not set in the environment.\n");

This means this message will unconditionally and unavoidably be printed
if XDG_RUNTIME_DIR is not set. Since mpv is a terminal program, and we
want to avoid unnecessary output, work it around by not attempting to
use wayland if this environment variable is not set.

[1] http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client.c#n636
    (cd0dccd01e16fa404e03974d30ded3aebdb1c4bc)
2014-01-07 01:07:52 +01:00
wm4 326d887a41 wayland: fix some memory leaks on initialization failure
This commonly happens when initializing vo_opengl on a X11-only system.

Unfortunately, most wl_*_destroy() functions appear not to accept NULL
pointers, making partial deinitialization a pain: you have to add your
own NULL checks everywhere to avoid crashes.

xkb.context is uninitialized separately, because you can initialize it
just fine, even if the rest of input initialization fails.
2014-01-07 01:07:50 +01:00
wm4 cf6f1106ea demux_lavf: fix minor memory leak 2014-01-07 01:07:46 +01:00
wm4 98ffa7c476 audio: fix previous commit 2014-01-06 18:51:02 +01:00
Martin Herkt cd53de958d Fix audio delay inversion 2014-01-06 18:40:31 +01:00
wm4 936a204e27 sub: fix previous commit
sub_seek and sub_step were broken.
2014-01-06 17:38:10 +01:00
Martin Herkt e62c917abf Fix subtitle delay inversion 2014-01-06 17:09:31 +01:00
Martin Herkt df116958df w32_common: reformat yet again
I've been told mpv prefers switch/case on the same indent level.
Sorry about the noise :P
2014-01-06 15:37:21 +01:00
Stefano Pigozzi 48e3344f84 cocoa: don't reset window size when the video size doesn't change
Fixes #459
2014-01-06 14:19:04 +01:00
Martin Herkt 1fdc7e6c37 w32_common: don't force topmost on fullscreen
Fixes #457, #444.
2014-01-06 14:12:08 +01:00
Martin Herkt a857aa8828 Windows: use roaming AppData instead of local
Whatever. Fixes #458.
2014-01-06 13:44:48 +01:00
Martin Herkt 7d8cdc810c win32-console-wrapper: use child process exit code 2014-01-06 13:31:15 +01:00
Martin Herkt c849f1aa23 win32-console-wrapper: remove command line mangling
This wasn't really necessary and caused a lot of problems.
2014-01-06 13:18:02 +01:00
Martin Herkt 8bfb20acdc w32_common: reformat slightly
This really needs more whitespace.
2014-01-06 12:26:42 +01:00
xnoreq 43aafc61b0 w32_common: use OLE DnD for text/uri-list support
Signed-off-by: Martin Herkt <lachs0r@srsfckn.biz>
2014-01-06 12:26:28 +01:00
Martin Herkt 995d1c4d98 win32-console-wrapper: Fix heap corruption
FUCK the Windows API.
2014-01-06 11:09:08 +01:00
wm4 917374a7bf build: don't depend on both libavresample and libswresample
When both libavresample and libswresample were detected, the script
enabled both at the same time. This is not supported; although nothing
bad happened apparently. Make the dependencies both mutually exclusive.
2014-01-05 23:27:14 +01:00
Andre D 7c425fb71f quvi: add option to not fetch subtitles
Signed-off-by: wm4 <wm4@nowhere>
2014-01-05 23:07:34 +01:00
wm4 5819f4b7c9 player: always ise [statusline] for terminal OSD
This was inconsistent: the actual statusline used [statusline] as
message prefix, while other parts of the terminal OSD used [cplayer]
(and MSGL_STATUS). This commit makes it consistent.
2014-01-05 20:15:19 +01:00
wm4 2123ca52c9 player: print an error message if run command fails
Note that we can't use mp_msg, because it's not async-signal safe (we
might be running other threads while forking, so only functions
specified to be async-signal safe can be called, and this doesn't
include stdio; mp_msg acquires a mutex too).

Also, always print a \n before running the program to flush the status
line. The effect is that a program running successfully as well as the
error message will effectively start on a new line.
2014-01-05 20:11:01 +01:00
wm4 2da916f6df manpage: fix typo 2014-01-05 19:28:45 +01:00
wm4 365cc79d94 player: don't select subtitles added from quvi by default
Quvi subtitles are considered external subtitles (simply because they're
separate from the audio/video stream), but for the sake of subtitle
auto-selection, they should not be considered external.

Change this so that quvi subtitles are treated like muxed subtitles
(with default flag never set). This means subtitles won't be selected by
default, unless explicitly requested with --sid or --slang.
2014-01-05 16:15:30 +01:00
Alexander Preisinger 8a130e08e2 Revert "wayland/egl: use redraw callback"
Because of this commit there were problems displaying the frmase in their right
order.

This reverts commit 96e75d234a.

Conflicts:
	video/out/gl_wayland.c
	video/out/wayland_common.h
2014-01-04 21:18:46 +01:00
Alexander Preisinger 68e179bcf0 wayland: remove workaround
The changes in the vo_wayland_ontop function have no effect on the workaround.

Somehow the problem just disappeared. I guess it is because of the new control
function in gl_wayland.c where the resize happens immediatly after the event
dispatch/flush.
2014-01-04 20:54:51 +01:00
Alexander Preisinger 148918dd53 wayland: fix obvious bug in dnd code
I still don't think this is the right approach.
2014-01-04 20:28:52 +01:00
wm4 5d57a338ce input: change mp_input_run_cmd signature
I don't like this function at all, but it's basically a trick to get the
input's mp_log instance in a case the mp_input_parse_cmd_strv() is
almost certainly not going to output anything. But still make it
somewhat more consistent with mp_input_parse_cmd_strv() - why force the
caller to always use MP_ON_OSD_AUTO?
2014-01-04 19:42:16 +01:00
wm4 7c6bb321eb video/out: remove some code duplication between X11 and wayland
Both X11 and Wayland support the same format for drag & drop operations
(text/uri-list), and the code for that was copied from x11_common.c to
wayland_common.c. Factor it out.
2014-01-04 19:33:40 +01:00