changeset 37080:0b0528ba3344

Add remove_vf(). (Currently unused, but we will need it soon.)
author ib
date Thu, 24 Apr 2014 13:51:20 +0000
parents 83aa0570d6be
children e8559b9913ff
files gui/interface.c help/help_mp-de.h help/help_mp-en.h
diffstat 3 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Thu Apr 24 13:36:22 2014 +0000
+++ b/gui/interface.c	Thu Apr 24 13:51:20 2014 +0000
@@ -158,6 +158,35 @@
     return attribs;
 }
 
+/**
+ * @brief Remove a video filter.
+ *
+ * @param vf video filter to be removed
+ */
+static void remove_vf(char *vf)
+{
+    if (vf_settings) {
+        int i = 0;
+
+        while (vf_settings[i].name) {
+            if (strcmp(vf_settings[i].name, vf) == 0) {
+                mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_RemovingVideoFilter, vf);
+
+                free(vf_settings[i].name);
+                listFree(&vf_settings[i].attribs);
+
+                do
+                    memcpy(&vf_settings[i], &vf_settings[i + 1], sizeof(m_obj_settings_t));
+                while (vf_settings[++i].name);
+
+                break;
+            }
+
+            i++;
+        }
+    }
+}
+
 /* MPlayer -> GUI */
 
 /**
--- a/help/help_mp-de.h	Thu Apr 24 13:36:22 2014 +0000
+++ b/help/help_mp-de.h	Thu Apr 24 13:51:20 2014 +0000
@@ -912,6 +912,7 @@
 #define MSGTR_GUI_MSG_PlaybackNeedsRestart "Manche Optionen werden erst nach einem Neustart der Wiedergabe wirksam."
 #define MSGTR_GUI_MSG_RemoteDisplay "Fernes Display, X Shared Memory wird deaktiviert.\n"
 #define MSGTR_GUI_MSG_RemovingSubtitle "Untertitel werden entfernt.\n"
+#define MSGTR_GUI_MSG_RemovingVideoFilter "Videofilter '%s' wird entfernt.\n"
 #define MSGTR_GUI_MSG_SkinBitmapConversionError "24-bpp-zu-32-bpp-Konvertierungsfehler in %s\n"
 #define MSGTR_GUI_MSG_SkinBitmapNotFound "Bitmap %s nicht gefunden.\n"
 #define MSGTR_GUI_MSG_SkinBitmapPngReadError "PNG-Lesefehler in %s\n"
--- a/help/help_mp-en.h	Thu Apr 24 13:36:22 2014 +0000
+++ b/help/help_mp-en.h	Thu Apr 24 13:51:20 2014 +0000
@@ -703,6 +703,7 @@
 #define MSGTR_GUI_MSG_PlaybackNeedsRestart "You need to restart playback for some options to take effect."
 #define MSGTR_GUI_MSG_RemoteDisplay "Remote display, disabling X shared memory.\n"
 #define MSGTR_GUI_MSG_RemovingSubtitle "Removing subtitle.\n"
+#define MSGTR_GUI_MSG_RemovingVideoFilter "Removing video filter '%s'.\n"
 #define MSGTR_GUI_MSG_SkinBitmapConversionError "24 bit to 32 bit conversion error in %s\n"
 #define MSGTR_GUI_MSG_SkinBitmapNotFound "Bitmap %s not found.\n"
 #define MSGTR_GUI_MSG_SkinBitmapPngReadError "PNG read error in %s\n"