summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* audio/out: prefer ao_dsound over ao_portaudiowm42013-02-061-3/+3
| | | | | | On Linux, ao_portaudio has weird freezing issues (possibly specific to the ALSA backend, though). Also ao_dsound is more likely to get multi- channel audio output right, and ao_portaudio probably mangles these.
* mixer: prefer AO softvol control over volume filterwm42013-02-062-2/+3
| | | | | | | | | | | | | | | This partially reverts earlier decisions, when I thought it would always be better to prefer the audio volume filter over the AO's, because the AO's relies on the underlying audio-API, which could be broken or exhibit unusual behavior (like it happened with ao_dsound). However, since the audio buffer can be quite large (500 ms), and we don't attempt to flush & refilter the audio on volume changes, always prefer AO volume control (as long as the AO mixer doesn't control the system mixer). Also document what the mixer.c related AO fields mean (hopefully not too brief).
* ao_dsound: support 6.1 and 7.1 channel configurationswm42013-02-061-30/+43
| | | | | | | Instead of doing the channel reordering manually, use the existing support in reorder_ch.c. Untested.
* Remove BSD legacy TV/radio support (BT848 stuff)wm42013-02-068-1184/+5
| | | | | FreeBSD actually supports V4L2, and V4L2 supports this chip. Also, this chip is from 1997. Farewell.
* core: remove --edlout functionalitywm42013-02-069-52/+1
| | | | | | | | | | | | | | | | This could write .edl files in MPlayer's format. Support for playing these files has been removed from mplayer2 quite a while ago. (mplayer2 can play its own, "new" .edl format, but does not support writing it.) Since this is a rather obscure functionality, and it's not really clear how it should behave (e.g. what should it do if a new file is played), and wasn't all that great to begin with (what if you made a mistake? the "edl_mark" command sucks for editing), get rid of it. Suggestions how to reimplement this in a nicer way are welcome. If it's just about retrieving timecodes, this in input.conf will do: KEY print_text "position: ${=time-pos}"
* command: add command to show playlist on OSDwm42013-02-063-0/+22
|
* version.sh: fix git rev. generation (.git is not always a directory)wm42013-02-061-1/+1
| | | | | | | | | It appears git submodule handling recently changed, changing the .git directory to a regular file containing submodule specific information. This means that version.sh would generate "#define VERSION "git-UNKNOWN"" if the checkout is a submodule, because it explicitly checks for a .git directory using test -d. Change it to -e so that this case is handled correctly.
* mplayer: don't show bogus audio PTS during hr-seekwm42013-02-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a problem that happened with syncplay.pl [1] when ad_mpg123 was in use, and get_current_time() returning a bogus time position. This only happens during seeking; the reported time is correct after the seek is done. The audio PTS as returned by playing_audio_pts() is simply bogus during hr-seek. With ad_ffmpeg, it was actually set to MP_NOPTS_VALUE during seeking, so get_current_time() did a fallback to the video PTS. However, ad_mpg123 is different and explicitly decodes some audio when resetting on seek (reasons why it does this unknown and uninvestigated; apparently it's to reinit libmpg123). As a result, the audio PTS was set to the start position of the seek (or something similar), which could be very different from the seek target time. This confused syncplay. It got the bogus time because it spams the player with read commands to the "time-pos" property, so this corner case was hit. Fix this by making get_current_time() return the seek target time if hr-seek is active. This should make behavior the same as before commit 3f949cf "mplayer: prefer audio PTS over video PTS for status line". [1] http://syncplay.pl
* mplayer: properly handle framestep when showing last video framewm42013-02-031-10/+12
| | | | | | | | | | | | | | When doing a framestep while there is no more video, nothing happened, and audio continued to play. When advancing to the next file, the player was paused. Fix it so that it always pauses (except on very low frame rate video, which is yet another corner case). We also change the meaning of framestepping a bit: in audio only mode, framstepping unpauses for a single playloop iteration. This is probably not useful at all, but makes the code a bit more simpler/uniform. Just like the previous commit, this matters most for audio files with cover art, for which this special case is the normal case.
* mplayer: reset audio/video delay if there's no next video framewm42013-02-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mpctx->delay is used to control audio/video sync. If more audio than video has been played, it grows larger, meaning A/V desync is happening. This logic is a bit broken when video has ended, and audio is still playing. In that case, it tries to read additional video frames from the video decoder (because even if you don't feed new packets to the decoder, it could still return delayed frames). For that, the code to determine whether frames should be dropped is invoked (check_framedrop()). This function detects that video is behind audio (mpctx- >delay growing big), and attempts to issue a framedrop. Reset mpctx->delay if there's no more video. This fixes the the frame drop display "counting up" on each playloop iteration when playing audio files with cover art. These files are basically audio+video files with a single video frame. When playing these files the the corner case of having run out of video while audio is still playing is the normal case. Also reset mpctx->last_av_difference. This is not updated anymore if video ends (since update_avsync() sets it, but it's not called if video_left is false). This removes the "stuck" A/V sync value when video ends. With audio files containing cover art we would display a meaningless value over the duration of the whole file otherwise.
* input: free all queued/allocated commands on exitwm42013-02-031-4/+21
| | | | | | | | | These were memory leaks in theory, though not in practice (all memory is free'd on exit anyway). However, it was still annoying when leak reporting is enabled. I'm not sure if there was an actual leak in check_autorepeat(), maybe not.
* vf_stereo3d: add support for green-magenta and yellow-blue duboiscehoyos2013-02-031-1/+11
| | | | | | | | | | | | | | Add more vf_stereo3d output formats. Adds high quality green-magenta and yellow-blue dubois anaglyph 3D output support. Patch by thomas schorpp, thomas.schorpp gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35906 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: video/filter/vf_stereo3d.c
* manpage: document option syntax variations betterwm42013-02-032-4/+29
|
* demux_lavf: default PTS to 0 for attached pictureswm42013-02-031-0/+4
| | | | | | The ffmpeg/libav attached picture hack usually set the PTS of video packets to AV_NOPTS_VALUE. Set it to 0 to avoid printing a warning by the filter code.
* vf_dlopen: fix external pixel format nameswm42013-02-031-7/+35
| | | | | "yv12" stopped working a while ago, and so did other FourCC-like names. Make "yv12" work again, so that the examples in TOOLS/vf_dlopen/ work.
* DOCS: remove files documenting removed/rewritten functionalitywm42013-02-0312-3267/+0
| | | | | | | Most of these are a waste of time. Some (like slave.txt) have been rewritten in rst. The remaining files aren't that useful, but probably do no harm.
* Copyright: cleanup entries for removed codewm42013-02-031-63/+3
|
* mplayer: make advancing the playlist respect loopingwm42013-02-033-10/+23
| | | | | | | | | | | | | | | Explicitly advancing the playlist with input commands ("playlist_next") didn't jump back to the first file, if the current file was the last on the playlist and looping was enabled. Fix this and make the behavior with explicit input and playback EOF the same. Also add a minor feature: if looping is enabled, and the current file is the first on the playlist, going back one entry jumps to the last playlist entry (without changing loop count). Fixes #22.
* demux_lavf: remove weird stream auto-selectionwm42013-02-032-21/+0
| | | | | | | Should be dead code. Stream selection is handled either during demuxer initialization, or via DEMUXER_CTRL_SWITCH_*. (If there were actually situations where this code did something, it was probably broken anyway.)
* demux_lavf: remove "internet radio hack"wm42013-02-031-39/+1
| | | | | | | | | | | | | | | | | | | | | It appears this is not needed anymore. ffmpeg can handle "chained" ogg files fine. These can be created with "cat file1.ogg file2.ogg > chained.ogg", and are similar (or equal) to some internet radio streams. Apparently ffmpeg used to add new tracks when crossing boundaries in chained files, and the hack in demux_lavf.c handled this. At some later point, ffmpeg's ogg demuxer was improved, and stopped adding new tracks as long as the codec doesn't change. Since the hack in demux_lavf.c was hardcoded to Vorbis (i.e. only active if the new and old track were both Vorbis), it's dead code, and we can remove it. I couldn't find any stream that triggered this hack, or fails without it. Firefox had a similar issue, and its bug tracker makes a good reference: https://bugzilla.mozilla.org/show_bug.cgi?id=455165 NOTE: this doesn't update metadata on track changes anymore.
* mp_common: improve OSD/status time formattingwm42013-02-031-4/+11
| | | | | | | | | Allow negative times. Timestamps can be negative, and we actually display negative time for other reasons too, such as when waiting for the old audio to drain with gapless audio.) Avoid overflows with relatively large time values. (We still don't handle values too large for int64_t.)
* cocoa_common: fix `--ontop` behaviour when windowedStefano Pigozzi2013-02-031-4/+4
| | | | | | | | | | Apply setLevel hacks for fullscreen switching with ontop active only in fullscreen. This keeps the window correctly on top even when losing focus. Fixes #21 I also reverted NSScreenSaverWindowLevel to NSNormalWindowLevel + 1, so that the cmd-tab UI is visible
* cocoa_common: fix focus with --ontop and space switchingStefano Pigozzi2013-02-031-4/+5
| | | | | | | | | | | | | | | The main problem this commit addresses is when you switched spaced back and forth with `--ontop` active the video window didn't recive focus again. Turns out that setting a normal window level just before conceding focus to other apps / spaces fixes the problem. I think Cocoa is misbehaving here, and should probably file a radar. I found 3 related improvements while fixing this: * fullscreen_window_level is a dead body from an older implementation. * Use NSScreenSaverWindowLevel for ontop. This should be a really high window level. Definitely higher than NSNormalWindowLevel + 1. * The window level was set correctly only when out of fullscreen.
* cocoa_common: make the resize window menu items use video sizeStefano Pigozzi2013-02-031-10/+5
| | | | | | | Make the window resizing menu items calculate the new window size based on the video size and not the current window size. This only makes a difference when using `--autofit`.
* cocoa_events: remove this functionalityStefano Pigozzi2013-02-025-185/+2
| | | | | | | | | | | | | This functionality looked smart but created problems with some kinds of multi touch events. Moreover some events coming from the windows server – like hovering a corner for window resize – didn't cause the player to wake up immediately. The "correct" non hacky way to implement async event polling with cocoa would be having the vanilla cocoa event loop driving the player and setting up mpv's terminal FDs as event sources for the cocoa event loop. Fixes #20
* DOCS: update encoding profiles installation instructionsStefano Pigozzi2013-02-011-2/+4
| | | | | | Simply removed the assumption that the user is using `mpv-build`. Now provide 3 lines of shell that can be copy-pasted by the user for instant gratification (and independent from $PWD).
* build: make it work on somewhat older ffmpeg versionswm42013-01-313-3/+3
| | | | | | Tested with n0.10.4. All these version checks are rather tricky, because Libav and FFmpeg change the same thing at slightly different versions.
* stream: set default HTTP user agent to "Mozilla/5.0"wm42013-01-311-1/+1
| | | | | | | | | | | Playing vimeo links using quvi support didn't work, even though clive could. clive is using quvi and curl to download videos from streaming sites, so if clive works mpv should always work as well. It didn't, and it turned out that it was due to the user agent. Change the default from whatever Lavf sends to what clive and cclive use. This will probably always work, as c(c)live are by the same author as libquvi, and there's a high chance it has been tested with all the supported sites.
* manpage: fixeswm42013-01-312-3/+11
| | | | | | | Add missing documentation for --quvi-format switch. Fix description how hw decoding is enabled. The old way currently still works, but is deprecated.
* screenshot: minor simplification, prefer VF over VOwm42013-01-306-52/+15
| | | | | | | | | | | | | Remove screenshot_force and associated logic. Always try to use the screenshot video filter before trying taking screenshots with the VO, which means that --vf=screenshot now takes the role of --vf=screenshot_force. (To make this clear, not adding a video filter is still the recommended way to take screenshots; we just change how VF screenshots are forced.) Preferring VO over VF and having --vf=screenshot_force used to make sense when not all VOs supported screenshots, and some VOs had somewhat broken screenshots (like vo_xv taking screenshots with OSD in it). But all these issues are fixed now, so just get rid of the cruft.
* mplayer: add newline for --print-msgwm42013-01-301-1/+1
|
* demux_mkv: support more formats with V_UNCOMPRESSEDwm42013-01-301-0/+6
| | | | | | | Select the generic raw video decoder in codecs.cfg ("MPrv" FourCC), which forces the generic lavc raw video decoder "rawvideo". This means all FourCCs understood by lavc rawvideo are supported, not just whatever has codecs.cfg entries.
* demux: don't use codec_tag for raw PCM formatswm42013-01-301-0/+8
| | | | | | | | | | | In commit 2dd2d9b, raw PCM was switched to always go through ad_lavc, and mapping codec IDs to mplayer internal codec tags was removed, as it was not needed anymore. However, some uncompressed audio lavf demuxers export their own codec tags, which collide with the existing internal mplayer codec tags, leading to incorrect raw PCM codec selection based on the misinterpreted audio tag. Re-add the mapped codec IDs from 2dd2d9b. Map them to an invalid codec tag, so that the generic lavc decoder is selected (assumes ad_lavc is the decoder for raw PCM).
* osx_common: cache OSX version numberStefano Pigozzi2013-01-272-37/+34
| | | | | | | | | | This commit makes `is_osx_version_at_least` cache the result of reading `/System/Library/CoreServices/SystemVersion.plist`. Since that is a file read operation it was bad to use this function frequently (i.e.: when processing user events). Remove `is_lion_or_above` (introduced in c9396c0a) as that was a more specialized wrapper which had the only advantage of adding it's own cache.
* vo_x11: fix redrawing on expose eventswm42013-01-271-9/+2
| | | | This part wasn't converted when changing to the new OSD redrawing way.
* x11: simplify handling of X Visuals and Colormaps in VOswm42013-01-276-101/+71
| | | | | | | | | | | | | | | | | Don't force VOs to pick an arbitrary default Visual and Colormap. They still can override them if needed. This simplifies the X11 VO interface. Always create a Colormap for simplicity. Using CopyFromParent fails if the selected visual is not the same of that of the parent window, which happens for me with vo_opengl. vo_vdpau and vo_xv explicitly set CWBorderPixel, do that in x11_common instead (it was already done for native windows, but not for slave mode windows). What gl_common did was incorrect in theory: freeing a colormap while a window uses it will change the colormap of the window to "None", and the color mapping for such windows is "undefined".
* x11: fix some obvious video mode switching bugswm42013-01-272-20/+31
| | | | | | | | | | | | | | | The original video mode wasn't reliably restored, so just store the mode separately. For some reason, window decorations got into the picture, possibly due to an incorrect initial window position or something like this. Normally, the window is positioned and sized such that it covers the screen entirely, even though the window still has decorations and is not in fullscreen mode (fullscreen wouldn't be correct, because the virtual desktop size is not screen size). Hack-fix by forcing window decorations off when VM-switching. All in all, VM switching is still buggy and useless.
* x11: reduce VO mode switching code duplicationwm42013-01-275-85/+35
| | | | | | | | | | | | | | Some parts for initiating mode switches were duplicated in every VO supporting X11 (except vo_opengl/gl_common, which didn't support mode switching). Move this to x11_common.c. Note that this might be slightly risky: is it really guaranteed that no VO needed to do "special" setup that depends on X parameters changing after a mode switch, such as bit depth, visuals etc.? From what I can see, this shouldn't be the case (X probably can't even change depth on the fly). Even if this should be a one-way road, VM switching is in general very useless, and its implementation buggy, so it can just be removed should unfixable problems arise.
* x11_common: do not set custom error handler when calling XSelectInputwm42013-01-271-47/+21
| | | | | | | | | | | | | Do this because we want to remove the global variables required with the old code. In particular, there doesn't seem any way to set a secure user data pointer with xlib. XSelectInput() causes a BadAccess error when some of the requested event flags are reserved (for exclusive flags like ButtonPress). The custom error handler caught this and set a global variable, so that the code could retry the XSelectInput() call without the conflicting flags. Use a different approach that doesn't need a custom error handler. (Although we still assume that the error handler doesn't terminate the program.)
* x11: cleanup, refactorwm42013-01-2710-975/+781
| | | | | | | | | | | | | | | | Move things that are used by vo_xv only into vo_xv, same for vo_x11. Rename some functions exported by x11_common, like vo_init to vo_x11_common. Make functions not used outsode of x11_common.c private to that file. Eliminate all global variables defined by x11_common (except error handler and colormap stuff). There shouldn't be any functional changes, and only code is moved around. There are some minor simplifications in the X11 init code, as we completely remove the ability to initialize X11 and X11+VO separately (see commit b4d9647 "mplayer: do not create X11 state in player frontend"), and the respective functions are conflated into vo_x11_init() and vo_x11_uninit().
* windows support: support 64-bit MS Windows in EXTERN_PREFIX definitionUoti Urpala2013-01-271-1/+1
| | | | | | | | The EXTERN_PREFIX definition changed in 94b7db2 needs a separate case for _WIN64, as MinGW defines both that and _WIN32 but there is no prefix unlike 32-bit case. Patch by redxii on http://devel.mplayer2.org/ticket/226
* vf_scale: fix warningwm42013-01-271-1/+0
|
* sws_utils: use libswscale for GBRP output if availablewm42013-01-271-1/+1
| | | | libswscale added support for this recently.
* vo_opengl: always ditherWessel Dankers2013-01-272-30/+12
| | | | | | | | | | | | Dithering was disabled if the input bit depth was not larger than the output bit depth of the screen framebuffer. But since scaling, RGB conversion, and other filters change the number of significant bits anyway, dithering could still benefit image quality even in these cases. Always do dithering, unless dithering is completely disabled. The original intention of this mechanism was not to change the image needlessly when playing video that matches the native bit depth of the screen.
* stream: fix reconnecting on broken network connectionswm42013-01-243-21/+50
| | | | | | | | | | | | | | | | This didn't work properly for HTTP with libavformat. The builtin HTTP implementation reconnects automatically on its own, while libavformat doesn't. Fix this by adding explicit reconnection support to stream_lavf.c, which simply destroys and recreates the AVIO context. It mostly works, though sometimes it mysteriously fails, spamming crap all over the terminal and feeding broken data to the decoders. This is probably due to itneractions with the cache. Also, reconnecting to unseekable HTTP streams will make it read the entire stream until the previous playback position is reached again. It's not known whether this change makes behavior with "strange" protocols like RTP better or worse.
* stream: uncrustify stream.c/.hwm42013-01-242-582/+664
| | | | The formatting almost made me break out in tears.
* demux_mkv: support V_UNCOMPRESSED video trackswm42013-01-244-3/+20
| | | | | | Tested with a sample generated by: ffmpeg -i in.mkv -an -vcodec rawvideo out.mkv Also add proper dependencies for the Matroska Perl stuff in Makefile.
* stream: implement some HTTP specific options for stream_lavfwm42013-01-249-30/+61
| | | | | | | | | | | | | | | | | | The "http:" protocol has been switched to use ffmpeg's HTTP implementation some time ago. One problem with this was that many HTTP specific options stopped working, because they were obviously implemented for the internal HTTP implementation only. Add the missing things. Note that many options will work for ffmpeg only, as Libav's HTTP implementation is missing these. They will silently be ignored on Libav. Some options we can't fix: --ipv4-only-proxy, --prefer-ipv4, --prefer-ipv6 As far as I can see, not even libavformat internals distinguish between ipv4 and ipv6. --user, --passwd ffmpeg probably supports specifying these in the URL directly.
* cookies: fix crashwm42013-01-241-3/+3
| | | | | This was broken in 3f85094 (probably merge mistake). I guess nobody ever uses this feature.
* vd_lavc: add stupid hack to fix decoding of some files with Libav 0.8.xwm42013-01-241-5/+8
| | | | | | | | | | The decoder returns with AVFrame.format not correctly set for some h264 files (strangely only some). We have to access AVCodecContext.pix_fmt instead. On newer libavcodec versions, it's the other way around: the AVCodecContext.pix_fmt may be incorrectly set on pixel format changes, and you are supposed to use AVFrame.format. The same problem probably exists on older ffmpeg versions too.
* sub: add stupid hack for vobsub decoding with Libavwm42013-01-241-1/+10
| | | | | | | If we detect Libav, always use the old builtin vobsub decoder (in spudec.c). Note that we do not want to use it for newer ffmpeg, as spudec.c can't handle the vobsub packets as generated by the .idx demuxer, and we want to get rid of spudec.c in general anyway.
* stream_cdda: support latest libcdio versionUoti Urpala2013-01-242-2/+32
|
* configure: for now reject the newer libcdio APIRudolf Polzer2013-01-241-1/+1
| | | | A patch supporting the newer API AND the older API is in the works.
* mp_msg, getch2: unix tty background supportRudolf Polzer2013-01-235-17/+124