summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* af_lavcac3enc, encode: support planar formatsRudolf Polzer2012-12-034-7/+138
| | | | | | | This fixes operation with current ffmpeg releases. Note that this planarization is slow and should be reverted once proper planar audio support is there in mpv.
* osx_common: Avoid deprecated Gestalt callsStefano Pigozzi2012-12-022-17/+27
| | | | | | | | Gestalt is deprecated since 10.8. Change the code to read the OS version from a system plist file. As mentioned http://stackoverflow.com/a/11072974/499456 Apple engineers are suggesting this plist reading approach.
* encoding-example-profiles: updates, iphone 5 supportRudolf Polzer2012-12-012-5/+13
| | | | | Now the scaling for iPhones properly optimizes for the zoomed-in (pan-scan) view.
* encoding-example-profiles: fix aac bitrateRudolf Polzer2012-12-011-2/+0
| | | | | Now the enc-to-iphone profiles no longer specify the aac bitrate explicitly (128k), but take over the default from enc-a-aac (96k).
* encoding-example-profiles: use 96kbps aacRudolf Polzer2012-12-011-2/+1
| | | | | Previously it used 128kbps libfaac by default, but now that we have libfdk_aac, we can default to 96kbps at better quality than before.
* encode: print on log which muxers/codecs are in useRudolf Polzer2012-12-011-0/+12
| | | | | | This is consistent with the demuxer/decoder info output mpv already has, and is also generally useful to know, especially if using --ao=codec1,codec2,... syntax.
* DOCS: Add manpage metadata to the rst files.Rudolf Polzer2012-11-291-2/+13
| | | | This fixes the manpage indent issues.
* DOCS: Fix some rst error messagesRudolf Polzer2012-11-292-16/+17
| | | | Unfortunately, these do not fix the man page indent issue.
* subassconverter: correctly handle RRGGBB and unknow formatsStefano Pigozzi2012-11-251-22/+31
| | | | | | | The following HEX formats are now parsed correctly: `#RRGGBB`, `RRGGBB`. Moreover this implementation doesn't show the HTML on screen if the input color is not recognized. A warning is still displayed in the terminal.
* mplayer: fix track language displaywm42012-11-251-1/+2
| | | | | | This caused e.g. "--alang=" (without anything following) to be printed in the terminal output when the file specified no language for the track. Introduced by commit 9085b8.
* sub: add --sub-gray option to display image subs in grayscalewm42012-11-257-3/+51
| | | | | | | | | | MPlayer/mplayer2 still show DVD subtitles in gray. Depending on who you ask, this can be considered a bug or a feature. Include rendering in gray as explicit feature, so the user can decide what is better. This affects all indexed sub bitmaps entering the OSD rendering path. Currently, this means all image subs are affected by this option, but nothing else.
* sub: reimplement -spugauss as --sub-gausswm42012-11-259-7/+97
| | | | | | | | | | | | | | | | Apparently the -spugauss option was popular. The code originally implementing this is gone (scaler stuff in spudec.c). Reimplement it using libswscale to scale and blur image subtitles if the --sub-gauss option is set. The code does some rather lazy padding to allow the blur to spread pixels past the original image bounding box. (This problem exists with normal bilinear scaling too, but is barely noticable.) Technically, this doesn't just blur subtitles, but anything RGBA (or indexed) that enters the OSD rendering path. But only image subtitles produce these OSD formats currently, so no explicit check is done to prevent blurring in other cases.
* memcpy_pic: kill useless/dangerous optimizationwm42012-11-251-10/+6
| | | | | | | | | | | | | | | | | The memcpy_pic() function had a rather dangerous optimization: when the limit2width flag was not set, it was allowed to overwrite the data between the last pixel of a line and the first pixel of the next line (i.e. write over the stride padding). That was also the reason why there are so many whacky names for this function (memcpy_pic, my_memcpy_pic, memcpy_pic2). Kill this optimization, and never overwrite the stride padding. The code doing this can still be used if there's no stride padding at all, though. Also use the name memcpy_pic for the proper function. Now it should be rather clear that my_memcpy_pic and memcpy_pic2 are compatibility aliases. They should go away over the time.
* ao_pulse: do not allow setting volume over 100%wm42012-11-241-2/+2
| | | | | | | | | | | | | PulseAudio allows applications to set volume over 100%. To make this possible, the PulseAudio daemon raises the global system volume, and tries to lower other applications volumes. Unfortunately, this doesn't work out and doesn't manage to keep the effective volume level of these other applications. To make it short: this functionality invoked PulseAudio bugs. Disable it. This essentially reverts commit 85a64b.
* sws_utils: remove unused helperwm42012-11-243-33/+10
| | | | | | | | sws_getContextFromCmdLine_hq() was used by the screenshot code, which now uses mp_image_swscale(). Also move the mp_sws_set_colorspace() declaration from sws_utils.h to vf_scale.c.
* manpage: remove --zoom remainswm42012-11-242-6/+3
| | | | The --zoom option has been removed, and is always active.
* configure: use pkg-config for detecting OpenALwm42012-11-231-18/+8
| | | | Pick 1.13 as minimal required version. (Arbitrary, but reasonable.)
* vo_xv: allocate Xv images with aligned stridewm42012-11-221-4/+5
| | | | | | | | | | | | | | | This is required, as the Xv image is directly used for rendering OSD and taking screenshots. These involve libswscale, which wants aligned strides. There doesn't seem to be an easy way to request aligned strides from Xv. Simply request an image with an aligned width, which usually results in an aligned stride. The padding border remains invisible. One caveat is that if padding is added, there might be scaling artifacts on the right pixel border of the screen. This is at least the case with nvidia binary drivers. Since we consider vo_xv a sensible choice only on crappy/slow hardware, performance is more important than quality.
* mp_image: make alloc_mpi() always allocate with aligned stridewm42012-11-222-17/+6
| | | | | | | | | | | | | | | | By "design", mplayer normally allocates aligned images only inside the filter chain, via the vf_get_image() function. This function pads the width of the requested image if a stride is allowed, sets that new width before calling mp_image_alloc_planes(). However, newer code wants aligned images as well (basically to satisfy libswscale). This affects all uses of alloc_mpi(). To get aligned strides, simply change alloc_mpi() to request an aligned width. Remove the old hack in mp_image_alloc_planes(), which special cases some image formats to be allocated with aligned strides. This is a temporary hack until mp_image_alloc_planes() is revised.
* osd: fix z-order of subtitle OSD elementswm42012-11-221-2/+3
| | | | Subs should always be below OSD (meaning they have to be drawn first).
* draw_bmp: add RGB rendering to fix image quality issueswm42012-11-223-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in commit ed01df, the quality loss due to frequent conversion between RGB and YUV is too much when drawing OSD and subtitles. Fix this by staying in the same colorspace when drawing subtitles. Render directly to RGB, without converting to YUV first. The bad thing about packed RGB is that there are many pixel formats, which would all require special code for blending. It's also completely incompatible to planar YUV. Use planar RGB instead, which allows us to reuse all code originally written for planar YUV. The only thing that needs to be changed is the color conversion in the libass case. (In exchange for simpler code, the image has to be copied, but this is still much better than converting to YUV.) Unfortunately, libswscale doesn't support planar RGB output. Add a hack to sws_utils.c to handle conversion to planar RGB. In the common case, when converting 32 bit per pixel RGB, calling swscale can be avoided entirely. The change in mp_image.c is needed to allocate GBRP images correctly. (The issue with vo_x11 could be easily solved by always backing up the same bounding box as the bitmap drawing RGB<->YUV conversion does, but this commit is probably the better fix.)
* stream_ftp: fix compilation with libavStefano Pigozzi2012-11-221-1/+1
| | | | | Fixup commit for a04b35013a055926ab57f60137518a204ce9e753. That commit was cherry-picked from mplayer(1) and thus assumes ffmpeg.
* stream_ftp: support longer filenamesal2012-11-211-31/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was split into 8 patches. Squash them together, as they affect stream_ftp.c only. stream ftp: readline: Fix off-by-one error Even if max bytes are available read at most max - 1 bytes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35427 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/stream_ftp.c stream ftp: readline: Always initialize output parameter buf Only exception if passed parameter max is less than or equal to zero. That cannot happen with the current code. Additionally change readresp function to always copy the first response line if the parameter rsp is non-NULL. This fixes some error reporting that used uninitialized stack arrays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35428 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: readline: Always try to read complete lines If there is not enough space in the provided line buffer just skip the remaining bytes until reaching EOL. Usually we are only interested in the first 5 characters and for everything else the (on-stack) response buffer should still be big enough. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35429 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Revise file descriptor usage * Set unbound descriptor variables to -1 * Always test >= 0 to see if a variable refers to a valid descriptor git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35430 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Only send QUIT command if connected Do not attempt to send commands without control connections. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35431 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Create buffers before opening control connection git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35432 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Allocate command buffer on-heap git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35433 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Increase command buffer size Allow for more longish file names (be it because of length or more lengthy characters). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35434 b3059339-0415-0410-9bf9-f77b7e298cf2
* subreader: do not skip the first char of ASS fields.cigaes2012-11-211-1/+1
| | | | | | | | | | | | Without this change, fields that can be sometimes empty and sometimes not, such as the Effect field, are counted in an inconsistent way. Since the number of fields is used to find where the text starts, it leads to internal field arriving on the video. Bug reported anonymously on the users mailing list. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35426 b3059339-0415-0410-9bf9-f77b7e298cf2
* screenshot: add subs even with vf_screenshotwm42012-11-212-5/+12
| | | | | | | | | | | | | | Until now, screenshots with the video filter didn't add subs (unclear whether that was an oversight or feature). Fix this and make behavior when taking screenshots with vf_screenshot more consistent with VO screenshots. The change in vf_screenshot is needed, because add_subs() checks this flag to decide whether it's allowed to mutate the image. This commit has another user visible side effect. When taking a screenshot each frame (using the "each-frame" mode of the screenshot command), a normal screenshot command will stop the each-frame mode.
* video: fix bogus uses of mp_image.w/widthwm42012-11-214-16/+15
| | | | | | | | | | | | | | | | | mp_image has this confusing distinction between the w/h and width/height fields. w/h are the actual width and height, while width/height have a very special meaning inside the video filter code: it's the actually allocated width, which is also used for stride padding. Screenshot related code abused the w/h fields to store the aspect corrected size. Some code confused the role of w/h and width/height. Fix these issues. For aspect corrected size, display_w/h are used, while width/height should never be used outside vf.c internals and related code. This also fixes an actual bug when taking screenshots of anamorphic video with vf_screenshot, as well as using vo_image with such videos.
* vo_x11: don't require framestepping to update OSDwm42012-11-211-1/+20
| | | | | | | | | | | | The OSD couldn't be updated at all without frame stepping. This made the VO unusable (In fact, vo_x11 should never be used, but it's provided as fail-safe fallback). Implement VOCTRL_REDRAW_FRAME to deal with this. Unfortunately, this exposes issues with draw_bmp's subtitle rendering: areas that are not covered by subtitles at all are changed as well. The "backup" mechanism provided by draw_bmp doesn't copy these areas, which turns up as quite visible artifacts. (These are included when taking screenshots too.)
* vo_x11: add screenshot supportwm42012-11-211-0/+16
| | | | | | Although vo_x11 shouldn't be used, it's a good thing to have screenshot support in absolutely all interactive VOs. (Except vo_caca, but that is literally a joke.)
* vo_xv: don't require frame stepping to remove OSD or subswm42012-11-215-36/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to improve performance, vo_xv didn't create a backup of the video frame before drawing OSD and subtitles during normal playback. It required the frontend to do frame stepping if it wanted to redraw the OSD, but no backup of the video frame was available. (Consider the following use case: enable the OSD permanently with --osd-level=3, then pause during playback and do something that shows an OSD message. The player will advance the video by one frame at the time the new OSD message is first drawn.) This also meant that taking a screenshot during playback with vo_xv would include OSD and subtitles in the resulting image. Fix this by always creating a backup before drawing OSD or subtitles. In order to avoid having to create a full copy of the whole image frame, introduce a complex scheme that tries to backup only the changed regions. It's unclear whether the additional complexity in draw_bmp.c for backing up only the changed areas of the frame is worth it. Possibly a simpler implementation would suffice, such as tracking only Y ranges of changed image data, or even just copying the full frame. vo_xv's get_screenshot() now always creates a copy in order not to modify the currently displayed frame.
* cfg-config: avoid warning with -Wincompatible-pointer-typesStefano Pigozzi2012-11-211-1/+1
| | | | | This was throwing off a warning with clang. Add a cast to (void *) like many other options do.
* cocoa_common: create window in the correct screenStefano Pigozzi2012-11-211-1/+2
|
* gl_common: improve Mesa compatibility for GL3 context creationwm42012-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't request CONTEXT_FORWARD_COMPATIBLE when creating a GL3 context on X11. This improves compatibility with some Mesa drivers. Setting this bit was originally intended to make the code compatible to newer (future, possibly not yet existing) OpenGL implementations. These implementations wouldn't have to support deprecated legacy GL features, which we know that we don't use, and could return a context with a higher OpenGL version than requested. In practice, this didn't work out. CONTEXT_FORWARD_COMPATIBLE requires the driver to explicitly disable deprecated functionality. If it doesn't do that, it has to reject context creation with that flag set. And it turns out there are Mesa drivers which suffer from this caveat. See [1]. This probably also means that a GL application with a fixed set of required GL features (such as a subset of GL 3.2 core, like vo_opengl.c) may need to probe several GL versions if drivers really start dropping legacy GL. On Windows, CONTEXT_FORWARD_COMPATIBLE is still set. It is not known if this is ideal, but fortunately there is no Mesa on Windows. CONTEXT_CORE_PROFILE is still always set. For requested GL versions lower than 3.2, this flag is ignored. Should we requires higher versions later, we want it to be set, so don't remove it. [1] https://bugs.freedesktop.org/show_bug.cgi?id=57241
* core: minor cleanupswm42012-11-202-3/+4
| | | | | | | Enable printf format warnings for set_osd_[t]msg. Remove the pointless assertion in mplayer.c (the assertion proved that the following NULL check is probably pointless, but leave that check anyway for robustness - it's not really clear whether it's needed).
* osd: fix OSD status symbol display in some caseswm42012-11-204-14/+22
| | | | | | | | | | | | | | | | | | | | | The playback status symbol in the OSD status display on video (such as displayed when seeking or with the show_progress input command) sometimes kept displaying the last seek, without resetting the symbol. (For example: disable the OSD, seek, enable the OSD, run show_progress; but also other cases.) The main reason for that was the code clearing the OSD bar is also responsible for clearing the osd_function (which stores the playback symbol). If no OSD bar was set, the osd_function was never reset. Fix by always setting the timer for clearing the OSD bar and the osd_function whenever the osd_function is set. Clearing the OSD bar when it wasn't set is OK. If the OSD bar is set some time after osd_function is set, the timer is overwritten - that's a good thing, as it makes both disappear from the screen at exactly the same time. Always reset osd_function to 0 and determine the playback status explicitly from mpctx->paused when displaying the status on screen.
* command: use yes/no instead of enabled/disabled for consistencywm42012-11-201-4/+2
| | | | | The idea is that the OSD uses the same names as the options, if possible.
* configure: make --enable-debug defaultwm42012-11-201-2/+2
| | | | | | This may result in larger binaries by default, and should be harmless otherwise. Users are advised to use "make install-strip" if they want binaries without debug symbols.
* configure: add --disable-optimization, change --enable-debug semanticswm42012-11-201-3/+10
| | | | | | | | | | | --disable-optimization removes -O2 from CFLAGS. Now --enable-debug only adds -g to CFLAGS, and doesn't disable optimization anymore. As an obscure feature, --enable-optimization=<n> adds -O<n> to CFLAGS. Also remove stray $def_debug from configure.
* mplayer: disable auto-loading of external codecs.confwm42012-11-204-21/+6
| | | | | | | | | | Do not load codecs.conf files located in $PREFIX/etc/mpv/ or ~/.mpv/. There really is no use for this, other than possibly breaking things. It's still possible to use --codecs-file explicitly to load an external config file, and this option can be used in ~/.mpv/config. While we're at it, remove the global codecs_file variable, and another unused variable.
* manpage: minor fixeswm42012-11-202-2/+2
| | | | | | The typo in options.rst was introduced in a54088. --hardframedrop mentioned in mpv.rst has been merged with --framedrop.
* m_option: print valid integer range for choices on parsing errorswm42012-11-201-0/+2
| | | | | | | | | Only some choices have an additional integer range. For those which do, printing the choices only would be confusing. E.g. --cursor-autohide accepts the choices "always", "no", or an integer value. The help text printed on option parse errors should print the accepted integer range additional to "always" and "no".
* osd: make the OSD and sub font more customizablewm42012-11-2012-135/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make more aspects of the OSD font customizable. This also affects the font used for unstyled subtitles (such as SRT), or when using the --no-ass option. This adds back some customizability that was lost with commit 74e7a1 (osd: use libass for OSD rendering). Removed options: --ass-border-color --ass-color --font --subfont --subfont-text-scale Added options: --osd-color --osd-border --osd-back-color --osd-shadow-color --osd-font --osd-font-size --osd-border-size --osd-margin-x --osd-margin-y --osd-shadow-offset --osd-spacing --sub-scale The font size is now specified in pixels as it would be rendered on a window with a height of 720 pixels. OSD and subtitles are always scaled with the window height, so specifying or expecting an absolute font size doesn't make sense. Such scaled pixel units are used to specify font border etc. as well. (Note: the font size is directly passed to libass. How the fonts are actually rasterized is outside of our control, but in theory ASS font sizes map to "script" pixels and then are scaled to screen size.) The default settings should be about the same, with slight difference due to rounding to the new scales. The OSD and subtitle fonts are not separately configurable. It has limited use and would double the number of newly added options, which would be more confusing than helpful. It could be easily added later, should the need arise. Other small details that change: - ASS_Style.Encoding is not set to -1 for subs anymore (assuming subs use VSFilter direction in -no-ass mode too) - use a different WrapStyle for OSD - ASS forced styles are not applied to OSD
* m_option: add color option typewm42012-11-202-0/+54
| | | | | | | | | | | This accepts HTML-style hex colors in the form #RRGGBB. It's also possible to provide an alpha component with #AARRGGBB. Each 2-digit group is a hex number, which gives the color value from 0-255 (e.g. There is existing code in subassconvert.c, which parses HTML-style color values in SRT subs. This is not used: it's probably better if option parsing is completely separate from code specific to certain subtitle formats, even if a little code is duplicated.
* vf_softpulldown: fix possible regressionwm42012-11-201-1/+2
| | | | | | | | | The lines added with this commit were accidentally removed in commit a0d759, which was a pure cleanup commit merged from mplayer-svn. The difference between mplayer-svn and the mplayer2 base is that this filter has been made PTS aware in mplayer2. Also remove the redundant initialization of vf->priv->state.
* core: fix crash when video filter returns inf as PTSwm42012-11-202-2/+2
| | | | | | | | | | | | | | | | | | | When a video filter returned inf as PTS, the player crashed. One reason for this was that decode_audio() was called with a negative minlen parameter, which at some point caused it to call a memory allocation function with a ridiculous value, triggering an out of memory code path in talloc.c. (talloc.c has been modified to abort() on out of memory situations.) Fix this by sanity checking minlen in decode_audio(). (The check against outbuf->len always succeeded, because it's an unsigned comparison.) Make an existing sanity check in mplayer.c more robust: check for NaN too, which happens if the video PTS is inf. This happened with "-vf pullup,softpulldown" (but is not triggered when the following commit is applied).
* mplayer: fix potential issue when ao_play() failswm42012-11-201-1/+2
| | | | | | | | | ao_play() can fail; in that case a negative error code is returned. This error code is returned by write_to_ao() in turn. The function fill_audio_out_buffers(), which calls write_to_ao(), doesn't check for any error codes, and will likely trigger the assertion following the function call. Change write_to_ao() to return 0 on failure to hopefully prevent crashes when AOs fail.
* stream: fix dvd:// + cache crashingwm42012-11-204-5/+7
| | | | | | The language string was dynamically allocated, which completely fails if the cache is forked (which it usually is). Change it back to a fixed length string, like the original code had it.
* stream