summaryrefslogtreecommitdiffstats
path: root/mpvcore
Commit message (Collapse)AuthorAgeFilesLines
* mplayer: handle subtitle renderer cleanup via uninit_playerwm42013-10-282-10/+24
| | | | | | | | | This might actually fix an issue with DVB channel switching, because that uses some sort of hack to reinitialize the demuxer, which causes the subtitle renderer to initialize twice. As consequence, the assert in add_subtitle_fonts_from_sources() would trigger. I didn't actually test the DVB case, because I don't have the hardware.
* command: disable autorepeat for some commands (actually properties)wm42013-10-283-5/+29
| | | | | | | | | | | | Disable autorepeat for the "add"/"cycle" commands when changing properties that are choices (such as fullscreen, pause, and more). In these cases, autorepeat is not very useful, and can rather harmful effects (like triggering too many repeated commands if command execution is slow). (Actually, the commands are just dropped _after_ being repeated, since input.c itself does not know enough about the commands to decide whether or not they should be repeated.)
* command: don't include stream_dvd.hwm42013-10-271-3/+0
|
* af: replace macros with too generic nameswm42013-10-262-1/+2
| | | | | | | | Defining names like min, max etc. in an often used header is not really a good idea. Somewhat similar to MPlayer svn commit 36491, but don't use libavutil, because that typically causes us sorrow.
* mpvcore: add a note about desync on track switchesBen Boeckel2013-10-261-0/+1
|
* osc: display cache status only below 45%ChrisK22013-10-261-1/+1
| | | | | Turnes out, when playing stuff over WiFi, the cache may go below 48% quite frequently.
* osc: fix bug for no-duration casesChrisK22013-10-261-1/+1
|
* osc: add experimental seekbar tooltipChrisK22013-10-261-6/+46
| | | | | | Not up to my quality standards (need ASS boundingboxes), so disabled by default and undocumented for now. Can be enabled with seektooltip=yes in plugin_osc.conf
* osc: make sure the OSC actually fits into the videoChrisK22013-10-261-1/+7
|
* options: don't let watch_later etc. overwite command line optionswm42013-10-254-24/+46
| | | | | | | | | | | | | | | There are certain cases where mpv will automatically set options, such as per-file configs, per protocol/VO/AO/extension profiles, and watch_later resume configs. All these were overwriting the user's options, even when they were specified on command line. Add something that explicitly preserves command line options. This means you can now actually use the command line to override any options that the playback resume functionality backups and restores. It still happily overrides options set at runtime (e.g. changed via properties while playing a file; then playing the next file might override them again), but maybe that's not a problem with typical use.
* mplayer: make --length relative to actual start of file, instead of 0wm42013-10-251-1/+2
| | | | | We always use the file's timestamps, so the start time can be easily something different from 0. Make the --length option respect this.
* m_config: slightly improve name handlingwm42013-10-252-16/+10
|
* m_config: remove unused fieldswm42013-10-252-9/+1
| | | | | We don't need that anymore, because the old way to get default values by recreating the m_config is gone.
* m_config: allow not allocating option struct, and use itwm42013-10-253-8/+23
| | | | | | | In cases we're just listing options or checking their values (as it happens with -vo/-vf etc. suboption parsing), we don't need to allocate abd initialize the actual option struct. All we're interested in is the list of options.
* m_config: refactor option defaults handlingwm42013-10-245-65/+53
| | | | | | | | | | | | | Keep track of the default values directly, instead of creating a new instance of the option struct just to get the defaults. Also get rid of the special handling of m_obj_desc.init_options. Instead, handle it purely by the option parser. Originally, I wanted to handle --vo=opengl-hq and --vo=direct3d_shaders with this (by making them aliases to the real VOs with a different preset), but since --vo =opengl-hq=help prints the wrong values (as consequence of the simplification), I'm not doing that, and instead use something different.
* options: fix bogus entrywm42013-10-241-1/+1
| | | | | This didn't make sense and caused issues with the following commit: if it's an option with a data pointer, it should be writable.
* m_config: don't require dragging along parent in initializationwm42013-10-241-14/+19
| | | | | | Instead, track the opstruct explicitly. It turns out we don't need the parent at all. Also, add something rudimentary to track the default values.
* m_config: minor simplificationwm42013-10-241-9/+7
| | | | I think in this case, having a separate function is confusing.
* m_config: store m_config_options in an array instead of a listwm42013-10-242-47/+39
| | | | | | | | Might reduce memory overhead, and is also less annoying. Since pointers to m_config_options are kept around, this assumes they're added only during initialization. Otherwise you'd get dangling pointers.
* m_config: refactor initialization, reduce amount of malloc'ed stringswm42013-10-242-48/+46
| | | | | Allocate strings only if needed (when we have to prefix sub-options). Prepare for storing m_config_options in an array instead of a list.
* m_config: slightly simplify dynamic option initializationwm42013-10-241-2/+1
| | | | | | We can assume memcpy is enough, because the source should be from static data. (It wouldn't work if the data could contain pointers back into itself.)
* m_config: don't allow aliasing with string optionswm42013-10-241-12/+7
| | | | | | Minor simplification. String options are now not allowed to use the same variable/field anymore. (Also affects other "dynamic" options which require memory allocation.)
* m_config: cosmetics: make code less verbosewm42013-10-241-7/+2
|
* audio/out: remove useless info struct and redundant fieldswm42013-10-231-7/+2
|
* audio/filter: split af_format into separate filters, rename af_forcewm42013-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af_format is the old audio conversion filter. It could do all possible conversions supported by the audio chain. However, ever since the addition of af_lavrresample, most conversions are done by libav/swresample, and af_format is used as fallback. Separate out the fallback cases and remove af_format. af_convert24 does 24 bit <-> 32 bit conversions, while af_convertsignendian does sign and endian conversions. Maybe the way the conversions are split sounds a bit odd. But the former changes the size of the audio data, while the latter is fully in-place, so there's at least different buffer management. This requires a quite complicated algorithm to make sure all these "partial" conversion filters can actually get from one format to another. E.g. s24le->s32be always requires convertsignendian and convert24, but af.c has no idea what the intermediate format should be. So I added a graph search (trying every possible format and filter) to determine required format and filter. When I wrote this, it seemed this was still better than messing everything into af_lavrresample, but maybe this is overkill and I'll change my opinion. For now, it seems nice to get rid of af_format though. The AC3->IEC61937 conversion isn't supported anymore, but I don't think this is needed anywhere. Most AOs test all formats explicitly, or use the AF_FORMAT_IS_IEC61937() macro (which includes AC3). One positive consequence of this change is that conversions always include dithering (done by libav/swresample), instead of possibly going through af_format, which doesn't do anything fancy. Rename af_force to af_format. It's essentially compatible with command line uses of af_format. We retain a compatibility alias for af_force.
* mplayer: don't call libquvi for local fileswm42013-10-201-0/+2
| | | | | | | | | | | This is obviously not needed, and just creates potential for bad breakages (e.g. what happens if libquvi tries to open a normal filename as http URL?). Note that for simplicity, we still pass file:// URIs to quvi, and we don't exclude other protocol prefixes either. In general, we don't know what protocols quvi might support, so we don't try to second-guess it. (Even though in practice, it's probably only "http" and "https".)
* input: fix --input-ar-rate=0wm42013-10-201-1/+1
| | | | Crashed, instead of disabling auto-repeat.
* tl_matroska: fix use-after-free with --cachewm42013-10-191-3/+3
| | | | | | | | | | If cache was enabled, using ordered chapters could easily crash. The reason is that enable_cache() reopens the demuxer and closes the old one. The code after that (reading m->ordered_chapters etc.) then accessed freed data. This commit also avoids enabling cache for files which are not used (which would make opening much slower).
* mp_talloc: simplify a bitwm42013-10-191-8/+6
| | | | | | | | | | | | | | Implement MP_GROW_ARRAY using MP_TARRAY_GROW. MP_GROW_ARRAY is basically the earlier version of MP_TARRAY_GROW, and had different semantics. When I added MP_TARRAY_GROW, I didn't dare to change it, but I think all code that relied on the exact semantics of MP_GROW_ARRAY is gone now, or the difference doesn't matter anyway. The semantic change is that now (n+1)*2 elements are preallocated instead of n*2. Also, implement MP_TARRAY_GROW using MP_RESIZE_ARRAY, which saves 1 line of code. In future, these macros should be part of TA.
* mp_msg: remove gettext() supportwm42013-10-182-86/+2
| | | | | | | | | Was disabled by default, was never used, internal support was inconsistent and poor, and there has been virtually no interest in creating translations. And I don't even think that a terminal program should be translated. This is something for (hypothetical) GUIs.
* mplayer: mp_msg replacementswm42013-10-181-95/+83
| | | | Not 100% complete; not touching the more complicated cases.
* osc: make transparency of background-box configurableChrisK22013-10-181-2/+3
| | | | see boxalpha option
* Merge Matroska ordered chapter changeswm42013-10-171-96/+295
|\ | | | | | | | | | | | | This adds support for ChapterSegmentEditionUID (pull request #258), and also fixes issue #278 (pull request #292). In fact, this is a straight merge of pr/292, which also contains pr/258.
| * matroska: don't add time for chapters without a sourceBen Boeckel2013-10-151-0/+3
| |
| * matroska: log about where missing time comes fromBen Boeckel2013-10-151-4/+21
| |
| * matroska: only error if at least a millisecond is missingBen Boeckel2013-10-151-1/+4
| |
| * matroska: account for missing information from short sourcesBen Boeckel2013-10-151-2/+31
| | | | | | | | | | If a source is shorter than the requested chapter length, account for the time missing.
| * matroska: modify chapter limits by join_diffBen Boeckel2013-10-151-9/+23
| | | | | | | | | | | | When adding or removing frames to avoid 1-frame seeks on chapter boundaries, the end of the chapter needs to be pushed or pulled by the same amount to keep the intended end frame the same.
| * matroska: use memmove when collapsing the source list downBen Boeckel2013-10-081-1/+1
| |
| * matroska: avoid requesting the same source multiple timesBen Boeckel2013-10-081-0/+18
| |
| * matroska: support chapter references to ordered editionsBen Boeckel2013-10-081-7/+51
| | | | | | | | | | | | Since ordered editions can reference external files, when an ordered chapter references another ordered edition, we have to go and figure out what is is referencing as well.
| * matroska: recursively search for referenced segmentsBen Boeckel2013-10-081-30/+50
| | | | | | | | | | | | | | When playing a Matroska file with ordered chapters, it may reference another file by edition uid. When this edition is also ordered, it may reference other files. When this occurs, the new segment/edition pair is added to the list of sources to search for.
| * matroska: refactor ordered chapter timeline buildingBen Boeckel2013-10-071-63/+103
| | | | | | | | | | This will need to be recursive to support chapters referencing ordered editions in other files.
| * matroska: select the edition using the requested edition uidBen Boeckel2013-10-071-3/+10
| |
| * matroska: store segment/edition uids in a single structureBen Boeckel2013-10-071-20/+24
| | | | | | | | | | | | To support edition references in matroska chapters, editions need to be remembered for each chapter and source. To facilitate easier management of these now-paired uids, a single structure is used.
* | spelling fixesAlessandro Ghedini2013-10-161-3/+3
| |
* | osc: fix borked optionsChrisK22013-10-151-13/+13
| |
* | osc docs: Add documentation for OSC and rename some optionsChrisK22013-10-151-6/+6
| | | | | | | | camelCase from some of the option names removed. If you were using those, you'll have to update them in your config.
* | osc: reset mouse position when leaving windowChrisK22013-10-151-4/+9
| | | | | | | | and store it freshly on first mouse_move event when entering again
* | osc: Don't create a config if none exists.ChrisK22013-10-151-19/+14
| | | | | | | | A documentation explaing where and how to create one instead will follow.
* | osc: use "info" instead of "warn" for config file creation messagewm42013-10-141-1/+1
| | | | | | | | | | When the main mpv config file, "info" is used, so this makes things consistent.
* | parser-cfg: allow putting options with leading "--"wm42013-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | Now you can pretend the config file is quite literally command line values dumped into a file, e.g. --option1=value --option2=value ... although the underlying mechanisms are quite different.
* | parser-cfg: use bstr everywhere after parsing stagewm42013-10-143-7/+8
| | | | | | | | | | | | Until now it used both char[] and bstr variants in the same code, which was nasty. For example, the next commit would have additionally required using memmove() to remove the prefix from the char[] string.
* | options: enable OSC by defaultwm42013-10-141-0/+1
| | | | | | | | Can can disable it with --osc=no.
* | mplayer: escape strings if needed when writing watch_later configwm42013-10-141-2/+19
| | | | | | | | | | | | | | | | | | This fixes handling of e.g. "--vf=lavfi=[ noise ]" when used with playback resume functionality. The spaces made it bug out, and there are more cases where it could potentially break. We could always escape for simplicity, but for now make old and new mpv builds somewhat interoperable and use this new escaping only if needed.
* | parser-cfg: parse % escapeswm42013-10-141-7/+31
| | | | | | | | | | | | | | | | | | | | This parses "%len%string" escapes, where string can contain any characters. This method of escaping has also been used in other parts of mplayer and mpv, so it's not a new idea. (Also, don't confuse with URL encoding.) Needed by the following commit.
* | mplayer: print ffmpeg library versions along with mpv version infowm42013-10-143-16/+33
| | | | | | | | | | | | | | | | | | | | Also change what the FFmpeg version info looks like, and additionally dump lavfi/lavr/lswr versions. (Don't bother with libavdevice and libpostproc, they're not important enough.) Unfortunately, there's no "single" FFmpeg/Libav version due to fatal braindeath on the FFmpeg/Libav side. We can't map the versions to releases either (it simply isn't accessible anywhere).
* | osc: raise minmousemove default setting to 3 and disable input mouse area ↵ChrisK22013-10-141-6/+11
| | | | | | | | | | | | when OSC not visible The mouse area that covers the OSC is now only activated when the OSC is actually visible, to make sure the mouse still hides if it happens to be parked in the OSC area without making the OSC show up.
* | mplayer, vo_image: simplify OSD redrawing, fix vo_image crashwm42013-10-131-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_image didn't handle OSD redrawing correctly anymore after OSD redrawing behavior was changed in commit ed9295c (or maybe it has been a problem for a longer time, and only showed up now). Basically, flip_page was called unexpectedly and when no image was stored, which made it crash trying to access the image. This could happen when for example provoking OSD redrawing by pausing while using --vo=image, or by using this command line: mpv --vo=image '-vf=lavfi="select=not(mod(n\,3))"' Fix by removing the code that pretends vo_image can redraw OSD, and by removing the framestepping fallback, which could make bad things happen if the VO didn't support OSD redrawing. By now, there aren't any real VOs that can't redraw the OSD properly, so this code is not needed and just complicates things like vo_image. This change likely will also be useful for vo_lavc (encoding).
* | mplayer: print a warning if libass is not compiledwm42013-10-131-0/+3
| | | | | | | | | | | | Libass is technically an optional dependency, but in practice users tend to disable libass accidentally or for the hell of it to get something "minimal", without being aware of the consequences.
* | osc: fix mouse hidingChrisK22013-10-131-2/+2
| |
* | osc: Once again new Show/Hide handlingChrisK22013-10-131-7/+34
| | | | | | | | | | | | | | The deadzone-size is now by default zero, so movement on the entire window will make the OSC show up. To avoid it showing up by randomly moving mice, the option 'minmousemove' controls how many pixels movement (default: 1) between ticks (frames) are necessary to make the OSC show up. The deadzone can be reenabeled by setting the option 'deadzonesize' (default: 0 = no deadzone, 1 = entire area between OSC and opposite window border), to restore the old behavior, set it to ~0.92. The OSC will hide immediately when leaving the window or entering the deadzone (if existing) or after the time specified with 'hidetimeout' (default: 500ms) passed without any new movement. Set to negative value to disabling auto-hide (thus restoring old behavior). The OSC will never hide if hovered by the mouse.
* | talloc: change talloc destructor signaturewm4