[svn r765] * Removed Multicast feature trunk
authormorphbr
Tue Jun 26 14:32:33 2007 +0100 (2007-06-26)
branchtrunk
changeset 7596620b7037407
parent 758 b57cdd5fb898
child 760 36b8564d10e6
[svn r765] * Removed Multicast feature
gmyth-stream/server/0.3/plugins/transcoders/mencoder.py
     1.1 --- a/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py	Fri Jun 22 20:03:35 2007 +0100
     1.2 +++ b/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py	Tue Jun 26 14:32:33 2007 +0100
     1.3 @@ -260,32 +260,13 @@
     1.4          if not self._run_mencoder(output=subprocess.PIPE):
     1.5              return False
     1.6  
     1.7 -        if not self.params_first("multicast", False):
     1.8 -            try:
     1.9 -                while self.proc and self.proc.poll() == None:
    1.10 -                    d = self.proc.stdout.read(1024)
    1.11 -                    outfd.write(d)
    1.12 -            except Exception, e:
    1.13 -                self.log.error(self.tid, "Error: %s" % e)
    1.14 -                return False
    1.15 -        else:
    1.16 -            try:
    1.17 -                outfd.write("OK   ")
    1.18 -                multicast_ip = self.params_first("multicast",
    1.19 -                                                 "225.100.100.100")
    1.20 -                multicast_port = int(self.params_first("multicastport",
    1.21 -                                                       "12345"))
    1.22 -                sock = socket.socket(socket.AF_INET,
    1.23 -                                     socket.SOCK_DGRAM, socket.IPPROTO_UDP)
    1.24 -                sock.setsockopt(socket.IPPROTO_IP,
    1.25 -                                socket.IP_MULTICAST_TTL, 2)
    1.26 -
    1.27 -                while self.proc and self.proc.poll() == None:
    1.28 -                    d = self.proc.stdout.read(1024)
    1.29 -                    sock.sendto(d, (multicast_ip, multicast_port))
    1.30 -            except Exception, e:
    1.31 -                self.log.error(self.tid, "Error: %s" % e)
    1.32 -                return False
    1.33 +        try:
    1.34 +            while self.proc and self.proc.poll() == None:
    1.35 +                d = self.proc.stdout.read(1024)
    1.36 +                outfd.write(d)
    1.37 +        except Exception, e:
    1.38 +            self.log.error(self.tid, "Error: %s" % e)
    1.39 +            return False
    1.40  
    1.41          self.log.info(self.tid, "OK: Done")
    1.42          return True