aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
Commit message (Collapse)AuthorAge
* cocoa: switch to CGL APIs for GL context creationGravatar Stefano Pigozzi2014-06-15
| | | | | CGL APIs are lower level thus giving us better control and more options for the context creation.
* gl_w32: remove unused variableGravatar wm42014-06-14
|
* video: cosmetics: reformat image format names tableGravatar wm42014-06-14
|
* video: synchronize mpv rgb pixel format names with ffmpeg namesGravatar wm42014-06-14
| | | | | | | | | | | This affects packed RGB formats up to 16 bits per pixel. The old mplayer names used LSB-to-MSB order, while FFmpeg (and some other libraries) use MSB-to-LSB. Nothing should change with this commit, i.e. no bit order or endian bugs should be added or fixed. In some cases, the name stays the same, even though the byte order changes, e.g. RGB8->BGR8 and BGR8->RGB8, and this affects the user-visible names too; this might cause confusion.
* video: automatically strip "le" and "be" suffix from pixle format namesGravatar wm42014-06-14
| | | | | | | | | | | | | These suffixes are annoying when they're redundant, so strip them automatically. On little endian machines, always strip the "le" suffix, and on big endian machines vice versa (although I don't think anyone ever tried to run mpv on a big endian machine). Since pixel format strings are returned by a certain function and we can't just change static strings, use a trick to pass a stack buffer transparently. But this also means the string can't be permanently stored by the caller, so vf_dlopen.c has to be updated. There seems to be no other case where this is done, though.
* options: remove OPT_FLAG_CONSTANTSGravatar wm42014-06-13
| | | | | | | This means use of the min/max fields can be dropped for the flag option type, which makes some things slightly easier. I'm also not sure if the client API handled the case of flag not being 0 or 1 correctly, and this change gets rid of this concern.
* vd_lavc: use option parser for skip suboptionsGravatar wm42014-06-13
|
* vd_lavc: make option struct localGravatar wm42014-06-11
| | | | | Removes specifics from options.h and options.c, and puts everything into vd_lavc.c.
* vf_noise: remove global variablesGravatar wm42014-06-11
|
* vf_divtc: remove a global variableGravatar wm42014-06-11
|
* Add more constGravatar wm42014-06-11
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* vo_caca: remove global variablesGravatar wm42014-06-11
| | | | The shit I put up with...
* options: remove global variables for swscale options; rename themGravatar wm42014-06-11
| | | | | | Additionally to removing the global variables, this makes the options more uniform. --ssf-... becomes --sws-..., and --sws becomes --sws- scaler. For --sws-scaler, use choices instead of magic integer values.
* video: fix another cover art corner caseGravatar wm42014-06-09
| | | | | | | Playing a video and then an audio file with cover art kept displaying the last frame of the video. This was because the hasframe flag was set, perhaps due to redrawing the last video frame before the cover art image is decoded.
* x11: cleanup motif hints handlingGravatar wm42014-06-06
| | | | | | | | It seems we can't really get rid of this. There are no other hints to remove decorations that work across all reasonable WMs, so we're stuck with the ugly motif stuff. But at least we can make the code for it less ugly.
* filter_kernels: fix nearest scalerGravatar wm42014-06-04
| | | | | | | | | | The previous commit assumed the filter would be 1x1 (then constant weight is correct) - but our code in fact uses at least a 2x2 filter. A 1x1 filter would generally be useless, except for nearest scaling - so it didn't exist. Insteasd of adding such a 1x1 filter, just turn the nearest weight function into a scare function, which should take care of the issue.
* filter_kernels: add nearest neighbour scalingGravatar lucy2014-06-03
| | | | | | This is useful for playing content containing pixel art that hasn't been pre-scaled, such as TASVideos' high quality encodes. The implementation is lifted from <https://code.google.com/p/glumpy/source/browse/glumpy/image/filter.py#413>.
* wayland: remove stub for unimplemented functionGravatar wm42014-06-02
|
* vo: correctly initialize parameters in corner casesGravatar wm42014-06-01
|
* player: hide audio/video codec and file format messagesGravatar wm42014-05-31
| | | | | None of these are very important usually. For error analysis, the plain log is useless anyway, and this information is still printed with "-v".
* gl_common: remove dlsym() fallbackGravatar wm42014-05-31
| | | | See previous commits.
* gl_wayland: remove probably unneeded workaroundGravatar wm42014-05-31
| | | | | | | | This would imply eglGetProcAddress() doesn't work correctly, but using dlsym() does. For now get rid of it - it won't work in libmpv, and we'll probably need a better workaround if it's still broken. This code was in the initial wayland commit.
* gl_x11: remove workaround for PPC OSX 10.4Gravatar wm42014-05-31
| | | | | Added in 2010 with commit 4a8486f8 (svn commit 30994). I doubt anyone still uses X11 on OSX, and we probably don't support 10.4 either.
* gl_x11: always require some GLX API functions, avoid dlsym()Gravatar wm42014-05-31
| | | | | | | | | | | | | | The functions glXGetProcAddressARB() and glXQueryExtensionsString() were loaded using dlsym(). This could fail when compiling to libmpv, because then dlopen(NULL, ...) will look in the main program's list of libraries, and the libGL linked to libmpv is never considered. (Don't know if this somehow could be worked around.) The result is that using vo_opengl with libmpv can fail. Avoid this by not using dlsym(). glXGetProcAddressARB() was already used directly in the same file, and that never caused any problems. (Still add it to the configure test.) glXQueryExtensionsString() is documented as added in GLX 1.1 - that's ancient.
* vd_lavc: set video bitrate if availableGravatar Marcoen Hirschberg2014-05-28
| | | | Set the bitrate of dec_video if it is available in avcodec.
* audio: rename i_bps to 'bitrate' to avoid confusionGravatar Marcoen Hirschberg2014-05-28
| | | | Since i_bps now contains bits/sec, rename it to reflect this change.
* audio: change values from bytes-per-second to bits-per-secondGravatar Marcoen Hirschberg2014-05-28
| | | | | | | The i_bps members of the sh_audio and dev_video structs are mostly used for displaying the average audio and video bitrates. Keeping them in bits-per-second avoids truncating them to bytes-per-second and changing them back lateron.
* vaapi: fix destruction with --hwdec=haapi-copyGravatar wm42014-05-28
| | | | | | | This is incomplete; the video chain will still hold some vaapi objects after destroying the decoder and thus the vaapi context. This is very bad. Fixing it would require something like refcounting the vaapi context, but I don't really want to.
* video: warn if an emulated hwdec API is usedGravatar wm42014-05-28
| | | | | | | | | | | | | | | | mpv supports two hardware decoding APIs on Linux: vdpau and vaapi. Each of these has emulation wrappers. The wrappers are usually slower and have fewer features than their native opposites. In particular the libva vdpau driver is practically unmaintained. Check the vendor string and print a warning if emulation is detected. Checking vendor strings is a very stupid thing to do, but I find the thought of people using an emulated API for no reason worse. Also, make --hwdec=auto never use an API that is detected as emulated. This doesn't work quite right yet, because once one API is loaded, vo_opengl doesn't unload it, so no hardware decoding will be used if the first probed API (usually vdpau) is rejected. But good enough.
* vo_vaapi: cleanup error handling on initGravatar wm42014-05-28
| | | | Close the X connection if initializing vaapi fails.
* video: better handling for (very) broken timestampsGravatar wm42014-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, Matroska files store monotonic PTS for h264 tracks with b-frames, which means the decoder actually returns non-monotonic PTS. Handle this with an evil trick: if DTS is missing, set it to the PTS. Then the existing logic, which deals with falling back to DTS if PTS is broken. Actually, this trick is not so evil at all, because usually, PTS has no errors, and DTS is either always set, or always unset. So this _should_ provoke no regressions (famous last words). libavformat actually does something similar: it derives DTS from PTS in ways unknown to me. The result is very broken, but it causes the DTS fallback to become active, and thus happens to work. Also, prevent the heuristic from being active if PTS is merely monotonic instead of strictly-monotonic. Non-unique PTS is broken, but we can't fallback to DTS anyway in these cases. The specific mkv file that is fixed with this commit had the following fields set: Muxing application: libebml v1.3.0 + libmatroska v1.4.1 Writing application: mkvmerge v6.7.0 ('Back to the Ground') [...] But I know that this should also fix playback of mencoder produced mkv files.
* gl_common: minor cosmetic changesGravatar wm42014-05-26
| | | | Why are you reading this message.
* gl_common: correct a typeGravatar wm42014-05-26
| | | | | | | We pass a pointer to a GLint to sscanf, using the %d format. That format _always_ takes int, and not GLint (whatever the heck that is). If GLint is always int, then it doesn't make a difference, but is still better because it doesn't play russian roulette with pointers.
* gl_w32: remove some non-senseGravatar wm42014-05-26
| | | | Really now...
* vo_opengl: always dynamically load OpenGL symbolsGravatar wm42014-05-26
| | | | | | | | | | | | | | Don't emit "hard" references to OpenGL functions. Always use the platform specific function to lookup OpenGL functions, such as glXGetProcAddress() with GLX (x11). This actually fixes the build if only Wayland is enabled (e.g. using --disable-gl-x11 on Linux). Note that some sources claim that wglGetProcAddress() (win32) does not return function pointers for OpenGL 1.1 functions (even if they are valid and necessary in OpenGL 3.0). But if that happens, the fallback employed in gl_w32.c/w32gpa() should catch this.
* x11: fix restoring position when leaving fullscreenGravatar wm42014-05-26
| | | | Accidentally broken in commit 7163bf7d by inverting the condition.
* x11: fix datatype for _NET_WM_PIDGravatar wm42014-05-26
| | | | | | | | | | Setting this property was added 12 years ago, and the code was always incorrect. The underlying data type is "long", not "pid_t". It's well possible that the data types are different, and the pointer to the pid variable is directly passed to XChangeProperty, possibly invoking undefined behavior. It's funny, because in theory using pid_t for PIDs sounds more correct.
* vf_vdpaupp: cosmetics: rename functionGravatar wm42014-05-25
|
* video: add --video-rotate option for controlling auto-rotationGravatar wm42014-05-24
|
* x11: un-inline GNOME layer stuffGravatar wm42014-05-23
| | | | | | Having it as separate function is not useful. Also remove the useless vo_window parameter.
* x11: prefer NetWM hints over _WIN_LAYER for --ontopGravatar wm42014-05-23
| | | | | | | _WIN_LAYER is apparently an old GNOME thing (also explains why there is a function vo_x11_get_gnome_layer() involved in this code). Prefer the NetWM hints over this. This just moves the NetWM case if-body over the _WIN_LAYER one.
* x11: rename identifiers using reserved namespaceGravatar wm42014-05-23
| | | | | | | You can't use identifiers starting with "_" and an uppercase letter in application programs. They are reserved by the C standard. Unrelated change: drop unused/misleading vo_wm_NETWM define.
* x11: fix NetWM ontop settingGravatar wm42014-05-23
| | | | | | | I can only assume the old code was wrong. EWMH does not document anything with _WIN_LAYER. Instead, you have to toggle the state using a client message. We also remove these weird non-sense fallbacks, like using _NET_WM_STATE_BELOW - what the hell?
* x11: add a generic function for NetWM state settingGravatar wm42014-05-23
| | | | And use it for fullscreening. It will also be used for fixing --ontop.
* vdpau: move RGB surface management out of the VOGravatar wm42014-05-22
| | | | | | | | | | Integrate it with the existing surface allocator in vdpau.c. The changes are a bit violent, because the vdpau API is so non-orthogonal: compared to video surfaces, output surfaces use a different ID type, different format types, and different API functions. Also, introduce IMGFMT_VDPAU_OUTPUT for VdpOutputSurfaces wrapped in mp_image, rather than hacking it. This is a bit cleaner.
* vo_vdpau: always allocate the black pixelGravatar wm42014-05-22
| | | | | | black_pixel is an (apparently necessary) 1x1 black surface used for clearing the screen. It was allocated in RGB mode only, but is sometimes used in YUV mode too.
* x11: fix a warning with --disable-xextGravatar Jerome Leclanche2014-05-22
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vo: minor simplificationsGravatar wm42014-05-22
|
* vo: remove config_ok check from vo_check_events()Gravatar wm42014-05-22
| | | | This should be ok now after the x11 code was adjusted.
* vo_vaapi: don't redraw twiceGravatar wm42014-05-22
| | | | | After VOCTRL_REDRAW_FRAME, flip_page is called, which renders the frame. The current code rendered the frame twice; drop the redundant call.