summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* audio: minor cosmeticswm42015-05-051-16/+16
| | | | | These ( ) were probably not removed when the format constants were changed from defines to an enum.
* ao_coreaudio: move channel mapping code to a separate filewm42015-05-054-255/+298
| | | | | | | | | | Move all of the channel map retrieval/negotiation code to a separate file. This will (probably) be helpful when extending ao_coreaudio_exclusive.c. Nothing else changes, other than some minor cosmetics and renaming, and changing some details for decoupling it from the ao_coreaudio.c internals.
* ao_coreaudio_utils: don't require talloc for fourcc_repr()wm42015-05-053-17/+13
| | | | | Instead, apply a trick to make the caller allocate enough space on the stack.
* ao_coreaudio_utils: unbreak default device selectionwm42015-05-051-4/+3
| | | | | | It appears this is the reason coreaudio-exclusive does not work without explicitly specifying a device, even if the default device maps to something passthrough-capable.
* ao_coreaudio_exclusive: fix latency calculation non-sensewm42015-05-051-1/+1
| | | | Didn't use the properties it was supposed to use.
* ao_coreaudio_utils: refine format selectionwm42015-05-051-19/+25
| | | | | | | | | | | Instead of always picking a somehow better format over the previous one, select a format that is equal to or better the requested format, but is also reasonably close. Drop the mFormatID comparison - checking the sample format handles this already. Make sure to exclude channel counts that can't be used.
* ao_coreaudio: change physical format before channel negotiationwm42015-05-051-4/+10
| | | | | | If for example the physical format is set to stereo, the reported multichannel layout will actually be stereo. It fixes itself only after the physical format is changed.
* vo_opengl: change default FBO formatwm42015-05-052-3/+3
| | | | | | | | Reduces (but likely does not remove) the danger of rounding intermediate values down to 8 bit. This is important for cscale, or any other processing that might store raw YUV values in framebuffers. Fixes #1918.
* manpage: fix typowm42015-05-051-1/+1
|
* ao_coreaudio: add an option for changing the physical formatwm42015-05-052-0/+63
| | | | | | | | | | | | ao_coreaudio uses AudioUnit - the OSX software mixer. In theory, it supports multichannel audio just fine. But in practice, this might be disabled by default, and the user is supposed to select a multichannel base format in the "Audio MIDI Setup" utility. This option attempts to change this setting automatically. Some possible disadvantages and caveats are listed in the manpage additions. It is off by default, since changing this might be rather bad behavior for a normal application.
* ao_coreaudio_utils: add a format negotiation helper functionwm42015-05-052-0/+37
|
* af_lavrresample: remove dead undefswm42015-05-051-3/+0
|
* ipc: silence some common info messageswm42015-05-051-3/+3
| | | | | | They are not really interesting. At least one user complained about the noise resulting from use with shell scripts, which connect and disconnect immediately.
* ao_coreaudio: support padded channel layoutswm42015-05-051-2/+6
| | | | | | | If for example the audio settings are set to 5.1 output, but the hardware does 8 channels natively (HDMI), the reported channel layout will have 2 dummy channels. To avoid falling back to stereo, we have to write audio in this format to the device.
* audio: introduce support for padding channelswm42015-05-053-56/+142
| | | | | | | | | | | | | | | | | | | Some audio APIs explicitly require you to add dummy channels. These are not rendered, and only exist for the sake of the audio API or hardware strangeness. At least ALSA, Sndio, and CoreAudio seem to have them. This commit is preparation for using them with ao_coreaudio. The result is a bit messy. libavresample/libswresample don't have good API for this; avresample_set_channel_mapping() is pretty useless. Although in theory you can use it to add and remove channels, you can't set the channel counts. So we do the ordering ourselves by making sure the audio data is planar, and by swapping the plane pointers. This requires lots of messiness to get the conversions in place. Also, the input reordering is still done with the "old" method, and doesn't support padded channels - hopefully this will never be needed. (I tried to come up with cleaner solutions, but compared to my other attempts, the final commit is not that bad.)
* audio: introduce mp_audio readonly bitwm42015-05-042-1/+3
| | | | Convenience for the following commit.
* audio: chmap: explicitly drop channels not supported by lavcwm42015-05-041-2/+5
| | | | Basically as before, but avoid undefined behavior.
* audio: drop unused functionwm42015-05-042-10/+0
|
* ao_coreaudio: fix out of bounds accesswm42015-05-041-0/+2
| | | | | | ca_label_to_mp_speaker_id() checked whether the last entry was >= 0, but actually this condition was never true, and MP_SPEAKER_ID_UNKNOWN0 is not negative.
* subprocess-win: use the correct pipe namespaceJames Ross-Gowan2015-05-041-1/+1
| | | | | | This was a mistake, it should definitely be using the device namespace rather than the file namespace. As it says in the docs, all pipe names must start with \\.\pipe\
* sws_utils: re-use avcolorspace for sws colorspacesNiklas Haas2015-05-041-6/+3
| | | | | This lets us avoid having to maintain two separate copies of the colorspace mapping functions.
* win32: fix desktop directorywm42015-05-031-1/+1
| | | | The folder argument wasn't used, so it always returned the APPDATA dir.
* vo_opengl: gl_lcms: fix cache dir creation with path expansionwm42015-05-031-9/+9
| | | | | | Path expansion (like "~/dir/" in config file) was used inconsistently, so the cache directory wasn't always created correctly. Fix this by moving the path expansion from load_file() to its callers.
* path: start special espansion with ~~name instead of ~namewm42015-05-033-11/+11
| | | | | | | Since commit 7381db60, strings like "~desktop/" were expanded as platform-specific paths by mpv. Apparently this similarity to standard Unix shell expansion caused confusion, so change it to "~~desktop/". The shell doesn't expand this, so it should be better.
* options: fix typo in variable namewm42015-05-033-3/+3
|
* options: remove --leak-reportwm42015-05-023-17/+4
| | | | Use the environment variable instead.
* win32: move platform specifics to osdepwm42015-05-022-25/+28
| | | | | This will probably disable this code for Cygwin. I don't know if this matters, since Cygwin should strictly behave like a Unix anyway.
* build: move main-fn files to osdepwm42015-05-0211-29/+31
| | | | | | And split the Cocoa and Unix cases. Simplify the Cocoa case slightly by calling mpv_main directly, instead of passing a function pointer. Also add a comment explaining why Cocoa needs a special case at all.
* cocoa: always compile OSX application code with cocoawm42015-05-027-26/+20
| | | | | | | | | | | | | | This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case.
* player: handle hotplug events in idle mode toowm42015-05-021-0/+1
|
* screenshots: create screenshot dirwm42015-05-022-2/+5
| | | | Minor user convenience.
* vo_opengl: gl_lcms: create cache dirwm42015-05-021-0/+2
| | | | Minor user convenience.
* vo_opengl: gl_lcms: make sure win32 unicode fopen() wrapper is enabledwm42015-05-021-0/+2
|
* vo_opengl: gl_lcms: minor simplificationwm42015-05-021-2/+1
|
* vo_opengl: gl_lcms: use mp_path_join()wm42015-05-021-3/+3
| | | | | | | Maybe this fixes the win32 problems a user had, or maybe not. Also, check if cache_dir is set at all. An empty string should be equivalent to "unset".
* path: update path descriptionswm42015-05-021-1/+2
|
* path: fix user path resolutionwm42015-05-011-2/+2
| | | | Forgot to add the remainder to the path.
* manpage: fix typowm42015-05-011-1/+1
|
* osxbundle: remove unnecessary config file entrywm42015-05-011-1/+0
| | | | This is done via pseudo-gui now.
* vo_opengl: gl_lcms: make ICC loading less verboseNiklas Haas2015-05-011-2/+2
| | | | | Especially with the new ICC cache rework, you get a lot of ugly output messages that don't really contain any meaningful content.
* vo_opengl: gl_lcms: replace icc-cache by icc-cache-dirNiklas Haas2015-05-013-28/+40
| | | | | | | | | | This now stores caches for multiple ICC profiles, potentially all the user has ever used. The big use case for this is for users with multiple monitors. The old logic would mandate recomputing the LUT and discarding the cache whenever dragging mpv from one screen to another. This also avoids having to save and check the ICC profile itself, since the file name already uniquely determines it.
* vo_opengl: attach target-prim/target-csp to window screenshotsNiklas Haas2015-05-011-2/+9
| | | | | | | | | This will essentially make screenshot-tag-colorspace also affect the "screenshot window" command, where possible. Unfortunately, it's completely incompatible with icc-profile, due to API limitations of ffmpeg (we can only give it an enum of well-known primaries, rather than an actual ICC profile or primaries).
* screenshots: change default directory in pseudo-gui mode to desktopwm42015-05-013-2/+5
| | | | | | | | This should take care of the endless complaints about the default location for screenshots (and will of course create new ones). If the screenshot-template is set to an absolute path, the directory won't be used. So this should be reasonably compatible.
* screenshots: prefix default template with "mpv-"wm42015-05-012-3/+3
| | | | | | So that the user realizes where they come from, or can find them at all. This was a common complaint, and this is the most lazy solution. Better suggestions for a default template are welcome.
* path: add resolving desktop path to platform-specific pathswm42015-05-014-2/+15
| | | | | | | | | win32 has a special function for this. I'm not sure about OSX - it seems ~/Desktop can be hardcoded, and the OSX GUI actually localizes the _displayed_ path in its UI. For Unix, there is not much to be done, or is there.
* path: expose platform-specific path resolverswm42015-05-012-1/+15
|
* timer: add "static" to a variablewm42015-05-011-1/+1
|
* path: refactorwm42015-05-017-68/+140
| | | | | | | | | | | | | | Somewhat less ifdeffery, higher flexibility. Now there are 3 separate config file resolvers for 3 platforms (unix, win, osx), and they can still interact with each other somewhat. For example, OSX for now uses most of Unix, but adds the OSX bundle path. This can be extended to resolve very specific platform paths, such as location of the desktop. Most of the Unix specific code moves to path-unix.c. The behavior should be the same - if not, it is likely a bug.
* screenshots: add --screenshot-directory optionwm42015-05-014-0/+21
| | | | | The plan is to use this to change the screenshot default location in pseudo-gui mode.
* vo_rpi: update renderer size on display size changes toowm42015-05-011-0/+2
| | | | | | | | (Not sure why it worked without this when I tested the previous changes.) Untested, but should be fine. This is equivalent what is done on e.g. panscan changes.
* video/out: remove VOFLAG_FLIPPINGwm42015-05-013-12/+2
| | | | | | | I think this used to be quite important, because the ancient VfW support in MPlayer used to output flipped frames. This code has been dead in mpv for quite some time (because VfW decoders were removed, and the --flip option was dropped too), so get rid of it.
* vo_opengl: refactor wayland frame skippingwm42015-05-016-31/+33
| | | | | | | | | | | Currently, the wayland backend needs extra work to avoid drawing more often than the wayland frame callback allows. (This is not ideal, but will be fixed at a later time.) Unify this with the start_frame callback added for cocoa. Some details change for the better. For example, if a frame is dropped, and a redraw is done afterwards, the actually correct frame is redrawn, instead whatever was in the textures from before the dropped frame.
* cocoa: don't accidentally drop initial screen drawingwm42015-05-015-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | With --idle --force-window, or when started from the bundle, the cocoa code dropped the first frame. This resulted in a black frame on start sometimes. The reason was that the live resizing/redrawing code was invoked, which simply set skip_swap_buffer to false, blocking redrawing whatever was going to be rendered next. Normally this is done so that the following works: 1. vo_opengl draw a frame, releases GL lock 2. live resizing kicks in, redraw the frame 3. vo_opengl wants to call SwapBuffers, drawing a stale buffer overwritten by the live resizing code This is solved by setting skip_swap_buffer in 2., and querying it in 3. Fix this by resetting the skip_swap_buffer at a known good point: when vo_opengl starts drawing a new frame. The start_frame function returns bool, so that it can be merged with is_active in a following commit.
* vo: improve frame drop logic on high playback rateAvi Halachmi (:avih)2015-05-011-3/+11
| | | | | | | | | | | | | | | Commit f1746741dee6000b7fd139e7a10f72aba0674b3b changed the drop logic to have more slack (drop more frames but less frequent) to prevent drops due to timing jitter when the clip and screen have similar rates. However, if the clip has higher rate than the screen (or just higher playback rate), then that policy hurts smoothness since these "chunked drops" look worse than one frame drop at a time. This patch restores the old drop logic when the playback frame rate is higher than ~5% above the screen refresh rate, and solves this issue. Fixes #1897
* player: properly destroy client context if thread can't be createdwm42015-04-301-1/+4
| | | | Minor leak in an obscure out of memory case.
* vo_rpi: update display size on display mode switcheswm42015-04-301-0/+23
|
* vo_rpi: actually draw a black backgroundwm42015-04-301-23/+65
| | | | | | | | Also factor the display size initialization into a separate function. For some reason this seems to work, although setting the background color using this 1x1 pixel bitmap does not work. I blame the RPI beign a terrible piece of hardware with even worse drivers.
* ao_coreaudio_exclusive: check format explicitly on change notifcationwm42015-04-291-6/+11
| | | | | | | | | This should for now be equivalent; it's merely more explicit and will be required if we add PCM support. Note that the property listeners actually tell you what property exactly changed, but resolving the current listener mess would be too hard. So check for changes manually.
* ao_coreaudio_utils: log mp format with CoreAudio format descriptionwm42015-04-291-2/+4
| | | | As a consequence, it also logs whether mpv can a this format at all.
* ao_coreaudio_utils: add function for ASBD -> mp format lookupwm42015-04-292-7/+59
| | | | | | | | | | Useful with some of the following commits. ca_fill_asbd() should behave exactly as before. Instead of actually implementing the inverse function of ca_fill_asbd(), just loop over the (small) list of mpv functions and check if any mpv equivalent to a given ASBD exists.
* ao_coreaudio_utils: float is not a signed integer formatwm42015-04-291-3/+3
| | | | | | | | | kAudioFormatFlagIsSignedInteger implicates that it's only used with integer formats. The mpv internal flag on the other hand signals the presence of a sign, and this is set on float formats. Until now, this probably worked fine, because at least AudioUnit is ignoring the uncorrect flag.
* csputils: improve contrast semantics for limited range outputNiklas Haas2015-04-291-5/+9
| | | | | The previous version of this logic resulted in black crush and incorrect brightness scaling when combined with limited range (TV) output.
* csputils: apply contrast equalizer in RGBwm42015-04-291-8/+3
| | | | | | | | It's weird that this basically adjusts the contrast between luma and chroma, and not blackness. This is more in line with the behavior of libswscale, the vdpau "procamp" (which mpv doesn't use), and Xv.
* screenshots: add option to prevent 16 bit outputwm42015-04-293-13/+29
| | | | That's what it's usually about (again).
* screenshots: add option to disable JPEG 4:4:4 outputwm42015-04-293-2/+11
| | | | That's what it's usually about.
* stream: don't print reconnection message if no stream supportwm42015-04-291-3/+5
| | | | | | | This code does not know whether the stream supports reconnecting until STREAM_CTRL_RECONNECT is called. So the message should be printed after it. To avoid that reconnects that succeed on the first try go unnoticed, print a warning on success.
* x11: query ICC profile based on center of windowNiklas Haas2015-04-293-1/+10
| | | | | | | | | | Right now, the default behavior is to pick the numerically lowest screen ID that overlaps the window in any way - but this means that mpv will decide to pick an ICC profile in a pretty arbitrary way even if the window only overlaps another screen by a single pixel. The new behavior is to query it based on the center of the window instead.
* manpage: put explicit links to config file path detailswm42015-04-281-1/+4
| | | | | It seems users still have trouble finding the exact paths, especially on Windows. Maybe this helps.
* ao_coreaudio_exclusive: move code for getting original formatwm42015-04-281-6/+4
| | | | | Should be almost equivalent, unless there are streams on which this call does not work for unknown reasons.
* ao_coreaudio_utils: change audio format loggingwm42015-04-281-3/+3
| | | | Make it easier to distinguish the fields.
* ao_coreaudio_exclusive: account for additional latencywm42015-04-281-3/+10
| | | | | | | Whether this is correct is unknown. This change tripples the latency from ~15ms to ~45ms. XBMC does this, VLC does not from what I could see.
* command: let sub_reload remove the old track firstwm42015-04-281-8/+10
| | |