|
mlt 0.7.6
|
Producer abstract service class. More...
#include <mlt_producer.h>
Public Member Functions | |
| int | mlt_producer_attach (mlt_producer self, mlt_filter filter) |
| Attach a filter. | |
| int | mlt_producer_clear (mlt_producer self) |
| Physically reduce the producer (typically a cut) to a 0 length. | |
| void | mlt_producer_close (mlt_producer self) |
| Close the producer. | |
| mlt_producer | mlt_producer_cut (mlt_producer self, int in, int out) |
| Create a cut of this producer. | |
| mlt_producer | mlt_producer_cut_parent (mlt_producer self) |
| Obtain the parent producer. | |
| int | mlt_producer_detach (mlt_producer self, mlt_filter filter) |
| Detach a filter. | |
| mlt_filter | mlt_producer_filter (mlt_producer self, int index) |
| Retrieve a filter. | |
| mlt_position | mlt_producer_frame (mlt_producer self) |
| Get the current position (relative to start of producer). | |
| double | mlt_producer_get_fps (mlt_producer self) |
| Get the frames per second. | |
| mlt_position | mlt_producer_get_in (mlt_producer self) |
| Get the in point. | |
| mlt_position | mlt_producer_get_length (mlt_producer self) |
| Get the total, unedited length of the producer. | |
| mlt_position | mlt_producer_get_out (mlt_producer self) |
| Get the out point. | |
| mlt_position | mlt_producer_get_playtime (mlt_producer self) |
| Get the total play time. | |
| double | mlt_producer_get_speed (mlt_producer self) |
| Get the playing speed. | |
| int | mlt_producer_init (mlt_producer self, void *child) |
| Initialize a producer service. | |
| int | mlt_producer_is_blank (mlt_producer self) |
| Determine if the producer is a blank. | |
| int | mlt_producer_is_cut (mlt_producer self) |
| Determine if producer is a cut. | |
| int | mlt_producer_is_mix (mlt_producer self) |
| Determine if producer is a mix. | |
| mlt_producer | mlt_producer_new (mlt_profile profile) |
| Create and initialize a new producer. | |
| int | mlt_producer_optimise (mlt_producer self) |
| Optimise for overlapping cuts from the same clip. | |
| mlt_position | mlt_producer_position (mlt_producer self) |
| Get the current position (relative to in point). | |
| void | mlt_producer_prepare_next (mlt_producer self) |
| Prepare for next frame. | |
| mlt_properties | mlt_producer_properties (mlt_producer self) |
| Get the producer properties. | |
| int | mlt_producer_seek (mlt_producer self, mlt_position position) |
| Seek to a specified position. | |
| mlt_service | mlt_producer_service (mlt_producer self) |
| Get the parent service object. | |
| int | mlt_producer_set_in_and_out (mlt_producer self, mlt_position in, mlt_position out) |
| Set the in and out points. | |
| int | mlt_producer_set_speed (mlt_producer self, double speed) |
| Set the playing speed. | |
Data Fields | |
| mlt_destructor | close |
| the destructor virtual function | |
| void * | close_object |
| the object supplied to the close virtual function | |
| int(* | get_frame )(mlt_producer, mlt_frame_ptr, int) |
| Get a frame of data (virtual function). | |
| struct mlt_service_s | parent |
| A producer is a service. | |
Private Member Functions | |
| static mlt_producer | mlt_producer_clone (mlt_producer self) |
| Clone a producer. | |
| static void | mlt_producer_property_changed (mlt_service owner, mlt_producer self, char *name) |
| Listener for property changes. | |
| static void | mlt_producer_service_changed (mlt_service owner, mlt_producer self) |
| Listener for service changes. | |
| static void | mlt_producer_set_clones (mlt_producer self, int clones) |
| Create clones. | |
| static int | producer_get_frame (mlt_service service, mlt_frame_ptr frame, int index) |
| Get a frame. | |
Private Attributes | |
| void * | child |
| the object of a subclass | |
| void * | local |
| instance object | |
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.
| int mlt_producer_attach | ( | mlt_producer | self, |
| mlt_filter | filter | ||
| ) |
Attach a filter.
| self | a producer |
| filter | the filter to attach |
| 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.
| self | a producer |
| static mlt_producer mlt_producer_clone | ( | mlt_producer | self | ) | [private] |
Clone a producer.
| self | a producer |
self | 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.
| self | a producer |
| 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.
| self | a producer |
| in | the beginning |
| out | the end |
| mlt_producer mlt_producer_cut_parent | ( | mlt_producer | self | ) |
Obtain the parent producer.
| self | a producer |
self is a "cut" producer or self otherwise. | int mlt_producer_detach | ( | mlt_producer | self, |
| mlt_filter | filter | ||
| ) |
Detach a filter.
| self | a service |
| filter | the filter to detach |
| mlt_filter mlt_producer_filter | ( | mlt_producer | self, |
| int | index | ||
| ) |
Retrieve a filter.
| self | a service |
| index | which filter to retrieve |
| mlt_position mlt_producer_frame | ( | mlt_producer | self | ) |
Get the current position (relative to start of producer).
| self | a producer |
| double mlt_producer_get_fps | ( | mlt_producer | self | ) |
Get the frames per second.
This is determined by the producer's profile.
| self | a producer |
| mlt_position mlt_producer_get_in | ( | mlt_producer | self | ) |
Get the in point.
| self | a producer |
| 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.
| self | a producer |
| mlt_position mlt_producer_get_out | ( | mlt_producer | self | ) |
Get the out point.
| self | a producer |
| mlt_position mlt_producer_get_playtime | ( | mlt_producer | self | ) |
Get the total play time.
| self | a producer |
| double mlt_producer_get_speed | ( | mlt_producer | self | ) |
Get the playing speed.
| self | a producer |
| int mlt_producer_init | ( | mlt_producer | self, |
| void * | child | ||
| ) |
Initialize a producer service.
| self | the producer structure to initialize |
| child | a pointer to the child object for the subclass |
| 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.
| self | a producer |
self is a "blank" producer | int mlt_producer_is_cut | ( | mlt_producer | self | ) |
Determine if producer is a cut.
| self | a producer |
self is a "cut" producer | int mlt_producer_is_mix | ( | mlt_producer | self | ) |
Determine if producer is a mix.
| self | a producer |
self is a "mix" producer | mlt_producer mlt_producer_new | ( | mlt_profile | profile | ) |
Create and initialize a new producer.
| int mlt_producer_optimise | ( | mlt_producer | self | ) |
Optimise for overlapping cuts from the same clip.
| self | a producer |
| mlt_position mlt_producer_position | ( | mlt_producer | self | ) |
Get the current position (relative to in point).
| self | a producer |
| 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.
| self | a producer |
| mlt_properties mlt_producer_properties | ( | mlt_producer | self | ) |
Get the producer properties.
| self | a producer |
| static void mlt_producer_property_changed | ( | mlt_service | owner, |
| mlt_producer | self, | ||
| char * | name | ||
| ) | [private] |
Listener for property changes.
If the in, out, or length properties changed, fire a "producer-changed" event.
| owner | a service (ignored) |
| self | the producer |
| name | the property that changed |
| int mlt_producer_seek | ( | mlt_producer | self, |
| mlt_position | position | ||
| ) |
Seek to a specified position.
| self | a producer |
| position | set the "play head" position of the producer |
| mlt_service mlt_producer_service | ( | mlt_producer | self | ) |
Get the parent service object.
| self | a producer |
| static void mlt_producer_service_changed | ( | mlt_service | owner, |
| mlt_producer | self | ||
| ) | [private] |
Listener for service changes.
Fires the "producer-changed" event.
| owner | a service (ignored) |
| self | the producer |
| static void mlt_producer_set_clones | ( | mlt_producer | self, |
| int | clones | ||
| ) | [private] |
Create clones.
| self | a producer |
| clones | the number of copies to make |
| 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.
| self | a producer |
| in | the relative starting time; a negative value is the same as 0 |
| out | the relative ending time; a negative value is the same as length - 1 |
| int mlt_producer_set_speed | ( | mlt_producer | self, |
| double | speed | ||
| ) |
Set the playing speed.
| self | a producer |
| speed | the new speed as a relative factor (1.0 = normal) |
| 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.
| service | a service | |
| [out] | frame | a frame by reference |
| index | as determined by the actual producer |
void* mlt_producer_s::child [private] |
the object of a subclass
Reimplemented from mlt_service_s.
the destructor virtual function
Reimplemented from mlt_service_s.
the object supplied to the close virtual function
Reimplemented from mlt_service_s.
| int( * mlt_producer_s::get_frame)(mlt_producer, mlt_frame_ptr, int) |
Get a frame of data (virtual function).
| mlt_producer | a producer |
| mlt_frame_ptr | a frame pointer by reference |
| int | an index |
Reimplemented from mlt_service_s.
void* mlt_producer_s::local [private] |
instance object
Reimplemented from mlt_service_s.
A producer is a service.
Reimplemented from mlt_service_s.
Reimplemented in mlt_multitrack_s, mlt_playlist_s, and mlt_tractor_s.
1.7.3