Trees | Indices | Help |
---|
|
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 Fluendo, S.L. (www.fluendo.com). All rights reserved. 6 7 # This file may be distributed and/or modified under the terms of 8 # the GNU General Public License version 2 as published by 9 # the Free Software Foundation. 10 # This file is distributed without any warranty; without even the implied 11 # warranty of merchantability or fitness for a particular purpose. 12 # See "LICENSE.GPL" in the source distribution for more information. 13 14 # Licensees having purchased or holding a valid Flumotion Advanced 15 # Streaming Server license may use this file in accordance with the 16 # Flumotion Advanced Streaming Server Commercial License Agreement. 17 # See "LICENSE.Flumotion" in the source distribution for more information. 18 19 # Headers in this file shall remain intact. 20 21 from flumotion.component import feedcomponent 22 23 __version__ = "$Rev: 7162 $" 24 25274729 device = properties.get('device', '/dev/video0') 30 deinterlacer = properties.get('deinterlacer', '') 31 32 # by default, we let GStreamer decide width and height 33 width = properties.get('width', 0) 34 height = properties.get('height', 0) 35 if width > 0 and height > 0: 36 scaling_template = (" videoscale method=1 ! " 37 "video/x-raw-yuv,width=%d,height=%d " % (width, height)) 38 else: 39 scaling_template = "" 40 41 return ("filesrc name=src location=%s ! decodebin name=d ! queue ! " 42 " %s ! %s ! ffmpegcolorspace ! video/x-raw-yuv " 43 " ! @feeder:video@ d. ! queue ! audioconvert " 44 " ! audio/x-raw-int " 45 " ! @feeder:audio@" 46 % (device, deinterlacer, scaling_template))
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Nov 15 09:17:44 2009 | http://epydoc.sourceforge.net |