gmyth-stream/server/0.3/gms.py
author leo_sobral
Fri Aug 17 22:47:49 2007 +0100 (2007-08-17)
branchtrunk
changeset 811 69aba3b6b7b3
parent 723 f5f7abc760aa
child 815 7f290a3a34b1
permissions -rw-r--r--
[svn r817] Fixed volume element bug and added audioconvert to audio pipeline
     1 #!/usr/bin/env python
     2 
     3 __author__ = "Artur Duque de Souza"
     4 __author_email__ = "artur.souza@indt.org.br"
     5 __license__ = "GPL"
     6 __version__ = "0.3"
     7 __thanks__ = "Gustavo Sverzut Barbieri"
     8 
     9 import sys
    10 import os
    11 import mimetypes
    12 import logging as log
    13 from lib.server import serve_forever, load_plugins_transcoders
    14 
    15 mimetypes.init()
    16 log_level = log.INFO
    17 for p in sys.argv[1:]:
    18     if p == "-v" or p == "--verbose":
    19         log_level -= 10
    20 
    21 log.basicConfig(level=log_level,
    22                 format=("### %(asctime)s %(name)-18s \t%(levelname)-8s "
    23                         "\t%(message)s"),
    24                 datefmt="%Y-%m-%d %H:%M:%S")
    25 
    26 if not os.path.exists(".transcoded"):
    27     os.mkdir(".transcoded")
    28 
    29 pd = os.path.join("plugins", "transcoders")
    30 load_plugins_transcoders(pd)
    31 serve_forever()