summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'softvol' into my_masterwm42012-01-1815-211/+413
|\
| * ao_coreaudio: fix partial volume controlwm42012-01-181-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. Ideally, ao_coreaudio should implement full mute control, but I can't even test on OSX.
| * ao_pulse: add mute controlwm42012-01-181-18/+37
| |
| * ao_alsa: add mute controlwm42012-01-181-23/+43
| |
| * ao_alsa: use "Master" mixer channel instead of "PCM" by defaultwm42012-01-181-1/+1
| | | | | | | | | | | | | | Do this, because the "Master" channel normally provides proper mute control. The old default can be forced with: --mixer-channel=PCM
| * mixer, libao: add proper mute controlwm42012-01-183-23/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mixer frontend code can now make use of a proper system mixer mute toggle, if the audio output driver supports it. The consequence is that, if support is available, mplayer will no longer temporarily set the system volume to 0 if mute is enabled. Generally, the code now deals with the following combinations of available AO features: - software volume control forced by user (--softvol / soft_vol flag) => if enabled, never touch the "hardware" controls - "hardware"/driver volume control available (whether AOCONTROL_GET/SET_VOLUME works) => if not available, enable volume controls by enabling softvol - "hardware"/driver mute control (AOCONTROL_GET/SET_MUTE) => if not available, emulate by setting volume to 0 - whether the volume+mute controls are kept or not when the AO is closed (indicated by ao->no_persistent_volume) => if not persistent, restore the volume/mute next time the AO is opened
| * libao2: try to identify some audio outputs that have persistent volumewm42012-01-185-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | The mplayer frontend (specifically, mixer.c) needs to know this. If the audio output doesn't remember the volume across reinitialization, the frontend will restore the volume settings. There is also the assumption that the volume setting isn't global in this case (i.e. changing it won't change the volume of other applications or annoy the user otherwise). None of these changes have been tested. I'm guessing that ESD and NAS do per-connection non-persistent volume settings.
| * af: fix crash when trying to use volume controls with AC3 pass-throughwm42012-01-181-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.
| * core: remove EDL mutingwm42012-01-183-44/+1
| | | | | | | | | | | | I'm not sure what's the point of this feature. Aside from that, the EDL code is relatively buggy anyway, and I see no reason why such an obscure feature should be left in, if it possibly causes bugs.
| * audio: reset mplayer's mute state when the system mixer volume changeswm42012-01-183-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the mute state was only reset when either mute was explicitly cleared, or the volume was changed via mplayer controls. If the volume controls are connected to the system mixer, and the system mixer volume is changed otherwise (e.g. with alsamixer), the mute setting was inconsistent. Avoid this by checking the volume. If the returned volume is not 0, the mute flag is considered invalid. This relies on system mixers always returning a volume of 0 when mplayer has set the volume 0. Possible caveat: if the audio output's volume control don't return a volume of exactly 0 after 0 was written, enabling mute basically won't work. It will set the volume to silence, forget the previous volume, and report that mute is disabled.
| * audio: pretend muting doesn't set volume to 0wm42012-01-181-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Muting audio is implemented by setting the volume controls to 0. This has the annoying consequence that attempting to change the volume while the audio is muted will reset the user's volume setting. E.g. increasing the volume while muted will start from 0, instead from the volume that was set before muting. Changing the volume while muted effectively resets the volume to 0 (which is not very useful), with no possibility of restoring the old voume. This commit makes mplayer always report the volume that was set when mute was enabled while mute is still active. Caveat: this might be have confusing effects when the volume control is directly connected with a system wide mixer setting. Now it's even less obvious (and thus more confusing) that muting will set the mixer volume to 0. Also always clip input volumes, and remove some minor code duplication.
| * audio: properly restore audio volume on exit when mute is usedwm42012-01-184-13/+42
| | | | | | | | | | | | | | | | When you mute audio, mplayer is supposed to restore the volume controls on exit. This affects when --softvol isn't used and the audio output driver volume controls directly affect the system wide volume controls. This wasn't done in some cases.
| * ao_coreaudio: signal that volume controls are not persistentwm42012-01-181-0/+2
| | | | | | | | | | This will make the mplayer frontend restore the volume on its own when the audio device is reinitialized.
| * mixer: restore volume with audio output drivers without persistent volumewm42012-01-183-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some audio outputs don't provide access to a system-wide mixer control, and do per-application audio mixing. Further, some of these forget the volume as soon as the audio device is closed. This can be annoying, because mplayer will "forget" the volume when playing a new file or when crossing ordered chapter boundaries. Support restoring the volume on audio reinitialization if an audio output driver knowingly behaves this way. (This doesn't change that mplayer never writes any settings into the config file, including volume settings.) This commit doesn't yet change any actual output driver to use this code. Hopefully make some logic in the volume restore code a bit more robust.
| * softvol: make sure softvol settings are restored when switching audio trackswm42012-01-181-1/+1
| | | | | | | | | | | | At least in the case when switching to no audio track and then switching back, the volume settings were not restored with --softvol. Fix this by moving the call restoring the settings to a better place.
| * audio: fix crash when exiting file when mute is enabledwm42012-01-181-0/+1
| |
| * af: print audio filter chain in verbose modewm42012-01-181-0/+35
| | | | | | | | The string format used in print_fmt() is taken from init_audio_filters().
| * mixer: keep balance settingwm42012-01-072-0/+8
| | | | | | | | | | | | Similarly to the last commit, restore the balance setting when switching to a new file. Unlike the volume setting, balance is always implemented as filter, so this affects usage without --softvol too.
| * mixer: keep user volume setting when --softvol is usedwm42012-01-073-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When --softvol is enabled, the volume set by the "volume" property is reset when changing to a new file or crossing ordered chapter boundaries. Fix this by explicitly restoring the volume on audio reinitialization. Now the behavior with --softvol should be the same as if a system mixer is used, and the volume should be persistent across file changes. This also works around an inconsistency with the mute flag. The frontend assumed the mute flag is persistent across file changes, which was not true with --softvol. If not resetting the volume on playing new files is undesired, it can be avoided by putting volume=100 in the mplayer config file.
| * mixer: reindent/cosmetic changeswm42011-12-262-111/+119
| | | | | | | | | | | | There should be no real semantic changes. Remove the mixer_setbothvolume macro, as it was unused.
* | Merge branch 'utf8_input' into my_masterwm42012-01-1811-259/+327
|\ \
| * | etc/input.conf: make file contents match default key bindingswm42012-01-181-98/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | There were some slight differences between what input.conf mapped, and what was in input.c def_cmd_binds[]. Make them match. Add some minor documentation improvements in input.cfg. Also remove double comments ('##'), because they were confusing.
| * | x11: remove wskeys.hwm42012-01-182-107/+20
| | | | | | | | | | | | | | | Use the <X11/keysymdef.h> xlib header instead. I'm not sure why mplayer defined these constants itself.
| * | x11: add print and menu keyswm42012-01-183-0/+3
| | |
| * | x11: add KP_Separator to key mappingwm42012-01-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least on some keyboards, the key between '0' and 'Enter' on the key pad is mapped to KP_Separator. Since X11 VOs accept unicode input, the mplayer keycode this key generates depended on the numlock state, and with numlock enabled this mapped to an ASCII character. This is probably not what the user wanted, since two physical keys will always map to the same key code. Map it to KP_DEC.
| * | input: handle UTF-8 terminal inputwm42012-01-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This assumes the terminal uses UTF-8. If invalid UTF-8 is encountered (for example because the terminal uses a legacy encoding), the code falls back to the old method and feeds each byte as key code to the input code. In theory, UTF-8 input could randomly fail, because the code in getch2.c doesn't try to fill the input buffer correctly with input sequences longer than a byte. This is a problem with the design of the existing code.
| * | x11: allow unicode inputwm42012-01-182-29/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows using non-ASCII keys with X11. These keys were ingored before. Technically, this creates an invisible, non-interactive input method context. If creation fails, the code falls back to the old method, which allows a subset of ASCII only.
| * | input: allow unicode keys and reassign internal key codeswm42012-01-185-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves all key codes above the highest valid unicode code point (which is 0x10FFFF). All key codes below MP_KEY_BASE now directly map to unicode. Configuration files (input.conf) can contain unicode characters in UTF-8 to map non-ASCII characters/keys. This shouldn't change anything user visible, except that "direct key codes" (as used in input.conf) will change their meaning.
| * | bstr: add function for UTF-8 parsing (taken from libav)wm42012-01-142-0/+45
| |/ | | | | | | Parts taken from libavutil's GET_UTF8 and slightly modified.
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-01-1824-303/+205
|\ \
| * | vd_ffmpeg: explicitly set thread count even if 1Uoti Urpala2012-01-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libav started automatically enabling threaded decoding a while ago. This is not safe, as it means callbacks can suddenly get called from other threads and outside calls to libavcodec. We need to know when threading will be used and disable thread-unsafe callbacks in those cases. Explicitly set thread count to 1 instead of leaving it at 0 (which triggers the autodetection) when we are not requesting more threads; this should make sure that autodetection on libavcodec side will not be used.
| * | stream_vcd: fix option value allocated with strdupUoti Urpala2012-01-161-2/+4
| | | | | | | | | | | | | | | | | | A string freed with m_struct_free() was allocated with strdup(). This would cause a crash when using vcd:// streams. Fix to use talloc_strdup().
| * | audio: change default preference order of AO driverswm42012-01-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now PulseAudio is preferred over ALSA, which in turn is preferred over OSS. This should give best results on all systems. On systems with PulseAudio, we will always use it natively, rather than through the suboptimal ALSA emulation (which the default ALSA output is normally redirected to when PulseAudio is active; ALSA hardware devices will not be, but to use those the user must set AO explicitly in any case, so changing the defaults makes no difference). The fallback from ao_pulse to ao_alsa causes no noticeable delay on systems without PulseAudio. On systems with ALSA, we won't attempt to use OSS anymore. Also, move OpenAL above SDL. OpenAL should generally work better than SDL.
| * | af_volume: do not change data when volume is 1wm42012-01-161-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the volume multiplier is 1, the data shouldn't be changed, but the code actually multiplied each sample with 255/256. Change the factor to 256, and hope there wasn't a good reason for the value 255. Additionally, don't work on the data if it wouldn't be changed anyway. This is a micro-optimization. This doesn't touch the code path for the float format.
| * | core: print pause status message only once on consolewm42012-01-102-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the recent OSD redraw changes, every GUI expose event causes the message "===== PAUSE =====" to be printed on console. This was a bit annoying, so change it so that it is only printed once when going into paused mode. It's also printed again if the cache status changes (when playing URLs), or when the status line is printed during pause mode (when you seek while paused). This also removes some minor code duplication.
| * | osd: always display pause icon when frame steppingwm42012-01-092-2/+3
| | | | | | | | | | | | | | | | | | | | | When the OSD was enabled and the player was paused by executing the frame_step command, the OSD still displayed the icon indicating playback. Fix this and always set the proper icon when the pause state is changed.
| * | cleanup: remove left over access_mpcontext.h (from GUI)Uoti Urpala2012-01-092-61/+0
| | | | | | | | | | | | | | | | | | access_mpcontext.h and the declared functions in mplayer.c were only used by the now deleted internal GUI. Remove the unused header and functions.
| * | ad_ffmpeg: pass packet side data from libavformatUoti Urpala2012-01-084-18/+32
| | | | | | | | | | | | | | | Pass avpacket->side_data when using a libavcodec audio decoder together with libavformat demuxer (this was already done for video).
| * | vf_fspp: make compile without Libav internalsUoti Urpala2012-01-023-11/+9
| | | | | | | | | | | | | | | Make vf_fspp compile without using internal Libav/FFmpeg files and compile it by default.
| * | stream_ffmpeg: switch to libavformat avio APIUoti Urpala2012-01-021-19/+31
| | | | | | | | | | | | | | | | | | stream_ffmpeg was using the libavformat URLContext API. This API has been deprecated (for public use at least) in libavformat. Switch to the AVIOContext API.
| * | Libav API updates (remove most deprecated-in-0.7 uses)Uoti Urpala2011-12-223-42/+22
| | | | | | | | | | | | | | | | | | | | | | | | Update various code using Libav libraries to remove use of API features that were deprecated at Libav release 0.7. I think this removes them all with the exception of URLContext functions still used in stream_ffmpeg.c (at least other uses that generated deprecation warnings with libraries from 0.7 are removed).
| * | configure, build: require at least Libav 0.7Uoti Urpala2011-12-2212-78/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |