summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-22 19:08:07 +0200
committerwm4 <wm4@nowhere>2017-08-22 19:08:07 +0200
commit8f2ccba71bb44cceb43436cbbabd6e42fc71925c (patch)
treeae9fd1fd508a505607f7374096b68703d336b2a4 /player/command.c
parent0c88b661f9c5025cd86d0445d5a993f00224842a (diff)
downloadmpv-8f2ccba71bb44cceb43436cbbabd6e42fc71925c.tar.bz2
mpv-8f2ccba71bb44cceb43436cbbabd6e42fc71925c.tar.xz
video: change --deinterlace behavior
This removes all GPL only code from it, and that's the whole purpose. Also happens to be much simpler. The "deinterlace" option still sort of exists, but only as runtime changeable option. The main change in behavior is that the property will not report back the actual deint state. Or in other words, if inserting or initializing the filter fails, the deinterlace property will still return "yes". This is in line with most recent behavior changes to properties and options.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/player/command.c b/player/command.c
index d94f819992..124b029c3d 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2481,29 +2481,6 @@ static int mp_property_hwdec_interop(void *ctx, struct m_property *prop,
return m_property_strdup_ro(action, arg, name);
}
-#if HAVE_GPL
-// Possibly GPL due to 7b25afd7423e9056782993cbd1b32ead64ac1462.
-static int mp_property_deinterlace(void *ctx, struct m_property *prop,
- int action, void *arg)
-{
- MPContext *mpctx = ctx;
- if (!mpctx->vo_chain)
- return mp_property_generic_option(mpctx, prop, action, arg);
- switch (action) {
- case M_PROPERTY_GET:
- *(int *)arg = get_deinterlacing(mpctx) > 0;
- return M_PROPERTY_OK;
- case M_PROPERTY_GET_CONSTRICTED_TYPE:
- *(struct m_option *)arg = (struct m_option){.type = CONF_TYPE_FLAG};
- return M_PROPERTY_OK;
- case M_PROPERTY_SET:
- set_deinterlacing(mpctx, *(int *)arg);
- return M_PROPERTY_OK;
- }
- return mp_property_generic_option(mpctx, prop, action, arg);
-}
-#endif
-
/// Helper to set vo flags.
/** \ingroup PropertyImplHelper
*/
@@ -4005,9 +3982,6 @@ static const struct m_property mp_properties_base[] = {
// Video
{"fullscreen", mp_property_fullscreen},
-#if HAVE_GPL
- {"deinterlace", mp_property_deinterlace},
-#endif
{"taskbar-progress", mp_property_taskbar_progress},
{"ontop", mp_property_ontop},
{"border", mp_property_border},
@@ -5816,6 +5790,9 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags)
if (flags & UPDATE_TERM)
mp_update_logging(mpctx, false);
+ if (flags & UPDATE_DEINT)
+ recreate_auto_filters(mpctx);
+
if (flags & UPDATE_OSD) {
osd_changed(mpctx->osd);
for (int n = 0; n < NUM_PTRACKS; n++) {