summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-1661-550/+747
|\ | | | | | | | | | | | | | | Conflicts: command.c mp_core.h mplayer.c screenshot.c
| * vo_gl: improve 10-bit YUV->RGB conversion accuracy slightlyUoti Urpala2012-03-094-17/+16
| | | | | | | | | | | | | | | | | | | | Modify the YUV->RGB conversion matrix to take into account the difference between the same color value being x/255 in a 8-bit texture and x*256/65535 in a 16-bit texture (actually things are stored as x*4/65535 for 10-bit color, but that can be ignored here). This 0.4 % difference in the shader float value could make shades of gray in 10-bit (or generally more than 8 bit) YUV produce RGB values with green slightly higher than red/blue.
| * configure: fix --enable-staticUoti Urpala2012-03-091-3/+2
| | | | | | | | | | Hack around shell programming breakage that made Libav check fail with --enable-static.
| * configure: disable live555 by defaultUoti Urpala2012-03-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Latest liblivemedia version disables APIs we need. The code still exists in the library and the changelog says the old interface can be enabled with "#define RTSPCLIENT_SYNCHRONOUS_INTERFACE". However, the code on the library side is disabled by default too, and seems to be disabled in distro packages, so defining that in the player does not help (just delays the failure until link time). It's possible the distro packages will be changed to enable this, but since dropping live555 support is desirable anyway, change configure to disable support by default at least for now. The live555 code is the only part of the source that's in C++. Including C headers in code compiled as C++ has caused issues at times, so deleting this code would have a maintenance benefit. Reportedly the rtsp support in Libav has improved, so there should be less need for live555.
| * core: remove old EDL mode (--edl option)Uoti Urpala2012-03-098-295/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the old EDL implementation that was activated with the --edl option. It is mostly redundant and inferior compared to the newer demux_edl support, though currently there's no support for using the same EDL files with the new implementation and the mute functionality of the old implementation is not supported. The main reason to remove the old implementation at this point is that the mute functionality would conflict with following audio volume handling changes, and working on the old code would be a wasted effort in the long run as at some point it would be removed anyway. The --edlout functionality is kept for now, even though after this commit there is no code that could directly read its output.
| * af: fix crash when trying to use volume controls with AC3 pass-throughwm42012-03-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the volume when softvol is enabled or if the audio output driver doesn't support volume controls causes insertion of the "volume" filter. This fails with AC3. Since the filter wasn't removed after that, and the filter chain was in a bogus state, random crashes occured past this point. Fix it by reinitializing the filter chain completely on failure. Volume controls simply won't work. (This can't be fixed, because AC3 is a compressed format, and would require additional decoding/encoding passes in order to support arbitrary volume changes.) This also affects balance controls.
| * af: print audio filter chain in verbose modewm42012-03-091-0/+35
| | | | | | | | The string format used in print_fmt() is taken from init_audio_filters().
| * windows: terminal: unicode, --msgcolor, size changeMartin Herkt2012-03-094-27/+163
| | | | | | | | | | | | | | Make mp_msg() support unicode output, --msgcolor and variable screen sizes. Patch reintegrated by wm4.
| * windows support: unicode filenameswm42012-03-0920-66/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows uses a legacy codepage for char* / runtime functions accepting char *. Using UTF-8 as the codepage with setlocale() is explicitly forbidden. Work this around by overriding the MSVCRT functions with wrapper macros, that assume UTF-8 and use "proper" API calls like _wopen etc. to deal with unicode filenames. All code that uses standard functions that take or return filenames must now include osdep/io.h. stat() can't be overridden, because MinGW-w64 itself defines "stat" as a macro. Change code to use use mp_stat() instead. This is not perfectly clean, but still somewhat sane, and much better than littering the rest of the mplayer code with MinGW specific hacks. It's also a bit fragile, but that's actually little different from the previous situation. Also, MinGW is unlikely to ever include a nice way of dealing with this.
| * cleanup: Silence compilation warnings on MinGW-w64wm42012-03-0128-108/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
| * windows: fix format string attributes on MinGWwm42012-03-013-20/+26
| | | | | | | | | | | | | | | | | | | | MinGW maps the "printf" format string archetype to the non-standard MSVCRT functions, even if __USE_MINGW_ANSI_STDIO is defined and set to 1. We need to use "gnu_printf" to use the format strings as provided by vsnprintf and similar functions to get correct warnings. Since "gnu_printf" isn't necessarily available on other GCC compatible compilers (such as clang), do this only on MinGW.
| * configure: add __USE_MINGW_ANSI_STDIO on MinGWwm42012-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes MinGW redirect certain stdio functions (such as the sprintf family) from the MSVCRT libc to a standard compliant MinGW implementation. This fixes a crash in talloc.c when compiling mplayer with MinGW-w64. The problem is most likely with talloc_vasprintf(), which calls vsnprintf with a small buffer and checks its return value to find out how much space the formatted string requires. Without this commit, vsnprintf would always return -1, and then the code calls abort(). (lachs0r figured out this one.)
| * windows support: remove _UWIN definewm42012-03-011-1/+0
| | | | | | | | | | | | | | The _UWIN define causes the mingw headers not to declare deprecated (on Windows) function names such as open and mkdir. But the code uses these. I have no idea why this used to work (if it even did), but the original reason why it was defined seems to have vanished.
| * configure: allow changing pkg-config binary with --pkg-configwm42012-02-291-0/+4
| |
| * configure: use cross toolchain if --target is givenwm42012-02-291-44/+61
| | | | | | | | | | | | | | | | | | | | If --enable-cross-compile is specified, passing --target=i686-w64-mingw32 for example will check if i686-w64-mingw32-gcc can be used. This is only done if the compiler isn't specified via --cc or the CC environment variable. The same is done for some other build tools, such as pkg-config. (Only the C compiler will try to use a fallback in this case.)
| * configure: disable cross compilation auto detectionwm42012-02-291-4/+5
| | | | | | | | | | | | | | | | | | This didn't work very well when cross compiling from Linux to Windows: it tries to execute an .exe file, which succeeds if wine is installed. As consequence it detects "no" as result. In general this won't work if emulation for the target architecture is available. Remove it.
| * configure: fix target triplet check for mingw targetsKovensky2012-02-291-15/+19
| | | | | | | | | | mingw32 and mingw64's recommended triplets are i686-pc-mingw32 / x86_64-w64-mingw32, neither has mingw32 in the middle.
| * configure: show PKG_CONFIG_PATH and CFLAGS in config.logUoti Urpala2012-02-291-1/+8
| | | | | | | | | | | | | | | | When the build wrapper repo scripts run configure they set a custom PKG_CONFIG_PATH environment variable. Show the value of this in config.log to make it easier to rerun configure with a tweaked version of the same parameters. Also show CFLAGS if set, as it's likely to break things.
* | Use "mplayer2" in version string, not "MPlayer2"wm42012-03-143-7/+5
| | | | | | | | | | | | | | | | The name "MPlayer2" isn't used anywhere. It's either "MPlayer" or "mplayer2". Make it more consistent by using "mplayer2" instead. Note that the version string passed as network user-agent changes from "MPlayer" to "mplayer2" as well.
* | core: do not print garbage with -identify when chapter times are unknownwm42012-03-141-3/+4
| | | | | | | | | | | | The current code tried to print -1000 as unsigned integer if the chapter time was unknown. Print -1 instead. This affects only the -identify output used for slave mode, such as ID_CHAPTER_0_START.
* | ass_mp.c: remove code duplicationwm42012-03-061-2/+1
| | | | | | | | | | | | | | mp_ass_configure() (first time setup for subtitle options) and mp_ass_reload_options() (update options) duplicated the code for setting some options. There is no reason why they shouldn't use the same code.
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-0566-2099/+387
|\| | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| * aviheader.c: silence a warningUoti Urpala2012-02-291-2/+4
| | | | | | | | libmpdemux/aviheader.c:235:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
| * vo_png: set AVCodecContext parameters before opening itUoti Urpala2012-02-281-19/+21
| | | | | | | | | | | | | | Instead of opening avctx in preinit() and setting paramters later, (re)open it in config() where parameters can be set first. This fixes a failure to open the codec with new libavcodec versions that check pix_fmt during avcodec_open2().
| * configure: remove obsolete messages for mtrr / no w32codecsUoti Urpala2012-02-281-28/+1
| | | | | | | | | | | | | | | | | | | | Remove "Please check mtrr settings at /proc/mtrr" and "NOTE: Win32 codec DLLs are not supported on your CPU" messages printed at the end of a configure run. mtrr should be irrelevant on today's machines, and the DLLs are a lot less important nowadays. Also remove mtrr detection logic that was only used to decide whether or not to print that message. Bizarrely, there were --enable-mtrr and --disable-mtrr options for this too (with no effect except for the message).
| * vo: reject vo_redraw_frame() if no frames have been drawnUoti Urpala2012-02-282-1/+4
| | | | | | | | | | | | | | | | vo_xv crashed if existing frames had been lost due to a config() call in the middle of a file and vo_redraw_frame() was called. Add checks to reject vo_redraw_frame() unless at least one frame has been flipped after the the last configuration change, so individual VOs do not have to deal with this case.
| * configure, build: support compiling without libpostprocUoti Urpala2012-02-275-6/+26
| | | | | | | | | | | | libpostproc has been removed from Libav and the library now exists as a separate project. Because it's not essential, separate it from the Libav library check and allow compiling without it.
| * configure, ao_alsa: drop support for obsolete ALSA versionsUoti Urpala2012-02-276-695/+11
| | | | | | | | | | Drop compatibility code for ALSA versions prior to 1.0.9. Change the configure check to use pkg-config only.
| * configure: simplify pkg-config handling, drop other testsUoti Urpala2012-02-271-201/+46
| | | | | | | | | | | | | | | | | | | | | | Add helper function pkg_config_add() that checks for the presence of a package and also adds cflags/ldflags if it is found. Change existing pkg-config-using feature tests to use that. Also change the freetype test that used a separate libfreetype-config binary before; using pkg-config instead helps cross-compiling. Drop other kinds of checks (such as test compiles) from these tests. It's possible that this could cause problems on some (broken) systems, but that can't be verified without user testing.
| * demux_lavf: update growing file size info for AVSEEK_SIZEUoti Urpala2012-02-261-2/+5
| | | | | | | | | | | | | | | | demux_lavf was returning a static size value when libavformat queried file size with AVSEEK_SIZE. Add code to query the stream for possibly changed value first. This at least improves seeking with growing MPEG files; before seeks would never go beyond the part of the file that existed when the stream was first opened.
| * osd: erase terminal OSD line with mp_msg() instead of printf()Uoti Urpala2012-02-251-1/+1
| | | | | | | | | | | | | | | | The terminal OSD line was written with mp_msg(MSGT_CPLAYER, ...) but erased with printf(). This meant that disabling MSGT_CPLAYER messages would prevent the terminal line from being printed, but a line (probably unrelated) would still be cleared. Change the clearing code to use mp_msg(MSGT_CPLAYER, ...) too.
| * screenshot: fix libav API use (pix_fmt and some other things)wm42012-02-251-8/+13
| | | | | | | | | | | | | | | | | | | | | | Libavcodec started checking that avctx->pix_fmt is set when opening an encoder. The existing code (originally from vf_screenshot.c) only set it afterwards, which now made screenshots fail. Fix the code to set parameters before calling avcodec_open2(). Also fix some minor things, which seems to make it work for other encoders. This could be used to add more libavcodec based image writers. Fix memory leak (missing av_free(avctx)).
| * vd_ffmpeg: fix flushing of buffered framesUoti Urpala2012-02-032-5/+12
| | | | | | | | | | | | | | | | | | The vd_ffmpeg decode() function returned without doing anything if the input packet had size 0. This meant that flushing buffered frames at EOF did not work. Remove this test. Have the core code skip such packets coming from the file being played instead (Libav treats 0-sized packets as flush signals anyway, so better assume such packets do not represent real frames with any codec).
| * vd_ffmpeg: adjust buffered frame count based on threads againUoti Urpala2012-02-031-0/+2
| | | | | | | | | | | | | | | | | | Libav has changed back to not modifying avctx->has_b_frames based on the extra buffering caused by thread use. Add back the code to do the adjustment on the player side once again. The timing mode using the buffering info is no longer the default, so in most cases having this right or not won't matter for playback.
| * build: switch to libavutil bswap.h and intreadwrite.hUoti Urpala2012-02-0137-642/+113
| | | | | | | | | | | | | | | | | | | | | | | | Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
| * demux_lavf: use Libav RIFF tag lists directlyUoti Urpala2012-02-015-400/+47
| | | | | | | | | | | | Change demux_lavf to use CodecID -> RIFF tag mappings that are now available through the public Libav API. Previously it used a copy in ffmpeg_files/taglists.c. That can now be deleted.
| * Update Libav API usesUoti Urpala2012-02-0118-102/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change various code to use the latest Libav API. The libavcodec error_recognition setting has been removed and replaced with different semantics. I removed the "--lavdopts=er=<value>" option accordingly, as I don't think it's widely enough used to be worth attempting to emulate the old option semantics using the new API. A new option with the new semantics can be added later if needed. Libav dropped APIs that were necessary with all Libav versions until quite recently (like setting avctx->age), and it would thus not be possible to keep compatibility with previous Libav versions without adding workarounds. The new APIs also had some bugs/limitations in the recent Libav release 0.8, and it would not work fully (at least some avcodec options would not be set correctly). Because of those issues, this commit makes no attempt to maintain compatibility with anything but the latest Libav git head. Hopefully the required fixes and improvements will be included in a following Libav point release.
* | screenshot: don't convert image if it's already in required formatwm42012-02-291-17/+27
| |
* | screenshot: move code to open file out of image writer functionswm42012-02-291-29/+16
| | | | | | | | | | | | | | This is a minor simplification. The original intend was to only open a file if opening the image encoder went well, but this obscure special case is not worth bothering the image writer functions with more error handling.
* | screenshot: make screenshot filenames configurablewm42012-02-295-31/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the --screenshot-template option, which specifies a template for the filename used for a screenshot. The '%' character is parsed as format specifier. These format specifiers insert metadata into the filename. For example, '%f' is replaced with the filename of the currently played file. The following format specifiers are available: %n Insert sequence number (padded with 4 zeros), e.g. "0002". %0Nn Like %n, but pad to N zeros (N = 0 to 9). %n behaves like %04n. %#n Like %n, but reset the sequence counter on every screenshot. (Useful if other parts in the template make the resulting filename already mostly unique.) %#0Nn Use %0Nn and %#n at the same time. %f Insert filename of the currently played video. %F Like %f, but with stripped file extension ("." and rest). %p Insert current playback time, in HH:MM:SS format. %P Like %p, but adds milliseconds: HH:MM:SS.mmmm %tX Insert the current local date/time, using the date format X. X is a single letter and is passed to strftime() as "%X". E.g. "%td" inserts the number of the current day. %{prop} Insert the value of the slave property 'prop'. E.g. %{filename} is the same as %f. If the property doesn't exist or is not available, nothing is inserted, unless a fallback is specified as in %{prop:fallback text}. %% Insert the character '%'. The strings inserted by format