# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.5.0
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

import typing
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _mlt7
else:
    import _mlt7

import builtins as __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class UnsignedCharArray(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, nelements):
        _mlt7.UnsignedCharArray_swiginit(self, _mlt7.new_UnsignedCharArray(nelements))
    __swig_destroy__ = _mlt7.delete_UnsignedCharArray

    def __getitem__(self, index):
        return _mlt7.UnsignedCharArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _mlt7.UnsignedCharArray___setitem__(self, index, value)

    def cast(self):
        return _mlt7.UnsignedCharArray_cast(self)

    @staticmethod
    def frompointer(t):
        return _mlt7.UnsignedCharArray_frompointer(t)

# Register UnsignedCharArray in _mlt7:
_mlt7.UnsignedCharArray_swigregister(UnsignedCharArray)
PATH_MAX = _mlt7.PATH_MAX
r"""Classes to wrap."""
mlt_image_none = _mlt7.mlt_image_none
r"""image not available"""
mlt_image_rgb = _mlt7.mlt_image_rgb
r"""8-bit RGB"""
mlt_image_rgba = _mlt7.mlt_image_rgba
r"""8-bit RGB with alpha channel"""
mlt_image_yuv422 = _mlt7.mlt_image_yuv422
r"""8-bit YUV 4:2:2 packed"""
mlt_image_yuv420p = _mlt7.mlt_image_yuv420p
r"""8-bit YUV 4:2:0 planar"""
mlt_image_movit = _mlt7.mlt_image_movit
r"""for movit module internal use only"""
mlt_image_opengl_texture = _mlt7.mlt_image_opengl_texture
r"""an OpenGL texture name"""
mlt_image_yuv422p16 = _mlt7.mlt_image_yuv422p16
r"""planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian"""
mlt_image_yuv420p10 = _mlt7.mlt_image_yuv420p10
r"""planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian"""
mlt_image_yuv444p10 = _mlt7.mlt_image_yuv444p10
r"""planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian"""
mlt_image_rgba64 = _mlt7.mlt_image_rgba64
r"""16-bit RGB with alpha channel"""
mlt_image_invalid = _mlt7.mlt_image_invalid
mlt_audio_none = _mlt7.mlt_audio_none
r"""audio not available"""
mlt_audio_s16 = _mlt7.mlt_audio_s16
r"""signed 16-bit interleaved PCM"""
mlt_audio_s32 = _mlt7.mlt_audio_s32
r"""signed 32-bit non-interleaved PCM"""
mlt_audio_float = _mlt7.mlt_audio_float
r"""32-bit non-interleaved floating point"""
mlt_audio_s32le = _mlt7.mlt_audio_s32le
r"""signed 32-bit interleaved PCM"""
mlt_audio_f32le = _mlt7.mlt_audio_f32le
r"""32-bit interleaved floating point"""
mlt_audio_u8 = _mlt7.mlt_audio_u8
r"""unsigned 8-bit interleaved PCM"""
mlt_channel_auto = _mlt7.mlt_channel_auto
r"""MLT will determine the default configuration based on channel number"""
mlt_channel_independent = _mlt7.mlt_channel_independent
r"""channels are not related"""
mlt_channel_mono = _mlt7.mlt_channel_mono
mlt_channel_stereo = _mlt7.mlt_channel_stereo
mlt_channel_2p1 = _mlt7.mlt_channel_2p1
mlt_channel_3p0 = _mlt7.mlt_channel_3p0
mlt_channel_3p0_back = _mlt7.mlt_channel_3p0_back
mlt_channel_4p0 = _mlt7.mlt_channel_4p0
mlt_channel_quad_back = _mlt7.mlt_channel_quad_back
mlt_channel_quad_side = _mlt7.mlt_channel_quad_side
mlt_channel_3p1 = _mlt7.mlt_channel_3p1
mlt_channel_5p0_back = _mlt7.mlt_channel_5p0_back
mlt_channel_5p0 = _mlt7.mlt_channel_5p0
mlt_channel_4p1 = _mlt7.mlt_channel_4p1
mlt_channel_5p1_back = _mlt7.mlt_channel_5p1_back
mlt_channel_5p1 = _mlt7.mlt_channel_5p1
mlt_channel_6p0 = _mlt7.mlt_channel_6p0
mlt_channel_6p0_front = _mlt7.mlt_channel_6p0_front
mlt_channel_hexagonal = _mlt7.mlt_channel_hexagonal
mlt_channel_6p1 = _mlt7.mlt_channel_6p1
mlt_channel_6p1_back = _mlt7.mlt_channel_6p1_back
mlt_channel_6p1_front = _mlt7.mlt_channel_6p1_front
mlt_channel_7p0 = _mlt7.mlt_channel_7p0
mlt_channel_7p0_front = _mlt7.mlt_channel_7p0_front
mlt_channel_7p1 = _mlt7.mlt_channel_7p1
mlt_channel_7p1_wide_side = _mlt7.mlt_channel_7p1_wide_side
mlt_channel_7p1_wide_back = _mlt7.mlt_channel_7p1_wide_back
mlt_colorspace_rgb = _mlt7.mlt_colorspace_rgb
r"""order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)"""
mlt_colorspace_bt709 = _mlt7.mlt_colorspace_bt709
r"""also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B"""
mlt_colorspace_unspecified = _mlt7.mlt_colorspace_unspecified
mlt_colorspace_reserved = _mlt7.mlt_colorspace_reserved
mlt_colorspace_fcc = _mlt7.mlt_colorspace_fcc
r"""FCC Title 47 Code of Federal Regulations 73.682 (a)(20)"""
mlt_colorspace_bt470bg = _mlt7.mlt_colorspace_bt470bg
r"""also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601"""
mlt_colorspace_smpte170m = _mlt7.mlt_colorspace_smpte170m
r"""also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC"""
mlt_colorspace_smpte240m = _mlt7.mlt_colorspace_smpte240m
r"""functionally identical to above"""
mlt_colorspace_ycgco = _mlt7.mlt_colorspace_ycgco
r"""Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16"""
mlt_colorspace_bt2020_ncl = _mlt7.mlt_colorspace_bt2020_ncl
r"""ITU-R BT2020 non-constant luminance system"""
mlt_colorspace_bt2020_cl = _mlt7.mlt_colorspace_bt2020_cl
r"""ITU-R BT2020 constant luminance system"""
mlt_colorspace_smpte2085 = _mlt7.mlt_colorspace_smpte2085
r"""SMPTE 2085, Y'D'zD'x"""
mlt_colorspace_bt601 = _mlt7.mlt_colorspace_bt601
r"""BT.470 (625/PAL) or SMPTE170M (525/NTSC)"""
mlt_colorspace_invalid = _mlt7.mlt_colorspace_invalid
mlt_color_trc_none = _mlt7.mlt_color_trc_none
mlt_color_trc_bt709 = _mlt7.mlt_color_trc_bt709
r"""also ITU-R BT1361"""
mlt_color_trc_unspecified = _mlt7.mlt_color_trc_unspecified
mlt_color_trc_reserved = _mlt7.mlt_color_trc_reserved
mlt_color_trc_gamma22 = _mlt7.mlt_color_trc_gamma22
r"""also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM"""
mlt_color_trc_gamma28 = _mlt7.mlt_color_trc_gamma28
r"""also ITU-R BT470BG"""
mlt_color_trc_smpte170m = _mlt7.mlt_color_trc_smpte170m
r"""also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC"""
mlt_color_trc_smpte240m = _mlt7.mlt_color_trc_smpte240m
mlt_color_trc_linear = _mlt7.mlt_color_trc_linear
r'''"Linear transfer characteristics"'''
mlt_color_trc_log = _mlt7.mlt_color_trc_log
r'''"Logarithmic transfer characteristic (100:1 range)"'''
mlt_color_trc_log_sqrt = _mlt7.mlt_color_trc_log_sqrt
r'''"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"'''
mlt_color_trc_iec61966_2_4 = _mlt7.mlt_color_trc_iec61966_2_4
r"""IEC 61966-2-4"""
mlt_color_trc_bt1361_ecg = _mlt7.mlt_color_trc_bt1361_ecg
r"""ITU-R BT1361 Extended Colour Gamut"""
mlt_color_trc_iec61966_2_1 = _mlt7.mlt_color_trc_iec61966_2_1
r"""IEC 61966-2-1 (sRGB or sYCC)"""
mlt_color_trc_bt2020_10 = _mlt7.mlt_color_trc_bt2020_10
r"""ITU-R BT2020 for 10-bit system"""
mlt_color_trc_bt2020_12 = _mlt7.mlt_color_trc_bt2020_12
r"""ITU-R BT2020 for 12-bit system"""
mlt_color_trc_smpte2084 = _mlt7.mlt_color_trc_smpte2084
r"""SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems"""
mlt_color_trc_smpte428 = _mlt7.mlt_color_trc_smpte428
r"""SMPTE ST 428-1"""
mlt_color_trc_arib_std_b67 = _mlt7.mlt_color_trc_arib_std_b67
r'''ARIB STD-B67, known as "Hybrid log-gamma"'''
mlt_color_trc_invalid = _mlt7.mlt_color_trc_invalid
mlt_color_pri_none = _mlt7.mlt_color_pri_none
mlt_color_pri_bt709 = _mlt7.mlt_color_pri_bt709
r"""also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B"""
mlt_color_pri_bt470m = _mlt7.mlt_color_pri_bt470m
r"""also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)"""
mlt_color_pri_bt470bg = _mlt7.mlt_color_pri_bt470bg
r"""also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM"""
mlt_color_pri_smpte170m = _mlt7.mlt_color_pri_smpte170m
r"""also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC"""
mlt_color_pri_film = _mlt7.mlt_color_pri_film
r"""colour filters using Illuminant C"""
mlt_color_pri_bt2020 = _mlt7.mlt_color_pri_bt2020
r"""ITU-R BT2020"""
mlt_color_pri_smpte428 = _mlt7.mlt_color_pri_smpte428
r"""SMPTE ST 428-1 (CIE 1931 XYZ)"""
mlt_color_pri_smpte431 = _mlt7.mlt_color_pri_smpte431
r"""SMPTE ST 431-2 (2011) / DCI P3"""
mlt_color_pri_smpte432 = _mlt7.mlt_color_pri_smpte432
r"""SMPTE ST 432-1 (2010) / P3 D65 / Display P3"""
mlt_color_pri_invalid = _mlt7.mlt_color_pri_invalid
mlt_deinterlacer_none = _mlt7.mlt_deinterlacer_none
mlt_deinterlacer_onefield = _mlt7.mlt_deinterlacer_onefield
mlt_deinterlacer_linearblend = _mlt7.mlt_deinterlacer_linearblend
mlt_deinterlacer_weave = _mlt7.mlt_deinterlacer_weave
mlt_deinterlacer_bob = _mlt7.mlt_deinterlacer_bob
mlt_deinterlacer_greedy = _mlt7.mlt_deinterlacer_greedy
mlt_deinterlacer_yadif_nospatial = _mlt7.mlt_deinterlacer_yadif_nospatial
mlt_deinterlacer_yadif = _mlt7.mlt_deinterlacer_yadif
mlt_deinterlacer_bwdif = _mlt7.mlt_deinterlacer_bwdif
mlt_deinterlacer_estdif = _mlt7.mlt_deinterlacer_estdif
mlt_deinterlacer_invalid = _mlt7.mlt_deinterlacer_invalid
mlt_time_frames = _mlt7.mlt_time_frames
r"""frame count"""
mlt_time_clock = _mlt7.mlt_time_clock
r"""SMIL clock-value as [[hh:]mm:]ss[.fraction]"""
mlt_time_smpte_df = _mlt7.mlt_time_smpte_df
r"""SMPTE timecode as [[[hh:]mm:]ss{:|;}]frames"""
mlt_time_smpte_ndf = _mlt7.mlt_time_smpte_ndf
r"""SMPTE NDF timecode as [[[hh:]mm:]ss:]frames"""
mlt_keyframe_discrete = _mlt7.mlt_keyframe_discrete
r"""non-interpolated; value changes instantaneously at the key frame"""
mlt_keyframe_linear = _mlt7.mlt_keyframe_linear
r"""simple, constant pace from this key frame to the next"""
mlt_keyframe_smooth = _mlt7.mlt_keyframe_smooth
r"""deprecated use mlt_keyframe_smooth_loose"""
mlt_keyframe_smooth_loose = _mlt7.mlt_keyframe_smooth_loose
r"""Unity Catmull-Rom spline interpolation. May have cusps or overshoots"""
mlt_keyframe_smooth_natural = _mlt7.mlt_keyframe_smooth_natural
r"""Centripetal Catmull-Rom spline interpolation with natural slope at each keyframe. Will not have cusps or overshoots"""
mlt_keyframe_smooth_tight = _mlt7.mlt_keyframe_smooth_tight
r"""Centripetal Catmull-Rom spline interpolation with 0 slope at each keyframe. Will not have cusps or overshoots"""
mlt_keyframe_sinusoidal_in = _mlt7.mlt_keyframe_sinusoidal_in
mlt_keyframe_sinusoidal_out = _mlt7.mlt_keyframe_sinusoidal_out
mlt_keyframe_sinusoidal_in_out = _mlt7.mlt_keyframe_sinusoidal_in_out
mlt_keyframe_quadratic_in = _mlt7.mlt_keyframe_quadratic_in
mlt_keyframe_quadratic_out = _mlt7.mlt_keyframe_quadratic_out
mlt_keyframe_quadratic_in_out = _mlt7.mlt_keyframe_quadratic_in_out
mlt_keyframe_cubic_in = _mlt7.mlt_keyframe_cubic_in
mlt_keyframe_cubic_out = _mlt7.mlt_keyframe_cubic_out
mlt_keyframe_cubic_in_out = _mlt7.mlt_keyframe_cubic_in_out
mlt_keyframe_quartic_in = _mlt7.mlt_keyframe_quartic_in
mlt_keyframe_quartic_out = _mlt7.mlt_keyframe_quartic_out
mlt_keyframe_quartic_in_out = _mlt7.mlt_keyframe_quartic_in_out
mlt_keyframe_quintic_in = _mlt7.mlt_keyframe_quintic_in
mlt_keyframe_quintic_out = _mlt7.mlt_keyframe_quintic_out
mlt_keyframe_quintic_in_out = _mlt7.mlt_keyframe_quintic_in_out
mlt_keyframe_exponential_in = _mlt7.mlt_keyframe_exponential_in
mlt_keyframe_exponential_out = _mlt7.mlt_keyframe_exponential_out
mlt_keyframe_exponential_in_out = _mlt7.mlt_keyframe_exponential_in_out
mlt_keyframe_circular_in = _mlt7.mlt_keyframe_circular_in
mlt_keyframe_circular_out = _mlt7.mlt_keyframe_circular_out
mlt_keyframe_circular_in_out = _mlt7.mlt_keyframe_circular_in_out
mlt_keyframe_back_in = _mlt7.mlt_keyframe_back_in
mlt_keyframe_back_out = _mlt7.mlt_keyframe_back_out
mlt_keyframe_back_in_out = _mlt7.mlt_keyframe_back_in_out
mlt_keyframe_elastic_in = _mlt7.mlt_keyframe_elastic_in
mlt_keyframe_elastic_out = _mlt7.mlt_keyframe_elastic_out
mlt_keyframe_elastic_in_out = _mlt7.mlt_keyframe_elastic_in_out
mlt_keyframe_bounce_in = _mlt7.mlt_keyframe_bounce_in
mlt_keyframe_bounce_out = _mlt7.mlt_keyframe_bounce_out
mlt_keyframe_bounce_in_out = _mlt7.mlt_keyframe_bounce_in_out
mlt_whence_relative_start = _mlt7.mlt_whence_relative_start
r"""relative to the beginning"""
mlt_whence_relative_current = _mlt7.mlt_whence_relative_current
r"""relative to the current position"""
mlt_whence_relative_end = _mlt7.mlt_whence_relative_end
r"""relative to the end"""
mlt_service_invalid_type = _mlt7.mlt_service_invalid_type
r"""invalid service"""
mlt_service_unknown_type = _mlt7.mlt_service_unknown_type
r"""unknown class"""
mlt_service_producer_type = _mlt7.mlt_service_producer_type
r"""Producer class"""
mlt_service_tractor_type = _mlt7.mlt_service_tractor_type
r"""Tractor class"""
mlt_service_playlist_type = _mlt7.mlt_service_playlist_type
r"""Playlist class"""
mlt_service_multitrack_type = _mlt7.mlt_service_multitrack_type
r"""Multitrack class"""
mlt_service_filter_type = _mlt7.mlt_service_filter_type
r"""Filter class"""
mlt_service_transition_type = _mlt7.mlt_service_transition_type
r"""Transition class"""
mlt_service_consumer_type = _mlt7.mlt_service_consumer_type
r"""Consumer class"""
mlt_service_field_type = _mlt7.mlt_service_field_type
r"""Field class"""
mlt_service_link_type = _mlt7.mlt_service_link_type
r"""Link class"""
mlt_service_chain_type = _mlt7.mlt_service_chain_type
r"""Chain class"""
MLT_POSITION_FMT = _mlt7.MLT_POSITION_FMT
class mlt_rect(object):
    r"""A rectangle type with coordinates, size, and opacity"""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    x = property(_mlt7.mlt_rect_x_get, _mlt7.mlt_rect_x_set, doc=r"""X coordinate""")
    y = property(_mlt7.mlt_rect_y_get, _mlt7.mlt_rect_y_set, doc=r"""Y coordinate""")
    w = property(_mlt7.mlt_rect_w_get, _mlt7.mlt_rect_w_set, doc=r"""width""")
    h = property(_mlt7.mlt_rect_h_get, _mlt7.mlt_rect_h_set, doc=r"""height""")
    o = property(_mlt7.mlt_rect_o_get, _mlt7.mlt_rect_o_set, doc=r"""opacity / mix-level""")

    def __init__(self):
        _mlt7.mlt_rect_swiginit(self, _mlt7.new_mlt_rect())
    __swig_destroy__ = _mlt7.delete_mlt_rect

# Register mlt_rect in _mlt7:
_mlt7.mlt_rect_swigregister(mlt_rect)
class mlt_color(object):
    r"""A tuple of color components"""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    r = property(_mlt7.mlt_color_r_get, _mlt7.mlt_color_r_set, doc=r"""red""")
    g = property(_mlt7.mlt_color_g_get, _mlt7.mlt_color_g_set, doc=r"""green""")
    b = property(_mlt7.mlt_color_b_get, _mlt7.mlt_color_b_set, doc=r"""blue""")
    a = property(_mlt7.mlt_color_a_get, _mlt7.mlt_color_a_set, doc=r"""alpha""")

    def __init__(self):
        _mlt7.mlt_color_swiginit(self, _mlt7.new_mlt_color())
    __swig_destroy__ = _mlt7.delete_mlt_color

# Register mlt_color in _mlt7:
_mlt7.mlt_color_swigregister(mlt_color)
MLT_DIRLIST_DELIMITER = _mlt7.MLT_DIRLIST_DELIMITER

def mlt_deinterlacer_name(method):
    return _mlt7.mlt_deinterlacer_name(method)

def mlt_deinterlacer_id(name):
    return _mlt7.mlt_deinterlacer_id(name)

def mlt_color_convert_trc(color, trc_name):
    return _mlt7.mlt_color_convert_trc(color, trc_name)

def mlt_factory_init(directory):
    r"""
    *MLT_PRODUCER* the name of a default producer often used by other services, defaults to "loader"
    *MLT_CONSUMER* the name of a default consumer, defaults to "sdl2" followed by "sdl"
    *MLT_TEST_CARD* the name of a producer or file to be played when nothing is available (all tracks blank)
    *MLT_DATA* overrides the default full path to the MLT and module supplemental data files, defaults to ``PREFIX_DATA``
    *MLT_PROFILE* selects the default mlt_profile_s, defaults to "dv_pal"
    *MLT_REPOSITORY* overrides the default location of the plugin modules, defaults to ``PREFIX_LIB``.
    MLT_REPOSITORY is ignored on Windows and OS X relocatable builds.
    *MLT_PRESETS_PATH* overrides the default full path to the properties preset files, defaults to ``MLT_DATA/presets``
    *MLT_REPOSITORY_DENY* colon separated list of modules to skip. Example: libmltplus:libmltavformat:libmltfrei0r
    In case both qt5 and qt6 modules are found and none of both is blocked by MLT_REPOSITORY_DENY, qt6 will be blocked
    *producer-create-request* fired when mlt_factory_producer is called;
      the event data is a pointer to mlt_factory_event_data
    *producer-create-done* fired when a producer registers itself;
    	 the event data is a pointer to mlt_factory_event_data
    *filter-create-request* fired when mlt_factory_filter is called;
      the event data is a pointer to mlt_factory_event_data
    *filter-create-done* fired when a filter registers itself;
      the event data is a pointer to mlt_factory_event_data
    *transition-create-request* fired when mlt_factory_transition is called;
      the event data is a pointer to mlt_factory_event_data
    *transition-create-done* fired when a transition registers itself;
      the event data is a pointer to mlt_factory_event_data
    *consumer-create-request* fired when mlt_factory_consumer is called;
      the event data is a pointer to mlt_factory_event_data
    *consumer-create-done* fired when a consumer registers itself;
      the event data is a pointer to mlt_factory_event_data
    *link-create-request* fired when mlt_factory_link is called;
      the event data is a pointer to mlt_factory_event_data
    *link-create-done* fired when a link registers itself;
      the event data is a pointer to mlt_factory_event_data
    """
    return _mlt7.mlt_factory_init(directory)

def mlt_factory_repository():
    return _mlt7.mlt_factory_repository()

def mlt_factory_directory():
    return _mlt7.mlt_factory_directory()

def mlt_environment(name):
    return _mlt7.mlt_environment(name)

def mlt_environment_set(name, value):
    return _mlt7.mlt_environment_set(name, value)

def mlt_factory_event_object():
    return _mlt7.mlt_factory_event_object()

def mlt_factory_producer(profile, service, resource):
    return _mlt7.mlt_factory_producer(profile, service, resource)

def mlt_factory_filter(profile, service, input):
    return _mlt7.mlt_factory_filter(profile, service, input)

def mlt_factory_link(service, input):
    return _mlt7.mlt_factory_link(service, input)

def mlt_factory_transition(profile, service, input):
    return _mlt7.mlt_factory_transition(profile, service, input)

def mlt_factory_consumer(profile, service, input):
    return _mlt7.mlt_factory_consumer(profile, service, input)

def mlt_factory_register_for_clean_up(ptr, destructor):
    return _mlt7.mlt_factory_register_for_clean_up(ptr, destructor)

def mlt_factory_close():
    return _mlt7.mlt_factory_close()

def mlt_global_properties():
    return _mlt7.mlt_global_properties()
class mlt_factory_event_data(object):
    r"""The event data for all factory-related events"""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    name = property(_mlt7.mlt_factory_event_data_name_get, _mlt7.mlt_factory_event_data_name_set, doc=r"""the name of the service requested""")
    input = property(_mlt7.mlt_factory_event_data_input_get, _mlt7.mlt_factory_event_data_input_set, doc=r"""an argument supplied to initialize the service, typically a string""")
    service = property(_mlt7.mlt_factory_event_data_service_get, _mlt7.mlt_factory_event_data_service_set, doc=r"""the service being created""")

    def __init__(self):
        _mlt7.mlt_factory_event_data_swiginit(self, _mlt7.new_mlt_factory_event_data())
    __swig_destroy__ = _mlt7.delete_mlt_factory_event_data

# Register mlt_factory_event_data in _mlt7:
_mlt7.mlt_factory_event_data_swigregister(mlt_factory_event_data)
LIBMLT_VERSION_MAJOR = _mlt7.LIBMLT_VERSION_MAJOR
LIBMLT_VERSION_MINOR = _mlt7.LIBMLT_VERSION_MINOR
LIBMLT_VERSION_REVISION = _mlt7.LIBMLT_VERSION_REVISION
LIBMLT_VERSION_INT = _mlt7.LIBMLT_VERSION_INT
LIBMLT_VERSION = _mlt7.LIBMLT_VERSION

def mlt_version_get_int():
    return _mlt7.mlt_version_get_int()

def mlt_version_get_major():
    return _mlt7.mlt_version_get_major()

def mlt_version_get_minor():
    return _mlt7.mlt_version_get_minor()

def mlt_version_get_revision():
    return _mlt7.mlt_version_get_revision()

def mlt_version_get_string():
    return _mlt7.mlt_version_get_string()
class Factory(object):
    r"""
     Static factory for creating MLT services.

    Call Factory::init() once at application start to load all plugins from
    the MLT_REPOSITORY directory. Use the static factory methods to create
    producers, filters, transitions, and consumers by service identifier.

    See also: mlt_factory_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    @staticmethod
    def init(directory=None):
        r"""Initialise the factory from ``directory``. Caller owns the returned Repository."""
        return _mlt7.Factory_init(directory)

    @staticmethod
    def event_object():
        r"""Return the global event object. Caller owns the result."""
        return _mlt7.Factory_event_object()

    @staticmethod
    def producer(profile, id, arg=None):
        r"""Instantiate a producer by ``id``. Caller owns the result."""
        return _mlt7.Factory_producer(profile, id, arg)

    @staticmethod
    def filter(profile, id, arg=None):
        r"""Instantiate a filter by ``id``. Caller owns the result."""
        return _mlt7.Factory_filter(profile, id, arg)

    @staticmethod
    def transition(profile, id, arg=None):
        r"""Instantiate a transition by ``id``. Caller owns the result."""
        return _mlt7.Factory_transition(profile, id, arg)

    @staticmethod
    def consumer(profile, id, arg=None):
        r"""Instantiate a consumer by ``id``. Caller owns the result."""
        return _mlt7.Factory_consumer(profile, id, arg)

    @staticmethod
    def close():
        return _mlt7.Factory_close()

    def __init__(self):
        _mlt7.Factory_swiginit(self, _mlt7.new_Factory())
    __swig_destroy__ = _mlt7.delete_Factory

# Register Factory in _mlt7:
_mlt7.Factory_swigregister(Factory)
class Repository(object):
    r"""
     C++ wrapper for ::mlt_repository — the plugin service registry.

    The repository is initialised once via Factory::init() and holds all
    registered producer, filter, transition, and consumer services. It provides
    metadata queries and service instantiation.

    See also: mlt_repository_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _mlt7.Repository_swiginit(self, _mlt7.new_Repository(*args))
    __swig_destroy__ = _mlt7.delete_Repository

    def register_service(self, service_type, service, symbol):
        return _mlt7.Repository_register_service(self, service_type, service, symbol)

    def create(self, profile, type, service, arg):
        return _mlt7.Repository_create(self, profile, type, service, arg)

    def consumers(self):
        r"""Return registered consumer service names. Caller owns the result."""
        return _mlt7.Repository_consumers(self)

    def filters(self):
        r"""Return registered filter service names. Caller owns the result."""
        return _mlt7.Repository_filters(self)

    def links(self):
        r"""Return registered link service names. Caller owns the result."""
        return _mlt7.Repository_links(self)

    def producers(self):
        r"""Return registered producer service names. Caller owns the result."""
        return _mlt7.Repository_producers(self)

    def transitions(self):
        r"""Return registered transition service names. Caller owns the result."""
        return _mlt7.Repository_transitions(self)

    def register_metadata(self, type, service, arg4, callback_data):
        return _mlt7.Repository_register_metadata(self, type, service, arg4, callback_data)

    def metadata(self, type, service):
        r"""Return the metadata Properties for ``service`` of ``type``. Caller owns the result."""
        return _mlt7.Repository_metadata(self, type, service)

    def languages(self):
        r"""Return available languages. Caller owns the result."""
        return _mlt7.Repository_languages(self)

    @staticmethod
    def presets():
        r"""Return preset names. Caller owns the result."""
        return _mlt7.Repository_presets()

# Register Repository in _mlt7:
_mlt7.Repository_swigregister(Repository)
class Event(object):
    r"""
     C++ wrapper for ::mlt_event — a registered event listener handle.

    Returned by Properties::listen(). Call block()/unblock() to suppress or
    resume event delivery. The owning Properties object manages the lifecycle;
    delete_event() or Properties::wait_for() can be used to clean up.

    See also: mlt_event_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _mlt7.Event_swiginit(self, _mlt7.new_Event(*args))
    __swig_destroy__ = _mlt7.delete_Event

    def get_event(self):
        return _mlt7.Event_get_event(self)

    def is_valid(self):
        r"""Return true if the underlying handle is non-null."""
        return _mlt7.Event_is_valid(self)

    def block(self):
        r"""Suppress delivery of this event."""
        return _mlt7.Event_block(self)

    def unblock(self):
        r"""Resume delivery of this event."""
        return _mlt7.Event_unblock(self)

# Register Event in _mlt7:
_mlt7.Event_swigregister(Event)
class EventData(object):
    r"""
     C++ wrapper for ::mlt_event_data — typed payload for an MLT event.

    Passed to event listener callbacks. Use the to_*() accessors to extract
    the payload in the appropriate type.

    See also: mlt_event_data
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _mlt7.EventData_swiginit(self, _mlt7.new_EventData(*args))
    __swig_destroy__ = _mlt7.delete_EventData

    def get_event_data(self):
        return _mlt7.EventData_get_event_data(self)

    def to_int(self):
        return _mlt7.EventData_to_int(self)

    def to_string(self):
        return _mlt7.EventData_to_string(self)

    def to_frame(self):
        return _mlt7.EventData_to_frame(self)

    def to_object(self):
        return _mlt7.EventData_to_object(self)

# Register EventData in _mlt7:
_mlt7.EventData_swigregister(EventData)
class Properties(object):
    r"""
     C++ wrapper for ::mlt_properties.

    Properties is a combination list/dictionary of name/value pairs and the
    base class for most MLT objects. It fires a *property-changed* event
    when a value is modified.

    See also: mlt_properties_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        *Overload 1:*
        Wrap an existing ::mlt_properties without taking ownership.

        |

        *Overload 2:*
        Load properties from a file.
        """
        _mlt7.Properties_swiginit(self, _mlt7.new_Properties(*args))
    __swig_destroy__ = _mlt7.delete_Properties

    def get_properties(self):
        return _mlt7.Properties_get_properties(self)

    def inc_ref(self):
        return _mlt7.Properties_inc_ref(self)

    def dec_ref(self):
        return _mlt7.Properties_dec_ref(self)

    def ref_count(self):
        return _mlt7.Properties_ref_count(self)

    def lock(self):
        r"""Acquire the recursive mutex protecting this object."""
        return _mlt7.Properties_lock(self)

    def unlock(self):
        r"""Release the recursive mutex."""
        return _mlt7.Properties_unlock(self)

    def block(self, object=None):
        r"""Suppress event delivery to ``object``."""
        return _mlt7.Properties_block(self, object)

    def unblock(self, object=None):
        r"""Resume event delivery to ``object``."""
        return _mlt7.Properties_unblock(self, object)

    def fire_event(self, event):
        r"""Fire a named event manually."""
        return _mlt7.Properties_fire_event(self, event)

    def is_valid(self):
        r"""Return true if the underlying ::mlt_properties handle is non-null."""
        return _mlt7.Properties_is_valid(self)

    def count(self):
        r"""Return the number of name/value pairs stored."""
        return _mlt7.Properties_count(self)

    def get_int(self, name):
        r"""Get an integer property value by name."""
        return _mlt7.Properties_get_int(self, name)

    def get_int64(self, name):
        r"""Get a 64-bit integer property value by name."""
        return _mlt7.Properties_get_int64(self, name)

    def get_double(self, name):
        r"""Get a double property value by name."""
        return _mlt7.Properties_get_double(self, name)

    def set_string(self, name, value):
        r"""Set a string property (no environment-variable expansion)."""
        return _mlt7.Properties_set_string(self, name, value)

    def copy(self, that, prefix):
        r"""Copy all properties whose names begin with ``prefix`` from ``that``."""
        return _mlt7.Properties_copy(self, that, prefix)

    def pass_property(self, that, name):
        r"""Copy a single named property from ``that``."""
        return _mlt7.Properties_pass_property(self, that, name)

    def pass_values(self, that, prefix):
        r"""Copy all properties whose names begin with ``prefix`` from ``that``."""
        return _mlt7.Properties_pass_values(self, that, prefix)

    def pass_list(self, that, list):
        r"""Copy the space-delimited list of named properties from ``that``."""
        return _mlt7.Properties_pass_list(self, that, list)

    def parse(self, namevalue):
        r"""Parse a "name=value" string and store the result."""
        return _mlt7.Properties_parse(self, namevalue)

    def get_name(self, index):
        r"""Return the property name at positional ``index``."""
        return _mlt7.Properties_get_name(self, index)

    def get(self, *args):
        r"""
        *Overload 1:*
        Get a string property value by name.

        |

        *Overload 2:*
        Return the property value at positional ``index`` as a string.

        |

        *Overload 3:*
        Return the property value at positional ``index`` in the given time format.
        """
        return _mlt7.Properties_get(self, *args)

    def get_data(self, *args):
        r"""Get opaque data stored by name; ``size`` receives the byte count."""
        return _mlt7.Properties_get_data(self, *args)

    def mirror(self, that):
        r"""Mirror all property changes on this object to ``that``."""
        return _mlt7.Properties_mirror(self, that)

    def inherit(self, that):
        r"""Copy all properties from ``that`` into this object."""
        return _mlt7.Properties_inherit(self, that)

    def rename(self, source, dest):
        r"""Rename property ``source`` to ``dest``."""
        return _mlt7.Properties_rename(self, source, dest)

    def dump(self, *args):
        r"""Write all properties to ``output`` as "name=value" lines."""
        return _mlt7.Properties_dump(self, *args)

    def debug(self, *args):
        return _mlt7.Properties_debug(self, *args)

    def load(self, file):
        r"""Merge properties from a file into this object."""
        return _mlt7.Properties_load(self, file)

    def save(self, file):
        r"""Save properties to a file."""
        return _mlt7.Properties_save(self, file)

    def listen(self, id, object, arg4):
        r"""Register a listener callback for the named event. Caller owns the returned Event."""
        return _mlt7.Properties_listen(self, id, object, arg4)

    @staticmethod
    def delete_event(arg1):
        return _mlt7.Properties_delete_event(arg1)

    def setup_wait_for(self, id):
        r"""Set up a one-shot wait handle for event ``id``. Caller owns the returned Event."""
        return _mlt7.Properties_setup_wait_for(self, id)

    def wait_for(self, *args):
        return _mlt7.Properties_wait_for(self, *args)

    def is_sequence(self):
        r"""Return true if all property names are numeric indices (i.e. a sequence)."""
        return _mlt7.Properties_is_sequence(self)

    @staticmethod
    def parse_yaml(file):
        r"""Parse a YAML Tiny file and return a new Properties tree. Caller owns the result."""
        return _mlt7.Properties_parse_yaml(file)

    def serialise_yaml(self):
        return _mlt7.Properties_serialise_yaml(self)

    def preset(self, name):
        r"""Apply a named preset from the presets directory."""
        return _mlt7.Properties_preset(self, name)

    def set_lcnumeric(self, locale):
        return _mlt7.Properties_set_lcnumeric(self, locale)

    def get_lcnumeric(self):
        return _mlt7.Properties_get_lcnumeric(self)

    def clear(self, name):
        return _mlt7.Properties_clear(self, name)

    def property_exists(self, name):
        return _mlt7.Properties_property_exists(self, name)

    def get_time(self, name, arg3=mlt_time_smpte_df):
        return _mlt7.Properties_get_time(self, name, arg3)

    def frames_to_time(self, arg2, arg3=mlt_time_smpte_df):
        return _mlt7.Properties_frames_to_time(self, arg2, arg3)

    def time_to_frames(self, time):
        return _mlt7.Properties_time_to_frames(self, time)

    def get_color(self, name):
        return _mlt7.Properties_get_color(self, name)

    def anim_get_color(self, name, position, length=0):
        return _mlt7.Properties_anim_get_color(self, name, position, length)

    def anim_get(self, name, position, length=0):
        return _mlt7.Properties_anim_get(self, name, position, length)

    def anim_get_int(self, name, position, length=0):
        return _mlt7.Properties_anim_get_int(self, name, position, length)

    def anim_get_double(self, name, position, length=0):
        return _mlt7.Properties_anim_get_double(self, name, position, length)

    def get_rect(self, name):
        return _mlt7.Properties_get_rect(self, name)

    def anim_set(self, *args):
        return _mlt7.Properties_anim_set(self, *args)

    def anim_get_rect(self, name, position, length=0):
        return _mlt7.Properties_anim_get_rect(self, name, position, length)

    def get_animation(self, name):
        return _mlt7.Properties_get_animation(self, name)

    def get_anim(self, name):
        return _mlt7.Properties_get_anim(self, name)

    def is_anim(self, name):
        return _mlt7.Properties_is_anim(self, name)

    def set(self, *args):
        r"""
        *Overload 1:*
        Set a string property.

        |

        *Overload 2:*
        Set an integer property.

        |

        *Overload 3:*
        Set a 64-bit integer property.

        |

        *Overload 4:*
        Set a double property.

        |

        *Overload 5:*
        Store opaque data with an optional destructor and serialiser.

        |

        *Overload 6:*
        Store opaque data with an optional destructor and serialiser.

        |

        *Overload 7:*
        Store opaque data with an optional destructor and serialiser.
        """
        return _mlt7.Properties_set(self, *args)

    def get_props(self, name):
        return _mlt7.Properties_get_props(self, name)

    def get_props_at(self, index):
        return _mlt7.Properties_get_props_at(self, index)

# Register Properties in _mlt7:
_mlt7.Properties_swigregister(Properties)
class Frame(Properties):
    r"""
     C++ wrapper for ::mlt_frame — a single unit of audio/video data.

    A frame carries all data for one rendered moment: pixel buffer, audio
    samples, and per-frame properties. Frames are obtained from a service via
    Service::get_frame() and are owned by the caller.


    See also: mlt_frame_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_frame handle."""
        _mlt7.Frame_swiginit(self, _mlt7.new_Frame(*args))
    __swig_destroy__ = _mlt7.delete_Frame

    def __assign__(self, frame):
        return _mlt7.Frame___assign__(self, frame)

    def get_frame(self):
        return _mlt7.Frame_get_frame(self)

    def get_properties(self):
        return _mlt7.Frame_get_properties(self)

    def get_image(*args): return _mlt7.frame_get_image(*args)



    def fetch_image(self, format, w, h, writable=0):
        r"""Scale the image to exactly ``w`` x ``h`` before returning."""
        return _mlt7.Frame_fetch_image(self, format, w, h, writable)

    def get_audio(self, format, frequency, channels, samples):
        r"""Decode and return raw audio samples."""
        return _mlt7.Frame_get_audio(self, format, frequency, channels, samples)

    def get_waveform(*args): return _mlt7.frame_get_waveform(*args)



    def get_original_producer(self):
        r"""Return the producer that originally created this frame. Caller owns the result."""
        return _mlt7.Frame_get_original_producer(self)

    def get_position(self):
        r"""Return the absolute frame position."""
        return _mlt7.Frame_get_position(self)

    def get_unique_properties(self, service):
        r"""Return the per-frame property bag for ``service`` (thread-safe)."""
        return _mlt7.Frame_get_unique_properties(self, service)

    def set_image(self, image, size, destroy):
        return _mlt7.Frame_set_image(self, image, size, destroy)

    def set_alpha(self, alpha, size, destroy):
        return _mlt7.Frame_set_alpha(self, alpha, size, destroy)

# Register Frame in _mlt7:
_mlt7.Frame_swigregister(Frame)
class Service(Properties):
    r"""
     C++ wrapper for ::mlt_service — abstract base for all MLT services.

    A service can have multiple input connections (producers) and a single
    output connection (consumer). Services that sit between producers and a
    consumer modify data and are called filters. Any service can have zero or
    more filters attached to it.


    See also: mlt_service_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_service handle."""
        _mlt7.Service_swiginit(self, _mlt7.new_Service(*args))
    __swig_destroy__ = _mlt7.delete_Service

    def get_service(self):
        return _mlt7.Service_get_service(self)

    def lock(self):
        r"""Acquire the service mutex (use around property reads in render threads)."""
        return _mlt7.Service_lock(self)

    def unlock(self):
        r"""Release the service mutex."""
        return _mlt7.Service_unlock(self)

    def get_properties(self):
        return _mlt7.Service_get_properties(self)

    def connect_producer(self, producer, index=0):
        r"""Connect ``producer`` as the input at ``index``."""
        return _mlt7.Service_connect_producer(self, producer, index)

    def insert_producer(self, producer, index=0):
        r"""Insert ``producer`` at ``index``, shifting existing connections up."""
        return _mlt7.Service_insert_producer(self, producer, index)

    def disconnect_producer(self, index=0):
        r"""Disconnect the producer at ``index``."""
        return _mlt7.Service_disconnect_producer(self, index)

    def disconnect_all_producers(self):
        r"""Disconnect all producer inputs."""
        return _mlt7.Service_disconnect_all_producers(self)

    def set_consumer(self, service):
        return _mlt7.Service_set_consumer(self, service)

    def consumer(self):
        r"""Return the downstream consumer service, or null."""
        return _mlt7.Service_consumer(self)

    def producer(self):
        r"""Return the first upstream producer, or null."""
        return _mlt7.Service_producer(self)

    def profile(self):
        r"""Return the profile associated with this service."""
        return _mlt7.Service_profile(self)

    def get_profile(self):
        return _mlt7.Service_get_profile(self)

    def get_frame(self, index=0):
        r"""Pull and return frame ``index`` from this service. Caller owns the result."""
        return _mlt7.Service_get_frame(self, index)

    def type(self):
        r"""Return the service sub-type (producer, filter, consumer, transition, etc.)."""
        return _mlt7.Service_type(self)

    def attach(self, filter):
        r"""Attach ``filter`` to this service."""
        return _mlt7.Service_attach(self, filter)

    def detach(self, filter):
        r"""Detach ``filter`` from this service."""
        return _mlt7.Service_detach(self, filter)

    def filter_count(self):
        r"""Return the number of attached filters."""
        return _mlt7.Service_filter_count(self)

    def move_filter(self, _from, to):
        r"""Move the attached filter at position ``from`` to position ``to``."""
        return _mlt7.Service_move_filter(self, _from, to)

    def filter(self, index):
        r"""Return the attached filter at ``index``. Caller does not own the result."""
        return _mlt7.Service_filter(self, index)

    def set_profile(self, *args):
        return _mlt7.Service_set_profile(self, *args)

# Register Service in _mlt7:
_mlt7.Service_swigregister(Service)
class Producer(Service):
    r"""
     C++ wrapper for ::mlt_producer — origin of audio/video data.

    A producer generates frames of audio and video data. It may read from a
    file, network stream, or synthesize content. Producers support in/out
    points, playback speed, and can be "cut" (sub-range) instances that share
    the underlying resource.


    See also: mlt_producer_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        *Overload 1:*
        Construct and instantiate producer ``id`` from the repository.

        |

        *Overload 2:*
        Construct and instantiate producer ``id`` from the repository.

        |

        *Overload 3:*
        Wrap an existing ::mlt_producer handle.
        """
        _mlt7.Producer_swiginit(self, _mlt7.new_Producer(*args))
    __swig_destroy__ = _mlt7.delete_Producer

    def get_producer(self):
        return _mlt7.Producer_get_producer(self)

    def parent(self):
        r"""Return the parent producer (for cut producers, the shared root)."""
        return _mlt7.Producer_parent(self)

    def get_parent(self):
        return _mlt7.Producer_get_parent(self)

    def get_service(self):
        return _mlt7.Producer_get_service(self)

    def seek(self, *args):
        r"""
        *Overload 1:*
        Seek to ``position`` (relative to in-point).

        |

        *Overload 2:*
        Seek to a timecode string (e.g. "00:01:23.04").
        """
        return _mlt7.Producer_seek(self, *args)

    def position(self):
        r"""Return the current position relative to in-point."""
        return _mlt7.Producer_position(self)

    def frame(self):
        r"""Return the current absolute frame number."""
        return _mlt7.Producer_frame(self)

    def frame_time(self, arg2=mlt_time_smpte_df):
        r"""Return the current timecode string."""
        return _mlt7.Producer_frame_time(self, arg2)

    def set_speed(self, speed):
        r"""Set the playback speed (1.0 = normal, 0.0 = paused, -1.0 = reverse)."""
        return _mlt7.Producer_set_speed(self, speed)

    def pause(self):
        r"""Pause playback (sets speed to 0)."""
        return _mlt7.Producer_pause(self)

    def get_speed(self):
        r"""Return the current playback speed."""
        return _mlt7.Producer_get_speed(self)

    def get_fps(self):
        r"""Return the frames-per-second rate for this producer's profile."""
        return _mlt7.Producer_get_fps(self)

    def set_in_and_out(self, _in, out):
        r"""Set the active in/out range in frame numbers."""
        return _mlt7.Producer_set_in_and_out(self, _in, out)

    def get_in(self):
        r"""Return the in-point frame number."""
        return _mlt7.Producer_get_in(self)

    def get_out(self):
        r"""Return the out-point frame number."""
        return _mlt7.Producer_get_out(self)

    def get_length(self):
        r"""Return the total length of the underlying resource in frames."""
        return _mlt7.Producer_get_length(self)

    def get_length_time(self, arg2=mlt_time_smpte_df):
        return _mlt7.Producer_get_length_time(self, arg2)

    def get_playtime(self):
        r"""Return the active play duration (out - in + 1)."""
        return _mlt7.Producer_get_playtime(self)

    def cut(self, _in=0, out=-1):
        r"""Create a cut (sub-range) producer sharing this producer's resource. Caller owns result."""
        return _mlt7.Producer_cut(self, _in, out)

    def is_cut(self):
        r"""Return true if this producer is a cut."""
        return _mlt7.Producer_is_cut(self)

    def is_blank(self):
        r"""Return true if this is a blank/gap clip."""
        return _mlt7.Producer_is_blank(self)

    def same_clip(self, that):
        return _mlt7.Producer_same_clip(self, that)

    def runs_into(self, that):
        return _mlt7.Producer_runs_into(self, that)

    def optimise(self):
        return _mlt7.Producer_optimise(self)

    def clear(self):
        return _mlt7.Producer_clear(self)

    def get_creation_time(self):
        return _mlt7.Producer_get_creation_time(self)

    def set_creation_time(self, creation_time):
        return _mlt7.Producer_set_creation_time(self, creation_time)

    def probe(self):
        return _mlt7.Producer_probe(self)

# Register Producer in _mlt7:
_mlt7.Producer_swigregister(Producer)
class Profile(object):
    r"""
     C++ wrapper for ::mlt_profile — video format parameters.

    A profile describes the video format that services will produce and
    consume: resolution, frame rate, aspect ratio, colorspace, and
    interlace mode. Pass a profile to service constructors to configure
    the format.

    See also: mlt_profile_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _mlt7.Profile_swiginit(self, _mlt7.new_Profile(*args))
    __swig_destroy__ = _mlt7.delete_Profile

    def get_profile(self):
        return _mlt7.Profile_get_profile(self)

    def description(self):
        return _mlt7.Profile_description(self)

    def frame_rate_num(self):
        return _mlt7.Profile_frame_rate_num(self)

    def frame_rate_den(self):
        return _mlt7.Profile_frame_rate_den(self)

    def fps(self):
        return _mlt7.Profile_fps(self)

    def width(self):
        return _mlt7.Profile_width(self)

    def height(self):
        return _mlt7.Profile_height(self)

    def progressive(self):
        return _mlt7.Profile_progressive(self)

    def sample_aspect_num(self):
        return _mlt7.Profile_sample_aspect_num(self)

    def sample_aspect_den(self):
        return _mlt7.Profile_sample_aspect_den(self)

    def sar(self):
        return _mlt7.Profile_sar(self)

    def display_aspect_num(self):
        return _mlt7.Profile_display_aspect_num(self)

    def display_aspect_den(self):
        return _mlt7.Profile_display_aspect_den(self)

    def dar(self):
        return _mlt7.Profile_dar(self)

    def is_explicit(self):
        return _mlt7.Profile_is_explicit(self)

    def colorspace(self):
        return _mlt7.Profile_colorspace(self)

    @staticmethod
    def list():
        r"""Return a list of all available profile names. Caller owns the result."""
        return _mlt7.Profile_list()

    def from_producer(self, producer):
        return _mlt7.Profile_from_producer(self, producer)

    def set_width(self, width):
        return _mlt7.Profile_set_width(self, width)

    def set_height(self, height):
        return _mlt7.Profile_set_height(self, height)

    def set_sample_aspect(self, numerator, denominator):
        return _mlt7.Profile_set_sample_aspect(self, numerator, denominator)

    def set_display_aspect(self, numerator, denominator):
        return _mlt7.Profile_set_display_aspect(self, numerator, denominator)

    def set_progressive(self, progressive):
        return _mlt7.Profile_set_progressive(self, progressive)

    def set_colorspace(self, colorspace):
        return _mlt7.Profile_set_colorspace(self, colorspace)

    def set_frame_rate(self, numerator, denominator):
        return _mlt7.Profile_set_frame_rate(self, numerator, denominator)

    def set_explicit(self, boolean):
        return _mlt7.Profile_set_explicit(self, boolean)

    def scale_width(self, width):
        return _mlt7.Profile_scale_width(self, width)

    def scale_height(self, height):
        return _mlt7.Profile_scale_height(self, height)

    def is_valid(self, *args):
        return _mlt7.Profile_is_valid(self, *args)

# Register Profile in _mlt7:
_mlt7.Profile_swigregister(Profile)
class ClipInfo(object):
    r"""
     Metadata for a single clip within a Playlist.

    Populated by Playlist::clip_info(). The ``producer`` and ``cut`` fields
    are owned by the ClipInfo object.
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _mlt7.ClipInfo_swiginit(self, _mlt7.new_ClipInfo(*args))
    __swig_destroy__ = _mlt7.delete_ClipInfo

    def update(self, info):
        return _mlt7.ClipInfo_update(self, info)
    clip = property(_mlt7.ClipInfo_clip_get, _mlt7.ClipInfo_clip_set)
    producer = property(_mlt7.ClipInfo_producer_get, _mlt7.ClipInfo_producer_set)
    cut = property(_mlt7.ClipInfo_cut_get, _mlt7.ClipInfo_cut_set)
    start = property(_mlt7.ClipInfo_start_get, _mlt7.ClipInfo_start_set)
    resource = property(_mlt7.ClipInfo_resource_get, _mlt7.ClipInfo_resource_set)
    frame_in = property(_mlt7.ClipInfo_frame_in_get, _mlt7.ClipInfo_frame_in_set)
    frame_out = property(_mlt7.ClipInfo_frame_out_get, _mlt7.ClipInfo_frame_out_set)
    frame_count = property(_mlt7.ClipInfo_frame_count_get, _mlt7.ClipInfo_frame_count_set)
    length = property(_mlt7.ClipInfo_length_get, _mlt7.ClipInfo_length_set)
    fps = property(_mlt7.ClipInfo_fps_get, _mlt7.ClipInfo_fps_set)
    repeat = property(_mlt7.ClipInfo_repeat_get, _mlt7.ClipInfo_repeat_set)

# Register ClipInfo in _mlt7:
_mlt7.ClipInfo_swigregister(ClipInfo)
class Playlist(Producer):
    r"""
     C++ wrapper for ::mlt_playlist — a sequential list of clips.

    A playlist is a producer that plays its clips in order. Clips are
    producers (or cut-producers) that may be appended, inserted, removed,
    and trimmed. Blank gaps between clips are also supported.


    See also: mlt_playlist_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_playlist handle."""
        _mlt7.Playlist_swiginit(self, _mlt7.new_Playlist(*args))
    __swig_destroy__ = _mlt7.delete_Playlist

    def get_playlist(self):
        return _mlt7.Playlist_get_playlist(self)

    def get_producer(self):
        return _mlt7.Playlist_get_producer(self)

    def count(self):
        r"""Return the number of entries (clips and blanks)."""
        return _mlt7.Playlist_count(self)

    def clear(self):
        r"""Remove all entries from the playlist."""
        return _mlt7.Playlist_clear(self)

    def append(self, producer, _in=-1, out=-1):
        r"""Append ``producer`` (optionally trimmed to [``in``, ``out])`` to the end."""
        return _mlt7.Playlist_append(self, producer, _in, out)

    def blank(self, *args):
        r"""
        *Overload 1:*
        Append a blank of ``out`` + 1 frames.

        |

        *Overload 2:*
        Append a blank of the given timecode ``length``.
        """
        return _mlt7.Playlist_blank(self, *args)

    def clip(self, whence, index):
        return _mlt7.Playlist_clip(self, whence, index)

    def current_clip(self):
        r"""Return the index of the currently playing clip."""
        return _mlt7.Playlist_current_clip(self)

    def current(self):
        r"""Return the currently playing producer. Caller owns the result."""
        return _mlt7.Playlist_current(self)

    def clip_info(self, index, info=None):
        r"""
        Return metadata for the clip at ``index``. When ``info`` is NULL a new ClipInfo is
        returned and the caller owns it; otherwise ``info`` is updated in-place and returned.
        """
        return _mlt7.Playlist_clip_info(self, index, info)

    @staticmethod
    def delete_clip_info(info):
        return _mlt7.Playlist_delete_clip_info(info)

    def insert(self, producer, where, _in=-1, out=-1):
        r"""Insert ``producer`` at position ``where``, shifting later clips."""
        return _mlt7.Playlist_insert(self, producer, where, _in, out)

    def remove(self, where):
        r"""Remove the clip at position ``where``."""
        return _mlt7.Playlist_remove(self, where)

    def move(self, _from, to):
        r"""Move the clip at ``from`` to ``to``."""
        return _mlt7.Playlist_move(self, _from, to)

    def reorder(self, indices):
        r"""Reorder the playlist using an array of old indices."""
        return _mlt7.Playlist_reorder(self, indices)

    def resize_clip(self, clip, _in, out):
        r"""Retrim the clip at ``clip`` to [``in``, ``out]``."""
        return _mlt7.Playlist_resize_clip(self, clip, _in, out)

    def split(self, clip, position):
        r"""Split the clip at ``clip`` at frame ``position`` (relative to clip start)."""
        return _mlt7.Playlist_split(self, clip, position)

    def split_at(self, position, left=True):
        r"""Split at absolute timeline ``position``."""
        return _mlt7.Playlist_split_at(self, position, left)

    def join(self, clip, count=1, merge=1):
        r"""Join ``count`` clips starting at ``clip`` into one."""
        return _mlt7.Playlist_join(self, clip, count, merge)

    def mix(self, clip, length, transition=None):
        r"""Create a mix (dissolve) of ``length`` frames at the ``clip`` boundary."""
        return _mlt7.Playlist_mix(self, clip, length, transition)

    def mix_in(self, clip, length):
        return _mlt7.Playlist_mix_in(self, clip, length)

    def mix_out(self, clip, length):
        return _mlt7.Playlist_mix_out(self, clip, length)

    def mix_add(self, clip, transition):
        r"""Add a transition to an existing mix at ``clip``."""
        return _mlt7.Playlist_mix_add(self, clip, transition)

    def repeat(self, clip, count):
        r"""Repeat the clip at ``clip`` ``count`` additional times."""
        return _mlt7.Playlist_repeat(self, clip, count)

    def get_clip(self, clip):
        r"""Return the producer for clip ``clip``. Caller owns the result."""
        return _mlt7.Playlist_get_clip(self, clip)

    def get_clip_at(self, position):
        r"""Return the producer at absolute timeline frame ``position``. Caller owns the result."""
        return _mlt7.Playlist_get_clip_at(self, position)

    def get_clip_index_at(self, position):
        r"""Return the clip index at absolute timeline frame ``position``."""
        return _mlt7.Playlist_get_clip_index_at(self, position)

    def is_mix(self, clip):
        r"""Return true if the clip at ``clip`` is a mix."""
        return _mlt7.Playlist_is_mix(self, clip)

    def is_blank(self, clip):
        r"""Return true if the clip at ``clip`` is a blank."""
        return _mlt7.Playlist_is_blank(self, clip)

    def is_blank_at(self, position):
        r"""Return true if the absolute timeline ``position`` is in a blank."""
        return _mlt7.Playlist_is_blank_at(self, position)

    def consolidate_blanks(self, keep_length=0):
        r"""Merge adjacent blanks; if ``keep_length`` is 0, trim trailing blanks."""
        return _mlt7.Playlist_consolidate_blanks(self, keep_length)

    def replace_with_blank(self, clip):
        r"""Replace the clip at ``clip`` with a blank of the same length. Caller owns the result."""
        return _mlt7.Playlist_replace_with_blank(self, clip)

    def insert_blank(self, clip, out):
        return _mlt7.Playlist_insert_blank(self, clip, out)

    def pad_blanks(self, position, length, find=0):
        return _mlt7.Playlist_pad_blanks(self, position, length, find)

    def insert_at(self, *args):
        r"""Insert ``producer`` at absolute timeline ``position``."""
        return _mlt7.Playlist_insert_at(self, *args)

    def clip_start(self, clip):
        r"""Return the start frame of clip ``clip`` in the timeline."""
        return _mlt7.Playlist_clip_start(self, clip)

    def clip_length(self, clip):
        return _mlt7.Playlist_clip_length(self, clip)

    def blanks_from(self, clip, bounded=0):
        return _mlt7.Playlist_blanks_from(self, clip, bounded)

    def remove_region(self, position, length):
        return _mlt7.Playlist_remove_region(self, position, length)

# Register Playlist in _mlt7:
_mlt7.Playlist_swigregister(Playlist)
class Consumer(Service):
    r"""
     C++ wrapper for ::mlt_consumer — pulls and outputs audio/video.

    A consumer pulls frames from the service network and renders them to a
    device, file, or socket. It drives the rendering pipeline. Connect a
    producer (or tractor/playlist) with connect(), then call start().


    See also: mlt_consumer_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        *Overload 1:*
        Construct and instantiate consumer ``id`` from the repository.

        |

        *Overload 2:*
        Construct and instantiate consumer ``id`` from the repository.

        |

        *Overload 3:*
        Wrap an existing ::mlt_consumer handle.
        """
        _mlt7.Consumer_swiginit(self, _mlt7.new_Consumer(*args))
    __swig_destroy__ = _mlt7.delete_Consumer

    def get_consumer(self):
        return _mlt7.Consumer_get_consumer(self)

    def get_service(self):
        return _mlt7.Consumer_get_service(self)

    def connect(self, service):
        r"""Connect ``service`` as the source for this consumer."""
        return _mlt7.Consumer_connect(self, service)

    def run(self):
        r"""Start rendering synchronously (returns when stopped)."""
        return _mlt7.Consumer_run(self)

    def start(self):
        r"""Start rendering asynchronously in a background thread."""
        return _mlt7.Consumer_start(self)

    def purge(self):
        r"""Flush buffered frames."""
        return _mlt7.Consumer_purge(self)

    def stop(self):
        r"""Stop the rendering thread and wait for it to finish."""
        return _mlt7.Consumer_stop(self)

    def is_stopped(self):
        r"""Return true if the consumer is not currently rendering."""
        return _mlt7.Consumer_is_stopped(self)

    def position(self):
        r"""Return the current output frame position."""
        return _mlt7.Consumer_position(self)

# Register Consumer in _mlt7:
_mlt7.Consumer_swigregister(Consumer)
class Filter(Service):
    r"""
     C++ wrapper for ::mlt_filter — modifies a single producer's output.

    A filter is attached to a service (typically a producer or another filter)
    and can inspect or modify each frame as it passes through the service
    network. Set the *disable* property to 1 to bypass the filter.


    See also: mlt_filter_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        *Overload 1:*
        Construct and instantiate filter ``id`` from the repository.

        |

        *Overload 2:*
        Construct and instantiate filter ``id`` from the repository.

        |

        *Overload 3:*
        Wrap an existing ::mlt_filter handle.
        """
        _mlt7.Filter_swiginit(self, _mlt7.new_Filter(*args))
    __swig_destroy__ = _mlt7.delete_Filter

    def get_filter(self):
        return _mlt7.Filter_get_filter(self)

    def get_service(self):
        return _mlt7.Filter_get_service(self)

    def connect(self, service, index=0):
        r"""Connect this filter to ``service`` at ``index``."""
        return _mlt7.Filter_connect(self, service, index)

    def set_in_and_out(self, _in, out):
        r"""Restrict filter activity to the frame range [``in``, ``out]``."""
        return _mlt7.Filter_set_in_and_out(self, _in, out)

    def get_in(self):
        r"""Return the in-point frame number."""
        return _mlt7.Filter_get_in(self)

    def get_out(self):
        r"""Return the out-point frame number."""
        return _mlt7.Filter_get_out(self)

    def get_length(self):
        r"""Return the duration (out - in + 1)."""
        return _mlt7.Filter_get_length(self)

    def get_length2(self, frame):
        r"""Return the duration relative to ``frame's`` producer length."""
        return _mlt7.Filter_get_length2(self, frame)

    def get_track(self):
        r"""Return the multitrack track index on which this filter is applied."""
        return _mlt7.Filter_get_track(self)

    def get_position(self, frame):
        r"""Return the current position of ``frame`` relative to the filter's in-point."""
        return _mlt7.Filter_get_position(self, frame)

    def get_progress(self, frame):
        r"""Return the playback progress of ``frame`` in the range [0.0, 1.0]."""
        return _mlt7.Filter_get_progress(self, frame)

    def process(self, frame):
        r"""Run the filter's process function on ``frame`` (used by subclasses)."""
        return _mlt7.Filter_process(self, frame)

# Register Filter in _mlt7:
_mlt7.Filter_swigregister(Filter)
class Transition(Service):
    r"""
     C++ wrapper for ::mlt_transition — blends two tracks together.

    A transition composites the B-track over the A-track for a specified frame
    range and track pair. It is planted in a Tractor's Field via
    Tractor::plant_transition().


    See also: mlt_transition_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        *Overload 1:*
        Construct and instantiate transition ``id`` from the repository.

        |

        *Overload 2:*
        Construct and instantiate transition ``id`` from the repository.

        |

        *Overload 3:*
        Wrap an existing ::mlt_transition handle.
        """
        _mlt7.Transition_swiginit(self, _mlt7.new_Transition(*args))
    __swig_destroy__ = _mlt7.delete_Transition

    def get_transition(self):
        return _mlt7.Transition_get_transition(self)

    def get_service(self):
        return _mlt7.Transition_get_service(self)

    def set_in_and_out(self, _in, out):
        r"""Restrict this transition to the frame range [``in``, ``out]``."""
        return _mlt7.Transition_set_in_and_out(self, _in, out)

    def set_tracks(self, a_track, b_track):
        r"""Set which tracks this transition blends (A = lower, B = upper)."""
        return _mlt7.Transition_set_tracks(self, a_track, b_track)

    def connect(self, *args):
        return _mlt7.Transition_connect(self, *args)

    def get_a_track(self):
        r"""Return the A-track index."""
        return _mlt7.Transition_get_a_track(self)

    def get_b_track(self):
        r"""Return the B-track index."""
        return _mlt7.Transition_get_b_track(self)

    def get_in(self):
        r"""Return the in-point frame number."""
        return _mlt7.Transition_get_in(self)

    def get_out(self):
        r"""Return the out-point frame number."""
        return _mlt7.Transition_get_out(self)

    def get_length(self):
        r"""Return the duration (out - in + 1)."""
        return _mlt7.Transition_get_length(self)

    def get_position(self, frame):
        r"""Return the current position of ``frame`` relative to the transition's in-point."""
        return _mlt7.Transition_get_position(self, frame)

    def get_progress(self, frame):
        r"""Return the playback progress in the range [0.0, 1.0]."""
        return _mlt7.Transition_get_progress(self, frame)

    def get_progress_delta(self, frame):
        r"""Return the per-frame progress delta."""
        return _mlt7.Transition_get_progress_delta(self, frame)

# Register Transition in _mlt7:
_mlt7.Transition_swigregister(Transition)
class Multitrack(Producer):
    r"""
     C++ wrapper for ::mlt_multitrack — parallel track container.

    A multitrack holds multiple producers on parallel tracks and delivers
    one frame per track per pull. It is the track container inside a Tractor.


    See also: mlt_multitrack_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_multitrack handle."""
        _mlt7.Multitrack_swiginit(self, _mlt7.new_Multitrack(*args))
    __swig_destroy__ = _mlt7.delete_Multitrack

    def get_multitrack(self):
        return _mlt7.Multitrack_get_multitrack(self)

    def get_producer(self):
        return _mlt7.Multitrack_get_producer(self)

    def connect(self, producer, index):
        r"""Connect ``producer`` as track ``index``."""
        return _mlt7.Multitrack_connect(self, producer, index)

    def insert(self, producer, index):
        r"""Insert ``producer`` at ``index``, shifting higher tracks up."""
        return _mlt7.Multitrack_insert(self, producer, index)

    def disconnect(self, index):
        r"""Disconnect the track at ``index``."""
        return _mlt7.Multitrack_disconnect(self, index)

    def clip(self, whence, index):
        return _mlt7.Multitrack_clip(self, whence, index)

    def count(self):
        r"""Return the number of tracks."""
        return _mlt7.Multitrack_count(self)

    def track(self, index):
        r"""Return the producer on track ``index``. Caller does not own the result."""
        return _mlt7.Multitrack_track(self, index)

    def refresh(self):
        r"""Recalculate the multitrack length from its tracks."""
        return _mlt7.Multitrack_refresh(self)

# Register Multitrack in _mlt7:
_mlt7.Multitrack_swigregister(Multitrack)
class Field(Service):
    r"""
     C++ wrapper for ::mlt_field — manages transitions and filters for a Tractor.

    A field maintains the ordered list of transitions and filters that are
    applied across the tracks of a Tractor. Obtain it via Tractor::field().


    See also: mlt_field_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_field handle."""
        _mlt7.Field_swiginit(self, _mlt7.new_Field(*args))
    __swig_destroy__ = _mlt7.delete_Field

    def get_field(self):
        return _mlt7.Field_get_field(self)

    def get_service(self):
        return _mlt7.Field_get_service(self)

    def plant_filter(self, filter, track=0):
        r"""Attach ``filter`` to ``track``."""
        return _mlt7.Field_plant_filter(self, filter, track)

    def plant_transition(self, transition, a_track=0, b_track=1):
        r"""Attach ``transition`` between tracks ``a_track`` and ``b_track``."""
        return _mlt7.Field_plant_transition(self, transition, a_track, b_track)

    def disconnect_service(self, service):
        r"""Remove ``service`` from the field."""
        return _mlt7.Field_disconnect_service(self, service)

# Register Field in _mlt7:
_mlt7.Field_swigregister(Field)
class Tractor(Producer):
    r"""
     C++ wrapper for ::mlt_tractor — composites multiple tracks.

    A tractor owns a Multitrack (parallel track container) and a Field
    (ordered list of transitions and filters). Together they form the
    compositing graph for multi-track editing.


    See also: mlt_tractor_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_tractor handle."""
        _mlt7.Tractor_swiginit(self, _mlt7.new_Tractor(*args))
    __swig_destroy__ = _mlt7.delete_Tractor

    def get_tractor(self):
        return _mlt7.Tractor_get_tractor(self)

    def get_producer(self):
        return _mlt7.Tractor_get_producer(self)

    def multitrack(self):
        r"""Return the underlying Multitrack. Caller does not own the result."""
        return _mlt7.Tractor_multitrack(self)

    def field(self):
        r"""Return the Field managing transitions and filters. Caller does not own the result."""
        return _mlt7.Tractor_field(self)

    def refresh(self):
        r"""Recalculate the tractor's length from its tracks."""
        return _mlt7.Tractor_refresh(self)

    def set_track(self, producer, index):
        r"""Assign ``producer`` to track ``index`` (replaces any existing track)."""
        return _mlt7.Tractor_set_track(self, producer, index)

    def insert_track(self, producer, index):
        r"""Insert ``producer`` at ``index``, shifting higher tracks up."""
        return _mlt7.Tractor_insert_track(self, producer, index)

    def remove_track(self, index):
        r"""Remove the track at ``index``."""
        return _mlt7.Tractor_remove_track(self, index)

    def track(self, index):
        r"""Return the producer on track ``index``. Caller does not own the result."""
        return _mlt7.Tractor_track(self, index)

    def count(self):
        r"""Return the number of tracks."""
        return _mlt7.Tractor_count(self)

    def plant_transition(self, *args):
        r"""Plant ``transition`` between tracks ``a_track`` and ``b_track``."""
        return _mlt7.Tractor_plant_transition(self, *args)

    def plant_filter(self, *args):
        r"""Attach ``filter`` to track ``track``."""
        return _mlt7.Tractor_plant_filter(self, *args)

    def locate_cut(self, producer, track, cut):
        r"""Find which track and cut position ``producer`` occupies."""
        return _mlt7.Tractor_locate_cut(self, producer, track, cut)

    def connect(self, producer):
        return _mlt7.Tractor_connect(self, producer)

# Register Tractor in _mlt7:
_mlt7.Tractor_swigregister(Tractor)
class Parser(Properties):
    r"""
     C++ wrapper for ::mlt_parser — walks a service network and fires callbacks.

    Subclass Parser and override the virtual on_start and on_end methods to
    inspect or transform every node in a service graph(producers, playlists, *tractors, filters, transitions, chains, links).
    Call start() to begin traversal.


    See also: mlt_parser_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _mlt7.Parser_swiginit(self, _mlt7.new_Parser())
    __swig_destroy__ = _mlt7.delete_Parser

    def start(self, service):
        return _mlt7.Parser_start(self, service)

    def get_properties(self):
        return _mlt7.Parser_get_properties(self)

    def on_invalid(self, object):
        return _mlt7.Parser_on_invalid(self, object)

    def on_unknown(self, object):
        return _mlt7.Parser_on_unknown(self, object)

    def on_start_producer(self, object):
        return _mlt7.Parser_on_start_producer(self, object)

    def on_end_producer(self, object):
        return _mlt7.Parser_on_end_producer(self, object)

    def on_start_playlist(self, object):
        return _mlt7.Parser_on_start_playlist(self, object)

    def on_end_playlist(self, object):
        return _mlt7.Parser_on_end_playlist(self, object)

    def on_start_tractor(self, object):
        return _mlt7.Parser_on_start_tractor(self, object)

    def on_end_tractor(self, object):
        return _mlt7.Parser_on_end_tractor(self, object)

    def on_start_multitrack(self, object):
        return _mlt7.Parser_on_start_multitrack(self, object)

    def on_end_multitrack(self, object):
        return _mlt7.Parser_on_end_multitrack(self, object)

    def on_start_track(self):
        return _mlt7.Parser_on_start_track(self)

    def on_end_track(self):
        return _mlt7.Parser_on_end_track(self)

    def on_start_filter(self, object):
        return _mlt7.Parser_on_start_filter(self, object)

    def on_end_filter(self, object):
        return _mlt7.Parser_on_end_filter(self, object)

    def on_start_transition(self, object):
        return _mlt7.Parser_on_start_transition(self, object)

    def on_end_transition(self, object):
        return _mlt7.Parser_on_end_transition(self, object)

    def on_start_chain(self, object):
        return _mlt7.Parser_on_start_chain(self, object)

    def on_end_chain(self, object):
        return _mlt7.Parser_on_end_chain(self, object)

    def on_start_link(self, object):
        return _mlt7.Parser_on_start_link(self, object)

    def on_end_link(self, object):
        return _mlt7.Parser_on_end_link(self, object)

# Register Parser in _mlt7:
_mlt7.Parser_swigregister(Parser)
class FilteredConsumer(Consumer):
    r"""
     A Consumer with an internal filter chain between the source and output.

    FilteredConsumer inserts a private service chain between the connected
    producer and the underlying consumer, allowing filters to be attached
    (via attach()) without modifying the source service network.

    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _mlt7.FilteredConsumer_swiginit(self, _mlt7.new_FilteredConsumer(*args))
    __swig_destroy__ = _mlt7.delete_FilteredConsumer

    def connect(self, service):
        return _mlt7.FilteredConsumer_connect(self, service)

    def attach(self, filter):
        return _mlt7.FilteredConsumer_attach(self, filter)

    def last(self, filter):
        return _mlt7.FilteredConsumer_last(self, filter)

    def detach(self, filter):
        return _mlt7.FilteredConsumer_detach(self, filter)

# Register FilteredConsumer in _mlt7:
_mlt7.FilteredConsumer_swigregister(FilteredConsumer)
class Animation(object):
    r"""
     C++ wrapper for ::mlt_animation — keyframe animation data.

    An animation holds a set of keyframes that define how a property value
    changes over time. Obtain one from Properties via the anim_get / anim_set
    family of methods.

    See also: mlt_animation_s
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""Wrap an existing ::mlt_animation handle (does not take ownership)."""
        _mlt7.Animation_swiginit(self, _mlt7.new_Animation(*args))
    __swig_destroy__ = _mlt7.delete_Animation

    def is_valid(self):
        r"""Return true if the underlying handle is non-null."""
        return _mlt7.Animation_is_valid(self)

    def get_animation(self):
        return _mlt7.Animation_get_animation(self)

    def __assign__(self, arg2):
        return _mlt7.Animation___assign__(self, arg2)

    def length(self):
        r"""Return the animation length in frames."""
        return _mlt7.Animation_length(self)

    def get_item(self, position, is_key, arg4):
        r"""Get the interpolated value and keyframe type at ``position``."""
        return _mlt7.Animation_get_item(self, position, is_key, arg4)

    def is_key(self, position):
        r"""Return true if ``position`` is exactly a keyframe."""
        return _mlt7.Animation_is_key(self, position)

    def keyframe_type(self, position):
        r"""Return the interpolation type of the keyframe at ``position``."""
        return _mlt7.Animation_keyframe_type(self, position)

    def next_key(self, *args):
        r"""Return the next keyframe position at or after ``position``."""
        return _mlt7.Animation_next_key(self, *args)

    def previous_key(self, *args):
        r"""Return the previous keyframe position at or before ``position``."""
        return _mlt7.Animation_previous_key(self, *args)

    def key_count(self):
        r"""Return the total number of keyframes."""
        return _mlt7.Animation_key_count(self)

    def key_get(self, index, frame, arg4):
        r"""Get the frame and type of the keyframe at ``index``."""
        return _mlt7.Animation_key_get(self, index, frame, arg4)

    def key_get_frame(self, index):
        r"""Return the frame number of the keyframe at ``index``."""
        return _mlt7.Animation_key_get_frame(self, index)

    def key_get_type(self, index):
        r"""Return the interpolation type of the keyframe at ``index``."""
        return _mlt7.Animation_key_get_type(self, index)

    def key_set_type(self, index, type):
        r"""Set the interpolation type of the keyframe at ``index``."""
        return _mlt7.Animation_key_set_type(self, index, type)

    def key_set_frame(self, index, frame):
        r"""Move the keyframe at ``index`` to ``frame``."""
        return _mlt7.Animation_key_set_frame(self, index, frame)

    def shift_frames(self, shift):
        r"""Shift all keyframe positions by ``shift`` frames."""
        return _mlt7.Animation_shift_frames(self, shift)

    def set_length(self, length):
        r"""Set a new total length, scaling keyframe positions proportionally."""
        return _mlt7.Animation_set_length(self, length)

    def remove(self, position):
        r"""Remove the keyframe at ``position``."""
        return _mlt7.Animation_remove(self, position)

    def interpolate(self):
        r"""Recalculate intermediate values between keyframes."""
        return _mlt7.Animation_interpolate(self)

    def serialize_cut(self, *args):
        r"""
        Serialize the animation as a string, optionally clipped to [``in``, ``out]``.
        Caller must ``free()`` the returned string.
        """
        return _mlt7.Animation_serialize_cut(self, *args)

# Register Animation in _mlt7:
_mlt7.Animation_swigregister(Animation)

def frame_get_waveform(arg1, arg2, arg3):
    return _mlt7.frame_get_waveform(arg1, arg2, arg3)

def frame_get_image(arg1, arg2, arg3, arg4):
    return _mlt7.frame_get_image(arg1, arg2, arg3, arg4)

