path: root/common
diff options
authorwm4 <wm4@nowhere>2016-09-21 16:19:56 +0200
committerwm4 <wm4@nowhere>2016-09-21 17:35:00 +0200
commit7783f0b7d7037e2420deece510b8315cfe3b8e91 (patch)
tree5d6aab943915187e36a6fb8488b4798feb9ace3c /common
parent75d12c174f0b5bb03c71872241f965ac674221d7 (diff)
client API: more or less deprecate mpv_set_option()
With the merging of options and properties, the mpv_set_option() function is close to being useless, and mpv_set_property() can be used for everything instead. There are certain conflicts remaining, which are explained in depth in the docs. For now, none of this should affect existing code using the client API. Make mpv_set_property() redirect to mpv_set_option() before initialization. Remove some options marked as M_OPT_FIXED. The "pause" and "speed" options cannot be written anymore without the playloop being notified by it, so the M_OPT_FIXED does nothing. For "vo-mmcss-profile", the problem was lack of synchronization, which has been added. I'm not sure what the problem was with "frames" - I think it was only marked as M_OPT_FIXED because changing it during playback will have no effect. Except for pause/speed, these changes are needed to make them writable as properties after mpv_initialize(). Also replace all remaining uses of CONF_GLOBAL with M_OPT_FIXED.
Diffstat (limited to 'common')
1 files changed, 19 insertions, 19 deletions
diff --git a/common/encode_lavc.c b/common/encode_lavc.c
index 78688545b5..d0523857ee 100644
--- a/common/encode_lavc.c
+++ b/common/encode_lavc.c
@@ -36,25 +36,25 @@
#define OPT_BASE_STRUCT struct encode_opts
const struct m_sub_options encode_config = {
.opts = (const m_option_t[]) {
- OPT_STRING("of", format, CONF_GLOBAL),
- OPT_STRINGLIST("ofopts*", fopts, CONF_GLOBAL),
- OPT_FLOATRANGE("ofps", fps, CONF_GLOBAL, 0.0, 1000000.0),
- OPT_FLOATRANGE("omaxfps", maxfps, CONF_GLOBAL, 0.0, 1000000.0),
- OPT_STRING("ovc", vcodec, CONF_GLOBAL),
- OPT_STRINGLIST("ovcopts*", vopts, CONF_GLOBAL),
- OPT_STRING("oac", acodec, CONF_GLOBAL),
- OPT_STRINGLIST("oacopts*", aopts, CONF_GLOBAL),
- OPT_FLAG("oharddup", harddup, CONF_GLOBAL),
- OPT_FLOATRANGE("ovoffset", voffset, CONF_GLOBAL, -1000000.0, 1000000.0),
- OPT_FLOATRANGE("oaoffset", aoffset, CONF_GLOBAL, -1000000.0, 1000000.0),
- OPT_FLAG("ocopyts", copyts, CONF_GLOBAL),
- OPT_FLAG("orawts", rawts, CONF_GLOBAL),
- OPT_FLAG("oautofps", autofps, CONF_GLOBAL),
- OPT_FLAG("oneverdrop", neverdrop, CONF_GLOBAL),
- OPT_FLAG("ovfirst", video_first, CONF_GLOBAL),
- OPT_FLAG("oafirst", audio_first, CONF_GLOBAL),
- OPT_FLAG("ometadata", metadata, CONF_GLOBAL),
+ OPT_STRING("of", format, M_OPT_FIXED),
+ OPT_STRINGLIST("ofopts*", fopts, M_OPT_FIXED),
+ OPT_FLOATRANGE("ofps", fps, M_OPT_FIXED, 0.0, 1000000.0),
+ OPT_FLOATRANGE("omaxfps", maxfps, M_OPT_FIXED, 0.0, 1000000.0),
+ OPT_STRING("ovc", vcodec, M_OPT_FIXED),
+ OPT_STRINGLIST("ovcopts*", vopts, M_OPT_FIXED),
+ OPT_STRING("oac", acodec, M_OPT_FIXED),
+ OPT_STRINGLIST("oacopts*", aopts, M_OPT_FIXED),
+ OPT_FLAG("oharddup", harddup, M_OPT_FIXED),
+ OPT_FLOATRANGE("ovoffset", voffset, M_OPT_FIXED, -1000000.0, 1000000.0),
+ OPT_FLOATRANGE("oaoffset", aoffset, M_OPT_FIXED, -1000000.0, 1000000.0),
+ OPT_FLAG("ocopyts", copyts, M_OPT_FIXED),
+ OPT_FLAG("orawts", rawts, M_OPT_FIXED),
+ OPT_FLAG("oautofps", autofps, M_OPT_FIXED),
+ OPT_FLAG("oneverdrop", neverdrop, M_OPT_FIXED),
+ OPT_FLAG("ovfirst", video_first, M_OPT_FIXED),
+ OPT_FLAG("oafirst", audio_first, M_OPT_FIXED),
+ OPT_FLAG("ometadata", metadata, M_OPT_FIXED),
.size = sizeof(struct encode_opts),