summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* af_lavrresample: minor simplificationwm42015-04-121-4/+4
| | | | | The in/out pointers usually have not much meaning outside of AF_CONTROL_REINIT. Also remove the redundant casts.
* af_lavrresample: allow resetting output sample formatwm42015-04-121-2/+3
| | | | It must be allowed to set format==0.
* audio/filter: fully renegotiate audio formats on every reconfigwm42015-04-121-0/+10
| | | | | | | | | | | | | | | | | | | It could happen that a lavrresample filter would keep its old output format when the decoder changed its output format. This simply happened because the output format was never reset. Normally, this was not an issue, because lavrresample filters only inserted for format conversion were removed on format changes. But if --no-audio-pitch-correction is set and playback speed is changed, then there is a "permanent" lavrresample filter in the filter chain, which shows this behavior. Fix by explicitly resetting output formats for all filters which support it. Note: this can crash with libswresample in some cases. I'm not sure if this is mpv's fault or libswresample's, but since it works with libavresample, I'm going to assume it's not our's.
* DOCS/waf: Edit --enable-feature sentencesrobin2015-04-121-2/+3
| | | | | | | The gender specific pronoun is changed, since we shouldn't assume the gender of the user. The sentence itself is also changed to be more correct in general.
* vo_opengl: slightly simplify check_gl_features()wm42015-04-111-25/+12
| | | | | | | | | | Not sure why this was so roundabout; probably to keep spam down if the user's OpenGL drivers are crap (but then just don't enable extended features), or because the "Disabling..." text was so repetitious. But there doesn't seem to be a good reason after all. Also, this could already overflow the fixed size disabled[] array. Just print the messages directly.
* vo_opengl: unify blend-subtitles-res and blend-subtitleswm42015-04-113-20/+12
|
* vo_opengl: fix blend-subtitles-res=video & anamorphic videowm42015-04-111-1/+6
| | | | | Since scaling the video changes the aspect ratio, we have to compensate for this when rendering subtitles.
* manpage: mention how pseudo-gui mode is enabled on win32wm42015-04-111-2/+7
|
* main-fn-win: fix handle validity check for XPJames Ross-Gowan2015-04-111-1/+2
| | | | | | | Apparently the standard handles can be set to bogus values on XP. Use GetFileType to check whether they refer to an actual file/pipe/etc. The logic used by is_valid_handle() is now pretty similar to what the CRT uses to check for valid stdio handles.
* win32: use pseudo-gui profile when started without stdioJames Ross-Gowan2015-04-111-6/+35
| | | | | | If mpv is started from Explorer or the Start Menu, it will have no console and no standard IO handles. In this case, it's fairly safe to enable the pseudo-gui profile.
* win32: only attach to the console from mpv.comJames Ross-Gowan2015-04-114-13/+49
| | | | | | | | | | | | | | | | | | | Previously, mpv.exe used the --terminal option to decide whether to attach to the parent process's console, which made it impossible to tell whether mpv would attach to the console before the config files were parsed. Instead, make mpv always attach to the console when launched from the console wrapper (mpv.com) and never attach otherwise. This will be useful for the next commit, which will use the presence of the console to decide whether to use the pseudo-gui profile. This change should also be an improvement in behavior. The old code would attach to the parent process's console, regardless of whether it was mpv.com or some other program like cmd.exe. This could be confusing, since mpv.exe is marked as a Windows GUI program and shouldn't write text to its parent process's console when launched directly. (See #768.) Visual Studio does something similar with its devenv.com wrapper. devenv.exe only attaches to the console when launched from devenv.com.
* win32: use a platform-specific unicode entry-pointJames Ross-Gowan2015-04-118-40/+32
| | | | | | | | | | Add a platform-specific entry-point for Windows. This will allow some platform-specific initialization to be added without the need for ugly ifdeffery in main.c. As an immediate advantage, mpv can now use a unicode entry-point and convert the command line arguments to UTF-8 before passing them to mpv_main, so osdep_preinit can be simplified a little bit.
* vo_opengl: add blend-subtitles-resNiklas Haas2015-04-103-4/+30
| | | | | This can be used to draw the subtitles at the video's native res, which can make them look more natural and increases performance.
* manpage: document pseudo-gui stuffwm42015-04-101-0/+28
|
* mp_image: remove redundant flags fieldwm42015-04-103-8/+6
| | | | | | | Because gcc (and clang) is a goddamn PITA and unnecessarily warns if the universal initializer for structs is used (like mp_image x = {}) and the first member of the struct is also a struct, move the w/h fields to the top.
* mp_image: remove redundant chroma_x/y_shift fieldswm42015-04-105-13/+9
|
* mp_image: remove redundant plane_w/h fieldswm42015-04-104-21/+31
| | | | Seems relatively painful in this case, but they are morally wrong.
* player: use config parser for setting up pseudo-gui profilewm42015-04-103-11/+12
|
* player: change pseudo-gui settingswm42015-04-101-2/+1
| | | | | | Remove --keep-open. Switch to --idle=once. This effectively makes the player quit after end of playback, but still shows the idle screen if it was started with no files.
* vo_opengl: use correct texture coordinates for nv12wm42015-04-101-1/+1
|
* ao_coreaudio: fix inverted conditionwm42015-04-101-3/+4
| | | | And also use the correct type for the printf call below.
* player: do not accidentally init terminalwm42015-04-101-2/+1
| | | | | | | Starting the command line player with --no-terminal, the terminal was sitll initialized. This happened because update_logging() used the option value before the options were parsed. Fix by moving down the initialization to before the point where it's actually needed.
* README: remove dead linkwm42015-04-101-1/+1
|
* mp_image: fix buildwm42015-04-091-2/+0
|
* mp_image: get rid of chroma_width/height fieldswm42015-04-092-7/+4
| | | | | | | They are redundant. They were used by draw_bmp.c only, and only in a special code path that 1. used fixed image formats, and 2. had image sized perfectly aligned to chroma boundaries (so computing the chroma width/height is trivial).
* screenshots: drop some useless jpeg writer optionswm42015-04-091-11/+0
|
* screenshots: write jpg files with original subsamplingwm42015-04-091-1/+5
| | | | | A screenshot from a 4:2:0 video will use 4:2:0, RGB will use 4:4:4, and so on. (The image data still goes through RGB conversion always.)
* Update README.mdCris2015-04-091-20/+42
| | | | Signed-off-by: wm4 <wm4@nowhere>
* ytdl: set additional properties for rtmp streamsSebastian Mayr2015-04-091-3/+21
|
* opengl: win32 - add option 'dwmflush' to sync in DWMAvi Halachmi (:avih)2015-04-094-0/+69
| | | | | | | This could help in cases where the DWM (Windows desktop compositor) adds another layer of bufferring and therefore the SwapBuffers timing could get messed up. Signed-off-by: wm4 <wm4@nowhere>
* opengl: smoothmotion: wake up for next vsync a bit earlierAvi Halachmi (:avih)2015-04-091-1/+1
| | | | | | | | on my windows system this allows smoothmotion to work perfectly also in windowed mode. There's no real right or wrong here, with the the only goal being to always hit the next vsync. however, on cases where vsync timing is jittery (as could happen with DWM), this patch tries to aim to the middle of the vsync cycle to get as least affected as possible by such jitter.
* opengl: drop less frames when clip and display have similar fpsAvi Halachmi (:avih)2015-04-091-1/+9
| | | | | | | | adds 1 vsync interval "slack" before deciding to drop the first frame. it should help on cases of timing jitter (sleep duration, container timestamps, compositor vsync timing, etc). once the drop threshold has been crossed, it will keep dropping until perfect timing alignment. this prevents crossing the drop threshold back and forth repeatedly and therefore more resilient to frame drops
* ytdl_hook.lua: Disable video when vid option is "no"robin2015-04-091-0/+7
| | | | | | When setting options like --no-video, ytdl_hook adds the "-x" argument to youtube-dl, so that bandwith is saved by not downloading the video on some sites.
* vo_opengl_cb: deprecate mpv_opengl_cb_render()wm42015-04-097-24/+42
| | | | Its vp parameter made no sense anymore. Introduce a new one.
* vo_opengl_cb: add a function to report vsync timewm42015-04-098-1/+48
| | | | | | | And also let vo.c know of it. Currently, this does not help much, but will facilitate future improvements.
* vo_opengl_cb: fix video timing somewhatwm42015-04-091-2/+2
| | | | | | | | | | | | | | | | | | Increase the default queue size. This helps with "missed" frames due to the asynchronous nature of the API. All the other VOs are synchronous, so if rendering and displaying takes a while, the common code in vo.c will be blocked until it can continue. But with opengl-cb, vo.c might immediately push the next ready frame, which causes the current frame to be dropped _if_ it wasn't rendered yet. One could fix this by making vo.c wait a while (until the API user calls the render function, which pulls the frame). But setting the default queue size to 2 seems much simpler: instead of dropping the frame, it will be pushed to the API user once the next renderer call finishes. (This is still a bit strange, and will hopefully be cleaned up when video scheduling is redone, but for now this appears to deliver relatively good results.)
* vo_opengl: log used GLXFBConfigwm42015-04-091-0/+1
| | | | | Now don't ask me why the GLXFBConfig type is a pointer, but stores an integer ID.
* vo_opengl: remove unused functionwm42015-04-092-6/+0
|
* sub: don't truncate timestamps to intwm42015-04-081-1/+1
| | | | | Realistically probably no problem at all since they're in ms and usually start from 0, but whatever.
* sub: unprefer libavcodec's MicroDVD converterwm42015-04-081-1/+1
| | | | | | | | | | Prefer the builtin one again. libavcodec still uses the ASS packet format that uses inline timestamps, so the packet timestamps are ignored. This again leads to additional rounding of timestamps, because the ASS storage format only has 10ms resolution (instead of 1ms resolution like libass). This again can lead to unintentional overlaps when converting subtitles. The internal MicroDVD converter avoids this, because it always uses packet timestamps.
* manpage: lua: clarify timer usagewm42015-04-081-0/+17
| | | | | | This seems to come up often. I guess '.' vs. ':' for Lua calls is confusing, and this part of the scripting API is the only one which requires using it.
* audio: automatically deatch filters if spdif prevents their usewm42015-04-072-5/+17
| | | | Fixes #1743 and partially #1780.
* audio: change a detail about filter insertionwm42015-04-074-28/+15
| | | | | | | | | | The af_add() function has a problem: if the inserted filter returns AF_DETACH during init, the function will have a dangling pointer. Until now this was avoided by making sure none of the used filters actually return AF_DETACH, but it's getting infeasible. Solve this by requiring passing an unique label to af_add(), which is then used instead of the pointer.
* ao_alsa: change log outputwm42015-04-071-12/+15
| | | | | | | | Silence the usually user-visible warning about unsupported channel maps. This might be an ALSA bug, but ALSA will never fix this behavior anyway. (Or maybe it's a feature.) Log some other information that might be useful.
* audio: avoid one more redundant audio filter reinitwm42015-04-071-2/+2
| | | | | | Only reinit filters if it's actually needed. This is also slightly easier to understand: if you look at the code, it should now be more obvious why a reinit is needed (hopefully).
* ao_coreaudio: do not error if retrieving info for verbose mode failswm42015-04-071-6/+6
| | | | | | The message log level shouldn't get to decide whether something fails or not. So replace the fatal error check on the verbose output code path with a warning.
* travis: re-enable OSXwm42015-04-071-1/+1
| | | | Let's see if it works better now.
* video/out: fix screenshot image formatswm42015-04-073-3/+3
| | | | | | | Use variants without alpha. I skipped vo_sdl, because format selection seems a bit more complicated here, and nobody cares about vo_sdl anymore.
* vdpau: don't use a transparent image format for screenshotswm42015-04-071-1/+1
| | | | Fixes #1779.
* screenshot: use GPU readback only for hardware decoded imageswm42015-04-071-1/+1
| | | | | | Avoids a confusing message printed by the vdpau code when taking a screenshot while using software decoding (because obviously GPU readback won't work on normal in-memory video frames).
* manpage: remove confusing statementwm42015-04-071-2/+1
| | | | | | There still might be FFmpeg demuxers which mess up if audio is disabled (like it happened to the FLV demuxer), but these are bugs and shouldn't happen.
* screenshots: select best image format the encoder supportswm42015-04-061-24/+34
| | | | | | | | | | | | | | | | | | This matters for png screenshots. We used to hardcode rgb24, but libavformat's png encoder can do much more. Use the image format list provided by the encoder, and select the best format from it (according to the source format). As a consequence, rgb48 (i.e. 16 bit per component) will be selected if the source format is e.g. 10 bit yuv. This happens in accordance to FFmpeg's avcodec_find_best_pix_fmt_of_list() function, which assumes that 16 bit rgb should be preferred for 10 bit yuv. This also causes it to print this message in this case: [ffmpeg] swscaler: full chroma interpolation for destination format 'rgb48be' not yet implemented I'm not 100% sure whether this is a problem.
* vaapi: fight with Intel's broken video decoding GL interopwm42015-04-052-25/+82
| | | | | | | | | | | | | | | | | | | | | | | | Use texture-from-pixmap instead of vaapi's "native" GLX support. Apparently the latter is unused by other projects. Possibly it's broken due that, and Intel's inability to provide anything non-broken in relation to video. The new code basically uses the X11 output method on a in-memory pixmap, and maps this pixmap as texture using standard GLX mechanisms. This requires a lot of X11 and GLX boilerplate, so the code grows. (I don't know why libva's GLX interop doesn't just do the same under the hood, instead of bothering the world with their broken/unmaintained "old" method, whatever it did. I suspect that Intel programmers are just genuine sadists.) This change was suggested in issue #1765. The old GLX support is removed, as it's redundant and broken anyway. One remaining issue is that the first vaPutSurface() call fails with an unknown error. It returns -1, which is pretty strange, because vaapi error codes are normally positive. It happened with the old GLX code too, but does not happen with vo_vaapi. I couldn't find out why.
* demux_lavf: use mimetype instead of codec type for embedded fontswm42015-04-051-9/+3
| | | | | | | We handle picking out font attachments by mime type ourselves in a higher level, so we really just want to use the mimetype. Also, Matroska is currently the only code in libavformat which uses the fonts at all, and we can drop use of the codec IDs completely.
* ao/wasapi: use atomic state variable instead of different eventsKevin Mitchell2015-04-044-65/+78
| | | | | | | | | Unfortunately, because we have proxy objects (pAudioVolumeProxy, pEndpointVolumeProxy, pSessionControlProxy) it looks like we still have to use MsgWaitForMultipleObjects and watch for and dispatch pending messages: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680112%28v=vs.85%29.aspx
* ao/wasapi: reorder priv membersKevin Mitchell2015-04-041-12/+14
|
* command: new subproperty for video-params: gammaNiklas Haas2015-04-042-0/+8
|
* vf_format: add gamma override optionNiklas Haas2015-04-042-0/+26
|
* vo_opengl: make csp options consistent with vf_formatNiklas Haas2015-04-042-29/+11
|
* csputils: add some missing colorspacesNiklas Haas2015-04-045-12/+110
| | | | | With target-prim and target-trc it makes sense to include some common colorspaces that aren't strictly speaking used for video.
* vo_opengl: minor cleanup of gamma-related functionsNiklas Haas2015-04-041-5/+4
|
* vo_opengl: blend-subtitles in non-linear lightNiklas Haas2015-04-041-35/+42
|
* man/vf: update vf_format documentationNiklas Haas2015-04-041-4/+3
| | | | Brings it in line with changes to vo_opengl options.
* vo_opengl: make jinc presets resizableNiklas Haas2015-04-042-9/+6
| | | | No real reason this is disabled with the new configuration API.
* vo_opengl: add scale-wparam optionNiklas Haas2015-04-042-8/+25
| | | | This lets us tune the window parameter
* filter_kernels: add haasnsoftNiklas Haas2015-04-041-0/+4
| | | | | | | This is a peculiar filter I stumbled upon while playing around with windows, it removes aliasing almost completely while not ringing at all. The downside is that it's quite blurry, but at high resolutions it's not so noticeable.
* filter_kernels: remove hermite windowNiklas Haas2015-04-041-1/+0
| | | | Will have to find a source before re-adding.
* filter_kernels: add bartlett, blackman and welch windowsNiklas Haas2015-04-041-1/+17
|
* vo_opengl: refactor scaler configurationNiklas Haas2015-04-045-141/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merges all of the scaler-related options into a single configuration struct, and also cleans up the way they're passed through the code. (For example, the scaler index is no longer threaded through pass_sample, just the scaler configuration itself, and there's no longer duplication of the params etc.) In addition, this commit makes scale-down more principled, and turns it into a scaler in its own right - so there's no longer an ugly separation between scale and scale-down in the code. Finally, the radius stuff has been made more proper - filters always have a radius now (there's no more radius -1), and get a new .resizable attribute instead for when it's tunable. User-visible changes: 1. scale-down has been renamed dscale and now has its own set of config options (dscale-param1, dscale-radius) etc., instead of reusing scale-param1 (which was arguably a bug). 2. The default radius is no longer fixed at 3, but instead uses that filter's preferred radius by default. (Scalers with a default radius other than 3 include sinc, gaussian, box and triangle) 3. scale-radius etc. now goes down to 0.5, rather than 1.0. 0.5 is the smallest radius that theoretically makes sense, and indeed it's used by at least one filter (nearest). Apart from that, it should just be internal changes only. Note that this sets up for the refactor discussed in #1720, which would be to merge scaler and window configurations (include parameters etc.) into a single, simplified string. In the code, this would now basically just mean getting rid of all the OPT_FLOATRANGE etc. lines related to scalers and replacing them by a single function that parses a string and updates the struct scaler_config as appropriate.
* vo_opengl: separate kernel and windowNiklas Haas2015-04-045-156/+225
| |