aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* ao_wasapi: fix delay calculationGravatar Kevin Mitchell2015-12-21
| | | | | | | | | | | | | | | | | | | Make sure that subtraction of performance counters is done correctly. Follow the *exact* instructions for converting performance counter to something comparable to the QPCposition returned by IAudioClient::GetPosition https://msdn.microsoft.com/en-us/library/windows/desktop/dd370889%28v=vs.85%29.aspx Also make sure that subtraction of unsigned integers is stored into a signed integer to avoid nastiness. Also be more careful about overflow in the conversion of the device position into number of samples. Avoid casting mp_time_us() to a double, and use llrint to convert the double precision delay_us back to integer for ao_read_data. Finally, actually check the return value of ao_read_data and add a verbose message if it is not the expected value. Unfortunately, there is no way to tell WASAPI when this happens since the frame_count in ReleaseBuffer must match GetBuffer.
* demux_lavf: make trace output for mp_seek easier to digestGravatar Aman Gupta2015-12-21
| | | | Signed-off-by: wm4 <wm4@nowhere>
* Fix some typos in code commentsGravatar Aman Gupta2015-12-21
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vf_yadif: change defaultsGravatar wm42015-12-21
| | | | | | | | | | | | | | | | This is for the sake of command.c and the "deinterlace" option/property. Instead of forcing certain "better" defaults when inserting yadif, change the actual "yadif" defaults. I pondered not changing vf_yadif, and instead adding a trivial "yadif- auto" wrapper filter, which would merely have different defaults. But thinking about it, it doesn't make any sense for "deinterlace" to have different defaults from vf_yadif, with vf_yadif having the "worse" defaults. If someone wants the old behavior, the old behavior can be forced in a backward and forward compatible way by setting the suboptions. Fixes #2539 (kind of).
* ao_wasapi: move volume control init to it's own functionGravatar Kevin Mitchell2015-12-21
| | | | also make failure non-fatal
* ao_wasapi: correctly handle audio session display failureGravatar Kevin Mitchell2015-12-21
| | | | | In particular, try and release/null the interface so that it won't be marshalled.
* ao_wasapi: non-fatal error handling for COM marshallingGravatar Kevin Mitchell2015-12-21
| | | | | Also make sure that CoReleaseMarshalData is called if errors occur before unmarshalling.
* ao_wasapi: wrap long lines and use only c99 comment styleGravatar Kevin Mitchell2015-12-21
| | | | | also remove a log message in AOCONTROL_UPDATE_STREAM_TITLE since none of the other controls have one.
* ao_wasapi: reorganize private structureGravatar Kevin Mitchell2015-12-21
|
* ao_wasapi: remove useless buffer_block_sizeGravatar Kevin Mitchell2015-12-21
| | | | this was only ever used for a verbose message
* ao_wasapi: move exclusive and shared-specific controls to functionsGravatar Kevin Mitchell2015-12-21
|
* charset_conv: check for UTF-8 if uchardet returns unknownGravatar wm42015-12-20
| | | | | | | | When libuchardet returns an empty string, it can be either ASCII, UTF-8, or an unknown encoding. Try to distinguish it from the unknown case by checking for UTF-8. This avoids an annoying message, and avoids unnecessary processing (we convert invalid UTF-8 sequences to latin1 to workaround libavcodec's braindead UTF-8 check).
* demux_disc: fix aspect ratio retrieval (again)Gravatar wm42015-12-20
| | | | | | Commit 127da161 was not properly tested either - it did nothing, and just made it use the video bitstream aspect ratio determined by libavformat (which isn't always the correct one).
* vo_opengl: x11: fix alpha windowsGravatar wm42015-12-20
| | | | | | | long is 64 bits on x86_64 on Linux, which means the check for the corner case of computing the depth mask is wrong. Also, X11 compositors seem to expect premultiplied alpha.
* ao_wasapi: call the class-specific release functionsGravatar Kevin Mitchell2015-12-20
| | | | | IUnknown_Release() might be alright, but stay on the safe side.
* ao_wasapi: check for proxy availability in controlGravatar Kevin Mitchell2015-12-20
| | | | | Make sure that the proxy has been created before using it. This will be used when a future commit makes proxy setup optional.
* ao_wasapi: actually use hw volume support information for exclusive modeGravatar Kevin Mitchell2015-12-20
| | | | | | | | | Do not try and set/get master volume in exclusive if there is no hardware support. This would just uselessly change the master slider, but have no effect on the actual volume. Furthermore if getting hardware volume support information fails, then assume it has none.
* ao_wasapi: don't cast control arg to something it isn'tGravatar Kevin Mitchell2015-12-20
| | | | | the ao_control_vol_t cast was happening outside AOCONTROL_GET/SET_VOLUME which is the only place that would be valid
* ao_wasapi: remove volume "restore" on exitGravatar Kevin Mitchell2015-12-20
| | | | | | It was complicated and not even very intuitive to the user. If you are controlling the master volume, you just have to be prepared to deal with the consequences.
* ao_wasapi: split exclusive/shared specific ao controlsGravatar Kevin Mitchell2015-12-20
| | | | | this avoids having to check if we're exclusive or shared for every control
* ao_wasapi: add E_NOINTERFACE to error listGravatar Kevin Mitchell2015-12-20
| | | | this is encountered trying to set up COM proxies in wine
* path-win: include initguid.hGravatar Kevin Mitchell2015-12-20
| | | | cygwin was giving undefined reference to `FOLDERID_Desktop' at link time
* DOCS/compile-windows: pthreads is not needed anymoreGravatar wm42015-12-20
| | | | | | Both mpv and ffmpeg have their own internal pthreads wrappers. The mpv one has been recently enabled by default as well. (It didn't work on XP, but we dropped XP support.)
* win32: input: use Vista CancelIoExGravatar James Ross-Gowan2015-12-20
| | | | | | | | | | | | | | | | | libwaio was added due to the complete inability to cancel synchronous I/O cleanly using the public Windows API in Windows XP. Even calling TerminateThread on the thread performing I/O was a bad solution, because the TerminateThread function in XP would leak the thread's stack. In Vista and up, however, this is no longer a problem. CancelIoEx can cancel synchronous I/O running on other threads, allowing the thread to exit cleanly, so replace libwaio usage with native Vista API functions. It should be noted that this change also removes the hack added in 8a27025 for preventing a deadlock that only seemed to happen in Windows XP. KB2009703 says that Vista and up are not affected by this, due to a change in the implementation of GetFileType, so the hack should not be needed anymore.
* win32: add Windows 10 compatibility GUIDGravatar James Ross-Gowan2015-12-20
| | | | | This suppresses the Program Compatibility Assistant on Windows 10. mpv is regularly tested on Windows 10, so this should be okay.
* win32: build: set subsystem versionGravatar James Ross-Gowan2015-12-20
| | | | | | This sets the minimum supported Windows version to Windows Vista. The subsystem version also affects some Windows API functions, including GetSystemMetrics(SM_CXPADDEDBORDER).
* win32: path: use Known Folder IDsGravatar James Ross-Gowan2015-12-20
| | | | | | CSIDLs have been deprecated in Windows Vista and are not recommended for use in new code. They have been replaced with Known Folder IDs, which are pretty much the same thing, except they use GUIDs.
* win32: use PIPE_REJECT_REMOTE_CLIENTSGravatar James Ross-Gowan2015-12-20
| | | | | This partially reverts c670488. mpv only supports Vista and up, so this flag is fine.
* win32: remove ProcThreadAttributeList dynamic loadingGravatar James Ross-Gowan2015-12-20
| | | | | These are always available in supported Windows versions, as is the EXTENDED_STARTUPINFO_PRESENT flag.
* win32: remove SetDllDirectoryW dynamic loadingGravatar James Ross-Gowan2015-12-20
| | | | All Windows versions we support have this API.
* vaapi: add VP9 profile entiresGravatar BtbN2015-12-20
|
* sd_ass: handle --sub-clear-on-seek correctly with non-ASS subsGravatar wm42015-12-20
| | | | | | Converted subtitles use a different method to avoid adding repeated packets as duplicate subtitle events. The state for this mechanism must be cleared as well if --sub-clear-on-seek is used.
* vf_vapoursynth: fix everythingGravatar wm42015-12-20
| | | | | | | Broken by commit 0a0bb905. The changes to this filter were accidentally simply not tested, and it was obviously broken in a bunch of ways. Fixes #2616.
* demux_disc: fix aspect ratioGravatar wm42015-12-20
| | | | | Broken by commit 0a0bb905. STREAM_CTRL_GET_ASPECT_RATIO returns a display aspect ratio, not a pixel aspect ratio.
* lavc_conv: fix invalid writeGravatar wm42015-12-19
| | | | | Well shit. Restructure it such that the returned list is always NULL- terminated with the same mechanism.
* video: switch from using display aspect to sample aspectGravatar wm42015-12-19
| | | | | | | | | | | | | | | | MPlayer traditionally always used the display aspect ratio, e.g. 16:9, while FFmpeg uses the sample (aka pixel) aspect ratio. Both have a bunch of advantages and disadvantages. Actually, it seems using sample aspect ratio is generally nicer. The main reason for the change is making mpv closer to how FFmpeg works in order to make life easier. It's also nice that everything uses integer fractions instead of floats now (except --video-aspect option/property). Note that there is at least 1 user-visible change: vf_dsize now does not set the display size, only the display aspect ratio. This is because the image_params d_w/d_h fields did not just set the display aspect, but also the size (except in encoding mode).
* vf: remove old config() callbackGravatar wm42015-12-19
|
* vf: flush before reconfigGravatar wm42015-12-19
|
* vo_opengl: disable pbo by defaults for opengl-hqGravatar wm42015-12-19
| | | | Too many problems.
* vo_opengl: handle alpha with odd bit widths tooGravatar wm42015-12-19
| | | | | | | | | | | | | | | Since alpha isn't pulled through the colormatrix (maybe it should?), we reject alpha formats with odd sizes, such as yuva444p10. But the awful tex_mul path in vo_opengl does this anyway (at some points even explicitly), which means there will be a subtle difference in handling of 16 bit yuv alpha formats. Make it consistent and always apply the range adjustment to the alpha component. This also means odd sizes like 10 bit are supported now. This assumes alpha uses the same "shifted" range as the yuv color channels for depths larger than 8 bit. I'm not sure whether this is actually the case.
* vo_opengl: cocoa: output premultiplied alphaGravatar wm42015-12-19
| | | | | Which is apparently what is expected here. (I'm pretty sure X11 compositors want stright alpha, so 2 code paths are needed.)
* vo_opengl: prefix per-backend source files with context_Gravatar wm42015-12-19
|
* vo_opengl: split backend code from common.c to context.cGravatar wm42015-12-19
| | | | | | | | Now common.c only contains the code for the function loader, while context.c contains the backend loader/dispatcher. Not calling it "backend.c", because the central struct is called MPGLContext.
* vo_opengl: x11egl: retrieve framebuffer depthGravatar wm42015-12-19
| | | | | | | | | | This is used for dithering, although I'm not aware of anyone who got higher than 8 bit depth support to work on Linux. Also put this into egl_helpers.c. Since EGL is pseudo-portable at best I have no hope that the EGL context creation code in all the backends can be fully shared. But some self-contained functionality can definitely be shared.
* vo_opengl: refactor how framebuffer depth is passed from backendsGravatar wm42015-12-19
| | | | | | | | | | | Store the determined framebuffer depth in struct GL instead of MPGLContext. This means gl_video_set_output_depth() can be removed, and also justifies adding new fields describing framebuffer/backend properties to struct GL instead of having to add more functions just to shovel the information around. Keep in mind that mpgl_load_functions() will wipe struct GL, so the new fields must be set before calling it.
* vo_opengl: cocoa: implement alpha window supportGravatar wm42015-12-19
| | | | | With --vo=opengl:alpha=yes, the Cocoa backend will now render alpha video without background.
* man: fix grammar issuesGravatar Martin Herkt2015-12-19
|
* vo_opengl: fix "win" backend nameGravatar wm42015-12-19
| | | | | | | Although the source file is named w32.c, the backend name was "win" until recently. It was accidentally changed to "w32"; fix it. Fixes #2608 (the manual is correct).
* csputils: update MP_STEREO3D_COUNTGravatar Paul B Mahol2015-12-19
| | | | | | | | | | This actually alows to playback alternating videos with mpv. Tested with actual file found in wild remuxed to mkv and changed props with following command: mkvpropedit /tmp/o.mkv --edit track:1 -s stereo-mode=13 Signed-off-by: Paul B Mahol <onemda@gmail.com>
* csputils: let mpv recognise frame sequenced 3D matroska videosGravatar Paul B Mahol2015-12-18
| | | | | | Do actually such files exist? Signed-off-by: Paul B Mahol <onemda@gmail.com>