# 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
        self.height = _video_height[data[5]]
        self.codec  = 'MP2V'


class DVDAudio(audio.Audio):

    _keys = audio.Audio._keys

    def __init__(self, info):
        audio.Audio.__init__(self)
        self.id, self.language, self.codec, self.channels, self.samplerate = info


class DVDTitle(video.AVContainer):

    _keys = video.AVContainer._keys + [ 'angles' ]

    def __init__(self, info):
        video.AVContainer.__init__(self)
        self.chapters = []
        pos = 0
        for length in info[0]:
            chapter = video.Chapter()
            chapter.pos = pos
            pos += length
            self.chapters.append(chapter)

        self.angles = info[1]

        self.mime = 'video/mpeg'

# 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

        self.height = _video_height[data[5]]
        self.codec  = 'MP2V'


class DVDAudio(audio.Audio):

    _keys = audio.Audio._keys

    def __init__(self, info):
        audio.Audio.__init__(self)
        self.id, self.language, self.codec, self.channels, self.samplerate = info


class DVDTitle(video.AVContainer):

    _keys = video.AVContainer._keys + [ 'angles' ]

    def __init__(self, info):
        video.AVContainer.__init__(self)
        self.chapters = []
        pos = 0
        for length in info[0]:
            chapter = video.Chapter()
            chapter.pos = pos
            pos += length
            self.chapters.append(chapter)

        self.angles = info[1]

        self.mime = 'video/mpeg'

        self.video.append(DVDVideo(info[2:8]))