Browse Source

libobs: Don't track active transitions

This was originally used for calculating audio volume if transitions
were active, but transitions won't work that way so tracking the active
transitions is no longer needed.
jp9000 9 years ago
parent
commit
a702d88c25
3 changed files with 0 additions and 27 deletions
  1. 0 2
      libobs/obs-internal.h
  2. 0 6
      libobs/obs-source.c
  3. 0 19
      libobs/obs-video.c

+ 0 - 2
libobs/obs-internal.h

@@ -283,8 +283,6 @@ struct obs_core_data {
 
 
 	struct obs_view                 main_view;
 	struct obs_view                 main_view;
 
 
-	volatile long                   active_transitions;
-
 	long long                       unnamed_index;
 	long long                       unnamed_index;
 
 
 	volatile bool                   valid;
 	volatile bool                   valid;

+ 0 - 6
libobs/obs-source.c

@@ -297,9 +297,6 @@ obs_source_t *obs_source_create(enum obs_source_type type, const char *id,
 
 
 	source->flags = source->default_flags;
 	source->flags = source->default_flags;
 	source->enabled = true;
 	source->enabled = true;
-
-	if (info && info->type == OBS_SOURCE_TYPE_TRANSITION)
-		os_atomic_inc_long(&obs->data.active_transitions);
 	return source;
 	return source;
 
 
 fail:
 fail:
@@ -343,9 +340,6 @@ void obs_source_destroy(struct obs_source *source)
 	if (!obs_source_valid(source, "obs_source_destroy"))
 	if (!obs_source_valid(source, "obs_source_destroy"))
 		return;
 		return;
 
 
-	if (source->info.type == OBS_SOURCE_TYPE_TRANSITION)
-		os_atomic_dec_long(&obs->data.active_transitions);
-
 	if (source->filter_parent)
 	if (source->filter_parent)
 		obs_source_filter_remove_refless(source->filter_parent, source);
 		obs_source_filter_remove_refless(source->filter_parent, source);
 
 

+ 0 - 19
libobs/obs-video.c

@@ -26,25 +26,6 @@ static inline void calculate_base_volume(struct obs_core_data *data,
 {
 {
 	if (!target->activate_refs) {
 	if (!target->activate_refs) {
 		target->base_volume = 0.0f;
 		target->base_volume = 0.0f;
-
-	/* only walk the tree if there are transitions active */
-	} else if (data->active_transitions) {
-		float best_vol = 0.0f;
-
-		for (size_t i = 0; i < MAX_CHANNELS; i++) {
-			struct obs_source *source = view->channels[i];
-			float vol = 0.0f;
-
-			if (!source)
-				continue;
-
-			vol = obs_source_get_target_volume(source, target);
-			if (best_vol < vol)
-				best_vol = vol;
-		}
-
-		target->base_volume = best_vol;
-
 	} else {
 	} else {
 		target->base_volume = 1.0f;
 		target->base_volume = 1.0f;
 	}
 	}