summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vo_gl, options: remove doublebuffering option (--double)wm42012-10-166-31/+11
| | | | | | | | | | Useless. It complicated the code and caused flicker, and was useless otherwise. The manpage describes this option as "should not normally be used". One possibly useful effect from the point of view of the user was that vsync was disabled. You can do this with the --vsync option, or by changing X/driver settings directly.
* sub: make it easier to set DVD sub decoding with sd_lavcwm42012-10-163-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit, the player will still use spudec.c (the "old" DVD sub decoder), rather than ffmpeg. But it brings the changes needed to enable this down to a single line change: --- a/mplayer.c +++ b/mplayer.c @@ -1988,7 +1988,7 @@ static void reinit_subs(struct MPContext *mpctx) #endif vo_osd_changed(OSDTYPE_SUBTITLE); } else if (track->stream) { - if (mpctx->sh_sub->type == 'v') + if (mpctx->sh_sub->type == 'v' && false) init_vo_spudec(mpctx); else sub_init(mpctx->sh_sub, mpctx->osd); Also, copy the DVD resolution heuristics from spudec.c (from the spudec_new_scaled() function). I'm not sure if this is correct or even needed, but the sd_lavc codd explicitly reverted back to spudec with code carrying this comment: // Assume resolution heuristics only work for PGS and DVB so it seems likely that the required heuristics were missing, and that the spudec heuristics may make the DVD compatibility situation at least as good as with spudec. Note that it's unlikely that we enable sd_lavc for DVD subs by default, as there are other problems in combination with direct DVD playback.
* osd_libass: set RTL base direction to neutralwm42012-10-161-3/+6
| | | | | | | | | | | | | | | | We are using libass for OSD rendering. One problem with that is that libass has to be bug-compatible to VSFilter. This includes the setting for the default RTL base direction. Neutral would be most reasonable, but VSFilter assumes LTR. This commit forces the default to neutral. Unconfirmed whether this actually works as intended. See the following libass commits: 9dbd12d shaper: allow font encoding -1 for neutral base direction a80c45c shaper: always use LTR base direction by default
* sub, vo_gl3, vo_vdpau: exit early if there are no sub-images to drawwm42012-10-162-2/+2
| | | | | | | | | | | | libass may always return a full change if no subtitle images are rendered in some cases (empty tracks). Also, a full change despite empty sub-images list may be reported on initialization. Avoid invoking odd special cases in the VO code by always exiting early if the sub-image list is empty. Note that at least for OSD, the code in sub.c doesn't even send a request VOCTRL_DRAW_EOSD if the image list is empty. But the subtitle rendering code in vf_vo.c is independent from this (at least for now).
* sub: cleanup: remove vo_osd_probar_type/value global variableswm42012-10-165-18/+15
|
* sub: cosmetics: turn some defines into enumswm42012-10-162-28/+34
|
* mplayer: reset subtitles handled by dec_sub.c on seekwm42012-10-161-0/+2
| | | | This was somehow lost when merging this.
* vo_vdpau: use new EOSD for OSD, remove support for old OSD formatwm42012-10-161-180/+13
| | | | | | | | | | | | | | | | | | This allows vo_vdpau to render OSD directly, without the indirection through the old OSD API, and without the additional conversions. Remove support for the old OSD format. Only the mplayer DVD subtitle decoder still generates this format. Although the new OSD interface does support this format, remove it from vo_vdpau. It would be relatively hard to support it in the EOSD code, as it requires two surfaces. (These two surfaces are blended on top of each other to emulate the mplayer OSD format.) The correct way to implement direct support for DVD subs would consist of adding a paletted image format of some sort. But even sd_lavc converts paletted subtitle images to RGBA, so doing something special just for DVD subs is not worth it. This means the frontend (sub.c) converts the subtitles to RGBA if it detects that vo_vdpau does not support them natively.
* vo_vdpau: allow multiple EOSD rendererswm42012-10-161-34/+45
| | | | Preparation for using new OSD rendering method.
* sub: allow converting DVD subs to RGBAwm42012-10-164-6/+53
| | | | | | | | | | | | | | The mplayer DVD sub decoder is the only remaining OSD image producer that still requires the old mplayer OSD format (SUBBITMAP_OLD_PLANAR). To make supporting this format optional in VOs, add a step that allows converting these images to RGBA in case the VO doesn't have direct support for it. Note: the mplayer DVD sub decoder uses the old mplayer OSD format (SUBBITMAP_OLD_PLANAR), which is assumed to use premultiplied alpha. However, it seems DVDs allow only binary transparency, so the rendered result will be the same.
* sub: allow rendering OSD in ASS image format directly, simplifywm42012-10-1615-523/+600
| | | | | | | | | | | | | | | | | | | | | Before this commit, the OSD was drawn using libass, but the resulting bitmaps were converted to the internal mplayer OSD format. We want to get rid of the old OSD format, because it's monochrome, and can't even be rendered directly using modern video output methods (like with OpenGL/Direct3D/VDPAU). Change it so that VOs can get the ASS images directly, without additional conversions. (This also has the consequence that the OSD can render colors now.) Currently, this is vo_gl3 only. The other VOs still use the old method. Also, the old OSD format is still used for all VOs with DVD subtitles (spudec). Rewrite sub.c. Remove all the awkward flags and bounding boxes and change detection things. It turns out that much of that isn't needed. Move code related to converting subtitle images to img_convert.c. (It has to be noted that all of these conversions were already done before in some places, and that the new code actually makes less use of them.)
* vo_gl3: use old OSD using the emulation layerwm42012-10-161-97/+1
| | | | | This still renders the OSD using essentially the same mechanisms, except that the EOSD code for texture handling and rendering is reused.
* sub: add preliminary emulation layer to draw OSD with EOSDwm42012-10-162-0/+82
| | | | | | | | | This basically pushes the old OSD bitmaps via VOCTRL_DRAW_EOSD to the VO, instead of using the old callback-based interface. Future commits will change the code such that sub.c pushes images rendered by libass directly, rather than converting them to the old OSD format first.
* vo_gl3: support RGBA EOSDwm42012-10-165-99/+251
| | | | | This also adds support for multiple EOSD renderers. This capability is unused yet, but important for the following commits.
* sub: create sub_bitmap array even when using libasswm42012-10-1612-111/+130
| | | | | | | | | | | | | | One sub_bitmaps struct could contain either a libass ASS_Image list, or a mplayer native list of sub-bitmaps. This caused code duplication in vo_vdpau.c and bitmap_packer.c. Avoid this by creating such a sub_bitmap array even with libass. This basically copies the list and recreates it in mplayer's native format. It gets rid of the code duplication, and will make implementing extended subtitle and OSD rendering in other VOs easier. Also do some cosmetic changes and other preparations for the following commits.
* encoding examples: refuse upscaling when the target is an iPhoneRudolf Polzer2012-09-241-7/+7
| | | | | | This is ok, because the iPhone can handle any resolution. So there is no need to waste space on upscaling the iPhone can do at playback time as well.
* vf_scale: do the upscale detection AFTER calculating dimensionsRudolf Polzer2012-09-241-7/+8
| | | | | | Otherwise it heavily violates the manpage's description, and describing what it did before in the documentation is something too complicated to describe in the English language.
* mp_msg: make MSGL_STATUS use the same color as MSGL_INFOwm42012-09-231-1/+1
| | | | The green status line is annoying.
* demuxer: fix crash with demux_rawvideowm42012-09-231-2/+6
| | | | | | | | | | | | | | | rawvideo is a rather primitive demuxer that doesn't implement track switching. The problem was that during track switching the demuxer implementations normally set the stream IDs in order to do the switch, and since rawvideo obviously didn't do that, so the current stream in ds->sh / demuxer->video->sh was set to NULL. (The frontend always assumes track switching is successful, which is a reasonable assumption - failing due to missing video codecs etc. is in separate codepaths.) Later, demux_rawvideo_fill_buffer() in demux_rawvideo.c tried to dereference the NULL stream and crashed. Other trivial single-stream demuxers worked fine, because they didn't try to access ds->sh.
* options: handle alias options differentlywm42012-09-232-10/+9
| | | | | | | | | | | When setting an alias option, its value is not saved in the file-local options case. The ensure_backup function in m_config.c exits if it encounters an aliased option, because it should not be saved additionally to the original option. However, the original option is likely never saved in this case. Change it so that ensure_backup always accesses the original option. The original option is the one that first appears in the option list.
* options: simplify somewhat by introducing a union for option valueswm42012-09-233-20/+30
| | | | | | | | The m_option_value union is supposed to contain a field for each possible option type (as long as it actually stores data). This helps avoiding silly temporary memory alocations. Using a pointer to an union and to a field of the union interchangeably should be allowed by standard C.
* options: accept "yes" and "no" only for flagswm42012-09-235-33/+25
| | | | | | | | | | This removes the alternative values like "off", "0", "false" etc., and also the non-English versions of these. This is done for general consistency. It's better to have a single way of doing things when multiple ways don't add singificant value. Also update some choices for consistency.
* commands: fix parsing bugwm42012-09-231-1/+1
| | | | | When tabs are used as whitespace between command and the first string parameter, the string is not correctly terminated.
* ao_pulse: extend maximum settable volume beyond 100%wm42012-09-231-7/+8
| | | | | | The old maximum is 100%. Raise it to PA_VOLUME_UI_MAX, which is about 150%. PA_VOLUME_UI_MAX is the PulseAudio recommended UI-settable maximum volume, so it seems to be a good idea to use that.
* softvol, ao_pulse: prefer ao_pulse volume control by defaultwm42012-09-237-7/+35
| | | | | | | | | | | | | | | | | | --softvol is enabled by default. For most audio outputs, this is a good thing, as they have either their own (bad) soft volume implementation, or control the system mixer. With ao_pulse, the situation is a bit different: it supports per-application volume (i.e. volume control is not really global). More importantly, ao_pulse uses a rather large audio buffer, and changing the volume with mplayer's volume filter has a large delay. With the native ao_pulse volume control, it's instant, because PulseAudio's audio filtering happens at a later stage in its processing pipeline (inaccessible for mplayer). This means native volume control should really be allowed for ao_pulse, while it's the reverse for other audio outputs. Make --softvol a choice option, and add a new "auto" choice. This is default and will use PA's volume control with ao_pulse, and mplayer's volume filter otherwise (i.e. the old softvol behavior).
* configure: make --enable-openal use auto detectionwm42012-09-231-1/+1
| | | | | | | | | | | OpenAL is disabled by default, because it supposedly inteferes with some other configure tests and makes them fail silently. Previously, --enable-openal followed configure's utterly braindead semantics and disabled auto detection. However, since OpenAL was disabled by default, there was no easy way to enable OpenAL at all, even if it was explicitly requested. Solve this by making --enable-openal use auto detection.
* options: make cache option always per-filewm42012-09-233-6/+12
| | | | | | | | | | | When playing a network stream, the cache is automatically enabled. We don't want the cache to stay enabled when playback ends. (For example, the next file to be played could be a local file, and even if that is relatively contrieved, we want to do the right thing.) Introduced the flag M_OPT_LOCAL to force an option to be always file local. This allows enabling the old mplayer semantics on a per option basis.
* mplayer: fix abort command handlingwm42012-09-231-14/+10
| | | | | | | | | | Now it actually aborts, even if the abort command is not the first command. Make a policy change: commands before the abort command are silently thrown away. Previously, normal commands were run after the abort command finished (so they were run out of order). I'm not sure which way is the best, all things considered, but the new way is simpler.
* getch2: request at least 1 byte of input each readRudolf Polzer2012-09-191-1/+1
| | | | | | | | fixes issue with | less, where mplayer broke less's terminal expectations and made less quit Note this means that read() will be blocking again. Should be ok, as we always check via select() before reading.
* mp_msg: use stdout for all output except status; put status on stderrRudolf Polzer2012-09-191-2/+2
| | | | improves interaction with | less, | grep, ...
* mp_msg: enable --msgcolor by default; force it off if stdout is no ttyRudolf Polzer2012-09-191-7/+14
|
* mplayer: unbreak OSD with CONFIG_ENCODING undefinedwm42012-09-182-12/+1
| | | | | | | | | | | | | | Basically, the encoding code path wanted to set osdlevel=0 as default, while normal playback needs osdlevel=1. For this purpose, osdlevel was set to -1 (i.e. invalid) initially to detect whether the --osdlevel option was explicitly set. When encoding was not configured (CONFIG_ENCODING undefined), the osdlevel value was not set from -1 to 1 properly, and the OSD remained invisible by default. Fix this by getting rid of this logic. It shouldn't be needed, since osdlevel=1 never shows any OSD messages without user interaction. Should this ever change, we could still check whether encoding is in progress, or add another option to allow OSD rendering during encoding.
* options: rename noconfig to no-config, nocache to no-cachewm42012-09-181-2/+2
| | | | This how it's supposed to be. The manpage has the correct names.
* cocoa_common: make fullscreen menubar/dock hiding conditionalStefano Pigozzi2012-09-181-1/+9
| | | | | | | | | | cocoa_common was hiding the dock and menubar unconditionally when going fullscreen. This means they were hidden even if they weren't on the screen mplayer2 was going fullscreen on, resulting in poor user experience. Change the fullscreen function in the cocoa backend to check that mplayer2 is on the same screen as the menubar/dock before hiding them.
* encode: video encoding now supported using mencoder-like optionsRudolf Polzer2012-09-1826-33/+3208
|
* TOOLS: add a new file identifier toolRudolf Polzer2012-09-181-0/+165
| | | | | It can provide properties of a file to the user on stdout, or when sourced by a script, put them into its variables.
* commands: allow printing raw propertieswm42012-09-181-4/+9
| | | | | | | | | | | | Extend m_properties_expand_string() so that it can print properties as unformatted string. Normally, properties will be pretty-printed (intended for OSD and user interface purposes). Add the '=' modifier to the format string syntax that disables pretty-printing and returns them "raw". For example, "${=switch_audio}" will print the track number, instead of returning an OSD friendly string containing additional information like track title and language.
* vf_rectangle: remove as it is very dirty and we have a replacement nowRudolf Polzer2012-09-1810-209/+0
|
* vf_dlopen: vf_rectangle filter moved to dlopen (unix only)Rudolf Polzer2012-09-182-1/+348
| | | | It is unix only, because vf_dlopen filters have no way to receive input (yet)
* vf_dlopen: improve performance for 1-frame-for-1-frame filtersRudolf Polzer2012-09-182-22/+59
| | | | | | This is done by requesting a buffer from the next filter in the chain, instead of always allocating our own. This allows the next filter to e.g. ensure its own preferred memory layout.
* mplayer: selectively reset track selection when playing multiple fileswm42012-09-182-0/+46
| | | | | | | | | | | | | | | | | | | | Normally, video/audio/sub track selection is persistent across files played in the same mplayer instance. This is wanted, because settings should not be reset across files in general. However, if the track layout of a file is completely different from the previous, this will essentially select random tracks. In this case, keeping the track selection is confusing and unwanted. Reset the track selection to default if the track layout changes. The track layout is determined by number of tracks, track order, default flag, whether the track is an external subtitle, and track language. If a track layout change is detected when playing a new file, the -sid, -aid and -vid options are reset to "auto". This behavior is enabled only if the user selects tracks manually (via keybinds and the "switch_audio" slave properties etc.). If no user interactions take place, options specified on the command line will follow the old behavior.
* ad_dvdpcm: add back PCM decoder for DVDwm42012-09-184-0/+171
| | | | | | This is needed by demux_mpg (and possibly by demux_ts) for PCM playback. The decoder does the mapping from MPEG headers to the actual PCM format, and also unpacks sample data for 20/24 bit formats.
* core, timeline: cache external ordered chapter files tooStefano Pigozzi2012-09-189-28/+77
| | | | | | | | | | | | | | | | | | | | | | | Previously, Matroska source files other than the initially opened one were always accessed without caching. Enable cache for extra files too. A separate cache process/thread is started for each file, which is less than optimal but probably better than no caching if the user explicitly enabled cache. This commit only implements caching for Matroska ordered chapters (not for EDL timeline). To build the timeline we need to demux the files in the current directory to look for segments with matching uuid. This first demux is done with no cache since we don't need to read a lot of the stream. If the file is recognized as one of the needed sources it's reopened with cache enabled. Also move the stream_cache_size global variable to the options struct. Conflicts: cfg-mplayer.h mplayer.c stream/stream.h timeline/tl_matroska.c
* subs, vo_vdpau: support RGBA color for PGS subtitlesUoti Urpala2012-09-1811-52/+273
| | | | | | | | | | | | | | | | | | | | | | Support passing bitmap subtitles to VOs in full RGBA color, and implement this for libavcodec-decoded subtitle formats on decoding side and vo_vdpau on display side. Currently this is enabled for PGS (blu-ray) and DVB subtitles. VDPAU seems to have sampling issues similar to known GL ones when drawing a sub-rectangle from a larger texture with scaling, where adjacent pixels outside the specified source rectangle affect the result. As the bitmap subtitles may be scaled, add padding support to the bitmap packer code. In principle, this could be used for colored DVD subtitles too. However, the libavcodec DVD decoder lacks parts of the resolution and palette handling that are present in spudec.c. Conflicts: libvo/vo_gl.c sub/dec_sub.h sub/sd_lavc.c
* libmpdemux: add back demux_tswm42012-09-185-1/+3574
| | | | | | | | | | | | | | | | | Someone wanted this. Apparently both libavformat's TS demuxer and demux_ts are crap, and work/fail in different cases. This demuxer has been removed in 1fde09db6f4ce. All code added comes from the revision before that. Some required bits have been added in the commit before this one (re-adding demux_mpg), in particular the changes to video.c. stream_dvb will use this demuxer by default, otherwise demux_lavf is preferred (as it has been before). Some TS related command line options are not re-added. Closed captions might not work.
* libmpdemux: add back demux_mpgwm42012-09-1811-7/+2795
| | | | | | | | | | | | | | | | | | | | | Apparently this was needed for good DVD playback. This demuxer has been removed in 1fde09db6f4ce. All code added comes from the revision before that. Some other bits have been removed in later commits, and are added back as well. Usage of memalign() is replaced by av_malloc(). As far as I can tell, this memory is never free'd or reallocated, so no calls to av_free() have been added. The code re-added to video.c is plain horrible, full of code duplication, full of demuxer/codecs specifics, but apparently needed. Unrelated to re-adding the demuxer, re-add one codepath for DEMUXER_TYPE_TV, which was accidentally removed in the same commit demux_mpg was removed. The closed captions decoder is not re-added.
* options: change --vid, --aid, --sid optionswm42012-09-183-24/+17
| | | | | | | | | | | | The --vid, --aid, --sid options now accept the values 'off' and 'auto', instead of having the user deal with the numeric values -2 and -1. The numeric values are not allowed anymore. Remove the --audio option. It was probably meant as compensation option for --no-audio. There are no such options for sub/video, and it was not documented, so just remove it. The replacement is "--aid=auto". Also do some updates to the manpage.
* options: change --loop option, and extend choice option typewm42012-09-186-26/+90
| | | | | | | | | | | | | | | | | | | | | | The --loop option takes slightly different parameters now. --loop=0 used to mean looping forever. Now it means looping is disabled (this is more logical: 2 means playing 2 more times, 1 means playing 1 more time, and 0 should mean playing not again). Now --loop=inf must be used to enable looping forever. Extend choice types to allow an optional range of integers as values. If CONF_RANGE is added to the flags of a m_option_type_choice option, m_option.min/max specify a range of allowed integer values. This can be used to remove "special" values from make integer range options. These special values are unintuitive, and sometimes expose mplayer internals to the user. The (internal) choice values can be freely mixed with the specified integer value range. If there are overlaps, the choice values are preferred for conversion to/from strings. Also make sure the extension to choice options works with properties. Add the ability to step choice properties downwards, instead of just upwards.
* options: remove M_OPT_IMPLICIT_DEFAULTwm42012-09-183-21/+8
| | | | | | | | | This was to make an option without value use the option's default value (e.g. --term-osd is the same as --term-osd=auto). Make it simpler by handling this case as an empty choice. The flag was probably needed when option handling still did ambiguous argument parsing.
* options: remove -subalignwm42012-09-186-45/+0
| | | | | | It can't be re-implemented, because this isn't supported by libass. The -subalign option and the associated sub-align slave property did nothing. Remove them.
* configure: add version check for libquviwm42012-09-181-1/+1
| | | | | I do not know what exactly is the minimum working version. Require the latest version currently released, which is about half a year old.
* options: fix "--"wm42012-09-181-0/+5
| | | | | | | Handling this was accidentally forgotten when command line parsing was refactored. The added recursive call should be a tail recursion with all reasonable compilers, and it shouldn't be possible to provoke a stack overflow.
*