Home | Trees | Indices | Help |
|
---|
|
1 # This file is part of Subtle 2 # 3 # This program is free software: you can redistribute it and/or modify 4 # it under the terms of the GNU General Public License as published by 5 # the Free Software Foundation, either version 3 of the License, or 6 # (at your option) any later version. 7 # 8 # This program is distributed in the hope that it will be useful, 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # GNU General Public License for more details. 12 # 13 # You should have received a copy of the GNU General Public License 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 16 import os 17 import pygtk 18 pygtk.require('2.0') 19 import gobject 20 gobject.threads_init() 21 import pygst 22 pygst.require('0.10') 23 import gst 24 from gst.extend import discoverer 2527 has_audio = None 28 has_video = None 29 framerate = None 30 sourceURI = None 31 MIME = None 32 videoLengthNS = None 33 videoLengthS = None 34 videoCaps = None 35 videoWidth = None 36 videoHeight = None37397441 self.media = Media() 42 self.media.source = file 43 self.media.sourceURI = uri 44 self.discover(file) 45 self.notDone = True46 5153 if ismedia: 54 self.media.MIME = d.mimetype 55 if d.is_video: 56 self.media.has_video = True 57 self.media.framerate = float(d.videorate.num) \ 58 / float(d.videorate.denom) 59 self.media.videoLengthNS = d.videolength 60 self.media.videoLengthS = float(d.videolength) \ 61 / float(gst.MSECOND)/1000.0 62 self.media.videoCaps = d.videocaps 63 self.media.videoHeight = d.videoheight 64 self.media.videoWidth = d.videowidth 65 if d.is_audio: 66 self.media.has_audio = True 67 self.notDone = False68 71
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Aug 7 02:27:51 2008 | http://epydoc.sourceforge.net |