Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | mac/touchbar: use EventHelper for event handling | der richter | 2024-03-24 | 4 | -66/+22 |
| | | | | also remove remaining old event handling. | ||||
* | mac/touchbar: move touch bar into AppHub | der richter | 2024-03-24 | 2 | -1/+7 |
| | |||||
* | mac/remote: use EventHelper for event handling | der richter | 2024-03-24 | 2 | -50/+37 |
| | |||||
* | mac/touchbar: fix devision by 0 | der richter | 2024-03-24 | 1 | -1/+1 |
| | |||||
* | mac/remote: fix devision by 0 | der richter | 2024-03-24 | 1 | -1/+1 |
| | |||||
* | cocoa-cb: use EventHelper for event handling | der richter | 2024-03-24 | 2 | -18/+11 |
| | |||||
* | cocoa-cb: use a separate mpv_handle for cocoa-cb to simplify shutdown | der richter | 2024-03-24 | 3 | -22/+12 |
| | |||||
* | mac/apphub: migrate remaining events functionality to new AppHub | der richter | 2024-03-24 | 10 | -219/+161 |
| | | | | | | | | add new app_bridge objc file for bridging between mpv core and app functionality. replace old EventsResponder singleton with AppHub. another step to clean up all App functionality and have one central place for it. | ||||
* | mac/event: add helper to subscribe to mpv events and property changes | der richter | 2024-03-24 | 2 | -0/+166 |
| | | | | | preparation to remove duplicate code from all classes that implement their own observer loops. | ||||
* | mac/libmpv: remove unused functions | der richter | 2024-03-21 | 1 | -37/+0 |
| | |||||
* | mac/option: remove now unused computed option variables | der richter | 2024-03-21 | 1 | -1/+0 |
| | |||||
* | mac/option: rename option structs to properly represent their content | der richter | 2024-03-21 | 4 | -35/+29 |
| | | | | also optimise option cache setup. | ||||
* | mac/libmpv: remove mac option handling in favour of option handler | der richter | 2024-03-21 | 1 | -14/+0 |
| | | | | | | since the option handler is not optional anymore and available on init in cocoa-cb we don't need to duplicate this functionality in libmpv anymore. | ||||
* | mac/option: make option helper none optional | der richter | 2024-03-21 | 1 | -1/+1 |
| | | | | gets rid of some unwrapping boilerplate and nil coalescing operators. | ||||
* | mac/option: make option helper vo struct independent | der richter | 2024-03-21 | 1 | -6/+3 |
| | |||||
* | mac/option: optimise option pointer access | der richter | 2024-03-21 | 1 | -3/+4 |
| | |||||
* | mac/option: remove unused and obsolete variables | der richter | 2024-03-21 | 1 | -6/+1 |
| | |||||
* | mac/option: move option functionality from mpv helper to option helper | der richter | 2024-03-21 | 3 | -8/+8 |
| | | | | delete now empty mpv helper | ||||
* | mac/type: move c<>swift type bridging into a dedicated type helper | der richter | 2024-03-21 | 6 | -70/+88 |
| | |||||
* | win32: increase hires timer resolution | nanahi | 2024-03-19 | 3 | -21/+38 |
| | | | | | | | | | | | timeBeginPeriod() only allows setting minimum timer resolution to 1 ms. However, modern x86 platforms support a minimum timer resolution of 0.5 ms. Use NtSetTimerResolution() instead for the increased resolution, which can be set with MPV_HRT_RES. Additionally, change the units of mp_start_hires_timers(), mp_end_hires_timer(), MPV_HRT_RES, and MPV_HRT_MAX to nanoseconds, in accordance with other functions used in timer.h. | ||||
* | win32: avoid multi byte string to wide conversion if not needed | Kacper Michajłow | 2024-03-19 | 1 | -5/+18 |
| | |||||
* | win32: add puts/fputs wrappers | Kacper Michajłow | 2024-03-19 | 5 | -14/+64 |
| | |||||
* | win32: optimize mp_vfprintf a little | Kacper Michajłow | 2024-03-19 | 4 | -23/+36 |
| | | | | | | | | - remove redundant strlen/wcslen - reuse allocated temporary buffers The difference is not big, but it satisfies me to remove those redundancies. | ||||
* | win32: cache GetConsoleMode state for stdout/stderr | Kacper Michajłow | 2024-03-19 | 3 | -31/+42 |
| | | | | | | | GetConsoleMode() can be quite slow and in mpv the mode never changes, so we can just check it once. Fixes performance when writing lots of logs to terminal. | ||||
* | win32: don't touch buffering options | Kacper Michajłow | 2024-03-19 | 1 | -1/+0 |
| | |||||
* | win32-console-wrapper: fix printf specifiers | Kacper Michajłow | 2024-03-19 | 1 | -1/+1 |
| | | | | | | | | | | | %s is evaluated as wchar_t only in "Windows classic" semantic. It is not C standard compliant. %ls is compatible with both and means the same wchar_t format. This commit fixes error output from mpv.com. See: https://devblogs.microsoft.com/oldnewthing/?p=102823 | ||||
* | win32: don't pass std handles if they are attached to console | Kacper Michajłow | 2024-03-19 | 1 | -15/+20 |
| | | | | | | | | | | | This is default behavior to attach to existing console, passing custom handles is useful if we want to replace them, but in case they are already attached to console we want to attach to console directly. In theory, it should work out of the box because "console-like" handles should be managed by Windows internally, which works for INPUT and OUTPUT, but in certain cases, not for ERROR. This allows using VT features in those cases for stderr too. | ||||
* | Revert "osdep/io: ignore 'x' mode for mp_fopen" | nanahi | 2024-03-19 | 1 | -1/+2 |
| | | | | | | | | | This flag is a GNU extension in C99, but was standardrized in C11, so mpv should be able to use it. fopen is wrapped on win32 so non-compliant MSVCRT.dll isn't a concern. Since the upcoming commit uses this feature it can be brought back. This reverts commit c36e051470dceb24c75d36316490e063a77dacba. | ||||
* | win32: implement shell link target resolving | nanahi | 2024-03-19 | 2 | -0/+26 |
| | | | | | Adds a function to resolve the target of a shell link (Windows shortcut) for use by other parts of mpv. | ||||
* | osdep/main-fn-win: fix implicit conversion warning | nanahi | 2024-03-19 | 1 | -1/+1 |
| | |||||
* | osdep/threads: fix warning: initializer element is not constant | nanahi | 2024-03-19 | 2 | -2/+2 |
| | |||||
* | mac/touchbar: simplify item and view creation | der richter | 2024-03-18 | 1 | -70/+53 |
| | |||||
* | mac/touchbar: optimise time item update | der richter | 2024-03-18 | 1 | -6/+3 |
| | |||||
* | mac/touchbar: optimise constraint calculation | der richter | 2024-03-18 | 1 | -5/+3 |
| | |||||
* | mac/touchbar: use DateComponentsFormatter for time formatting | der richter | 2024-03-18 | 1 | -9/+5 |
| | |||||
* | mac/touchbar: simplify update items logic | der richter | 2024-03-18 | 1 | -27/+8 |
| | |||||
* | mac/touchbar: take playback speed into account for rate limiting | der richter | 2024-03-18 | 1 | -1/+4 |
| | |||||
* | mac/touchbar: rewrite touch bar in swift | der richter | 2024-03-18 | 4 | -397/+344 |
| | |||||
* | various: use static assertions where appropriate | sfan5 | 2024-03-17 | 1 | -1/+1 |
| | |||||
* | mac/input: optimise scroll wheel event handling | der richter | 2024-03-16 | 1 | -35/+18 |
| | |||||
* | mac/input: move scroll wheel event handling into input helper | der richter | 2024-03-16 | 1 | -5/+40 |
| | |||||
* | mac/input: optimise mouse movement enabled check | der richter | 2024-03-16 | 1 | -2/+3 |
| | |||||
* | mac/input: fix switched mouse forward and back button | der richter | 2024-03-16 | 1 | -2/+2 |
| | |||||
* | mac/input: move mouse event handling into input helper | der richter | 2024-03-16 | 1 | -0/+28 |
| | |||||
* | mac/input: add missing special keys | der richter | 2024-03-14 | 1 | -0/+2 |
| | |||||
* | mac/input: add simplified mp_keymap init | der richter | 2024-03-14 | 2 | -52/+32 |
| | |||||
* | mac/input: remove wrongly mapped modifier keys | der richter | 2024-03-14 | 1 | -3/+0 |
| | |||||
* | mac/event: move key event handling to input helper and optimise it | der richter | 2024-03-14 | 7 | -165/+128 |
| | |||||
* | mac/input: define AltGr mask as static NSEvent.ModifierFlags variable | der richter | 2024-03-14 | 2 | -2/+8 |
| | | | | | this makes it possible to properly test for those modifiers in a proper swift like way. | ||||
* | mac/events: remove redundant functions and optimise input helper usage | der richter | 2024-03-14 | 10 | -109/+29 |
| | | | | some redundant functions that jump through hoops. | ||||
* | mac/helper: move input ctx related functionality into new input helper | der richter | 2024-03-14 | 3 | -95/+76 |
| | | | | also make functions thread safe. | ||||
* | mac/events: move input ctx related functionality into new input helper | der richter | 2024-03-14 | 3 | -31/+79 |
| | | | | | preparation for mac/events cleanup and single responsibility principle. all functions are thread safe. | ||||
* | mac/menu: add explicit menu type instead of an inferred type | der richter | 2024-03-07 | 1 | -45/+49 |
| | | | | | with the use of an explicit type we can removed inferred type checks like separators/services menu by name or menus by sub configs. | ||||
* | mac/menu: make menu creation recursive to allow nested submenus | der richter | 2024-03-07 | 1 | -31/+31 |
| | | | | also makes menu creation cleaner and more obvious. | ||||
* | mac/menu: move conditional Bundle menu items into config | der richter | 2024-03-07 | 1 | -11/+6 |
| | | | | | | only add the "Show log File…" menu item config when invoked from the bundle, instead of testing on menu item creation. this is similar to the touch bar menu items now. | ||||
* | mac/menu: keep track of menu items with dynamic actions | der richter | 2024-03-07 | 1 | -14/+8 |
| | | | | | | keeping track of the dynamic menu items lets us directly access them by key. we don't need to search in the config array for the right config and menu item. | ||||
* | mac/menu: merge file and url config properties | der richter | 2024-03-07 | 1 | -15/+11 |
| | | | | | a file path is basically an URL. both are also handled as URL objects in our code. | ||||
* | mac/menu: properly guard playlist array access | der richter | 2024-03-07 | 1 | -2/+2 |
| | |||||
* | mac/menu: attach menu config to menu item for direct access | der richter | 2024-03-07 | 1 | -27/+21 |
| | | | | | add a config property to the menu items, so we don't need to search in the config array for the right config. | ||||
* | mac/menu: replace app.command usage with event.command | der richter | 2024-03-07 | 1 | -2/+2 |
| | |||||
* | mac/menu: fix touch bar menu item | der richter | 2024-03-07 | 1 | -6/+0 |
| | | | | | | the check broke when the runtime check was removed, eg the menu item was never added to the menu. since we only add the menu item to the config when touch bar support is available the check is completely unnecessary. | ||||
* | mac/menu: rename Preferences to Settings for consistency with macOS | der richter | 2024-03-07 | 1 | -4/+4 |
| | |||||
* | mac/menu: remove duplicate key assignment Undo/Zoom | der richter | 2024-03-07 | 1 | -1/+1 |
| | | | | this key is already assigned to Undo. | ||||
* | mac/menu: optimise loading files function | der richter | 2024-03-07 | 1 | -7/+3 |
| | | | | don't save files in a temporary array and use an in place mapping. | ||||
* | mac/menu: replace deprecated openFile() usage | der richter | 2024-03-07 | 1 | -8/+8 |
| | |||||
* | mac/menu: remove unnecessary alert config fields and alert | der richter | 2024-03-07 | 1 | -43/+10 |
| | | | | | | | the config folder is created by mpv if it does not exist, so the last alert is unnecessary. also change config path priority. | ||||
* | mac/menu: rewrite menu bar in swift | der richter | 2024-03-07 | 8 | -910/+472 |
| | |||||
* | mac/app: remove unused function | der richter | 2024-03-07 | 2 | -7/+0 |
| | |||||
* | osdep/mac: make mac naming of files, folders and function consistent | der richter | 2024-02-28 | 28 | -45/+45 |
| | | | | | rename all macOS namings (osx, macosx, macOS, macos, apple) to mac, to make naming consistent. | ||||
* | build: fix build when disabling cocoa-cb | der richter | 2024-02-27 | 2 | -2/+2 |
| | | | | | | | | | | the swift obj-c bridging header is only included when cocoa-cb is enabled. cocoa-cb is not the only swift feature anymore and disabling cocoa-cb leads to a runtime error that specific swift classes could not be found. include the swift obj-c bridging header in the case swift features are enabled. | ||||
* | cocoa-cb: remove pre-allocation and initialise only when used | der richter | 2024-02-27 | 4 | -9/+24 |
| | | | | | | | | | | | | | | | | | | | | | cocoa-cb was always pre-allocated in the Application itself because libmpv needs to be set up before usage, an opengl context has to be set and because it was decided mac specific code should be kept out of libmpv. this means that a completely working libmpv and opengl renderer was set up even if it wasn't used. leading to unnecessary log message, resources being used or reserved on the system that might not be used, triggering of dedicated GPU unnecessarily and many other things. even if not optimal, this wasn't the biggest problem since we only had that one working vo on macOS. though now that we have a vulkan gpu(-next) backend on macOS that was made the default, we always have that dangling cocoa-cb instance, which is completely unnecessary. move the cocoa-cb initialisation into libmpv preinit function and only init cocoa-cb when we are a standalone App and cocoa-cb support is build into. | ||||
* | osdep/io: add mp_unlink() | nanahi | 2024-02-25 | 2 | -0/+10 |
| | | | | | | | | unlink() was never wrapped in win32, so all usages of it were referring the ANSI version of the function. This doesn't work properly for Windows versions before 1903 (where the UTF-8 codepage is requested). Fix this by adding mp_unlink() which wraps over _wunlink(). | ||||
* | mac: code consistency changes | der richter | 2024-02-24 | 1 | -4/+0 |
| | |||||
* | osdep/io: move I/O utility functions to misc/io_utils | nanahi | 2024-02-23 | 2 | -58/+0 |
| | | | | | | | The purpose of osdep/io is to provide a wrapper for POSIX I/O functions on Windows. The last 2 functions are utility functions which don't serve this purpose. Move them to a separate file. | ||||
* | osdep/io: ignore 'x' mode for mp_fopen | nanahi | 2024-02-23 | 1 | -2/+1 |
| | | | | | | fopen() with 'x' mode is a non-portable glibc extension, is currently unused, and should not be used in order to maintain POSIX compatibility. Thus there is no need for the Windows wrapper mp_fopen() to support it. | ||||
* | various: make mentions of macOS consistent | der richter | 2024-02-21 | 2 | -2/+2 |
| | | | | | change all mentions and variations of OSX, OS X, MacOSX, MacOS X, etc consistent. use the official naming macOS. | ||||
* | osdep/threads-posix: fix headers for OpenBSD build | Jose Maldonado aka Yukiteru | 2024-02-15 | 1 | -0/+5 |
| | | | | | In OpenBSD the compilation fail because osdep/threads-posix.h need include pthread_np.h | ||||
* | mac/remote: simplify cover retrieval | der richter | 2024-02-15 | 1 | -3/+1 |
| | |||||
* | mac/remote: remove unnecessary nowPlayingInfo variable | der richter | 2024-02-15 | 1 | -14/+7 |
| | | | | | no need to keep track of the nowPlayingInfo, MPNowPlayingInfoCenter already provides the current info. | ||||
* | mac/remote: add album and artist info | der richter | 2024-02-15 | 2 | -3/+12 |
| | |||||
* | mac/remote: add seek support | der richter | 2024-02-15 | 1 | -2/+14 |
| | | | | Fixes #11233 | ||||
* | mac/remote: add chapter title info | der richter | 2024-02-15 | 3 | -4/+8 |
| | |||||
* | mac/remote: add media-title info | der richter | 2024-02-15 | 2 | -3/+7 |
| | | | | Fixes #11233 | ||||
* | mac/remote: add playback rate info | der richter | 2024-02-15 | 2 | -2/+6 |
| | | | | also rate limit the position to update at max once per second. | ||||
* | mac/remote: add duration and current position info | der richter | 2024-02-15 | 2 | -8/+26 |
| | | | | Fixes #11233 | ||||
* | mac/remote: remove make current observer when stopped | der richter | 2024-02-15 | 1 | -0/+6 |
| | | | | | | | | | | the observer is registered on every call of the start function. this could lead to several registered observers for the same event and several calls to the make current function, even though we only need it once per event. properly remove the observer on stop, so we only ever have one observer registered. | ||||
* | mac/remote: replace command handler with generic handler function config | der richter | 2024-02-15 | 1 | -15/+17 |
| | | | | | preparation for the upcoming changes for new functionality not related to key handling. | ||||
* | mac/remote: simplify repeatable key logic | der richter | 2024-02-15 | 1 | -6/+2 |
| | |||||
* | mac/remote: move configs to initialiser for new MediaPlayer shorthands | der richter | 2024-02-15 | 1 | -53/+56 |
| | |||||
* | mac/remote: move class local struct and enum d |