Trees | Indices | Help |
---|
|
1 # -*- Mode: Python -*- 2 # vi:si:et:sw=4:sts=4:ts=4 3 # 4 # flumotion/component/consumers/shout2/shout2.py: stream to icecast2 5 # 6 # Flumotion - a streaming media server 7 # Copyright (C) 2005,2007 Fluendo, S.L. (www.fluendo.com). All rights reserved. 8 9 # This file may be distributed and/or modified under the terms of 10 # the GNU General Public License version 2 as published by 11 # the Free Software Foundation. 12 # This file is distributed without any warranty; without even the implied 13 # warranty of merchantability or fitness for a particular purpose. 14 # See "LICENSE.GPL" in the source distribution for more information. 15 16 # Licensees having purchased or holding a valid Flumotion Advanced 17 # Streaming Server license may use this file in accordance with the 18 # Flumotion Advanced Streaming Server Commercial License Agreement. 19 # See "LICENSE.Flumotion" in the source distribution for more information. 20 21 # Headers in this file shall remain intact. 22 23 24 from flumotion.component import feedcomponent 25 265129 pipestr = 'shout2send name=shout2-streamer sync=1 protocol=3' 30 31 elprops = (('mount-point', 'mount'), 32 ('port', 'port'), 33 ('ip', 'ip'), 34 ('password', 'password'), 35 ('description', 'description'), 36 ('url', 'url'), 37 ('short-name', 'streamname')) 38 for k, v in elprops: 39 if k in properties: 40 pipestr += ' %s=%s' % (v, properties[k]) 41 42 return pipestr4345 def _connection_problem(self, error): 46 # apparently error is an int 47 self.warning('Connection problem: %s', error)48 49 element = pipeline.get_by_name('shout2-streamer') 50 element.connect('connection-problem', _connection_problem)
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Aug 7 15:02:45 2008 | http://epydoc.sourceforge.net |