summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux_lavf: make avio buffer configurablewm42013-08-043-6/+15
| | | | | | Perhaps not very useful, but reserved for situations when a user reports awful latency and experimentation/debugging might be required to find out why or to fix it (happens often).
* demux_lavf: fix API usagewm42013-08-041-2/+10
| | | | | | | | | avio_alloc_context() is documented to require an av_malloc'ed buffer. It appears libavformat can even reallocate the buffer while it is probing, so passing a static buffer can in theory lead to crashes. I couldn't reproduce such a crash, but apparently it happened to mplayer-svn. This commit follows the mplayer fix in svn commit r36397.
* option: fix inverted --mouseinput optionwm42013-08-031-1/+1
| | | | Also fixes --no-mouseinput.
* command: make vf and af commands more verbosewm42013-08-032-2/+25
| | | | | | On success, print the filter chain on the OSD. Otherwise, show an error message on the OSD (just enough so that the user knows whether the command worked).
* command: add vf/af propertieswm42013-08-033-1/+63
|
* command: split filter changing in two functionswm42013-08-031-39/+49
| | | | | One function sets a raw filter list, the other allows "editing" the filter list.
* options: don't make options set during playback file local (e.g. --vf)wm42013-08-027-81/+67
| | | | | | | | | | | | | | | | Refactor file local options handling: instead of making all options implicitly file local between loading a file and terminating playback, explicitly make options file local which are required to be file local. Or in other words, introduce a M_SETOPT_BACKUP flag, which forces file local-ness when setting an option, and use this for file local command line options, per-file config files, and per-protocol/extension/vo/ao profiles. In particular, this changes the "vf" input command such that video filters stay permanent even when going to the next file in the playlist. The underlying reason for this is that the "vf" command uses the option setting command. This influences the "af" command as well.
* configure: lower libdvdread minimum required versionwm42013-08-021-1/+1
| | | | | | | | | This version number was essentially random. When I switched the test to pkg-config, I took the libdvdread version from my Debian unstable system as the minimum (as I knew that this version worked). A user reported that the libdvdread version 4.1.4 appeared to work fine, so lower the minimum version to the 4.1.x series.
* m_option.c: fix typo in messagewm42013-08-021-1/+1
|
* m_config: minor simplificationwm42013-08-021-11/+10
| | | | | The optstruct parameter in the m_config_parse_option functions was not needed.
* stream: parse URL escapes for file://wm42013-08-024-0/+41
| | | | | | | | | | | | | | | | | So for example "file:///file%20name.mkv" will open "file name.mkv". I'm not sure whether we want/need this. The old code didn't do it. Also, it's not really clear whether this is handled correctly. It seems the corresponding freedesktop.org "standard" allows a (useless) hostname part, which we should skip in theory. The number of slashes is not really clear either. We can open relative filenames (by removing one of the slashes from the example above), which is perhaps an unneeded feature. How does this even work with Windows paths? This issues can probably be corrected later. The URL unescape code is based on code from m_option.c removed with a recent commit.
* Remove m_structwm42013-08-026-208/+0
| | | | Not needed anymore.
* stream: redo URL parsing, replace m_struct usage with m_configwm42013-08-0222-592/+281
| | | | | | | | | | | | | Move the URL parsing code from m_option.c to stream.c, and simplify it dramatically. This code originates from times when http code used this, but now it's just relict from other stream implementations reusing this code. Remove the unused bits and simplify the rest. stream_vcd is insane, and the priv struct is different on every platform, so drop the URL parsing. This means you can't specify a track anymore, only the device. (Does anyone use stream_vcd? Not like this couldn't be fixed, but it doesn't seem worth the effort, especially because it'd require potentially touching platform specific code.)
* manpage: clean up environment variables sectionwm42013-08-021-54/+32
|
* manpage: document exit codeswm42013-08-021-0/+18
|
* manpage: move screenshot section above option listwm42013-08-021-17/+17
| | | | | Seems more logical, because general usage instructions are before the option list as well.
* mplayer: add more verbose exit codesAndre D2013-08-023-17/+61
|
* encoding-example-profiles: get rid of the N900 anti upscale hack.Rudolf Polzer2013-08-021-1/+1
| | | | | | This slightly increases file size due to needless downscaling on the device due to aspect correction, but keeps quality as is and prevents encoding errors caused by odd height/width.
* ao_coreaudio: move to new log APIStefano Pigozzi2013-08-014-99/+101
|
* ao_coreaudio: remove useless definesStefano Pigozzi2013-08-011-3/+0
| | | | They are already defined in the header file
* audio/out: add support for new logging APIStefano Pigozzi2013-08-013-10/+18
|
* vo_corevideo: use new log APIStefano Pigozzi2013-08-011-15/+5
| | | | | Also removes the printing of the OpenGL info when using verbose mode since gl_common already does that.
* vo_corevideo: move to C from Objective-CStefano Pigozzi2013-08-013-42/+12
| | | | | This file was alredy written in C. The only remaining part was the file exension and `#import`s.
* cocoa_common: use new log APIStefano Pigozzi2013-08-011-7/+11
|
* wayland: switch to the new mp_msg apiAlexander Preisinger2013-07-313-8/+23
|
* video/out: use new mp_msg stuff for vo.c and vo_openglwm42013-07-318-83/+97
| | | | The first step; also serves as example.
* mp_msg: introduce new log functions and macroswm42013-07-315-66/+255
| | | | | | | | | | | | | | | | | | | | | | | This has two goals: 1. Getting rid of global variables to make the core library-safe. 2. Getting rid of all the MSGT_* constants and the inconsistent prefixes spread throughout the source code. Both goals are not immediately reached with this commit. It's a huge transition that will take time. There are over >2500 mp_msg calls in the source, which all have to be replaced for this to work. The inconsistent prefixes are in particular annoying. Lots of code manually prefixes messages, e.g. mp_msg(MSGT_VO, MSGL_V, "[vo] ..."). Sometimes the prefixes don't even follow this convention (for example vo_direct3d.c uses "<vo_direct3d>" as prefix). This commit allows automatically adding prefixes on request, so consistency will hopefully improve. For now, this commit adds unused stuff, and behavior should not change. In mplayer.c, move the GetCpuCaps() call, because that used mp_msg() before mp_msg_init() was run.
* options: handle presets directly in m_configwm42013-07-316-36/+48
| | | | | This means that "mpv -vo opengl-hq:help" will actually show the correct defaults, instead those of plain vo_opengl.
* m_option: fix skipping of missing -vo/-ao entrieswm42013-07-311-3/+9
| | | | | | | | | The -vo/-ao options support skipping of unknown entries for the sake of allowing using the same config on possibly very different systems, which have different sets of VO/AOs available. Unfortunately skipping didn't quite work, possibly a rebase error when this was originally committed. Fix it.
* m_config: remove alias informationwm42013-07-312-24/+12
| | | | | | | | | | | | We don't need to store anymore whether an option is aliased by another option (which is what the alias_owner member did). Also, that member had a really bad name. This also removes some unneeded code from config_destroy(). Calling m_option_free() is always ok; this just skipped the call if it did nothing. In particular, it's ok to call m_option_free() on the same pointer multiple times. (Maybe that function is misnamed, and it should be m_option_clear().)
* m_config: store file local backup options differentlywm42013-07-312-16/+31
| | | | | | | | | | | File local options need to backup the global option value while a file is played. Instead of keeping a pointer in m_config_option for the backup value, put it into a separate list. This reduces per-option overhead for a rarely used obscure feature. (This implementation would have been a bit dumb in pre-mpv m_config, because there local options were the default, and _all_ options were backed up when starting playback of a file. This is not the case anymore, and normally only a very small number of options are backed up by default.)
* m_config: make m_profile struct non-publicwm42013-07-312-13/+11
|
* cocoa_common: simplify resize codeStefano Pigozzi2013-07-301-51/+16
| | | | | | | | | | This introduces some changes in resize behaviour. Most importantly the window frame is not constrained to it's screen's `visibleFrame`. Anyone who still wants that kind of behaviour when opening a video, can use `--autofit-larger`. Even though the size of the window is not constrained, it's position is, so that the titlebar will always be visible. When using `--no-border` even the position will not be constrained in any way.
* vd_lavc: print warning if hardware decoding API is not availablewm42013-07-301-0/+3
| | | | | At least currently, this case pretty much happens only in the case vdpau is requested, but not compiled in.
* vd_lavc: fix CONFIG_VDPAU checkwm42013-07-301-1/+1
| | | | | | CONFIG_VDPAU was just defined to 0, instead of undefined when vdpau was unavailable. I blame the old mplayer code, which apparently can't have consistent conventions.
* configure: fix vdpau test if vdpau is disabled/unavailablewm42013-07-301-5/+8
| | | | | | | | | The check for HAVE_AV_CODEC_NEW_VDPAU_API just determines whether the new vdpau libavutil pixel format is available (which implies presence of the new API). However, that pixel format (and the correspondig config test define) is also used in generic code (compiled even without vdpau) in fmt-conversion.c. Since the configure test didn't define the symbol if vdpau was not available, it broke in this case.
* mpv.rc: update Windows iconJames Ross-Gowan2013-07-305-2/+66
| | | | Based on the OSX bundle icon.
* crosscompile-mingw.txt: it's "MinGW" not "MingGW"wm42013-07-301-3/+3
|
* crosscompile-mingw.txt: mingw-w64 now has modern OpenGL headers in trunkwm42013-07-301-1/+1
|
* stream: remove inactive URL option fieldswm42013-07-303-23/+0
| | | | | | | | | The URL option parser only accesses certain fields. Remove the fields that are not accessed, and thus are completely unused and inaccessible. Historically, these fields were supposed to be settable using an extra list of options passed to open_stream(). Commit f518cf7 removed these extra options. Apparently nothing ever actually used this facility.
* stream_dvd: fix .ifo redirectionwm42013-07-301-2/+1
| | | | This was blatantly broken after stream->url was changed to talloc.
* Fix some warningsJonathan Yong2013-07-301-6/+6
|
* ao_coreaudio: use default output unit when no device is specifiedStefano Pigozzi2013-07-291-1/+3
| | | | | | Using the default output audio unit should provide a much better user exeperience since it changes automatically the output device based on which becomes the default one.
* command: silence a warningwm42013-07-291-0/+2
| | | | | This is unreachable code, but the compiler doesn't always determine this. This change shuts up the warning in these cases.
* build: fix build with vdpau, simplifywm42013-07-295-80/+43
| | | | | | | | | | | | Instead of generating vdpau_template.c with a Perl script, just include the generated file in git. This is ok because it changes very rarely, and the script is larger than the output it generates. It also simplify the Makefile, and fixes the build. The problem was that transitive dependencies do not work with generated files: there is no dependency information yet when building it the first time. I overlooked this because I didn't delete the .d files for testing (which contained the correct dependencies, but only _after_ a first successful build).
* build: fix vdpau_template.c generationwm42013-07-291-1/+1
|
* TOOLS: add script for emulating "unique application" functionality on Linuxwm42013-07-281-0/+91
| | | | | | | See github issue #43. This comes with a load of caveats, so be sure to read the comments at the start of the script.
* vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel APIwm42013-07-2819-318/+897
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This file is named so because because it's written against the "old" libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau"). Add support for the "new" libavcodec vdpau support. This was recently added and replaces the "old" vdpau parts. (In fact, Libav is about to deprecate and remove the "old" API without deprecation grace period, so we have to support it now. Moreover, there will probably be no Libav release which supports both, so the transition is even less smooth than we could hope, and we have to support both the old and new API.) Whether the old or new API is used is checked by a configure test: if the new API is found, it is used, otherwise the old API is assumed. Some details might be handled differently. Especially display preemption is a bit problematic with the "new" libavcodec vdpau support: it wants to keep a pointer to a specific vdpau API function (which can be driver specific, because preemption might switch drivers). Also, surface IDs are now directly stored in AVFrames (and mp_images), so they can't be forced to VDP_INVALID_HANDLE on preemption. (This changes even with older libavcodec versions, because mp_image always uses the newer representation to make vo_vdpau.c simpler.) Decoder initialization in the new code tries to deal with codec profiles, while the old code always uses the highest profile per codec. Surface allocation changes. Since the decoder won't call config() in vo_vdpau.c on video size change anymore, we allow allocating surfaces of arbitrary size instead of locking it to what the VO was configured. The non-hwdec code also has slightly different allocation behavior now. Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau doesn't work anymore (a warning suggesting the --hwdec option is printed instead).
* lavc_dr1: make reference counting thread-safewm42013-07-281-4/+39
| | | | | | | | See previous commits. This time, the lock is kept for rather long times (e.g. for the duration of a big image memory allocation), but this (probably) still doesn't matter at all. This also affects legacy code only (pre-refcounting libavcodec).
* mp_image_pool: make reference counting thread-safewm42013-07-282-40/+70
| | | | | | | | See previous commits. Also simplify this thing: 2 flags per pool image are enough to avoid a weird central refcount and an associated shared object keeping the refcount. We could even just store these two flags in the mp_image itself (like in mp_image.flags or mp_image.priv), but let's not for the sake of readability.
* mp_image: make reference counting thread-safewm42013-07-281-3/+27
| | | | | | | | | | This hasn't been done yet, because pthreads is still an optional dependency, so this is a bit annoying. Now doing it anyway, because maybe we will need this capability in the future. We keep it as simple as possible. We (probably) don't need anything more sophisticated, and keeping it simple avoids introducing weird bugs. So, no atomic instructions, no fine grained locks, no cleverness.
* m_config: try to print min/max values as integers in --list-optionswm42013-07-281-2/+2
| | | | | This switched to exponential representation too soon, and large integer values looked bad in the --list-options output.
* m_config: hide no-* opts in --list-options, simplify positional suboptswm42013-07-282-19/+23
| | | | | | | All these --no-... options in --list-options made the output rather unreadable, so hide them. Make the code for finding positional parameters (which are supposed to skip these no-* options) slightly simpler too.
* options: print default values in --list-optionswm42013-07-281-0/+24
| | | | | | | | | | Do this by recreating the m_config from scratch, which then must contain the default values. This doesn't quite work with legacy options using global variables: the default values get lost, so using --list-options will print the value as set by the config file. This also introduces a memory leak for string options backed by global variables. All of these issues will be eventually fixed by moving all options to structs.
* m_config: refactor some thingswm42013-07-288-152/+127
| | | | | | | | | | | | | | Change how m_config is initialized. Make it more uniform; now all m_config structs are intialized in exactly the same way. Make sure there's only a single m_option[] array defining the options, and keep around the pointer to the optstruct default value, and the optstruct size as well. This will allow reconstructing the option default values in the following commit. In particular, stop pretending that the handling of some special options (like --profile, --v, and some others) is in any way elegant, and make them explicit hacks. This is really more readable and easier to understand than what was before, and simplifies the code.
* core: make mpctx->opts a pointerwm42013-07-287-131/+132
| | | | | | | | Prevents some awkwardness in a later commit, and makes the code more uniform with other places where MPOpts is accessed. This is a pretty annoying commit (touches tons of lines all over the place), but it hurts only once.
* command: mark special options as unavailablewm42013-07-281-0/+2
| | | | | Special options (like -v, -playlist, etc.) don't have data associated with them, so reading them with the "options" property makes no sense.
* mp_image: pass through colorspace info to libavfilterwm42013-07-281-0/+8
| | | | | | | | | | | | | This change affects vf_lavfi. Until recently, libavfilter was not colorspace aware at all. This changed with the addition of colorspace fields to AVFrame. libavfilter's vf_scale picks them up (as of recent ffmpeg git). Since this support is still kind of wonky and not part of the normal format negotiation, this won't set the correct output colorspace, though. Not adding a separate test for HAVE_AVFRAME_COLORSPACE. This is slightly unclean, but on the other hand adding an explicit test seems like a waste of effort.
* vf: fix unintended overwriting of image infowm42013-07-282-4/+5
| | | | | | The symptom was that "-vf scale,format=rgba" broke the vsfilter colorspace hack in sd_ass. vf->reconfig is allowed to overwrite its input parameter for convenience (maybe that was a bad idea).
* ao_coreaudio: prevent buffer underruns to output garbageStefano Pigozzi2013-07-281-1/+6
| | | | | | This was removed in d427b4fd. I now found a sample that causes underruns when moving to a chapter and apparently this is also a problem when taking screenshots.
* ao_coreaudio: fix compilation on OS X 10.7Dmitry Kalinkin2013-07-281-1/+1
| | | | | | | | | | | | Reverts one of the changes from 18777ecf. `kAudioObjectPropertyScopeOutput` was introduced in the 10.8 SDK while `kAudioDevicePropertyScopeOutput` was moved to `AudioHardwareDeprecated.h`. Since the deprecation is silent for now (no warnings), just use the old constant. Either way, they both evaluate to 'outp', and in the 10.8 SDK the deprecated constant is defined in terms of the non-deprecated one. Fixes #155
* getch2: Load the "ce", "ks" and "ke" caps into a static bufferDiogo Franco (Kovensky)2013-07-261-3/+6
| | | | | | Fixes reports of printing of garbage (or anything else) other than clearing the status line to the end of line: the buffer returned by termcap_get could get moved, and if that happened then these 3 caps pointed to garbage.
* getch2: Deactivate getch2 on SIGINT; also handle SIGQUITDiogo Franco (Kovensky)2013-07-261-0/+4
|
* getch2: Only send ESC if it was typed twiceDiogo Franco (Kovensky)2013-07-261-3/+5
| | | | Avoids quitting mpv if any unknown escape is entered.
* getch2: Handle setupterm errorsDiogo Franco (Kovensky)2013-07-261-1/+18
| | | | | | setupterm abort()s if it can't initialize the terminal and the last parameter is NULL; handle se