Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | cocoa-cb: add support for macOS color space transformation (EDR/HDR) | der richter | 12 days | 3 | -1/+45 |
| | | | | | | | | | | by default utilises the color space of the screen on which the window is located. if a specific value is defined, it will instead be utilised. depending on the chosen color space the macOS EDR (HDR) support is activated and that OS's transformation (tone mapping) is used. Fixes #7341 | ||||
* | mac: properly handle regular expressions without force unwrap | der richter | 2024-04-28 | 1 | -2/+3 |
| | |||||
* | mac: code cleanup and consistency changes, fix linting issues | der richter | 2024-04-28 | 14 | -108/+95 |
| | |||||
* | mac/helper: make wakeup callback declaration consistent | der richter | 2024-04-28 | 2 | -4/+6 |
| | |||||
* | mac/touchbar: use KVO block API instead of old obj-c instance method | der richter | 2024-04-28 | 1 | -10/+5 |
| | |||||
* | mac/input: add support for dead key reporting | der richter | 2024-04-24 | 1 | -1/+20 |
| | | | | | | | | dead keys like tilde and accents were not reported because they returned an empty string from the NSEvent. try to retrieve dead key with alternative Carbon API when an empty key is reported. | ||||
* | mac: make display-names unique to allow specific selection | der richter | 2024-04-24 | 1 | -0/+24 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the Screen property localizedName returns a none unique dynamic name that doesn't allow a specific selection of a Screen on every OS boot. the name consists of the vendor name and model name (eg DELL U2723QE). if the same model display is connected to the system several times, macOS starts to add numbers to the localizedName (eg DELL U2723QE (1)), that may not be associated to the same Screen on every OS boot or connecting the display. it also changes the name of the first connected display by adding that numeration. this makes it impossible specify the proper screen with the screen-name option every time. to circumvent this we remove the enumeration from the name and instead add the serial number to the display-names property. this makes the actual Screen unique and none dynamic. furthermore the selection of a screen by name will check for equality for the old localizedName, simple name without enumeration, serial number and the combined name with serial number. this makes it possible to select the screen by either of those names and identifiers, and keeps backwards compatibility with the old behaviour. Examples: localized name (System Settings name): DELL U2723QE, DELL U2723QE (1) simple name: DELL U2723QE serial number: 123456789 combined name: DELL U2723QE (123456789) | ||||
* | mac/log: fix use after free when freeing mpv handle | der richter | 2024-04-12 | 2 | -2/+8 |
| | | | | | | | | | | | | | | | | | the mp_log is freed when the corresponding mpv_handle (ta_parent) is freed in the EventHelper, though it could still be used from different threads. instead don't use a ta_parent and manually free on manual dereferencing. on app shutdown (memory cleanup) this is not called but instead is freed by the usual cleanup and freeing. the LogHelper is only able to be manually dereferenced in the AppHub, so no race conditions are possible in all other cases (vo).in the AppHub it's impossible to hit a race condition atm, because of how the init process works and how/where the log is used. only manually forcing logging in the exit process itself could theoretically trigger a use after free. Fixes #13823 | ||||
* | mac/vulkan: add support for frame timing via presentation feedback | der richter | 2024-04-10 | 3 | -3/+61 |
| | |||||
* | mac/remote: use event type as key state for proper mapping in function | der richter | 2024-04-04 | 1 | -4/+3 |
| | | | | | | | instead of using the MP_KEY events (Int32) and using a logical OR to generate a key event for the mpv core, use the cocoa event type for key states and pass those to the the function. in the function we properly map those events to the right MP_KEY events. | ||||
* | mac/apphub: fix opening several files at once via Finder or App icon | der richter | 2024-04-04 | 2 | -6/+12 |
| | | | | | | | | | | | when dropping more than one file on the App icon or opening via Finder the open(urls:) event might not pass all files at once in the array, but may consecutivly call open(urls:) for each of the files or batched in several arrays. to fix this append any file passed to the open(urls:) event within 0.1 seconds of each other to the current playlist. the first event uses the default behaviour. | ||||
* | mac/app: add some verbose logging for app startup and file handling | der richter | 2024-04-01 | 2 | -0/+8 |
| | |||||
* | mac/apphub: only instantiate log and option when in Application mode | der richter | 2024-04-01 | 1 | -4/+6 |
| | | | | | | when in libmpv mode there is no need to for logging and reading options. this also prevents possible race conditions with the usage and deinit of the mpv_handler. | ||||
* | mac/menu: remove redundant quit func and use identical command func | der richter | 2024-04-01 | 1 | -7/+2 |
| | |||||
* | mac/app: cleanup and optimise App launch and termination | der richter | 2024-04-01 | 1 | -48/+25 |
| | | | | | | | | | | | | NSApp.terminate() is not a requirement to properly shut down a cocoa App since it only calls exit() internally. though when not used the cocoa termination events won't trigger, which we don't need. this prevented us to exit with a proper exit code. rework the whole termination logic to end up at one point where we can return the exit code from the mpv_main function. Fixes #7456 | ||||
* | mac/apphub: move opening url into AppHub | der richter | 2024-04-01 | 2 | -11/+14 |
| | |||||
* | mac/app: use new open url App event to simplify open file event handling | der richter | 2024-04-01 | 1 | -38/+12 |
| | | | | | | | | | | | | | this event has several advantages, it unifies the mpv:// url handling, the dropping of files on the App icon and opening via finder into one event, and it also lets us remove the file open workaround. we had to keep track of opened files via the command line because the event was also triggered by passed files on the command line, leading to redundant load events. the new event doesn't trigger from files passed via the command line anymore. | ||||
* | mac/log: fallback to system logger if no mp_log is yet available | der richter | 2024-04-01 | 2 | -1/+18 |
| | | | | | | | | | | since cocoa is initialising mpv and does several things before the mpv core does anything and the mpv_handle was passed to the App, this can be used to log such things before the mpv logging is available. helpful for debugging especially bundle related things. the logger mapping looks a bit unintuitive but error is basically yellow what our warning is and fatal is red what our error is. | ||||
* | mac/app: rewrite App c main function, startup and termination in swift | der richter | 2024-04-01 | 8 | -200/+95 |
| | | | | | also move main invocation into AppHub and completely delete the old Application c implementation. | ||||
* | mac/app: rewrite Application class in swift | der richter | 2024-04-01 | 3 | -99/+106 |
| | |||||
* | mac: cleanup swift bridge header imports and unify them | der richter | 2024-03-29 | 11 | -65/+48 |
| | |||||
* | mac/apphub: make DnD behaviour on bundle icon configurable | der richter | 2024-03-29 | 1 | -0/+3 |
| | | | | | we just need to add a OptionHelper to the AppHub, options were already tried to read from the optional OptionHelper. | ||||
* | mac/log: rename log functions and cleanup class | der richter | 2024-03-29 | 3 | -17/+17 |
| | |||||
* | mac: use LogHelper directly instead of mp_log | der richter | 2024-03-29 | 1 | -2/+2 |
| | |||||
* | mac: rename mpvHandle to mpv | der richter | 2024-03-29 | 2 | -9/+9 |
| | |||||
* | mac: remove now unnecessary objective-c forwarding | der richter | 2024-03-29 | 4 | -8/+7 |
| | |||||
* | mac/apphub: move cocoa-cb into AppHub | der richter | 2024-03-29 | 3 | -21/+9 |
| | |||||
* | mac/apphub: move menu bar into AppHub | der richter | 2024-03-29 | 4 | -11/+11 |
| | |||||
* | mac/app: remove unused Application flag | der richter | 2024-03-29 | 1 | -6/+0 |
| | |||||
* | mac/apphub: move mac options into AppHub | der richter | 2024-03-29 | 8 | -85/+91 |
| | |||||
* | mac/apphub: move app icon into AppHub | der richter | 2024-03-29 | 8 | -20/+44 |
| | | | | | split up AppHub header in obj-c and c parts and make it a bidirectional bridging. | ||||
* | mac: cleanup mac headers and include preprocessors | der richter | 2024-03-29 | 3 | -12/+2 |
| | |||||
* | mac/event: only initialise an EventHelper when necessary | der richter | 2024-03-24 | 2 | -4/+12 |
| | |||||
* | mac/touchbar: use AppHub directly instead of the singleton | der richter | 2024-03-24 | 1 | -2/+3 |
| | |||||
* | mac/remote: use AppHub directly instead of the singleton | der richter | 2024-03-24 | 1 | -2/+3 |
| | |||||
* | 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 |
| | |||||
* | 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 |
| | |||||
* | 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 |