summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Require versions of the Libav libraries corresponding to Libav release 0.7. These are: libavutil 51.7.0 libavcodec 53.5.0 libavformat 53.2.0 libswscale 2.0.0 libpostproc 52.0.0 Also disable the fallback to simple header check if these libraries could not be found with pkg-config; now compiling without pkg-config support for these always requires explicitly setting --enable-libav and any needed compiler/linker flags. The simple check would have let compilation proceed even if a version mismatch was detected.
| * | vo_vdpau: fix preemption recovery after recent commitsUoti Urpala2011-12-201-25/+27
| |/ | | | | | | | | | | | | Recent commits for screenshot support and video redraw changes didn't handle vdpau driver preemption state correctly, which could make the player crash if preemption occurred. Fix this and improve preemption handling a bit otherwise.
* | screenshot: improve quality by using additional swscale flagswm42012-01-183-8/+20
| | | | | | | | | | | | | | | | | | Adding these flags improves the quality of the YUV->RGB conversion when screenshots are taken. It trades precision for performance. This doesn't affect any other swscale uses, such as vf_scale or vo_x11. Based on a patch by cantabile. Fixes #140.
* | x11: simplify setting unicode text propertieswm42012-01-181-22/+6
| |
* | playtree: --shuffle shouldn't make playlist navigation uselesswm42012-01-181-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | When --shuffle was used, the pt_step -1 jumped to the next file, instead of the previously played file. This was because the playtree entries were never actually shuffled, but instead a random unplayed file was picked. Fix this by actually shuffling the playtree in advance. I couldn't see any clear location where exactly this should happen, so it's done when a playtree iterator is created. Not removing the old code, since new playtree entries could be added while an iterator is active.
* | subtitles: create only one instance of ASS_Render instead of twowm42012-01-182-57/+30
| | | | | | | | | | | | This simplifies the code. It also can make loading of mkv files faster, as initializing two ASS_Render instances required scanning mkv font attachments twice.
* | input: simplify previous commit a bit morewm42012-01-181-20/+20
| | | | | | | | Less mutable state = better.
* | input: fix crashes with libmenuwm42012-01-182-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Note: now that libmenu has been removed, the related code in input.c has been removed. If libmenu is ever added back, a queue_remove() function that can remove any item in the input queue will be required. libmenu triggered some special case that caused crashes by double frees. In particular the queue_pop function is used, expecting to remove an element that is not necessarily always the one that queue_pop removes. Fix by adding a queue_remove functions. Rewrite the other queue functions, since these are probably buggy as well. queue_pop didn't even attempt to maintain the doubly linked list.
* | core: uninit video output when audio file is playedwm42011-12-231-1/+4
| | | | | | | | Playing a video and then an audio file only left the VO window on screen.
* | mplayer: remove ---help optionwm42011-12-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | mplayer used to follow the convention of using a single dash ("-help") for each option. For some reason "--help" was allowed as special case. mplayer2 introduced a change to allow the more common convention with two dashes ("--help"). This means that in combination with the old special case for "--help", "---help" would suddenly be allowed. Remove this special case.
* | matroska: speed up ordered chapters scanning with improved heuristicswm42011-12-231-13/+38
|/ | | | | | | | | | | | | | | | | | | | | | | Try to be a bit more clever when scanning for linked mkv files (ordered chapters feature). Instead of just preferring filenames with a closer prefix match, consider file sizes as well. The assumption is that it is better to scan small files first. Achieve this by sorting by prefix first, and then by file size. In order to make this new behavior trigger more often, be a more "fuzzy" about the prefix matching: consider all matches in a certain range as equal. This will speed up the following case: title_01.mkv title_02.mkv title_03.mkv title_op.mkv (title0*.mkv link to it) Playing title_01.mkv, the old code would first scan title_0*, and then title_op.mkv, as "title_0" is the largest prefix. The new code would reduce the common prefix to "title", and then sort the resulting files by size, causing title_op.mkv to be scanned first. The total number of scanned files is reduced.
* vf_expand: always clear the added borderswm42011-12-191-93/+20
| | | | | | | | | | | | | | | | | | | | | | | | Using the "expand" filter makes the image area larger by adding borders to the video frame. These borders are supposed to be always black. The filter relied on the borders in its output buffer staying black without redrawing them for each frame. However, when using direct rendering, a video filter inserted after vf_expand can draw into these borders, for example the "unsharp" and "ass" filters. These changes incorrectly stayed visible in the the following video frames. Fix this by always clearing the borders in vf_expand. In some cases, this might be more work than necessary, but vf_expand has no way of detecting whether a subsequent filter draws into the borders or not, and this avoids fragile assumptions about the existing contents of the output buffer(s). This also deals with frame size changes when config() is called again. Before this commit, remains of the old video were visible if the new video frame size was smaller than before. Since we now always clear the borders, there's no more need for the complicated code that cleared only the regions that were covered by the OSD. Delete that.
* vf_dsize, vf_scale: fix behavior on multiple config() callswm42011-12-192-19/+26
| | | | | | When config() is called multiple times (e.g. aspect ratio changes while the same file is playing), the user settings are not honoured, because config() overwrites them. Don't do that.
* vf_dsize: cleanup identation (tabs to 4 spaces)wm42011-12-191-71/+71
|
* vo: reset EOSD change detection when VO is re-configuredwm42011-12-121-0/+3
| | | | | | | | | | | | | | | This fixes a crash with vo_gl when the switch_ratio slave command is used while a displaying an animated subtitle. switch_ratio will cause a config() call to vo_gl, which will reset all state, including the EOSD state. Next time the EOSD is rendered, its change detection will indicate that only subtitle positions have changed. The render code will attempt to access the EOSD data structures which have been deleted with config(). Fix this by forcing the change detection to indicate a full change if config() has been called. This only happens when doing switch_ratio with vo_gl, and the current subtitle is only changing positions, i.e. mp_eosd_images_t.changed == 1.
* configure, build: remove --disable-libav supportUoti Urpala2011-12-1116-97/+24
| | | | | Remove support for building the player without libavcodec and libavformat. These libraries are now always required.
* vo_vdpau: use new want_redraw mechanism in one more caseUoti Urpala2011-12-091-3/+1
|
* options: change --ass-hinting default to 0Uoti Urpala2011-12-071-1/+0
| | | | | | | With current typical video sizes, font sizes are large enough that they don't really need hinting (and particularly so for font sizes in display-resolution rendered subtitles in fullscreen mode), and hinting apparently causes problems with some fonts.
* Merge remote-tracking branch 'pigoz/gl'Uoti Urpala2011-12-073-13/+27
|\
| * vo_gl: cocoa: point swapinterval to cocoa_common functionStefano Pigozzi2011-12-063-0/+11
| | | | | | | | | | | | | | | | Currently there is no way to set the swap interval with a function that has a signature compatible with other platforms' gl extensions. Make a wrapper function around the gui toolkit method of setting the swap interval property, and point gl->SwapInterval to it.
| * vo_gl: cocoa: decouple cocoa_common from gl_commonStefano Pigozzi2011-12-063-13/+16
| | | | | | | | | | | | Remove the useless dependency on MPGLContext from cocoa_common, since it was used just to access the vo struct. Change gl_common to pass the vo struct directly to all the cocoa_common functions.
* | Merge remote-tracking branch 'wm4/window_title'Uoti Urpala2011-12-0715-62/+107
|\|
| * libvo: change default window title to "mplayer2"wm42011-12-062-2/+2
| | | | | | | | | | Also change the WM_CLASS "application class" string from "MPlayer" to "mplayer2". This string is visible as application name in Gnome 3.
| * x11: set window titles as UTF-8wm42011-12-062-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Always set the X11 window title properties as UTF-8. This is a bit tricky for X11 window properties which are not specified to use UTF-8, such as WM_NAME. We also properly set WM_ICON_NAME, which means the window caption and the text used in the task bar (of the WM has one) will be the same on most window managers. Before this commit, WM_ICON_NAME was always hardcoded to "MPlayer", even if --title or --use-filename-title was used. Also update the window title only on reconfigure, like it is done in mplayer-svn commit 34380.
| * libvo: remove title argument from struct vo_driver.configwm42011-12-0615-60/+50
| | | | | | | | | | | | | | | | | | | | This affects only the "new" VO API. The config() title argument was barely used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa GUI backends, which are the only ones properly supporting window titles, ignored this argument. Remove the title argument. Add the vo_get_window_title function. All GUI VOs are supposed to use it for the window title.
* | ad_ffmpeg: avoid avcodec_close() if avcodec_open() failedUoti Urpala2011-12-061-1/+1
| | | | | | | | | | | | Avoid call