Package flumotion :: Package component :: Package muxers :: Module checks
[hide private]

Source Code for Module flumotion.component.muxers.checks

 1  # -*- Mode: Python -*- 
 2  # vi:si:et:sw=4:sts=4:ts=4 
 3   
 4  # Flumotion - a streaming media server 
 5  # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. 
 6  # Copyright (C) 2010,2011 Flumotion Services, S.A. 
 7  # All rights reserved. 
 8  # 
 9  # This file may be distributed and/or modified under the terms of 
10  # the GNU Lesser General Public License version 2.1 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.LGPL" in the source distribution for more information. 
15  # 
16  # Headers in this file shall remain intact. 
17   
18  import string 
19   
20  from twisted.internet import defer 
21   
22  from flumotion.common import gstreamer, messages 
23  from flumotion.common.i18n import N_, gettexter 
24   
25  __version__ = "$Rev$" 
26  T_ = gettexter() 
27   
28   
29 -def checkOgg():
30 """ 31 Check for a recent enough Ogg muxer. 32 """ 33 result = messages.Result() 34 version = gstreamer.get_plugin_version('ogg') 35 if version >= (0, 10, 3, 0) and version < (0, 10, 4, 0): 36 m = messages.Warning(T_( 37 N_("Version %s of the '%s' GStreamer plug-in contains a bug.\n"), 38 string.join([str(x) for x in version], '.'), 'ogg'), 39 mid='ogg-check') 40 m.add(T_(N_("The generated Ogg stream will not be fully compliant, " 41 "and might not even play correctly.\n"))) 42 m.add(T_(N_("Please upgrade '%s' to version %s."), 'gst-plugins-base', 43 '0.10.4')) 44 result.add(m) 45 46 result.succeed(None) 47 return defer.succeed(result)
48 49
50 -def checkTicket1344():
51 """ 52 Check if the version of oggmux is the one that can create borked ogg files. 53 54 Note: this also checks for a problem with gdppay reported in #1341. 55 """ 56 result = messages.Result() 57 if gstreamer.get_plugin_version('ogg') == (0, 10, 24, 0): 58 m = messages.Warning(T_( 59 N_("Version %s of the '%s' GStreamer plug-ins set " 60 "contains various bugs.\n"), '0.10.24', 'gst-plugins-base'), 61 mid='oggmux-check') 62 m.add(T_(N_("They are regressions introduced in %s and will be " 63 "fixed in %s.\n"), '0.10.24', '0.10.25')) 64 m.add(T_(N_("The component will probably never go to happy.\n"))) 65 m.add(T_(N_("Please use a different version of %s instead."), 66 'gst-plugins-base')) 67 result.add(m) 68 69 result.succeed(None) 70 return defer.succeed(result)
71