summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cookies: fix crashwm42013-01-241-3/+3
| | | | | This was broken in 3f85094 (probably merge mistake). I guess nobody ever uses this feature.
* vd_lavc: add stupid hack to fix decoding of some files with Libav 0.8.xwm42013-01-241-5/+8
| | | | | | | | | | The decoder returns with AVFrame.format not correctly set for some h264 files (strangely only some). We have to access AVCodecContext.pix_fmt instead. On newer libavcodec versions, it's the other way around: the AVCodecContext.pix_fmt may be incorrectly set on pixel format changes, and you are supposed to use AVFrame.format. The same problem probably exists on older ffmpeg versions too.
* sub: add stupid hack for vobsub decoding with Libavwm42013-01-241-1/+10
| | | | | | | If we detect Libav, always use the old builtin vobsub decoder (in spudec.c). Note that we do not want to use it for newer ffmpeg, as spudec.c can't handle the vobsub packets as generated by the .idx demuxer, and we want to get rid of spudec.c in general anyway.
* stream_cdda: support latest libcdio versionUoti Urpala2013-01-242-2/+32
|
* configure: for now reject the newer libcdio APIRudolf Polzer2013-01-241-1/+1
| | | | A patch supporting the newer API AND the older API is in the works.
* mp_msg, getch2: unix tty background supportRudolf Polzer2013-01-235-17/+124
| | | | | | | | Now, when backgrounded, mpv plays and outputs messages to stdout, but statusline is not output. Background<->foreground transitions are detected by signals and polling the process groups.
* vo_xv: always try to use native bit depthwm42013-01-231-5/+2
| | | | | | Exactly the same issue as with the previous commit. Just like the vdpau code, this was apparently copy-pasted from the vo_x11 code, even though it doesn't make much sense.
* vo_vdpau: always try to native bit depth (makes 30 bit work)wm42013-01-231-5/+2
| | | | | | | | | | | | | Using vdpau on an X server configured to a bit depth of 30 (10 bit per component) failed finding a visual. The cause was a hack that tried to normalize the bit depth to 24 if it was not a known depth. It's unknown why/if this is needed, but the following things speak against it: - it prevented unusual bit depths like 30 bit from working - it wasn't needed with normal bit depth like 24 bit - it's probably copy-pasted from vo_x11 (where this code possibly makes sense, unlike in vo_vdpau) Just remove this code and look for a visual with native depth.
* options: make --fullscreen not a global optionwm42013-01-231-2/+2
| | | | | | | This was disabled in 4ea60a3 and 70c455a, when all options were still forced file local, and resetting fullscreen was annoyingly reset when switching to the next file. mpv keeps all options by default, so this isn't needed anymore.
* video: remove -x/-y/-xy optionswm42013-01-235-53/+2
| | | | | | | | | | | | | | | -x/-y were rather useless and obscure. The only use I can see is forcing a specific aspect ratio without having to calculate the aspect ratio float value (although --aspect takes values of the form w:h). This can be also done with --geometry and --no-keepaspect. There was also a comment that -x/-y is useful for -vm, although I don't see how this is useful as it still messes up aspect ratio. -xy is mostly obsolete. It does two things: a) set the window width to a pixel value, b) scale the window size by a factor. a) is already done by --autofit (--autofit=num does exactly the same thing as --xy=num, if num >= 8). b) is not all that useful, so we just drop that functionality.
* video: add --autofit and --autofit-larger optionswm42013-01-237-2/+118
| | | | | | | | | --autofit=WxH sets the window size to a maximum width and/or height, without changing the window's aspect ratio. --autofit-larger=WxH does the same, but only if the video size is actually larger than the window size that would result when using the --autofit=WxH option with the same arguments.
* options: allow using % for width and height in --geometrywm42013-01-233-76/+106
| | | | | | | | | | | | | | | | | | | | Now all numbers in the --geometry specification can take percentages. Rewrite the parsing of --geometry, because adjusting the sscanf() mess would require adding all the combinations of using and not using %. As a side effect, using % and pixel values can be freely mixed. Keep the aspect if only one of width or height is set. This is more useful in general. Note: there is one semantic change: --geometry=num used to mean setting the window X position, but now it means setting the window width. Apparently this was a mplayer-specific feature (not part of standard X geometry specifications), and it doesn't look like an overly useful feature, so we are fine with breaking it. In general, the new parsing should still adhere to standard X geometry specification (as used by XParseGeometry()).
* options: move -geometry parsing to m_option.cwm42013-01-2313-163/+153
| | | | | | | | | This also means the option is verified on program start, not when the VO is created. The actual code becomes a bit more complex, because the screen width/height is not available at program start. The actual parsing code is still the same, with its unusual sscanf() usage.
* video: move handling of -x/-y/-xy options to VOwm42013-01-2311-88/+94
| | | | | | | | | Now the calculations of the final display size are done after the filter chain. This makes the difference between display aspect ratio and window size a bit more clear, especially in the -xy case. With an empty filter chain, the behavior of the options should be the same, except that they don't affect vo_image and vo_lavc anymore.
* cocoa_common: improved trackpad scrollingMad Fish2013-01-201-5/+45
|
* cocoa_common: handle all pending events instead of just oneMad Fish2013-01-201-19/+24
|
* ao_coreaudio: use 0 as timeout for CFRunLoopRunInModeMad Fish2013-01-201-1/+1
| | | | | | | Handle all pending events and exit instead of waiting. When there are lots of input events (for example, scrolling with trackpad), timeout can add up to make a huge frame delay. In my tests, if I scroll fast enough, that loop would never exit.
* video: reset filters on seekwm42013-01-205-0/+33
| | | | | | | | | | | | | | | | Drop queued frames on seek. Reset the internal state of some filters that seem to need it as well: at least vf_divtc still produced some frames using the previous PTS. This fixes weird behavior with some filters on seeking. In particular, this could lead to A/V desync or apparent lockups due to the PTS of filtered frames being too far away from audio PTS. This commit does only the minimally required work to fix these PTS related issues. Some filters have state dependent on previously filtered frames, and these are not automatically reset with this commit (even vf_divtc and vf_softpulldown reset the PTS info only). Filters that actually require a full reset can implement VFCTRL_SEEK_RESET.
* core: make gapless-audio also apply to format changes within a fileRudolf Polzer2013-01-181-1/+2
| | | | | | Format changes within a file can e.g. happen in MPEG-TS streams. This fix also fixes encoding of such files, because ao_lavc is not capable of reconfiguring the audio stream.
* encoding-example-profiles: typo fixesRudolf Polzer2013-01-181-3/+3
| | | | | The iPhone profiles recursively included themselves. Wonder why it even worked somewhat...
* vf_format: fix forcing output formatwm42013-01-171-1/+11
| | | | | This failed with an assert, because the format of the format of the output image was not set correctly.
* options: also accept ffmpeg pixel format nameswm42013-01-172-6/+20
| | | | | | | | | | | | Options that take pixel format names now also accept ffmpeg names. mpv internal names are preferred. We leave this undocumented intentionally, and may be removed once libswscale stops printing ffmpeg pixel format names to the terminal (or if we stop passing the SWS_PRINT_INFO flag to it, which makes it print these). (We insist on keeping the mpv specific names instead of dropping them in favor of ffmpeg's name due to NIH, and also because ffmpeg always appends the endian suffixes "le" and "be".)
* manpage: fix places that still treat FourCCs and pixel formats equalwm42013-01-172-13/+12
| | | | | | | | | | | | | | | The video filter chain traditionally used FourCCs for pixel formats. This was recently changed, but some parts of the manpage were not updated properly. Now there are two rypes of options: some which take a FourCC (as used with raw video formats), and some which take a symbolic format identifier (as used in the video filter chain). I realize that it's harder to specify FourCC for RGB formats now (TV stuff may need RGB). They use non-printable characters as part of the FourCC, and have to be specified as hexadecimal numbers (instead of a symbolic identifier). Because I can't be bothered to find out what these numbers are for the respective formats, just remove the old pseudo-FourCCs from the documentation.
* osxbundle: cocoa_common: change playlist on fileopen eventsStefano Pigozzi2013-01-163-0/+42
| | | | | | | When opening new files in Finder when `mpv` is running from an application bundle, the new files will now replace the current playlist. Fixes #14
* input: enqueue commands to the end of the queueStefano Pigozzi2013-01-161-1/+1
| | | | | `mp_input_queue_cmd` erroneusly added commands to the head of the queue resulting in LIFO behaviour instead of the intended FIFO.
* osxbundle: add header padding to the binaryStefano Pigozzi2013-01-161-0/+1
| | | | | This avoids install_name_tool to run out of header space when changing the paths to the dylibs.
* Silence two compiler warningswm42013-01-162-4/+2
| | | | Both should be harmless.
* vo_opengl_old: add missing include statementwm42013-01-151-0/+1
| | | | | | <ctype.h> is needed at least for isalnum(). Most time this worked, because some ffmpeg or Libav versions recursively include this header from libavutil/common.h. Fix it so it always works.
* vo_sdl: I think the XVidmode hack is no longer neededRudolf Polzer2013-01-151-5/+0
| | | | I can no longer reproduce the XVidmode related hang.
* vo_sdl: request "desktop" fullscreen mode if -vm is not usedRudolf Polzer2013-01-151-8/+7
| | | | | This is a lot cleaner than our current workaround that first queries the desktop resolution.
* vo_corevideo: make compile with recent changesStefano Pigozzi2013-01-151-1/+1
| | | | Width and height were removed from mp_image. Use w and h instead.
* video: print filter chain in verbose modewm42013-01-143-10/+42
| | | | | Somewhat useful to see where filters are auto-inserted and which formats they take.
* img_format: do not mark hwaccel formats as planar yuv formatswm42013-01-141-7/+8
|
* gl_common: move things used by vo_opengl_old.c only to vo_opengl_old.cwm42013-01-133-1244/+1241
| | | | Having this in gl_common is confusing.
* vd_lavc: remove -lavdopts vstats suboptionwm42013-01-134-100/+0
| | | | | | This printed per-frame statistics into a file, like bitrate or frame type. Not very useful and accesses obscure AVCodecContext fields (danger of deprecation/breakage), so get rid of it.
* vd_lavc: remove lowres decodingwm42013-01-133-25/+2
| | | | | | | | | | This was a "broken misfeature" according to Libav developers. It wasn't implemented for modern codecs (like h264), and has been removed from Libav a while ago (the AVCodecContext field has been marked as deprecated and its value is ignored). FFmpeg still supports it, but isn't much useful due to aforementioned reasons. Remove the code to enable it.
* vo_x11: use two buffers like XvRudolf Polzer2013-01-131-71/+94
|
* vo_x11, vo_xv: XShmCompletion event supportRudolf Polzer2013-01-134-16/+73
| | | | This fixes OSD flicker with vo_xv at high frame rates.
* sub: add experimental --force-rgba-osd-rendering switchwm42013-01-134-1/+16
|
* draw_bmp: use multiple bounding boxeswm42013-01-131-27/+20
| | | | | Seems to make it about up to 20% faster in some cases. Slightly slower in some others.
* img_convert: use multiple bounding boxes for ASS->RGBAwm42013-01-131-26/+47
| | | | | | Should be more efficient in situations both subtitles and toptitles are shown, because no blending has to be performed for the video between them.
* img_convert: add sub_bitmap bounding box functionswm42013-01-135-25/+97
| | | | mp_sub_bitmaps_bb is just sub_bitmaps_bb renamed/moved.
* mp_common: add some rectangle utility functionswm42013-01-132-0/+26
|
* draw_bmp: don't copy Y plane on up/down-samplingwm42013-01-131-5/+46
| | | | | | | | | | | Image areas with subtitles are upsampled to 4:4:4 in order to render the subtitles (makes blending easier). Try not to copy the Y plane on upsampling. The libswscale API requires this, but this commit works it around by scaling the chroma planes separately as AV_PIX_FMT_GRAY8. The Y plane is not touched at all. This is done for 420p8 only, which is the most commonly needed case. For other formats, the old way is used. Seems to make ASS rendering faster about 15% in the setup I tested.
* draw_bmp: do not reallocate upsample temp image on each framewm42013-01-131-2/+14
| | | | Doesn't seem to help too much...
* draw_bmp: refactorwm42013-01-131-17/+31
|
* draw_bmp: always allocate cachewm42013-01-131-26/+25
| | | | | | Allocate it even if it's needed. The actually done work is almost the same, except that the code is a bit simpler. May need more memory at once for RGB subs that use more than one part, which is rare.
* vo_direct3d: remove 2ch hack for 10 bit playbackwm42013-01-134-270/+5
| | | | | | | | | | | This was an awkward hack that attempted to avoid the use of 16 bit textures, while still allowing rendering 10-16 bit YUV formats. The idea was that even if the hardware doesn't support 16 bit textures, an A8L8 textures could be used to convert 10 bit (etc.) to 8 bit in the shader, instead of doing this on the CPU. This was an experiment, disabled by default, and was (probably) rarely used. I've never heard of this being used successfully. Remove it.
* vo_sdl: avoid copying just for taking screenshotswm42013-01-131-5/+3
| | | | Use reference counting instead.
* vd_lavc: prefer AVFrame over AVCodecContext fieldswm42013-01-131-18/+17
| | | | | | This is more correct. Not all frame specific fields are in AVFrame, such as colorspace and color_range, and these are still queried through the decoder context.
* mp_image: remove mp_image.bppwm42013-01-135-12/+5
| | | | | | | | This field contained the "average" bit depth per pixel. It serves no purpose anymore. Remove it. Only vo_opengl_old still uses this in order to allocate a buffer that is shared between all planes.
* imgfmt: add more ffmpeg pixel formatswm42013-01-133-2/+136
| | | | | | Most of these probably don't have much actual use, but at least allow images of these formats to be handed to swscale, should any decoder output them.
* img_format: change meaning of MP_IMGFLAG_PLANARwm42013-01-132-2/+2
| | | | | | | | | | | | | This used to mean that there is more than one plane. This is not very useful: IMGFMT_Y8 was not considered planar, but it's just a Y plane, and could be treated the same as actual planar formats. On the other hand, IMGFMT_NV12 is partially packed, and usually requires special handling, but was considered planar. Change its meaning. Now the flag is set if the format has a separate plane for each component. IMGFMT_Y8 is now planar, IMGFMT_NV12 is not. As an odd special case, IMGFMT_MONO (1 bit per pixel) is like a planar RGB format with a single plane.
* vf_sub: allow more formats, simplify codewm42013-01-131-82/+15
| | | | | | | | | In theory, vf_sub could take any format supported by swscale. But to be sure that it's reasonably fast, only 420P was allowed. However, other similar 8 bit planar formats will be just as fast and there's no reason to exclude them. Even for completely different formats there doesn't seem to be any significant advantage to force vf_sub to convert to a simpler/more common format.
* vf_expand: support more image formatswm42013-01-134-109/+88
| | | | | | | | | | | This did random things with some image formats, including 10 bit formats. Fixes the mp_image_clear() function too. This still has some caveats: - doesn't clear alpha to opaque (too hard with packed RGB, and is rarely needed) - sets luma to 0 for mpeg-range YUV, instead of the lowest possible value (e.g. 16 for 8 bit)
* vf_rotate: support more image formatswm42013-01-131-34/+25
|
* vf_softpulldown: reject unsupported image formats, fix code duplicationwm42013-01-131-47/+24
| | | | Not really tested.
* vf_yadif: Y8 is not supportedwm42013-01-131-1/+0
| | | | Crashes.
* vf_swapuv: support more image formatswm42013-01-131-12/+8
|
* vf_pullup: remove check for MP_IMGFLAG_PLANARwm42013-01-131-4/+0
| | | | It supports 420p only, so the check is useless.
* vf_phase: reject unsupported image formatswm42013-01-131-21/+20
| | | | Also don't use MP_IMGFLAG_PLANAR.
* vf_mirror: rewritewm42013-01-131-65/+52
| | | | | Properly handle odd image sizes. Probably makes it work with more image formats.
* vf_gradfun: does not work with NV pixel formatswm42013-01-131-2/+0
|
* vf_flip: make it work with more image formatswm42013-01-131-15/+15
|
* vf_divtc: reduce code duplicationwm42013-01-131-14/+7
|
* vf_crop: make it work with more image formatswm42013-01-132-39/+24
|
* vf: add vf_rescale_dsize()wm42013-01-132-0/+18
| | | | | | | | Needed because mplayer* basically tracks DAR, which makes it harder for filters which want to keep the SAR. The contents of this function are duplicated in a few filters, and will be used instead of custom code as the filters are updated later.
* mp_image: add mp_image_crop()wm42013-01-135-12/+35
| | | | Actually stolen from draw_bmp.c.
* vo_image: render subswm42013-01-131-15/+36
| | | | | | | | This makes it behave like vo_lavc. Unfortunately, the code for setting up the OSD dimensions (mp_osd_res) is copied from vo_lavc, but it doesn't look like something that should be factored out.
* vo_xv: fix OSD redrawing flickerwm42013-01-131-13/+11
| | | | | | | | redraw_frame() copied the image into the currently visible buffer. This resulted in flicker when doing heavy OSD redrawing (like changing the subtitle size to something absurdly large). Use the same logic as draw_image instead.
* vo_xv, vo_x11: simplify OSD redrawingwm42013-01-136-179/+39
| | | | | | | | | | | | | In order to support OSD redrawing for vo_xv and vo_x11, draw_bmp.c included an awkward "backup" mechanism to copy and restore image regions that have been changed by OSD/subtitles. Replace this by a much simpler mechanism: keep a reference to the original image, and use that to restore the Xv/X framebuffers. In the worst case, this may increase cache pressure and memory usage, even if no OSD or subtitles are rendered. In practice, it seems to be always faster.
* sub: