summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master'wm42012-04-2814-327/+282
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_alsa.c libao2/ao_dsound.c libao2/ao_pulse.c libao2/audio_out.h mixer.c mixer.h mplayer.c Replace my mixer changes with uau's implementation, which is based on my code.
| * subs: only use "subfont.ttf" as libass fallback if it existsUoti Urpala2012-04-141-1/+6
| | | | | | | | | | | | | | | | | | | | Libass was set to use the file "subfont.ttf" in the user configuration directory as a default/fallback font. This triggered "Error opening font" errors from libass if it tried to use the fallback font for some glyph and the user had not copied/linked any font there (and there is generally little reason to do that nowadays when using fontconfig). Check whether the path exists and only set it in ass_set_fonts() if it does.
| * demux_lavf: try harder to make up a frame rateUoti Urpala2012-04-141-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Frame rate information is mostly irrelevant for playback, but it's needed at least to convert frame numbers used in some subtitle formats (like MicroDVD) into timestamps. Libavformat stopped making up a frame rate if no "reliable" information is available (commit 7929e22bd "lavf: don't guess r_frame_rate from either stream or codec timebase", 1.5 months ago). This caused a regression with AVI files and MicroDVD subtitles. Add a heuristic similar to what libavformat used to have, to make up FPS values which should work at least for the AVI+MicroDVD use case.
| * stream_pvr: fix field size / snprintf size mismatchUoti Urpala2012-04-111-1/+1
| | | | | | | | | | | | | | struct station_elem_s had a field "name[8]", but the rest of the code used PVR_STATION_NAME_SIZE as field size in snprintf and some other calls accessing the field. Change the field size to PVR_STATION_NAME_SIZE so it matches the accesses.
| * ao_coreaudio: fix partial volume controlwm42012-04-111-1/+5
| | | | | | | | | | | | | | If digital pass-through is used, this supported setting the volume (just mute, actually), but not getting the volume. This will probably lead to a stuck mute state in the mplayer frontend. Make the code respond to volume queries even if digital pass-through is used.
| * ao_pulse: support native mute controlwm42012-04-111-29/+55
| |
| * ao_alsa: support native mute controlwm42012-04-111-25/+46
| |
| * mixer: support native audio driver muteUoti Urpala2012-04-113-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Make mixer support setting the mute attribute at audio driver level, if one exists separately from volume. As of this commit, no libao2 driver exposes such an attribute yet; that will be added in later commits. Since the mute status can now be set externally, it's no longer completely obvious when the player should automatically disable mute when uninitializing an audio output. The implemented behavior is to turn mute off at uninitialization if we turned it on and haven't noticed it turn off (by external means) since.
| * audio: fix unmute-at-end logicUoti Urpala2012-04-115-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | The player tried to disable mute before exiting, so that if mute is emulated by setting volume to 0 and the volume setting is a system-global one, we don't leave it at 0. However, the logic doing this at process exit was flawed, as volume settings are handled by audio output instances and the audio output that set the mute state may have been closed earlier. Trying to write reliably working logic that restores volume at exit only would be tricky, so change the code to always unmute an audio driver before closing it and restore mute status if one is opened again later.
| * audio: restore balance setting after reinitUoti Urpala2012-04-113-8/+24
| | | | | | | | | | | | | | Restore the audio balance setting when the audio chain is reinitialized (also after switching to another file). Also add a note about the balance code being seriously buggy.
| * audio: restore volume setting after AO reinit if neededUoti Urpala2012-04-1110-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPlayer volume control was originally implemented with the assumption that it controls a system-wide volume setting which keeps its value even if a process closes and reopens the audio device. However, this is not actually true for --softvol mode or some audio output APIs that only consider volume as a per-client setting for software mixing. This could have annoying results, as the volume would be reset to a default value if the AO was closed and reopened, for example whem moving to a new file or crossing ordered chapter boundaries. Add code to set the previous volume again after audio reinitialization if the current audio chain is known to behave this way (softvol active or the AO driver is known to not keep persistent volume externally). This also avoids an inconsistency with the mute flag. The frontend assumed the mute status is persistent across file changes, but it could be similarly lost. The audio drivers that are assumed to not keep persistent volume are: coreaudio, dsound, esd, nas, openal, sdl. None of these changes have been tested. I'm guessing that ESD and NAS do per-connection non-persistent volume settings. Partially based on code by wm4.
| * audio: mixer: change logic for AOs with no volume controlUoti Urpala2012-04-111-24/+27
| | | | | | | | | | | | | | | | | | | | The volume filter was automatically inserted if setting AO volume failed. Remove that logic, and instead enable softvol mode fully if querying current volume (which will happen before any set attempts) fails. Fully switching to softvol mode is more robust, and any case where the behavior would differ (the behavior is neither that both querying/setting always work nor that both always fail) would have been buggy.
| * audio: keep volume level internally (not only in AO)Uoti Urpala2012-04-114-53/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current volume was always queried from the the audio output driver (or filter in case of --softvol). The only case where it was stored on mixer level was that when turning off mute, volume was set to the value it had before mute was activated. Change the mixer code to always store the current target volume internally. It still checks for significant changes from external sources and resets the internal value in that case. The main functionality changes are: Volume will now be kept separately from mute status. Increasing or decreasing volume will now change it relative to the original value before mute, even if mute is implemented by setting AO level volume to 0. Volume changes no longer automatically disable mute. The exception is relative changes up (like the volume increase key in default keybindings); that's the only case which still disables mute. Keeping the value internally avoids problems with granularity of possible volume values supported by AO. Increase/decrease keys could work unsymmetrically, or when specifying a smaller than default --volstep, even fail completely. In one case occurring in practice, if the AO only supports changing volume in steps of about 2 and rounds down the requested volume, then volume down key would decrease by 4 but volume up would increase by 2 (previous volume plus or minus the default change of 3, rounded down to a multiple of 2). Now, the internal value will keep full precision.
| * libao2: change control() types to enum, remove unused onesUoti Urpala2012-04-087-58/+27
| | | | | | | | | | | | | | | | | | Change the audio driver control() command argument from "int" to "enum aocontrol". Remove unused control types (SET_DEVICE, GET_DEVICE, QUERY_FORMAT, SET_PLUGIN_DRIVER, SET_PLUGIN_LIST). The QUERY_FORMAT one looks like there's a possibility such functionality could be useful in the future, but as ao_oss was the only driver to have an actual implementation of it, the current code wasn't worth keeping.
* | ao_openal: fix crash when no device parameter is passedwm42012-04-251-1/+1
| |
* | vo_directx: clear panscan borders in windowed modewm42012-04-241-5/+32
| | | | | | | | | | | | | | | | The window size is normally clipped against desktop size due to the usage of WM_SIZING in w32_common.c. This is a useful (if accidental) feature, but vo_directx didn't handle it well: the areas not covered by video were filled with the colorkey, which looked ugly. Explicitly clear these borders with black.
* | vo_gl: reject MS Windows native OpenGL as software rasterizerwm42012-04-241-1/+3
| | | | | | | | | | | | | | | | If the graphics driver doesn't provide its own OpenGL implementation, applications get Microsoft's OpenGL emulation. Even if it should be the case that it's not strictly a software renderer, it provides OpenGL 1.1 only, no shaders in any form, and has other limitations that make it almost completely useless for mplayer.
* | vo_gl: refuse to use software renderer, unless explicitly requestedwm42012-04-242-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_gl will now fail at initialization if a software renderer is detected. This is the same behavior as vo_gl_nosw. Making this the default behavior is preferable, because it will simplify positioning vo_gl in the VO autoprobe list (video_out_drivers[]). Also, vo_gl_nosw exists only if X11 support is configured. Move gl in place of gl_nosw. Add the "sw" suboption to vo_gl to allow using vo_gl even if a software renderer is detected. vo_gl_nosw is now completely equivalent to vo_gl. It is kept in order not to break too many user configurations, but should be considered deprecated.
* | win32: don't crash if vo_w32_uninit() is called without vo_w32_init()wm42012-04-241-0/+2
| | | | | | | | | | This is a recent regression. At least vo_direct3d uses vo_w32_uninit() in this way, and crashed if initialization failed at an early point.
* | subassconvert: handle unquoted attributes in subrip font tagswm42012-04-161-27/+45
| | | | | | | | | | Previously, mplayer didn't convert tags like <font color=#00FF00>. But such subtitles exist in the wild, and should be handled.
* | gl_common: do not call glXGetClientString() and glXGetServerString()wm42012-04-161-34/+12
| | | | | | | | | | | | | | | | | | | | Only call glXGetClientString(), which contains all supported GLX extensions. Extensions only returned by glXGetClientString() or glXGetServerString() are not necessarily actually supported. This essentially reverts svn commit 29721 (git fe3b9a88ce62ab). It is not known whether this commit actually fixed anything, such as working around a broken OpenGL driver.
* | win32: fix handling of AltGrwm42012-04-141-0/+5
| | | | | | | | | | | | | | Windows implicitly enables Ctrl+Alt on AltGr. These modifiers are unwanted for keys that have special mappings on AltGr. Add warning about different behavior on wine.
* | win32: simplify icon loadingwm42012-04-142-9/+4
| | | | | | | | | | I have no idea why the code used this roundabout method. Also detab mplayer.rc.
* | win32: move global variables into a struct & some refactoringwm42012-04-146-321/+345
| | | | | | | | | | | | | | | | | | | | This reflects the changes done to x11_common in mplayer2 some years ago. It makes it possible to open multiple VOs at once. The removed defines are probably for ancient versions of MinGW with incomplete headers. Remove some minor code duplication.
* | win32: use GetKeyState() instead of maintaining the state manuallywm42012-04-141-16/+9
| |
* | Merge remote-tracking branch 'origin/master'wm42012-04-1321-2703/+46
|\| | | | | | | | | Conflicts: libvo/vo_kva.c
| * ao_alsa: use "Master" mixer channel instead of "PCM" by defaultwm42012-04-081-1/+1
| | | | | | | | | | | | | | Do this, because the "Master" channel normally provides proper mute control. The old default can be forced with: --mixer-channel=PCM
| * build: remove OS/2 supportUoti Urpala2012-04-0620-2683/+13
| |
| * input: stop trying to read terminal input on EOFUoti Urpala2012-04-064-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | Stop trying to read terminal input if a read attempt returns EOF. The most important case where this matters is when someone runs the player with stdin redirected from /dev/null and without specifying --no-consolecontrols. This used to cause 100% CPU load while paused, as select() would continuously trigger on stdin (the need for --no-consolecontrols was not apparent to people with older mplayer versions, as input reading was less efficient and latencies like hardcoded sleeps kept CPU use well below 100%). Now this will only cause a "Dead key input" error message.
| * core: in VO flip timing, recheck time after OSD drawUoti Urpala2012-04-051-0/+1
| | | | | | | | | | | | | | | | Make the code read current real time again after drawing OSD. This ensures time taken in OSD drawing is properly deducted from the duration of the following sleep. The main practical effect is to avoid the A-V field on the status line staying at a value a couple of milliseconds above 0 (depending on VO).
| * core: fix problems in video EOF detectionUoti Urpala2012-04-051-14/+15
| | | | | | | | | | | | | | | | | | Fix a missing check that could sometimes result in video frames being shown after specified end pts (end of timeline segment or --endpos). Fix mistaken video EOF detection after aspect change in video stream, when there is no current valid visible frame but the next frame is already buffered in VO.
* | win32: prevent modifier keys from getting stuckwm42012-04-131-0/+5
| | | | | | | | | | | | Especially Alt would get stuck when using Alt+Tab to change focus. Apparently Windows doesn't send an appropriate key up message. Solve this by resetting the modifier state on focus change.
* | win32: make F10 key not enter the window menuwm42012-04-071-0/+2
| | | | | | | | | | | | | | | | | | | | Normally, F10 enters the window menu (it's invisible at first, and the blocking/recursive message handling by Windows makes it look like mplayer was paused, without much visual indication). Stop this almost completely useless behavior by signalling Windows that the F10 key was handled. This makes the F10 key usable as normal mplayer shortcut. This is probably still somewhat questionable.
* | win32: fix behavior of enter keywm42012-04-071-5/+11
| | | | | | | | | | | | | | | | | | | | | | Windows sends the same character code on CTRL+Enter and CTRL+J. I'm not sure what's the proper way to deal with this, but the hack added with this commit seems to work fine. Just to be sure, don't forward the modified wParam to DefWindowProc. Add the missing "break;" in the switch statement, which sometimes produced bogus mouse button events. Fix the F12 key, which wasn't mapped correctly due to a typo.
* | vo_directx: do not do aspect scaling in windowed mode.reimar2012-04-061-4/+6
| | | | | | | | | | | | This matches behaviour of other vos. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34840 b3059339-0415-0410-9bf9-f77b7e298cf2
* | win32: use more unicode functionswm42012-04-063-43/+46
| | | | | | | | | | | | | | | | Use the *W variants instead of the implicit *A functions. (One could define the UNICODE macro to switch the functions without suffix from A to W, but I'm too lazy to figure out how portable that is, etc.) Also make sure io.h defines a unicode aware printf().
* | win32: support key modifiers (shift, ctrl, alt)wm42012-04-063-24/+55
| | | | | | | | | | | | | | | | | | | | Support for this is rather simple, and some combinations of modifiers and keys don't work. For example, Ctrl+Alt+character is not supported, because Windows doesn't emit a WM_CHAR in this case. Also add support for the pause and print screen keys. Remove the pointless KEY_CTRL translation. Remove KEY_CTRL altogether, because it was not clear what it was actually supposed to mean.
* | stream_cdda: print CDTEXT if availablewm42012-04-011-17/+51
| | | | | | | | | | | | | | | | | | | | The per-CD info will be printed on playback start, per-track info when a track is played. (This is not a technical restriction, and just goes along with the existing code.) The following fields are not included in output, because these are supposedly binary: CDTEXT_DISCID, CDTEXT_GENRE, CDTEXT_SIZE_INFO, CDTEXT_TOC_INFO, CDTEXT_TOC_INFO2.
* | configure, stream_cdda: remove libcdparanoia supportwm42012-04-012-104/+20
| | | | | | | | | | libcdparanoia is barely developed anymore, while libcdio is still quite active.
* | stream_cdda: reformatwm42012-04-011-359/+368
| |
* | stream_cdda: various fixesreimar2012-04-011-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cdda speed default value, range and use more robust condition. Based on patch by Ingo Brückl [ib wupperonline de]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34458 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not call paranoia_overlapset with 0, it actually causes cdparanoia to just hang. Instead use it to set/unset PARANOIA_MODE_OVERLAP. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34459 b3059339-0415-0410-9bf9-f77b7e298cf2 Fail if trying to seek beyond the last chapter, not just if it is beyond the end of the disc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34460 b3059339-0415-0410-9bf9-f77b7e298cf2 cdda: set position to an actual EOF position when we set EOF. This avoids some inconsistency like the stream indicating EOF but a read still returning more data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34462 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow PARANOIA_MODE_FULL with skipping. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34467 b3059339-0415-0410-9bf9-f77b7e298cf2 Don't call paranoia_modeset() for PARANOIA_MODE_DISABLE. cdparanoia destroys start sector information after such a call. Since it is pointless without setting a mode anyway, don't do it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34468 b3059339-0415-0410-9bf9-f77b7e298cf2 Add comment to a condition that is just a hack around a cdparanoia bug. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34472 b3059339-0415-0410-9bf9-f77b7e298cf2 Add checks for errors in stream_cdda's get_track_by_sector(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34495 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix seeking beyond EOF in stream_cdda to work with cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34577 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge remote-tracking branch 'origin/master'wm42012-04-0138-2554/+1270
|\| | |