summaryrefslogtreecommitdiffstats
path: root/DOCS/client_api_examples
Commit message (Collapse)AuthorAgeFilesLines
* libmpv: cocoa: add basic menuStefano Pigozzi2014-10-271-10/+7
|
* DOCS/client_api_examples: qtexample: don't require Qt 5.xwm42014-10-171-0/+7
| | | | Exclude the worthless Qt 5.0-only demo code on Qt 4.x.
* cocoa: allow mouse events to bubble up with no-input-cursorStefano Pigozzi2014-10-171-0/+1
| | | | | Previously we didn't report events to the core, but still prevented the events to travel on the responder chain.
* DOCS/client_api_examples: qtexample: set a magic Qt flagwm42014-10-161-0/+1
| | | | | | Otherwise, other magic Qt stuff can be magically broken. (No, I don't know the real reasons for this.)
* DOCS/client_api_examples: qtexample: embedding works on Cocoawm42014-10-161-2/+1
|
* DOCS/client_api_examples: qtexample: remove debugging codewm42014-10-141-2/+1
| | | | Forgotten.
* DOCS/client_api_examples: qtexample: stuffwm42014-10-133-7/+31
| | | | | | Dump chapters and track list to the log for demo purposes. Compile in debug mode.
* libmpv/cocoa: allow clients to use mpv event systemStefano Pigozzi2014-10-121-11/+26
| | | | | | | | | | 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!
* libmpv/cocoa: make global events work and get rid of is_cplayerStefano Pigozzi2014-10-091-0/+3
| | | | | | | After @frau's split of macosx_events from macosx_application, `is_cplayer' is not needed anymore. At the moment only global events such as Media Keys and Apple Remote work, because the VO-level ones were hardcoded to be disabled. (that will be fix in a later commit ).
* client API: rename --input-x11-keyboard to --input-vo-keyboardwm42014-10-091-2/+2
| | | | | Apparently we need this for Cocoa too. (The option was X11 specific in the hope that only X11 would need this hack.)
* cocoa: allow to embed into an arbitrary NSViewStefano Pigozzi2014-10-081-1/+1
| | | | | 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.
* DOCS/client_api_examples: qtexample: add a log windowwm42014-10-082-0/+29
| | | | | | | | For the purpose of demonstration. Also make the windows larger. I'm not exactly sure how Qt determines the default window sizes, but here they are a bit tiny, so force them larger.
* DOCS/client_api_examples: qtexample: set the localeJames Ross-Gowan2014-10-071-0/+6
| | | | | | | QApplication sets the locale, so change the LC_NUMERIC category back to "C" for libmpv. See: http://qt-project.org/doc/qt-5/qcoreapplication.html#locale-settings
* cocoa: fix some pointer casts to be 32bit safeStefano Pigozzi2014-10-051-1/+1
| | | | credits: wm4
* cocoa/libmpv: allow to embed mpv GL view in another windowStefano Pigozzi2014-10-051-2/+42
| | | | | | | | | | | | | | | | | | | 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.
* examples/cocoa: never instance NSApplication with newStefano Pigozzi2014-10-051-1/+1
| | | | | Cocoa expects the you instance NSApplications only through the singleton method sharedApplication.
* examples/cocoa: set activation policy to mimic nib applicationsStefano Pigozzi2014-10-051-0/+8
|
* DOCS/client_api_examples: qtexample: remove broken resizingwm42014-09-281-8/+6
| | | | | | | | | The intention was to adjust the window size to video size. It never worked well; it prevented the user to make the window smaller. For unknown reason it stopped resizing properly as well. This is just a cheap example, and I don't intend to fight with Qt, so replace the "demonstration" behavior by something slightly lamer.
* client API, X11: change default keyboard input handling againwm42014-09-282-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 64b7811c tried to do the "right thing" with respect to whether keyboard input should be enabled or not. It turns out that X11 does something stupid by design. All modern toolkits work around this native X11 behavior, but embedding breaks these workarounds. The only way to handle this correctly is the XEmbed protocol. It needs to be supported by the toolkit, and probably also some mpv support. But Qt has inconsistent support for it. In Qt 4, a X11 specific embedding widget was needed. Qt 5.0 doesn't support it at all. Qt 5.1 apparently supports it via QWindow, but if it really does, I couldn't get it to work. So add a hack instead. The new --input-x11-keyboard option controls whether mpv should enable keyboard input on the X11 window or not. In the command line player, it's enabled by default, but in libmpv it's disabled. This hack has the same problem as all previous embedding had: move the mouse outside of the window, and you don't get keyboard input anymore. Likewise, mpv will steal all keyboard input from the parent application as long as the mouse is inside of the mpv window. Also see issue #1090.
* DOCS/client_api_examples: qtexample: resize to video sizewm42014-09-151-0/+21
| | | | | | | | | | | | | This is pretty imperfect, but it's just a demo. The main purpose is clarifying how and when to get the video size. In theory, retrieving the properties this way has a race condition: after reading dwidth, the video could resize again. But the worst that can happen are mismatching dwidth/dheight values, and the MPV_EVENT_VIDEO_RECONFIG event would be immediately received again, which would fix the mismatch. You could read the full video-out-params property to absolutely avoid it, but it's not worth the trouble.
* docs: cocoa example uses wakeup callback APIFRAU KOUJIRO2014-08-121-22/+54
| | | | Also, imitate the qt example somewhat.
* docs: simple cocoa API usage exampleFRAU KOUJIRO2014-08-121-0/+85
|
* client API: qtexample: don't pass deallocated strings to mpvwm42014-08-071-1/+2
| | | | | The temporary QByteArray is deallocated already at the end of the statement in C++, instead of the end of the scope (like in C).
* DOCS/client_api_examples: add a Qt examplewm42014-07-043-0/+177
| | | | | This is pretty dumb and extremely basic. The main purpose is demonstrating how to integrate mpv into the Qt GUI thread.
* client API: rename mpv_destroy() to mpv_detach_destroy()wm42014-06-071-1/+1
| | | | | | A bit verbose, but less misleading. In most cases, the API user probably actually wants mpv_terminate_destroy() instead, so the less-useful function shouldn't have a simnpler name anyway.
* client api examples: set an option with MPV_FORMAT_FLAGwm42014-02-241-1/+2
|
* Add a client API examplewm42014-02-102-0/+53