changeset 37075:3021ac203d3c

Rewrite add_vf(). Add a parameter in order to pass options to a video filter to be added.
author ib
date Thu, 24 Apr 2014 13:17:00 +0000
parents 1bcac20d3393
children 60835d705f76
files gui/interface.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Thu Apr 24 13:08:38 2014 +0000
+++ b/gui/interface.c	Thu Apr 24 13:17:00 2014 +0000
@@ -275,7 +275,7 @@
     mp_msg(MSGT_GPLAYER, MSGL_V, "GUI done.\n");
 }
 
-static void add_vf(const char *vf)
+static void add_vf(const char *vf, const char *const *argvf)
 {
     if (vf_settings) {
         int i = 0;
@@ -295,7 +295,7 @@
 
             vf_settings = settings;
             vf_settings[i].name     = strdup(vf);
-            vf_settings[i].attribs  = NULL;
+            vf_settings[i].attribs  = listDup(argvf);
             memset(&vf_settings[i + 1], 0, sizeof(m_obj_settings_t));
         }
     } else {
@@ -305,7 +305,7 @@
             return;
 
         vf_settings[0].name    = strdup(vf);
-        vf_settings[0].attribs = NULL;
+        vf_settings[0].attribs = listDup(argvf);
     }
 
     mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_AddingVideoFilter, vf);
@@ -505,10 +505,10 @@
         if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3"))
             if (guiInfo.StreamType != STREAMTYPE_DVD && guiInfo.StreamType != STREAMTYPE_VCD)
                 if (gtkVfLAVC)
-                    add_vf("lavc");
+                    add_vf("lavc", NULL);
 
         if (gtkVfPP)
-            add_vf("pp");
+            add_vf("pp", NULL);
 
         /* audio opts */