summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rename af_volnorm to af_drcMartin2013-02-124-23/+27
| | | | | | The previous name of this filter was misleading, because it doesn’t actually normalize volume levels. What it does is closer to performing low-quality dynamic range compression, hence it is now called af_drc.
* configure: fix recently added testswm42013-02-111-2/+2
| | | | | | | | Commit 4d016a9 added some configure tests using statement_check. They wrongly used $_ld_tmp, which causes random failure, depending on whether the previous test using $_ld_tmp was successful. This happened because I blindly copied the statement_checks from somewhere else. Fix them.
* demux_lavf, ad_lavc, vd_lavc: pass codec header data directlywm42013-02-1010-284/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of putting codec header data into WAVEFORMATEX and BITMAPINFOHEADER, pass it directly via AVCodecContext. To do this, we add mp_copy_lav_codec_headers(), which copies the codec header data from one AVCodecContext to another (originally, the plan was to use avcodec_copy_context() for this, but it looks like this would turn decoder initialization into an even worse mess). Get rid of the silly CodecID <-> codec_tag mapping. This was originally needed for codecs.conf: codec tags were used to identify codecs, but libavformat didn't always return useful codec tags (different file formats can have different, overlapping tag numbers). Since we don't go through WAVEFORMATEX etc. and pass all header data directly via AVCodecContext, we can be absolutely sure that the codec tag mapping is not needed anymore. Note that this also destroys the "standard" MPlayer method of exporting codec header data. WAVEFORMATEX and BITMAPINFOHEADER made sure that other non-libavcodec decoders could be initialized. However, all these decoders have been removed, so this is just cruft full of old hacks that are not needed anymore. There's still ad_spdif and ad_mpg123, bu neither of these need codec header data. Should we ever add non-libavcodec decoders, better data structures without the past hacks could be added to export the headers.
* demux_lavf, ad_lavc, vd_lavc: refactor, cleanupwm42013-02-104-104/+79
| | | | | | | | | Rearrange some code to make it easier readable. Remove some dead code, and stop printing AVI headers in demux_lavf. (These are not actual AVI headers, just for internal use.) There should be no functional changes, other than reducing output in verbose mode.
* demux_lavf: remove code duplicationwm42013-02-105-68/+27
| | | | | | | | | | Also move the lang field into the general stream header. (SH_COMMON is an old hack to "share" code between audio/video/sub headers.) There should be no functional changes, other than not printing stream info in verbose mode or with slave mode. (The frontend already prints stream info, and this is just a leftover when individual demuxers did this, and slave mode remains broken.)
* core: redo how codecs are mapped, remove codecs.confwm42013-02-1054-3926/+1220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use codec names instead of FourCCs to identify codecs. Rewrite how codecs are selected and initialized. Now each decoder exports a list of decoders (and the codec it supports) via add_decoders(). The order matters, and the first decoder for a given decoder is preferred over the other decoders. E.g. all ad_mpg123 decoders are preferred over ad_lavc, because it comes first in the mpcodecs_ad_drivers array. Likewise, decoders within ad_lavc that are enumerated first by libavcodec (using av_codec_next()) are preferred. (This is actually critical to select h264 software decoding by default instead of vdpau. libavcodec and ffmpeg/avconv use the same method to select decoders by default, so we hope this is sane.) The codec names follow libavcodec's codec names as defined by AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders have names different from the canonical codec name. The AVCodecDescriptor API is relatively new, so we need a compatibility layer for older libavcodec versions for codec names that are referenced internally, and which are different from the decoder name. (Add a configure check for that, because checking versions is getting way too messy.) demux/codec_tags.c is generated from the former codecs.conf (minus "special" decoders like vdpau, and excluding the mappings that are the same as the mappings libavformat's exported RIFF tables). It contains all the mappings from FourCCs to codec name. This is needed for demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the codec as determined by libavformat, while the other demuxers have to do this on their own, using the mp_set_audio/video_codec_from_tag() functions. Note that the sh_audio/video->format members don't uniquely identify the codec anymore, and sh->codec takes over this role. Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which provide cover the functionality of the removed switched. Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure container/video combinations (e.g. the sample Film_200_zygo_pro.mov) are played flipped. ffplay/avplay doesn't handle this properly either, so we don't care and blame ffmeg/libav instead.
* dec_audio: uncrustifywm42013-02-092-193/+203
|
* options: change --no-config option, make it apply to input.conf as wellwm42013-02-098-46/+38
| | | | | | | | | | | | | Simplify --no-config and make it a normal flag option, and doesn't take an argument anymore. You can get the same behavior by using --no-config and then --include to explicitly load a certain config file. Make --no-config work for input.conf as well. Make it so that --input:conf=file still works in this case. As a technically unrelated change, the file argument now works as one would expect, instead of making it relatively to "~/.mpv/". This makes for simpler code and easier to understand option semantics. We can also print better error messages.
* Check return values of some mp_find_..._config_file function calls for NULLwm42013-02-092-4/+8
|
* mplayer: remove seconds/centiseconds display from terminal status linewm42013-02-091-6/+2
| | | | | | | | | Doesn't have much of a purpose for normal playback. You can get milliseconds display with --osd-fractions. It's also possible to build a custom status line with --status-msg. This gives more space on the status line and, in my opinion, is a bit less annoying.
* cleanup: replace OPT_FLAG_ON and OPT_MAKE_FLAGS with OPT_FLAGwm42013-02-097-52/+50
| | | | | | | | | | OPT_MAKE_FLAGS() used to emit two options (one with "no" prefixed), but that has been long removed by special casing flag options in the option parser. OPT_FLAG_ON() used to imply that there's no "no-" prefixed option, but this hasn't been the case for a while either. (Conceptually, it has been replaced by OPT_FLAG_STORE().) Remove OPT_FLAG_OFF, which was unused.
* options: unify single dash and double dash optionswm42013-02-098-207/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two option syntax variations: "old": -opt value "new": --opt=value "-opt=value" was invalid, and "--opt value" meant "--opt=" followed by a separate option "value" (i.e. interpreted as filename). There isn't really any reason to do this. The "old" syntax used to be ambiguous (you had to call the option parser to know whether the following argument is an option value or a new option), but that has been removed. Further, using "=" in the option string is always unambiguous. Since the distinction between the two option variants is confusing, just remove the difference and allow "--opt value" and "-opt=value". To make this easier, do some other cleanups as well (e.g. avoid having to do a manual lookup of the option just to check for M_OPT_PRE_PARSE, which somehow ended up with finally getting rid of the m_config.mode member). Error reporting is still a mess, and we opt for reporting too many rather than too few errors to the user. There shouldn't be many user-visible changes. The --framedrop and --term-osd options now always require parameters. The --mute option is intentionally made ambiguous: it works like a flag option, but a value can be passed to it explicitly ("--mute=auto"). If the interpretation of the option is ambiguous (like "--mute auto"), the second string is interpreted as separate option or filename. (Normal flag options are actually ambiguous in this way too.)
* config: do not require option valuewm42013-02-091-54/+38
| | | | | | | Now setting a value with "=" is not required anymore in config files. This should work analogous to command line arguments. Putting an entry "opt=value" into the config file is like "--opt=value" on the command line, and "opt" is like "--opt=" and "--opt".
* options: change handling of "no-" optionswm42013-02-097-60/+101
| | | | | | | | | | | | | | | | Normally, all flag options can be negated by prepending a "no-", for example "--no-opt" becomes "--opt=no". Some flag options can't actually be negated, so add a CONF_TYPE_STORE option type to disallow the "no-" fallback. Do the same for choice options. Remove the explicit "no-" prefixed options, add "no" as choice. Move the handling of automatic "no-" options from parser-mpcmd.c to m_config.c, and use it in m_config_set_option/m_config_parse_option. This makes these options available in the config file. It also simplifies sub-option parsing, because it doesn't need to handle "no-" anymore.
* audio/out, video/out: hide encoding VO/AOwm42013-02-066-12/+31
| | | | | | mpv -ao help and mpv -vo help shouldn't show the encoding outputs (named "lavc" on both cases). Also make it impossible to select these manually when not encoding.
* video/out: change autoprobe orderwm42013-02-061-16/+12
| | | | | | | | | | Basically, move vo_opengl above the other VOs (except vo_vdpau). This changes preferences on Windows and Linux. Move vo_opengl_old further down and make it the last fallback (before vo_x11). vo_caca is crap (no pun intended), and should never be autoprobed.
* 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
|