[SCM] gsequencer/master: added missing AgsAudio::done() and AgsChannel::done()
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Sat Mar 18 13:11:09 UTC 2017
The following commit has been merged in the master branch:
commit 3366c95cd292296c70f63eae5480a8223bd27dab
Author: Joël Krähemann <jkraehemann-guest at users.alioth.debian.org>
Date: Sat Mar 18 14:04:33 2017 +0100
added missing AgsAudio::done() and AgsChannel::done()
diff --git a/debian/patches/fix-missing-dispose.diff b/debian/patches/fix-missing-dispose.diff
index d39d598..312ab91 100644
--- a/debian/patches/fix-missing-dispose.diff
+++ b/debian/patches/fix-missing-dispose.diff
@@ -9608,7 +9608,25 @@
void
--- a/ags/audio/ags_audio.c
+++ b/ags/audio/ags_audio.c
-@@ -958,59 +958,11 @@
+@@ -98,6 +98,8 @@
+ void ags_audio_real_set_pads(AgsAudio *audio,
+ GType type,
+ guint channels, guint channels_old);
++void ags_audio_real_done(AgsAudio *audio,
++ AgsRecallID *recall_id);
+
+ enum{
+ CHECK_CONNECTION,
+@@ -683,7 +685,7 @@
+
+ audio->init_run = NULL;
+ audio->tact = NULL;
+- audio->done = NULL;
++ audio->done = ags_audio_real_done;
+
+ /* signals */
+ /**
+@@ -958,59 +960,11 @@
/* playback domain */
audio->playback_domain = (GObject *) ags_playback_domain_new();
@@ -9672,7 +9690,7 @@
/* notation and automation */
audio->notation = NULL;
audio->automation = NULL;
-@@ -2206,6 +2158,7 @@
+@@ -2206,6 +2160,7 @@
"samplerate\0", audio->samplerate,
"buffer-size\0", audio->buffer_size,
NULL);
@@ -9680,7 +9698,7 @@
if(start == NULL){
start = channel;
-@@ -2405,6 +2358,7 @@
+@@ -2405,6 +2360,7 @@
for(; j < audio->audio_channels; j++){
channel1 = channel0->next;
@@ -9688,7 +9706,7 @@
g_object_unref((GObject *) channel0);
channel0 = channel1;
-@@ -2717,6 +2671,8 @@
+@@ -2717,6 +2673,8 @@
"samplerate\0", audio->samplerate,
"buffer-size\0", audio->buffer_size,
NULL);
@@ -9697,7 +9715,7 @@
if(start == NULL){
/* set first channel in AgsAudio */
if(type == AGS_TYPE_OUTPUT){
-@@ -2840,6 +2796,7 @@
+@@ -2840,6 +2798,7 @@
while(channel != NULL){
channel_next = channel->next;
@@ -9705,9 +9723,124 @@
g_object_unref((GObject *) channel);
channel = channel_next;
+@@ -4535,6 +4494,76 @@
+ pthread_mutex_unlock(mutex);
+ }
+
++void
++ags_audio_real_done(AgsAudio *audio,
++ AgsRecallID *recall_id)
++{
++ AgsRecall *recall;
++
++ AgsMutexManager *mutex_manager;
++
++ GList *list, *list_next;
++
++ gboolean is_toplevel;
++
++ pthread_mutex_t *application_mutex;
++ pthread_mutex_t *mutex;
++
++ /* lookup mutex */
++ mutex_manager = ags_mutex_manager_get_instance();
++ application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
++
++ pthread_mutex_lock(application_mutex);
++
++ mutex = ags_mutex_manager_lookup(mutex_manager,
++ (GObject *) audio);
++
++ pthread_mutex_unlock(application_mutex);
++
++ /* get context */
++ pthread_mutex_lock(mutex);
++
++ if(recall_id->recycling_context->parent == NULL){
++ list = audio->play;
++
++ is_toplevel = TRUE;
++ }else{
++ list = audio->recall;
++
++ is_toplevel = FALSE;
++ }
++
++ /* remove recall, run dispose and unref */
++ ags_audio_real_done_RECALL0:
++
++ while(list != NULL){
++ list_next = list->next;
++
++ recall = AGS_RECALL(list->data);
++
++ if(recall->recall_id != NULL &&
++ recall->recall_id->recycling_context == recall_id->recycling_context){
++ g_object_run_dispose(recall);
++ ags_audio_remove_recall(audio,
++ recall,
++ is_toplevel);
++ g_object_unref(recall);
++ }
++
++ list = list_next;
++ }
++
++ if(is_toplevel &&
++ (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
++ list = audio->recall;
++ is_toplevel = FALSE;
++
++ goto ags_audio_real_done_RECALL0;
++ }
++
++ pthread_mutex_unlock(mutex);
++}
++
+ /**
+ * ags_audio_done:
+ * @audio: the #AgsAudio
+@@ -4631,7 +4660,9 @@
+
+ recall = AGS_RECALL(list->data);
+
+- if((AGS_RECALL_TEMPLATE & (recall->flags)) ||
++ if(recall == NULL ||
++ !AGS_IS_RECALL(recall) ||
++ (AGS_RECALL_TEMPLATE & (recall->flags)) ||
+ recall->recall_id == NULL ||
+ recall->recall_id->recycling_context != recall_id->recycling_context){
+ list = list_next;
+@@ -4639,8 +4670,6 @@
+ continue;
+ }
+
+- g_object_ref(recall_id);
+- g_object_ref(recall);
+ ags_recall_cancel(recall);
+
+ list = list_next;
--- a/ags/audio/ags_channel.c
+++ b/ags/audio/ags_channel.c
-@@ -753,66 +753,10 @@
+@@ -127,6 +127,8 @@
+ gchar *effect);
+ void ags_channel_real_remove_effect(AgsChannel *channel,
+ guint nth);
++void ags_channel_real_done(AgsChannel *channel,
++ AgsRecallID *recall_id);
+
+ enum{
+ ADD_EFFECT,
+@@ -521,7 +523,7 @@
+
+ channel->recycling_changed = NULL;
+
+- channel->done = NULL;
++ channel->done = ags_channel_real_done;
+
+ /* signals */
+ /**
+@@ -753,66 +755,10 @@
/* playback */
channel->playback = (GObject *) ags_playback_new();
@@ -9778,7 +9911,73 @@
channel->recall_id = NULL;
channel->container = NULL;
-@@ -4517,6 +4461,7 @@
+@@ -4410,6 +4356,65 @@
+ pthread_mutex_unlock(mutex);
+ }
+
++void
++ags_channel_real_done(AgsChannel *channel,
++ AgsRecallID *recall_id)
++{
++ AgsRecall *recall;
++
++ AgsMutexManager *mutex_manager;
++
++ GList *list, *list_next;
++
++ gboolean is_toplevel;
++
++ pthread_mutex_t *application_mutex;
++ pthread_mutex_t *mutex;
++
++ /* lookup mutex */
++ mutex_manager = ags_mutex_manager_get_instance();
++ application_mutex = ags_mutex_manager_get_application_mutex(mutex_manager);
++
++ pthread_mutex_lock(application_mutex);
++
++ mutex = ags_mutex_manager_lookup(mutex_manager,
++ (GObject *) channel);
++
++ pthread_mutex_unlock(application_mutex);
++
++ /* get context */
++ pthread_mutex_lock(mutex);
++
++ if(recall_id->recycling_context->parent == NULL){
++ list = channel->play;
++
++ is_toplevel = TRUE;
++ }else{
++ list = channel->recall;
++
++ is_toplevel = FALSE;
++ }
++
++ /* remove recall, run dispose and unref */
++ while(list != NULL){
++ list_next = list->next;
++
++ recall = AGS_RECALL(list->data);
++ if(recall->recall_id != NULL &&
++ recall->recall_id->recycling_context == recall_id->recycling_context){
++ g_object_run_dispose(recall);
++ ags_channel_remove_recall(channel,
++ recall,
++ is_toplevel);
++ g_object_unref(recall);
++ }
++
++ list = list_next;
++ }
++
++ pthread_mutex_unlock(mutex);
++}
++
+ /**
+ * ags_channel_done:
+ * @channel: an #AgsChannel
+@@ -4517,6 +4522,7 @@
recall = AGS_RECALL(list->data);
if((AGS_RECALL_TEMPLATE & (recall->flags)) != 0 ||
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list