[svn r771] * Mencoder doesnt work well with "Transfer-Encoding: chunked".
* Put this method just for gmencoder
3 __author__ = "Gustavo Sverzut Barbieri / Artur Duque de Souza"
4 __author_email__ = "barbieri@gmail.com / artur.souza@indt.org.br"
8 __all__ = ("Transcoder")
10 class Transcoder(object):
11 """Transcoder's Class: parent class to implement
12 a plugin for transcoding data."""
13 priority = 0 # negative values have higher priorities
14 name = None # to be used in requests
19 def __init__(self, params):
24 def params_first(self, key, default=None):
26 return self.params[key][0]
29 return self.params[key][0]
35 def get_mimetype(self):
36 mux = self.params_first("mux", "mpg")
41 return "video/x-msvideo"
43 return "application/octet-stream"
46 def start(self, outfile):
56 return '%s: %s( params=%s ) - Status: %s%%' % \
57 (self.__class__.__name__, self.tid,
58 self.params, self.status)