# Path: skema/utils.py
# def log_line(line="", tabs=0):
#     if (line == ""):
#         lansi = "[skema] "
#         l = ""
#     else:
#         l = ('\t' * tabs) + "[" + line + "]"
#         lansi = "[skema] " + bcolors.WARNING + l + bcolors.ENDC
#     logging.info(l)
#     printit (lansi)
# 
# Path: skema/utils.py
# def log_api(line):
#     log_line ()
#     logging.info("")
#     log_line ()
#     logging.info("")
#     l = "[" + line  +"]"
#     logging.info(l)
#     lansi = "[skema] " + bcolors.BOLD + l + bcolors.ENDC
#     printit (lansi)
# 
# Path: skema/utils.py
# def log_result(tag, err):
#     log_line ()
#     if (err == "OMX_ErrorNone"):
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.OKGREEN + l + bcolors.ENDC
#         logging.info(l)
#     else:
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.FAIL + l + bcolors.ENDC
#         logging.error(l)
# 
#     printit (lansi)
# 
# Path: skema/config.py
# def get_config():
#     global _config
#     if _config is not None:
#         return _config
#     _config = SkemaConfig()
#     return _config


import os
import sys
import threading
import signal
from ctypes import *
from omxil12 import *
from skema.utils import log_line
from skema.utils import log_api
from skema.utils import log_result
from skema.config import get_config
        log_line ()
        log_api("EventHandler '%s'"  % (name))
        log_line ()
        log_line ("Received -> '%s' Port '%d'"             \
                        % (evtstr, d), 1)
    elif (c == OMX_EventError):
        interror     = int(d & 0xffffffff)
        log_line ()
        log_api("EventHandler '%s'"  % (name))
        log_line ()
        log_line ("Received -> '%s' '%s' Port '%d'"        \
                  % (evtstr, get_string_from_il_enum(interror, "OMX_Error"), e), 1)
        if len(config.ignored_error_events) != 0:
            if interror in config.ignored_error_events[a]:
                log_line ("Ignored -> '%s' '%s' Port '%d'" \
                          % (evtstr, get_string_from_il_enum(interror, "OMX_Error"), e), 1)
            else:
                config.error_events[a].append(interror)
        else:
            config.error_events[a].append(interror)
    else:
        log_line ()
        log_api("EventHandler '%s'"  % (name))
        log_line ()
        log_line ("Received -> '%s' Port '%d'"      \
                  % (evtstr, d), 1)

    return 0

def my_ebd_cback(a, b, c):

# Path: skema/utils.py
# def log_line(line="", tabs=0):
#     if (line == ""):
#         lansi = "[skema] "
#         l = ""
#     else:
#         l = ('\t' * tabs) + "[" + line + "]"
#         lansi = "[skema] " + bcolors.WARNING + l + bcolors.ENDC
#     logging.info(l)
#     printit (lansi)
# 
# Path: skema/utils.py
# def log_api(line):
#     log_line ()
#     logging.info("")
#     log_line ()
#     logging.info("")
#     l = "[" + line  +"]"
#     logging.info(l)
#     lansi = "[skema] " + bcolors.BOLD + l + bcolors.ENDC
#     printit (lansi)
# 
# Path: skema/utils.py
# def log_result(tag, err):
#     log_line ()
#     if (err == "OMX_ErrorNone"):
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.OKGREEN + l + bcolors.ENDC
#         logging.info(l)
#     else:
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.FAIL + l + bcolors.ENDC
#         logging.error(l)
# 
#     printit (lansi)
# 
# Path: skema/config.py
# def get_config():
#     global _config
#     if _config is not None:
#         return _config
#     _config = SkemaConfig()
#     return _config


# Path: skema/event.py
import os
import sys
import threading
import signal
from ctypes import *
from omxil12 import *
from skema.utils import log_line
from skema.utils import log_api
from skema.utils import log_result
from skema.config import get_config

        log_line ()
        log_api("EventHandler '%s'"  % (name))
        log_line ()
        log_line ("Received -> '%s' Port '%d'"             \
                        % (evtstr, d), 1)
    elif (c == OMX_EventError):
        interror     = int(d & 0xffffffff)
        log_line ()
        log_api("EventHandler '%s'"  % (name))
        log_line ()
        log_line ("Received -> '%s' '%s' Port '%d'"        \
                  % (evtstr, get_string_from_il_enum(interror, "OMX_Error"), e), 1)
        if len(config.ignored_error_events) != 0:
            if interror in config.ignored_error_events[a]:
                log_line ("Ignored -> '%s' '%s' Port '%d'" \
                          % (evtstr, get_string_from_il_enum(interror, "OMX_Error"), e), 1)
            else:
                config.error_events[a].append(interror)
        else:
            config.error_events[a].append(interror)
    else:
        log_line ()
        log_api("EventHandler '%s'"  % (name))
        log_line ()
        log_line ("Received -> '%s' Port '%d'"      \
                  % (evtstr, d), 1)

    return 0

def my_ebd_cback(a, b, c):

    config = get_config()