# Path: external/metadata/video/core.py
# VIDEOCORE = ['length', 'encoder', 'bitrate', 'samplerate', 'codec', 'format',
#              'samplebits', 'width', 'height', 'fps', 'aspect', 'trackno',
#              'fourcc', 'id', 'enabled', 'default', 'codec_private' ]
# AVCORE    = ['length', 'encoder', 'trackno', 'trackof', 'copyright', 'product',
#              'genre', 'writer', 'producer', 'studio', 'rating', 'actors', 'thumbnail',
#              'delay', 'image', 'video', 'audio', 'subtitles', 'chapters', 'software',
#              'summary', 'synopsis', 'season', 'episode', 'series' ]
# class VideoStream(Media):
# class Chapter(Media):
# class Subtitle(Media):
# class AVContainer(Media):
#     def __init__(self, name=None, pos=0):
#     def __init__(self, language=None):
#     def __init__(self):
#     def _set_url(self, url):
#     def _finalize(self):
# 
# Path: external/metadata/audio/core.py
# AUDIOCORE = ['channels', 'samplerate', 'length', 'encoder', 'codec', 'format',
#              'samplebits', 'bitrate', 'fourcc', 'trackno', 'id', 'userdate',
#              'enabled', 'default', 'codec_private' ]
# MUSICCORE = ['trackof', 'album', 'genre', 'discs', 'thumbnail' ]
# class Audio(Media):
# class Music(Audio):
#     def _finalize(self):


import os
import logging
import glob
    import _ifoparser
from ..video import core as video
from ..audio import core as audio
from . import core
# kaa.metadata imports

# kaa.metadata.disc imports
try:
except ImportError:
    _ifoparser = None

# get logging object
log = logging.getLogger('metadata')

_video_height = (480, 576, 0, 576)
_video_width  = (720, 704, 352, 352)
_video_fps    = (0, 25.00, 0, 29.97)
_video_format = ('NTSC', 'PAL')
_video_aspect = (4.0 / 3, 16.0 / 9, 1.0, 16.0 / 9)

class DVDVideo(video.VideoStream):
    def __init__(self, data):
        video.VideoStream.__init__(self)
        self.length = data[0]
        self.fps    = _video_fps[data[1]]
        self.format = _video_format[data[2]]
        self.aspect = _video_aspect[data[3]]
        self.width  = _video_width[data[4]]
        self.height = _video_height[data[5]]
        self.codec  = 'MP2V'


class DVDAudio(audio.Audio):


# Path: external/metadata/video/core.py
# VIDEOCORE = ['length', 'encoder', 'bitrate', 'samplerate', 'codec', 'format',
#              'samplebits', 'width', 'height', 'fps', 'aspect', 'trackno',
#              'fourcc', 'id', 'enabled', 'default', 'codec_private' ]
# AVCORE    = ['length', 'encoder', 'trackno', 'trackof', 'copyright', 'product',
#              'genre', 'writer', 'producer', 'studio', 'rating', 'actors', 'thumbnail',
#              'delay', 'image', 'video', 'audio', 'subtitles', 'chapters', 'software',
#              'summary', 'synopsis', 'season', 'episode', 'series' ]
# class VideoStream(Media):
# class Chapter(Media):
# class Subtitle(Media):
# class AVContainer(Media):
#     def __init__(self, name=None, pos=0):
#     def __init__(self, language=None):
#     def __init__(self):
#     def _set_url(self, url):
#     def _finalize(self):
# 
# Path: external/metadata/audio/core.py
# AUDIOCORE = ['channels', 'samplerate', 'length', 'encoder', 'codec', 'format',
#              'samplebits', 'bitrate', 'fourcc', 'trackno', 'id', 'userdate',
#              'enabled', 'default', 'codec_private' ]
# MUSICCORE = ['trackof', 'album', 'genre', 'discs', 'thumbnail' ]
# class Audio(Media):
# class Music(Audio):
#     def _finalize(self):


# Path: external/metadata/disc/dvd.py
import os
import logging
import glob
    import _ifoparser
from ..video import core as video
from ..audio import core as audio
from . import core

# kaa.metadata imports

# kaa.metadata.disc imports
try:
except ImportError:
    _ifoparser = None

# get logging object
log = logging.getLogger('metadata')

_video_height = (480, 576, 0, 576)
_video_width  = (720, 704, 352, 352)
_video_fps    = (0, 25.00, 0, 29.97)
_video_format = ('NTSC', 'PAL')
_video_aspect = (4.0 / 3, 16.0 / 9, 1.0, 16.0 / 9)

class DVDVideo(video.VideoStream):
    def __init__(self, data):
        video.VideoStream.__init__(self)
        self.length = data[0]
        self.fps    = _video_fps[data[1]]
        self.format = _video_format[data[2]]
        self.aspect = _video_aspect[data[3]]
        self.width  = _video_width[data[4]]
        self.height = _video_height[data[5]]
        self.codec  = 'MP2V'


class DVDAudio(audio.Audio):


    _keys = audio.Audio._keys