~ubuntu-branches/ubuntu/trusty/pitivi/trusty

« back to all changes in this revision

Viewing changes to pitivi/formatters/format.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-07-07 13:43:47 UTC
  • mto: (6.1.9 sid) (1.2.12)
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20110707134347-cari9kxjiakzej9z
Tags: upstream-0.14.1
ImportĀ upstreamĀ versionĀ 0.14.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#
17
17
# You should have received a copy of the GNU Lesser General Public
18
18
# License along with this program; if not, write to the
19
 
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
# Boston, MA 02111-1307, USA.
 
19
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 
20
# Boston, MA 02110-1301, USA.
21
21
 
22
22
"""
23
23
High-level tools for using Formatters
29
29
 
30
30
_formatters = []
31
31
 
 
32
 
32
33
def can_handle_location(uri):
33
34
    """
34
35
    Detects whether the project at the given location can be loaded.
44
45
        if klass.canHandle(uri):
45
46
            return True
46
47
 
 
48
 
47
49
def list_formats():
48
50
    """
49
51
    Returns a sequence of available project file formats
54
56
    """
55
57
    return _formatters
56
58
 
 
59
 
57
60
def get_formatter_for_uri(uri, avalaible_effects):
58
61
    """
59
62
    Returns an Formatter object that can parse the given project file
66
69
        if klass.canHandle(uri):
67
70
            return klass(avalaible_effects)
68
71
 
 
72
 
69
73
def register_formatter(klass, name, extensions):
70
74
    _formatters.append((klass, name, extensions))
71
75