# -*- coding: iso8859-1 -*- # # Copyright (C) 2006 CSIRO Australia # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of voluntary contributions made by many # individuals. For exact contribution history, see the revision # history and logs. # # Author: Conrad Parker from anxvalidator.pipeoutput import PipeOutput ogg_types = ['application/ogg', 'audio/ogg', 'video/ogg', 'audio/vorbis', 'audio/speex', 'video/theora', 'application/annodex', 'video/annodex', 'audio/annodex' ] class OggzValidate (object): def __init__(self, f): self.o = PipeOutput ('oggz-validate --prefix -', f) def __str__(self): s = '

Ogg media validation:

' s += '
' + self.o.__str__() + '
' if (self.o.status == 0): s += '

This resource is valid Ogg

' else: s += '

This resource is NOT valid Ogg

' return s