summaryrefslogtreecommitdiffstats
path: root/mpvcore/m_option.c
Commit message (Collapse)AuthorAgeFilesLines
* m_option: handle audio/filter filters with old option parsingwm42013-11-131-3/+9
| | | | | | | | | These use the _oldargs_ hack, which failed in combination with playback resume. Make it work. It would be better to port all filters to new option parsing, but that's obviously too much work, and most filters will probably be deleted and replaced by libavfilter in the long run.
* command: add generic "multiply" commandwm42013-10-311-0/+36
| | | | Essentially works like "add".
* m_config: allow not allocating option struct, and use itwm42013-10-251-2/+2
| | | | | | | 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-241-0/+9
| | | | | | | | | | | | | 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.
* 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: m_option: fix clang -Wformat compiler warningStefano Pigozzi2013-09-141-1/+1
| | | | Code was using %d format instead %zd to print size_t data.
* core: restore user-set video and audio filters with resume functionalitywm42013-09-131-0/+37
| | | | | This requires adding a function that converts the filter list back to a string.
* audio: make internal audio format 0 an invalid formatwm42013-08-261-1/+1
| | | | | | | | | | | | Having to use -1 for that is generally quite annoying. Audio formats are created from bitmasks, and it can't be excluded that 0 is not a valid format. Fix this by adjusting AF_FORMAT_I so that it is never 0. Along with AF_FORMAT_F and the special formats, all valid formats are covered and guaranteed to be non-0. It's possible that this commit will cause some regressions, as the check for invalid audio formats changes a bit.
* 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.
* 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.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-4/+4
| | | | Followup commit. Fixes all the files references.
* core: move contents to mpvcore (1/2)Stefano Pigozzi2013-08-061-0/+2407
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.