mlt 0.7.6
Public Member Functions | Data Fields | Private Member Functions

mlt_filter_s Struct Reference

Filter abstract service class. More...

#include <mlt_filter.h>

Inheritance diagram for mlt_filter_s:
mlt_service_s mlt_properties_s

Public Member Functions

void mlt_filter_close (mlt_filter self)
 Close and destroy the filter.
int mlt_filter_connect (mlt_filter self, mlt_service producer, int index)
 Connect this filter to a producers track.
mlt_position mlt_filter_get_in (mlt_filter self)
 Get the in point.
mlt_position mlt_filter_get_length (mlt_filter self)
 Get the duration.
mlt_position mlt_filter_get_length2 (mlt_filter self, mlt_frame frame)
 Get the duration.
mlt_position mlt_filter_get_out (mlt_filter self)
 Get the out point.
mlt_position mlt_filter_get_position (mlt_filter self, mlt_frame frame)
 Get the position within the filter.
double mlt_filter_get_progress (mlt_filter self, mlt_frame frame)
 Get the percent complete.
int mlt_filter_get_track (mlt_filter self)
 Return the track that this filter is operating on.
int mlt_filter_init (mlt_filter self, void *child)
 Initialize a new filter.
mlt_filter mlt_filter_new ()
 Create a new filter and initialize it.
mlt_frame mlt_filter_process (mlt_filter self, mlt_frame frame)
 Process the frame.
mlt_properties mlt_filter_properties (mlt_filter self)
 Get the filter properties.
mlt_service mlt_filter_service (mlt_filter self)
 Get the service class interface.
void mlt_filter_set_in_and_out (mlt_filter self, mlt_position in, mlt_position out)
 Set the starting and ending time.

Data Fields

void * child
 Protected.
void(* close )(mlt_filter)
 public virtual
struct mlt_service_s parent
 We're implementing service here.
mlt_frame(* process )(mlt_filter, mlt_frame)
 protected filter method

Private Member Functions

static int filter_get_frame (mlt_service service, mlt_frame_ptr frame, int index)
 Get a frame from this filter.

Detailed Description

Filter abstract service class.

A filter is a service that may modify the output of a single producer.

Property:

track the index of the track of a multitrack on which the filter is applied

service a reference to the service to which this filter is attached. Currently this is not cleared when the filter is detached.


Member Function Documentation

static int filter_get_frame ( mlt_service  service,
mlt_frame_ptr  frame,
int  index 
) [private]

Get a frame from this filter.

Parameters:
servicea service
[out]framea frame by reference
indexas determined by the producer
Returns:
true on error
void mlt_filter_close ( mlt_filter  self)

Close and destroy the filter.

Parameters:
selfa filter
int mlt_filter_connect ( mlt_filter  self,
mlt_service  producer,
int  index 
)

Connect this filter to a producers track.

Note that a filter only operates on a single track, and by default it operates on the entirety of that track.

Parameters:
selfa filter
producerthe producer to which to connect this filter
indexwhich of potentially multiple producers to this service (0 based)
mlt_position mlt_filter_get_in ( mlt_filter  self)

Get the in point.

Parameters:
selfa filter
Returns:
the start time for the filter relative to the producer
mlt_position mlt_filter_get_length ( mlt_filter  self)

Get the duration.

Parameters:
selfa filter
Returns:
the duration or zero if unlimited
mlt_position mlt_filter_get_length2 ( mlt_filter  self,
mlt_frame  frame 
)

Get the duration.

This version works with filters with no explicit in and out by getting the length of the frame's producer.

Parameters:
selfa filter
framea frame from which to get its producer
Returns:
the duration or zero if unlimited
mlt_position mlt_filter_get_out ( mlt_filter  self)

Get the out point.

Parameters:
selfa filter
Returns:
the ending time for the filter relative to the producer
mlt_position mlt_filter_get_position ( mlt_filter  self,
mlt_frame  frame 
)

Get the position within the filter.

The position is relative to the in point. This will only be valid once mlt_filter_process is called.

Parameters:
selfa filter
framea frame
Returns:
the position
double mlt_filter_get_progress ( mlt_filter  self,
mlt_frame  frame 
)

Get the percent complete.

This will only be valid once mlt_filter_process is called.

Parameters:
selfa filter
framea frame
Returns:
the progress in the range 0.0 to 1.0
int mlt_filter_get_track ( mlt_filter  self)

Return the track that this filter is operating on.

Parameters:
selfa filter
Returns:
true on error
int mlt_filter_init ( mlt_filter  self,
void *  child 
)

Initialize a new filter.

Parameters:
selfa filter
childthe object of a subclass
Returns:
true if there was an error
mlt_filter mlt_filter_new ( )

Create a new filter and initialize it.

Returns:
a new filter
mlt_frame mlt_filter_process ( mlt_filter  self,
mlt_frame  frame 
)

Process the frame.

When fetching the frame position in a subclass process method, the frame's position is relative to the filter's producer - not the filter's in point or timeline.

Parameters:
selfa filter
framea frame
Returns:
a frame
mlt_properties mlt_filter_properties ( mlt_filter  self)

Get the filter properties.

Parameters:
selfa filter
Returns:
the properties list for the filter
See also:
MLT_FILTER_PROPERTIES
mlt_service mlt_filter_service ( mlt_filter  self)

Get the service class interface.

Parameters:
selfa filter
Returns:
the service parent class
See also:
MLT_FILTER_SERVICE
void mlt_filter_set_in_and_out ( mlt_filter  self,
mlt_position  in,
mlt_position  out 
)

Set the starting and ending time.

Parameters:
selfa filter
inthe time relative to the producer at which start applying the filter
outthe time relative to the producer at which to stop applying the filter

Field Documentation

Protected.

Reimplemented from mlt_service_s.

public virtual

Reimplemented from mlt_service_s.

We're implementing service here.

Reimplemented from mlt_service_s.

protected filter method


The documentation for this struct was generated from the following files:
TWiki Appliance - Powered by TurnKey Linux