Commit Graph

36994 Commits

Author SHA1 Message Date
Stefano Pigozzi fc583e74ec build: disable SDL by default
old-configure already behaves like this. Adapt wscript to the same default.
2013-12-29 14:14:09 +01:00
wm4 fd4e3af740 Install encoding-profiles.conf by default
This is probably useful.

Note that this includes a small, stupid hack to prevent loading of the
config file if vf_lavfi is not available. The profile by default uses
vf_lavfi, and the config parser will output errors if vf_lavfi is not
available.

As another caveat, we install the example profile even if encoding is
disabled (though we don't load it, since this would print errors).
2013-12-28 16:33:21 +01:00
wm4 a473739fbf player: fix buggy error condition when loading mpv.conf 2013-12-28 15:46:07 +01:00
ahodesuka 62be13b019 vo/x11_common: do not select motion events when --no-mouse-movements is set 2013-12-28 15:07:01 +01:00
wm4 4b695e7972 input: print an error if reading input.conf fails
stream_read_complete() fails if the file is larger than the requested
maximum size. But input.c didn't check for this case, and no indication
that something went wrong was printed.
2013-12-28 15:06:43 +01:00
wm4 f146e9b15a Revert "x11: don't set global error handler"
This reverts commit 877303aaa9.

The OpenGL 2.1 fallback for vo_opengl didn't work. Two things come
together: 1. trying to create an OpenGL 3.0 context will fail with
a GLXBadFBConfig error, and 2. X errors are fatal by default. Since
the reverted commit removed the X error handler, the mpv process was
killed, instead of continuing for the fallback.

(Note that this commit is not an exact inverse commit, since mp_msg
changed, but it does about the same thing.)
2013-12-27 23:22:46 +01:00
wm4 3e562583e5 demux_mkv: handle TrueHD properly
Apparently, Matroska packs TrueHD packets in a way lavc doesn't expect.
This broke decoding of some files [1] completely. A short look at the
libavcodec parser shows that parsing this ourselves would probably be
too much work, so make use of the libavcodec parser API.

[1] http://www.cccp-project.net/beta/test_files/mzero_truehd_sample.mkv
2013-12-27 20:00:24 +01:00
Stefano Pigozzi b205e63cdc Revert "cocoa: unlock on uninit"
Not sure why but this doesn't seem to be needed anymore.

This reverts commit 6ead6aa005.
2013-12-26 22:26:41 +01:00
Stefano Pigozzi 2e8b6419bd corevideo: fix video initialization when not using VDA
query_format was setting state even if wasn't the correct thing to do. Somehow
it worked by pure luck (until commit e6e6b88b6d).

Fix the initialization by setting state inside of reconfig.
2013-12-26 22:11:49 +01:00
Stefano Pigozzi c7f9c060e4 build: fix shm detection on OpenBSD
Fixes #427
2013-12-26 21:13:10 +01:00
Stefano Pigozzi dbf879be14 build: support multiple headers in check_statement
This feature will be used in the next commit.
2013-12-26 21:13:01 +01:00
Sven-Hendrik Haase 1cbb32cca2 mpv.desktop: add KDE file handlers
Currently KDE will copy a media file into a temporary folder instead of
trying to stream it if a KIO slave location file is started. This change
will tell KDE to make mpv try to directly play the file. Perhaps the
proper flags should be added according to the individual enabled
features of the build but I suggest that be for the future.

Signed-off-by: wm4 <wm4@nowhere>
2013-12-26 21:06:43 +01:00
wm4 dacb6ad98f options: simplify handling of some help options 2013-12-26 19:25:51 +01:00
wm4 4ea8612b40 input: cosmetics: move code around
Rearrange the code in an attempt to make its organization more logical.
2013-12-26 17:41:28 +01:00
wm4 34bee16faf input: split off some code from input.c to separate files
This is mostly just moving code around.
2013-12-26 17:13:25 +01:00
Stefano Pigozzi 652895abdc build: hide duplicate options from `--help`
Hide --enable variants from [autodetect]'ed options and --enable/--disable
variants for [enable]'d/[disable]'d options. The hidden options are still
usable, just hidden for more readability.
2013-12-26 10:09:17 +01:00
Stefano Pigozzi a410a750c7 cocoa: sanitize window title string and guard against NULL
If the utf8 string used to create the NSString for title was invalid utf8,
-stringWithUTF8String returned nil and triggered an assertion in Cocoa's
framework code.

Sanitize the utf8 string and if the sanitation wasn't enough just avoid
crashing by not setting a title.

Fixes #406
2013-12-25 18:13:09 +01:00
Stefano Pigozzi 7d553a4c26 vo_x11/vo_xv: fix build when using --disable-xext 2013-12-25 17:07:51 +01:00
wm4 f691d8f7b6 player: deselect secondary sub when switching to file with different tracks
This applies the usual logic of resetting stream selections to default
when switching to a file with a different track layout. (This is to
prevent selecting random streams.)
2013-12-25 11:32:33 +01:00
wm4 f751609450 player: fix initial selection with --secondary-sid
Also, make sure that a track can't be selected twice. While this might
work in some situations, it certainly won't work with subtitles demuxed
from a stream.

Fixes #425.
2013-12-25 11:32:29 +01:00
wm4 3720b3f17d player: add --secondary-sid for displaying a second subtitle stream
This is relatively hacky, but it's Christmas, so it's ok. This does two
things: 1. allow selecting two subtitle tracks, and 2. include a hack
that renders the second subtitle always as toptitle. See manpage
additions how to use this.
2013-12-24 17:46:14 +01:00
wm4 9292f537d6 player: add infrastructure to select multiple tracks at once
Of course this does not allow decoding multiple tracks at once; it just
adds some minor infrastructure, which could be used to achieve this.
2013-12-24 17:46:08 +01:00
wm4 2b87415f6f player: do initial seek for external tracks only once
Normally, there can be only one demuxer stream active for each demuxer
of an external file, but this assumption will be broken for multiple
subtitles support.
2013-12-24 17:45:06 +01:00
wm4 1d86134ec1 player: slightly simplify seeking in external files
For some reason, this checked whether there are external tracks at all
before doing any seeks. Possibly this was to avoid multiple
get_main_demux_pts() calls, but calling this multiple times shouldn't be
too bad.
2013-12-24 17:45:06 +01:00
wm4 b796f2bb76 player: redo demuxer stream selection
Use struct track to decide what stream to select.

Add a "selected" field and use that in some places instead of
checking mpctx->current_track.
2013-12-24 17:44:34 +01:00
wm4 96e6f3f4b6 audio: fix format ID conversion
AV_SAMPLE_FMT_NONE != 0, could apparently cause crashes in certain
situations.
2013-12-23 21:24:41 +01:00
wm4 0656134179 changes.rst: add entry for dvdnav menu 2013-12-23 20:09:50 +01:00
wm4 28c28d082a manpage: mention video-unscaled property 2013-12-23 17:57:23 +01:00
wm4 b59f2c99e7 player: fix typo in previous commit
Apparently I pushed too quickly.
2013-12-23 17:33:07 +01:00
wm4 d259d88af8 player: warn if Matroska font attachments have incorrect MIME type
Normally we shouldn't load these files. But for some reason it was added
in commit b784346e some years ago, and disabling this hack would
probably be an inconvenience. So just print a warning.
2013-12-23 17:31:42 +01:00
wm4 fd081c467d options: print any options set in verbose mode
So we will know whether someone uses broken config file options when
posting a log with -v.
2013-12-23 17:30:19 +01:00
wm4 9fb0441b16 options: disable joystick by default 2013-12-23 11:35:37 +01:00
wm4 6565ec8b41 vaapi: fix initialization error code path
"res" can be uninitialized in the error case.
2013-12-23 11:22:12 +01:00
wm4 7ef8d38769 subreader: replace some strcpy calls 2013-12-22 23:44:34 +01:00
wm4 90e4c85891 subreader: remove overlapping strcpy
Looks like this relied on undefined behavior.
2013-12-22 23:44:24 +01:00
wm4 aefb100e68 asxparser: remove commented code 2013-12-22 23:43:09 +01:00
wm4 a2bc1c28a5 stream_smb: remove dead code
Yep, smb_username/password were unused since forever, even in MPlayer.
Removal untested. (Does anyone even use smb://?)
2013-12-22 23:42:58 +01:00
wm4 88fd763e18 player: simplify mp_load_per_file_config
Get rid of the stupid and error-prone buffer size calculations, use
snprintf instead of strcpy.
2013-12-22 23:25:10 +01:00
wm4 ffcf4ece6e player: move code around
The only thing that used mp_load_per_file_config() was inside
configfiles.c too, so remove the declaration from core.h and move the
function before its use.
2013-12-22 23:25:10 +01:00
wm4 2e1c423dff player: remove code duplication for auto-loaded config profiles
Code for loading "[vo.vdpau]" profiles and similar. The messages printed
on loading change, but other than that, everything should behave about
the same.
2013-12-22 23:25:10 +01:00
wm4 2de2b60222 path: add function to split URL into prefix and path
Used in the following commit.
2013-12-22 23:25:10 +01:00
wm4 8c0675b7d0 path: don't accept empty protocol as valid
mp_is_url("://") returned true.
2013-12-22 23:25:10 +01:00
wm4 3782fa20ed path: change mp_splitext() semantics
Including the "." in the returned extension was too inconvenient. I
think originally, the semantics were supposed to work like in Python,
but screw this.

Also, return NULL instead of "" on failure (which is what its only user
actually seems to expect).
2013-12-22 23:25:08 +01:00
Miro Hrončok c31ce789c5 stream_radio: suppress error with -Werror=format-security compilation flag
Signed-off-by: wm4 <wm4@nowhere>
2013-12-22 21:00:15 +01:00
wm4 79b09592c8 vo_vdpau: fix unintended truncation of 64 bit timestamps to 32 bit
How embarrassing...

This code is inactive for all VOs other than vo_vdpau. For vo_vdpau,
this caused various issues, such as stuttering after about an hour of
running mpv; see github issue #403.
2013-12-22 18:42:19 +01:00
wm4 895932aa0a vo_vdpau: add some debugging messages for frame timing
Note that this will print a difference even with perfect sync, because
the code queues the frames _between_ vsync, probably for error margin
(though I don't understand why it uses the exact values chosen).
2013-12-22 15:49:02 +01:00
wm4 e6bea0ec5a Don't include version.h from make options.c
I find this annoying. It's the reason common/version.c exists at all.

options.c did this for the user agent, which contains the version
number. Because not including version.h means you can't build the user
agent and use it in mp_default_opts anymore, do something rather awkward
in main.c to initialize the default user agent.
2013-12-22 14:35:45 +01:00
wm4 8b7048b7d5 stream: minor cookie cleanup
Avoid global state (reload cookie file every time), actually free
loaded cookies, use mp_get_user_path() for cookie file.
2013-12-22 13:29:16 +01:00
wm4 3a637d411f options: move network related options to MPOpts 2013-12-22 13:11:22 +01:00
wm4 38be9d5fed msg: add some comments about thread-safety 2013-12-22 12:29:50 +01:00