aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* demux_disc: pass seek flags to stream layerGravatar wm42015-01-19
| | | | | | | | | | | | | | | | Pass through the seek flags to the stream layer. The STREAM_CTRL semantics become a bit awkward, but that's still the least awkward part about optical disc media. Make demux_disc.c request relative seeks. Now the player will use relative seeks if the user sends relative seek commands, and the demuxer announces it wants these by setting rel_seeks to true. This change probably changes seek behavior for dvd, dvdnav, bluray, cdda, and possibly makes seeking useless if the demuxer-cache is set to a high value. Will be used in the next commit. (Split to make reverting the next commit easier.)
* client API: minor cleanupGravatar wm42015-01-19
| | | | | Try not to put "everything" into mpv_wait_event: move out the code for generating log message events.
* client API: notify API user on event queue overflowGravatar wm42015-01-19
| | | | | | | | | | | | | | | Before this, we merely printed a message to the terminal. Now the API user can determine this properly. This might be important for API users which somehow maintain complex state, which all has to be invalidated if (state-changing) events are missing due to an overflow. This also forces the client API user to empty the event queue, which is good, because otherwise the event queue would reach the "filled up" state immediately again due to further asynchronous events being added to the queue. Also add some minor improvements to mpv_wait_event() documentation, and some other minor cosmetic changes.
* win32: use monotonic clock on windows if possibleGravatar Hiltjo Posthuma2015-01-19
|
* player: mention mpv encoding support for transcoding in desync. warningGravatar wm42015-01-19
|
* video: fix waiting for last frame/format reconfigGravatar wm42015-01-19
| | | | | | | | | | | We still need to send the VO a duration in these cases. Disabling framedrop has logically absolutely nothing to do with these cases; it was overlooked in commit 918b06c4. So we always send the frame duration (or a guess for it), and check whether framedropping is actually enabled in the VO code. (It would be cleaner to send framedrop as a flag, but I don't care about that right now.)
* stream_dvb: silence bogus compiler warningGravatar wm42015-01-19
| | | | | | This complains within dvb_strtok_r() that savePtr is uninitialized. There doesn't seem to be any code path where this can happen though, so it's probably a false positive. Silence it anyway.
* vo_opengl: remove 1D texture usageGravatar wm42015-01-18
| | | | | | | Broke operation with GLSL. Since 1D texture usage was apparently (and mysteriously) good for speed, it might be added back, but it's unknown how to do so in a clean way.
* x11: fix initial state for --on-all-workspacesGravatar wm42015-01-17
|
* cocoa: fix fullscreen handlingGravatar wm42015-01-17
| | | | Fixes #1483, if it even compiles.
* x11: add --on-all-workspaces option and propertyGravatar wm42015-01-16
| | | | Fixes #1469.
* x11: minor cleanupGravatar wm42015-01-16
| | | | No reason for these functions to exist separately...
* command: unify handling of fullscreen and other VO flagsGravatar wm42015-01-16
| | | | | | | | The "ontop" and "border" properties already used a common mp_property_vo_flag() function, and the corresponding VOCTRLs used the same conventions. "fullscreen" is pretty similar, but was handled slightly similar. Change how VOCTRL_FULLSCREEN behaves, and use the same helper function for "fullscreen" as the other flags.
* player: add --autofit-smaller optionGravatar wm42015-01-16
| | | | | | | | Fixes #1472. (Maybe these options should have been named --autofit-max and --autofit-min, but since --autofit-larger already exists, use --autofit-smaller for symmetry.)
* demux: return EOF when reading from unselected streamGravatar wm42015-01-16
| | | | | | | | | | | | | | | | | Normally the player doesn't read from unselected streams, so this should be a no-op. But unfortunately, some broken files can severely confuse the player, and assign the same demuxer stream to multiple front-end tracks. Then selecting one of the tracks would deselect the other track, with the end result that the demuxer stream for the selected track is deselected. This could happen with mkv files that use the same track number (which is of course broken). timeline_set_part() sets the tracks using demuxer_stream_by_demuxer_id(), using the broken non-unique IDs. The observable effect was that the player never quit, because demux_read_packet_async() told the caller to wait some longer for new packets. Fix by returning EOF instead. Fixes #1481.
* player: don't enable demuxer readahead before selecting tracksGravatar wm42015-01-16
| | | | | | | | | | This is for the ordered chapters case only. In theory this could have resulted in initial audio, video or subs missing, although it didn't happen in practice (because no streams were selected, thus the demuxer thread didn't actually try to read anything). It's still better to make this explicit. Also, timeline_set_part() can be private to loadfile.c.
* cocoa: don't set application icon in libmpvGravatar Stefano Pigozzi2015-01-16
|
* player: respect --untimed on last frameGravatar wm42015-01-16
| | | | | | | | | | | | | | The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
* subprocess-win: Always quote argv[0]Gravatar James Ross-Gowan2015-01-16
| | | | | | | | | | | | | If the program name isn't quoted and the .exe it refers to isn't found, CreateProcess will add the program arguments to the program name and continue searching, so for "program arg1 arg2", CreateProcess would try "program.exe", "program arg1.exe", then "program arg1 arg2.exe". This behaviour is weird and not really desirable, so prevent it by always quoting the program name. When quoting argv[0], escape sequences shouldn't be used. msvcrt, .NET and CommandLineToArgvW all treat argv[0] literally and end it on the trailing quote, without processing escape sequences.
* manpage: fix osd-ass-cc examplesGravatar wm42015-01-16
| | | | | | | | The "\\" escape was rendered as "\" on the website. I'm hoping quoting this in ``...`` will render it correctly. Also add an example for show_text, which awkwardly does not require escaping the "\".
* player: respect --untimed on video format changesGravatar wm42015-01-16
| | | | | | | | | | | If the video format changes (e.g. different frame size), a special code path is entered to wait until the currently displayed frame is done. Otherwise, the frame before the change would be destroyed by the vo_reconfig() call. This code path didn't respect --untimed; correct this. Fixes #1475.
* win32: make sure __STRICT_ANSI__ is not definedGravatar James Ross-Gowan2015-01-16
| | | | | | | __STRICT_ANSI__ disables functions and definitions that aren't in ANSI C. Unfortunately this includes j1(), which is used by the new ewa_lanczos code. Cygwin's CFLAGS already unset __STRICT_ANSI__, but it should be unset for both Cygwin and MinGW.
* ytdl_hook: Check for empty playlistsGravatar ChrisK22015-01-16
| | | | | Sometimes we get empty playlists back, print a warning message instead of crash
* OSC: Reset all styles for idle messageGravatar ChrisK22015-01-16
|
* vo_opengl: get rid of approx-gamma and make it the default as per BT.1886Gravatar Niklas Haas2015-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | After finding out more about how video mastering is done in the real world it dawned upon me why the "hack" we figured out in #534 looks so much better. Since mastering studios have historically been using only CRTs, the practice adopted for backwards compatibility was to simulate CRT responses even on modern digital monitors, a practice so ubiquitous that the ITU-R formalized it in R-Rec BT.1886 to be precisely gamma 2.40. As such, we finally have enough proof to get rid of the option altogether and just always do that. The value 1.961 is a rounded version of my experimentally obtained approximation of the BT.709 curve, which resulted in a value of around 1.9610336. This is the closest average match to the source brightness while preserving the nonlinear response of the BT.1886 ideal monitor. For playback in dark environments, it's expected that the gamma shift should be reproduced by a user controlled setting, up to a maximum of 1.224 (2.4/1.961) for a pitch black environment. More information: https://developer.apple.com/library/mac/technotes/tn2257/_index.html
* player: don't fall asleep on audio decoding errorsGravatar wm42015-01-15
| | | | | | This makes it retry later. Fixes #1474.
* manpage: changes.rst: document vo_opengl's placebo featuresGravatar Niklas Haas2015-01-15
|
* vo_opengl: add ewa_lanczos upscaler (aka jinc)Gravatar Niklas Haas2015-01-15
| | | | | This is the polar (elliptic weighted average) version of lanczos. This introduces a general new form of polar filters.
* player: fix --stop-playback-on-init-failure on audio init failureGravatar wm42015-01-15
| | | | | | | This was forgotten when the option was implemented, and makes this option work as advertised. Fixes #1473 (though the default behavior is probably still stupid).
* af: remove old filter compatibility hackGravatar wm42015-01-15
|
* audio/filter: switch remaining filters to refcountingGravatar wm42015-01-15
| | | | | All of these filters are very similar in frame management, and copy data to a new frame during filtering.
* audio/filter: switch remaining in-place filters to refcountingGravatar wm42015-01-15
| | | | | | | | | | | | | | | | | | Adds about 7 lines of boilerplate per filter. This could be avoided by providing a different entrypoint (something like af->filter_inplace), which would basically mirror the old interface exactly for this kind of filter. But I feel like it would just be a hack to support all those old, useless filters better. (The ideal solution would be using a language that can do closures to provide a compat. wrapper, but whatever.) af_bs2b has terribly repetitious code for setting up filter functions for each format (most of them useless, in addition to bs2b being useless), so I did something terrible with macros. af_sinesuppress had commented code for float filtering (maybe it was broken; it has been commented every since it was added in 2006). Remove this code.
* af: verify filter input formatsGravatar wm42015-01-15
| | | | | | | | | | | Just to make sure all filters get the correct format. Together wih the check in af_add_output_frame(), this asserts that af->prev->fmt_out == af->fmt_in This also requires setting the "in" pseudo-filter (s->first) formats correctly. Before this commit, the fmt_in/fmt_out fields weren't used for this filter.
* vo_opengl_cb: initial screenshot supportGravatar wm42015-01-15
| | | | | | | | | | | Support for taking screenshots when doing hardware decoding needs to be added later. This takes the last image queued to the VO, which is logically the image the player thinks is on screen (so e.g. subtitles will match). forget_frames() does not clear this, because seeking does not remove the current image from the screen (until the next one is drawn).
* image_writer: check for conversion errorsGravatar wm42015-01-15
| | | | | This can happen when e.g. a VO returns a screenshot in an unsupported format.
* osc: fix disabling OSCGravatar wm42015-01-15
| | | | | | | Upon the "DEL" key binding or the "disable-osc" message, the OSC should stay permanently invisible. This was recently broken (not sure by what), because other code accidentally reenables it anyway, which resulted in the OSC appearing again when moving the mouse.
* DOCS/client_api_examples: fix locale nonsense in qml examplesGravatar wm42015-01-15
| | | | | | | The Qt example already does this. I hoped this was restricted to QApplication only, but apparently Qt repeated this mistake with QGuiApplication (QGuiApplication was specifically added for QtQuick at a much later point, even though QApplication inherits from it).
* ao_alsa: fix a small memory leakGravatar wm42015-01-14
|
* af_lavcac3enc: use refcounted framesGravatar wm42015-01-14
|
* af_lavfi: use refcounted framesGravatar wm42015-01-14
|
* audio/filter: actually set fmt_in/fmt_out fieldsGravatar wm42015-01-14
|
* af_scaletempo: use refcounted framesGravatar wm42015-01-14
|
* af_lavrresample: use refcounted framesGravatar wm42015-01-14
|
* audio: add missing declarationGravatar wm42015-01-14
|
* ao_pcm: add append modeGravatar wm42015-01-14
| | | | | Pretty useful for debugging, although a bit useless or possibly misleading too (see comments in the manpage).
* audio: fix initial audio PTSGravatar wm42015-01-14
| | | | | | | | | | Commit 5e25a3d2 broke handling of the initial frame (the one decoded with initial_audio_decode()). It didn't update the pts_offset field, leading to a shift in timestamps by one audio frame. Fix by calling the actual decode function in a single place. This requires slightly more changes than what would be necessary to fix the bug, but it also somewhat simplifies the data flow.
* player: fallback to seek time for percent-pos propertyGravatar wm42015-01-14
| | | | | | | | | | | | | The percent-pos property normally goes by time, except for file formats like .ts or .ogg, where you can't trust the timestamps and duration info to compute the position in the overall files. These use the byte position and size instead. When the file position was unavailable (e.g. due to an ongoing seek), the percent-pos was unknown. Change it to use the time position instead. In most cases, it's actually accurate enough, and the temporary unavailability of the property can be annoying, e.g. on the terminal status line.
* audio: fix assertion failure on audio decodingGravatar wm42015-01-14
| | | | | | | There are several cases in which a decoder may need several packets to produce some output audio. Commit 5e25a3d2 broke this. Fixes #1471.
* af_convert24: use refcounted framesGravatar wm42015-01-13
| | | | | This requires allocating a fully new frame. 32->24 could be in-place, but this is not possible for 24->32.
* audio/filters: use refcounted frames for some in-place filtersGravatar wm42015-01-13
| | | | | These are also quite simple, but require requesting write access to the frames. The error handling (for OOM) is a bit annoying.