summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* TOOLS: fix first frame pts for dlopen/telecine.soRudolf Polzer2012-09-281-6/+13
| | | | | | | | | | | | | | | When the first frame of a telecine pattern did not generate an output frame (because it is a 0 or a 1), this could lead to the first two output frames getting equal pts values. When the first frame of a telecine pattern generates exactly one output frame (i.e. when the telecine pattern starts with 2 or 3), then the output was correct before this comment, and still is unchanged. When the first frame of a telecine pattern generates more than one output frame (i.e. when it starts with 4 to 9), then output pts are still broken. This is not really solvable without knowing the frame duration, or delaying output by one frame.
* 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.
* rawaudio: use mplayer audio format for format optionwm42012-09-186-22/+31
| | | | | | | | | | | | | | | The rawaudio demuxer had a rather hard to use way to set the audio format with the --rawaudio=format=value option. The user had to pass a numeric value, which then was set as wFormatTag member in the WAVEFORMATEX header. Make it use the mplayer audio format (the same as --af=format=value). Add a new internal pseudo audio codec tag, which is hopefully unused, which makes ad_pcm use the value in wFormatTag as internal mplayer audio format. Playing non-PCM formats is disabled. (At least AC3 can be played directly.)
* dec_audio: do not overwrite sh_audio->wf->wFormatTagwm42012-09-181-8/+2
| | | | | | | | | No decoder actually used this value (except ad_acm, which was removed a while ago), so this change shouldn't have any bad consequences. ad_ffmpeg passes wf to libavcodec decoders, but only the extra data portion. This change is needed by the next commit.
* ad_pcm: add back raw decoderwm42012-09-184-0/+247
| | | | | | | | | | | This was removed in commit 6a26b4a66504. Add it back, because it was needed by demuxer_rawaudio and for PCM audio with demuxers other than demux_lavf. (In practice, this broke rawaudio and PCM-in-Matroska only.) Unlike with raw video, there is no single raw audio "decoder" in libavcodec. Instead of trying to mess raw audio input into ad_ffmpeg using a table to map audio formats to the respective libavcodec decoders, it seems advantageous to simply add back ad_pcm.
* core: remove duplicated format_time() functionswm42012-09-186-53/+32
| | | | | This was an on-going transition to make mplayer format all times in the same format.
* build: move mpcommon.c to version.cwm42012-09-183-5/+23
| | | | | | | | | | | | | mpcommon.c used to be the only file to include version.h. version.h is generated by the build system, and contains the git revision. Any time a commit is made (or the tree is rebased etc.), the file is rewritten, and mpcommon.c rebuilt. To make rebuilding less annoying, the definition of the version string is the only thing in mpcommon.c. Since I want to add other things to mpcommon.c, add a new file named version.c, that takes over mpcommon.c's role as described above. mpcommon.c doesn't include version.h anymore, and will be used to park code that doesn't really belong anywhere else.
* bluray: add bd:// as stream prefixwm42012-09-182-4/+4
| | | | The existing short prefix, br://, was not very intuitive.
* manpage: remove references to bitmap fontswm42012-09-182-7/+1
| | | | Support for bitmap fonts was removed a while ago.
* demuxer: remove ImageDesc fieldwm42012-09-183-23/+0
| | | | | | | | | | | | | | | | | | This was needed by the now-removed mov demuxer for QuickTime video, or to be more specific, the Sorenson 3 video codec. QuickTime can (probably) still decoded by libavcodec, but this field is not needed for this. The reference in demux_mkv was apparently for decoding QuickTime in Matroska, using binary QuickTime codecs (QTX stuff). It's possible that this has been broken with the binary codecs removal (see commit aebfbbf2bdd), because it removed related code from demux_mkv. On the other hand, the code section in question was enabled only if binary win32 codecs were enabled. The win32 codec loader worked on 32 bit x86 only. This means QuickTime-in-Matroska was broken on all other architectures, including 64 bit x86. Despite being possibly broken on a major platform, nobody has complained about it yet, and since I couldn't find a sample of such a mkv file, so don't bother with it.
* demuxer: do not set sub_utf8 optionwm42012-09-182-5/+0
| | | | | | | | demux_lavf and demux_mkv, which both support demuxing subtitles, set the global variable sub_utf8. This variable is connected with the -utf8 option, and should not be reset by code. Since demuxer subtitles are not influenced by this option (anymore?), this is unnecessary. Remove the code setting this variable from the demuxers.
* Remove VESA/FBDEV remains, clean up example.confwm42012-09-184-149/+5
| | | | | | Remove VESA and FBDEV specific code that was forgotten when the respective VOs were removed. Remove references to old or broken stuff from example.conf.
* subs: restore support for sub_step command with libasswm42012-09-183-10/+28
| | | | | | This was destroyed by Uoti Urpala in commit "subs: always use sub...". Features should be either kept working or completely removed, but not just crippled, which only inflates the code and frustrates users.
* subs, vo: do sub bitmap change detection by comparing IDsUoti Urpala2012-09-188-32/+39
| | | | | | | | | | | | | | | | | vo_vdpau and vo_gl cache the last subtitle bitmaps uploaded to video card in case they stay the same over multiple frames. Detecting whether the bitmaps have changed and should be re-uploaded was somewhat fragile. Change the VO API to provide a bitmap ID which can be compared with what the VO has to determine whether a new upload of the bitmaps is needed. Conflicts: libvo/vo_gl.c Note: the changes for vo_gl.c were not merged. Instead, eosd_packer is modified to use the new way of detecting EOSD changes. This takes care of vo_gl, vo_gl3 and vo_direct3d, which all render EOSD. They don't need to be updated in turn.
* vo_vdpau: split bitmap packing code into a separate fileUoti Urpala2012-09-184-146/+484
| | | | | | | | | | | | | | | | | | Split the vo_vdpau code that calculates how to pack all subtitle bitmaps into a larger surface into a separate file. This will allow using it in other VOs. Conflicts: Makefile libvo/vo_vdpau.c Note: this commit does the same as an earlier commit by me (4010dd0b1a27e3996). My commit added the vo_vdpau packer code as eosd_packer.c, while this commit by uau uses bitmap_packer.c. Since bitmap_packer.c has a different interface, and because there are more commits changing OSD rendering coming, I will pick uau's version. However, vo_gl, vo_gl3 and vo_direct3d are still using eosd_packer.c, so to make the transition easier, don't delete eosd_packer.c yet.
* cleanup: video_out: remove vo_subdevice global variablewm42012-09-182-8/+2
| | | | | | | This wasn't accessed anymore. This is all what was left of mplayer2 commit c54fae82fd16 ("vo: fix crash if all VO open fallback attempts fail").
* subs: always use sub decoder framework for libass renderingUoti Urpala2012-09-1816-105/+164
| | | | | | | | | | |