summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cocoa-cb: fix building with Swift 4.2coverity_scanAkemi2018-06-122-7/+7
| | | | | | | | | init is a reserved keyword and Swift 4.2 got a bit stricter about using it. this could be fixed by adding apostrophes around init but makes the code uglier. hence i just renamed init to initialized and for consistency uninit to uninitialized. Fixes #5899
* build: manually add standard library search paths for linkingAkemi2018-06-122-8/+11
| | | | | | | | | | | this reverts commit a174566 since the actually reason for failing has been found. the isysroot flag overwrites the framework and library search paths. though we only need to overwrite the former and there is no way to just overwrite that one. we manually add the standard library search paths to the very end of the linking command, so it won't interfere with the search paths extracted by waf. Fixes #5791
* cocoa-cb: remove pre-allocation of window, view and layerAkemi2018-06-129-140/+158
| | | | | | | | | | | the pre-allocation was needed because the layer allocated a opengl context async itself and we couldn't influence that. so we had to start the core after the context was actually allocated. furthermore a window, view and layer hierarchy had to be created so the layer would create a context. now, instead of relying on the layer to create a context we do this manually and re-use that context later when the layer wants to create one async itself.
* vo_libmpv: pass vo struct to the control callbackAkemi2018-06-123-11/+13
|
* options.c: display additional metadata tags during video playbackStephen Hutchinson2018-06-111-2/+3
| | | | | | | | The currently-displayed tags make sense for music files, but similar information for video is more commonly - or at least should be - put under other tags, while the audio-related tags are often used for other information on video files (particularly with youtube-dl's output).
* stats: remove superfluous line breaksJulian2018-06-091-1/+1
| | | | | Those accidentally slipped in with 9975835bdeec3f2b04b136ef40c70b02487bb0e6 due to bad copy & paste.
* hwdec_drmprime_drm: Do not show error message during probingAnton Kindestam2018-06-081-1/+1
| | | | | Change the log-level of an error message that would sometimes show up during hwdec probing, and could be misleading.
* stream_file: enable cache for FUSE filesystems on OpenBSD and FreeBSDgall0ws2018-06-051-1/+1
|
* osc: fix accidentally skipping files when seeking with sliderfatalis2018-06-041-0/+2
| | | | | | | When seeking near the end of the file and the next file loads, seeking continues on the next file at the same position and then immediately the file after that. This patch stops slider seeking when a new file is loaded, which is the standard behavior of many other players.
* ao_alsa: simplify get_space()Jan Ekström2018-06-041-6/+10
|
* ao_alsa: replace snd_pcm_status() with snd_pcm_avail() in get_space()Muhammad Faiz2018-06-041-5/+4
| | | | | | | | | | Fixes a bug with alsa dmix on Fedora 29. After several minutes, audio suddenly becomes bad and muted. Actually, I don't know what causes this. Probably this is a bug in alsa. In any case, as snd_pcm_status() returns not only 'avail', but also other fields such as tstamp, htstamp, etc, this could be considered a good simplification, as only avail is required for this function.
* vo_sdl: add support for screensaver VOCTRL'ssfan52018-06-021-3/+24
| | | | | Previously vo_sdl would unconditonally disable the screensaver, ignoring the `stop-screensaver` option.
* vo_gpu: desaturate after peak detectionNiklas Haas2018-05-311-12/+12
| | | | | | | | | | This sacrifices some dynamic range for well-behaved sources, but prevents catastrophic desaturation on badly mastered / too bright sources. I think that's the better trade-off. This makes the desaturation algorithm much "safer" to deploy by default, as well. One could even argue going up to strength 1.0, which works better for some sources but worse for others. But I think the current strength is the best trade-off even after this change.
* player: fix coding stylewm42018-05-311-3/+3
| | | | | I'm also not sure whether this condition doesn't subtly break a lot of things.
* demux_lavf: drop obscure genpts optionwm42018-05-312-11/+0
| | | | | This code shouldn't even exist in libavformat. If you still need it, you can enable it via --demuxer-lavf-o.
* options: add --http-proxywm42018-05-312-0/+11
| | | | Often requested, trivial.
* player: remove deprecated vo/ao auto profileswm42018-05-312-9/+2
| | | | | These were deprecated almost 2 years ago. Now they happen to be in the way.
* m_config: remove outdated commentwm42018-05-311-1/+0
|
* m_config: check for int16_t offset overflowwm42018-05-311-1/+3
| | | | | | | | For some reason shadow_offset is a int16_t variable (to save some space or something), which means the static part of the entire option list must be below 32KB. This is fine, but still add a check against overflows. (Currently it's 3.6KB. This does not include dynamic allocations like strings.)
* m_config: remove an unused functionwm42018-05-312-15/+0
|
* m_option: remove an unused fieldwm42018-05-312-13/+0
|
* m_config: cosmetics: fix 2 typoswm42018-05-311-2/+2
|
* manpage: update --demuxer-thread optionwm42018-05-311-3/+6
| | | | Be a bit more detailed, and discourage disabling it.
* player: simplify edition switchingwm42018-05-314-13/+4
| | | | | | | | | | | | | | The player fully restarts playback when the edition or disk title is changed. Before this, the player tried to reinitialized playback partially. For example, it did not print a new "Playing: <file>" message, and did not send playback end to libmpv users (scripts or applications). This playback restart code was a bit messy and could have unforeseen interactions with various state. There have been bugs before. Since it's a mostly cosmetic thing for an obscure feature, just change it to a full restart. This works well, though since it may have consequences for scripts or client API users, mention it in interface-changes.rst.
* cmd: do not use a random value for MP_CMD_OPT_ARGwm42018-05-251-1/+1
| | | | | | | | | | | This flag is used only by the command parser. Its value overlapped with some of the existing m_option flags, but only flags that did not matter for the command parser (i.e. the flag bits used had mostly private uses in each component). It's still a bit unclean and dangerous to use an essentially random value, so reuse M_OPT_OPTIONAL_PARAM for it. Since M_OPT_OPTIONAL_PARAM has a slightly longer name than MP_CMD_OPT_ARG, I'm going to keep the old name.
* player: use canonical playback time for video refresheswm42018-05-251-4/+1
| | | | | | | | | | | | | | | | When changing video filters during initialization, there was a small time window where video was initialized, but playback restart was not complete yet. In this time window, playback_pts is not set. But since issue_refresh_seek() was using this, it could lead to no refresh being done _if_ the "video" had only 1 frame (such as cover art). Fix this by using get_current_time() instead, which is the current time with corner cases such as ongoing loading or seeks taken into account. See also the previous commit. Without that, get_current_time() could return NOPTS during init. Fixes #5831.
* manpage: mention that fd:// file descriptors may be modifiedwm42018-05-251-0/+2
| | | | | For example, we call setmode() to switch a FD from text to binary mode on garbage OSes.
* stream_file: properly detect stdin as pipewm42018-05-251-17/+16
| | | | | | | | | | | | There is some code that checks a FD for whether it is a regular file or not. If it's not a regular file, it e.g. enables use of poll() to avoid blocking forever. But this was done only for FDs that were open()ed by us, not from stdin special handling or fd://. Consequently, " | mpv -" could block the player. Fix this by moving the code and running for it on all FDs. Also, set p->regular_file even on mingw.
* manpage: remove a reference to a removed optionwm42018-05-251-2/+1
|
* demux: fix/improve aspects of EOF signalingwm42018-05-251-9/+14
| | | | | | | | | | | | | | | | | | | | | | When the current packet queue was completely empty, and EOF was reached, the queue->is_eof flag was not correctly set to true. Change this by reading ds->eof to check whether the stream is considered EOF. We also need to make sure update_seek_ranges() is called in this case, so change the code to simply call it when queue->is_eof changes. Also, read_packet() needs to call adjust_seek_range_on_packet() if ds->eof changes. In that case, the decoder also needs to be notified about EOF. So both of these should be called when ds->eof changes to true. (Other code outside of this function deals with the case when ds->eof is changed to false.) In addition, this code was kind of shoddy about calling wakeup_ds() correctly. It looks like there was an inverted condition, and sent a wakeup to the decoder only when ds->eof was already true, which is obviously bogus. The final EOF case tried to be somehow clever about checking in->last_eof for notifying the codec, which is sort of OK, but seems to be strictly worse than just checking whether ds->eof changed. Fix these things.
* ipc: cosmetic: switch a negated if/elsewm42018-05-251-3/+3
|
* ipc: alias set_property_string to set_propertywm42018-05-252-28/+4
| | | | | | | | | The only effective difference is that the former explicitly checks whether the JSON value type is string, and errors out if not. The rest is exactly the same (mpv_set_property_string is mpv_set_property with MPV_FORMAT_STRING). It seems silly to keep this, so just remove it.
* video: trust container FPS early on if possiblewm42018-05-251-1/+2
| | | | | If the container FPS is correct, this can help getting ideal mix factors for vo_gpu interpolation mode. Otherwise, it doesn't matter.
* manpage: mention that --no-correct-pts can break seeking toowm42018-05-251-2/+2
|
* dispatch: add an assert()wm42018-05-251-0/+1
|
* input: move an enum back to its correct placewm42018-05-252-13/+13
| | | | This was accidentally moved together with the cmd stuff.
* demux_lavf: remove ffm blacklist entrywm42018-05-251-2/+0
| | | | ffm (ffserver) was removed from ffmpeg.
* input: add a define for the number of mouse buttons and use itwm42018-05-253-1/+7
| | | | (Why the fuck are there up to 20 mouse buttons?)
* vd_lavc: minor simplification for get_format fallbackwm42018-05-251-7/+1
| | | | | | | | | | | The default get_format does exactly do this, so we don't need to duplicate it. The only potential problem with this is that the logic doesn't entirely prevent that the avcodec_default_get_format hw_device_ctx path is triggered, which would probably work, but has unknown consequences and interactions. But the way the logic currently works it can't happen, provided the hwaccel metadata libavcodec provides is correct.
* terminal-unix: stop trying to read when terminal disappearswm42018-05-251-2/+4
| | | | | | | | Avoids 100% CPU usage due to terminal code retrying read(). Seems like this was "forgotten" (or there was somehow the assumption poll() would not signal POLLIN anymore). Fixes #5842.
* x11: support Shift+TABNiklas Haas2018-05-241-1/+1
| | | | | | | | | | | | | | For some reason, the X default modifier map binds shift+tab to ISO_Left_Tab instead of the regular Tab. So to get Shift+TAB recognized by mpv, we also need to accept ISO_Left_Tab. This patch matches what other programs like e.g. Qt do, which treat Tab and ISO_Left_Tab as the same thing. God only knows why the distinction exists, and why X decides to mix up its bindings like that. Fixes #5849
* demux, player: fix playback of sparse video streams (w/ still images)Aman Gupta2018-05-246-5/+36
| | | | | | | | | | | | | | | Fixes several issues playing back mpegts with video streams marked as having "still images". For example, see this video which has frames only every 6s: https://s3.amazonaws.com/tmm1/music-choice.ts Changes include: - start playback right away, without waiting for first video frame - do not consider the sparse video stream in demuxer underrun detection - do not require multiple video frames for the VO - use audio as the master stream for demuxer metadata events - use audio stream for playback time Signed-off-by: Aman Gupta <aman@tmm1.net>
* demux_lavf: co-locate disposition checksAman Gupta2018-05-241-2/+2
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* waf: require wayland-protocols >= 1.14Rostislav Pehlivanov2018-05-201-1/+1
| | | | Needed for the new xdg-wm tiling enums.
* wayland_common: require wl_compositor of version 3Rostislav Pehlivanov2018-05-201-3/+2
| | | | | We already did require it, in order to call set_buffer_scale. This just makes it error out more gracefully.
* wayland_common: fix maximized stateRostislav Pehlivanov2018-05-202-13/+22
| | | | Window size should not change if the window has been maximized or tiled.
* vo_gpu: allow higher icc-contrast and improve loggingNiklas Haas2018-05-172-3/+4
| | | | | | | | | | With the advent of actual HDR devices, my real measured ICC profile has an "infinite" contrast, since the display is completely off on pure black inputs. 100k:1 might not be enough, so let's just bump it up to 1m:1 to be safe. Also, improve the logging in the case that the detected contrast is too high by default.
* stats: show sample format of audio tracksfan52018-05-171-0/+1
|
* waftools: update clang_compilation_databaseBin Jin2018-05-171-13/+33
| | | | | The old copy is broken with waf-1.9.8, update to the latest commit (waf-project/waf@5e4b86b81df3b9819738d757eb8d2c8646ef0ede) instead.
* manpage: fix typoNiklas Haas2018-05-171-1/+1
|
* manpage: clarify target-prim/trc=auto behaviorNiklas Haas2018-05-171-2/+6
| | | | | | | This logic has been changed throughout the years, notably in 38ac5d5 and 3bdbf6. Update the documentation to reflect the current state. Closes #5834.
* m_option: fix duplicate flag valuePhilip Sequeira2018-05-131-2/+2
|
* wscript: Remove code check for cuda hwaccelPhilip Langdale2018-05-102-17/+1
| | | | | | This was there originally to detect too-old versions of ffmpeg. We now only support >= 4.0, so it's not relevant. We just need the dependencies to be present.
* drm_atomic: Fix memory leaks in drm_atomic_createAnton Kindestam2018-05-081-34/+33
| | | | | | | | | First fix a memory leak when skipping cursor planes by inverting the check and putting everything, but the free, in the body. Then fix a missed drmModeFreePlane by simply copying the fields of the drmModePlane we are interested in and freeing the drmModePlane struct early.
* ytdl_hook: try to set video track first if availableRicardo Constantino2018-05-031-4/+4
| | | | | | | Fixes `--ytdl-format="dash-fastly_skyfire-video-363357330+dash-fastly_skyfire_sep-audio-363357330" https://vimeo.com/108650530` This happened because the video track also had audio available and after adding it expecting an audio-only track, there were no more tracks with video.
* player: add more logging around buffering stateAman Gupta2018-05-031-2/+7
|
* command: fix condition for failure when parsing cycle-value paramswm42018-05-031-1/+1
| | | | | | Could make it behave differently (and leak memory) in certain cases. Basically, m_option_parse() randomly returns 0 or 1, but most time 1, with the difference due to legacy reasons that don't matter anymore.
* command: simplify option property initwm42018-05-031-22/+13
| | | | | | | The "if (prop.name)" check is redundant, because an assert above it implies that it never can be NULL. Deduplicate some code for initializing the "prop" variable.
* input: rename weirdly named functionwm42018-05-033-4/+5
|
* input: move some more cmd definitions to cmd.hwm42018-05-032-64/+64
| | | | | | Now both command "descriptions" and runtime command instances are in cmd.h, which makes sense to me. input.h is now for the actual input context.
* input: merge cmd_list.c with cmd.cwm42018-05-037-146/+88
| | | | | | It doesn't really make sense to keep a separate cmd_list.c file, which does _not_ contain a command list, but only a few minor helper functions.
* input: rename cmd_parse.c to cmd.cwm42018-05-032-1/+1
| | | | | Done separately from the cmd.h rename to avoid issues with git being bad at tracking mixed content and filename changes.
* input: rename cmd_parse.h to cmd.hwm42018-05-035-5/+3
|
* command: split big command handler switch into separate functionswm42018-05-034-866/+1018
| | | | | | | | | | | | | | | | | | | This gets rid of run_command() and its big switch statement, which was an idiotically big function of almost 1000 lines. The switch is replaced with a callback per command, and each command is now implemented in its own function. Command IDs are not needed anymore, so the mp_command_type enum disappears. There should be no functional changes, but since this refactors 64 commands, regressions are possible. The handler() parameter is void*, because in theory the input code is supposed to be independent of the player core code. For example, you should be able to reuse the command parser code for some other part of mpv. In practice, the variable containing command list is defined in the player core anyway, so you could say this doesn't work. But I'm still trying to hold onto this idea, so I went with void*.
* input: remove some explicit uses of command IDswm42018-05-036-31/+37
| | | | | | | | | | The plan is to remove the command ID enum. This will happen by replacing the big switch statement in command.c with dispatching to per-command callbacks. As preparation, remove uses of the command IDs outside of the actual dispatching mechanism. Also remove some instances of checking cmd->def for NULL. We now require this always to be set.
* input: remove legacy command handlingwm42018-05-033-84/+0
| | | | | | | | These are old MPlayer commands that were redundant since 2007 or so. In 2013, mpv explicitly deprecated them (actually removed them, but left this wrapper, which translated them to modern commands). The list was not extended since 2013, and mpv always warned on the terminal when a legacy command was used. So it's time to remove it.
* input: move command list to command.cwm42018-05-032-215/+216
| | | | Preparation for more changes.
* encode: remove removed encode options from presetsTheAMM2018-05-031-13/+4
|
* build: make encoding mode non-optionalwm42018-05-0310-40/+9
| | | | Makes it easier to not break the build by confusing the ifdeffery.
* encode: get rid of the output packet queuewm42018-05-0313-79/+147
| | |