summaryrefslogtreecommitdiffstats
path: root/mpvcore
Commit message (Collapse)AuthorAgeFilesLines
* mp_msg: fix typo in message level for new msg API macrosStefano Pigozzi2013-08-221-2/+2
|
* mplayer: replace "D:" in status line with "Late:"wm42013-08-211-1/+1
| | | | | | | | | | Too many people thought "D:" really meant number of dropped frames. But it's actually the number of frames where the playloop thought it'd be a good idea to drop them. Of course this does nothing if frame dropping is disabled, but even with normal frame dropping, this doesn't indicate whether a frame was _really_ dropped. (Looks like libavcodec doesn't even give us this information reliably? The decode function can return no frame in case of codec delay due to threading and such.)
* options: replace --edition=-1 with --edition=autowm42013-08-211-1/+2
| | | | | | Originally, the objective of this commit was changing --edition to be 1-based, but this was cancelled. I'm still leaving the change to demux_mkv.c though, which is now only of cosmetic nature.
* mplayer: start track IDs from 1 rather than 0wm42013-08-212-2/+2
| | | | | | Completely pointless, but makes ChrisK happy for some reason. Track ID 0 is now rejected by the option parser itself.
* command: simplify video brightness/gamma/etc. handling a bitwm42013-08-201-44/+17
| | | | | | | | | | | | | We don't need to store the offsets of the options corresponding to the properties, because the option-property bridge knows about this already. The check against 1000 was for the case if e.g. the --brightness option is not used. Always overwrite the option value instead, both when querying and setting the property. (This is needed to make the settings persistent even if vf_eq is used and the video chain is reinitialized.) This commit assumes that VFCTRL_SET_EQUALIZER is always paired with VFCTRL_GET_EQUALIZER (likewise for VOCTRL), which is the case.
* m_option: make "add speed 0.1" command workwm42013-08-191-0/+1
| | | | Was broken since the speed property was switched from float to double.
* mp_core: declare seek_type enum outside of nested structwm42013-08-191-3/+8
| | | | cosmetic change. See previous commit.
* m_option: rename struct member named "new"wm42013-08-192-5/+5
| | | | | | Cosmetic change to allow C++ code to include this header. See github issue #195.
* video: make it possible to scale/pan the video by arbitrary amountswm42013-08-193-4/+17
| | | | | | | | | | | Add --video-align-x/y, --video-pan-x/y, --video-scale options and properties. See the additions to the manpage for description and semantics. These transformations are intentionally done on top of panscan. Unlike the (now removed) --panscanrange option, this doesn't affect the default panscan behavior. (Although panscan itself becomes kind of useless if the new options are used.)
* options: remove --panscanrange optionwm42013-08-192-3/+0
| | | | | | This option allowed you to extend the range of the panscan controls, so that you could essentially use it to scale the video. This will be replaced by a separate option to set the zoom factor directly.
* mplayer: reshuffle on every loop if --loop and --shuffle are usedwm42013-08-194-23/+7
| | | | | | | | | | See github issue #194. Unfortunately, this breaks the property that going back in the playlist always works as expected. This changes, because the playlist_prev command will work on the reshuffled playlist, instead of loading the previously played files in order. If this ever becomes an issue, I might revert this commit.
* mplayer: don't make restored options from quit_watch_later per-file localwm42013-08-171-6/+8
| | | | | | | | | | | | | | | Consider: mpv file1.mkv file2.mkv and file1.mkv is restored from an earlier session when quit_watch_later was used. Then all restored options were reset when file2.mkv is played, even if the user changed them during playback. This affects for example the fullscreen setting. Make it so that after finishing a resumed file, the previously restored settings are not reset again. (Which means only resuming will forcefully overwrite the settings.)
* command: more intuitive chapter seek behaviorPhilip Sequeira2013-08-173-1/+26
| | | | | | | | | If close to chapter start, skipping back goes to previous chapter (no change). If more than <threshold> seconds in, skipping back will now go to the beginning of the current chapter instead. The threshold is set by the new option --chapter-seek-threshold and defaults to 5 seconds. A negative value disables the new functionality.
* command: allow seek to "chapter -1"Philip Sequeira2013-08-172-3/+8
| | | | | This will seek to the start of the file regardless of whether the first real chapter starts there or not.
* m_option: add missing copy callback for some option typeswm42013-08-171-0/+5
| | | | | One reaosn for this is that this broke proper handling of .defval, since m_option_copy did nothing for these option types.
* m_option: make defval constwm42013-08-171-1/+1
| | | | There's really no reason why it shouldn't.
* sub: don't print detected charset if it's UTF-8wm42013-08-152-4/+9
| | | | | Too noisy. This also fixes that iconv() was called if "utf8" was used as codepage.
* sub: make --subcp=enca the default.wm42013-08-151-0/+5
|
* sub: allow specifying a fallback codepage if input is not UTF-8wm42013-08-151-2/+10
| | | | | | | | | | | | | | | Normally, --subcp always forces conversion. This really always forces conversion, even if the UTF-8 check on the input succeeds. Extend the --subcp to allow codepages as fallback if UTF-8 doesn't work. So, for example --subcp=utf8:cp1250 will use UTF-8 if the input looks like UTF-8, and will fall back to use cp1250 if the UTF-8 check fails. I think this should actually be the default, but on the other hand, this changes the semantics of the option, and a user would actually expect --subcp to force conversion, rather than silently using UTF-8 if that happens to work.
* bstr: make UTF-8 check stricterwm42013-08-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Don't accept overlong sequences. Don't accept codepoints past the maximum unicode codepoint. Don't accept the UTF-16 surrogate codepoints. I'm not sure if there are more codepoints that are defined to be invalid, but we just want to make libavcodec happy, so this is enough. (libavcodec's subtitle converter checks for valid UTF-8 and throws up and dies if it's not - now we want to use bstr_sanitize_utf8_latin1() to force valid UTF-8, so the strictness of our UTF-8 parser has to match at least that of the libavcodec's check.) I'm not sure whether the min test is actually 100% correct. Note that libavcodec also treats BOM codepoints as invalid. This is definitely a bug: the BOM is really just "zero-width non-breaking space" redefined by Microsoft, but it is perfectly valid to appear in the middle of a string. Official Unicode has merely deprecated the old usage of the BOM codepoint, and didn't make it illegal. Besides, the string could be from the start of a file, so even this check doesn't make sense even with libavcodec's insane logic. We don't copy this bug.
* sub: if charset detection fails, treat it as broken UTF-8wm42013-08-152-7/+17
| | | | | | | | | | | Broken UTF-8 in this context means we treat it as UTF-8, but we also interpret broken UTF-8 sequences as Latin1. Also, run our own UTF-8 check function before the charset detectors. This prevents from ENCA's UTF-8 check possibly messing up (like detecting 7-bit clean UTF-8 as ASCII, or other things). It also takes care of UTF-8 detection if no charset detector (ENCA, libguess) is compiled in, and it lets us deal better with cut-off UTF-8 sequences.
* bstr: add UTF-8 validation and sanitation functionswm42013-08-152-1/+81
|
* input: fix build if HAVE_PTHREADS is undefinedGiuliano Schneider2013-08-151-1/+1
|
* macosx: remove platform specific input queueStefano Pigozzi2013-08-131-3/+0
| | | | | Since last commit the input queue in the core is thread safe, so there is no need for all this platform specific stuff anymore.
* input: make input queue thread safeStefano Pigozzi2013-08-131-6/+35
| | | | | | | If pthreads are enabled the input queue accesses are regulated by acquiring a mutex. This is useful for platforms like OS X, where the events are created in the cocoa thread and added to the queue to then be dequeued in the playloop thread.
* mpvcore/options: Update default user agent stringMartin Herkt2013-08-131-1/+2
| | | | Uh… about time, I guess?
* video: add vaapi decode and output supportwm42013-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on the MPlayer VA API patches. To be exact it's based on a very stripped down version of commit f1ad459a263f8537f6c from git://gitorious.org/vaapi/mplayer.git. This doesn't contain useless things like benchmarking hacks and the demo code for GLX interop. Also, unlike in the original patch, decoding and video output are split into separate source files (the separation between decoding and display also makes pixel format hacks unnecessary). On the other hand, some features not present in the original patch were added, like screenshot support. VA API is rather bad for actual video output. Dealing with older libva versions or the completely broken vdpau backend doesn't help. OSD is low quality and should be rather slow. In some cases, only either OSD or subtitles can be shown at the same time (because OSD is drawn first, OSD is prefered). Also, libva can't decide whether it accepts straight or premultiplied alpha for OSD sub-pictures: the vdpau backend seems to assume premultiplied, while a native vaapi driver uses straight. So I picked straight alpha. It doesn't matter much, because the blending code for straight alpha I added to img_convert.c is probably buggy, and ASS subtitles might be blended incorrectly. Really good video output with VA API would probably use OpenGL and the GL interop features, but at this point you might just use vo_opengl. (Patches for making HW decoding with vo_opengl have a chance of being accepted.) Despite these issues, decoding seems to work ok. I still got tearing on the Intel system I tested (Intel(R) Core(TM) i3-2350M). It was also tested with the vdpau vaapi wrapper on a nvidia system; however this was rather broken. (Fortunately, there is no reason to use mpv's VAAPI support over native VDPAU.)
* video: redo hw decoding initialization, add --hwdec=autowm42013-08-111-0/+1
| | | | | | | | | | | | | | | | Change how the HW decoding stuff is organized, the way it's initialized in particular. Instead of duplicating the list of supported codecs for hwaccel decoders, add a probe function which allows each decoder to report whether it supports a given codec. Add an "auto" choice to the --hwdec option, which automatically enables hardware decoding if libavcodec and/or the VO supports it. What mpv prints on the terminal changes a bit. Now it will just print a single line whether hw decoding is used or not (and nothing at all if no hw decoding at all was requested). The pretty violent fallback from hw decoding to software decoding is still quite verbose and evil-looking though.
* core: make sure hw decoding works when playing multiple fileswm42013-08-111-5/+5
| | | | | The hw decoding context was set only for the first file (when the VO was initialized), instead of every file.
* input: add support for precise scroll axesAlexander Preisinger2013-08-074-3/+33
| | | | | | | | | | | | | | | Support horizontal and vertical axes of input devices. If the input device support precise scrolling with an input value then it should first be scaled to a standard multiplier, where 1.0 is the default. The multiplier will then applied to the following commands if possible: * MP_CMD_SEEK * MP_CMD_SPEED_MULT * MP_CMD_ADD All other commands will triggered on every axis event, without change the values specified in the config file.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-0641-113/+113
| | | | Followup commit. Fixes all the files references.
* core: move contents to mpvcore (1/2)Stefano Pigozzi2013-08-0667-0/+25203
core is used in many unix systems for core dumps. For that reason some tools work under the assumption that the file is indeed a core dump (for example autoconf does this). This commit just renames the files. The following one will change all the includes to fix compilation. This is done this way because git has a easier time tracing file changes if there is a pure rename commit.