MLT  7.28.0
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
mlt_producer_s Struct Reference

Producer abstract service class. More...

#include <mlt_producer.h>

Inheritance diagram for mlt_producer_s:
mlt_service_s mlt_properties_s mlt_chain_s mlt_link_s mlt_multitrack_s mlt_playlist_s mlt_tractor_s

Public Member Functions

int mlt_producer_attach (mlt_producer self, mlt_filter filter)
 Attach a filter. More...
 
int mlt_producer_clear (mlt_producer self)
 Physically reduce the producer (typically a cut) to a 0 length. More...
 
void mlt_producer_close (mlt_producer self)
 Close the producer. More...
 
mlt_producer mlt_producer_cut (mlt_producer self, int in, int out)
 Create a cut of this producer. More...
 
mlt_producer mlt_producer_cut_parent (mlt_producer self)
 Obtain the parent producer. More...
 
int mlt_producer_detach (mlt_producer self, mlt_filter filter)
 Detach a filter. More...
 
mlt_filter mlt_producer_filter (mlt_producer self, int index)
 Retrieve a filter. More...
 
mlt_position mlt_producer_frame (mlt_producer self)
 Get the current position (relative to start of producer). More...
 
char * mlt_producer_frame_time (mlt_producer self, mlt_time_format format)
 Get the current position (relative to start of producer) as a time string. More...
 
int64_t mlt_producer_get_creation_time (mlt_producer self)
 Get the creation time for the producer. More...
 
double mlt_producer_get_fps (mlt_producer self)
 Get the frames per second. More...
 
mlt_position mlt_producer_get_in (mlt_producer self)
 Get the in point. More...
 
mlt_position mlt_producer_get_length (mlt_producer self)
 Get the total, unedited length of the producer. More...
 
char * mlt_producer_get_length_time (mlt_producer self, mlt_time_format format)
 Get the total, unedited length of the producer as a time string. More...
 
mlt_position mlt_producer_get_out (mlt_producer self)
 Get the out point. More...
 
mlt_position mlt_producer_get_playtime (mlt_producer self)
 Get the total play time. More...
 
double mlt_producer_get_speed (mlt_producer self)
 Get the playing speed. More...
 
int mlt_producer_init (mlt_producer self, void *child)
 Initialize a producer service. More...
 
int mlt_producer_is_blank (mlt_producer self)
 Determine if the producer is a blank. More...
 
int mlt_producer_is_cut (mlt_producer self)
 Determine if producer is a cut. More...
 
int mlt_producer_is_mix (mlt_producer self)
 Determine if producer is a mix. More...
 
mlt_producer mlt_producer_new (mlt_profile profile)
 Create and initialize a new producer. More...
 
int mlt_producer_optimise (mlt_producer self)
 Optimise for overlapping cuts from the same clip. More...
 
mlt_position mlt_producer_position (mlt_producer self)
 Get the current position (relative to in point). More...
 
void mlt_producer_prepare_next (mlt_producer self)
 Prepare for next frame. More...
 
int mlt_producer_probe (mlt_producer self)
 Probe the producer to publish metadata properties. More...
 
mlt_properties mlt_producer_properties (mlt_producer self)
 Get the producer properties. More...
 
int mlt_producer_seek (mlt_producer self, mlt_position position)
 Seek to a specified position. More...
 
int mlt_producer_seek_time (mlt_producer self, const char *time)
 Seek to a specified time string. More...
 
mlt_service mlt_producer_service (mlt_producer self)
 Get the parent service object. More...
 
void mlt_producer_set_creation_time (mlt_producer self, int64_t creation_time)
 Set the creation time for the producer. More...
 
int mlt_producer_set_in_and_out (mlt_producer self, mlt_position in, mlt_position out)
 Set the in and out points. More...
 
int mlt_producer_set_speed (mlt_producer self, double speed)
 Set the playing speed. More...
 
- Public Member Functions inherited from mlt_service_s
void mlt_service_apply_filters (mlt_service self, mlt_frame frame, int index)
 Recursively apply attached filters. More...
 
int mlt_service_attach (mlt_service self, mlt_filter filter)
 Attach a filter. More...
 
mlt_cache_item mlt_service_cache_get (mlt_service self, const char *name)
 Get an object from a service's cache. More...
 
int mlt_service_cache_get_size (mlt_service self, const char *name)
 Get the current maximum size of the named cache. More...
 
void mlt_service_cache_put (mlt_service self, const char *name, void *data, int size, mlt_destructor destructor)
 Put an object into a service's cache. More...
 
void mlt_service_cache_set_size (mlt_service self, const char *name, int size)
 Set the number of items to cache for the named cache. More...
 
void mlt_service_close (mlt_service self)
 Destroy a service. More...
 
int mlt_service_connect_producer (mlt_service self, mlt_service producer, int index)
 Connect a producer to the service. More...
 
mlt_service mlt_service_consumer (mlt_service self)
 Obtain the consumer a service is connected to. More...
 
int mlt_service_detach (mlt_service self, mlt_filter filter)
 Detach a filter. More...
 
int mlt_service_disconnect_all_producers (mlt_service self)
 Remove the all the attached producers. More...
 
int mlt_service_disconnect_producer (mlt_service self, int index)
 Remove the N-th producer. More...
 
mlt_filter mlt_service_filter (mlt_service self, int index)
 Retrieve an attached filter. More...
 
int mlt_service_filter_count (mlt_service self)
 Get the number of filters attached. More...
 
int mlt_service_get_frame (mlt_service self, mlt_frame_ptr frame, int index)
 Obtain a frame. More...
 
mlt_service mlt_service_get_producer (mlt_service self)
 Get the first connected producer. More...
 
mlt_service_type mlt_service_identify (mlt_service self)
 Identify the subclass of the service. More...
 
int mlt_service_init (mlt_service self, void *child)
 Initialize a service. More...
 
int mlt_service_insert_producer (mlt_service self, mlt_service producer, int index)
 Insert a producer connected to the service. More...
 
void mlt_service_lock (mlt_service self)
 Acquire a mutual exclusion lock on this service. More...
 
int mlt_service_move_filter (mlt_service self, int from, int to)
 Reorder the attached filters. More...
 
mlt_service mlt_service_producer (mlt_service self)
 Obtain the producer a service is connected to. More...
 
mlt_profile mlt_service_profile (mlt_service self)
 Retrieve the profile. More...
 
mlt_properties mlt_service_properties (mlt_service self)
 Return the properties object. More...
 
void mlt_service_set_profile (mlt_service self, mlt_profile profile)
 Set the profile for a service. More...
 
void mlt_service_unlock (mlt_service self)
 Release a mutual exclusion lock on this service. More...
 
- Public Member Functions inherited from mlt_properties_s
char * mlt_properties_anim_get (mlt_properties self, const char *name, int position, int length)
 Get a string value by name at a frame position. More...
 
mlt_color mlt_properties_anim_get_color (mlt_properties self, const char *name, int position, int length)
 Get a color associated to the name at a frame position. More...
 
double mlt_properties_anim_get_double (mlt_properties self, const char *name, int position, int length)
 Get a real number associated to the name at a frame position. More...
 
int mlt_properties_anim_get_int (mlt_properties self, const char *name, int position, int length)
 Get an integer associated to the name at a frame position. More...
 
mlt_rect mlt_properties_anim_get_rect (mlt_properties self, const char *name, int position, int length)
 Get a rectangle associated to the name at a frame position. More...
 
int mlt_properties_anim_set (mlt_properties self, const char *name, const char *value, int position, int length)
 Set a property to a string at a frame position. More...
 
int mlt_properties_anim_set_color (mlt_properties self, const char *name, mlt_color value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to an integer value by color at a frame position. More...
 
int mlt_properties_anim_set_double (mlt_properties self, const char *name, double value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to a real number at a frame position. More...
 
int mlt_properties_anim_set_int (mlt_properties self, const char *name, int value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to an integer value at a frame position. More...
 
int mlt_properties_anim_set_rect (mlt_properties self, const char *name, mlt_rect value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to a rectangle value at a frame position. More...
 
void mlt_properties_clear (mlt_properties self, const char *name)
 Remove the value for a property. More...
 
void mlt_properties_close (mlt_properties self)
 Close a properties object. More...
 
int mlt_properties_copy (mlt_properties self, mlt_properties that, const char *prefix)
 Copy all serializable properties that match a prefix to another properties object. More...
 
int mlt_properties_count (mlt_properties self)
 Return the number of items in the list. More...
 
void mlt_properties_debug (mlt_properties self, const char *title, FILE *output)
 Output the properties to a file handle. More...
 
int mlt_properties_dec_ref (mlt_properties self)
 Decrement the reference count. More...
 
int mlt_properties_dir_list (mlt_properties self, const char *dirname, const char *pattern, int sort)
 Get the contents of a directory. More...
 
void mlt_properties_dump (mlt_properties self, FILE *output)
 Dump the properties to a file handle. More...
 
int mlt_properties_exists (mlt_properties self, const char *name)
 Check if a property exists. More...
 
char * mlt_properties_frames_to_time (mlt_properties self, mlt_position frames, mlt_time_format format)
 Convert a frame count to a time string. More...
 
int mlt_properties_from_utf8 (mlt_properties properties, const char *name_from, const char *name_to)
 Convert UTF-8 property to the locale-defined encoding. More...
 
char * mlt_properties_get (mlt_properties self, const char *name)
 Get a string value by name. More...
 
mlt_animation mlt_properties_get_animation (mlt_properties self, const char *name)
 Get the animation associated to the name. More...
 
mlt_color mlt_properties_get_color (mlt_properties self, const char *name)
 Convert a numeric property to a tuple of color components. More...
 
void * mlt_properties_get_data (mlt_properties self, const char *name, int *length)
 Get a binary data value associated to the name. More...
 
void * mlt_properties_get_data_at (mlt_properties self, int index, int *size)
 Get a data value by index. More...
 
double mlt_properties_get_double (mlt_properties self, const char *name)
 Get a floating point value associated to the name. More...
 
int mlt_properties_get_int (mlt_properties self, const char *name)
 Get an integer associated to the name. More...
 
int64_t mlt_properties_get_int64 (mlt_properties self, const char *name)
 Get a 64-bit integer associated to the name. More...
 
const char * mlt_properties_get_lcnumeric (mlt_properties self)
 Get the numeric locale for this properties object. More...
 
char * mlt_properties_get_name (mlt_properties self, int index)
 Get a property name by index. More...
 
mlt_position mlt_properties_get_position (mlt_properties self, const char *name)
 Get a position value associated to the name. More...
 
mlt_properties mlt_properties_get_properties (mlt_properties self, const char *name)
 Get a nested properties object by name. More...
 
mlt_properties mlt_properties_get_properties_at (mlt_properties self, int index)
 Get a nested properties object by index. More...
 
mlt_rect mlt_properties_get_rect (mlt_properties self, const char *name)
 Get a rectangle associated to the name. More...
 
char * mlt_properties_get_time (mlt_properties self, const char *name, mlt_time_format format)
 Get a time string associated to the name. More...
 
char * mlt_properties_get_value (mlt_properties self, int index)
 Get a property's string value by index. More...
 
char * mlt_properties_get_value_tf (mlt_properties self, int index, mlt_time_format time_format)
 Get a property's string value by index (with time format). More...
 
int mlt_properties_inc_ref (mlt_properties self)
 Increment the reference count. More...
 
int mlt_properties_inherit (mlt_properties self, mlt_properties that)
 Copy all serializable properties to another properties list. More...
 
int mlt_properties_init (mlt_properties self, void *child)
 Initialize a properties object that was already allocated. More...
 
int mlt_properties_is_anim (mlt_properties self, const char *name)
 Check if a property is animated. More...
 
int mlt_properties_is_sequence (mlt_properties properties)
 Determine if the properties list is really just a sequence or ordered list. More...
 
mlt_properties mlt_properties_load (const char *filename)
 Create a properties object by reading a .properties text file. More...
 
void mlt_properties_lock (mlt_properties self)
 Protect a properties list against concurrent access. More...
 
void mlt_properties_mirror (mlt_properties self, mlt_properties that)
 Set a properties list to be a mirror copy of another. More...
 
mlt_properties mlt_properties_new ()
 Create a properties object. More...
 
int mlt_properties_parse (mlt_properties self, const char *namevalue)
 Set a value by parsing a name=value string. More...
 
mlt_properties mlt_properties_parse_yaml (const char *filename)
 Parse a YAML Tiny file by name. More...
 
int mlt_properties_pass (mlt_properties self, mlt_properties that, const char *prefix)
 Pass all serializable properties that match a prefix to another properties object. More...
 
int mlt_properties_pass_list (mlt_properties self, mlt_properties that, const char *list)
 Copy all properties specified in a comma-separated list to another properties list. More...
 
void mlt_properties_pass_property (mlt_properties self, mlt_properties that, const char *name)
 Copy a property to another properties list. More...
 
int mlt_properties_preset (mlt_properties self, const char *name)
 Set properties from a preset. More...
 
int mlt_properties_ref_count (mlt_properties self)
 Get the reference count. More...
 
int mlt_properties_rename (mlt_properties self, const char *source, const char *dest)
 Rename a property. More...
 
int mlt_properties_save (mlt_properties self, const char *filename)
 Save the properties to a file by name. More...
 
char * mlt_properties_serialise_yaml (mlt_properties self)
 Serialize a properties list as a string of YAML Tiny. More...
 
int mlt_properties_set (mlt_properties self, const char *name, const char *value)
 Set a property to a string. More...
 
int mlt_properties_set_color (mlt_properties self, const char *name, mlt_color color)
 Set a property to an integer value by color. More...
 
int mlt_properties_set_data (mlt_properties self, const char *name, void *value, int length, mlt_destructor destroy, mlt_serialiser serialise)
 Store binary data as a property. More...
 
int mlt_properties_set_double (mlt_properties self, const char *name, double value)
 Set a property to a floating point value. More...
 
int mlt_properties_set_int (mlt_properties self, const char *name, int value)
 Set a property to an integer value. More...
 
int mlt_properties_set_int64 (mlt_properties self, const char *name, int64_t value)
 Set a property to a 64-bit integer value. More...
 
int mlt_properties_set_lcnumeric (mlt_properties self, const char *locale)
 Set the numeric locale used for string/double conversions. More...
 
int mlt_properties_set_or_default (mlt_properties self, const char *name, const char *value, const char *def)
 Set or default a property to a string. More...
 
int mlt_properties_set_position (mlt_properties self, const char *name, mlt_position value)
 Set a property to a position value. More...
 
int mlt_properties_set_properties (mlt_properties self, const char *name, mlt_properties properties)
 Set a property to a nested properties object. More...
 
int mlt_properties_set_rect (mlt_properties self, const char *name, mlt_rect value)
 Set a property to a rectangle value. More...
 
int mlt_properties_set_string (mlt_properties self, const char *name, const char *value)
 Set a property to a string. More...
 
mlt_position mlt_properties_time_to_frames (mlt_properties self, const char *time)
 Convert a time string to a frame count. More...
 
void mlt_properties_unlock (mlt_properties self)
 End protecting a properties list against concurrent access. More...
 

Data Fields

mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 
int(* get_frame )(mlt_producer, mlt_frame_ptr, int)
 Get a frame of data (virtual function). More...
 
struct mlt_service_s parent
 A producer is a service. More...
 
int(* seek )(mlt_producer, mlt_position)
 Seek to a specified position (virtual function). More...
 
int(* set_in_and_out )(mlt_producer, mlt_position, mlt_position)
 Set the in and out points. More...
 
- Data Fields inherited from mlt_service_s
mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 
int(* get_frame )(mlt_service self, mlt_frame_ptr frame, int index)
 Get a frame of data (virtual function). More...
 
- Data Fields inherited from mlt_properties_s
mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 

Private Member Functions

static mlt_producer mlt_producer_clone (mlt_producer self)
 Clone a producer. More...
 
static void mlt_producer_property_changed (mlt_service owner, mlt_producer self, mlt_event_data event_data)
 Listener for property changes. More...
 
static void mlt_producer_service_changed (mlt_service owner, mlt_producer self)
 Listener for service changes. More...
 
static void mlt_producer_set_clones (mlt_producer self, int clones)
 Create clones. More...
 
static int producer_get_frame (mlt_service service, mlt_frame_ptr frame, int index)
 Get a frame. More...
 

Private Attributes

void * child
 the object of a subclass More...
 
void * local
 instance object More...
 

Detailed Description

Producer abstract service class.

A producer is a service that generates audio, video, and metadata. Some day it may also generate text (subtitles). This is not to say a producer "synthesizes," rather that is an origin of data within the service network - that could be through synthesis or reading a stream.

Event:
producer-changed either service-changed was fired or the timing of the producer changed
Property:

mlt_type the name of the service subclass, e.g. mlt_producer

mlt_service the name of a producer subclass

_position the current position of the play head, relative to the in point

_frame the current position of the play head, relative to the beginning of the resource

_speed the current speed factor, where 1.0 is normal

aspect_ratio sample aspect ratio

length the duration of the cut in frames

eof the end-of-file behavior, one of: pause, continue, loop

resource the file name, stream address, or the class name in angle brackets

_cut set if this producer is a "cut" producer

mlt_mix stores the data for a "mix" producer

_cut_parent holds a reference to the cut's parent producer

ignore_points Set this to temporarily disable the in and out points.

use_clone holds a reference to a clone's producer, as created by mlt_producer_optimise

_clone is the index of the clone in the list of clones stored on the clone's producer

_clones is the number of clones of the producer, as created by mlt_producer_optimise

_clone.{N} holds a reference to the N'th clone of the producer, as created by mlt_producer_optimise

meta.* holds metadata - there is a loose taxonomy to be defined

set.* holds properties to set on a frame produced

Environment Variable:
MLT_DEFAULT_PRODUCER_LENGTH - the default duration of the producer in frames, defaults to 15000. Most producers will set the producer length to something appropriate like the real duration of an audio or video clip. However, some other things like still images and generators do not have an intrinsic length besides one or infinity. Those producers tend to not override the default length and one expect the app or user to set the length. The default value of 15000 was chosen to provide something useful - not too long or short and convenient to simply set an out point without necessarily nedding to extend the length.
Todo:
define the media metadata taxonomy

Member Function Documentation

◆ mlt_producer_attach()

int mlt_producer_attach ( mlt_producer  self,
mlt_filter  filter 
)

Attach a filter.

Parameters
selfa producer
filterthe filter to attach
Returns
true if there was an error

◆ mlt_producer_clear()

int mlt_producer_clear ( mlt_producer  self)

Physically reduce the producer (typically a cut) to a 0 length.

Essentially, all 0 length cuts should be immediately removed by containers.

Parameters
selfa producer
Returns
false

◆ mlt_producer_clone()

static mlt_producer mlt_producer_clone ( mlt_producer  self)
private

Clone a producer.

Parameters
selfa producer
Returns
a new producer that is a copy of self
See also
mlt_producer_set_clones

◆ mlt_producer_close()

void mlt_producer_close ( mlt_producer  self)

Close the producer.

Destroys the producer and deallocates its resources managed by its properties list. This will call the close virtual function. Therefore, a subclass that defines its own close function should set its virtual close function to NULL prior to calling this to avoid circular calls.

Parameters
selfa producer

◆ mlt_producer_cut()

mlt_producer mlt_producer_cut ( mlt_producer  self,
int  in,
int  out 
)

Create a cut of this producer.

A "cut" is a portion of another (parent) producer.

Parameters
selfa producer
inthe beginning
outthe end
Returns
the new producer
Todo:
Expand on the value of a cut.

◆ mlt_producer_cut_parent()

mlt_producer mlt_producer_cut_parent ( mlt_producer  self)

Obtain the parent producer.

Parameters
selfa producer
Returns
either the parent producer if self is a "cut" producer or self otherwise.

◆ mlt_producer_detach()

int mlt_producer_detach ( mlt_producer  self,
mlt_filter  filter 
)

Detach a filter.

Parameters
selfa service
filterthe filter to detach
Returns
true if there was an error

◆ mlt_producer_filter()

mlt_filter mlt_producer_filter ( mlt_producer  self,
int  index 
)

Retrieve a filter.

Parameters
selfa service
indexwhich filter to retrieve
Returns
the filter or null if there was an error

◆ mlt_producer_frame()

mlt_position mlt_producer_frame ( mlt_producer  self)

Get the current position (relative to start of producer).

Parameters
selfa producer
Returns
the position of the "play head" regardless of the in point

◆ mlt_producer_frame_time()

char * mlt_producer_frame_time ( mlt_producer  self,
mlt_time_format  format 
)

Get the current position (relative to start of producer) as a time string.

Parameters
selfa producer
formatthe time value format
Returns
the position of the "play head" regardless of the in point

◆ mlt_producer_get_creation_time()

int64_t mlt_producer_get_creation_time ( mlt_producer  self)

Get the creation time for the producer.

The creation_time value is searched in the following order:

  • A "creation_time" property in ISO 8601 format (yyyy-mm-ddThh:mm:ss)
  • A "meta.attr.com.apple.quicktime.creationdate.markup" property in ISO 8601 format
  • A "meta.attr.creation_time.markup" property in ISO 8601 format
  • If the producer has a resource that is a file, the mtime of the file
Parameters
selfa producer
Returns
the creation time of the producer in seconds since the epoch

◆ mlt_producer_get_fps()

double mlt_producer_get_fps ( mlt_producer  self)

Get the frames per second.

This is determined by the producer's profile.

Parameters
selfa producer
Returns
the video refresh rate

◆ mlt_producer_get_in()

mlt_position mlt_producer_get_in ( mlt_producer  self)

Get the in point.

Parameters
selfa producer
Returns
the in point

◆ mlt_producer_get_length()

mlt_position mlt_producer_get_length ( mlt_producer  self)

Get the total, unedited length of the producer.

The value returned by a live streaming producer is unknown.

Parameters
selfa producer
Returns
the duration of the producer regardless of in and out points

◆ mlt_producer_get_length_time()

char * mlt_producer_get_length_time ( mlt_producer  self,
mlt_time_format  format 
)

Get the total, unedited length of the producer as a time string.

The value returned by a live streaming producer is unknown.

Parameters
selfa producer
formatthe time value format
Returns
the duration of the producer regardless of in and out points

◆ mlt_producer_get_out()

mlt_position mlt_producer_get_out ( mlt_producer  self)

Get the out point.

Parameters
selfa producer
Returns
the out point

◆ mlt_producer_get_playtime()

mlt_position mlt_producer_get_playtime ( mlt_producer  self)

Get the total play time.

Parameters
selfa producer
Returns
the playable (based on in and out points) duration

◆ mlt_producer_get_speed()

double mlt_producer_get_speed ( mlt_producer  self)

Get the playing speed.

Parameters
selfa producer
Returns
the speed as a relative factor (1.0 = normal)

◆ mlt_producer_init()

int mlt_producer_init ( mlt_producer  self,
void *  child 
)

Initialize a producer service.

Parameters
selfthe producer structure to initialize
childa pointer to the child object for the subclass
Returns
true if there was an error

◆ mlt_producer_is_blank()

int mlt_producer_is_blank ( mlt_producer  self)

Determine if the producer is a blank.

Blank producers should only appear as an item in a playlist.

Parameters
selfa producer
Returns
true if self is a "blank" producer
See also
mlt_playlist_insert_blank

◆ mlt_producer_is_cut()

int mlt_producer_is_cut ( mlt_producer  self)

Determine if producer is a cut.

Parameters
selfa producer
Returns
true if self is a "cut" producer
See also
mlt_producer_cut

◆ mlt_producer_is_mix()

int mlt_producer_is_mix ( mlt_producer  self)

Determine if producer is a mix.

Parameters
selfa producer
Returns
true if self is a "mix" producer
Todo:
Define a mix producer.

◆ mlt_producer_new()

mlt_producer mlt_producer_new ( mlt_profile  profile)

Create and initialize a new producer.

Returns
the new producer

◆ mlt_producer_optimise()

int mlt_producer_optimise ( mlt_producer  self)

Optimise for overlapping cuts from the same clip.

Todo:
learn more about this
Parameters
selfa producer
Returns
true if there was an error

◆ mlt_producer_position()

mlt_position mlt_producer_position ( mlt_producer  self)

Get the current position (relative to in point).

Parameters
selfa producer
Returns
the position of the "play head" relative to its beginning

◆ mlt_producer_prepare_next()

void mlt_producer_prepare_next ( mlt_producer  self)

Prepare for next frame.

Advance the play out position. If the speed is less than zero, it will move the play out position in the reverse direction.

Parameters
selfa producer

◆ mlt_producer_probe()

int mlt_producer_probe ( mlt_producer  self)

Probe the producer to publish metadata properties.

After this call the producer will publish meta.media properties

Parameters
selfa producer
Returns
true on error

◆ mlt_producer_properties()

mlt_properties mlt_producer_properties ( mlt_producer  self)

Get the producer properties.

Parameters
selfa producer
Returns
the producer's property list
See also
MLT_PRODUCER_PROPERTIES

◆ mlt_producer_property_changed()

static void mlt_producer_property_changed ( mlt_service  owner,
mlt_producer  self,
mlt_event_data  event_data 
)
private

Listener for property changes.

If the in, out, or length properties changed, fire a "producer-changed" event.

Parameters
ownera service (ignored)
selfthe producer
namethe property that changed

◆ mlt_producer_seek()

int mlt_producer_seek ( mlt_producer  self,
mlt_position  position 
)

Seek to a specified position.

Parameters
selfa producer
positionset the "play head" position of the producer
Returns
false
Todo:
Document how the properties affect behavior.
See also
mlt_producer_seek_time

◆ mlt_producer_seek_time()

int mlt_producer_seek_time ( mlt_producer  self,
const char *  time 
)

Seek to a specified time string.

Parameters
selfa producer
timeset the "play head" position of the producer to the time string
Returns
false
See also
mlt_producer_seek

◆ mlt_producer_service()

mlt_service mlt_producer_service ( mlt_producer  self)

Get the parent service object.

Parameters
selfa producer
Returns
the service parent class
See also
MLT_PRODUCER_SERVICE

◆ mlt_producer_service_changed()

static void mlt_producer_service_changed ( mlt_service  owner,
mlt_producer  self 
)
private

Listener for service changes.

Fires the "producer-changed" event.

Parameters
ownera service (ignored)
selfthe producer

◆ mlt_producer_set_clones()

static void mlt_producer_set_clones ( mlt_producer  self,
int  clones 
)
private

Create clones.

Parameters
selfa producer
clonesthe number of copies to make
See also
mlt_producer_optimise

◆ mlt_producer_set_creation_time()

void mlt_producer_set_creation_time ( mlt_producer  self,
int64_t  creation_time 
)

Set the creation time for the producer.

A "creation_time" property in ISO 8601 format (yyyy-mm-ddThh:mm:ss) will be applied to the producer.

Parameters
selfa producer
creation_timethe creation time of the producer in seconds since the epoch

◆ mlt_producer_set_in_and_out()

int mlt_producer_set_in_and_out ( mlt_producer  self,
mlt_position  in,
mlt_position  out 
)

Set the in and out points.

The in point is where play out should start relative to the natural start of the underlying file. The out point is where play out should end, also relative to the start of the underlying file. If the underlying resource is a live stream, then the in point is an offset relative to first usable sample.

Parameters
selfa producer
inthe relative starting time; a negative value is the same as 0
outthe relative ending time; a negative value is the same as length - 1
Returns
false

◆ mlt_producer_set_speed()

int mlt_producer_set_speed ( mlt_producer  self,
double  speed 
)

Set the playing speed.

Parameters
selfa producer
speedthe new speed as a relative factor (1.0 = normal)
Returns
true if error

◆ producer_get_frame()

static int producer_get_frame ( mlt_service  service,
mlt_frame_ptr  frame,
int  index 
)
private

Get a frame.

This is the implementation of the get_frame virtual function. It requests a new frame object from the actual producer for the current play out position. The producer and its filters can add information and operations to the frame object in their get_frame handlers.

Parameters
servicea service
[out]framea frame by reference
indexas determined by the actual producer
Returns
true if there was an error
Todo:
Learn more about the details and document how certain properties affect its behavior.

Field Documentation

◆ child

void* mlt_producer_s::child
private

the object of a subclass

◆ close

mlt_destructor mlt_producer_s::close

the destructor virtual function

◆ close_object

void* mlt_producer_s::close_object

the object supplied to the close virtual function

◆ get_frame

int(* mlt_producer_s::get_frame) (mlt_producer, mlt_frame_ptr, int)

Get a frame of data (virtual function).

Parameters
mlt_producera producer
mlt_frame_ptra frame pointer by reference
intan index
Returns
true if there was an error

◆ local

void* mlt_producer_s::local
private

instance object

◆ parent

struct mlt_service_s mlt_producer_s::parent

A producer is a service.

◆ seek

int(* mlt_producer_s::seek) (mlt_producer, mlt_position)

Seek to a specified position (virtual function).

Parameters
mlt_producera producer
positionset the "play head" position of the producer
Returns
false

◆ set_in_and_out

int(* mlt_producer_s::set_in_and_out) (mlt_producer, mlt_position, mlt_position)

Set the in and out points.

Parameters
mlt_producera producer
mlt_positionthe relative starting time; a negative value is the same as 0
mlt_positionthe relative ending time; a negative value is the same as length - 1
Returns
false

The documentation for this struct was generated from the following files: