summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* player: make --shuffle/--merge-files affect runtime loaded playlistswm42014-12-295-19/+26
| | | | | | | Until now, these options took effect only at program start. This could be confusing when e.g. doing "mpv list.m3u --shuffle". Make them always take effect when a playlist is loaded either via a playlist file, or with the "loadlist" command.
* ao_portaudio: remove this audio outputwm42014-12-297-304/+0
| | | | | It's just completely useless. We have good native support for all 3 desktop platforms, and ao_sdl or ao_openal as fallbacks.
* ao_alsa: print channel map if setting it failswm42014-12-291-1/+2
| | | | | | | | | | This message is printed when the audio device advertised a channel map, but couldn't set it - which is probably a dmix bug (we'll never know, ALSA doesn't take bug reports). Print the requested map, so that the user (maybe) can make a connection when seeing the message and the actually used channel map, which might be less confusing. Or at least less useless.
* build: fix linking with --enable-static-buildStefano Pigozzi2014-12-291-2/+2
|
* ao: add debug log with the detected channel mapsStefano Pigozzi2014-12-291-0/+6
| | | | This could be helpful with bug reports.
* chmap_sel: add multichannel fallback heuristicStefano Pigozzi2014-12-299-4/+381
| | | | | | | | | | | | Instead of just failing during channel map selection, try to select a close layout that makes most sense and upmix/downmix to that instead of failing AO initialization. The heuristic is rather simple, and uses the following steps: 1) If mono is required always prefer stereo to a multichannel upmix. 2) Search for an upmix that is an exact superset of the required channel map. 3) Search for a downmix that is the exact subset of the required channel map. 4) Search for either an upmix or downmix that is the closest (minimum difference of channels) to the required channel map.
* chmap: add a 7.1(rear) layout nameStefano Pigozzi2014-12-291-0/+1
| | | | This is common on Apple systems so it's handy to have a label for it.
* w32_common: allow window resizing with --no-borderJames Ross-Gowan2014-12-291-0/+58
|
* vo_opengl: Ignore approx-gamma for BT.2020-CLNiklas Haas2014-12-291-2/+9
| | | | | | The details of the non-linear transformation from/to BT.2020's constant luminance system don't really make sense with any other gamma curve, since changing the gamma curve completely breaks the chroma channels.
* stream_pvr: sort channel list by --tv-channels orderwm42014-12-281-2/+25
| | | | | | | | | | Apparently this is what users would expect. Going the way of least resistance (in terms of messing with this old, rarely used code), sorting them by some kind of addition timestamp (called priority in the patch) is the easiest. Fixes #1390.
* cocoa: move the gl function loader to gl_cocoa.cStefano Pigozzi2014-12-283-17/+15
|
* screenshots: set AVFrame parameterswm42014-12-281-0/+3
| | | | | | | Currently, libavcodec is rather lenient, but it might get stricter in the future. Fixes #1398.
* README: remove travis and coverity badgeswm42014-12-271-4/+0
| | | | Useless and ugly.
* manpage: document new --stream-dump behaviorwm42014-12-271-0/+3
| | | | That's probably a good idea.
* command: stip path from playlist OSD displaywm42014-12-271-2/+8
| | | | | | But only if it's not e.g. a http URL. Fixes #1388.
* stream: always make stream dumping/capturing append to output filewm42014-12-271-1/+1
| | | | Partially fixes #1393 (but not really).
* ao_coreaudio: remove useless guardStefano Pigozzi2014-12-271-6/+0
| | | | useless after 069016fd6c
* ao_coreaudio: fix some naming conventionsStefano Pigozzi2014-12-271-5/+5
|
* player: force stereo as default when encodingwm42014-12-271-0/+1
| | | | | | I think the new default for this option might be rather bad in encoding mode. For starters, we don't even know what layers an encoder supports at all.
* player: fix random crashes on uninitializationwm42014-12-271-0/+1
| | | | | | | | | | | On uninitialization, the player will unselect all subtitles, and then destroy the subtitle decoder. But it didn't correctly remove the subtitle decoder from the OSD state, so it could happen that it would access it after the decoder was destroyed. Could lead to random crashes when switching files often. Fixes #1389.
* player: cosmetics: rename a functionwm42014-12-273-7/+7
| | | | | Something which has this many important sideffects shouldn't start have a "get" prefix.
* ao_coreaudio: fix channel mappingStefano Pigozzi2014-12-271-19/+70
| | | | | | | | | | | | | | | There where 3 major errors in the previous code: 1) The kAudioDevicePropertyPreferredChannelLayout selector returns a single layout not an array. 2) The check for AudioChannelLayout allocation size was wrong (didn't account for variable sized struct). 3) Didn't query the kAudioDevicePropertyPreferredChannelsForStereo selector since I didn't know about it's existence. All of these are fixed. Might help with #1367
* ao_coreaudio: fix typoStefano Pigozzi2014-12-271-1/+1
|
* ao_coreaudio: move some code to make output readableStefano Pigozzi2014-12-271-1/+1
|
* ao_coreaudio: add more layout debug outputsStefano Pigozzi2014-12-271-19/+25
| | | Should help remote debugging #1367 with --msg-level=ao=debug
* player: ordered chapters: cosmeticswm42014-12-261-54/+32
| | | | | | Drop some meaningless comments, fix codingstyle, fix some formatting victims of the mp_msg refactoring, replace some memcpys with assignments.
* player: ordered chapters: bullshit reductionwm42014-12-261-26/+5
| | | | | Nobody cares about these redundant messages, they make the code even more complicated than it has to be, and also they're annoying.
* player: ordered chapters: filter missing chapterswm42014-12-261-0/+9
| | | | | | | | | | | | Ever since someone (not me) added some Matroska features which nobody ever uses (ordered edition or some bullshit), I haven't had a fucking clue what the fuck is going on in this fucking file. (Still agreed to it, so it's my fault.) mplayer2 handled missing chapters correctly (and I suppose in a somewhat clean/simple manner), but the changed code doesn't. Since I can't even follow this code because it's so arcanely complicated, just add a hack that has the same effect.
* command: overlay_add: more flexible treatment of offset parameterwm42014-12-262-15/+21
| | | | | | | | | | | | | | Essentially, don't make it the mmap() argument, and just add it to the memory address. This hides tricky things like alignment reequirements from the user. Strictly speaking, this is not entirely backwards compatible: this adds the regression that you can't access past 2 or 4 GB of a file on 32 bit systems anymore. But I doubt anyone cared about this. In theory, we could be clever, and just align the offset manually and pass that to mmap(). This would also be transparent to the user, but minimally more effort, so this is left as exercise to the reader.
* win32: add mmap() emulationwm42014-12-269-25/+77
| | | | | | | | Makes all of overlay_add work on windows/mingw. Since we now don't explicitly check for mmap() anymore (it's always present), this also requires us to make af_export.c compile, but I haven't tested it.
* ao_coreaudio: fix AudioChannelLayout allocationsStefano Pigozzi2014-12-261-34/+46
| | | | | | | | AudioChannelLayout uses a trailing variable sized array so we need to query CoreAudio for the size of the struct it is going to need (or the conversion of that particular layout would fail). Fixes #1366
* stream_pvr: remove redundant log prefixeswm42014-12-261-103/+82
|
* stream_pvr: increase timeout, slightly better error reportingwm42014-12-261-5/+10
| | | | | | | An attempt to find out what's wrong with issue #1382. I don't even know why a timeout would be needed; for robustness with broken devices maybe?
* manpage: lua: fix a linkwm42014-12-261-1/+1
|
* osxbundle: fix cascading config loadingStefano Pigozzi2014-12-261-0/+0
| | | | | | | | | | | | | | | | | mpv does 'cascading' configs by overriding options as the config become more important (bundle -> system level -> user level). Unfortunately mpv also loads two sets of configs files one after the other [1]. First it looks for 'config', then for 'mpv.conf'. For this reason a mpv.conf in ANY location will override ANY config files named config (even if the mpv.conf is in a system path and config in a user path). [1]: Relevant code in player/configfiles.c load_all_cfgfiles(mpctx, section, "config"); load_all_cfgfiles(mpctx, section, "mpv.conf"); Fixes: #1361
* manpage: fix typowm42014-12-251-2/+2
| | | | Fixes #1384.
* manpage: lua: fixes and improvementswm42014-12-251-20/+15
| | | | Some things were outdated, or outright wrong.
* vo_opengl: don't use 10 bit video on Intel GPUswm42014-12-242-0/+31
| | | | | | | | | | | | vo_opengl was originally written against OpenGL 3 core, and it seems GPUs/drivers supporting this are mostly sane. Later, it was made to work with OpenGL 2.1 too. Lately we removed the requirement for RG textures, and look, someone reported a problem with "lesser" Intel GPUs. This commit does the same in vo_opengl what was added to vo_opengl_old a long time ago. Fixes #1383.
* player: hack against --keep-open misbehaving with broken fileswm42014-12-241-0/+2
| | | | | | | | | | | | | | | | If a file (or a demuxer) is broken, seeking close to the end of the file doesn't work, and seek_to_last_frame() will be called over and over again, burning CPU for no reason. Observed with incomplete mp4 files. That this can happen was already mentioned in commit 090f6cfc, but I guess now I'll do something against it. hrseek_lastframe is cleared by reset_playback_state(), so it's only set if seek_to_last_frame() was called, and no other seek happened since then. If finding the last frame succeeds, no EOF will happen (unless the user unpauses, but then it will simply remain at the last frame). If it fails, then it will return immediately, without retrying.
* player: fix a typo in message outputwm42014-12-241-1/+1
| | | | This typo has been around for over a year. Oops.
* stream: always disable cache for pseudo-streamswm42014-12-242-1/+3
| | | | | Streams which don't have a full_buffer function never return any actual data. Slight improvement over commit 5640c195.
* ipc: add enable_event and disable_event commandswm42014-12-242-0/+41
| | | | This was requested.
* client API: document requirement to block SIGPIPEwm42014-12-242-1/+3
| | | | | | | | | I noticed that the IPC code does not use MSG_NOSIGNAL or SO_NOSIGPIPE. The former is "only" POSIX 2008 and also requires switching to sendto(), while the latter is even less portable. Not going to bother with this obsolete 80ies crap, just block SIGPIPE, and instruct client API users to do the same.
* ipc: report some user errors betterwm42014-12-241-2/+5
| | | | | | | | | | | | | | | Using the IPC with a program, it's not often obvious that a newline must be sent to terminate a command. Print a warning if the connection is closed while there is still uninterpreted data in the buffer. Print the OS reported error if reading/writing the socket fails. Print an erro if JSON parsing fails. I considered silencing write errors if the write end is closed (EPIPE), because a client might send a bunch of commands, and then close the socket without wanting to read the reply. But then, mpv disconnects without reading further commands that might still be buffered, so it's probably a good idea to always print the error.
* stream_edl: disable cachingwm42014-12-231-0/+1
| | | | | | | | | | | stream_edl merely makes demux_edl act "special", which checks for the stream type explicitly and then does something with its URL. If a cache is added before the stream, it'll try to use the cache's URL (i.e. an empty string), and will then obviously fail to parse the URL. While this is slightly stupid, just disabling the entirely useless cache is the most effective solution. Fixes #1378.
* vo_opengl_cb: use VAOs even in OpenGL 2.1wm42014-12-231-5/+15
| | | | | | | | Using them reduces state change, since now at least vo_opengl_cb has to setup/break the vertex array bindings on every frame if no VAOs are available. This reverts the VAO related change in commit f64665e7.
* vo_opengl_cb: always setup/break vertex array bindingswm42014-12-231-3/+13
| | | | | | | | | | | Originally, this code was written to have full control over the OpenGL state, rather than having to cooperate with unknown components by being embeded like vo_opengl_cb is meant to be. As a consequence, it was thought to be ok to setup a global binding (if the context is below OpenGL 3.0, which guarantees VAOs). This could break badly. Fix it by setting up and breaking the bindings on entry/exit.
* ao_alsa: fix unpause path atfer previous commitwm42014-12-231-0/+2
| | | | The resume code was accidentally fully removed from this code path.
* ao_alsa: fix resuming from suspend modewm42014-12-231-4/+12
| | | | | | | | | | | snd_pcm_prepare() was not always called, which could result in an infinite loop. Whether snd_pcm_prepare() was actually called depended on whether the device was a hw device (or other characteristics; depending on snd_pcm_hw_params_can_pause()), and required real suspend (annoying for testing), so it was somewhat tricky to reproduce without knowing these things.
* vo_opengl: fix build on OSXwm42014-12-231-0/+6
| | | | Missing modern OpenGL symbols again.
* demux_mkv: use attachment filename as coverart titlewm42014-12-231-0/+1
|
* vo_opengl: don't allow setting 3D LUT if unsupportedwm42014-12-231-1/+5
| | | | | The code was always uploading the 3D LUT (even of unused), as long as vo_opengl was setting a icc-profile. This could crash with GLES 2.
* vo_opengl: make use of newer OpenGL logging APIwm42014-12-235-2/+58
| | | | | | GL_ARB_debug_output provides a logging callback, which can be used to diagnose problems etc. in case the driver supports it. It's enabled only if the vo_opengl "debug" suboption is set.
* demux_mf: add probing by mime typewm42014-12-221-1/+5
| | | | Reuses the mime type table introduced in the previous commit.
* demux_mkv: support embedded coverartwm42014-12-223-1/+34
| | | | | | | | | | | The code could as well be in demux.c, but it's better to avoid accidental clashes with demux_lavf.c. FFmpeg provides no way yet to map a mime type to a codec, so do it manually. (It _can_ map a mime type to an "input format", but not a codec.) Fixes #1374.
* vo_opengl_cb: parse renderer parameterswm42014-12-221-5/+10
| | | | | | Now it accepts the same renderer arguments as vo_opengl. This also disables debug checks by default, and reverts the background color override. Both can now be controlled by the host application.
* vo_opengl, vo_opengl_cb: check GL version in rendererwm42014-12-223-5/+9
| | | | | | vo_opengl actually checks this in the context creation code already, but it still increases robustness in case the requirements are changed later.
* client API: fix compiler warning if openglcb API is disabledwm42014-12-221-1/+0
| | | | | The function is void, and of course you can't return anything from it. (Why does C or gcc even allow this?)
* vo_opengl_cb: free context on exitwm42014-12-222-0/+11
| | | | | | | Minor memory leak. Actually, this also exposes some problems in the QtQuick example. This will have to be fixed in the example.
* vo_opengl: fix feature detectionwm42014-12-221-1/+1
| | | | Fixes #1373.
* client API: fix mpv_wakeup()wm42014-12-221-2/+2
| | | | | | Of course this was going to get stuck in the retry loop. Fixes #1372.
* sd_lavc: ignore image subtitles with unknown duration after 1 minutewm42014-12-221-0/+3
| | | | | | | | Most image subtitle formats implicitly terminate the current subtitle event with the next event (e.g. a new packet read from the demuxer will instruct the subtitle render to stop display). If the subtitle event is just trailing, it will be displayed forever. So there's no proper way of doing this and we just apply an heuristic to avoid annoyances.
* sd_lavc: compensate for a stupid libavcodec API issuewm42014-12-211-1/+4
| | | | | | | | | The libavcodec PGS decoder sets end_display_time to UINT32_MAX, in an attempt to signal unknown end time (the API does not allow to signal this properly, and this was a backwards compatible hack). While we have no issues with the large value, our code wants to distinguish between known and unknown end time explicitly.
* sub: reset sub decoder correctly when cycling subtitleswm42014-12-211-3/+1
| | | | | | | | | | reset_subtitles() works in mpctx->d_sub[], which is set to NULL before calling it from uninit_sub(). This fixes resetting the subtitle when cycling subtitle tracks. Actually, this was probably a feature, because it's annoying if subtitles don't show up when cycling them. But it also can have unintended consequences, so get rid of it.
* player: cosmetics: move code aroundwm42014-12-212-16/+15
| | | | Separate commit to reduce noise in the following one.
* old-configure: fix disabling VAAPI GLX with --disable-glwm42014-12-211-5/+4
| | | | waf handles this correctly.
* vo_opengl: improve fallback handling with GLESwm42014-12-214-16/+30
| | | | | | | | | Whether we have texture_rg doesn't matter much anymore; the scaler should be fine with this. But on ES 2.0, 1st class arrays are missing, so even if filterable float textures should be available, it won't work. Dithering (at least the "fruit" variant) will not work either, because it uses floats.
* vo_opengl: silence an INVALID_ENUM error with GLES2James Ross-Gowan2014-12-211-1/+2
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: GLES does not support GL_BGRAwm42014-12-203-5/+5
| | | | | | | | | | | | | Apparently GLES 2 and 3 do not support this. (The implementations I tested with were derived from desktop OpenGL and were not overly strict with this.) This is no problem; just use GL_RGBA and mangle the channels in the shader. Also disable direct support for image formats like IMGFMT_RGB555 with GLES; at least some of them are not supported in this form, and the formats aren't important anyway.
* vo_opengl_old: fix OSD regressionwm42014-12-204-7/+16
| | | | | | | | | | | | | | | | | Commit 0e8fbdbd removed the rg_texture requirement from vo_opengl; commit 541f6731