# Path: xnb_parse/file_formats/wav.py
# def write_wav(filename, header, data, needs_swap):
#     PyWavWriter(header, data, needs_swap=needs_swap).write(filename)
# 
# Path: xnb_parse/file_formats/xml_utils.py
# def output_xml(xml, filename):
# def output_xml(xml, filename):
# 
# Path: xnb_parse/xna_types/xna_primitive.py
# class Enum(object):
#     __slots__ = ('_value', '_name')
#     enum_values = None
#     xml_tag = None
# 
#     def __init__(self, value):
#         self._value = value
#         self._name = None
#         if value is not None:
#             self._name = self.enum_values[value]
# 
#     @property
#     def value(self):
#         return self._value
# 
#     @property
#     def name(self):
#         return self._name
# 
#     def __str__(self):
#         return self._name
# 
#     def __repr__(self):
#         return '{}({})'.format(self.__class__.__name__, self._value)
# 
#     def xml(self, parent):
#         xml_tag = self.xml_tag if self.xml_tag else self.__class__.__name__
#         root = ET.SubElement(parent, xml_tag)
#         root.text = self._name
#         return root


from xnb_parse.file_formats.wav import write_wav
from xnb_parse.file_formats.xml_utils import ET
from xnb_parse.xna_types.xna_primitive import Enum
        self.duration = duration
        self.width = width
        self.height = height
        self.fps = fps
        self.video_soundtrack_type = video_soundtrack_type

    def __str__(self):
        return "Video f:'{}' d:{}ms s:{}x{} f:{:.2f} t:{}".format(self.filename, self.duration, self.width, self.height,
                                                                  self.fps, self.video_soundtrack_type)

    def xml(self, parent=None):
        if parent is None:
            root = ET.Element('Video')
        else:
            root = ET.SubElement(parent, 'Video')
        if self.filename is not None:
            root.set('filename', self.filename)
        if self.duration is not None:
            root.set('duration', str(self.duration))
        if self.width is not None:
            root.set('width', str(self.width))
        if self.height is not None:
            root.set('height', str(self.height))
        if self.fps is not None:
            root.set('fps', str(self.fps))
        if self.video_soundtrack_type is not None:
            root.set('soundtrackType', str(self.video_soundtrack_type))
        return root



# Path: xnb_parse/file_formats/wav.py
# def write_wav(filename, header, data, needs_swap):
#     PyWavWriter(header, data, needs_swap=needs_swap).write(filename)
# 
# Path: xnb_parse/file_formats/xml_utils.py
# def output_xml(xml, filename):
# def output_xml(xml, filename):
# 
# Path: xnb_parse/xna_types/xna_primitive.py
# class Enum(object):
#     __slots__ = ('_value', '_name')
#     enum_values = None
#     xml_tag = None
# 
#     def __init__(self, value):
#         self._value = value
#         self._name = None
#         if value is not None:
#             self._name = self.enum_values[value]
# 
#     @property
#     def value(self):
#         return self._value
# 
#     @property
#     def name(self):
#         return self._name
# 
#     def __str__(self):
#         return self._name
# 
#     def __repr__(self):
#         return '{}({})'.format(self.__class__.__name__, self._value)
# 
#     def xml(self, parent):
#         xml_tag = self.xml_tag if self.xml_tag else self.__class__.__name__
#         root = ET.SubElement(parent, xml_tag)
#         root.text = self._name
#         return root


# Path: xnb_parse/xna_types/xna_media.py
from xnb_parse.file_formats.wav import write_wav
from xnb_parse.file_formats.xml_utils import ET
from xnb_parse.xna_types.xna_primitive import Enum

        self.duration = duration
        self.width = width
        self.height = height
        self.fps = fps
        self.video_soundtrack_type = video_soundtrack_type

    def __str__(self):
        return "Video f:'{}' d:{}ms s:{}x{} f:{:.2f} t:{}".format(self.filename, self.duration, self.width, self.height,
                                                                  self.fps, self.video_soundtrack_type)

    def xml(self, parent=None):
        if parent is None:
            root = ET.Element('Video')
        else:
            root = ET.SubElement(parent, 'Video')
        if self.filename is not None:
            root.set('filename', self.filename)
        if self.duration is not None:
            root.set('duration', str(self.duration))
        if self.width is not None:
            root.set('width', str(self.width))
        if self.height is not None:
            root.set('height', str(self.height))
        if self.fps is not None:
            root.set('fps', str(self.fps))
        if self.video_soundtrack_type is not None:
            root.set('soundtrackType', str(self.video_soundtrack_type))
        return root



class VideoSoundtrackType(Enum):