aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* vo_direct3d: don't framestep when paused and OSD is updatedGravatar wm42012-03-17
| | | | | | | | | | The required feature for this, VOCTRL_REDRAW_OSD, was unimplemented for unknown reasons. It is trivial to add. There is still a weird issue when switching the fullscreen state while paused. I have no idea why this happens. The contents of the video should survive the window reconfiguration (at least we don't free it), and we explicitly redraw the screen after fullscreen.
* vo_direct3d: add EOSD supportGravatar wm42012-03-17
| | | | | This allows rendering subtitles in display resolution. It also makes inserting the vf_ass video filter unnecessary.
* windows support: use UTF-8 for screenshot filenamesGravatar wm42012-03-17
|
* vo_direct3d: minor cleanupGravatar wm42012-03-17
| | | | | | The code assumed the last format passed to query_format will be the one that is used on playback. This is probably true and thus didn't cause any bugs, but make query_format side effect free just like the other VOs.
* vo_directx: do not clip overlay against screen sizeGravatar wm42012-03-17
| | | | | | Clipping it makes the video output look extremely crappy. There seems no good reason to do this, and VirtualBox is fine with overlays larger than the screen.
* win32: different method to force window aspect ratioGravatar wm42012-03-17
| | | | | | | | | | | | | The code used WM_WINDOWPOSCHANGING to force an spect ratio. This didn't behave well if the left/top window borders were used for resizing. Resizing with these borders changed the screen position of the right/bottom as well, which is unintuitive and annoying. Use WM_SIZING instead. Unlike WM_WINDOWPOSCHANGING, WM_SIZING knows about which border is being used for resizing and can act accordingly. Note that the calculated window size doesn't necessarily match with the size mplayer calculates, but this problem exists on x11 as well.
* win32, vo_directx: don't use vo_dx/dy, directly query window positionGravatar wm42012-03-17
| | | | | This should be a bit robuster than trying to maintain vo_dx/dy. vo_dy/dy are now completely unused on win32, except for initialization.
* win32: fix window creation and size handlingGravatar wm42012-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes various issues with the way the window position and size is setup. Most importantly, it fixes some bugs with restoring from fullscreen state. Rename create_rendering_context() to reinit_window_state(). This function doesn't create anything, it just sets the window bounds and styles. Do not use vo_dx/dy for the window position, as video_out.c overwrites it with each vo_config() call. Use private variables window_x/y instead. A big cause for issues was that reinit_window_state() accidentally cleared the WS_VISIBLE style. I suspect that the API call to temporarily hide the window was a hack to deal with this. Another bug was that the window style was changed without calling SetWindowPos with SWP_FRAMECHANGED (as the MSDN documentation says). Properly initialize window position and size on vo_config following the same rules as the x11 backend: - Never change the window position. The window position should be kept, as the user might move the window, and resetting the window position e.g. during ordered chapter playback is not desired. - Never change the window size, unless the size of the video changes. These rules don't apply to fullscreen. When switching from fullscreen to windowed mode, the backend should restore the previous windowed size and position. When the VO was reconfigured during playback (vo_config() etc.), the saved window position and size should be changed according to the rules above, even if the window was in fullscreen mode during reconfiguring. Note that these rules might be perceived as awkward by some users: if you play multiple files with different resolutions, the window won't be centered when playing the files after the first. This is not a bug.
* vo_directx: minor fixes and reformatGravatar reimar2012-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore hunk disabling overlay when the Window is minimized. This was accidentally removed in r33657. Fixes bug 1950. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33894 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify code handling minimized state. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33895 b3059339-0415-0410-9bf9-f77b7e298cf2 Apply uncrustify to vo_directx.c. The vast majority of changes are whitespace changes, but in some cases {} was merged with other lines or a ; was removed after a } from a switch and similar minor and obviously correct changes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33896 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix array layout uncrustify messed up. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33897 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless () and {}. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33898 b3059339-0415-0410-9bf9-f77b7e298cf2 Make NULL checks simpler/more consistent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33899 b3059339-0415-0410-9bf9-f77b7e298cf2 Use FFMIN/FFMAX. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33901 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify struct initialization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33902 b3059339-0415-0410-9bf9-f77b7e298cf2 Split out read/write part from data struct and make read-only struct const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33903 b3059339-0415-0410-9bf9-f77b7e298cf2 Store fixed-length string directly in struct, avoid pointer indirection. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33904 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace some inappropriate while() loops with for() git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33905 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify some more struct initializations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33906 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid typedef. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33907 b3059339-0415-0410-9bf9-f77b7e298cf2 Use struct initializer in one more case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33908 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify printing of error strings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33909 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: libvo/vo_directx.c
* Merge remote-tracking branch 'origin/master' into my_masterGravatar wm42012-03-16
|\ | | | | | | | | | | | | | | Conflicts: command.c mp_core.h mplayer.c screenshot.c
* | Use "mplayer2" in version string, not "MPlayer2"Gravatar wm42012-03-14
| | | | | | | | | | | | | | | | 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 unknownGravatar wm42012-03-14
| | | | | | | | | | | | 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.
| * vo_gl: improve 10-bit YUV->RGB conversion accuracy slightlyGravatar Uoti Urpala2012-03-09
| | | | | | | | | | | | | | | | | | | | 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-staticGravatar Uoti Urpala2012-03-09
| | | | | | | | | | Hack around shell programming breakage that made Libav check fail with --enable-static.
| * configure: disable live555 by defaultGravatar Uoti Urpala2012-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)Gravatar Uoti Urpala2012-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-throughGravatar wm42012-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 modeGravatar wm42012-03-09
| | | | | | | | The string format used in print_fmt() is taken from init_audio_filters().
| * windows: terminal: unicode, --msgcolor, size changeGravatar Martin Herkt2012-03-09
| | | | | | | | | | | | | | Make mp_msg() support unicode output, --msgcolor and variable screen sizes. Patch reintegrated by wm4.
| * windows support: unicode filenamesGravatar wm42012-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ass_mp.c: remove code duplicationGravatar wm42012-03-06
| | | | | | | | | | | | | | 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_masterGravatar wm42012-03-05
|\ \ | | | | | | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| | * cleanup: Silence compilation warnings on MinGW-w64Gravatar wm42012-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 MinGWGravatar wm42012-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 MinGWGravatar wm42012-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 defineGravatar wm42012-03-01
| | | | | | | | | | | | | | | | | | | | | 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-configGravatar wm42012-02-29
| | |
| | * configure: use cross toolchain if --target is givenGravatar wm42012-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 detectionGravatar wm42012-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 targetsGravatar Kovensky2012-02-29
| | | | | | | | | | | | | | | 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.logGravatar Uoti Urpala2012-02-29
| |/ | | | | | | | | | | | | | | 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.
* | screenshot: don't convert image if it's already in required formatGravatar wm42012-02-29
| |
* | screenshot: move code to open file out of image writer functionsGravatar wm42012-02-29
| | | | | | | | | | | | | | 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 configurableGravatar wm42012-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 specifiers will be checked for characters not allowed in filenames (including '/' and '\'), and replaced with the placeholder '_'. (This doesn't happen for text that was passed with the --screenshot-template option, and allows specifying a screenshot target directory by prefixing the template with a relative or absolute path.)
* | screenshot: allow forcing taking screenshots with the video filterGravatar wm42012-02-29
| | | | | | | | | | | | | | | | | | | | If the screenshot_force video filter is inserted, taking screenshots will always use the video filter, and skip the VO specific screenshot code. This can be useful if the VO code causes problems, or if it's intended to take screenshots from a specific location in the filter chain. The 'screenshot' filter is intended as fallback, it's not used if possible.
* | core: rename --paused to --pause, and improve how pausing is doneGravatar wm42012-02-29
| | | | | | | | | | | | Callign add_step_frame is not necessary, because mplayer always decodes at least one frame when starting a new file. Calling pause_player is sufficient, and unlike add_step_frame doesn't play any audio.
| * aviheader.c: silence a warningGravatar Uoti Urpala2012-02-29
| | | | | | | | libmpdemux/aviheader.c:235:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
* | struct stat.st_blocks is not available on MinGWGravatar wm42012-02-28
| |
| * vo_png: set AVCodecContext parameters before opening itGravatar Uoti Urpala2012-02-28
| | | | | | | | | | | | | | 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 w32codecsGravatar Uoti Urpala2012-02-28
| | | | | | | | | | | | | | | | | | | | 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 drawnGravatar Uoti Urpala2012-02-28
| | | | | | | | | | | | | | | | 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 libpostprocGravatar Uoti Urpala2012-02-27
| | | | | | | | | | | | 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 versionsGravatar Uoti Urpala2012-02-27
| | | | | | | | | | 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 testsGravatar Uoti Urpala2012-02-27
| | | | | | | | | | | | | | | | | | | | | | 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.
* | cue: play .bin files as raw PCM audio (even if it means playing noise)Gravatar wm42012-02-26
| | | | | | | | | | | | | | | | | | | | The cue code will open the .bin file with demux_rawaudio if the file can't be opened otherwise. In case the .bin file isn't in the exact format demux_rawaudio uses (usually 44100 Hz, 2 ch, s16le PCM), noise will be played. This is done only if no other demuxer could open the file, and the file extension is ".bin".
* | core: sort chaptersGravatar wm42012-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that chapters are sorted by time. There are some broken mkv files that have chapters in random order. Using simple chapter skipping with the seek_chapter slave command is very confusing and just doesn't work if the chapters are not in order. The chapters are resorted every time a chapter is added, that would make the chapter list unsorted. While this is algorithmically very stupid, it doesn't require changes per demuxer, or reasoning when exactly chapters could be added. Turning this into an insertion sort isn't worth the code, and the added demuxer_sort_chapters() function could possibly be moved to the "right" place later. This is not done when ordered chapters are used, because timeline support uses different data structures for chapters.
| * demux_lavf: update growing file size info for AVSEEK_SIZEGravatar Uoti Urpala2012-02-26
| | | | | | | | | | | | | | | | 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.
* | Fix minor memory leak from 2003Gravatar wm42012-02-25
| |
* | input: restore terminal attributes after resumeGravatar wm42012-02-25
| | | | | | | | | | | | | | | | | | | | Install a signal handler on SIGCONT, and restore the terminal attributes with tcsetattr() if it happens. This is needed with some shells (such as tcsh) that don't restore the terminal attributes set by mplayer. Without this, terminal I/O doesn't work as intended after resume with these shells. Fixes #155.
| * osd: erase terminal OSD line with mp_msg() instead of printf()Gravatar Uoti Urpala2012-02-25
| | | | | | | | | | | | | | | | 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.