Beispiel #1
0
 def make_instance(self):
     cur = self.get_instance_count()
     if (self.max_instances>0 and cur>=self.max_instances) or cur>=codec_spec.WARN_LIMIT:
         log.warn("Warning: already %s active instances of %s: %s", cur, self.codec_class, list(self.instances.keys()))
         from xpra.util import dump_references
         dump_references(log, self.instances.keys())
     else:
         log("make_instance() %s - instance count=%s", self.codec_type, cur)
     v = self.codec_class()
     self.instances[v] = True
     return v
Beispiel #2
0
 def make_instance(self):
     cur = self.get_instance_count()
     if (self.max_instances>0 and cur>=self.max_instances) or cur>=codec_spec.WARN_LIMIT:
         log.warn("Warning: already %s active instances of %s: %s", cur, self.codec_class, list(self.instances.keys()))
         from xpra.util import dump_references
         dump_references(log, self.instances.keys())
     else:
         log("make_instance() %s - instance count=%s", self.codec_type, cur)
     v = self.codec_class()
     self.instances[v] = True
     return v
Beispiel #3
0
 def make_instance(self):
     from xpra.log import Logger
     log = Logger("encoding")
     cur = self.get_instance_count()
     if (self.max_instances>0 and cur>=self.max_instances) or cur>=_codec_spec.WARN_LIMIT:
         instances = tuple(self.instances.keys())
         log.warn("Warning: already %s active instances of %s: %s",
                  cur, self.codec_class, instances)
         from xpra.util import dump_references
         dump_references(log, instances)
     else:
         log("make_instance() %s - instance count=%s", self.codec_type, cur)
     v = self.codec_class()
     self.instances[v] = True
     return v