Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | terminal-win: support mouse input events | nanahi | 26 hours | 1 | -29/+74 |
| | | | | | The mouse input information is available from the INPUT_RECORD with MOUSE_EVENT event type. | ||||
* | terminal-win: implement terminal_get_size2 | nanahi | 26 hours | 1 | -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_input | nanahi | 26 hours | 1 | -0/+7 |
| | |||||
* | terminal: add terminal_set_mouse_input function | nanahi | 26 hours | 3 | -0/+13 |
| | | | | This function is used to enable/disable mouse input for win32 and unix. | ||||
* | terminal-unix: style fix | nanahi | 26 hours | 1 | -2/+2 |
| | |||||
* | terminal-unix: ignore unhandled mouse CSI sequences | nanahi | 26 hours | 1 | -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 codes | nanahi | 26 hours | 2 | -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. | ||||
* | mac/log: fix use after free when freeing mpv handle | der richter | 6 days | 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 | 8 days | 6 | -5/+82 |
| | |||||
* | win32: change fputs to fwrite wrapper | Kacper Michajłow | 11 days | 5 | -17/+24 |
| | | | | | | | | | Removes mp_puts/mp_fputs and adds mp_fwrite. In fact I wanted fwrite instead of puts, no need to make it more awkward with the implicit new lines. Fixes: fc55f355fc8225328cf0472e3deb4021eba96303 | ||||
* | vo_tct: add synchronized output support | Kacper Michajłow | 11 days | 1 | -0/+2 |
| | | | | See-Also: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036 | ||||
* | terminal-win: add more control codes support in non-VT mode | Kacper Michajłow | 11 days | 1 | -6/+76 |
| | | | | And skip unsupported private sequences, instead of printing them. | ||||
* | 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 | 2 | -52/+26 |
| | | | | | | | | | | | | 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 | 9 | -201/+96 |
| | | | | | 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 |
| | |||||
* | 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 |
| | | | | |