[SCM] gsequencer/master: added important fix to ags_channel.c and removed wish-effectline-c.patch

jkraehemann-guest at users.alioth.debian.org jkraehemann-guest at users.alioth.debian.org
Fri Feb 3 12:57:02 UTC 2017


The following commit has been merged in the master branch:
commit aaab4bf81527d1c25fe11945030ede24177dcd2d
Author: Joël Krähemann <jkraehemann-guest at users.alioth.debian.org>
Date:   Fri Feb 3 13:43:58 2017 +0100

    added important fix to ags_channel.c and removed wish-effectline-c.patch

diff --git a/debian/patches/fix-channel.patch b/debian/patches/fix-channel.patch
new file mode 100644
index 0000000..538178d
--- /dev/null
+++ b/debian/patches/fix-channel.patch
@@ -0,0 +1,32 @@
+Description: This patch fixes missing load of lv2 plugin. The plugins loaded
+ by ags_channel_add_lv2_add_effect() may have not functional recall counterparts
+ without this patch.
+Author: Joël Krähmann <jkraehemann at gmail.com>
+Applied-Upstream: 0.7.122.x, http://git.savannah.gnu.org/cgit/gsequencer.git
+Last-Update: 2017-02-03
+--- a/ags/audio/ags_channel.c
++++ b/ags/audio/ags_channel.c
+@@ -3465,12 +3465,14 @@
+ 	       "soundcard\0", soundcard,
+ 	       "recall-container\0", recall_container,
+ 	       NULL);
++  AGS_RECALL(recall_lv2)->flags |= AGS_RECALL_TEMPLATE;
+   ags_channel_add_recall(channel,
+ 			 (GObject *) recall_lv2,
+ 			 FALSE);
+   
+-  AGS_RECALL(recall_lv2)->flags |= AGS_RECALL_TEMPLATE;
++  /* load */
+   ags_recall_lv2_load(recall_lv2);
++  port = ags_recall_lv2_load_ports(recall_lv2);
+ 
+   if(port != NULL){
+     port = g_list_concat(port,
+@@ -3491,6 +3493,7 @@
+ 			 (GObject *) recall_channel_run_dummy,
+ 			 FALSE);  
+   
++  /* check if connected or running */
+   pthread_mutex_lock(channel_mutex);
+ 
+   if((AGS_CHANNEL_CONNECTED & (channel->flags)) != 0){
diff --git a/debian/patches/series b/debian/patches/series
index 49e1cb5..cc84d14 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+fix-channel.patch
 fix-gsequencer-main.patch
 wish-indicator.patch
 wish-recall-channel.patch
@@ -24,7 +25,6 @@ wish-hindicator.patch
 wish-effect-line-h.patch
 wish-effect-line-callbacks-h.patch
 wish-effect-line-callbacks-c.patch
-wish-effect-line-c.patch
 wish-effect-bulk-h.patch
 wish-effect-bulk-callbacks-h.patch
 wish-effect-bulk-callbacks-c.patch
diff --git a/debian/patches/wish-effect-line-c.patch b/debian/patches/wish-effect-line-c.patch
deleted file mode 100644
index 4048aea..0000000
--- a/debian/patches/wish-effect-line-c.patch
+++ /dev/null
@@ -1,439 +0,0 @@
-Description: This is a wishlist patch. It creates the output widgets available
- in provided by a plugin added by user via machine editor.
- AgsFFPlayer and AgsSynth use this widget to enable the user to assign plugins
- to input lines.
-Author: Joël Krähmann <jkraehemann at gmail.com>
-Applied-Upstream: 0.7.122.x, http://git.savannah.gnu.org/cgit/gsequencer.git
-Last-Update: 2017-02-02
---- a/ags/X/ags_effect_line.c
-+++ b/ags/X/ags_effect_line.c
-@@ -43,9 +43,13 @@
- #include <ags/audio/ags_channel.h>
- #include <ags/audio/ags_output.h>
- #include <ags/audio/ags_input.h>
-+#include <ags/audio/ags_recall_container.h>
- #include <ags/audio/ags_recall_ladspa.h>
- #include <ags/audio/ags_recall_lv2.h>
- 
-+#include <ags/widget/ags_led.h>
-+#include <ags/widget/ags_vindicator.h>
-+#include <ags/widget/ags_hindicator.h>
- #include <ags/widget/ags_dial.h>
- 
- #include <ags/X/ags_window.h>
-@@ -83,6 +87,7 @@
- void ags_effect_line_set_version(AgsPlugin *plugin, gchar *version);
- gchar* ags_effect_line_get_build_id(AgsPlugin *plugin);
- void ags_effect_line_set_build_id(AgsPlugin *plugin, gchar *build_id);
-+void ags_effect_line_finalize(GObject *gobject);
- 
- GList* ags_effect_line_add_ladspa_effect(AgsEffectLine *effect_line,
- 					 GList *control_type_name,
-@@ -129,6 +134,8 @@
- static gpointer ags_effect_line_parent_class = NULL;
- static guint effect_line_signals[LAST_SIGNAL];
- 
-+GHashTable *ags_effect_line_indicator_queue_draw = NULL;
-+
- GType
- ags_effect_line_get_type(void)
- {
-@@ -189,6 +196,8 @@
-   gobject->set_property = ags_effect_line_set_property;
-   gobject->get_property = ags_effect_line_get_property;
- 
-+  gobject->finalize = ags_effect_line_finalize;
-+  
-   /* properties */
-   /**
-    * AgsEffectLine:channel:
-@@ -327,6 +336,12 @@
- void
- ags_effect_line_init(AgsEffectLine *effect_line)
- {
-+  if(ags_effect_line_indicator_queue_draw == NULL){
-+    ags_effect_line_indicator_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal,
-+								 NULL,
-+								 NULL);
-+  }
-+
-   effect_line->flags = 0;
- 
-   effect_line->name = NULL;
-@@ -349,6 +358,8 @@
- 		     GTK_WIDGET(effect_line->table),
- 		     FALSE, FALSE,
- 		     0);
-+
-+  effect_line->queued_drawing = NULL;
- }
- 
- void
-@@ -537,6 +548,25 @@
-   effect_line->build_id = build_id;
- }
- 
-+void
-+ags_effect_line_finalize(GObject *gobject)
-+{
-+  AgsEffectLine *effect_line;
-+  GList *list;
-+
-+  effect_line = AGS_EFFECT_LINE(gobject);
-+  
-+  /* remove of the queued drawing hash */
-+  list = effect_line->queued_drawing;
-+
-+  while(list != NULL){
-+    g_hash_table_remove(ags_effect_line_indicator_queue_draw,
-+			list->data);
-+
-+    list = list->next;
-+  }
-+}
-+
- GList*
- ags_effect_line_add_ladspa_effect(AgsEffectLine *effect_line,
- 				  GList *control_type_name,
-@@ -547,6 +577,8 @@
-   AgsAddLineMember *add_line_member;
-   GtkAdjustment *adjustment;
- 
-+  AgsRecallHandler *recall_handler;
-+
-   AgsLadspaPlugin *ladspa_plugin;
- 
-   AgsMutexManager *mutex_manager;
-@@ -558,11 +590,17 @@
-   
-   gdouble step;
-   guint port_count;
-+  gboolean has_output_port;
-+
-   guint x, y;
-   guint k;
-   
-   pthread_mutex_t *application_mutex;
-   pthread_mutex_t *channel_mutex;
-+
-+  /* get mutex manager and application mutex */
-+  mutex_manager = ags_mutex_manager_get_instance();
-+  application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
-   
-   /* load plugin */
-   ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(),
-@@ -582,10 +620,6 @@
-     list = list->next;
-   }
- 
--  /* get mutex manager and application mutex */
--  mutex_manager = ags_mutex_manager_get_instance();
--  application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
--
-   /* get channel mutex */
-   pthread_mutex_lock(application_mutex);
- 
-@@ -594,13 +628,44 @@
-   
-   pthread_mutex_unlock(application_mutex);
-   
--  /* find ports */
-+  /* play - find ports */
-   pthread_mutex_lock(channel_mutex);
- 
-   recall_start =
-     recall = ags_recall_get_by_effect(effect_line->channel->play,
- 				      filename,
- 				      effect);
-+
-+  if(recall == NULL){
-+    pthread_mutex_unlock(channel_mutex);
-+    
-+    return(NULL);
-+  }
-+
-+  /* check has output port */
-+  if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall->data)->flags)) != 0){
-+    has_output_port = TRUE;
-+  }else{
-+    has_output_port = FALSE;
-+  }
-+
-+  /* recall handler of output port */
-+  if(has_output_port){
-+    AgsRecall *recall_channel_run_dummy;
-+
-+    recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data;
-+    
-+    /* alloc handler */
-+    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
-+
-+    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) effect_line;
-+
-+    ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler);
-+  }
-+  
-+  /* recall - find ports */
-   recall = g_list_last(recall);
-   port = AGS_RECALL(recall->data)->port;
- 
-@@ -617,6 +682,22 @@
- 
-   pthread_mutex_unlock(channel_mutex);
- 
-+  /* recall handler of output port */
-+  if(has_output_port){
-+    AgsRecall *recall_channel_run_dummy;
-+
-+    recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data;
-+    
-+    /* alloc handler */
-+    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
-+
-+    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) effect_line;
-+
-+    ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler);
-+  }
-+
-   /* load ports */
-   port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port;
- 
-@@ -641,9 +722,17 @@
-       }
-       
-       if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
--	widget_type = GTK_TYPE_TOGGLE_BUTTON;
-+	if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
-+	  widget_type = AGS_TYPE_LED;
-+	}else{
-+	  widget_type = GTK_TYPE_TOGGLE_BUTTON;
-+	}
-       }else{
--	widget_type = AGS_TYPE_DIAL;
-+	if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
-+	  widget_type = AGS_TYPE_HINDICATOR;
-+	}else{
-+	  widget_type = AGS_TYPE_DIAL;
-+	}
-       }
- 
-       if(control_type_name != NULL){
-@@ -754,6 +843,13 @@
- 				 upper_bound);
- 	gtk_adjustment_set_value(adjustment,
- 				 g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value));
-+      }else if(AGS_IS_INDICATOR(child_widget) ||
-+	       AGS_IS_LED(child_widget)){
-+	g_hash_table_insert(ags_effect_line_indicator_queue_draw,
-+			    child_widget, ags_effect_line_indicator_queue_draw_timeout);
-+	effect_line->queued_drawing = g_list_prepend(effect_line->queued_drawing,
-+						     child_widget);
-+	g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_line_indicator_queue_draw_timeout, (gpointer) child_widget);
-       }
- 
- #ifdef AGS_DEBUG
-@@ -792,6 +888,8 @@
-   AgsAddLineMember *add_line_member;
-   GtkAdjustment *adjustment;
- 
-+  AgsRecallHandler *recall_handler;
-+
-   AgsLv2Plugin *lv2_plugin;
- 
-   AgsMutexManager *mutex_manager;
-@@ -803,12 +901,18 @@
-   
-   gdouble step;
-   guint port_count;
-+  gboolean has_output_port;
-+
-   guint x, y;
-   guint k;
-   
-   pthread_mutex_t *application_mutex;
-   pthread_mutex_t *channel_mutex;
- 
-+  /* get mutex manager and application mutex */
-+  mutex_manager = ags_mutex_manager_get_instance();
-+  application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
-+
-   /* load plugin */
-   lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(),
- 					       filename, effect);
-@@ -827,10 +931,6 @@
-     list = list->next;
-   }
- 
--  /* get mutex manager and application mutex */
--  mutex_manager = ags_mutex_manager_get_instance();
--  application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
--
-   /* get channel mutex */
-   pthread_mutex_lock(application_mutex);
- 
-@@ -839,18 +939,49 @@
-   
-   pthread_mutex_unlock(application_mutex);
-   
--  /* find ports */
-+  /* play - find ports */
-   pthread_mutex_lock(channel_mutex);
-   
-   recall_start =
-     recall = ags_recall_get_by_effect(effect_line->channel->play,
- 				      filename,
- 				      effect);
-+
-+  if(recall == NULL){
-+    pthread_mutex_unlock(channel_mutex);
-+    
-+    return(NULL);
-+  }
-+
-   recall = g_list_last(recall);
-   port = AGS_RECALL(recall->data)->port;
- 
-   g_list_free(recall_start);
- 
-+  /* check has output port */
-+  if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall->data)->flags)) != 0){
-+    has_output_port = TRUE;
-+  }else{
-+    has_output_port = FALSE;
-+  }
-+
-+  /* recall handler of output port */
-+  if(has_output_port){
-+    AgsRecall *recall_channel_run_dummy;
-+
-+    recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data;
-+    
-+    /* alloc handler */
-+    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
-+
-+    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) effect_line;
-+
-+    ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler);
-+  }
-+
-+  /* recall - find ports */
-   recall_start = 
-     recall = ags_recall_get_by_effect(effect_line->channel->recall,
- 				      filename,
-@@ -861,6 +992,22 @@
-   g_list_free(recall_start);
- 
-   pthread_mutex_unlock(channel_mutex);
-+
-+  /* recall handler of output port */
-+  if(has_output_port){
-+    AgsRecall *recall_channel_run_dummy;
-+
-+    recall_channel_run_dummy = ags_recall_find_template(AGS_RECALL_CONTAINER(AGS_RECALL(recall->data)->container)->recall_channel_run)->data;
-+    
-+    /* alloc handler */
-+    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
-+
-+    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_effect_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) effect_line;
-+
-+    ags_recall_add_handler(AGS_RECALL(recall_channel_run_dummy), recall_handler);
-+  }
-   
-   /* load ports */
-   port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port;
-@@ -887,9 +1034,17 @@
-       }
- 
-       if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
--	widget_type = GTK_TYPE_TOGGLE_BUTTON;
-+	if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
-+	  widget_type = AGS_TYPE_LED;
-+	}else{
-+	  widget_type = GTK_TYPE_TOGGLE_BUTTON;
-+	}
-       }else{
--	widget_type = AGS_TYPE_DIAL;
-+	if((AGS_PORT_DESCRIPTOR_OUTPUT & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
-+	  widget_type = AGS_TYPE_HINDICATOR;
-+	}else{
-+	  widget_type = AGS_TYPE_DIAL;
-+	}
-       }
- 
-       if(control_type_name != NULL){
-@@ -975,6 +1130,13 @@
- 				 upper_bound);
- 	gtk_adjustment_set_value(adjustment,
- 				 g_value_get_float(AGS_PORT_DESCRIPTOR(port_descriptor->data)->default_value));
-+      }else if(AGS_IS_INDICATOR(child_widget) ||
-+	       AGS_IS_LED(child_widget)){
-+	g_hash_table_insert(ags_effect_line_indicator_queue_draw,
-+			    child_widget, ags_effect_line_indicator_queue_draw_timeout);
-+	effect_line->queued_drawing = g_list_prepend(effect_line->queued_drawing,
-+						     child_widget);
-+	g_timeout_add(1000 / 30, (GSourceFunc) ags_effect_line_indicator_queue_draw_timeout, (gpointer) child_widget);
-       }
- 
- #ifdef AGS_DEBUG
-@@ -1163,6 +1325,10 @@
-     while(control != NULL){
-       if(AGS_IS_LINE_MEMBER(control->data) &&
- 	 AGS_LINE_MEMBER(control->data)->port == port->data){
-+	GtkWidget *child_widget;
-+	
-+	child_widget = gtk_bin_get_child(control->data);
-+	
- 	/* collect specifier */
- 	if(remove_specifier == NULL){
- 	  remove_specifier = (gchar **) malloc(2 * sizeof(gchar *));
-@@ -1175,6 +1341,12 @@
- 	i++;
- 
- 	/* remove widget */
-+	if(AGS_IS_LED(child_widget) ||
-+	   AGS_IS_INDICATOR(child_widget)){
-+	  g_hash_table_remove(ags_effect_line_indicator_queue_draw,
-+			      child_widget);
-+	}
-+
- 	gtk_widget_destroy(control->data);
- 	
- 	break;
-@@ -1327,6 +1489,29 @@
- }
- 
- /**
-+ * ags_effect_line_indicator_queue_draw_timeout:
-+ * @widget: the indicator widgt
-+ *
-+ * Queue draw widget
-+ *
-+ * Returns: %TRUE if proceed with redraw, otherwise %FALSE
-+ *
-+ * Since: 0.7.128
-+ */
-+gboolean
-+ags_effect_line_indicator_queue_draw_timeout(GtkWidget *widget)
-+{
-+  if(g_hash_table_lookup(ags_effect_line_indicator_queue_draw,
-+			 widget) != NULL){
-+    gtk_widget_queue_draw(widget);
-+    
-+    return(TRUE);
-+  }else{
-+    return(FALSE);
-+  }
-+}
-+
-+/**
-  * ags_effect_line_new:
-  * @channel: the #AgsChannel to visualize
-  *

-- 
gsequencer packaging



More information about the pkg-multimedia-commits mailing list