summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ao_wasapi: Use OPT_STRING_VALIDATE for device suboptionDiogo Franco (Kovensky)2013-07-221-22/+82
| | | | | | | | | | | | | | | | | Validates by trying to pick the device using the device enumerator and aborting with out of range on failure. Refactors find_and_load_device to not use the wasapi_state; it might be called during validation. Adds missing CoInitialize/CoUninitialize calls. Remove unused variables (the SAFE_RELEASE macros keep them referenced so compiler warnings don't help finding them...). Remove the IMMDeviceEnumerator from the wasapi_state, it's only needed during initialization and initialization is now well factored enough to get rid of it. Try and connect to unplugged devices as well when using the device ID string.
* ao_wasapi: Fully convert to m_option APIDiogo Franco (Kovensky)2013-07-221-20/+10
|
* ao_wasapi: Don't leak the default device's ID when listing devicesDiogo Franco (Kovensky)2013-07-221-3/+4
| | | | Also remove unused variable.
* ao_wasapi: Annotate the default device when listing devicesDiogo Franco (Kovensky)2013-07-221-4/+17
|
* ao_wasapi: Refactor device listing/loadingDiogo Franco (Kovensky)2013-07-221-42/+97
| | | | | | | | | | | | Omit "{0.0.0.00000000}." on devices that start with that substring, re-add when searching for devices by ID. Log the device ID of the default device. Log the friendly name of the used device. Consistently refer to endpoints/devices as devices, as this is more consistent with mpv terminology.
* ao_wasapi0: Rename to ao_wasapiDiogo Franco (Kovensky)2013-07-225-63/+63
| | | | | Nobody knows what the 0 was for. There's no "WASAPI version 0". Just take it out.
* ao_wasapi0: Use the mix format directly in try_mix_formatDiogo Franco (Kovensky)2013-07-221-0/+2
|
* ao_wasapi0: Don't complain about failed init during AO probingDiogo Franco (Kovensky)2013-07-221-8/+10
| | | | Only if the user specifically asked for ao_wasapi0.
* ao_wasapi0: Don't fail init when listing devicesDiogo Franco (Kovensky)2013-07-221-2/+0
|
* DOCS/man/en/ao.rst: Document ao_wasapi0Diogo Franco (Kovensky)2013-07-221-0/+15
|
* ao_wasapi0: Demote "negotiation failed" message to MSGL_VDiogo Franco (Kovensky)2013-07-221-2/+2
| | | | | Could spam the console with what may be harmless in some cases. We already complain loudly if we're stuck checking this too many times.
* ao_wasapi0: Support shared mode, better format guessing methodDiogo Franco (Kovensky)2013-07-221-72/+258
| | | | | | | | | | | | | | | | | | | | | | Uses WASAPI in shared mode by default, add :exclusive flag to choose exclusive mode (duh). WASAPI works somewhat different in shared mode: the OS suggests the sample format to use, and the GetBuffer call is done slightly differently. The shared mode driver does not consume audio as fast as it notifies the thread; we need to check how much we're allowed to write. Not doing this correctly results in spamming the console with AUDCLNT_E_BUFFER_TOO_LARGE errors. When guessing formats for exclusive mode, try several sample size and sample rate combinations instead of just falling back to s16le@44100hz. If none of the rates are accepted, tries remixing >6 channels to 5.1 channels. Failing that, tries remixing to stereo. Failing everything, including the CD Red Book format, what else is left to test? Calculate buffer_block_size based on the configured channels and bytes per sample; MSDN docs say nBlockAlign is not guaranteed to be set for anything but integer PCM formats.
* ao_wasapi0: Support device enumeration and selectionDiogo Franco (Kovensky)2013-07-221-3/+215
| | | | | | | | | Adds the :list suboption to ao_wasapi0, which enumerates the audio endpoints in the system. Adds the :device=<n> suboption, which either takes an ID string (as output by list) or a device number and uses the requested device instead of the system default.
* vo_opengl: some option changeswm42013-07-223-30/+33
| | | | | | Doing "mpv --vo=opengl:lscale=help" now lists possible scalers and exits. The "backend" suboption behaves similar. Make the "stereo" suboption a choice, instead of using magic integer values.
* vo_direct3d: use new option APIwm42013-07-221-85/+34
|
* vo_opengl_old: use new option APIwm42013-07-224-167/+64
|
* options: move --colorkey option to vo_xvwm42013-07-225-18/+15
|
* vo_xv: use new option APIwm42013-07-221-84/+25
|
* vo_direct3d: fix warning on MinGWwm42013-07-221-5/+0
| | | | | | Commit 6ab2eeb attempted to fix it on Cygwin, but now it broke on MinGW in turn. Don't think too hard about it and just remove the code. (vo.c already prints the video rectangle anyway.)
* ao_dsound: use new option APIwm42013-07-221-14/+14
|
* ao_jack: use new option APIwm42013-07-222-73/+35
|
* ao_oss: switch to new option APIwm42013-07-211-31/+30
|
* options: remove --mixer and --mixer-channel, turn them into alsa/oss suboptswm42013-07-217-59/+33
| | | | | | These two options were supported by ALSA and OSS only. Further, their values were specific to the respective audio systems, so it doesn't make sense to keep them as top-level options.
* ao_rsound: use new option APIwm42013-07-211-27/+17
| | | | | Untested. I don't even know if this compiles. I have no clue what rsound even is.
* ao_sdl: use new option APIwm42013-07-211-29/+19
|
* ao_openal: use new option APIwm42013-07-211-42/+29
|
* ao_pulse: use new option APIwm42013-07-211-17/+14
| | | | Untested, but should be fine.
* options: hide encoding AO/VO in help outputwm42013-07-214-2/+8
| | | | | These can't be used manually. Encoding is enabled with -o instead, and the encoding AO/VO is selected using internal mechanisms.
* ao_alsa: use new option API (changes syntax)wm42013-07-212-69/+35
| | | | | | | | | | | | This changes how device names are handled. Before this commit, device names were mangled in strange ways to avoid clashing with the option parser syntax. "." was replaced with ",", and "=" with ":" (the user had to do the inverse to get the correct device name). The "new" option parser has multiple ways to escape option strings, so we don't need this confusing hack anymore. Add an explicit note to the manpage as well.
* ao_pcm: use new option APIwm42013-07-211-16/+12
|
* ao_portaudio: use new option APIwm42013-07-211-32/+35
| | | | | This basically serves as example. All other AOs should be ported as well.
* options: use new option code for --aowm42013-07-215-106/+96
| | | | This requires completely refactoring the AO creation code too.
* mplayer: simplify AO creationwm42013-07-211-13/+22
| | | | | | The AO creation part was split into two separate parts (one calling ao_create and one calling ao_init). This didn't really have good reasons, and obfuscates how AO creation works. Put them together.
* options: use new code for parsing --vowm42013-07-216-151/+84
| | | | | | | | | Nothing should change from user perspective. mpv --vo=opengl:help now works. Remove the vo_opengl inline help text. The new code can list option names for you, but that's it. Refer to the manpage if you have trouble.
* options: add some features to video filter parserwm42013-07-212-9/+80
| | | | | | | | | | | | | | | | | | This is in preparation of making VOs and AOs use the parser which originally was for video filters only. The --vo and --ao options have several very annoying features, which are added here: - They can skip unknown video outputs (might be useful if a config file is supposed to work on several systems, where not all VOs/AOs are available everywhere) - The trailing "," in "-vo a,b," was significant, and meant that if "a" and "b" don't work, try the normal autoprobe order as fallback - There were deprecated VO names (like "gl3" and "gl"), which have to be handled with the option parser - Separating VO/VF names and options is different ("-vf foo=opts" vs. "-vo foo:opts") - vo_opengl.c provides opengl-hq as opengl + preset options
* m_option: fix memory leak on error pathwm42013-07-211-2/+4
|
* m_config: improve option list output a bitwm42013-07-212-19/+27
| | | | | | | | This is printed with --list-options or e.g. --vf=lavfi=help. Note that in theory, the options should be able to print their own help, and we shouldn't special case certain types (like m_option_type_choice in the commit). But that is too hairy for now, so we don't do it.
* options: use m_config for options instead of m_structwm42013-07-2120-349/+342
| | | | | | | | | | | | | | | | | | For some reason, both m_config and m_struct are somewhat similar, except that m_config is much more powerful. m_config is used for VOs and some other things, so to unify them. We plan to kick out m_struct and use m_config for everything. (Unfortunately, m_config is also a bit more bloated, so this commit isn't all that great, but it will allow to reduce the option parser mess somewhat.) This commit also switches all video filters to use the option macros. One reason is that m_struct and m_config, even though they both use m_option, store the offsets of the option fields differently (sigh...), meaning the options defined for either are incompatible. It's easier to switch everything in one go. This commit will allow using the -vf option parser for other things, like VOs and AOs.
* manpage: fix typowm42013-07-211-1/+1
|
* vf: remove unnecessary indirectionwm42013-07-212-26/+5
|
* cocoa_common: fix regression in draggable state computationStefano Pigozzi2013-07-211-0/+1
| | | | Regression introduced in 8fb064de5. Prevented the OSC from working correctly.
* cocoa_common: fix styleStefano Pigozzi2013-07-211-2/+2
|
* cocoa_common: move tracking area setup to updateTrackingAreasStefano Pigozzi2013-07-211-14/+13
| | | | This makes the tracking area work when going in and out of fullscreen.
* x11: add key modifiers to mouse button eventswm42013-07-211-13/+19
|
* command: fix switching tracks backwards if there's only one trackwm42013-07-211-1/+2
| | | | This remained stuck at no selection.
* input.rst: update examplewm42013-07-211-1/+1
| | | | Option was renamed.
* w32_common: show the cursor in the window borderJames Ross-Gowan2013-07-212-6/+22
| | | | | | | | | | | | | | | | | | When the cursor was in the window border, it could be hidden but it wouldn't appear again, since mpv doesn't process mouse input there. The code used ShowCursor, which is a horrid stateful API designed for mouseless Win16 systems that incremented or decremented a global counter to keep track of how many applications needed to display a special cursor (like a busy cursor.) Replace that with a simple flag, handle WM_SETCURSOR and use SetCursor(NULL) to hide the mouse cursor, but only when the mouse is in the client area. DefWindowProc will set the correct cursor on the border as long as it isn't hidden with ShowCursor. PowerPoint also uses SetCursor(NULL) to hide the cursor when showing a presentation, so it's probably safe. See http://blogs.msdn.com/b/oldnewthing/archive/2009/12/17/9937972.aspx
* cocoa_common: handle keyboard modifiers for mouse eventsStefano Pigozzi2013-07-214-60/+75
|
* input: Ignore spurious mouse movesDiogo Franco (Kovensky)2013-07-211-0/+4
| | | | | | | | | | | | Windows generates WM_MOUSEMOVE messages internally whenever the window manager wants to know where the mouse is[1] and broadcasts that to everyone; w32_common doesn't check whether the position is different and just (indirectly) calls this. Do the check on input.c since it's possible some other VO or frontend also do the same thing. [1]: http://blogs.msdn.com/b/oldnewthing/archive/2003/10/01/55108.aspx
* configure: Add some -Wno-error= flags to ERRORFLAGSDiogo Franco (Kovensky)2013-07-211-2/+2
| | | | | -Wno-error=deprecated-declarations and -Wno-error=unused-function. Lets mpv compile with --extra-cflags=-Werror with gcc 4.8.1.
* Merge remote-tracking branch 'michaelforney/master'Alexander Preisinger2013-07-201-2/+11
|\
| * wayland: Fallback to any GL version if 3.0 is not supportedMichael Forney2013-07-191-2/+11
| | | | | | | | This fixes playback on Wayland with older GPUs.
* | cocoa_common: make the fullscreen transition only when necessaryStefano Pigozzi2013-07-201-5/+16
| | | | | | | | | | This makes the cocoa backend follow more closely the new fullscreen semantics added in c4b08a9a.
* | sd_ass: remove unused variable warningStefano Pigozzi2013-07-201-1/+1
| | | | | | | | The `track` variable is used only if `LIBASS_VERSION >= 0x01020000`.
* | cocoa_common: use a tracking area to handle mouse eventsStefano Pigozzi2013-07-201-33/+52
| | | | | | | | | | | | | | | | | | This change which also flipse the coordinate system of the view, greatly simplifies the mouse event handling code. There are still some uglities mostly related to the cursor visibility code. For instance the core doesn't show the cursor when it receives a mouse leave event.
* | cocoa_common: fix typo in commentStefano Pigozzi2013-07-201-1/+1
| | | | | | | | Surely it's copy pasta's fault.
* | cocoa_common: implement MP_MOUSE_LEAVE notificationsStefano Pigozzi2013-07-201-0/+2
| | | | | | | | | | This is needed for the OSC. At the moment I'm sending a notification for any mouse movement outside of the video surface. This might be overkill.
* | cocoa_common: implement conditional video draggingStefano Pigozzi2013-07-201-14/+30
| | | | | | | | | | | | This was more roundabout than expected, since it looks like the framework caches isMovabileByWindowBackground so in mpv's case it's needed to set it with setMovableByWindowBackground.
* | ao_wasapi0: Don't starve the WASAPI thread on seeksDiogo Franco (Kovensky)2013-07-201-6/+11
| | | | | | | | | | | | | | | | | | | | Seeking calls thread_reset, but doesn't call thread_play. thread_reset would disable WASAPI events, but they would never get re-enabled unless the user paused and then unpaused. Keep track of whether the stream is paused or not (there already was a field for that, but it was apparently unused), and if it's not paused, call thread_play after thread_reset. Fixes mpv freezing after seeks.
* | ao_wasapi0: Don't release WASAPI buffer twiceDiogo Franco (Kovensky)2013-07-201-0/+1
| | | | | | | | Would cause bogus AUDCLNT_E_OUT_OF_ORDER errors.
* | ao_wasapi0: Make it compile on cygwin64Diogo Franco (Kovensky)2013-07-201-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes format specifies that assume windows TYPEDEFS are as long as they look like they are. Remove calls to _beginthreadex and _endthreadex, these are only present on microsoft's C runtimes. Replace by the otherwise identical CreateThread and ExitThread calls. This actually requires fixes to devicetopology.h, but the problem has been (kinda) reported to mingw-w64: <Kovensky> I see that those KSJACK* structs are supposedly declared in devicetopology.h itself, but for some reason (some of?) the decls that use them aren't seeing them? <Kovensky> ok, it seems that it expects ks.h and ksmedia.h to declare those structs, but it doesn't <Kovensky> the included files declare KDATAFORMAT, KSIDENTIFIER and LUID (and the associated pointer typedefs) <Kovensky> but everything else is essentially inside #if 0 <Kovensky> changing the #ifndef _KS_ to only include KDATAFORMAT, KSIDENTIFIER and LUID (and putting the KSJACK stuff outside that #ifndef) makes the header compile <Kovensky> it solves my immediate problem, but if that happened to begin with there's probably something more wrong with the ks headers :S
* | direct3d: Fixes format string that assumed sizeof(LONG) == sizeof(long)Diogo Franco (Kovensky)2013-07-201-1/+2
| |
* | mp_msg: fixes windows code that assumes sizeof(DWORD) == sizeof(long)Diogo Franco (Kovensky)2013-07-201-1/+1
| |
* | m_option: remove unused definitionswm42013-07-201-9/+0
| |
* | cache: fix time check for printing warningwm42013-07-201-1/+1
| | | | | | | | | | This actually waited 2 seconds, because CACHE_WAIT_TIME happened to be 0.5.
* | demux_mkv: fix realaudio timestampswm42013-07-201-2/+2
|/ | | | | | | This fixes the sample RA_missing_timestamps.mkv. Pretty funny how this code got it almost right, but not quite, so it was broken all these years. And then, after everyone stopped caring, someone comes and fixes it. (By the way, I know absolutely nothing about realaudio.)
* wayland: use a unified struct for the stateAlexander Preisinger2013-07-183-297/+283
| | | | | | | | | | This commit removes the pointer to the single different structures for input and window and puts them as anonymous structures inside the wayland_state structure. This has the disadvantage of passing the substructure to the listeners, but the advantage is that we don't have to allocate them and check for NULL pointers. This makes it more reliable and easier to follow.
* wayland: don't resize in gl_wayland.cAlexander Preisinger2013-07-182-7/+1
| | | | | | The vo_wayland_fullscreen handles resizing for the video, because the video could still be in fullscreen mode and resizing it in gl_wayland could make it grow or shrink.
* video: remove fullscreen flags chaoswm42013-07-1815-93/+77
| | | | | | | | | | | | | | | | | | | | | | |