Package flumotion :: Package worker :: Package checks :: Module encoder
[hide private]

Source Code for Module flumotion.worker.checks.encoder

 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 Fluendo, S.L. (www.fluendo.com). 
 6  # All rights reserved. 
 7   
 8  # This file may be distributed and/or modified under the terms of 
 9  # the GNU General Public License version 2 as published by 
10  # the Free Software Foundation. 
11  # This file is distributed without any warranty; without even the implied 
12  # warranty of merchantability or fitness for a particular purpose. 
13  # See "LICENSE.GPL" in the source distribution for more information. 
14   
15  # Licensees having purchased or holding a valid Flumotion Advanced 
16  # Streaming Server license may use this file in accordance with the 
17  # Flumotion Advanced Streaming Server Commercial License Agreement. 
18  # See "LICENSE.Flumotion" in the source distribution for more information. 
19   
20  # Headers in this file shall remain intact. 
21   
22  import string 
23  from twisted.internet import defer 
24   
25  from flumotion.worker.checks import check 
26  from flumotion.common import gstreamer, messages 
27   
28  from flumotion.common.messages import N_ 
29  T_ = messages.gettexter('flumotion') 
30   
31 -def checkVorbis():
32 """ 33 Check for a recent enough Vorbis encoder. 34 """ 35 result = messages.Result() 36 version = gstreamer.get_plugin_version('vorbis') 37 if version >= (0,10,0,0) and version < (0,10,3,0): 38 m = messages.Warning(T_( 39 N_("Version %s of the '%s' GStreamer plug-in contains a bug.\n"), 40 string.join([str(x) for x in version], '.'), 'vorbis'), 41 id = 'vorbis-check') 42 m.add(T_(N_( 43 "Synchronization between audio and video may not be correct.\n"))) 44 m.add(T_(N_( 45 "Please upgrade '%s' to version %s."), 'gst-plugins-base', 46 '0.10.3')) 47 result.add(m) 48 49 result.succeed(None) 50 return defer.succeed(result)
51
52 -def checkTheora():
53 """ 54 Check for a recent enough Theora encoder. 55 """ 56 result = messages.Result() 57 version = gstreamer.get_plugin_version('theora') 58 if version >= (0,10,0,0) and version < (0,10,3,0): 59 m = messages.Warning(T_( 60 N_("Version %s of the '%s' GStreamer plug-in contains a bug.\n"), 61 string.join([str(x) for x in version], '.'), 'theora'), 62 id = 'theora-check') 63 m.add(T_(N_( 64 "Synchronization between audio and video may not be correct.\n"))) 65 m.add(T_(N_( 66 "Please upgrade '%s' to version %s."), 'gst-plugins-base', 67 '0.10.3')) 68 result.add(m) 69 70 result.succeed(None) 71 return defer.succeed(result)
72