aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/cocoa_common.m
Commit message (Collapse)AuthorAge
* cocoa: fix uninitialization while in fullscreenGravatar Stefano Pigozzi2015-01-01
| | | | | | | | This is only needed for switching video track with `_`, since Cocoa automatically handles cleaning up the application's presentation options when quitting the process. Fixes #1399
* cocoa: move the gl function loader to gl_cocoa.cGravatar Stefano Pigozzi2014-12-28
|
* cocoa: mark window for redraw after title changeGravatar Stefano Pigozzi2014-12-20
| | | | | | | This used to work correctly without the call to displayIfNeeded. I think this may only be needed for Yosemite. Fixes #1330
* cocoa: fix crashGravatar Stefano Pigozzi2014-12-08
| | | | | | fixes #1323 Doesn't leak unless we switch video tracks on and off while in fullscreen.
* cocoa: fix view leak in uninit when fullscreenGravatar Stefano Pigozzi2014-12-06
|
* cocoa: use --idle when running inside bundleGravatar Stefano Pigozzi2014-12-06
| | | | | Previously when using the bundle we used a custom bizarro thing to wait for events. Just use `--idle` and greatly simplify the code.
* cocoa: don't change app activation policy in libmpvGravatar Stefano Pigozzi2014-12-06
| | | /cc @mpv-player/stable
* cocoa: don't create Dock icon for audio only filesGravatar Stefano Pigozzi2014-12-05
| | | | fixes #635
* cocoa: don't async redraw when waiting for VO redrawGravatar Stefano Pigozzi2014-12-04
| | | | | This fixes the very annoying glitch where the black bars disappear for a single frame when going fullscreen.
* vda: use implicit current GL contextGravatar Stefano Pigozzi2014-12-03
| | | | Removes the dependency from the Cocoa backend in case we are not using it but still wanna use VDA GL introp.
* cocoa: allow to black out other display when going fsGravatar Stefano Pigozzi2014-12-01
| | | fixes #1302
* cocoa: don’t hand over view memory ownership to libmpv clientsGravatar Stefano Pigozzi2014-11-25
|
* cocoa: fix fullscreen delay when pausedGravatar Stefano Pigozzi2014-11-01
| | | | | | NSDisableScreenUpdates came to hunt me in the end and when mpv was paused, it did wait for a frame that never came (because of interaction with the live resizing code)!
* build: remove bundle support from wafGravatar Stefano Pigozzi2014-11-01
| | | | Use TOOLS/osxbundle.py instead. It's just better and less hacky.
* cocoa: fix small leakGravatar Stefano Pigozzi2014-10-27
|
* libmpv: cocoa: fix view leak on uninitGravatar Stefano Pigozzi2014-10-27
| | | | | The code was lacking a -removeFromSuperview call which resulted in a leak on our part if the parent view in the client was not released.
* cocoa: perform VOCTRL_SET_UNFS_WINDOW_SIZE asyncronouslyGravatar Stefano Pigozzi2014-10-24
| | | | | | | | Apparently if resizing a NSWindow from a secondary thread Cocoa will automatically protect itself using NSViewHierarchyLock and in our case, cause a deadlock. Fixes #1210
* cocoa: reintroduce async resizeGravatar Stefano Pigozzi2014-10-18
| | | | | | | After removing synchronous libdispatch calls, this looks like it doesn't deadlock anymore. I also experimented with pthread_mutex_trylock liek wm4 suggested, but it leads to some annoying black flickering. I will fallback to that only if some new deadlocks are discovered.
* Revert "cocoa: perform init and uninit synchronously"Gravatar Stefano Pigozzi2014-10-18
| | | | This reverts commit a0ac8b6331d345748d415cf71affbe7a90e336a6.
* cocoa: allow mouse events to bubble up with no-input-cursorGravatar Stefano Pigozzi2014-10-17
| | | | | Previously we didn't report events to the core, but still prevented the events to travel on the responder chain.
* cocoa: perform init and uninit synchronouslyGravatar Stefano Pigozzi2014-10-16
| | | | | This is slightly safer and without the resize redraw, should not cause any deadlock.
* libmpv/cocoa: allow clients to use mpv event systemGravatar Stefano Pigozzi2014-10-12
| | | | | | | | | | This allows mpv's view to take key and send events to mpv's core. To set key status correctly, clients must call -[NSWindow selectNextKeyView:] during reconfig on the main thread. All is 'documented' in the cocoabasic example. If someone knows a better way to handle giving key to the embedded view, let me know!
* cocoa: post keydown and keyup events without event monitorGravatar Stefano Pigozzi2014-10-09
| | | | | Our code worked under the assumption that the event monitor is always active and we did remove the keydown and keyup overrides from our cocoa view.
* cocoa: fix 'uninitalized' accessGravatar Stefano Pigozzi2014-10-09
| | | | | I think this doesn't make a difference, since in Objective-C nil responds as a NullObject, but better not depend on this crappy language feature.
* cocoa: allow to embed into an arbitrary NSViewGravatar Stefano Pigozzi2014-10-08
| | | | | Basically add if guards on all the problematic features. I'm still thinking about a better way to handle this, but for the time being, this will do.
* cocoa: try to fix sizing bugs on retina displaysGravatar Stefano Pigozzi2014-10-06
| | | | untested, no hardware.
* cocoa: separate video view and events viewGravatar Stefano Pigozzi2014-10-05
|
* cocoa: fix fullscreen with bundleGravatar Stefano Pigozzi2014-10-05
|
* cocoa: readd some function callsGravatar Stefano Pigozzi2014-10-05
|
* cocoa: actually reset the event flagsGravatar Stefano Pigozzi2014-10-05
|
* cocoa: remove some useless flagsGravatar Stefano Pigozzi2014-10-05
|
* cocoa: disable some features when embedding in another windowGravatar Stefano Pigozzi2014-10-05
| | | | ontop, fullscreen and window title change to be precise
* cocoa: remove --fs-missioncontrolGravatar Stefano Pigozzi2014-10-05
| | | | | | | This is the first of a series of commits that will change the Cocoa way in a way that is easily embeddable inside parent views. To reach that point common code must avoid referencing the parent NSWindow since that could be the host application's window.
* cocoa: fix some pointer casts to be 32bit safeGravatar Stefano Pigozzi2014-10-05
| | | | credits: wm4
* cocoa/libmpv: allow to embed mpv GL view in another windowGravatar Stefano Pigozzi2014-10-05
| | | | | | | | | | | | | | | | | | | This is just temporary code but is a good base for future work (and baby steps are required for these changes). The 'final destination' is embedding the video view into any NSView but that requires some more work (the mechanism will be the same: pass the view's pointer casted to int64_t through -wid). For instance we will need to remove as much usage of the window instance as possible, and use nil guards where not possible. For this reason I will remove stuff like the mission control fullscreen feature (it's a cute feature but annoying to support and quite limited, go make your GUIs), and a way to lookup the current screen directly from the NSView absolute coordinates (this is needed for ICC detection mostly, and reporting back the screen to mpv's core). Moreover the current view.m will need to be separated into 2 views: the actual video view that will be embedded, and a parent view that will not be embedded and will be responsibile for tracking events.
* cocoa: simplify the config code and run it on the main threadGravatar Stefano Pigozzi2014-10-05
| | | | | | This could be dangerous because we initialize the window asynchronously and return immediately from config, but since the OpenGL context is already created, this seems to work correctly and doesn't cause weird deadlock cases.
* cocoa: don't reset presentation options on uninitGravatar Stefano Pigozzi2014-10-04
| | | | | | This doesn't look to be needed anymore. Fullscreening with both the NSView and the NSWindow API works correctly. I guess this was forgotten in from older code which changed presentation options directly for going fullscreen.
* cocoa: make fullscreening look like an atomic operationGravatar Stefano Pigozzi2014-10-04
| | | | | | | | | | | At the moment when you fullscreen mpv there is a very small time interval where the fullscreen windows is semi-transparent. Apparently whem moving the view to another parent it's better to make Cocoa not draw anything globally. An Apple engineer said it, so it must be correct: http://www.cocoabuilder.com/archive/cocoa/142020-preventing-flicker-on-moving-nsview-to-different-superview.html I know I will regret this in the future.
* cocoa: make resizing wake the vo threadGravatar Stefano Pigozzi2014-10-04
|
* cocoa: remove dead codeGravatar Stefano Pigozzi2014-10-04
|
* cocoa: move to a simpler threading modelGravatar Stefano Pigozzi2014-10-04
| | | | | | | | | | | | | | Unfortunately using dispatch_sync for synchronization turned out to be really bad for us. It caused a wide array of race conditions, deadlocks, etc. Moving to a very simple mutex. It's not clear to me how to do liveresizing with this, for now it just flickers with is unacceptable (maybe I'll draw black instead). This should fix all the threading cocoa bugs. Reopen if it's not the case! Fixes #751 Fixes #1129
* video: rename VOCTRL_GET_WINDOW_SIZEGravatar wm42014-09-05
| | | | Make it clear that this accesses the un-fullscreened window size.
* cocoa: macosx_application needs cocoa-applicationGravatar FRAU KOUJIRO2014-08-06
|
* cocoa: move handleFilesArray: to macosx_eventsGravatar FRAU KOUJIRO2014-08-06
|
* vo: remove vo_mouse_movement() wrapperGravatar wm42014-07-27
| | | | So that VO backends don't have to access the VO just for that.
* cocoa: don't send messages to uninitialized gl contextsGravatar Stefano Pigozzi2014-07-19
| | | | | | | This should fix some crashes where we sent makeCurrentContext to a context that was being freed from another thread. /cc @mpv-player/stable
* cocoa: fix regression preventing window resizeGravatar Stefano Pigozzi2014-07-15
| | | | | I introduced this bug in b5bbb49. Sorry! This could fix #943 and #930 even though I can't reproduce those specific bugs.
* cocoa: move CGL context creation to gl_cocoaGravatar Stefano Pigozzi2014-07-08
| | | | | | This approach is similar to what other vo_opengl backends do. It can also be used in the future to create another cocoa backend that renders offscreen with IOSurfaces or FBOs.
* cocoa: add fallback for automatic GPU switchingGravatar Stefano Pigozzi2014-06-15
| | | | | | Not all the hardware supports kCGLPFASupportsAutomaticGraphicsSwitching (apparently all Mid-2010 and before MacBooks do not work with it), so fallback to not asking for this attribute in the GL pixel format.
* cocoa: allow automatic gpu switchingGravatar Stefano Pigozzi2014-06-15
| | | | Fixes #820