<?php

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */

// Try to load our extension if it's not already loaded.
if (!extension_loaded('mlt')) {
  if (strtolower(substr(PHP_OS, 0, 3)) === 'win') {
    if (!dl('php_mlt.dll')) return;
  } else {
    // PHP_SHLIB_SUFFIX gives 'dylib' on MacOS X but modules are 'so'.
    if (PHP_SHLIB_SUFFIX === 'dylib') {
      if (!dl('mlt.so')) return;
    } else {
      if (!dl('mlt.'.PHP_SHLIB_SUFFIX)) return;
    }
  }
}



abstract class mlt {
	const PATH_MAX = PATH_MAX;

	const mlt_image_none = 0;

	const mlt_image_rgb = mlt_image_rgb;

	const mlt_image_rgba = mlt_image_rgba;

	const mlt_image_yuv422 = mlt_image_yuv422;

	const mlt_image_yuv420p = mlt_image_yuv420p;

	const mlt_image_movit = mlt_image_movit;

	const mlt_image_opengl_texture = mlt_image_opengl_texture;

	const mlt_image_yuv422p16 = mlt_image_yuv422p16;

	const mlt_image_invalid = mlt_image_invalid;

	const mlt_audio_none = 0;

	const mlt_audio_s16 = 1;

	const mlt_audio_s32 = mlt_audio_s32;

	const mlt_audio_float = mlt_audio_float;

	const mlt_audio_s32le = mlt_audio_s32le;

	const mlt_audio_f32le = mlt_audio_f32le;

	const mlt_audio_u8 = mlt_audio_u8;

	const mlt_channel_auto = 0;

	const mlt_channel_independent = mlt_channel_independent;

	const mlt_channel_mono = mlt_channel_mono;

	const mlt_channel_stereo = mlt_channel_stereo;

	const mlt_channel_2p1 = mlt_channel_2p1;

	const mlt_channel_3p0 = mlt_channel_3p0;

	const mlt_channel_3p0_back = mlt_channel_3p0_back;

	const mlt_channel_4p0 = mlt_channel_4p0;

	const mlt_channel_quad_back = mlt_channel_quad_back;

	const mlt_channel_quad_side = mlt_channel_quad_side;

	const mlt_channel_3p1 = mlt_channel_3p1;

	const mlt_channel_5p0_back = mlt_channel_5p0_back;

	const mlt_channel_5p0 = mlt_channel_5p0;

	const mlt_channel_4p1 = mlt_channel_4p1;

	const mlt_channel_5p1_back = mlt_channel_5p1_back;

	const mlt_channel_5p1 = mlt_channel_5p1;

	const mlt_channel_6p0 = mlt_channel_6p0;

	const mlt_channel_6p0_front = mlt_channel_6p0_front;

	const mlt_channel_hexagonal = mlt_channel_hexagonal;

	const mlt_channel_6p1 = mlt_channel_6p1;

	const mlt_channel_6p1_back = mlt_channel_6p1_back;

	const mlt_channel_6p1_front = mlt_channel_6p1_front;

	const mlt_channel_7p0 = mlt_channel_7p0;

	const mlt_channel_7p0_front = mlt_channel_7p0_front;

	const mlt_channel_7p1 = mlt_channel_7p1;

	const mlt_channel_7p1_wide_side = mlt_channel_7p1_wide_side;

	const mlt_channel_7p1_wide_back = mlt_channel_7p1_wide_back;

	const mlt_colorspace_rgb = 0;

	const mlt_colorspace_bt709 = 1;

	const mlt_colorspace_unspecified = 2;

	const mlt_colorspace_reserved = 3;

	const mlt_colorspace_fcc = 4;

	const mlt_colorspace_bt470bg = 5;

	const mlt_colorspace_smpte170m = 6;

	const mlt_colorspace_smpte240m = 7;

	const mlt_colorspace_ycgco = 8;

	const mlt_colorspace_bt2020_ncl = 9;

	const mlt_colorspace_bt2020_cl = 10;

	const mlt_colorspace_smpte2085 = 11;

	const mlt_time_frames = 0;

	const mlt_time_clock = mlt_time_clock;

	const mlt_time_smpte_df = mlt_time_smpte_df;

	const mlt_time_smpte_ndf = mlt_time_smpte_ndf;

	const mlt_keyframe_discrete = 0;

	const mlt_keyframe_linear = mlt_keyframe_linear;

	const mlt_keyframe_smooth = mlt_keyframe_smooth;

	const mlt_whence_relative_start = 0;

	const mlt_whence_relative_current = mlt_whence_relative_current;

	const mlt_whence_relative_end = mlt_whence_relative_end;

	const mlt_service_invalid_type = 0;

	const mlt_service_unknown_type = mlt_service_unknown_type;

	const mlt_service_producer_type = mlt_service_producer_type;

	const mlt_service_tractor_type = mlt_service_tractor_type;

	const mlt_service_playlist_type = mlt_service_playlist_type;

	const mlt_service_multitrack_type = mlt_service_multitrack_type;

	const mlt_service_filter_type = mlt_service_filter_type;

	const mlt_service_transition_type = mlt_service_transition_type;

	const mlt_service_consumer_type = mlt_service_consumer_type;

	const mlt_service_field_type = mlt_service_field_type;

	const mlt_service_link_type = mlt_service_link_type;

	const mlt_service_chain_type = mlt_service_chain_type;

	const MLT_POSITION_FMT = MLT_POSITION_FMT;

	const MLT_DIRLIST_DELIMITER = MLT_DIRLIST_DELIMITER;

	static function mlt_factory_init($directory) {
		return mlt_factory_init($directory);
	}

	static function mlt_factory_repository() {
		return mlt_factory_repository();
	}

	static function mlt_factory_directory() {
		return mlt_factory_directory();
	}

	static function mlt_environment($name) {
		return mlt_environment($name);
	}

	static function mlt_environment_set($name,$value) {
		return mlt_environment_set($name,$value);
	}

	static function mlt_factory_event_object() {
		return mlt_factory_event_object();
	}

	static function mlt_factory_producer($profile,$service,$resource) {
		return mlt_factory_producer($profile,$service,$resource);
	}

	static function mlt_factory_filter($profile,$name,$input) {
		return mlt_factory_filter($profile,$name,$input);
	}

	static function mlt_factory_link($name,$input) {
		return mlt_factory_link($name,$input);
	}

	static function mlt_factory_transition($profile,$name,$input) {
		return mlt_factory_transition($profile,$name,$input);
	}

	static function mlt_factory_consumer($profile,$name,$input) {
		return mlt_factory_consumer($profile,$name,$input);
	}

	static function mlt_factory_register_for_clean_up($ptr,$destructor) {
		mlt_factory_register_for_clean_up($ptr,$destructor);
	}

	static function mlt_factory_close() {
		mlt_factory_close();
	}

	static function mlt_global_properties() {
		return mlt_global_properties();
	}

	const LIBMLT_VERSION_MAJOR = LIBMLT_VERSION_MAJOR;

	const LIBMLT_VERSION_MINOR = LIBMLT_VERSION_MINOR;

	const LIBMLT_VERSION_REVISION = LIBMLT_VERSION_REVISION;

	const LIBMLT_VERSION_INT = LIBMLT_VERSION_INT;

	const LIBMLT_VERSION = LIBMLT_VERSION;

	static function mlt_version_get_int() {
		return mlt_version_get_int();
	}

	static function mlt_version_get_major() {
		return mlt_version_get_major();
	}

	static function mlt_version_get_minor() {
		return mlt_version_get_minor();
	}

	static function mlt_version_get_revision() {
		return mlt_version_get_revision();
	}

	static function mlt_version_get_string() {
		return mlt_version_get_string();
	}

	static function mlt_log_get_level() {
		return mlt_log_get_level();
	}

	static function mlt_log_set_level($arg1) {
		mlt_log_set_level($arg1);
	}
}

/* PHP Proxy Classes */
class UnsignedCharArray {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($nelements) {
		if (is_resource($nelements) && get_resource_type($nelements) === '_p_UnsignedCharArray') {
			$this->_cPtr=$nelements;
			return;
		}
		$this->_cPtr=new_UnsignedCharArray($nelements);
	}

	function getitem($index) {
		return UnsignedCharArray_getitem($this->_cPtr,$index);
	}

	function setitem($index,$value) {
		UnsignedCharArray_setitem($this->_cPtr,$index,$value);
	}

	function cast() {
		return UnsignedCharArray_cast($this->_cPtr);
	}

	static function frompointer($t) {
		$r=UnsignedCharArray_frompointer($t);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new UnsignedCharArray($r);
		}
		return $r;
	}
}

class mlt_rect {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'mlt_rect_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'mlt_rect_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('mlt_rect_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_mlt_rect') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_mlt_rect();
	}
}

class mlt_color {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'mlt_color_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'mlt_color_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('mlt_color_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_mlt_color') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_mlt_color();
	}
}

class mlt_factory_event_data {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'mlt_factory_event_data_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'mlt_factory_event_data_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('mlt_factory_event_data_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_mlt_factory_event_data') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_mlt_factory_event_data();
	}
}

class Factory {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	static function init($directory=null) {
		switch (func_num_args()) {
		case 0: $r=Factory_init(); break;
		default: $r=Factory_init($directory);
		}
		if (!is_resource($r)) return $r;
		return new Repository($r);
	}

	static function event_object() {
		$r=Factory_event_object();
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	static function producer($profile,$id,$arg=null) {
		switch (func_num_args()) {
		case 2: $r=Factory_producer($profile,$id); break;
		default: $r=Factory_producer($profile,$id,$arg);
		}
		if (!is_resource($r)) return $r;
		return new Producer($r);
	}

	static function filter($profile,$id,$arg=null) {
		switch (func_num_args()) {
		case 2: $r=Factory_filter($profile,$id); break;
		default: $r=Factory_filter($profile,$id,$arg);
		}
		if (!is_resource($r)) return $r;
		return new Filter($r);
	}

	static function transition($profile,$id,$arg=null) {
		switch (func_num_args()) {
		case 2: $r=Factory_transition($profile,$id); break;
		default: $r=Factory_transition($profile,$id,$arg);
		}
		if (!is_resource($r)) return $r;
		return new Transition($r);
	}

	static function consumer($profile,$id,$arg=null) {
		switch (func_num_args()) {
		case 2: $r=Factory_consumer($profile,$id); break;
		default: $r=Factory_consumer($profile,$id,$arg);
		}
		if (!is_resource($r)) return $r;
		return new Consumer($r);
	}

	static function close() {
		Factory_close();
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_Mlt__Factory') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_Factory();
	}
}

class Repository {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($directory_or_repository) {
		if (is_resource($directory_or_repository) && get_resource_type($directory_or_repository) === '_p_Mlt__Repository') {
			$this->_cPtr=$directory_or_repository;
			return;
		}
		$this->_cPtr=new_Repository($directory_or_repository);
	}

	function register_service($service_type,$service,$symbol) {
		Repository_register_service($this->_cPtr,$service_type,$service,$symbol);
	}

	function create($profile,$type,$service,$arg) {
		return Repository_create($this->_cPtr,$profile,$type,$service,$arg);
	}

	function consumers() {
		$r=Repository_consumers($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function filters() {
		$r=Repository_filters($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function links() {
		$r=Repository_links($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function producers() {
		$r=Repository_producers($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function transitions() {
		$r=Repository_transitions($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function register_metadata($type,$service,$arg3,$callback_data) {
		Repository_register_metadata($this->_cPtr,$type,$service,$arg3,$callback_data);
	}

	function metadata($type,$service) {
		$r=Repository_metadata($this->_cPtr,$type,$service);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function languages() {
		$r=Repository_languages($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	static function presets() {
		$r=Repository_presets();
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}
}

class Event {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($arg1) {
		if (is_resource($arg1) && get_resource_type($arg1) === '_p_Mlt__Event') {
			$this->_cPtr=$arg1;
			return;
		}
		$this->_cPtr=new_Event($arg1);
	}

	function get_event() {
		return Event_get_event($this->_cPtr);
	}

	function is_valid() {
		return Event_is_valid($this->_cPtr);
	}

	function block() {
		Event_block($this->_cPtr);
	}

	function unblock() {
		Event_unblock($this->_cPtr);
	}
}

class EventData {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($arg1) {
		if (is_resource($arg1) && get_resource_type($arg1) === '_p_Mlt__EventData') {
			$this->_cPtr=$arg1;
			return;
		}
		$this->_cPtr=new_EventData($arg1);
	}

	function get_event_data() {
		return EventData_get_event_data($this->_cPtr);
	}

	function to_int() {
		return EventData_to_int($this->_cPtr);
	}

	function to_string() {
		return EventData_to_string($this->_cPtr);
	}

	function to_frame() {
		$r=EventData_to_frame($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Frame($r);
		}
		return $r;
	}

	function to_object() {
		return EventData_to_object($this->_cPtr);
	}
}

class Properties {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($dummy_or_properties_or_file=null) {
		if (is_resource($dummy_or_properties_or_file) && get_resource_type($dummy_or_properties_or_file) === '_p_Mlt__Properties') {
			$this->_cPtr=$dummy_or_properties_or_file;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Properties(); break;
		default: $this->_cPtr=new_Properties($dummy_or_properties_or_file);
		}
	}

	function get_properties() {
		return Properties_get_properties($this->_cPtr);
	}

	function inc_ref() {
		return Properties_inc_ref($this->_cPtr);
	}

	function dec_ref() {
		return Properties_dec_ref($this->_cPtr);
	}

	function ref_count() {
		return Properties_ref_count($this->_cPtr);
	}

	function lock() {
		Properties_lock($this->_cPtr);
	}

	function unlock() {
		Properties_unlock($this->_cPtr);
	}

	function block($object=null) {
		Properties_block($this->_cPtr,$object);
	}

	function unblock($object=null) {
		Properties_unblock($this->_cPtr,$object);
	}

	function fire_event($event) {
		return Properties_fire_event($this->_cPtr,$event);
	}

	function is_valid() {
		return Properties_is_valid($this->_cPtr);
	}

	function count() {
		return Properties_count($this->_cPtr);
	}

	function get_int($name) {
		return Properties_get_int($this->_cPtr,$name);
	}

	function get_int64($name) {
		return Properties_get_int64($this->_cPtr,$name);
	}

	function get_double($name) {
		return Properties_get_double($this->_cPtr,$name);
	}

	function set_string($name,$value) {
		return Properties_set_string($this->_cPtr,$name,$value);
	}

	function pass_property($that,$name) {
		Properties_pass_property($this->_cPtr,$that,$name);
	}

	function pass_values($that,$prefix) {
		return Properties_pass_values($this->_cPtr,$that,$prefix);
	}

	function pass_list($that,$list) {
		return Properties_pass_list($this->_cPtr,$that,$list);
	}

	function parse($namevalue) {
		return Properties_parse($this->_cPtr,$namevalue);
	}

	function get_name($index) {
		return Properties_get_name($this->_cPtr,$index);
	}

	function get($name_or_index,$arg2=null) {
		switch (func_num_args()) {
		case 1: $r=Properties_get($this->_cPtr,$name_or_index); break;
		default: $r=Properties_get($this->_cPtr,$name_or_index,$arg2);
		}
		return $r;
	}

	function get_data($name_or_index,$size=null) {
		switch (func_num_args()) {
		case 1: $r=Properties_get_data($this->_cPtr,$name_or_index); break;
		default: $r=Properties_get_data($this->_cPtr,$name_or_index,$size);
		}
		return $r;
	}

	function mirror($that) {
		Properties_mirror($this->_cPtr,$that);
	}

	function inherit($that) {
		return Properties_inherit($this->_cPtr,$that);
	}

	function rename($source,$dest) {
		return Properties_rename($this->_cPtr,$source,$dest);
	}

	function dump($output=null) {
		switch (func_num_args()) {
		case 0: Properties_dump($this->_cPtr); break;
		default: Properties_dump($this->_cPtr,$output);
		}
	}

	function debug($title="Object",$output=null) {
		switch (func_num_args()) {
		case 0: case 1: Properties_debug($this->_cPtr,$title); break;
		default: Properties_debug($this->_cPtr,$title,$output);
		}
	}

	function load($file) {
		Properties_load($this->_cPtr,$file);
	}

	function save($file) {
		return Properties_save($this->_cPtr,$file);
	}

	function listen($id,$object,$arg3) {
		$r=Properties_listen($this->_cPtr,$id,$object,$arg3);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Event($r);
		}
		return $r;
	}

	static function delete_event($arg1) {
		Properties_delete_event($arg1);
	}

	function setup_wait_for($id) {
		$r=Properties_setup_wait_for($this->_cPtr,$id);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Event($r);
		}
		return $r;
	}

	function wait_for($id,$destroy=true) {
		Properties_wait_for($this->_cPtr,$id,$destroy);
	}

	function is_sequence() {
		return Properties_is_sequence($this->_cPtr);
	}

	static function parse_yaml($file) {
		$r=Properties_parse_yaml($file);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function serialise_yaml() {
		return Properties_serialise_yaml($this->_cPtr);
	}

	function preset($name) {
		return Properties_preset($this->_cPtr,$name);
	}

	function set_lcnumeric($locale) {
		return Properties_set_lcnumeric($this->_cPtr,$locale);
	}

	function get_lcnumeric() {
		return Properties_get_lcnumeric($this->_cPtr);
	}

	function clear($name) {
		Properties_clear($this->_cPtr,$name);
	}

	function property_exists($name) {
		return Properties_property_exists($this->_cPtr,$name);
	}

	function get_time($name,$arg2=null) {
		switch (func_num_args()) {
		case 1: $r=Properties_get_time($this->_cPtr,$name); break;
		default: $r=Properties_get_time($this->_cPtr,$name,$arg2);
		}
		return $r;
	}

	function frames_to_time($arg1,$arg2=null) {
		switch (func_num_args()) {
		case 1: $r=Properties_frames_to_time($this->_cPtr,$arg1); break;
		default: $r=Properties_frames_to_time($this->_cPtr,$arg1,$arg2);
		}
		return $r;
	}

	function time_to_frames($time) {
		return Properties_time_to_frames($this->_cPtr,$time);
	}

	function get_color($name) {
		$r=Properties_get_color($this->_cPtr,$name);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new mlt_color($r);
		}
		return $r;
	}

	function anim_get($name,$position,$length=0) {
		return Properties_anim_get($this->_cPtr,$name,$position,$length);
	}

	function anim_get_int($name,$position,$length=0) {
		return Properties_anim_get_int($this->_cPtr,$name,$position,$length);
	}

	function anim_get_double($name,$position,$length=0) {
		return Properties_anim_get_double($this->_cPtr,$name,$position,$length);
	}

	function get_rect($name) {
		$r=Properties_get_rect($this->_cPtr,$name);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new mlt_rect($r);
		}
		return $r;
	}

	function anim_set($name,$value,$position,$length=null,$keyframe_type=null) {
		switch (func_num_args()) {
		case 3: $r=Properties_anim_set($this->_cPtr,$name,$value,$position); break;
		case 4: $r=Properties_anim_set($this->_cPtr,$name,$value,$position,$length); break;
		default: $r=Properties_anim_set($this->_cPtr,$name,$value,$position,$length,$keyframe_type);
		}
		return $r;
	}

	function anim_get_rect($name,$position,$length=0) {
		$r=Properties_anim_get_rect($this->_cPtr,$name,$position,$length);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new mlt_rect($r);
		}
		return $r;
	}

	function get_animation($name) {
		return Properties_get_animation($this->_cPtr,$name);
	}

	function get_anim($name) {
		$r=Properties_get_anim($this->_cPtr,$name);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Animation($r);
		}
		return $r;
	}

	function is_anim($name) {
		return Properties_is_anim($this->_cPtr,$name);
	}

	function set($name,$value_or_x_or_properties,$size_or_y=null,$destroy_or_w=null,$serial_or_h=null,$opacity=null) {
		switch (func_num_args()) {
		case 2: $r=Properties_set($this->_cPtr,$name,$value_or_x_or_properties); break;
		case 3: $r=Properties_set($this->_cPtr,$name,$value_or_x_or_properties,$size_or_y); break;
		case 4: $r=Properties_set($this->_cPtr,$name,$value_or_x_or_properties,$size_or_y,$destroy_or_w); break;
		case 5: $r=Properties_set($this->_cPtr,$name,$value_or_x_or_properties,$size_or_y,$destroy_or_w,$serial_or_h); break;
		default: $r=Properties_set($this->_cPtr,$name,$value_or_x_or_properties,$size_or_y,$destroy_or_w,$serial_or_h,$opacity);
		}
		return $r;
	}

	function get_props($name) {
		$r=Properties_get_props($this->_cPtr,$name);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function get_props_at($index) {
		$r=Properties_get_props_at($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}
}

class Frame extends Properties {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Properties::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Properties::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Properties::__isset($var);
	}

	function __construct($frame=null) {
		if (is_resource($frame) && get_resource_type($frame) === '_p_Mlt__Frame') {
			$this->_cPtr=$frame;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Frame(); break;
		default: $this->_cPtr=new_Frame($frame);
		}
	}

	function __assign__($frame) {
		$r=Frame___assign__($this->_cPtr,$frame);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Frame($r);
		}
		return $r;
	}

	function get_frame() {
		return Frame_get_frame($this->_cPtr);
	}

	function get_properties() {
		return Frame_get_properties($this->_cPtr);
	}

	function get_image($format,$w,$h,$writable=0) {
		return Frame_get_image($this->_cPtr,$format,$w,$h,$writable);
	}

	function fetch_image($format,$w,$h,$writable=0) {
		return Frame_fetch_image($this->_cPtr,$format,$w,$h,$writable);
	}

	function get_audio($format,$frequency,$channels,$samples) {
		return Frame_get_audio($this->_cPtr,$format,$frequency,$channels,$samples);
	}

	function get_waveform($w,$h) {
		return Frame_get_waveform($this->_cPtr,$w,$h);
	}

	function get_original_producer() {
		$r=Frame_get_original_producer($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function get_position() {
		return Frame_get_position($this->_cPtr);
	}

	function get_unique_properties($service) {
		return Frame_get_unique_properties($this->_cPtr,$service);
	}

	function set_image($image,$size,$destroy) {
		return Frame_set_image($this->_cPtr,$image,$size,$destroy);
	}

	function set_alpha($alpha,$size,$destroy) {
		return Frame_set_alpha($this->_cPtr,$alpha,$size,$destroy);
	}
}

class Service extends Properties {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Properties::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Properties::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Properties::__isset($var);
	}

	function __construct($service=null) {
		if (is_resource($service) && get_resource_type($service) === '_p_Mlt__Service') {
			$this->_cPtr=$service;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Service(); break;
		default: $this->_cPtr=new_Service($service);
		}
	}

	function get_service() {
		return Service_get_service($this->_cPtr);
	}

	function lock() {
		Service_lock($this->_cPtr);
	}

	function unlock() {
		Service_unlock($this->_cPtr);
	}

	function get_properties() {
		return Service_get_properties($this->_cPtr);
	}

	function connect_producer($producer,$index=0) {
		return Service_connect_producer($this->_cPtr,$producer,$index);
	}

	function insert_producer($producer,$index=0) {
		return Service_insert_producer($this->_cPtr,$producer,$index);
	}

	function disconnect_producer($index=0) {
		return Service_disconnect_producer($this->_cPtr,$index);
	}

	function disconnect_all_producers() {
		return Service_disconnect_all_producers($this->_cPtr);
	}

	function consumer() {
		$r=Service_consumer($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Service($r);
		}
		return $r;
	}

	function producer() {
		$r=Service_producer($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Service($r);
		}
		return $r;
	}

	function profile() {
		$r=Service_profile($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Profile($r);
		}
		return $r;
	}

	function get_profile() {
		return Service_get_profile($this->_cPtr);
	}

	function get_frame($index=0) {
		$r=Service_get_frame($this->_cPtr,$index);
		if (!is_resource($r)) return $r;
		return new Frame($r);
	}

	function type() {
		return Service_type($this->_cPtr);
	}

	function attach($filter) {
		return Service_attach($this->_cPtr,$filter);
	}

	function detach($filter) {
		return Service_detach($this->_cPtr,$filter);
	}

	function filter_count() {
		return Service_filter_count($this->_cPtr);
	}

	function move_filter($from,$to) {
		return Service_move_filter($this->_cPtr,$from,$to);
	}

	function filter($index) {
		$r=Service_filter($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Filter($r);
		}
		return $r;
	}

	function set_profile($profile) {
		Service_set_profile($this->_cPtr,$profile);
	}
}

class Producer extends Service {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Service::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Service::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Service::__isset($var);
	}

	function __construct($profile_or_producer=null,$id=null,$service=null) {
		if (is_resource($profile_or_producer) && get_resource_type($profile_or_producer) === '_p_Mlt__Producer') {
			$this->_cPtr=$profile_or_producer;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Producer(); break;
		case 1: $this->_cPtr=new_Producer($profile_or_producer); break;
		case 2: $this->_cPtr=new_Producer($profile_or_producer,$id); break;
		default: $this->_cPtr=new_Producer($profile_or_producer,$id,$service);
		}
	}

	function get_producer() {
		return Producer_get_producer($this->_cPtr);
	}

	function parent() {
		$r=Producer_parent($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function get_parent() {
		return Producer_get_parent($this->_cPtr);
	}

	function get_service() {
		return Producer_get_service($this->_cPtr);
	}

	function seek($position_or_time) {
		return Producer_seek($this->_cPtr,$position_or_time);
	}

	function position() {
		return Producer_position($this->_cPtr);
	}

	function frame() {
		return Producer_frame($this->_cPtr);
	}

	function frame_time($arg1=null) {
		switch (func_num_args()) {
		case 0: $r=Producer_frame_time($this->_cPtr); break;
		default: $r=Producer_frame_time($this->_cPtr,$arg1);
		}
		return $r;
	}

	function set_speed($speed) {
		return Producer_set_speed($this->_cPtr,$speed);
	}

	function pause() {
		return Producer_pause($this->_cPtr);
	}

	function get_speed() {
		return Producer_get_speed($this->_cPtr);
	}

	function get_fps() {
		return Producer_get_fps($this->_cPtr);
	}

	function set_in_and_out($in,$out) {
		return Producer_set_in_and_out($this->_cPtr,$in,$out);
	}

	function get_in() {
		return Producer_get_in($this->_cPtr);
	}

	function get_out() {
		return Producer_get_out($this->_cPtr);
	}

	function get_length() {
		return Producer_get_length($this->_cPtr);
	}

	function get_length_time($arg1=null) {
		switch (func_num_args()) {
		case 0: $r=Producer_get_length_time($this->_cPtr); break;
		default: $r=Producer_get_length_time($this->_cPtr,$arg1);
		}
		return $r;
	}

	function get_playtime() {
		return Producer_get_playtime($this->_cPtr);
	}

	function cut($in=0,$out=-1) {
		$r=Producer_cut($this->_cPtr,$in,$out);
		if (!is_resource($r)) return $r;
		return new Producer($r);
	}

	function is_cut() {
		return Producer_is_cut($this->_cPtr);
	}

	function is_blank() {
		return Producer_is_blank($this->_cPtr);
	}

	function same_clip($that) {
		return Producer_same_clip($this->_cPtr,$that);
	}

	function runs_into($that) {
		return Producer_runs_into($this->_cPtr,$that);
	}

	function optimise() {
		Producer_optimise($this->_cPtr);
	}

	function clear() {
		return Producer_clear($this->_cPtr);
	}

	function get_creation_time() {
		return Producer_get_creation_time($this->_cPtr);
	}

	function set_creation_time($creation_time) {
		Producer_set_creation_time($this->_cPtr,$creation_time);
	}
}

class Profile {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($name_or_properties_or_profile=null) {
		if (is_resource($name_or_properties_or_profile) && get_resource_type($name_or_properties_or_profile) === '_p_Mlt__Profile') {
			$this->_cPtr=$name_or_properties_or_profile;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Profile(); break;
		default: $this->_cPtr=new_Profile($name_or_properties_or_profile);
		}
	}

	function is_valid() {
		return Profile_is_valid($this->_cPtr);
	}

	function get_profile() {
		return Profile_get_profile($this->_cPtr);
	}

	function description() {
		return Profile_description($this->_cPtr);
	}

	function frame_rate_num() {
		return Profile_frame_rate_num($this->_cPtr);
	}

	function frame_rate_den() {
		return Profile_frame_rate_den($this->_cPtr);
	}

	function fps() {
		return Profile_fps($this->_cPtr);
	}

	function width() {
		return Profile_width($this->_cPtr);
	}

	function height() {
		return Profile_height($this->_cPtr);
	}

	function progressive() {
		return Profile_progressive($this->_cPtr);
	}

	function sample_aspect_num() {
		return Profile_sample_aspect_num($this->_cPtr);
	}

	function sample_aspect_den() {
		return Profile_sample_aspect_den($this->_cPtr);
	}

	function sar() {
		return Profile_sar($this->_cPtr);
	}

	function display_aspect_num() {
		return Profile_display_aspect_num($this->_cPtr);
	}

	function display_aspect_den() {
		return Profile_display_aspect_den($this->_cPtr);
	}

	function dar() {
		return Profile_dar($this->_cPtr);
	}

	function is_explicit() {
		return Profile_is_explicit($this->_cPtr);
	}

	function colorspace() {
		return Profile_colorspace($this->_cPtr);
	}

	static function list() {
		$r=Profile_list();
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Properties($r);
		}
		return $r;
	}

	function from_producer($producer) {
		Profile_from_producer($this->_cPtr,$producer);
	}

	function set_width($width) {
		Profile_set_width($this->_cPtr,$width);
	}

	function set_height($height) {
		Profile_set_height($this->_cPtr,$height);
	}

	function set_sample_aspect($numerator,$denominator) {
		Profile_set_sample_aspect($this->_cPtr,$numerator,$denominator);
	}

	function set_display_aspect($numerator,$denominator) {
		Profile_set_display_aspect($this->_cPtr,$numerator,$denominator);
	}

	function set_progressive($progressive) {
		Profile_set_progressive($this->_cPtr,$progressive);
	}

	function set_colorspace($colorspace) {
		Profile_set_colorspace($this->_cPtr,$colorspace);
	}

	function set_frame_rate($numerator,$denominator) {
		Profile_set_frame_rate($this->_cPtr,$numerator,$denominator);
	}

	function set_explicit($boolean) {
		Profile_set_explicit($this->_cPtr,$boolean);
	}

	function scale_width($width) {
		return Profile_scale_width($this->_cPtr,$width);
	}

	function scale_height($height) {
		return Profile_scale_height($this->_cPtr,$height);
	}
}

class ClipInfo {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'ClipInfo_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'producer') return new Producer(ClipInfo_producer_get($this->_cPtr));
		if ($var === 'cut') return new Producer(ClipInfo_cut_get($this->_cPtr));
		$func = 'ClipInfo_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('ClipInfo_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($info=null) {
		if (is_resource($info) && get_resource_type($info) === '_p_Mlt__ClipInfo') {
			$this->_cPtr=$info;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_ClipInfo(); break;
		default: $this->_cPtr=new_ClipInfo($info);
		}
	}

	function update($info) {
		ClipInfo_update($this->_cPtr,$info);
	}
}

class Playlist extends Producer {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Producer::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Producer::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Producer::__isset($var);
	}

	function __construct($profile_or_playlist=null) {
		if (is_resource($profile_or_playlist) && get_resource_type($profile_or_playlist) === '_p_Mlt__Playlist') {
			$this->_cPtr=$profile_or_playlist;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Playlist(); break;
		default: $this->_cPtr=new_Playlist($profile_or_playlist);
		}
	}

	function get_playlist() {
		return Playlist_get_playlist($this->_cPtr);
	}

	function get_producer() {
		return Playlist_get_producer($this->_cPtr);
	}

	function count() {
		return Playlist_count($this->_cPtr);
	}

	function clear() {
		return Playlist_clear($this->_cPtr);
	}

	function append($producer,$in=-1,$out=-1) {
		return Playlist_append($this->_cPtr,$producer,$in,$out);
	}

	function blank($out_or_length) {
		return Playlist_blank($this->_cPtr,$out_or_length);
	}

	function clip($whence,$index) {
		return Playlist_clip($this->_cPtr,$whence,$index);
	}

	function current_clip() {
		return Playlist_current_clip($this->_cPtr);
	}

	function current() {
		$r=Playlist_current($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function clip_info($index,$info=null) {
		$r=Playlist_clip_info($this->_cPtr,$index,$info);
		if (!is_resource($r)) return $r;
		return new ClipInfo($r);
	}

	static function delete_clip_info($info) {
		Playlist_delete_clip_info($info);
	}

	function insert($producer,$where,$in=-1,$out=-1) {
		return Playlist_insert($this->_cPtr,$producer,$where,$in,$out);
	}

	function remove($where) {
		return Playlist_remove($this->_cPtr,$where);
	}

	function move($from,$to) {
		return Playlist_move($this->_cPtr,$from,$to);
	}

	function reorder($indices) {
		return Playlist_reorder($this->_cPtr,$indices);
	}

	function resize_clip($clip,$in,$out) {
		return Playlist_resize_clip($this->_cPtr,$clip,$in,$out);
	}

	function split($clip,$position) {
		return Playlist_split($this->_cPtr,$clip,$position);
	}

	function split_at($position,$left=true) {
		return Playlist_split_at($this->_cPtr,$position,$left);
	}

	function join($clip,$count=1,$merge=1) {
		return Playlist_join($this->_cPtr,$clip,$count,$merge);
	}

	function mix($clip,$length,$transition=null) {
		return Playlist_mix($this->_cPtr,$clip,$length,$transition);
	}

	function mix_in($clip,$length) {
		return Playlist_mix_in($this->_cPtr,$clip,$length);
	}

	function mix_out($clip,$length) {
		return Playlist_mix_out($this->_cPtr,$clip,$length);
	}

	function mix_add($clip,$transition) {
		return Playlist_mix_add($this->_cPtr,$clip,$transition);
	}

	function repeat($clip,$count) {
		return Playlist_repeat($this->_cPtr,$clip,$count);
	}

	function get_clip($clip) {
		$r=Playlist_get_clip($this->_cPtr,$clip);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function get_clip_at($position) {
		$r=Playlist_get_clip_at($this->_cPtr,$position);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function get_clip_index_at($position) {
		return Playlist_get_clip_index_at($this->_cPtr,$position);
	}

	function is_mix($clip) {
		return Playlist_is_mix($this->_cPtr,$clip);
	}

	function is_blank($clip) {
		return Playlist_is_blank($this->_cPtr,$clip);
	}

	function is_blank_at($position) {
		return Playlist_is_blank_at($this->_cPtr,$position);
	}

	function consolidate_blanks($keep_length=0) {
		Playlist_consolidate_blanks($this->_cPtr,$keep_length);
	}

	function replace_with_blank($clip) {
		$r=Playlist_replace_with_blank($this->_cPtr,$clip);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function insert_blank($clip,$out) {
		Playlist_insert_blank($this->_cPtr,$clip,$out);
	}

	function pad_blanks($position,$length,$find=0) {
		Playlist_pad_blanks($this->_cPtr,$position,$length,$find);
	}

	function insert_at($position,$producer,$mode=0) {
		$r=Playlist_insert_at($this->_cPtr,$position,$producer,$mode);
		return $r;
	}

	function clip_start($clip) {
		return Playlist_clip_start($this->_cPtr,$clip);
	}

	function clip_length($clip) {
		return Playlist_clip_length($this->_cPtr,$clip);
	}

	function blanks_from($clip,$bounded=0) {
		return Playlist_blanks_from($this->_cPtr,$clip,$bounded);
	}

	function remove_region($position,$length) {
		return Playlist_remove_region($this->_cPtr,$position,$length);
	}
}

class Consumer extends Service {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Service::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Service::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Service::__isset($var);
	}

	function __construct($profile_or_consumer=null,$id=null,$service=null) {
		if (is_resource($profile_or_consumer) && get_resource_type($profile_or_consumer) === '_p_Mlt__Consumer') {
			$this->_cPtr=$profile_or_consumer;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Consumer(); break;
		case 1: $this->_cPtr=new_Consumer($profile_or_consumer); break;
		case 2: $this->_cPtr=new_Consumer($profile_or_consumer,$id); break;
		default: $this->_cPtr=new_Consumer($profile_or_consumer,$id,$service);
		}
	}

	function get_consumer() {
		return Consumer_get_consumer($this->_cPtr);
	}

	function get_service() {
		return Consumer_get_service($this->_cPtr);
	}

	function connect($service) {
		return Consumer_connect($this->_cPtr,$service);
	}

	function run() {
		return Consumer_run($this->_cPtr);
	}

	function start() {
		return Consumer_start($this->_cPtr);
	}

	function purge() {
		Consumer_purge($this->_cPtr);
	}

	function stop() {
		return Consumer_stop($this->_cPtr);
	}

	function is_stopped() {
		return Consumer_is_stopped($this->_cPtr);
	}

	function position() {
		return Consumer_position($this->_cPtr);
	}
}

class Filter extends Service {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Service::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Service::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Service::__isset($var);
	}

	function __construct($profile_or_filter=null,$id=null,$service=null) {
		if (is_resource($profile_or_filter) && get_resource_type($profile_or_filter) === '_p_Mlt__Filter') {
			$this->_cPtr=$profile_or_filter;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Filter(); break;
		case 1: $this->_cPtr=new_Filter($profile_or_filter); break;
		case 2: $this->_cPtr=new_Filter($profile_or_filter,$id); break;
		default: $this->_cPtr=new_Filter($profile_or_filter,$id,$service);
		}
	}

	function get_filter() {
		return Filter_get_filter($this->_cPtr);
	}

	function get_service() {
		return Filter_get_service($this->_cPtr);
	}

	function connect($service,$index=0) {
		return Filter_connect($this->_cPtr,$service,$index);
	}

	function set_in_and_out($in,$out) {
		Filter_set_in_and_out($this->_cPtr,$in,$out);
	}

	function get_in() {
		return Filter_get_in($this->_cPtr);
	}

	function get_out() {
		return Filter_get_out($this->_cPtr);
	}

	function get_length() {
		return Filter_get_length($this->_cPtr);
	}

	function get_length2($frame) {
		return Filter_get_length2($this->_cPtr,$frame);
	}

	function get_track() {
		return Filter_get_track($this->_cPtr);
	}

	function get_position($frame) {
		return Filter_get_position($this->_cPtr,$frame);
	}

	function get_progress($frame) {
		return Filter_get_progress($this->_cPtr,$frame);
	}

	function process($frame) {
		Filter_process($this->_cPtr,$frame);
	}
}

class Transition extends Service {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Service::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Service::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Service::__isset($var);
	}

	function __construct($profile_or_transition=null,$id=null,$arg=null) {
		if (is_resource($profile_or_transition) && get_resource_type($profile_or_transition) === '_p_Mlt__Transition') {
			$this->_cPtr=$profile_or_transition;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Transition(); break;
		case 1: $this->_cPtr=new_Transition($profile_or_transition); break;
		case 2: $this->_cPtr=new_Transition($profile_or_transition,$id); break;
		default: $this->_cPtr=new_Transition($profile_or_transition,$id,$arg);
		}
	}

	function get_transition() {
		return Transition_get_transition($this->_cPtr);
	}

	function get_service() {
		return Transition_get_service($this->_cPtr);
	}

	function set_in_and_out($in,$out) {
		Transition_set_in_and_out($this->_cPtr,$in,$out);
	}

	function set_tracks($a_track,$b_track) {
		Transition_set_tracks($this->_cPtr,$a_track,$b_track);
	}

	function connect($producer_or_service,$a_track,$b_track) {
		return Transition_connect($this->_cPtr,$producer_or_service,$a_track,$b_track);
	}

	function get_a_track() {
		return Transition_get_a_track($this->_cPtr);
	}

	function get_b_track() {
		return Transition_get_b_track($this->_cPtr);
	}

	function get_in() {
		return Transition_get_in($this->_cPtr);
	}

	function get_out() {
		return Transition_get_out($this->_cPtr);
	}

	function get_length() {
		return Transition_get_length($this->_cPtr);
	}

	function get_position($frame) {
		return Transition_get_position($this->_cPtr,$frame);
	}

	function get_progress($frame) {
		return Transition_get_progress($this->_cPtr,$frame);
	}

	function get_progress_delta($frame) {
		return Transition_get_progress_delta($this->_cPtr,$frame);
	}
}

class Multitrack extends Producer {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Producer::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Producer::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Producer::__isset($var);
	}

	function __construct($multitrack) {
		if (is_resource($multitrack) && get_resource_type($multitrack) === '_p_Mlt__Multitrack') {
			$this->_cPtr=$multitrack;
			return;
		}
		$this->_cPtr=new_Multitrack($multitrack);
	}

	function get_multitrack() {
		return Multitrack_get_multitrack($this->_cPtr);
	}

	function get_producer() {
		return Multitrack_get_producer($this->_cPtr);
	}

	function connect($producer,$index) {
		return Multitrack_connect($this->_cPtr,$producer,$index);
	}

	function insert($producer,$index) {
		return Multitrack_insert($this->_cPtr,$producer,$index);
	}

	function disconnect($index) {
		return Multitrack_disconnect($this->_cPtr,$index);
	}

	function clip($whence,$index) {
		return Multitrack_clip($this->_cPtr,$whence,$index);
	}

	function count() {
		return Multitrack_count($this->_cPtr);
	}

	function track($index) {
		$r=Multitrack_track($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function refresh() {
		Multitrack_refresh($this->_cPtr);
	}
}

class Field extends Service {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Service::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Service::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Service::__isset($var);
	}

	function __construct($field) {
		if (is_resource($field) && get_resource_type($field) === '_p_Mlt__Field') {
			$this->_cPtr=$field;
			return;
		}
		$this->_cPtr=new_Field($field);
	}

	function get_field() {
		return Field_get_field($this->_cPtr);
	}

	function get_service() {
		return Field_get_service($this->_cPtr);
	}

	function plant_filter($filter,$track=0) {
		return Field_plant_filter($this->_cPtr,$filter,$track);
	}

	function plant_transition($transition,$a_track=0,$b_track=1) {
		return Field_plant_transition($this->_cPtr,$transition,$a_track,$b_track);
	}

	function disconnect_service($service) {
		Field_disconnect_service($this->_cPtr,$service);
	}
}

class Tractor extends Producer {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Producer::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Producer::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Producer::__isset($var);
	}

	function __construct($profile_or_tractor=null,$id=null,$arg=null) {
		if (is_resource($profile_or_tractor) && get_resource_type($profile_or_tractor) === '_p_Mlt__Tractor') {
			$this->_cPtr=$profile_or_tractor;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Tractor(); break;
		case 1: $this->_cPtr=new_Tractor($profile_or_tractor); break;
		case 2: $this->_cPtr=new_Tractor($profile_or_tractor,$id); break;
		default: $this->_cPtr=new_Tractor($profile_or_tractor,$id,$arg);
		}
	}

	function get_tractor() {
		return Tractor_get_tractor($this->_cPtr);
	}

	function get_producer() {
		return Tractor_get_producer($this->_cPtr);
	}

	function multitrack() {
		$r=Tractor_multitrack($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Multitrack($r);
		}
		return $r;
	}

	function field() {
		$r=Tractor_field($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Field($r);
		}
		return $r;
	}

	function refresh() {
		Tractor_refresh($this->_cPtr);
	}

	function set_track($producer,$index) {
		return Tractor_set_track($this->_cPtr,$producer,$index);
	}

	function insert_track($producer,$index) {
		return Tractor_insert_track($this->_cPtr,$producer,$index);
	}

	function remove_track($index) {
		return Tractor_remove_track($this->_cPtr,$index);
	}

	function track($index) {
		$r=Tractor_track($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Producer($r);
		}
		return $r;
	}

	function count() {
		return Tractor_count($this->_cPtr);
	}

	function plant_transition($transition,$a_track=0,$b_track=1) {
		Tractor_plant_transition($this->_cPtr,$transition,$a_track,$b_track);
	}

	function plant_filter($filter,$track=0) {
		Tractor_plant_filter($this->_cPtr,$filter,$track);
	}

	function locate_cut($producer,$track,$cut) {
		return Tractor_locate_cut($this->_cPtr,$producer,$track,$cut);
	}

	function connect($producer) {
		return Tractor_connect($this->_cPtr,$producer);
	}
}

class Parser extends Properties {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Properties::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Properties::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Properties::__isset($var);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_Mlt__Parser') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_Parser();
	}

	function start($service) {
		return Parser_start($this->_cPtr,$service);
	}

	function get_properties() {
		return Parser_get_properties($this->_cPtr);
	}

	function on_invalid($object) {
		return Parser_on_invalid($this->_cPtr,$object);
	}

	function on_unknown($object) {
		return Parser_on_unknown($this->_cPtr,$object);
	}

	function on_start_producer($object) {
		return Parser_on_start_producer($this->_cPtr,$object);
	}

	function on_end_producer($object) {
		return Parser_on_end_producer($this->_cPtr,$object);
	}

	function on_start_playlist($object) {
		return Parser_on_start_playlist($this->_cPtr,$object);
	}

	function on_end_playlist($object) {
		return Parser_on_end_playlist($this->_cPtr,$object);
	}

	function on_start_tractor($object) {
		return Parser_on_start_tractor($this->_cPtr,$object);
	}

	function on_end_tractor($object) {
		return Parser_on_end_tractor($this->_cPtr,$object);
	}

	function on_start_multitrack($object) {
		return Parser_on_start_multitrack($this->_cPtr,$object);
	}

	function on_end_multitrack($object) {
		return Parser_on_end_multitrack($this->_cPtr,$object);
	}

	function on_start_track() {
		return Parser_on_start_track($this->_cPtr);
	}

	function on_end_track() {
		return Parser_on_end_track($this->_cPtr);
	}

	function on_start_filter($object) {
		return Parser_on_start_filter($this->_cPtr,$object);
	}

	function on_end_filter($object) {
		return Parser_on_end_filter($this->_cPtr,$object);
	}

	function on_start_transition($object) {
		return Parser_on_start_transition($this->_cPtr,$object);
	}

	function on_end_transition($object) {
		return Parser_on_end_transition($this->_cPtr,$object);
	}

	function on_start_chain($object) {
		return Parser_on_start_chain($this->_cPtr,$object);
	}

	function on_end_chain($object) {
		return Parser_on_end_chain($this->_cPtr,$object);
	}

	function on_start_link($object) {
		return Parser_on_start_link($this->_cPtr,$object);
	}

	function on_end_link($object) {
		return Parser_on_end_link($this->_cPtr,$object);
	}
}

class FilteredConsumer extends Consumer {
	public $_cPtr=null;

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		Consumer::__set($var,$value);
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return Consumer::__get($var);
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return Consumer::__isset($var);
	}

	function __construct($profile_or_consumer,$id=null,$arg=null) {
		if (is_resource($profile_or_consumer) && get_resource_type($profile_or_consumer) === '_p_Mlt__FilteredConsumer') {
			$this->_cPtr=$profile_or_consumer;
			return;
		}
		switch (func_num_args()) {
		case 1: $this->_cPtr=new_FilteredConsumer($profile_or_consumer); break;
		case 2: $this->_cPtr=new_FilteredConsumer($profile_or_consumer,$id); break;
		default: $this->_cPtr=new_FilteredConsumer($profile_or_consumer,$id,$arg);
		}
	}

	function connect($service) {
		return FilteredConsumer_connect($this->_cPtr,$service);
	}

	function attach($filter) {
		return FilteredConsumer_attach($this->_cPtr,$filter);
	}

	function last($filter) {
		return FilteredConsumer_last($this->_cPtr,$filter);
	}

	function detach($filter) {
		return FilteredConsumer_detach($this->_cPtr,$filter);
	}
}

class Animation {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mlt_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mlt_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($animation=null) {
		if (is_resource($animation) && get_resource_type($animation) === '_p_Mlt__Animation') {
			$this->_cPtr=$animation;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_Animation(); break;
		default: $this->_cPtr=new_Animation($animation);
		}
	}

	function is_valid() {
		return Animation_is_valid($this->_cPtr);
	}

	function get_animation() {
		return Animation_get_animation($this->_cPtr);
	}

	function __assign__($arg1) {
		$r=Animation___assign__($this->_cPtr,$arg1);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new Animation($r);
		}
		return $r;
	}

	function length() {
		return Animation_length($this->_cPtr);
	}

	function get_item($position,$is_key,$arg3) {
		return Animation_get_item($this->_cPtr,$position,$is_key,$arg3);
	}

	function is_key($position) {
		return Animation_is_key($this->_cPtr,$position);
	}

	function keyframe_type($position) {
		return Animation_keyframe_type($this->_cPtr,$position);
	}

	function next_key($position) {
		return Animation_next_key($this->_cPtr,$position);
	}

	function previous_key($position) {
		return Animation_previous_key($this->_cPtr,$position);
	}

	function key_count() {
		return Animation_key_count($this->_cPtr);
	}

	function key_get($index,$frame,$arg3) {
		return Animation_key_get($this->_cPtr,$index,$frame,$arg3);
	}

	function key_get_frame($index) {
		return Animation_key_get_frame($this->_cPtr,$index);
	}

	function key_get_type($index) {
		return Animation_key_get_type($this->_cPtr,$index);
	}

	function key_set_type($index,$type) {
		return Animation_key_set_type($this->_cPtr,$index,$type);
	}

	function key_set_frame($index,$frame) {
		return Animation_key_set_frame($this->_cPtr,$index,$frame);
	}

	function shift_frames($shift) {
		Animation_shift_frames($this->_cPtr,$shift);
	}

	function set_length($length) {
		Animation_set_length($this->_cPtr,$length);
	}

	function remove($position) {
		return Animation_remove($this->_cPtr,$position);
	}

	function interpolate() {
		Animation_interpolate($this->_cPtr);
	}

	function serialize_cut($in_or_format=null,$out_or_in=null,$out=null) {
		switch (func_num_args()) {
		case 0: $r=Animation_serialize_cut($this->_cPtr); break;
		case 1: $r=Animation_serialize_cut($this->_cPtr,$in_or_format); break;
		case 2: $r=Animation_serialize_cut($this->_cPtr,$in_or_format,$out_or_in); break;
		default: $r=Animation_serialize_cut($this->_cPtr,$in_or_format,$out_or_in,$out);
		}
		return $r;
	}
}


