summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x11: always do a reset_size if geometry/autofit is updated at runtimeDudemanguy2024-04-181-2/+2
| | | | | | | | | | Previously, the code required a check against the old saved geometry to make sure the size and/or position was different before updating. The doesn't work with the previous changes that allow a geometry value to be set again with the same value as before. It would probably be nicer to check against something that always keeps track of the actual window size in real time, but it seems geometry in x11 doesn't quite work that way so we'll do it the easier way instead.
* options: flag geometry/autofit options with force_updateDudemanguy2024-04-181-4/+4
| | | | | Same reasoning as window-scale. This still requires that the windowing backend correctly reacts to the notification.
* player: always notify when writing window-scale optionDudemanguy2024-04-184-33/+11
| | | | | | As described in the previous commit, update_window_scale will always execute whenever window-scale is written even if the value doesn't change.
* m_option: add a force_update booleanDudemanguy2024-04-182-8/+44
| | | | | | | | | | | | | | | | | | | | | | mpv's core does not propagate option notifications unless they actually change to the rest of the player. Most of the time, this makes perfect sense. If the user sets fullscreen multiple times, there's no reason to care about anything other than the change in state. However, there are certain options where it makes sense to always broadcast a notification even if the value doesn't change. For example, consider the window-scale case. A user may set window-scale to some value, resize the window further through some other means (such as mouse resizing) and then want to set the window-scale again to the same value as earlier. The window-scale value did not change from before so no notification is sent and nothing happens even though it is desirable and expected that it operates again. This was solved by making the current-window-scale property writable a few years ago, but actually the easier solution is to just always force the option to update on any write. For the big callback, the needed changes are trivial. Unfortunately, it requires a hot mess in order to have this work with the m_config_cache_update APIs. Spooky stuff in there, but it does send the notification now.
* stats.lua: add option to disable scale with video sizenanahi2024-04-182-11/+44
| | | | | This adds a new configuration option vidscale, which controls whether stats display is scaled with video, similar to the option for OSC.lua.
* stats.lua: add option to control plot border widthnanahi2024-04-182-2/+8
| | | | | This adds a new configuration option plot_bg_border_width, which controls the border width of plots.
* stats.lua: remove redundant style overridenanahi2024-04-181-1/+1
|
* demux_lavf: pass jpg filenames to ffmpeg for probingGuido Cella2024-04-181-4/+10
| | | | Fixes #13192, fixes #13431. See the comment for details.
* m_option: change confusing error messages for obj_settings_listnanahi2024-04-182-20/+21
| | | | | | | | | This option type is not used only by filter options: they're already used by --ao, --vo, and --gpu-context. Replace the mentions of "filter" to "item" instead, and changes some languages to improve clarity. Also change the documentation on "Filter options" to describe what it really is, and fix a typo.
* DOCS/man/options: mention the new priority list usage of --gpu-contextnanahi2024-04-181-5/+7
| | | | The settings list conversion means a custom priority list can now be used.
* various: add GPU context descriptionnanahi2024-04-1818-0/+18
| | | | | | | Now that obj_settings_list is used for GPU contexts, detailed descriptions can be added so that --gpu-context=help can print the descriptions of the GPU contexts using standard obj_settings_list help printing.
* video/out/gpu/context: add auto dummy contextnanahi2024-04-181-5/+21
| | | | | | | | | | This adds a dummy context at the start of the context lists, which serves three purposes: - The "auto" option is listed for --gpu-context=help. - Some special handlings of "auto" string are removed. - Make sure that lists have at least one element, so MP_ARRAY_SIZE() works as intended.
* video/out/gpu/context: convert --gpu-context to use obj_settings_listnanahi2024-04-183-90/+101
| | | | | | | | | | | | | | | | Since the list of available GPU contexts is a compile time constant, use obj_settings_list instead of opt_string_validate for GPU contexts. This has several advantages: - Aligns with the existing usage of vo, ao, and filter lists. - Allows custom probing order. - Allows list option suffixes. (--gpu-context-append, etc.) - Allows autocomplete in console.lua. - Uses the standard obj_settings_list help printing, so the custom help printing function is no longer needed. This also deduplicates some context creation code for ra_ctx_create and ra_ctx_create_by_name.
* video/out/gpu/context: don't use hidden flag for contextsnanahi2024-04-183-17/+24
| | | | | For contexts that have no API, just use a separate list for them. This keeps validate func for the main contexts simpler.
* DOCS/client-api-changes.rst: fix formattingShuanglei Tao2024-04-181-0/+1
|
* command: use property_time() for sub-start and sub-endrcombs2024-04-183-2/+13
| | | | This gives these properties the "time" type, which allows them to be pretty-printed as HH:MM:SS easily (but also still allows raw formatting using e.g. ${=sub-start}).
* vo_gpu_next: invalidate cache object if requested by libplaceboKacper Michajłow2024-04-181-3/+5
| | | | See: https://code.videolan.org/videolan/libplacebo/-/merge_requests/659
* stats.lua: display short decoder name if not generic one is usedKacper Michajłow2024-04-181-0/+8
|
* player/command: add track-list/N/decoderKacper Michajłow2024-04-187-28/+22
|
* stats.lua: filter input bindings by typing themGuido Cella2024-04-182-3/+71
| | | | | | | | | This lets you press / in page 4 of the stats and type a keybinding or part of its command to filter it by using mp.input. This works badly without a VO because both stats.lua and console.lua use show-text and only one can be displayed at a time, but it's still better than not having the search available at all.
* terminal-win: support mouse input eventsnanahi2024-04-181-29/+74
| | | | | The mouse input information is available from the INPUT_RECORD with MOUSE_EVENT event type.
* terminal-win: implement terminal_get_size2nanahi2024-04-181-1/+21
| | | | | | The size of the console font can be acquired with GetCurrentConsoleFont, and the terminal size can be calculated from the rols, cols, and font size.
* terminal-win: implement terminal_set_mouse_inputnanahi2024-04-181-0/+7
|
* terminal: add terminal_set_mouse_input functionnanahi2024-04-186-6/+19
| | | | This function is used to enable/disable mouse input for win32 and unix.
* terminal-unix: style fixnanahi2024-04-181-2/+2
|
* vo_{tct,sixel,kitty}: implement mouse supportnanahi2024-04-183-0/+6
|
* terminal-unix: ignore unhandled mouse CSI sequencesnanahi2024-04-181-0/+7
| | | | | | | | 21d434d2dbadf91d7bd2089ca1ca92c2d918b114 attempted to ignore unknown CSI sequences with a specific termination rule. This however does not apply to mouse CSI sequences which can have characters out of that range. Fix this by throwing away the whole sequence when an unhandled mouse sequence is detected.
* terminal-unix: support mouse escape codesnanahi2024-04-182-2/+43
| | | | | | | | These 6-byte codes have the format of \e [ M <button> <xpos> <ypos>. Support the first 3 mouse bottons + scroll up/down for now as button numbers > 5 are pretty non-portable across terminals. Pixel-based mouse position values are calculated and sent to the input system.
* sd_ass: add `sub-vsfilter-bidi-compat` to enable vsfilter bidi compatllyyr2024-04-184-1/+20
| | | | | | | | | | | | | | | | Enable ASS_FEATURE_{WHOLE_TEXT_LAYOUT, BIDI_BRACKETS} and auto base detection by default, and add an option to disable this if needed. This is strictly an improvement for webvtt files as they always use auto base detection. This _fixes_ right-to-left text rendering for webvtt files which correctly mark rtl/ltr. Webvtt files obtained from sources which sideload the RTL information through css also see an improvement due to the auto detection. Generally SRT files also want this, but some are also written to workaround VSFilter quirks. See also: https://github.com/mpv-player/mpv/pull/12985#issuecomment-1839565138
* sd_ass: fix margins for all styles when overriding PlayResXllyyr2024-04-181-5/+6
| | | | | Also save old playresx and use it instead of assuming values of things we know.
* sd_ass: replace ifdef with explicit version checkllyyr2024-04-181-1/+1
|
* DOCS: document --show-in-taskbar optionnanahi2024-04-182-0/+7
|
* w32_common: implement --show-in-taskbar optionnanahi2024-04-181-1/+12
| | | | | When the window style changes, use WS_EX_TOOLWINDOW style to exclude the window from the taskbar and Alt+Tab switching.
* x11_common: implement --show-in-taskbar optionnanahi2024-04-183-0/+21
| | | | | | | | | This adds a new option --show-in-taskbar, which controls whether mpv appears in taskbars. This is useful for picture-in-picture setups where the video window should not appear in taskbars. On X11, this can be controled by setting the _NET_WM_STATE_SKIP_TASKBAR window state.
* x11_common: detect wm support for _NET_WM_STATE_SKIP_TASKBARnanahi2024-04-181-0/+2
|
* stats.lua: inherit OSD stylesGuido Cella2024-04-172-17/+47
| | | | | | | | | | | | | | | Avoid having to configure both the OSD and the stats script opts when you change the OSD options, in particular avoid having to convert colors to BGR. Also document the shadow options. font_size, border_size and shadow offset defaults are kept because the same values look much bigger in the stats than in the corresponding OSD options. osd-back-color is now respected without extra checks until you explicitly set a shadow_color.
* DOCS/input: minor typo correctionsunpenghao2024-04-171-1/+1
|
* osc: add playlist_media_title optionsunpenghao2024-04-172-1/+9
| | | | | | Showing media titles in the playlist is pointless when sources are ill tagged and media titles contain only garbage. Being able to opt for file names at least gives us a choice in such cases.
* dec_sub: fix locking for sub_ass_get_extradatananahi2024-04-171-1/+4
| | | | | | | sub->sd can be destroyed and recreated when update_segment is called inside a lock. Fixes: f9918b53901db2fbc3cfc1be509a32d3ed89556a
* input: make mp_input_queue_cmd return a meaningful valuenanahi2024-04-171-6/+7
| | | | | It's currently always a meaningless 1. Make it so it returns 0 is cmd is NULL. Remove the unused return value from queue_cmd.
* dec_sub: don't use recursive mutexnanahi2024-04-171-3/+3
| | | | | | | | | | | | | 92a9f11a0b4fda60c8880014be5920dcf3e95253 added locking for dec_sub. At that time, because the lock was exposed to the outside world, a recursive mutex was used. However, this is no longer true after e9e883e3b2a64867aae014fb8a1416d0177fe493, when the public locking functions were removed. This means that the lock is now private. Unlike input.c, dec_sub already enforces said call hierarchy, so combined with the aforementioned change, the lock is only ever called once and never recursively. Thus the lock can be converted to a normal mutex.
* dec_sub: fix locking for sub_is_{primary,secondary}_visiblenanahi2024-04-171-2/+8
| | | | | | | These public functions should use locks to keep its usage consistent with input.c. Fixes: 024e0cd4c1405a41edd6a8b302ec6b747bc60ea3
* input: don't use recursive mutexnanahi2024-04-171-1/+1
| | | | | | Previous commits made sure that the lock will never be called for more than once for all public functions. Thus deadlock is impossible, so recursive mutex is unneeded and can be converted to a normal mutex.
* input: avoid unnecessary recursive locksnanahi2024-04-171-65/+95
| | | | | | | | | | | | | | | | | | The absense of a call hierarchy between public and private functions results in many unnecessary recursive locks: public functions require locks, which are also called by other public and private functions in this file. Fortunately, since the lock is private to this file, this situation can be avoided by establishing a call hierarchy: - Public functions must lock, and can only call private functions in this file - Private functions must not lock, and can only call private functions in this file - No function can call any public function in this file, the only exception being mp_input_wakeup and mp_input_parse_cmd. This arrangement ensures that there will be no locks more than necessary: All public function calls will lock only once, and never recursively.
* input: remove mp prefix for static functionsnanahi2024-04-171-11/+11
| | | | | This makes it easy to eyeball check the call hierarchy between public and private functions.
* input: fix locking of mp_input_bind_keynanahi2024-04-171-0/+2
| | | | | | | This is a public function, yet its access to ictx through get_bind_section is not locked. Fixes: 4614d432a8d21ab135af25a183f57efd5059bb62
* options: fix runtime update of teletext-pageKacper Michajłow2024-04-171-1/+1
|
* sub/sd_lavc: check decoder output type for dvb and aribKacper Michajłow2024-04-171-1/+25
| | | | | | | | Depending on the options: For AV_CODEC_ID_ARIB_CAPTION this allows using bitmap output. For AV_CODEC_ID_DVB_TELETEXT this allows using text output. Fixes: #13471
* sub/lavc_conv: set dvb teletext and arib caption output type to ASSKacper Michajłow2024-04-171-0/+23
| | | | Also set teletext page while at it.
* sub/lavc_conv: take sd context as a parameter for lavc_conv_createKacper Michajłow2024-04-173-8/+6
| | | | Will be useful for future commits.
* Update VERSIONsfan52024-04-171-1/+1
|
* Release 0.38.0v0.38.0release/0.38sfan52024-04-1711-176/+131
|
* Revert "ao_coreaudio: switch to ao_read_data_nonblocking()"m154k12024-04-171-1/+1
| | | | This reverts commit 36d5b5261282dd964f80cd2bb04bb53a7c6d895b.
* test: add an encoding test with libmpvsfan52024-04-172-3/+145
|
* player/misc: fix audio-only fallback when video init failsnanahi2024-04-161-1/+2
| | | | | | | | | | | | | --stop-playback-on-init-failure=no is documented to continue playback in audio-only mode if video init fails. However, this does not function properly after a0804329927904fdeb70d9712ff23baaab161bb4: because video is initialized first, if video init fails, ao_chain is still null. As a result, !(mpctx->vo_chain || mpctx->ao_chain) is true, a playback error is raised, so the playback ends and audio does not play. Fix this by reverting that change, so it checks the tracks instead. Fixes: a0804329927904fdeb70d9712ff23baaab161bb4
* player/command: remove codec-info and use track-list directlyKacper Michajłow2024-04-164-89/+14
| | | | | | | | Turns out that adding more medatata like HDR10+ and Dolby Vision would produce a lot of duplication and it is better to centralize it around the track-list property. Fixes: e720159f72be2a816db849acb286f36a1ac4622b
* player: avoid busy looping during reinit_subDudemanguy2024-04-163-6/+32
| | | | | | | | | | | | | | | | | | If the player is paused, switching subtitle track requires us to read subs packets for an indefinite amount of time in order to actually display the subtitles. The problem with this is that it puts a blocking loop in the play thread which can be slow in cases where it takes a long time to fetch the subtitle (e.g. over a network). 9e27b1f523071db184443d78f7144cb599dd0829 alleviates this when a pause happens because of buffering, but it's not complete. One could encounter this if the user pauses the video first manually and then switches the subtitle track. To solve this better, make it so the loop has a time out (totally arbitrary number) so the player isn't blocked forever. If subtitles are not fetched within that time, we flag the track and try again later in the playloop.
* demux_mkv: print chapter timestamp with constant lengthKacper Michajłow2024-04-161-2/+2
|
* demux_mkv: add BCP 47 language tags supportKacper Michajłow2024-04-162-1/+7
| | | | | | | | | | Section 12 of Matroska Media Container Format Specifications says: If a BCP 47 Language Element and an ISO 639-2 Language Element are used within the same Parent Element, then the ISO 639-2 Language Element MUST be ignored and precedence given to the BCP 47 Language Element. Fixes: #8144
* github/issue_template: remove question templateKacper Michajłow2024-04-161-24/+0
| | | | For less formal questions GitHub discussions should be used instead.
* stats.lua: add codec profileKacper Michajłow2024-04-151-2/+10
| | | | | | May be interesting information for users. Fixes: #13839
* player/loadfile: add codec profile to print_stream()Kacper Michajłow2024-04-151-0/+2
|
* player/command: add video-codec-info and audio-codec-infoKacper Michajłow2024-04-158-49/+109
| | | | | | | | | | | Adds support for extracting codec profile. Old properties are redirected to new one and removed from docs. Likely will stay like that forever as there is no reason to remove them. As a effect of unification of properties between audio and video, video-codec will now print codec (format) descriptive name, not decoder long name as it were before. In practice this change fixes what docs says. If you really need decoder name, use the `track-list/N/decoder-desc`.
* wayland: fix segfault in surface_handle_enter due to memory readllyyr2024-04-151-1/+2
| | | | Fixes: 895f40e150d4 ("wayland: only perform a rescale if window is on one output")
* osxbundle: use arg list instead of a string for signing subprocess callder richter2024-04-151-6/+3
| | | | Fixes #13872
* wayland: check if scale actually changes in scaling eventsDudemanguy2024-04-141-2/+6
| | | | | | | The protocol strongly implies that this only happens when the value changes, and it's also what you would naturally expect. But maybe it's worth guarding this in cause for some reason the same value twice in a row happens.
* wayland: only perform a rescale if window is on one outputDudemanguy2024-04-142-34/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | The mpv window overlapping multiple outputs with different scale values can result in some weird behavior when dragging it from one monitor to another one. This is due to the way some compositors implement preferred_scale or preferred_buffer_scale (integer scale equivalent). Depending on the scale values, mpv window has to be resized to match the new scaling value (due to fractional scaling requiring a viewport). This can cause the window to become smaller and no longer overlap the monitor you were just trying to drag it to. Repeat this and the window will become smaller and smaller. Depending on the layout, the reverse can also happen (the window becomes larger). This can cause additional events to fire as the preferred_scale value may change again which does more weird things. It seems kwin is not affected by this because their implementation of preferred_scale sends the event only if the window is fully on the new monitor. Honestly, this is probably more logical anyway but we should at least deal with the other implementations better. Try to deal with it by reworking scaling changes so they only occur when the mpv window is fully on one monitor. If we get a preferred_scale event and there is an overlap, save it as a pending change to be performed on the next surface_enter or surface_leave event (whichever results in there being only one monitor. Some weird rendering glitches can still happen during overlap but this makes it usable again.
* demux_mkv: don't warn if yaw/pitch projection is set to 0Kacper Michajłow2024-04-141-2/+20
| | | | This case will work fine, even if those are explicitly set.
* demux_mkv: remove not needed v_projection_pose_roll_setKacper Michajłow2024-04-141