aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* 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.
* win32: clear window handle on destructionGravatar wm42014-10-17
| | | | | | As I understand, otherwise, the code will try to destroy the same window again in the cleanup part of the gui_thread(), which makes no sense and is potentially dangerous.
* win32: get rid of mp_stat in the normal source codeGravatar wm42014-10-17
| | | | | | | | | | | mp_stat() instead of stat() was used in the normal code (i.e. even on Unix), because MinGW-w64 has an unbelievable macro-mess in place, which prevents solving this elegantly. Add some dirty workarounds to hide mp_stat() from the normal code properly. This now requires replacing all functions that use the struct stat type. This includes fstat, lstat, fstatat, and possibly others. (mpv currently uses stat and fstat only.)
* 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.
* vo_opengl: fix wrong commentsGravatar wm42014-10-16
| | | | | | The previous commit was actually incorrect, and the change had absolutely no effect. The two formats are (fortunately) the same. I'm probably too tired.
* vo_opengl: fix theoretical format mismatch issueGravatar wm42014-10-16
| | | | | | | | | This would have been wrong for hw decoders which pass us NV12 or NV21. The format the GL shader filter chain gets is stored in p->image_desc, while p->image_format still contains the "real" input format (which in case of hw decoding is an opsque hw accel format). Since no hw decoder did this, this is really just a theoretical fix and doesn't fix any actual bugs.
* cocoa: perform init and uninit synchronouslyGravatar Stefano Pigozzi2014-10-16
| | | | | This is slightly safer and without the resize redraw, should not cause any deadlock.
* vf_vapoursynth: add debug message when returning error from GetFrameGravatar wm42014-10-13
| | | | | Some filters still (or will) behave badly on these errors, so explicitly log when it happens.
* x11: don't wait for asynchronous X resizing with window-scaleGravatar wm42014-10-13
| | | | | | | | | | | | | | | Instead of letting the window-scale property return the old value until X11 actually executed the resize, just set the new assumed internal window size immediately. This avoids a "lag" between setting and reading the window-scale property, like OSD controls typically do. Remove the additional calls from vo_x11_highlevel_resize() - they're pointless and slightly wrong, and resize events will take care of updating these things correctly anyway. Fixes #1176. ("window-scale" works via VOCTRL_[S|G]ET_UNFS_WINDOW_SIZE.)
* vf_vapoursynth: don't error if invoke() doesn't return a clipGravatar wm42014-10-12
| | | | | Not all functions are for creating filters. Consider for example LoadPlugin.
* vf_vapoursynth: resolve paths relative to home/configGravatar wm42014-10-12
| | | | | This affects the script filename passed to the filter. Resolve "~" (and some other variants) as described in the "Paths" section of mpv.rst.
* gl_x11: distinguish missing GLX and too old GLX versionsGravatar wm42014-10-12
| | | | | | This probably led to confusing output. CC: @mpv-player/stable
* vf_vapoursynth: add standalone Lua scriptingGravatar wm42014-10-12
|
* vf_vapoursynth: abstract scripting backendGravatar wm42014-10-12
| | | | | | In theory, vsscript should be doing it, but it's not there yet, neither did there seem to be any interest in making it flexible enough to handle more than 1 scripting language.
* 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: remove usage of Objective-C categoriesGravatar Stefano Pigozzi2014-10-12
| | | | | Objective-C categories need special linker flags from the user when statically linking (-ObjC LDFLAG), so make everyone's life simpler and remove them.
* vf_vapoursynth: return dummy frames if frames are requested during initGravatar wm42014-10-11
| | | | | | An attempt at fixing #1168. I see black frames flashing, so it's certainly not perfect.
* vf_vapoursynth: factor stuffGravatar wm42014-10-11
|
* vf_vapoursynth: when seeking, recreate only if it's already createdGravatar wm42014-10-11
|
* x11: don't wait until window is destroyedGravatar wm42014-10-11
| | | | | | | | | | This can hang if the window was destroyed externally (or that's what I suspect happens), and we somehow didn't receive the DestroyNotify event. I'm not sure why we wouldn't receive this event (since it should just be in the xlib event queue), but on the other hand there's no real need to wait for window destruction. This essentially reverts 97fc74e2.
* vf_vapoursynth: fail gracefully if filter init requests framesGravatar wm42014-10-11
| | | | | | | | | | | | | | | | | Some VS filters will requests frames from their parent filters while they're initialized. Thy do this in a blocking manner, and initialization will not succeed until the frame request is satisfied. This deadlocked mpv, because we can feed frames to the filter only after initialization is finished. Return an error instead of deadlocking. Note that we (probably) can handle frames being requested during init fine, as long as the requests don't block initialization. But we can distinguish this situation, and a simple test seems to indicate VS usually doesn't do this. See #1168.
* Add some missing "const"sGravatar wm42014-10-10
| | | | | | | The one in msg.c was mistakenly removed with commit e99a37f6. I didn't actually test the change in ao_sndio.c (but obviously "ap" shouldn't be static).
* 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.
* x11: fix inverted conditionGravatar wm42014-10-09
| | | | | | | Worryingly wrong. Fixes #1162. Also fix another issue (window title was set anyway), which was why I didn't notice this and testing it seemed to be fine.
* client API: rename --input-x11-keyboard to --input-vo-keyboardGravatar wm42014-10-09
| | | | | Apparently we need this for Cocoa too. (The option was X11 specific in the hope that only X11 would need this hack.)
* vf_lavfi: proper rounding for lavfi->mpv aspect ratioGravatar wm42014-10-09
| | | | Or so I think. Not like it matters anyway.
* 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.
* vf_lavfi: fix compilation failureGravatar wm42014-10-08
| | | | | | Apparently this fails to compile with clang6. Patch by someone else. CC: @mpv-player/stable
* x11: disable various features when embedding the windowGravatar wm42014-10-07
|
* cocoa: try to fix sizing bugs on retina displaysGravatar Stefano Pigozzi2014-10-06
| | | | untested, no hardware.
* cocoa: fix mouse autohideGravatar Stefano Pigozzi2014-10-05
| | | | broken in 547b62f
* cocoa: remove a debug commentoGravatar Stefano Pigozzi2014-10-05
| | | | fixup previous commit
* 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.
* options: add --no-keepaspect-windowGravatar wm42014-10-04
| | | | Seems silly, but was requested.
* 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: only call resize for view changing frameGravatar Stefano Pigozzi2014-10-04
|
* cocoa: remove pointless drawRectGravatar Stefano Pigozzi2014-10-04
| | | | | | Apparently it causes deadlocks, and at the moment it does nothing. Fixes #778
* 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
|