~ubuntu-branches/ubuntu/vivid/oggconvert/vivid

« back to all changes in this revision

Viewing changes to OggConvert/ocv_init.py

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-01-19 17:52:14 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080119175214-w91ytv04bs0w9cuu
Tags: 0.3.1-1ubuntu1
* Merge from debian unstable. Fix LP: #175770
  Remaining changes:
  - Suggest gstreamer multiverse plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: UTF-8 -*-
 
2
#
 
3
# OggConvert -- Converts media files to Free formats
 
4
# (c) 2007 Tristan Brindle <tcbrindle at gmail dot com>
 
5
#
 
6
# This program is free software; you can redistribute it and/or
 
7
# modify it under the terms of the GNU Lesser General Public
 
8
# License as published by the Free Software Foundation; either
 
9
# version 2.1 of the License, or (at your option) any later version.
 
10
 
11
# This program is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
# Lesser General Public License for more details.
 
15
 
16
# You should have received a copy of the GNU Lesser General Public
 
17
# License along with this program; if not, write to the Free Software
 
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
#
 
20
 
 
21
import pygst
 
22
pygst.require("0.10")
 
23
import gst
 
24
import ocv_constants
 
25
 
 
26
gstver = gst.version()
 
27
 
 
28
if ocv_constants.USE_AUDIORATE is None:
 
29
    if gstver[2] > 10:
 
30
        ocv_constants.USE_AUDIORATE = True
 
31
    else:
 
32
        ocv_constants.USE_AUDIORATE = False
 
33
 
 
34
 
 
35
if ocv_constants.HAVE_SCHRO is None:
 
36
    ocv_constants.HAVE_SCHRO = False
 
37
    if gstver[2] > 10:
 
38
        if gst.element_factory_find("schroenc") is not None:
 
39
            print "Schrödinger encoder found, using"
 
40
            ocv_constants.HAVE_SCHRO = True
 
41
            
 
42
if ocv_constants.HAVE_MATROSKA is None:
 
43
    if gst.element_factory_find("matroskamux") is None:
 
44
        ocv_constants.HAVE_MATROSKA = False
 
45
    else:
 
46
        ocv_constants.HAVE_MATROSKA = True