[SCM] gsequencer/master: added wish-effectline-c.patch again with some fixes

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


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

    added wish-effectline-c.patch again with some fixes

diff --git a/debian/patches/series b/debian/patches/series
index cc84d14..42da52a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+wish-effect-line-c.patch
 fix-channel.patch
 fix-gsequencer-main.patch
 wish-indicator.patch
diff --git a/debian/patches/wish-line-c.patch b/debian/patches/wish-effect-line-c.patch
similarity index 60%
copy from debian/patches/wish-line-c.patch
copy to debian/patches/wish-effect-line-c.patch
index c197867..566a83a 100644
--- a/debian/patches/wish-line-c.patch
+++ b/debian/patches/wish-effect-line-c.patch
@@ -1,12 +1,13 @@
-Description: This is a wishlist patch. It modifies the recall callback handler
- to use the generic callback ags_line_output_port_run_post_callback().
- This is used by AgsSynthInputLine, AgsDrumInputLine and AgsMixerInputLine.
+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_line.c
-+++ b/ags/X/ags_line.c
-@@ -43,11 +43,15 @@
+--- 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>
@@ -14,68 +15,88 @@ Last-Update: 2017-02-02
  #include <ags/audio/ags_recall_ladspa.h>
  #include <ags/audio/ags_recall_lv2.h>
  
- #include <ags/audio/recall/ags_peak_channel_run.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>
-@@ -128,7 +132,7 @@
- static gpointer ags_line_parent_class = NULL;
- static guint line_signals[LAST_SIGNAL];
+@@ -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);
  
--GHashTable *ags_indicator_queue_draw = NULL;
-+GHashTable *ags_line_indicator_queue_draw = NULL;
+ 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_line_get_type(void)
-@@ -385,8 +389,8 @@
- void
- ags_line_init(AgsLine *line)
+ ags_effect_line_get_type(void)
  {
--  if(ags_indicator_queue_draw == NULL){
--    ags_indicator_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal,
-+  if(ags_line_indicator_queue_draw == NULL){
-+    ags_line_indicator_queue_draw = g_hash_table_new_full(g_direct_hash, g_direct_equal,
- 						     NULL,
- 						     NULL);
-   }
-@@ -436,14 +440,27 @@
- ags_line_finalize(GObject *gobject)
+@@ -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)
  {
-   AgsLine *line;
--
--  line = AGS_LINE(gobject);
-+  GList *list;
-   
-+  line = AGS_LINE(gobject);
++  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);
++  }
 +
-+  /* remove indicator widget */
-   if(line->indicator != NULL){
--    g_hash_table_remove(ags_indicator_queue_draw,
-+    g_hash_table_remove(ags_line_indicator_queue_draw,
- 			line->indicator);
-   }
--  
+   effect_line->flags = 0;
+ 
+   effect_line->name = NULL;
+@@ -349,6 +364,8 @@
+ 		     GTK_WIDGET(effect_line->table),
+ 		     FALSE, FALSE,
+ 		     0);
 +
++  effect_line->queued_drawing = NULL;
+ }
+ 
+ void
+@@ -537,6 +554,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 = line->queued_drawing;
++  list = effect_line->queued_drawing;
 +
 +  while(list != NULL){
-+    g_hash_table_remove(ags_line_indicator_queue_draw,
++    g_hash_table_remove(ags_effect_line_indicator_queue_draw,
 +			list->data);
 +
 +    list = list->next;
 +  }
++}
 +
-+  /* call parent */
-   G_OBJECT_CLASS(ags_line_parent_class)->finalize(gobject);
- }
- 
-@@ -743,6 +760,8 @@
-   AgsLineMember *line_member;
+ GList*
+ ags_effect_line_add_ladspa_effect(AgsEffectLine *effect_line,
+ 				  GList *control_type_name,
+@@ -547,6 +583,8 @@
+   AgsAddLineMember *add_line_member;
    GtkAdjustment *adjustment;
  
 +  AgsRecallHandler *recall_handler;
@@ -83,15 +104,15 @@ Last-Update: 2017-02-02
    AgsLadspaPlugin *ladspa_plugin;
  
    AgsMutexManager *mutex_manager;
-@@ -754,11 +773,17 @@
- 
+@@ -558,11 +596,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;
 +
@@ -101,7 +122,7 @@ Last-Update: 2017-02-02
    
    /* load plugin */
    ladspa_plugin = ags_ladspa_manager_find_ladspa_plugin(ags_ladspa_manager_get_instance(),
-@@ -778,10 +803,6 @@
+@@ -582,10 +626,6 @@
      list = list->next;
    }
  
@@ -112,30 +133,25 @@ Last-Update: 2017-02-02
    /* get channel mutex */
    pthread_mutex_lock(application_mutex);
  
-@@ -790,18 +811,49 @@
+@@ -594,13 +634,44 @@
    
    pthread_mutex_unlock(application_mutex);
    
 -  /* find ports */
 +  /* play - find ports */
    pthread_mutex_lock(channel_mutex);
-   
+ 
    recall_start =
-     recall = ags_recall_get_by_effect(line->channel->play,
+     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;
@@ -153,21 +169,24 @@ Last-Update: 2017-02-02
 +    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
 +
 +    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) line;
++    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(line->channel->recall,
- 				      filename,
-@@ -812,13 +864,29 @@
-   g_list_free(recall_start);
+   recall = g_list_last(recall);
+   port = AGS_RECALL(recall->data)->port;
+ 
+@@ -613,10 +684,27 @@
+   recall = g_list_last(recall);
+ 
+   recall_port = AGS_RECALL(recall->data)->port;
+-  g_list_free(recall_start);
  
    pthread_mutex_unlock(channel_mutex);
-+
+ 
 +  /* recall handler of output port */
 +  if(has_output_port){
 +    AgsRecall *recall_channel_run_dummy;
@@ -178,24 +197,19 @@ Last-Update: 2017-02-02
 +    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
 +
 +    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) line;
++    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);
 +  }
-   
++
++  g_list_free(recall_start);
++
    /* load ports */
    port_descriptor = AGS_BASE_PLUGIN(ladspa_plugin)->port;
  
-   port_count = g_list_length(port_descriptor);
-   k = 0;
--
-+  
-   while(port_descriptor != NULL){
-     if((AGS_PORT_DESCRIPTOR_CONTROL & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
-       GtkWidget *child_widget;
-@@ -830,9 +898,17 @@
-       guint step_count;
+@@ -641,9 +729,17 @@
+       }
        
        if((AGS_PORT_DESCRIPTOR_TOGGLED & (AGS_PORT_DESCRIPTOR(port_descriptor->data)->flags)) != 0){
 -	widget_type = GTK_TYPE_TOGGLE_BUTTON;
@@ -214,25 +228,22 @@ Last-Update: 2017-02-02
        }
  
        if(control_type_name != NULL){
-@@ -943,8 +1019,15 @@
+@@ -754,6 +850,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_line_indicator_queue_draw,
-+			    child_widget, ags_line_indicator_queue_draw_timeout);
-+	line->queued_drawing = g_list_prepend(line->queued_drawing,
-+					      child_widget);
-+	g_timeout_add(1000 / 30, (GSourceFunc) ags_line_indicator_queue_draw_timeout, (gpointer) 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
-       g_message("ladspa bounds: %f %f\0", lower_bound, upper_bound);
- #endif
-@@ -977,6 +1060,8 @@
-   AgsLineMember *line_member;
+@@ -792,6 +895,8 @@
+   AgsAddLineMember *add_line_member;
    GtkAdjustment *adjustment;
  
 +  AgsRecallHandler *recall_handler;
@@ -240,8 +251,8 @@ Last-Update: 2017-02-02
    AgsLv2Plugin *lv2_plugin;
  
    AgsMutexManager *mutex_manager;
-@@ -991,12 +1076,18 @@
- 
+@@ -803,12 +908,18 @@
+   
    gdouble step;
    guint port_count;
 +  gboolean has_output_port;
@@ -259,7 +270,7 @@ Last-Update: 2017-02-02
    /* load plugin */
    lv2_plugin = ags_lv2_manager_find_lv2_plugin(ags_lv2_manager_get_instance(),
  					       filename, effect);
-@@ -1015,10 +1106,6 @@
+@@ -827,10 +938,6 @@
      list = list->next;
    }
  
@@ -270,7 +281,7 @@ Last-Update: 2017-02-02
    /* get channel mutex */
    pthread_mutex_lock(application_mutex);
  
-@@ -1027,7 +1114,7 @@
+@@ -839,18 +946,49 @@
    
    pthread_mutex_unlock(application_mutex);
    
@@ -279,9 +290,18 @@ Last-Update: 2017-02-02
    pthread_mutex_lock(channel_mutex);
    
    recall_start =
-@@ -1046,6 +1133,30 @@
- 
-   g_list_free(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;
  
 +  /* check has output port */
 +  if((AGS_RECALL_HAS_OUTPUT_PORT & (AGS_RECALL(recall->data)->flags)) != 0){
@@ -300,23 +320,25 @@ Last-Update: 2017-02-02
 +    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
 +
 +    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) line;
++    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);
 +  }
 +
+   g_list_free(recall_start);
+ 
 +  /* recall - find ports */
    recall_start = 
-     recall = ags_recall_get_by_effect(line->channel->recall,
+     recall = ags_recall_get_by_effect(effect_line->channel->recall,
  				      filename,
-@@ -1055,8 +1166,24 @@
+@@ -858,10 +996,27 @@
+   recall = g_list_last(recall);
+ 
    recall_port = AGS_RECALL(recall->data)->port;
-   g_list_free(recall_start);
+-  g_list_free(recall_start);
  
--  pthread_mutex_unlock(channel_mutex);
--  
-+  pthread_mutex_unlock(channel_mutex);  
+   pthread_mutex_unlock(channel_mutex);
 +
 +  /* recall handler of output port */
 +  if(has_output_port){
@@ -328,18 +350,20 @@ Last-Update: 2017-02-02
 +    recall_handler = (AgsRecallHandler *) malloc(sizeof(AgsRecallHandler));
 +
 +    recall_handler->signal_name = "run-post\0";
-+    recall_handler->callback = G_CALLBACK(ags_line_output_port_run_post_callback);
-+    recall_handler->data = (gpointer) line;
++    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);
 +  }
+   
++  g_list_free(recall_start);
 +
    /* load ports */
    port_descriptor = AGS_BASE_PLUGIN(lv2_plugin)->port;
  
-@@ -1075,9 +1202,17 @@
-       guint step_count;
-       
+@@ -887,9 +1042,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){
@@ -357,49 +381,71 @@ Last-Update: 2017-02-02
        }
  
        if(control_type_name != NULL){
-@@ -1163,6 +1298,12 @@
+@@ -975,6 +1138,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)){
-+	g_hash_table_insert(ags_line_indicator_queue_draw,
-+			    child_widget, ags_line_indicator_queue_draw_timeout);
-+	line->queued_drawing = g_list_prepend(line->queued_drawing,
-+					      child_widget);
-+	g_timeout_add(1000 / 30, (GSourceFunc) ags_line_indicator_queue_draw_timeout, (gpointer) child_widget);
++      }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
-@@ -1348,6 +1489,10 @@
+@@ -1163,6 +1333,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 *));
-@@ -1360,6 +1505,12 @@
+@@ -1175,6 +1349,12 @@
  	i++;
  
  	/* remove widget */
 +	if(AGS_IS_LED(child_widget) ||
 +	   AGS_IS_INDICATOR(child_widget)){
-+	  g_hash_table_remove(ags_line_indicator_queue_draw,
++	  g_hash_table_remove(ags_effect_line_indicator_queue_draw,
 +			      child_widget);
 +	}
-+	
- 	ags_expander_remove(line->expander,
- 			    control->data);
++
+ 	gtk_widget_destroy(control->data);
+ 	
+ 	break;
+@@ -1327,6 +1507,29 @@
+ }
  
-@@ -1544,7 +1685,7 @@
- gboolean
- ags_line_indicator_queue_draw_timeout(GtkWidget *widget)
- {
--  if(g_hash_table_lookup(ags_indicator_queue_draw,
-+  if(g_hash_table_lookup(ags_line_indicator_queue_draw,
- 			 widget) != NULL){
-     gtk_widget_queue_draw(widget);
-     
+ /**
++ * 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