summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* video: cosmetics: reformat image format names tablewm42014-06-141-25/+17
|
* video: synchronize mpv rgb pixel format names with ffmpeg nameswm42014-06-1411-131/+117
| | | | | | | | | | | This affects packed RGB formats up to 16 bits per pixel. The old mplayer names used LSB-to-MSB order, while FFmpeg (and some other libraries) use MSB-to-LSB. Nothing should change with this commit, i.e. no bit order or endian bugs should be added or fixed. In some cases, the name stays the same, even though the byte order changes, e.g. RGB8->BGR8 and BGR8->RGB8, and this affects the user-visible names too; this might cause confusion.
* video: automatically strip "le" and "be" suffix from pixle format nameswm42014-06-143-20/+27
| | | | | | | | | | | | | These suffixes are annoying when they're redundant, so strip them automatically. On little endian machines, always strip the "le" suffix, and on big endian machines vice versa (although I don't think anyone ever tried to run mpv on a big endian machine). Since pixel format strings are returned by a certain function and we can't just change static strings, use a trick to pass a stack buffer transparently. But this also means the string can't be permanently stored by the caller, so vf_dlopen.c has to be updated. There seems to be no other case where this is done, though.
* build: fix generation of zsh completionAlessandro Ghedini2014-06-131-2/+2
| | | | | The Perl script must be run *after* the mpv executable is generated. Also use an absolute path to it.
* tv: add missing header for clock_gettimewm42014-06-131-0/+1
| | | | | | | Not sure how this symbol becomes visible in glibc (probably accidental or mandatory recursive inclusion via the other standard or Linux- specific headers), but normally this include file is needed to get the symbol.
* options: remove some more stuffwm42014-06-134-39/+15
| | | | | | | | The "classic" sub-option stuff is not really needed anymore. The only remaining use can be emulated in a simpler way. But note that this breaks the --screenshot option (instead of the "flat" options like --screenshot-...). This was undocumented and discouraged, so it shouldn't affect anyone.
* options: remove some unneeded stuffwm42014-06-133-28/+21
| | | | | No options pointing to global variables are in use anymore, so that part can be removed.
* command: redo the property typewm42014-06-135-565/+687
| | | | | | | | | | | | | | | | | | | | | | | Instead of absuing m_option to store the property list, introduce a separate type for properties. m_option is still used to handle data types. The property declaration itself now never contains the option type, and instead it's always queried with M_PROPERTY_GET_TYPE. (This was already done with some properties, now all properties use it.) This also fixes that the function signatures did not match the function type with which these functions were called. They were called as: int (*)(const m_option_t*, int, void*, void*) but the actual function signatures were: int (*)(m_option_t*, int, void*, MPContext *) Two arguments were mismatched. This adds one line per property implementation. With additional the reordering of the parameters, this makes most of the changes in this commit.
* options: remove OPT_FLAG_CONSTANTSwm42014-06-134-28/+19
| | | | | | | This means use of the min/max fields can be dropped for the flag option type, which makes some things slightly easier. I'm also not sure if the client API handled the case of flag not being 0 or 1 correctly, and this change gets rid of this concern.
* options: remove use of an inverted option valuewm42014-06-133-5/+4
| | | | | Now MPOpts.sub_fix_timing corresponds to the commandline switch directly, instead of storing the inverted value.
* options: turn --idx, --forceidx into --indexwm42014-06-137-21/+16
| | | | | | | | | | | | Also clarify the semantics. It seems --idx didn't do anything. Possibly it used to change how the now removed legacy demuxers like demux_avi used to behave. Or maybe it was accidental. --forceidx basically becomes --index=force. It's possible that new index modes will be added in the future, so I'm keeping it extensible, instead of e.g. creating --force-index.
* vd_lavc: use option parser for skip suboptionswm42014-06-131-22/+25
|
* input.conf: make ESC quit when encodingwm42014-06-131-0/+1
|
* demux: use av_malloc for packetswm42014-06-131-2/+2
| | | | | | | | Probably "needed" to get the correct alignment, although I'm not aware of actual breakages or performance issues. In fact we should probably always just allocate AVPackets, but for now use the simple fix.
* demux: simplify packet resizingwm42014-06-133-15/+5
| | | | | Actually we don't need to resize packets; we just need to make them shorter.
* encode: get rid of the recursion that led to a deadlock.Rudolf Polzer2014-06-121-23/+28
| | | | | Instead, the recursive call has been flattened away by instead overwriting a parameter and continuing.
* Revert "encode: make the central lock recursive"Rudolf Polzer2014-06-121-2/+1
| | | | This reverts commit 231c6672140f019257edd26db20fbcfc2554258f.
* demux: fix compilation with FFmpeg gitwm42014-06-122-11/+4
| | | | | | | | | FFmpeg requires a bullshit padding after each input buffer, and they just increased that padding without warning and without ABI or API bump. We need this only in one file (although mp_image hardcodes something similar, for which no FFmpeg API define is available), so drop our own define.
* cache: print cache size only in verbose modewm42014-06-121-2/+2
| | | | Seems pretty useless in general, so this reduces output noise.
* win32: implement --priority differentlywm42014-06-126-103/+17
| | | | | | | Does anyone actually use this? For now, update it, because it's the only case left where an option points to a global variable (and not a struct offset).
* tv: fix a hidden static variablewm42014-06-121-9/+9
|
* stream_bluray: fix some const declarationswm42014-06-121-6/+6
| | | | Like in commit 99f5fe.
* encode: don't load Lua scriptswm42014-06-121-0/+2
| | | | This is most likely never intended.
* audio: more detailed debugging outputwm42014-06-121-0/+2
| | | | Dump what the AO does on driver->play().
* audio: don't wait when draining and pausedwm42014-06-121-1/+1
| | | | | A corner case that could possibly lead to infinite waiting. Though I'm not aware that this actually happened in practice.
* encode: make the central lock recursivewm42014-06-121-1/+2
| | | | | | | | Unfortunately, there's a recursive function call in ao_lavc.c (play function), leading to a deadlock. The locking is getting a bit messy, so just make the lock recursive. This fixes #844.
* options: fix for compilation when encoding disabledxylosper2014-06-121-1/+1
| | | | | HAVE_* flags are always defined so ifdef will never work. They should be checked with their values.
* tv: use correct timestampsiive2014-06-121-12/+48
| | | | | | | | | | | | | | | | | | Squashed from the following mplayer-svn commits. The '#' is removed from the bug ID to prevent github from doing something stupid. Instead of adding the mplayer configure check for clock_gettime(), the POSIX identifiers are used for checking presence of the function. Use correct type of timestamps when recording from v4l2. Fix 2176 Patch by Jarek Czekalski <jarekczek at poczta onet pl>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37222 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow building of v4l2 without clock_gettime(). Add overly verbose message in case monotone timestamps are required by the kernel. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37223 b3059339-0415-0410-9bf9-f77b7e298cf2
* encode: make option struct localwm42014-06-117-56/+70
| | | | Similar to previous commits.
* input: make option struct localwm42014-06-114-72/+70
| | | | | | | | | Similar to previous commits. This also renames --doubleclick-time to --input-doubleclick-time, and --key-fifo-size to --input-key-fifo-size. We could keep the old names, but these options are very obscure, and renaming them seems better for consistency.
* demux_lavf: make option struct localwm42014-06-113-34/+37
| | | | Similar to previous commits.
* ad_lavc: make option struct localwm42014-06-113-24/+26
| | | | Similar to previous commit.
* vd_lavc: make option struct localwm42014-06-113-32/+37
| | | | | Removes specifics from options.h and options.c, and puts everything into vd_lavc.c.
* options: remove a global variablewm42014-06-112-5/+5
| | | | This is probably the last one, at least with my current configuration.
* vf_noise: remove global variableswm42014-06-111-9/+4
|
* vf_divtc: remove a global variablewm42014-06-111-5/+1
|
* Add more constwm42014-06-1182-208/+204
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* vo_caca: remove global variableswm42014-06-111-68/+84
| | | | The shit I put up with...
* demux_raw: remove global option variableswm42014-06-113-57/+85
|
* demux_mf: remove global option variableswm42014-06-114-18/+13
|
* options: remove global variables for swscale options; rename themwm42014-06-1111-83/+77
| | | | | | Additionally to removing the global variables, this makes the options more uniform. --ssf-... becomes --sws-..., and --sws becomes --sws- scaler. For --sws-scaler, use choices instead of magic integer values.
* stream_dvd: minor cleanupswm42014-06-113-141/+44
| | | | | We don't need a separate stream_dvd.h header file anymore. Some dead functions become apparent; remove them.
* stream_dvd, stream_dvdnav, stream_bluray: remove global option variableswm42014-06-1110-78/+78
|
* stream_dvb: remove global option variableswm42014-06-116-38/+36
|
* stream_cdda: remove global option variableswm42014-06-116-64/+66
|
* stream: add a generic way to setup stream priv defaultswm42014-06-112-0/+3
| | | | | | | | | | | | | | | Usually, each stream driver declares the size and option list of its private data. This was pretty natural for when most streams still used global variables to setup their defaults. They did by pointing priv_defaults to the (mutable) struct containing the option values. But falls short when storing the option values in MPOpts. So provide a somewhat inelegant but simple way to let the stream implementation setup the priv struct at initialization time. This is done with the get_defaults callback. It should return a copy of the struct used in MPOpts. (A copy, because if MPOpts is changed, string fields might be deallocated, and if that field is not described by stream_info.options, it won't be copied on init.)
* stream_pvr: remove global option variableswm42014-06-117-250/+122
|
* tv: remove printing of useless comment informationwm42014-06-114-14/+3
|
* tv: remove global option variableswm42014-06-118-390/+376
| | | | | | Pretty much nothing changes, but using -tv-scan with suboptions doesn't work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat options ("-tv-scan-x") stay compatible.
* m_config: add function to copy subopt-structwm42014-06-112-0/+43
|
* command: redo ancient TV/DVB/PVR commandswm42014-06-1114-207/+259
| | | | | | | | | | | | | | | | | | Convert all these commands to properties. (Except tv_last_channel, not sure what to do with this.) Also, internally, don't access stream details directly, but dispatch commands with stream ctrls. Many of the new properties are a bit strange, because they're write- only. Also remove some OSD output these commands produced, because I couldn't be bothered to port these. In general, this makes everything much cleaner, and will also make it easier to e.g. move the demuxer to its own thread. Don't bother updating input.conf, but changes.rst documents how old commands map to the new ones. Mostly untested, due to lack of hardware.
* osd: Center the volume icon in the osd fontChrisK22014-06-101-0/+0
|
* build: disable zsh completions by default, fixes e.g. cross compilationwm42014-06-091-0/+1
| | | | | | | | The Perl script generating the completions actually invokes mpv, and it runs during the build. This is not sane and breaks at least cross compilation. As a workaround, disable the completions by default for now.
* player: hide some messages in verbose modewm42014-06-091-3/+3
| | | | This started getting annoying.
* video: fix another cover art corner casewm42014-06-091-1/+1
| | | | | | | Playing a video and then an audio file with cover art kept displaying the last frame of the video. This was because the hasframe flag was set, perhaps due to redrawing the last video frame before the cover art image is decoded.
* client API: disable LIRC input by defaultwm42014-06-091-0/+1
| | | | | | Not only should using libmpv hog such global resources; it's also very unlikely an application embedding mpv will ever want to make use of this.
* audio: add a "weak" gapless mode, and make it defaultwm42014-06-095-18/+45
| | | | | | | | | | | | | | Basically, this allows gapless playback with similar files (including the ordered chapter case), while still being robust in general. The implementation is quite simplistic on purpose, in order to avoid all the weird corner cases that can occur when creating the filter chain. The consequence is that it might do not-gapless playback in more cases when needed, but if that bothers you, you still can use the normal gapless mode. Just using "--gapless-audio" or "--gapless-audio=yes" selects the old mode.
* player: show "neutral" position markers for OSD barswm42014-06-086-6/+33
| | | | This commit implements them for volume and some video properties.
* build: generate and install zsh completion scriptAlessandro Ghedini2014-06-084-1/+32
|
* TOOLS: add script for generating a zsh completion scriptAlessandro Ghedini2014-06-081-0/+129
| | | | As discussed in #775
* client API: minor documentation fixes/enhancementswm42014-06-082-4/+6
|
* client API: trigger wakeup when creating wakeup pipe/callbackwm42014-06-081-1/+5
| | | | | | | | | Since redundant wakeups are avoided now, it's easy to miss a wakeup when creating/setting the pipe/callback after the client API was signalled. If the client API is signalled, need_wakeup is set to true, and wakeup_client skips writing to the pipe or calling the client API. That this can happen is not very obvious to the client API, so trigger a wakeup right on start in order to remove this special case.
* manpage: document new --sub-file semanticswm42014-06-081-3/+11
| | | | This was forgotten in the previous commit.
* options: change --sub-file behaviorwm42014-06-083-1/+41
| | | | | | | | | | | | | | | | | | | --sub-file is actually a string list, so you can add multipel external subtitle files. But to be able to set a list, the option value was split on ",". This made it impossible to add filenames. One possible solution would be adding escaping. That's probably a good idea (and some other options already do this), but it's also complicated both to implement and for the user. The simpler solution is making --sub-file appending, and make it take only a single entry. I'm not quite sure about this yet. It breaks the invariant that if a value is printed and parsed, you get the same value back. So for now, just go with the simple solution. Fixes #840.
* client API: restructure waiting, do log msg wakeup properlywm42014-06-072-43/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Until now, availability of new log messages (through the mechanism associated with mpv_request_log_messages()) did not wakeup the client API properly. Commit 3b7402b5 was basically a hack to improve that somewhat, but it wasn't a solution. The main problem is that the client API itself is producing messages, so the message callback would attempt to lock the client API lock, resulting in a deadlock. Even if the lock was recursive, we'd run into lock-order issues. Solve this by using a separate lock for waiting and wakeup. Also, since it's a natural addition, avoid redundant wakeups. This means the wakeup callback as well as the wakeup pipe will be triggered only once until the next mpv_wait_event() call happens. This might make the wakeup callback be invoked in a reentrant way for the first time, for example if a mpv_* function prints to a log. Adjust the docs accordingly. (Note that non-reentrant beheavior was never guaranteed - basically the wakeup callback is somewhat dangerous and inconvenient.) Also remove some traces of unneeded code. ctx->shutdown for one was never set, and probably a leftover of an abandoned idea.
* client API: rename mpv_destroy() to mpv_detach_destroy()wm42014-06-074-22/+21
| | | | | | A bit verbose, but less misleading. In most cases, the API user probably actually wants mpv_terminate_destroy() instead, so the less-useful function shouldn't have a simnpler name anyway.
* client API: clarify mpv_get_wakeup_pipe docswm42014-06-071-13/+43
| | | | | | | | | | | It wasn't necessarily clear how this works. Especially make clear that the API user shouldn't expect that there's one byte per readable event in the wakeup pipe. Actually, the reason why this currently won't work is because property notifications can generate more events than wakeups. The limit of 4096 is a more fundamental issue, but the event ringbuffer is currently limited to 1000 entries anyway. Also add some important comments to mpv_set_wakeup_callback.
* client API: add API function that ensures total destructionwm42014-06-074-3/+55
| | | | | | | | | | | | mpv_destroy() should perhaps better be called mpv_detach(), because it destroys only the handle, not necessarily the player. The player is only terminated if a quit command is sent. This function quits automatically, and additionally waits until the player is completely destroyed. It removes the possibility that the player core is still uninitializing, while all client handles are already destroyed. (Although in practice, the difference is usually not important.)
* client API: docs: some clarificationswm42014-06-071-1/+7
|
* client API: change mpv_wait_event() timeout semanticswm42014-06-073-3/+7
| | | | | | | | | Now a negative timeout mean an infinite timeout. This is similar to the poll() system call. Apparently this is more intuitive and less confusing than specifying a "very high" value as timeout if you want to wait forever. For callers that never pass negative timeouts, nothing changes.
* build: prevent installation of client API examplewm42014-06-061-0/+1
| | | | | | | | This was never intended to be installed; waf just picked it up automagically. There's also a closed ticket on github where someone complains that the program