summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cocoa: lock cocoa main thread on uninitwm42015-05-071-1/+9
| | | | | | | | | | | | | | | | | | | | This should fix some crashes due to dangling pointers. The problem was that with_cocoa_lock_on_main_thread() is asynchronous. It will not wait until it is finished. In the uninit case, this means the VO could be deallocated and destroyed while cocoa was still running uninit code. So simply wait until it is done by using dispatch_sync(). There were concerns that this could introduce a deadlock by the main thread trying to wait for something on the VO thread. But from what I can see, this never happens, and even if it does, it would crash anyway since the VO is already gone. One remaining worry is the video_resize_redraw_callback. From what I can see, it still can mess things up, and will need a more elaborate fix. (cherry picked from commit e7777563018fc711c873ba9480744f0961786077)
* ao_coreaudio_utils: decide formats by comparing raw bitswm42015-05-071-5/+6
| | | | | | | | | | | | | | | | | | Instead of trying to use af_format_conversion_score() (which tries to be all kinds of clever), just compare the raw bits as a quality measure. Do this because otherwise, weird formats like padded 24 bit formats will be excluded, even though they might be the highest precision formats for some hardware. This means that for now, the user would have to check whether the format is usable at all before calling ca_asbd_is_better(). But since this is currently only used for ao_coreaudio.c and for the physical format, it doesn't matter. If coreaudio-exclusive should get PCM support, the best would be to revert this change, and to add support for 24 bit formats directly. (cherry picked from commit 4ffcf2531bb525c19c3b6df75ecb27c5cffbdd28)
* af: don't attempt to remove last filter for spdif filter removalwm42015-05-071-1/+1
| | | | | | | | | | | | | | | | | Some time ago, a mechanism was added for automatically removing PCM-only filters if the input format is spdif. This could cause an infinite loop if the AO did not support spdif, but was falling back to some PCM format. Then this code tried to remove the last filter, which is a dummy filter for receiving and queuing filter output. af_remove() simply fails gracefully in this case, so this happens over and over again. Fix by explicitly checking whether the filter to remove is a dummy filter. (af_remove() also fails only if the dummy filters are attempted to be removed - checking this directly is simpler.) (cherry picked from commit 0025030cef757327769982333f9105aa510c393d)
* audio: minor cosmeticswm42015-05-071-16/+16
| | | | | | | These ( ) were probably not removed when the format constants were changed from defines to an enum. (cherry picked from commit d76f9a484ea7795655637eb0ddc8655aa4fff345)
* ao_coreaudio_utils: don't require talloc for fourcc_repr()wm42015-05-073-17/+13
| | | | | | | Instead, apply a trick to make the caller allocate enough space on the stack. (cherry picked from commit 399267393bb96710cde53c2fc7563f55cc32deb8)
* ao_coreaudio_utils: unbreak default device selectionwm42015-05-071-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. (cherry picked from commit 7a5f5a8adf5921ed8fcee29d76113d9a7f018974)
* ao_coreaudio_exclusive: fix latency calculation non-sensewm42015-05-071-1/+1
| | | | | | Didn't use the properties it was supposed to use. (cherry picked from commit bbedceb467033b239b35ee9b2db963a93d8a57c9)
* ao_coreaudio_utils: refine format selectionwm42015-05-071-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. (cherry picked from commit fd6809f98a546c2abe87b378bb1fe0bbec40a4ef)
* vo_opengl: change default FBO formatwm42015-05-072-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. (cherry picked from commit cf210c4ffc6d008dd2bdd7c5d4d031ecdcf05fb7)
* ao_coreaudio_utils: add a format negotiation helper functionwm42015-05-072-0/+37
| | | | (cherry picked from commit 305a85cc9aa169a75317acb55e539f49d420f629)
* ao_coreaudio: support padded channel layoutswm42015-05-071-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. (cherry picked from commit 4d8a7e03944155bf07ba9a775cf9554bb1c76f0f)
* audio: introduce support for padding channelswm42015-05-073-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.) (cherry picked from commit 06050aed9906b784159ad03e86e13348c4d9fa47)
* audio: introduce mp_audio readonly bitwm42015-05-072-1/+3
| | | | | | Convenience for the following commit. (cherry picked from commit 1b0b094ca2c25ad162f8f8c84ebebef9a963552e)
* audio: chmap: explicitly drop channels not supported by lavcwm42015-05-071-2/+5
| | | | | | Basically as before, but avoid undefined behavior. (cherry picked from commit 937c8e513f7b948fff0746e80ecf3d27d7007abe)
* audio: drop unused functionwm42015-05-072-10/+0
| | | | (cherry picked from commit 548cd826c24b7f56b597785f0b83a47cbf4a0465)
* ao_coreaudio: fix out of bounds accesswm42015-05-071-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. (cherry picked from commit eead97f10303436b8da1c75dcdaa79efaba5b015)
* subprocess-win: use the correct pipe namespaceJames Ross-Gowan2015-05-071-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\ (cherry picked from commit b6381a0ee383acb1ee7a9562b166c18066747b7f)
* sws_utils: re-use avcolorspace for sws colorspacesNiklas Haas2015-05-071-6/+3
| | | | | | | This lets us avoid having to maintain two separate copies of the colorspace mapping functions. (cherry picked from commit 08d3ef3d9e94609d1fc6c4c0892b17945bc7d0f8)
* win32: fix desktop directorywm42015-05-071-1/+1
| | | | | | The folder argument wasn't used, so it always returned the APPDATA dir. (cherry picked from commit a2da53027b3fcb232121c38e79d7daae651f099d)
* win32: move platform specifics to osdepwm42015-05-072-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. (cherry picked from commit 3508a3fbd12b93e0414acb7996417dd91f369170)
* build: move main-fn files to osdepwm42015-05-0711-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. (cherry picked from commit 1e7831070f6ae1af0a1a29b0d680ef2907bf8cf6)
* cocoa: always compile OSX application code with cocoawm42015-05-077-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. (cherry picked from commit 19a5b20752ecc7465cf17781f908e12bf4ca136d)
* player: handle hotplug events in idle mode toowm42015-05-071-0/+1
| | | | (cherry picked from commit d8e92322fa6eee44bb2713a202b84dfd32cf7ea1)
* vo_opengl: gl_lcms: make sure win32 unicode fopen() wrapper is enabledwm42015-05-071-0/+2
| | | | (cherry picked from commit dce941b99c9e098b8471528908d1509ab040b7a4)
* timer: add "static" to a variablewm42015-05-071-1/+1
| | | | (cherry picked from commit 6814830b9a7740e789a6965f6e4f8da4ba67dd42)
* path: refactorwm42015-05-077-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. (cherry picked from commit d3a3cfe54c26055c0686ea1b9a245eb7f88af521)
* vo_rpi: update renderer size on display size changes toowm42015-05-071-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. (cherry picked from commit 94a3a76ee31bdc00255dc231e99be9f9ad6f38fa)
* video/out: remove VOFLAG_FLIPPINGwm42015-05-073-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. (cherry picked from commit e185887ba0da9967337541ebd71e244fb2833c4f)
* vo_opengl: refactor wayland frame skippingwm42015-05-076-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. (cherry picked from commit 0a7abbda6b555fb7746f737b52d0f00fb3e614db)
* cocoa: don't accidentally drop initial screen drawingwm42015-05-075-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. (cherry picked from commit e23e4c7c603fc1cd911621d0f833031be4a6f7c7)
* vo: improve frame drop logic on high playback rateAvi Halachmi (:avih)2015-05-071-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 (cherry picked from commit ffcad1a72b9a3bf5a7ac5ddcbfa71ec19b6faf9b)
* player: properly destroy client context if thread can't be createdwm42015-05-071-1/+4
| | | | | | Minor leak in an obscure out of memory case. (cherry picked from commit d01228058b03df33a3c6be3acbf2757019a9cd83)
* vo_rpi: update display size on display mode switcheswm42015-05-071-0/+23
| | | | (cherry picked from commit 8c7f3adb413ccea35aef3878f020d6a10e9ad5de)
* vo_rpi: actually draw a black backgroundwm42015-05-071-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. (cherry picked from commit 6ae66e717faa4e9ce286ff0532d4ec19a66faf49)
* ao_coreaudio_exclusive: check format explicitly on change notifcationwm42015-05-071-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. (cherry picked from commit 382434d45a72967f5b607c871e363e02dce1f1e6)
* ao_coreaudio_utils: log mp format with CoreAudio format descriptionwm42015-05-071-2/+4
| | | | | | As a consequence, it also logs whether mpv can a this format at all. (cherry picked from commit 34a5229b231f15c95876fed472bd1edc5283db31)
* ao_coreaudio_utils: add function for ASBD -> mp format lookupwm42015-05-072-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. (cherry picked from commit 32b835c03b4dc98a0344d171adef36c7562f1e7b)
* ao_coreaudio_utils: float is not a signed integer formatwm42015-05-071-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. (cherry picked from commit 3295ce48ab4badff0e13e2e9c2a1ec945413d4e2)
* csputils: improve contrast semantics for limited range outputNiklas Haas2015-05-071-5/+9
| | | | | | | The previous version of this logic resulted in black crush and incorrect brightness scaling when combined with limited range (TV) output. (cherry picked from commit 99439f11ea6add0996adc6f5fb04bb7d27da265e)
* csputils: apply contrast equalizer in RGBwm42015-05-071-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. (cherry picked from commit 0600d378f9afb20d92e75d26c0df7d255e1df554)
* stream: don't print reconnection message if no stream supportwm42015-05-071-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. (cherry picked from commit 38114b6a36eecae7fa707d4d299ac5622cbe9928)
* x11: query ICC profile based on center of windowNiklas Haas2015-05-073-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. (cherry picked from commit daf4334697145f771c5085fb183e64dc65a967bd)
* Release 0.9.1v0.9.1Diogo Franco (Kovensky)2015-04-292-3/+3
|
* Update RELEASE_NOTESDiogo Franco (Kovensky)2015-04-291-0/+6
|
* manpage: put explicit links to config file path detailswm42015-04-291-1/+4
| | | | | | | It seems users still have trouble finding the exact paths, especially on Windows. Maybe this helps. (cherry picked from commit 0b72f5e5ad6f9fca8849fcfb5ced8c03e21ce82a)
* ao_coreaudio_exclusive: move code for getting original formatwm42015-04-291-6/+4
| | | | | | | Should be almost equivalent, unless there are streams on which this call does not work for unknown reasons. (cherry picked from commit 8b4ca5806207c1482df30d9815e6970697cea5b2)
* ao_coreaudio_utils: change audio format loggingwm42015-04-291-3/+3
| | | | | | Make it easier to distinguish the fields. (cherry picked from commit d5e9bf66a1e0c4578bd8bef5c9f725dbc47e9fc6)
* ao_coreaudio_exclusive: account for additional latencywm42015-04-291-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. (cherry picked from commit 5f86fad2f0ab76b7497230b18cd146a7c4d38cd2)
* player: log track list when adding or removing external fileswm42015-04-293-5/+16
| | | | | | | | | | | Should help with debugging, and might be slightly more userfriendly. Note that this is called manually in multiple entry-points, instead of the functions doing the actual work (like mp_remove_track()). This is done so that exiting the player or calling the sub_reload command won't print redundant in-between states. (cherry picked from commit 0c0c8cd44e42791b80e7de33b653aa9143865bbb)
* player: clamp display time to known time range on seekingwm42015-04-291-0/+7
| | | | | | | | | | | | | | | | | During seeking, and there is momemtarily no new data available yet, the player will display the seek target as current time. Clamp this time to the known time range as implied by the start time and the duration of the file. This improves behavior especially when seeking in audio files, for which this for some reason triggers rather often. There were some users complaining about this. This makes behavior worse for files with timestamp resets, or incorrectly reported duration. (The latter is relatively common, e.g. libavformat shortcomings, or incomplete files.) (cherry picked from commit 0ff93a83571ede54af87ebd1aed5736f428c48d4)
* audio: separate fallbacks for upmix and downmix caseswm42015-04-291-12/+18
| | | | | | | | | | We always want to prefer upmix to downmix, as long as it makes sense. Even if the upmix is not "perfect" (not just adding channels), we want to prefer the upmix. Cleanup for commit d3c7fd9d. (cherry picked from commit c4aa13615501189c55c23448d436074e5f92c8cc)
* osc: redo slider position translationChrisK22015-04-291-33/+55
| | | | | | | | Now done in one place instead of mulitple times all over the code. Fixes #1876 (cherry picked from commit 2fcf0e6183d569d61f904980c782f80cc50394ad)
* json: fix UTF-8 handlingwm42015-04-291-2/+2
| | | | | | | | | | | | | | We escape only characters below 32, plus " and \. UTF-8 should be apssed through verbatim. Since char can be signed (and usually is), the check broke and happened to escape UTF-8 encoded bytes too. This broke UTF-8 completely. Note that we don't check for broken or invalid UTF-8, such as described both in the client API and IPC docs. Fixes #1874. (cherry picked from commit f77e3cbf0ca7a91fc773f631828e95584e3ad146)
* Update RELEASE_NOTESDiogo Franco (Kovensky)2015-04-281-3/+3
|
* Add github links to compare pages for the commit logsDiogo Franco (Kovensky)2015-04-281-10/+18
| | | | Unfortunately, the commit logs are truncated at 250 commits :(
* Update RELEASE_NOTESDiogo Franco (Kovensky)2015-04-281-0/+28
|
* ytdl_hook.lua: Change format options when vid is "off"robin2015-04-281-6/+7