install -d "$(DESTDIR)$(libdir)/mlt"
install -d "$(DESTDIR)$(libdir)/pkgconfig"
install -d "$(DESTDIR)$(prefix)/share/mlt"
- install -c -m 755 mlt-config "$(DESTDIR)$(bindir)"
install -c -m 644 *.pc "$(DESTDIR)$(libdir)/pkgconfig"
- install -m 644 packages.dat "$(DESTDIR)$(prefix)/share/mlt/"
list='$(SUBDIRS)'; \
for subdir in $$list; do \
$(MAKE) DESTDIR=$(DESTDIR) -C $$subdir $@ || exit 1; \
done; \
if test -z "$(DESTDIR)"; then \
- /sbin/ldconfig 2> /dev/null || true; \
+ /sbin/ldconfig -n "$(DESTDIR)$(libdir)" 2> /dev/null || true; \
fi
uninstall:
-MLT/Miracle README
-------------------
+MLT FRAMEWORK README
+--------------------
Sponsored by Ushodaya Enterprises Limited
Written by Charles Yates <charles.yates@pandora.be>
and Dan Dennedy <dan@dennedy.org>
MLT is a LGPL multimedia framework designed for television broadcasting,
- and Miracle is a GPL multi-unit video playout server with realtime
+ and melted is a GPL multi-unit video playout server with realtime
effects.
This document provides a quick reference for the minimal configuration,
First, a note on consumers. When you start the script, the main menu asks
you to choose a consumer. A consumer is like a viewer, but it could also
write to a stream/file. The "SDL" consumer is the popular Simple DirectMedia
-Layer audio and video output. The "Westley" consumer generates an XML
+Layer audio and video output. The "xml" consumer generates an XML
representation of the service network. That can be played directly due to the
-westley producer plugin. See docs/westley.txt for more information. The
+XML producer plugin. See docs/mlt-xml.txt for more information. The
"MainConcept DV" consumer refers to the proprietary MLT plugin required to
use MLT with MainConcept DV, DVCPro, and MPEG codecs. "/dev/dv1394/0" refers
to a device file for transmitting DV over FireWire using the Linux dv1394 kernel
SDL Half D1 sdl:360x288 rescale=nearest resize=1
SDL High Latency sdl buffer=12 rescale=none
SDL Progressive sdl progressive=1
-Westley to Terminal westley
-Westley to File westley:
+XML to Terminal xml
+XML to File xml:
MainConcept DV to /dev/dv1394/0 mcdv:/dev/dv1394/0 rescale=nearest buffer=25
libdv to /dev/dv1394/0 libdv:/dev/dv1394/0 rescale=nearest buffer=25
BlueFish444 PAL bluefish:1
if [ "$usable" = "0" -a "$demo" != "" ]
then
- if [ "$MLT_CONSUMER" == "westley:" ]
- then export WESTLEY_CONSUMER="westley:$demo.westley"
- bash $demo -consumer $WESTLEY_CONSUMER
- inigo +$demo.txt out=100 $demo.westley $demo.westley -filter watermark:watermark1.png composite.fill=1 composite.geometry=85%,5%:10%x10%
- elif [ "$MLT_CONSUMER" == "westley" ]
+ if [ "$MLT_CONSUMER" == "xml:" ]
+ then export XML_CONSUMER="xml:$demo.mlt"
+ bash $demo -consumer $XML_CONSUMER
+ melt +$demo.txt out=100 $demo.mlt $demo.mlt -filter watermark:watermark1.png composite.fill=1 composite.geometry=85%,5%:10%x10%
+ elif [ "$MLT_CONSUMER" == "xml" ]
then bash $demo -consumer $MLT_CONSUMER | less
else bash $demo -consumer $MLT_CONSUMER
fi
mlt_titleshadow_watermark Shadowed Title and Watermark clip3.dv
mlt_intro Station Promo into Story? watermark1.png,clip3.mpeg,music1.ogg
mlt_voiceover Voiceover 2 clips with title clip1.dv,clip2.mpeg,music1.ogg
-mlt_avantika_title GJ-TTAvantika title pango.westley
+mlt_avantika_title GJ-TTAvantika title pango.mlt
mlt_title_over_gfx Title over graphic watermark1.png,clip1.dv
mlt_slideshow Slideshow Scotland
mlt_bouncy Bouncy, Bouncy clip1.dv,clip3.dv
<?xml version="1.0"?>
-<!DOCTYPE westley SYSTEM "../src/modules/westley/westley.dtd" [
- <!ENTITY name "Westley">
+<!DOCTYPE mlt SYSTEM "../src/modules/xml/mlt-xml.dtd" [
+ <!ENTITY name "mlt">
]>
-<westley>
+<mlt>
<producer id="producer0">
<property name="mlt_service">pango</property>
<property name="text">Hello &name;,
My name is Inigo Montoya.</property>
</producer>
-</westley>
+</mlt>
-inigo \
+melt \
clip* \
$*
-inigo clip1.dv \
+melt clip1.dv \
meta.attr.location=1 meta.attr.location.markup="Location" \
meta.attr.exclusive=1 meta.attr.exclusive.markup="Exclusive" \
meta.attr.special=1 meta.attr.special.markup="Special" \
-inigo \
+melt \
clip*.dv \
-track music1.ogg \
-filter volume:0.5 normalise= track=0 \
-inigo \
-pango.westley \
+melt \
+pango.mlt \
$*
-inigo \
+melt \
clip3.dv \
-filter \
watermark:clip1.dv \
-inigo \
+melt \
clip3.dv \
-track \
clip1.dv \
-inigo \
+melt \
clip2.dv in=100 out=174 -blank 99 clip3.dv in=100 \
-track \
-blank 49 clip3.mpeg in=100 out=249 \
-inigo \
+melt \
clip1.dv out=74 \
-track \
-blank 49 clip2.mpeg \
-inigo \
+melt \
clip1.mpeg in=100 out=500 \
-filter greyscale in=100 out=199 \
$*
-inigo \
+melt \
colour:black out=199 \
-track \
clip3.mpeg in=100 out=299 \
-inigo \
+melt \
clip1.dv out=74 -blank 99 clip3.dv in=25 \
-track \
-blank 49 clip2.mpeg out=149 \
-inigo \
+melt \
music1.ogg in=100 out=224 \
-track \
watermark1.png out=124 \
-inigo \
+melt \
-blank 49 \
clip2.dv in=100 \
-track \
-inigo \
+melt \
clip1.dv out=100 \
-track \
-blank 49 \
-inigo \
+melt \
*.dv \
-filter gamma:1.5 \
-filter volume normalise=-20db \
-inigo \
+melt \
clip3.dv \
-track \
"+My name is Inigo Montoya.txt" out=99 -blank 49 "+Prepare to die!.txt" out=99 \
-inigo \
+melt \
colour:black out=199 \
-track \
clip1.dv in=0 out=0 -repeat 99 clip1.dv \
-inigo \
+melt \
clip2.mpeg \
-filter obscure:25%,25%:25%x25%:10x10 in=0 out=68 \
-filter region:circle.png filter=obscure composite.start=55%,25%:12%x50% in=68 out=200 \
-inigo \
+melt \
-blank 49 colour:black out=25 -blank 999 \
-track \
clip3.dv in=200 out=275 \
-inigo \
+melt \
Scotland/.all.jpg ttl=75 \
-filter luma:luma1.pgm luma.softness=0.1 luma.invert=0 \
$*
-inigo Scotland/.all.jpg ttl=100 \
+melt Scotland/.all.jpg ttl=100 \
-filter watermark:colour:black reverse=1 composite.geometry="15%,15%:10%,10%;0.1625=0,0:100%x100%;-.1625=;-1=70%,70%:10%x10%" composite.mirror_off=1 composite.cycle=100 composite.fill=1 composite.valign=c composite.halign=c \
$*
-inigo \
+melt \
clip1.dv out=124 clip2.dv out=149 clip3.dv in=75 out=224 clip1.dv \
-track \
-blank 99 colour:black out=49 -blank 99 colour:black out=49 -blank 99 colour:black out=49 \
-inigo \
+melt \
clip1.dv out=124 clip2.dv out=149 clip3.dv in=75 out=224 clip1.dv \
-track \
-blank 99 colour:black out=49 -blank 99 colour:black out=49 -blank 99 colour:black out=49 \
-inigo \
+melt \
clip1.dv out=299 \
-track \
colour:black out=299 \
-inigo \
+melt \
watermark1.png out=9999 \
-track \
"+title over gfx.txt" fgcolour=0x000000ff \
-inigo \
+melt \
"+hello~world.txt" align=1 out=1000 \
-track "+hello~world.txt" align=1 out=1000 fgcolour=0x000000ff \
-track watermark1.png out=1000 \
-inigo \
+melt \
"+voice over demo.txt" \
font="Sans Bold 72" \
fgcolour=0x00000000 \
-inigo \
+melt \
clip2.dv out=1000 \
-track \
watermark1.png out=1000 \
<?xml version="1.0" encoding="utf-8"?>
-<westley>
+<mlt>
<producer id="video">
<property name="resource">clip1.dv</property>
</producer>
<property name="valign">centre</property>
</transition>
</tractor>
-</westley>
+</mlt>
<!ENTITY st5 "fill-rule:evenodd;clip-rule:evenodd;stroke:none;">
<!ENTITY st6 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;">
]>
-<westley>
+<mlt>
<playlist>
<entry>
<producer out="99" length="99">
</producer>
</entry>
</playlist>
-</westley>
+</mlt>
Framework Documentation
-Copyright (C) 2004 Ushodaya Enterprises Limited
+Copyright (C) 2004-2009 Ushodaya Enterprises Limited
Author: Charles Yates <charles.yates@pandora.be>
-Last Revision: 2004-10-08
+Last Revision: 2005-05-08
MLT FRAMEWORK
opposed to the implementation details.
It is not required reading for the MLT client/server integration - please
- refer to valerie.txt and dvcp.txt for more details on this area.
+ refer to libmvsp.txt and mvsp.txt for more details on this area.
SECTION 1 - BASIC OVERVIEW
The defaults requested here are a special case - the NULL usage requests
that we use the default producers and consumers.
- The default producer is "fezzik". This producer matches file names to
+ The default producer is "loader". This producer matches file names to
locate a service to use and attaches 'normalising filters' (such as scalers,
deinterlacers, resamplers and field normalisers) to the loaded content -
these filters ensure that the consumer gets what it asks for.
- The default consumer is "sdl". The combination of fezzik and sdl will
+ The default consumer is "sdl". The combination of loader and sdl will
provide a media player.
In this example, we connect the producer and then start the consumer. We
Also note, you can override the defaults as follows:
- $ MLT_CONSUMER=westley ./hello file.avi
+ $ MLT_CONSUMER=xml ./hello file.avi
- This will create a westley xml document on stdout.
+ This will create a XML document on stdout.
- $ MLT_CONSUMER=westley MLT_PRODUCER=avformat ./hello file.avi
+ $ MLT_CONSUMER=xml MLT_PRODUCER=avformat ./hello file.avi
This will play the video using the avformat producer directly, thus it will
bypass the normalising functions.
+------------------+------------------------------------+------------------+
|MLT_NORMALISATION |The normalisation of the system |PAL or NTSC |
+------------------+------------------------------------+------------------+
- |MLT_PRODUCER |The default producer |"fezzik" or other |
+ |MLT_PRODUCER |The default producer |"loader" or other |
+------------------+------------------------------------+------------------+
|MLT_CONSUMER |The default consumer |"sdl" or other |
+------------------+------------------------------------+------------------+
mlt_producer_optimise( mlt_playlist_producer( playlist ) );
after the mix calls have be done. Note that this is automatically applied
- to deserialised westleys.
+ to deserialised MLT XML.
Multiple Tracks and Transitions:
// Create track 0
mlt_producer track0 = create_playlist( argc, argv );
- // Create the watermark track - note we NEED fezzik for scaling here
- mlt_producer track1 = mlt_factory_producer( "fezzik", "pango" );
+ // Create the watermark track - note we NEED loader for scaling here
+ mlt_producer track1 = mlt_factory_producer( "loader", "pango" );
// Get the length of track0
mlt_position length = mlt_producer_get_playtime( track0 );
A service does not define any properties when constructed. It should be
noted that producers, filters and transitions my be serialised (say, via the
- westley consumer), and care should be taken to distinguish between
+ xml consumer), and care should be taken to distinguish between
serialisable and transient properties. The convention used is to prefix
transient properties with an underscore.
Installation Documentation
-Copyright (C) 2004 Ushodaya Enterprises Limited
+Copyright (C) 2004-2009 Ushodaya Enterprises Limited
Author: Charles Yates <charles.yates@pandora.be>
-Last Revision: 2004-04-13
+Last Revision: 2009-05-08
INSTALL
+ bluefish - Bluefish dependent services (*)
+ core - Independent MLT services
+ dv - libdv dependent services
- + fezzik - A giant (meta) service to load and normalise media
+ gtk2 - pango and pixbuf dependent services
+ mainconcept - mainconcept dependent services (*)
+ normalize - audio normalisation functions (**)
+ resample - libresample dependent services (**)
+ sdl - SDL dependent services
+ vorbis - vorbis dependenent services
- + westley - Nice and clever XML services
+ + xml - XML (de)serialization services
+ xine - Xine-derived sources (**)
- + albino - A simple console (protocol level) example (**)
- + inigo - A media playing test application (**)
- + humperdink - A terminal-based example client (**)
- + miracle - The server implementation (**)
+ + melt - A media playing test application (**)
+ tests - Reserved for regression and unit tests
- + valerie - Client API to access the server
Additional subdirectories may be nested below those shown and should be
documented in their parent.
vorbis libvorbis 1.0.1 or later.
URL: http://www.vorbis.com/
----------- ----------------------------------------------------------
- westley libxml2 2.5 or later.
+ xml libxml2 2.5 or later.
URL: http://www.xmlsoft.org/
----------- ----------------------------------------------------------
$prefix/lib/ and public header files which are installed in
$prefix/include/mlt/framework.
- Valerie produces a single shared object which is installed in
- $prefix/lib/ and public header which are installed in
- $prefix/include/mlt/valerie.
-
- Miracle produces a single exectuable which is installed in
- $prefix/bin/, a library in $prefix/lib and associated header files in
- $prefix/include.
-
The modules produce a shared object per module and update text files
containing a list of modules provided by this build. These are installed
in $prefix/share/mlt/modules. It is at the discretion of the module to
-Inigo Documentation
+Melt Documentation
Copyright (C) 2004-2009 Ushodaya Enterprised Limited
Author: Charles Yates <charles.yates@pandora.be>
-Last Revision: 2009-01-21
+Last Revision: 2009-05-08
-INIGO
+MELT
-----
Preamble:
- inigo was developed as a test tool for the MLT framework. It can be thought
+ Melt was developed as a test tool for the MLT framework. It can be thought
of as a powerful, if somewhat obscure, multitrack command line oriented
video editor.
Usage:
- inigo [options] [producer [name=value]* ]+
+ melt [options] [producer [name=value]* ]+
Options:
-attach filter[:arg] [name=value]* Attach a filter to the output
-attach-cut filter[:arg] [name=value]* Attach a filter to a cut
3. Please refer to services.txt for details on services available;
- 4. The MLT framework, from which inigo has inherited its naming convention,
+ 4. The MLT framework, from which melt has inherited its naming convention,
is very mlt-centric. Producers produce MLT frame objects and consumers
consume MLT frame objects. The distinction is important - a DV producer
does not produce DV, it produces MLT frames from a DV source, and similarly
To play a file with the default SDL PAL consumer, usage is:
- $ inigo file
+ $ melt file
- Note that 'file' can be anything that inigo has a known 'producer' mapping
+ Note that 'file' can be anything that melt has a known 'producer' mapping
for (so this can be anything from .dv to .txt).
You can also specify the producer directly, for example:
- $ inigo avformat:file.mpeg
+ $ melt avformat:file.mpeg
Would force the direct use of avformat for loading the file.
Properties can be assigned to the producer by adding additional name=value
pairs after the producer:
- $ inigo file in=50 out=100 something="something else"
+ $ melt file in=50 out=100 something="something else"
Note that while some properties have meaning to all producers (for example:
in, out and length are guaranteed to be valid for all, though typically,
Multiple files of different types can be used:
- $ inigo a.dv b.mpg c.png
+ $ melt a.dv b.mpg c.png
Properties can be assigned to each file:
- $ inigo a.dv in=50 out=100 b.mpg out=500 c.png out=500
+ $ melt a.dv in=50 out=100 b.mpg out=500 c.png out=500
MLT will take care of 'normalising' the output of a producer to ensure
that the consumer gets what it needs. So, in the case above, the mlt
Filters are frame modifiers - they can change the contents of the audio or
the images associated to a frame.
- $ inigo a.dv -filter greyscale
+ $ melt a.dv -filter greyscale
As with producers, properties may be specified on filters too.
Again, in and out properties are common to all, so to apply a filter to a
range of frames, you would use something like:
- $ inigo a.dv -filter greyscale in=0 out=50
+ $ melt a.dv -filter greyscale in=0 out=50
Again, filters have their own set of rules about properties and will
silently ignore properties that do not apply.
The -group switch is provided to force default properties on the following
'services'. For example:
- $ inigo -group in=0 out=49 clip*
+ $ melt -group in=0 out=49 clip*
would play the first 50 frames of all clips that match the wild card
pattern.
Note that the last -group settings also apply to the following filters,
transitions and consumers, so:
- $ inigo -group in=0 out=49 clip* -filter greyscale
+ $ melt -group in=0 out=49 clip* -filter greyscale
is *probably not* what you want (ie: the greyscale filter would only be
applied to the first 50 frames).
To shed the group properties, you can use any empty group:
- $ inigo -group in=0 out=49 clip* -group -filter greyscale
+ $ melt -group in=0 out=49 clip* -group -filter greyscale
Attached Filters:
The -attach family of switches simplify things enormously. By default, -attach
will attach a filter to the last service created, so:
- $ inigo clip1.dv clip2.dv -attach greyscale clip3.dv
+ $ melt clip1.dv clip2.dv -attach greyscale clip3.dv
would only apply the filter to clip2.dv. You can further narrow down the area of
the effect by specifying in/out points on the attached filter.
This might seem simple so far, but there is a catch... consider the following:
- $ ingo clip1.dv -attach watermark:+hello.txt -attach invert
+ $ melt clip1.dv -attach watermark:+hello.txt -attach invert
The second attached filter is actually attached to the watermark. You might
think, yay, nice (and it is :-)), but, it might not be what you want. For example
you might want to attach both to clip1.dv. To do that, you can use:
- $ ingo clip1.dv -attach-cut watermark:+hello.txt -attach-cut invert
+ $ melt clip1.dv -attach-cut watermark:+hello.txt -attach-cut invert
As you shall see below, there are still another couple of gotchas associated to
-attach, and even another variant :-).
For example:
- $ inigo clip1.dv clip2.dv -mix 25 -mixer luma -mixer mix:-1
+ $ melt clip1.dv clip2.dv -mix 25 -mixer luma -mixer mix:-1
would provide both an audio and video transition between clip1 and clip2.
This functionality supercedes the enforced use of the -track and -transition
- switches from earlier versions of inigo and makes life a lot easier :-).
+ switches from earlier versions of melt and makes life a lot easier :-).
These can be used in combination, so you can for example do a fade from black
and to black using the following:
- $ inigo colour:black out=24 clip1.dv -mix 25 -mixer luma \
+ $ melt colour:black out=24 clip1.dv -mix 25 -mixer luma \
colour:black out=24 -mix 25 -mixer luma
while this may not be immediately obvious, consider what's happening as the
As noted, -attach normally applies to the last created service - so, you can
attach a filter to the transition region using:
- $ inigo clip1.dv clip2.dv -mix 25 -mixer luma -attach watermark:+Transition.txt
+ $ melt clip1.dv clip2.dv -mix 25 -mixer luma -attach watermark:+Transition.txt
Again, nice, but take care - if you want the attached filter to be associated
to the region following the transition, use -attach-cut instead.
It is best to visualise a track arrangement, so we'll start with
an example:
- $ inigo a.dv -track b.dv in=0 out=49
+ $ melt a.dv -track b.dv in=0 out=49
This can be visualised as follows:
example, the following would show the video from the a track, but the audio
would come from the second track:
- $ inigo a.dv -track b.mp3 in=0 out=49
+ $ melt a.dv -track b.mp3 in=0 out=49
To have the 51st frame be the first frame of b, we can use the -blank switch:
- $ inigo a.dv out=49 -track -blank 49 b.dv
+ $ melt a.dv out=49 -track -blank 49 b.dv
Which we can visualise as:
Here we need tracks to overlap, so a useful multitrack
definition could be given as:
- $ inigo a.dv out=49 \
+ $ melt a.dv out=49 \
-track \
-blank 24 b.dv \
-transition luma in=25 out=49 a_track=0 b_track=1
In this scenario, we define a command line as follows:
- $ inigo a.dv out=49 -blank 49 a2.dv \
+ $ melt a.dv out=49 -blank 49 a2.dv \
-track \
-blank 24 b.dv out=99 \
-transition luma in=25 out=49 a_track=0 b_track=1 \
Serialisation:
- Inigo has a built in serialisation mechanism - you can build up
+ Melt has a built in serialisation mechanism - you can build up
your command, test it via any consumer and then add a -serialise
- file.inigo switch to save it.
+ file.melt switch to save it.
- The saved file can be subsequently used as a clip by either
- miracle or inigo. Take care though - paths to files are saved as
+ The saved file can be subsequently used as a clip by melt or other
+ MLT applications. Take care though - paths to files are saved as
provided on the command line....
- A more expressive serialisation can be obtained with the westley consumer
- - this will provide an xml document which can be used freely in inigo and
- miracle.
+ A more expressive serialisation can be obtained with the xml consumer
+ - this will provide an xml document which can be used freely in melt and
+ other MLT applications.
- See westley.txt for more information.
+ See mlt-xml.txt for more information.
Missing Features:
track or a watermark which you want composited on every frame, and of
course, there's the obscure filter....
- inigo only supports this in two invocations - as a simple example:
+ melt only supports this in two invocations - as a simple example:
- $ inigo a.dv -track -blank 100 b.dv -consumer westley:basic.westley
- $ inigo basic.westley -filter watermark:watermark.png
+ $ melt a.dv -track -blank 100 b.dv -consumer xml:basic.mlt
+ $ melt basic.mlt -filter watermark:watermark.png
As an example, consider the following:
- class Westley
+ class Xml
{
private:
Consumer consumer;
Tractor &tractor;
public:
- Westley( MltTractor &tractor ) :
+ Xml( MltTractor &tractor ) :
tractor( tractor ),
- consumer( "westley" )
+ consumer( "xml" )
{
consumer.connect( tractor );
tractor.listen( tractor, "producer-changed",
- ( mlt_listener )Westley::listener );
+ ( mlt_listener )Xml::listener );
}
- static void listener( Properties *tractor, Westley *object )
+ static void listener( Properties *tractor, Xml *object )
{
object->activate( );
}
}
};
- Now, each time the tractor is changed, the westley representation is output to
+ Now, each time the tractor is changed, the XML representation is output to
stderr.
------
-Servers and Westley Docs
+Servers and MLT XML Docs
------------------------
For various reasons, you might want to serialise a producer to a string.
To do this, you just need to specify a property to write to:
- Consumer westley( "westley", "buffer" );
- westley.connect( producer );
- westley.start( );
- buffer = westley.get( "buffer" );
+ Consumer xml( "xml", "buffer" );
+ xml.connect( producer );
+ xml.start( );
+ buffer = xml.get( "buffer" );
You can use any name you want, and you can change it using the "resource"
property. Any name with a '.' in it is considered to be a file. Hence, you
- can use a westley consumer to store multiple instances of the same MLT
+ can use a xml consumer to store multiple instances of the same MLT
object - useful if you want to provide undo/redo capabilities in an
editing application.
- Should you receive an xml document as a string, and you want to send it
+ Should you receive an XML document as a string, and you want to send it
on to a server, you can use:
- Conumser valerie( "valerie", "localhost:5250" );
- valerie.set( "westley", buffer );
- valerie.start( );
+ Consumer client( "mvsp", "localhost:5250" );
+ client.set( "xml", buffer );
+ client.start( );
- If you need to obtain an MLT object from a string:
+ If you need to obtain an MLT object from a XML string:
- Producer producer( "westley-xml", buffer );
+ Producer producer( "xml-string", buffer );
The following shows a working example of an extended server:
- class ShotcutServer : public Miracle
+ class ShotcutServer : public Melted
{
public:
ShotcutServer( char *id, int port ) :
- Miracle( id, port )
+ Melted( id, port )
{
}
// Reject all commands other than push/receive
Response *execute( char *command )
{
- valerie_response response = valerie_response_init( );
- valerie_response_set_error( response, 400, "Not OK" );
+ mvsp_response response = mvsp_response_init( );
+ mvsp_response_set_error( response, 400, "Not OK" );
return new Response( response );
}
// Push document handler
Response *received( char *command, char *doc )
{
- valerie_response response = valerie_response_init( );
+ mvsp_response response = mvsp_response_init( );
// Use doc in some way and assign Response
if ( doc != NULL )
- valerie_response_set_error( response, 200, "OK" );
+ mvsp_response_set_error( response, 200, "OK" );
return new Response( response );
}
// Push service handler
Response *push( char *command, Service *service )
{
- valerie_response response = valerie_response_init( );
+ mvsp_response response = mvsp_response_init( );
// Use service in some way and assign Response
if ( service != NULL )
- valerie_response_set_error( response, 200, "OK" );
+ mvsp_response_set_error( response, 200, "OK" );
return new Response( response );
}
};
-Westley Documentation
+MLT XML Schema Documentation
-Copyright (C) 2004 Ushodaya Enterprised Limited
+Copyright (C) 2004-2009 Ushodaya Enterprised Limited
Authors: Charles Yates <charles.yates@pandora.be>
-Last Revision: 2004-03-20
+Last Revision: 2009-05-08
-WESTLEY
+MLT XML
-------
Preamble:
- Westley is the MLT projects XML serialisation/deserialisation format -
+ This is the MLT projects XML serialisation/deserialisation format -
as such, it closely mirrors the internal structure of the MLT API.
If you just want to go straight to the DTD, then see
- mlt/src/modules/westley/westley.dtd, which gets installed at
- $(prefix)/share/mlt/modules/westley.dtd. Currently, the westley parser is
+ mlt/src/modules/xml/mlt-xml.dtd, which gets installed at
+ $(prefix)/share/mlt/modules/xml/mlt-xml.dtd. Currently, the XML parser is
non-validating.
Introduction:
- A westley document is essentially a list of 'producers' - a producer is
+ A MLT XML document is essentially a list of 'producers' - a producer is
an mlt object which generates mlt frames (images and associated audio
samples).
In the mlt model, producers are created and attached to 'consumers' -
consumers are software playback components (such as SDL), or wrappers for
- hardware drivers (such as bluefish) or even the westley serialising
+ hardware drivers (such as bluefish) or even the XML serialising
consumer itself (the latter doesn't receive frames - it merely
interrogates the connected producer for its configuration).
- Although westley was defined as a serialisation mechanism for instantiated
+ Although MLT XML was defined as a serialisation mechanism for instantiated
MLT components, this document will concentrate on the hand authoring of
- westley documents.
+ MLT XML documents.
Rules:
As shall become apparent through the remainder of this document, the basic
- tenet of westley authoring is to organise the document in the following
+ tenet of MLT XML authoring is to organise the document in the following
manner:
1) create producer elements for each unique media clip in the project;
3) create a multitrack and specify filters and transitions;
4) adding global filters.
- While other uses of westley exist, the approach taken here is to maximise
+ While other uses of MLT XML exist, the approach taken here is to maximise
efficiency for complex projects.
Basic Producers:
- The simplest westley document is:
+ The simplest MLT XML document is:
- <westley>
+ <mlt>
<producer id="producer0">
<property name="resource">clip1.dv</property>
</producer>
- </westley>
+ </mlt>
- The westley wrapping is of course superfluous here - loading this document
+ The XML wrapping is of course superfluous here - loading this document
with MLT is identical to loading the clip directly.
Of course, you can specify additional properties. For example, consider an
- MPEG file with multiple soundtracks - you could define a westley document to
+ MPEG file with multiple soundtracks - you could define a MLT XML document to
ensure that the second audio track is loaded:
- <westley>
+ <mlt>
<producer id="producer0">
<property name="resource">clip1.mpeg</property>
<property name="audio_track">1</property>
</producer>
- </westley>
+ </mlt>
NB: This relies on the mpeg being handled by the avformat producer, rather
than the mcmpeg one. See services.txt for more details.
restricts the amount of the clip available, and could lead to the same clip
being loaded multiple times if you need different regions of the clip
elsewhere;
- 2) A westley can be specified as a resource, so westleys can naturally
- encapsulate other westleys.
+ 2) A MLT XML doc can be specified as a resource, so XML docs can naturally
+ encapsulate other XML docs.
Playlists:
As an example, the following defines two basic producers and a playlist with 3
items:
- <westley>
+ <mlt>
<producer id="producer0">
<property name="resource">clip1.dv</property>
</producer>
<entry producer="producer1" in="0" out="999"/>
<entry producer="producer0" in="3000" out="6999"/>
</playlist>
- </westley>
+ </mlt>
Here we see how the playlist defines the in/out points of the basic
producers.
1) All in/out points are absolute frame positions relative to the producer
being appended to the playlist;
- 2) Westley documents are currently authored for a specific normalisation;
+ 2) MLT XML documents are currently authored for a specific normalisation;
3) The last 'producer' in the document is the default for play out;
4) Playlists can reference the same producer multiple times. In/out regions
do not need to be contiguous - duplication and skipping is acceptable.
consumer.
The consumer receives the first non-blank frame (see below). It has no say
- in the order in which gets them (the sdl consumer when used with inigo might
+ in the order in which gets them (the sdl consumer when used with melt might
appear to be an exception - it isn't - it simply has a route back to the
application to allow the application to interpret key presses).
Tractors:
- To create a multitrack westley, we can use two playlists and introduce a
+ To create a multitrack XML, we can use two playlists and introduce a
tractor. For the purposes of demonstration, I'll add a filter here too:
- <westley>
+ <mlt>
<producer id="producer0">
<property name="resource">clip1.dv</property>
</producer>
<property name="mlt_service">greyscale</property>
</filter>
</tractor>
- </westley>
+ </mlt>
Here we see that blank frames are inserted into the first playlist and a
blank is provided at the beginning of the second - this can be visualised in
let's assume we wish to watermark all output, then we could use the
following:
- <westley>
+ <mlt>
<producer id="producer0">
<property name="resource">clip1.dv</property>
</producer>
<property name="resource">watermark1.png</property>
</filter>
</tractor>
- </westley>
+ </mlt>
Here we employ another tractor and we define a single track (being the
tractor we previously defined) and apply a watermarking filter there.
clip. Remember, nothing is affected like mixing or compositing until one
applies a transition or appropriate filter.
- <westley>
+ <mlt>
<producer id="producer0">
<property name="resource">clip1.dv</property>
</producer>
<property name="end">1.0</property>
</transition>
</tractor>
- </westley>
+ </mlt>
A "luma" transition is a video wipe processor that takes a greyscale bitmap
for the wipe definition. When one does not specify a bitmap, luma performs
Flexibility:
- The information presented above is considered the MLT Westley "normal"
- form. This is the output generated by the westley consumer, for example,
- when used with inigo. It is the output generated when you use the
- "Westley to File" consumer in the demo script, which beginners will find
- most useful for learning to use westley XML. This section describes
- alternative forms the westley producer accepts.
+ The information presented above is considered the MLT XML "normal"
+ form. This is the output generated by the xml consumer, for example,
+ when used with melt. It is the output generated when you use the
+ "XML to File" consumer in the demo script, which beginners will find
+ most useful for learning to use MLT XML. This section describes
+ alternative forms the xml producer accepts.
First of all, the normal form is more of a linear format with producers
- and playlists defined prior to their usage in a multitrack. Westley
+ and playlists defined prior to their usage in a multitrack. The producer
also accepts a hierarchical format with producers as children of tracks
or playlist entries and with playlists as children of tracks:
- <westley>
+ <mlt>
<tractor>
<multitrack>
<track>
</track>
</multitrack>
</tractor>
- </westley>
+ </mlt>
Obviously, this example is meant to demonstrate hierarchy and not effective
use of playlist or multitrack!
- Secondly, as part of error handling, westley is forgiving if you fail to
- supply <tractor>, <track>, and <entry> where one can be understood. This
- affords an abbreviated syntax that is less verbose and perhaps less
+ Secondly, as part of error handling, the producer is forgiving if you fail
+ to supply <tractor>, <track>, and <entry> where one can be understood.
+ This affords an abbreviated syntax that is less verbose and perhaps less
intimidating for a human to read and understand. One can simplify the
above example as:
- <westley>
+ <mlt>
<multitrack>
<playlist>
<producer>
</producer>
</playlist>
</multitrack>
- </westley>
+ </mlt>
Yes, filters and transitions can be added to the above example after the
closing multitrack tag (</multitrack>) because it is still enclosed within
- the westley body tags.
+ the mlt body tags.
If you specify in and out on a producer and it has been enclosed within
an <entry> or <playlist>, then the edit points apply to the playlist
In the above example, the producer attribute of the entry element is
a reference to the preceding producer. All references must follow the
definition. The edit points supplied on the producer above will not affect
- the entry that references it below because westley knows the clip is a
+ the entry that references it below because the producer knows the clip is a
playlist entry and optimises this situation. The advantage is that one
does not need to determine every clip to be included ahead of time
and specify them outside the context of the mutlitrack timeline.
This form of authoring will be easier for many to visualise as a non-linear
editor's timeline. Here is a more complex example:
- <westley>
+ <mlt>
<multitrack>
<playlist>
<producer id="foo" in="100" out="149">
<transition mlt_service="luma" in="75" out="99" a_track="0" b_track="1">
<property name="reverse" value="1"/>
</transition>
- </westley>
+ </mlt>
Did you notice something different in the last example? Properties can be
expressed using XML attributes on the element as well. However, only
non-service-specific properties are supported in this way. For example,
"mlt_service" is available to any producer, filter, or transition. However,
"resource" is actually service-specific. Notice the syntax of the last
- property, on the last transition. Westley accepts property values using
+ property, on the last transition. The producer accepts property values using
the "value" attribute as well as using element text.
We have seen a few different ways of expressing property values. There are
property tag and that the section closing tag immediately precedes the
closing property tag.
- However, westley can also accept inline embedded XML:
+ However, the producer can also accept inline embedded XML:
<property name="resource">
<svg>
Currently, there is no namespace handling so a conflict will occur only on
any embedded XML that contains an element named "property" because
- westley collects embedded XML until it reaches a closing property tag.
+ the producer collects embedded XML until it reaches a closing property tag.
Entities and Parameterisation:
- The westley producer parser supports XML entities. An example:
+ The MLT XML producer parser supports XML entities. An example:
<?xml version="1.0"?>
- <!DOCTYPE westley [
+ <!DOCTYPE mlt [
<!ENTITY msg "Hello world!">
]>
- <westley>
+ <mlt>
<producer id="producer0">
<property name="mlt_service">pango</property>
<property name="text">&msg;</property>
</producer>
- </westley>
+ </mlt>
If you are embedding another XML document into a property value not using
a CNODE section, then any DOCTYPE section must be relocated before any of
- the xml elements to be well-formed. See demo/svg.westley for an example.
+ the xml elements to be well-formed. See demo/svg.mlt for an example.
- Entities can be used to parameterise westley! Using the above example, the
+ Entities can be used to parameterise MLT XML! Using the above example, the
entity declared serves as the default value for &msg;. The entity content
- can be overridden from the resource property supplied to the westley
+ can be overridden from the resource property supplied to the xml
producer. The syntax is the familiar, url-encoded query string used with
HTTP, e.g.: file?name=value&name=value...
- There are a couple of rules of usage. The Miracle LOAD command and inigo
- command line tool require you to preface the URL with "westley:" because
+ There are a couple of rules of usage. The melted LOAD command and melt
+ command line tool require you to preface the URL with "xml:" because
the query string destroys the filename extension matching peformed by
- Fezzik. Also, inigo looks for '=' to tokenise property settings. Therefore,
- one uses ':' between name and value instead of '='. Finally, since inigo
- is run from the shell, one must enclose the URL within single quotes to
- prevent shell filename expansion, or similar.
+ the auto-loader. Also, melt looks for '=' to tokenise property settings.
+ Therefore, one uses ':' between name and value instead of '='. Finally,
+ since melt is run from the shell, one must enclose the URL within single
+ quotes to prevent shell filename expansion, or similar.
- Needless to say, the ability to parameterise westley XML compositions is
+ Needless to say, the ability to parameterise MLT XML compositions is
an extremely powerful tool. An example for you to play with is available in
- demo/entity.westley. Try overriding the name from inigo:
- inigo 'westley:entity.westley?name:Charlie'
+ demo/entity.mlt. Try overriding the name from melt:
+ melt 'xml:entity.mlt?name:Charlie'
Technically, the entity declaration is not needed in the head of the XML
document if you always supply the parameter. However, you run the risk
If one finds the above hierarchical, abbreviated format intuitive,
start with a simple template and fill and extend as needed:
- <westley>
+ <mlt>
<multitrack>
<playlist>
</playlist>
...add a playlist for each track...
</multitrack>
...add filters and transitions...
- </westley>
+ </mlt>
By using a playlist for each track, it is easier to iteratively add new
clips and blank regions as you develop the project. You will not have to
Any contribution to the "core" module must assign copyright to Ushodaya
Enterprises Limited because they need license control over that module.
-The framework and valerie client libraries are covered under LGPL. Miracle,
-inigo, albino, and humperdink applications are covered under GPL. Modules
+The framework and libmvsp client libraries are covered under LGPL. melted,
+melt, melted-console, and melted-client applications are covered under GPL. Modules
should strive to be LGPL to make them available through the framework as LGPL.
-Comments in the framework and valerie header files must be C-style, not C++.
+Comments in the framework and libmvsp header files must be C-style, not C++.
Coding Style:
There are not a lot of rules, but we prefer brackets on their own line,
Authors: Charles Yates <charles.yates@pandora.be>
Dan Dennedy <dan@dennedy.org>
-Last Revision: $Date$
+Last Revision: 2009-05-08
SERVICES
Fails to play beyond first frame of video of sources with PTS not
starting at 0 (video4linux).
- fezzik
+ loader
Description
Details
- Supplying a filename with extension ".txt" causes the Fezzik
+ Supplying a filename with extension ".txt" causes the loader
producer to load with pango. If the filename begins with "+" the
pango producer interprets the filename as pango text. This is a
- shortcut to embed titles in inigo commands. For westley, it is
+ shortcut to embed titles in melt commands. For MLT XML, it is
recommended that you embed the title text in the property value.
Pango has builtin scaling. It will rescale the originally rendered
load all pictures with matching extension from a directory.
- If filename contains the string "<svg", then pixbuf tries
to load the filename as inline SVG XML, which is convenient
- for inigo commands.
+ for melt commands.
Details
Since it uses pipes, it is not compatible with bluefish.
- westley
+ xml
Description
Construct a service network from an XML description.
- See docs/westley.txt.
+ See docs/mlt-xml.txt.
Constructor Argument
- URL - an XML text file containing westley XML (schema/DTD pending)
- - Since westley files can be parameterised, the URL syntax is:
+ URL - an XML text file containing MLT XML
+ - Since MLT XML files can be parameterised, the URL syntax is:
{file-name}[?{param-name}{'='|':'}{param-value}[&{param-name}{'='|':'}{param-value}...]]
- A colon is allowed instead of an equal sign to pacify inigo,
+ A colon is allowed instead of an equal sign to pacify melt,
who tokenises anything with an equal sign as a property
- setting. Also, when running inigo from the shell, beware of
+ setting. Also, when running melt from the shell, beware of
the '?' and shell filename expansion. You can surround the URL
- with single quotations to prevent expansion. Finally, fezzik
+ with single quotations to prevent expansion. Finally, the loader
will fail to match the filename when you use parameters, so
- preface the url with 'westley:' to force fezzik to load with
- the westley service.
+ preface the url with 'xml:' to force the loader to load with
+ the xml service.
Read Only Properties
Description
Scale the producer video frame size to match the consumer.
- This filter is designed for use as a Fezzik normaliser.
+ This filter is designed for use as a normaliser for the loader producer.
Constructor Argument
Description
Scale the producer video frame size to match the consumer.
- This filter is designed for use as a Fezzik normaliser.
+ This filter is designed for use as a normaliser for the loader producer.
Constructor Argument
Adjust an audio stream's sampling rate, and duplicate channels if
producer provides less than consumer requested.
- This filter is automatically invoked by Fezzik for the sake of
- normalisation over inputs and with the consumer.
+ This filter is automatically invoked by the loader producer for the
+ sake of normalisation over inputs and with the consumer.
Constructor Argument
Description
Scale the producer video frame size to match the consumer.
- This filter is designed for use as a Fezzik normaliser.
+ This filter is designed for use as a normaliser for the loader producer.
Constructor Argument
This filter also adjusts the field order to lower field first
if the frame property "top_field_first" has been set to 1.
Therefore, when done, it sets the top_field_first to 0.
- This filter is automatically invoked by Fezzik as part of image
+ This filter is automatically invoked by the loader as part of image
sample aspect ratio normalisation.
Constructor Argument
Initialisation Properties
string resource - the producer to use
- string factory - producer required for the resource ('fezzik')
+ string factory - producer required for the resource (default: 'loader')
string geometry - composite geometry
string distort - control scaling
int in - in point
Dependencies
- mlt core modules and optionally, fezzik
+ mlt core modules and optionally, loader
Known Bugs
int in - in point
int out - out point
string factory - The name of a factory service used as a non-PGM
- producer loader. The default is fezzik.
+ producer loader. The default is 'loader'.
Read Only Properties
int in - in point
int out - out point
string factory - The name of a factory service used as a non-PGM
- producer loader. The default is Fezzik.
+ producer loader. The default is 'loader'.
Mutable Properties
string resource - nothing is rectangle, "circle" is a pixbuf-
generated SVG circle, anything else is loaded by the factory.
string factory - the service that creates the shape producer.
- - the default is fezzik.
+ - the default is 'loader'.
string filter[N] - one or more filters to apply. All filter
properties are passed using the same filter "key"
Any property starting with "composite." is passed to the
none
- westley
+ xml
Description
Serialise the service network to XML.
- See docs/westley.txt for more information.
+ See docs/mlt-xml.txt for more information.
Constructor Argument
+++ /dev/null
-include config.mak
-
-all clean distclean install uninstall:
- $(MAKE) DESTDIR=$(DESTDIR) -C src $@
-
-dist:
- [ -d "mlt++-$(version)" ] && rm -rf "mlt++-$(version)" || echo -n
- svn export http://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++ "mlt++-$(version)"
- tar -cvzf "mlt++-$(version).tar.gz" "mlt++-$(version)"
+++ /dev/null
-#!/bin/sh
-
-pkg-config mlt-framework 2>/dev/null
-[ $? != 0 ] && echo "MLT not installed - aborting" && exit 1
-
-# Determine default prefix
-prefix=`pkg-config --variable=prefix mlt-framework`
-[ "$prefix" = "" ] && echo "Can't locate MLT's prefix - please reconfigure MLT." && exit 1
-
-# Default the libdir
-libdir=""
-
-# Allow override from command line
-for i in "$@"
-do
- case $i in
- --prefix=* ) prefix="${i#--prefix=}" ;;
- --libdir=* ) libdir="${i#--libdir=}" ;;
- esac
-done
-
-# Determine the libdir if it's not specified in the args
-[ "$libdir" = "" ] && libdir=$prefix/lib
-
-# Sanity check
-[ ! -d "$prefix" ] && echo "Invalid prefix $prefix - aborting" && exit 1
-
-echo "version=`pkg-config --modversion mlt-framework`" > config.mak
-echo "soversion=1" >> config.mak
-echo "prefix=$prefix" >> config.mak
-echo "libdir=$libdir" >> config.mak
-
-targetos=$(uname -s)
-echo "targetos=$targetos" >> config.mak
-
-WARNINGS="-W -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Wredundant-decls"
-
-case $targetos in
- Darwin)
- echo LIBSUF=.dylib
- echo "CXXFLAGS+=-D__DARWIN__ -Wall -fPIC `pkg-config --cflags mlt-framework`"
- echo "LIBFLAGS=-dynamiclib -single_module"
- echo "LDFLAGS+=`pkg-config --libs mlt-framework` `pkg-config mlt-miracle --libs` `pkg-config mlt-valerie --libs`"
- ;;
- Linux|FreeBSD)
- echo LIBSUF=.so
- echo "CXXFLAGS+=-pthread -Wall $WARNINGS -fPIC `pkg-config --cflags mlt-framework`"
- echo "LIBFLAGS=-shared"
- echo "LDFLAGS+=`pkg-config --libs mlt-framework` `pkg-config mlt-miracle --libs`"
- ;;
-esac >> config.mak
-
-echo "MLT++ configured - will be installed in $prefix."
-
/** Construct the repository and factories.
*
- * The environment variable MLT_PRODUCER is the name of a default producer often used by other services, defaults to "fezzil".
+ * The environment variable MLT_PRODUCER is the name of a default producer often used by other services, defaults to "loader".
*
* The environment variable MLT_CONSUMER is the name of a default consumer, defaults to "sdl".
*
if ( global_properties != NULL )
{
mlt_properties_set_or_default( global_properties, "MLT_NORMALISATION", getenv( "MLT_NORMALISATION" ), "PAL" );
- mlt_properties_set_or_default( global_properties, "MLT_PRODUCER", getenv( "MLT_PRODUCER" ), "fezzik" );
+ mlt_properties_set_or_default( global_properties, "MLT_PRODUCER", getenv( "MLT_PRODUCER" ), "loader" );
mlt_properties_set_or_default( global_properties, "MLT_CONSUMER", getenv( "MLT_CONSUMER" ), "sdl" );
mlt_properties_set( global_properties, "MLT_TEST_CARD", getenv( "MLT_TEST_CARD" ) );
mlt_properties_set_or_default( global_properties, "MLT_PROFILE", getenv( "MLT_PROFILE" ), "dv_pal" );
// Fetch the cuts parent properties
parent = MLT_PRODUCER_PROPERTIES( mlt_producer_cut_parent( producer ) );
- // Remove fezzik normalisers for fx cuts
+ // Remove loader normalisers for fx cuts
if ( mlt_properties_get_int( parent, "meta.fx_cut" ) )
{
mlt_service service = MLT_PRODUCER_SERVICE( mlt_producer_cut_parent( producer ) );
mlt_filter filter = mlt_service_filter( service, 0 );
- while ( filter != NULL && mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "_fezzik" ) )
+ while ( filter != NULL && mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "_loader" ) )
{
mlt_service_detach( service, filter );
filter = mlt_service_filter( service, 0 );
clone = mlt_factory_producer( profile, service, resource );
if ( clone == NULL && resource != NULL )
- clone = mlt_factory_producer( profile, mlt_environment( "MLT_PRODUCER" ), resource );
+ clone = mlt_factory_producer( profile, NULL, resource );
if ( clone != NULL )
mlt_properties_inherit( MLT_PRODUCER_PROPERTIES( clone ), properties );
/** Copy a serializable property to properties list that is mirroring this one.
*
- * Special case - when a container (such as fezzik) is protecting another
+ * Special case - when a container (such as loader) is protecting another
* producer, we need to ensure that properties are passed through to the
* real producer.
* \private \memberof mlt_properties_s
/*
- * io.c -- inigo input/output
+ * io.c -- melt input/output
* Copyright (C) 2002-2003 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
/*
- * io.h -- inigo input/output
+ * io.h -- melt input/output
* Copyright (C) 2002-2003 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
/*
- * inigo.c -- MLT command line utility
+ * melt.c -- MLT command line utility
* Copyright (C) 2002-2008 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
{
int i;
mlt_consumer consumer = NULL;
- mlt_producer inigo = NULL;
+ mlt_producer melt = NULL;
FILE *store = NULL;
char *name = NULL;
mlt_profile profile = NULL;
if ( !strcmp( argv[ i ], "-serialise" ) )
{
name = argv[ ++ i ];
- if ( name != NULL && strstr( name, ".inigo" ) )
+ if ( name != NULL && strstr( name, ".melt" ) )
store = fopen( name, "w" );
else
{
}
else if ( !strcmp( argv[ i ], "-version" ) || !strcmp( argv[ i ], "--version" ) )
{
- fprintf( stderr, "MLT inigo " VERSION "\n"
+ fprintf( stderr, "MLT melt " VERSION "\n"
"Copyright (C) 2002-2008 Ushodaya Enterprises Limited\n"
"<http://www.mltframework.org/>\n"
"This is free software; see the source for copying conditions. There is NO\n"
if ( store == NULL && consumer == NULL )
consumer = create_consumer( profile, NULL );
- // Get inigo producer
+ // Get melt producer
if ( argc > 1 )
- inigo = mlt_factory_producer( profile, "inigo", &argv[ 1 ] );
+ melt = mlt_factory_producer( profile, "melt", &argv[ 1 ] );
// Set transport properties on consumer and produder
- if ( consumer != NULL && inigo != NULL )
+ if ( consumer != NULL && melt != NULL )
{
- mlt_properties_set_data( MLT_CONSUMER_PROPERTIES( consumer ), "transport_producer", inigo, 0, NULL, NULL );
- mlt_properties_set_data( MLT_PRODUCER_PROPERTIES( inigo ), "transport_consumer", consumer, 0, NULL, NULL );
+ mlt_properties_set_data( MLT_CONSUMER_PROPERTIES( consumer ), "transport_producer", melt, 0, NULL, NULL );
+ mlt_properties_set_data( MLT_PRODUCER_PROPERTIES( melt ), "transport_consumer", consumer, 0, NULL, NULL );
if ( is_progress )
mlt_properties_set_int( MLT_CONSUMER_PROPERTIES( consumer ), "progress", is_progress );
if ( is_silent )
mlt_properties_set_int( MLT_CONSUMER_PROPERTIES( consumer ), "silent", is_silent );
}
- if ( argc > 1 && inigo != NULL && mlt_producer_get_length( inigo ) > 0 )
+ if ( argc > 1 && melt != NULL && mlt_producer_get_length( melt ) > 0 )
{
// Parse the arguments
for ( i = 1; i < argc; i ++ )
if ( consumer != NULL && store == NULL )
{
- // Get inigo's properties
- mlt_properties inigo_props = MLT_PRODUCER_PROPERTIES( inigo );
+ // Get melt's properties
+ mlt_properties melt_props = MLT_PRODUCER_PROPERTIES( melt );
// Get the last group
- mlt_properties group = mlt_properties_get_data( inigo_props, "group", 0 );
+ mlt_properties group = mlt_properties_get_data( melt_props, "group", 0 );
// Apply group settings
mlt_properties properties = MLT_CONSUMER_PROPERTIES( consumer );
mlt_properties_inherit( properties, group );
- // Connect consumer to inigo
- mlt_consumer_connect( consumer, MLT_PRODUCER_SERVICE( inigo ) );
+ // Connect consumer to melt
+ mlt_consumer_connect( consumer, MLT_PRODUCER_SERVICE( melt ) );
// Start the consumer
mlt_consumer_start( consumer );
// Transport functionality
- transport( inigo, consumer );
+ transport( melt, consumer );
// Stop the consumer
mlt_consumer_stop( consumer );
else
{
fprintf( stderr,
-"Usage: inigo [options] [producer [name=value]* ]+\n"
+"Usage: melt [options] [producer [name=value]* ]+\n"
"Options:\n"
" -attach filter[:arg] [name=value]* Attach a filter to the output\n"
" -attach-cut filter[:arg] [name=value]* Attach a filter to a cut\n"
mlt_consumer_close( consumer );
// Close the producer
- if ( inigo != NULL )
- mlt_producer_close( inigo );
+ if ( melt != NULL )
+ mlt_producer_close( melt );
// Close the factory
mlt_profile_close( profile );
extern mlt_filter filter_watermark_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_producer producer_colour_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_producer producer_consumer_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
-extern mlt_producer producer_fezzik_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_producer producer_loader_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_producer producer_hold_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_producer producer_noise_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
extern mlt_producer producer_ppm_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
MLT_REGISTER( producer_type, "color", producer_colour_init );
MLT_REGISTER( producer_type, "colour", producer_colour_init );
MLT_REGISTER( producer_type, "consumer", producer_consumer_init );
- MLT_REGISTER( producer_type, "fezzik", producer_fezzik_init );
+ MLT_REGISTER( producer_type, "loader", producer_loader_init );
MLT_REGISTER( producer_type, "hold", producer_hold_init );
MLT_REGISTER( producer_type, "noise", producer_noise_init );
MLT_REGISTER( producer_type, "ppm", producer_ppm_init );
{
mlt_properties properties = MLT_FILTER_PROPERTIES( this );
this->process = filter_process;
- mlt_properties_set( properties, "factory", "fezzik" );
+ mlt_properties_set( properties, "factory", mlt_environment( "MLT_PRODUCER" ) );
if ( arg != NULL )
mlt_properties_set( properties, "resource", arg );
// Ensure that attached filters are handled privately
http://*=avformat
-<?xml*=westley-xml
-*.westley=westley
-*.kdenlive=westley
-*.inigo=inigo_file
+<?xml*=xml-string
+*.mlt=xml
+*.westley=xml
+*.kdenlive=xml
+*.melt=melt_file
+*.inigo=melt_file
*.asf=avformat
*.avi=mcdv,avformat,libdv
*.bmp=pixbuf,qimage,sdl_image
*.dif=mcdv,avformat,libdv
*.exr=qimage
*.gif=pixbuf,qimage,sdl_image
-*.graphics=westley
-*.jfx=westley
-*.jef=westley
+*.graphics=xml
+*.jfx=xml
+*.jef=xml
*.jpg=pixbuf,qimage,sdl_image
*.jpeg=pixbuf,qimage,sdl_image
-*.kino=westley
+*.kino=xml
*.mp3=avformat
*.mov=mcdv,avformat,libdv
*.mpg=mcmpeg,avformat
*.pgm=pgm,pixbuf,qimage,sdl_image
*.png=pixbuf,qimage,sdl_image
*.psd=qimage
-*.story=westley
+*.story=xml
*.svg=pixbuf,qimage
*.tga=pixbuf,qimage,sdl_image
*.tif=pixbuf,qimage,sdl_image
"buffer, prefill" );
// Encapsulate a real producer for the resource
- cx->producer = mlt_factory_producer( cx->profile, mlt_environment( "MLT_PRODUCER" ),
+ cx->producer = mlt_factory_producer( cx->profile, NULL,
mlt_properties_get( properties, "resource" ) );
mlt_properties_pass_list( properties, MLT_PRODUCER_PROPERTIES( cx->producer ),
"out, length" );
mlt_producer this = mlt_producer_new( );
// Encapsulate the real producer
- mlt_producer real_producer = mlt_factory_producer( profile, mlt_environment( "MLT_PRODUCER" ), arg );
+ mlt_producer real_producer = mlt_factory_producer( profile, NULL, arg );
if ( this && real_producer )
{
/*
* producer_hold.c -- frame holding producer
- * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
+ * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
* This library is free software; you can redistribute it and/or
// Construct a new holding producer
mlt_producer this = mlt_producer_new( );
- // Construct the requested producer via fezzik
- mlt_producer producer = mlt_factory_producer( profile, "fezzik", arg );
+ // Construct the requested producer via loader
+ mlt_producer producer = mlt_factory_producer( profile, NULL, arg );
// Initialise the frame holding capabilities
if ( this != NULL && producer != NULL )
/*
- * producer_fezzik.c -- a normalising filter
- * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
+ * producer_loader.c -- auto-load producer by file name extension
+ * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
* This library is free software; you can redistribute it and/or
if ( dictionary == NULL )
{
char temp[ 1024 ];
- sprintf( temp, "%s/fezzik.dict", mlt_environment( "MLT_DATA" ) );
+ sprintf( temp, "%s/core/loader.dict", mlt_environment( "MLT_DATA" ) );
dictionary = mlt_properties_load( temp );
mlt_factory_register_for_clean_up( dictionary, ( mlt_destructor )mlt_properties_close );
}
mlt_filter filter = mlt_factory_filter( profile, id, arg );
if ( filter != NULL )
{
- mlt_properties_set_int( MLT_FILTER_PROPERTIES( filter ), "_fezzik", 1 );
+ mlt_properties_set_int( MLT_FILTER_PROPERTIES( filter ), "_loader", 1 );
mlt_producer_attach( producer, filter );
mlt_filter_close( filter );
*created = 1;
if ( normalisers == NULL )
{
char temp[ 1024 ];
- sprintf( temp, "%s/fezzik.ini", mlt_environment( "MLT_DATA" ) );
+ sprintf( temp, "%s/core/loader.ini", mlt_environment( "MLT_DATA" ) );
normalisers = mlt_properties_load( temp );
mlt_factory_register_for_clean_up( normalisers, ( mlt_destructor )mlt_properties_close );
}
mlt_tokeniser_close( tokeniser );
}
-mlt_producer producer_fezzik_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+mlt_producer producer_loader_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
// Create the producer
mlt_producer producer = NULL;
if ( producer != NULL )
properties = MLT_PRODUCER_PROPERTIES( producer );
- // Attach filters if we have a producer and it isn't already westley'd :-)
- if ( producer != NULL && mlt_properties_get( properties, "westley" ) == NULL && \
- mlt_properties_get( properties, "_westley" ) == NULL && \
- mlt_properties_get( properties, "fezzik_normalised" ) == NULL )
+ // Attach filters if we have a producer and it isn't already xml'd :-)
+ if ( producer != NULL && mlt_properties_get( properties, "xml" ) == NULL && \
+ mlt_properties_get( properties, "_xml" ) == NULL && \
+ mlt_properties_get( properties, "loader_normalised" ) == NULL )
attach_normalisers( profile, producer );
// Now make sure we don't lose our identity
mlt_properties_set( properties, "start", arg != NULL ? arg : "0,0:100%x100%" );
// Default factory
- mlt_properties_set( properties, "factory", "fezzik" );
+ mlt_properties_set( properties, "factory", mlt_environment( "MLT_PRODUCER" ) );
// Use alignment (and hence alpha of b frame)
mlt_properties_set_int( properties, "aligned", 1 );
transition->process = transition_process;
// Default factory
- mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "factory", "fezzik" );
+ mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "factory", mlt_environment( "MLT_PRODUCER" ) );
// Set the main property
mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "resource", lumafile );
this->process = transition_process;
// Default factory
- mlt_properties_set( properties, "factory", "fezzik" );
+ mlt_properties_set( properties, "factory", mlt_environment( "MLT_PRODUCER" ) );
// Resource defines the shape of the region
mlt_properties_set( properties, "resource", arg == NULL ? "rectangle" : arg );
this = calloc( 1, sizeof( struct mlt_producer_s ) );
mlt_producer_init( this, NULL );
- // Wrap fezzik
+ // Wrap loader
mlt_producer real_producer;
// Check if a speed was specified.
/**
* Speed must be appended to the filename with '?'. To play your video at 50%:
- inigo framebuffer:my_video.mpg?0.5
+ melt framebuffer:my_video.mpg?0.5
* Stroboscope effect can be obtained by adding a stobe=x parameter, where
x is the number of frames that will be ignored.
*ptr = '\0';
}
- real_producer = mlt_factory_producer( profile, "fezzik", props );
+ real_producer = mlt_factory_producer( profile, NULL, props );
free( props );
if (speed == 0.0) speed = 1.0;
// Get the properties of this producer
mlt_properties properties = MLT_PRODUCER_PROPERTIES( this );
- // Fezzik normalised it for us already
- mlt_properties_set_int( properties, "fezzik_normalised", 1);
+ // The loader normalised it for us already
+ mlt_properties_set_int( properties, "loader_normalised", 1);
mlt_properties_set( properties, "resource", arg);
// Store the producer and fitler
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*
-* Tag: $Name$
-*
-* Change log:
-*
-* $Log$
-* Revision 1.4 2005/07/25 07:21:39 lilo_booter
-* + fixes for opendml dv avi
-*
-* Revision 1.3 2005/06/21 20:59:39 lilo_booter
-* src/framework/mlt_consumer.c src/framework/mlt_consumer.h
-* + Added a general profile handling for size, aspect ratio and display ratio
-*
-* src/framework/mlt_producer.c
-* + Correction to aspect ratio properties
-*
-* src/inigo/inigo.c
-* + Minimalist support for sdl_preview (still not very good)
-*
-* src/modules/avformat/consumer_avformat.c
-* + Takes consumer profile into account
-*
-* src/modules/core/filter_resize.c
-* + Corrections for synthesised producers and aspect ratio (inherits from consumer)
-*
-* src/modules/core/producer_colour.c
-* src/modules/core/producer_noise.c
-* src/modules/gtk2/producer_pango.c
-* + Ensures that resize picks up consumer aspect ratio
-*
-* src/modules/dv/consumer_libdv.c
-* + Honour wide screen output
-*
-* src/modules/gtk2/producer_pixbuf.c
-* + Correction for 1:1 aspect ratio
-*
-* src/modules/kino/Makefile
-* src/modules/kino/avi.cc
-* src/modules/kino/avi.h
-* src/modules/kino/configure
-* src/modules/kino/filehandler.cc
-* + Attempt to allow mov dv files to provide audio
-*
-* src/modules/sdl/consumer_sdl.c
-* src/modules/sdl/consumer_sdl_preview.c
-* src/modules/sdl/consumer_sdl_still.c
-* + Takes consumer profile into account
-*
-* Revision 1.2 2005/04/15 14:37:03 lilo_booter
-* Minor correction
-*
-* Revision 1.1 2005/04/15 14:28:26 lilo_booter
-* Initial version
-*
-* Revision 1.16 2005/04/01 23:43:10 ddennedy
-* apply endian fixes from Daniel Kobras
-*
-* Revision 1.15 2004/10/11 01:37:11 ddennedy
-* mutex safety locks in RIFF and AVI classes, type 2 AVI optimization, mencoder export script
-*
-* Revision 1.14 2003/11/25 23:00:52 ddennedy
-* cleanup and a few bugfixes
-*
-* Revision 1.13 2003/10/21 16:34:32 ddennedy
-* GNOME2 port phase 1: initial checkin
-*
-* Revision 1.11.2.5 2003/07/24 14:13:57 ddennedy
-* support for distinct audio stream in type2 AVI and Quicktime; support for more DV FOURCCs
-*
-* Revision 1.11.2.4 2003/06/10 23:53:36 ddennedy
-* Daniel Kobras' WriteFrame error handling and automatic OpenDML, bugfixes in scene list updates, export AV/C Record
-*
-* Revision 1.11.2.3 2003/02/20 21:59:57 ddennedy
-* bugfixes to capture and AVI
-*
-* Revision 1.11.2.2 2003/01/13 05:15:31 ddennedy
-* added More Info panel and supporting methods
-*
-* Revision 1.11.2.1 2002/11/25 04:48:31 ddennedy
-* bugfix to report errors when loading files
-*
-* Revision 1.11 2002/10/08 07:46:41 ddennedy
-* AVI bugfixes, compatibility, optimization, warn bad file in capture and export dv file, allow no mplex
-*
-* Revision 1.10 2002/05/17 08:04:25 ddennedy
-* revert const-ness of Frame references in Frame, FileHandler, and AVI classes
-*
-* Revision 1.9 2002/05/15 04:39:35 ddennedy
-* bugfixes to dv2 AVI write, audio export, Xv init
-*
-* Revision 1.8 2002/04/29 05:09:22 ddennedy
-* raw dv file support, Frame::ExtractAudio uses libdv, audioScrub prefs
-*
-* Revision 1.7 2002/04/09 06:53:42 ddennedy
-* cleanup, new libdv 0.9.5, large AVI, dnd storyboard
-*
-* Revision 1.7 2002/03/25 21:34:25 arne
-* Support for large (64 bit) files mostly completed
-*
-* Revision 1.6 2002/03/10 13:29:41 arne
-* more changes for 64 bit access
-*
-* Revision 1.5 2002/03/09 17:59:28 arne
-* moved index routines to AVIFile
-*
-* Revision 1.4 2002/03/09 10:26:26 arne
-* improved constructors and assignment operator
-*
-* Revision 1.3 2002/03/09 08:55:57 arne
-* moved a few variables to AVIFile
-*
-* Revision 1.2 2002/03/04 19:22:43 arne
-* updated to latest Kino avi code
-*
-* Revision 1.1.1.1 2002/03/03 19:08:08 arne
-* import of version 1.01
-*
*/
/** Common AVI declarations
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*
-* Tag: $Name$
-*
-* Change log:
-*
-* $Log$
-* Revision 1.3 2005/07/25 14:41:29 lilo_booter
-* + Minor correction for entry length being less than the data length
-*
-* Revision 1.2 2005/07/25 07:21:39 lilo_booter
-* + fixes for opendml dv avi
-*
-* Revision 1.1 2005/04/15 14:28:26 lilo_booter
-* Initial version
-*
-* Revision 1.18 2005/04/01 23:43:10 ddennedy
-* apply endian fixes from Daniel Kobras
-*
-* Revision 1.17 2004/10/11 01:37:11 ddennedy
-* mutex safety locks in RIFF and AVI classes, type 2 AVI optimization, mencoder export script
-*
-* Revision 1.16 2003/11/25 23:01:24 ddennedy
-* cleanup and a few bugfixes
-*
-* Revision 1.15 2003/10/21 16:34:34 ddennedy
-* GNOME2 port phase 1: initial checkin
-*
-* Revision 1.13.2.3 2003/08/26 20:39:00 ddennedy
-* relocate mutex unlock and add assert includes
-*
-* Revision 1.13.2.2 2003/01/28 12:54:13 lilo_booter
-* New 'no change' image transition
-*
-* Revision 1.13.2.1 2002/11/25 04:48:31 ddennedy
-* bugfix to report errors when loading files
-*
-* Revision 1.13 2002/09/13 06:49:49 ddennedy
-* build update, cleanup, bugfixes
-*
-* Revision 1.12 2002/04/21 06:36:40 ddennedy
-* kindler avc and 1394 bus reset support in catpure page, honor max file size
-*
-* Revision 1.11 2002/04/09 06:53:42 ddennedy
-* cleanup, new libdv 0.9.5, large AVI, dnd storyboard
-*
-* Revision 1.4 2002/03/25 21:34:25 arne
-* Support for large (64 bit) files mostly completed
-*
-* Revision 1.3 2002/03/10 21:28:29 arne
-* release 1.1b1, 64 bit support for type 1 avis
-*
-* Revision 1.2 2002/03/04 19:22:43 arne
-* updated to latest Kino avi code
-*
-* Revision 1.1.1.1 2002/03/03 19:08:08 arne
-* import of version 1.01
-*
*/
#include "config.h"
#include <string.h>
#include <framework/mlt.h>
-extern mlt_producer producer_inigo_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
-extern mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
+extern mlt_producer producer_melt_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_producer producer_melt_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
MLT_REPOSITORY
{
- MLT_REGISTER( producer_type, "inigo", producer_inigo_init );
- MLT_REGISTER( producer_type, "inigo_file", producer_inigo_file_init );
+ MLT_REGISTER( producer_type, "melt", producer_melt_init );
+ MLT_REGISTER( producer_type, "melt_file", producer_melt_file_init );
}
/*
- * producer_inigo.c -- simple inigo test case
+ * producer_melt.c -- load from melt command line syntax
* Copyright (C) 2003-2004 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
#include <framework/mlt.h>
-mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
+mlt_producer producer_melt_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv );
-mlt_producer producer_inigo_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *file )
+mlt_producer producer_melt_file_init( mlt_profile profile, mlt_service_type type, const char *id, char *file )
{
FILE *input = fopen( file, "r" );
char **args = calloc( sizeof( char * ), 1000 );
}
}
- mlt_producer result = producer_inigo_init( profile, type, id, args );
+ mlt_producer result = producer_melt_init( profile, type, id, args );
if ( result != NULL )
{
static mlt_producer create_producer( mlt_profile profile, mlt_field field, char *file )
{
- mlt_producer result = mlt_factory_producer( profile, "fezzik", file );
+ mlt_producer result = mlt_factory_producer( profile, NULL, file );
if ( result != NULL )
track_service( field, result, ( mlt_destructor )mlt_producer_close );
return transition;
}
-mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv )
+mlt_producer producer_melt_init( mlt_profile profile, mlt_service_type type, const char *id, char **argv )
{
int i;
int track = 0;
char *title = NULL;
// Assistance for template construction (allows -track usage to specify the first track)
- mlt_properties_set_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_inigo_first", 1 );
+ mlt_properties_set_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first", 1 );
// We need to track the number of registered filters
mlt_properties_set_int( field_properties, "registered", 0 );
if ( producer != NULL && !mlt_producer_is_cut( producer ) )
mlt_playlist_append( playlist, producer );
producer = NULL;
- if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_inigo_first" ) ||
+ if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) ||
mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 )
{
mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track ++ );
track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
// We must have a playlist to connect
- if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_inigo_first" ) ||
+ if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) ||
mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 )
mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track );
install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
test: $(TARGET)
- ~/mlt-devel/mlt/src/inigo/inigo -filter motion_est -filter vismv -filter benchmark -consumer sdl rescale=none real_time=0 audio_off=1 silent=1 /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=50000
+ ~/mlt-devel/mlt/src/melt/melt -filter motion_est -filter vismv -filter benchmark -consumer sdl rescale=none real_time=0 audio_off=1 silent=1 /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=50000
hist: $(TARGET)
- ~/mlt-devel/mlt/src/inigo/inigo -filter motion_est -filter histogram -consumer sdl rescale=none real_time=0 audio_off=1 silent=1 /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=40000
+ ~/mlt-devel/mlt/src/melt/melt -filter motion_est -filter histogram -consumer sdl rescale=none real_time=0 audio_off=1 silent=1 /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=40000
test2: $(TARGET)
- inigo colour:black -filter watermark:"+mello.txt" composite.geometry="0,0:10%x10%;99=90%,90%" composite.out=99 -filter crop_detect -filter motion_est -filter vismv
+ melt colour:black -filter watermark:"+mello.txt" composite.geometry="0,0:10%x10%;99=90%,90%" composite.out=99 -filter crop_detect -filter motion_est -filter vismv
realtime: $(TARGET)
- ~/mlt-devel/mlt/src/inigo/inigo -filter motion_est -filter vismv -consumer sdl rescale=none /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=30000
+ ~/mlt-devel/mlt/src/melt/melt -filter motion_est -filter vismv -consumer sdl rescale=none /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=30000
testhist: $(TARGET)
- ~/mlt-devel/mlt/src/inigo/inigo -consumer sdl rescale=none silent=1 -filter motion_est -filter histogram -filter vismv /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=10000
+ ~/mlt-devel/mlt/src/melt/melt -consumer sdl rescale=none silent=1 -filter motion_est -filter histogram -filter vismv /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=10000
ifneq ($(wildcard .depend),)
Estimate the motion:
- > inigo -filter motion_est <movie_file>
+ > melt -filter motion_est <movie_file>
To display the motion vectors as pretty arrows:
- > inigo -filter motion_est -filter vismv <movie_file>
+ > melt -filter motion_est -filter vismv <movie_file>
If your using a movie file that contains a crop, you will get better results with this:
- > inigo -filter crop_detect -filter motion_est -filter vismv <movie_file>
+ > melt -filter crop_detect -filter motion_est -filter vismv <movie_file>
If your computer is unable to do the above examples in real time, try this:
- > inigo -filter motion_est -filter vismv -consumer inigo real_time=0 <movie_file>
+ > melt -filter motion_est -filter vismv -consumer melt real_time=0 <movie_file>
If you'd like to see the motion vectors without the median denoising function, do this:
- > inigo -filter motion_est denoise=0 -filter vismv <movie_file>
+ > melt -filter motion_est denoise=0 -filter vismv <movie_file>
To reconstruct each frame by applying the motion to the previous frame:
- > inigo -filter motion_est show_reconstruction=1 <movie_file>
+ > melt -filter motion_est show_reconstruction=1 <movie_file>
To compare the reconstructed frame and the real frame (while paused):
- > inigo -filter motion_est show_reconstruction=1 toggle_when_paused=1 <movie_file>
+ > melt -filter motion_est show_reconstruction=1 toggle_when_paused=1 <movie_file>
To show the difference (residual) between the reconstructed frame the real frame:
- > inigo -filter motion_est show_residual=1 <movie_file>
+ > melt -filter motion_est show_residual=1 <movie_file>
To automatically track an object in the frame, try this:
- > inigo -filter autotrack_rectangle:X,Y:WxH debug=1 <movie_file>
+ > melt -filter autotrack_rectangle:X,Y:WxH debug=1 <movie_file>
(Where X,Y is the origin of the rectangle indexed from upper left and WxH is the dimensions of the rectangle.)
To obscure that same object in the frame, try this:
- > inigo -filter autotrack_rectangle:X,Y:WxH obscure=1 <movie_file>
+ > melt -filter autotrack_rectangle:X,Y:WxH obscure=1 <movie_file>
There is now a slow motion producer that does interpolation based on the motion vectors:
- > inigo slowmotion:<movie_file> _speed=0.1 method=1 debug=1
+ > melt slowmotion:<movie_file> _speed=0.1 method=1 debug=1
NOTES (and deficiencies):
{
mlt_producer this = mlt_producer_new( );
- // Wrap fezzik
- mlt_producer real_producer = mlt_factory_producer( profile, "fezzik", arg );
+ // Wrap the loader
+ mlt_producer real_producer = mlt_factory_producer( profile, NULL, arg );
// We need to apply the motion estimation filter manually
mlt_filter filter = mlt_factory_filter( profile, "motion_est", NULL );
// Get the properties of this producer
mlt_properties properties = MLT_PRODUCER_PROPERTIES( this );
- // Fezzik normalised it for us already
- mlt_properties_set_int( properties, "fezzik_normalised", 1);
+ // The loader normalised it for us already
+ mlt_properties_set_int( properties, "loader_normalised", 1);
// Store the producer and fitler
mlt_properties_set_data( properties, "producer", real_producer, 0, ( mlt_destructor )mlt_producer_close, NULL );
{
char *background = mlt_properties_get( properties, "background" );
mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
- producer = mlt_factory_producer( profile, "fezzik", background );
+ producer = mlt_factory_producer( profile, NULL, background );
mlt_properties_set_data( properties, "producer", producer, 0, (mlt_destructor)mlt_producer_close, NULL );
}
/*
- * consumer_westley.c -- a libxml2 serialiser of mlt service networks
- * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
+ * consumer_xml.c -- a libxml2 serialiser of mlt service networks
+ * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
* Author: Dan Dennedy <dan@dennedy.org>
*
* This library is free software; you can redistribute it and/or
typedef enum
{
- westley_existing,
- westley_producer,
- westley_multitrack,
- westley_playlist,
- westley_tractor,
- westley_filter,
- westley_transition
+ xml_existing,
+ xml_producer,
+ xml_multitrack,
+ xml_playlist,
+ xml_tractor,
+ xml_filter,
+ xml_transition
}
-westley_type;
+xml_type;
/** Create or retrieve an id associated to this service.
*/
-static char *westley_get_id( serialise_context context, mlt_service service, westley_type type )
+static char *xml_get_id( serialise_context context, mlt_service service, xml_type type )
{
char *id = NULL;
int i = 0;
break;
// If the service is not in the map, and the type indicates a new id is needed...
- if ( i >= mlt_properties_count( map ) && type != westley_existing )
+ if ( i >= mlt_properties_count( map ) && type != xml_existing )
{
// Attempt to reuse existing id
id = mlt_properties_get( MLT_SERVICE_PROPERTIES( service ), "id" );
{
switch( type )
{
- case westley_producer:
+ case xml_producer:
sprintf( temp, "producer%d", context->producer_count ++ );
break;
- case westley_multitrack:
+ case xml_multitrack:
sprintf( temp, "multitrack%d", context->multitrack_count ++ );
break;
- case westley_playlist:
+ case xml_playlist:
sprintf( temp, "playlist%d", context->playlist_count ++ );
break;
- case westley_tractor:
+ case xml_tractor:
sprintf( temp, "tractor%d", context->tractor_count ++ );
break;
- case westley_filter:
+ case xml_filter:
sprintf( temp, "filter%d", context->filter_count ++ );
break;
- case westley_transition:
+ case xml_transition:
sprintf( temp, "transition%d", context->transition_count ++ );
break;
- case westley_existing:
+ case xml_existing:
// Never gets here
break;
}
mlt_properties_set_data( map, id, service, 0, NULL, NULL );
}
}
- else if ( type == westley_existing )
+ else if ( type == xml_existing )
{
id = mlt_properties_get_name( map, i );
}
via the argument, but keep it simple.
*/
-mlt_consumer consumer_westley_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
+mlt_consumer consumer_xml_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
// Create the consumer object
mlt_consumer this = calloc( sizeof( struct mlt_consumer_s ), 1 );
if ( name != NULL &&
name[ 0 ] != '_' &&
mlt_properties_get_value( properties, i ) != NULL &&
- strcmp( name, "westley" ) != 0 &&
+ strcmp( name, "mlt" ) != 0 &&
strcmp( name, "in" ) != 0 &&
strcmp( name, "out" ) != 0 &&
strcmp( name, "id" ) != 0 &&
for ( i = 0; ( filter = mlt_producer_filter( MLT_PRODUCER( service ), i ) ) != NULL; i ++ )
{
mlt_properties properties = MLT_FILTER_PROPERTIES( filter );
- if ( mlt_properties_get_int( properties, "_fezzik" ) == 0 )
+ if ( mlt_properties_get_int( properties, "_loader" ) == 0 )
{
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, MLT_FILTER_SERVICE( filter ), westley_filter );
+ char *id = xml_get_id( context, MLT_FILTER_SERVICE( filter ), xml_filter );
if ( id != NULL )
{
int in = mlt_properties_get_position( properties, "in" );
{
mlt_properties properties = MLT_SERVICE_PROPERTIES( parent );
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, parent, westley_producer );
+ char *id = xml_get_id( context, parent, xml_producer );
if ( id == NULL )
return;
}
else
{
- char *id = westley_get_id( context, parent, westley_existing );
+ char *id = xml_get_id( context, parent, xml_existing );
mlt_properties properties = MLT_SERVICE_PROPERTIES( service );
xmlNewProp( node, _x("parent"), _x(id) );
xmlNewProp( node, _x("in"), _x(mlt_properties_get( properties, "in" )) );
else
{
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, service, westley_multitrack );
+ char *id = xml_get_id( context, service, xml_multitrack );
if ( id == NULL )
return;
mlt_service parent = MLT_SERVICE( mlt_producer_cut_parent( producer ) );
- char *id = westley_get_id( context, MLT_SERVICE( parent ), westley_existing );
+ char *id = xml_get_id( context, MLT_SERVICE( parent ), xml_existing );
xmlNewProp( track, _x("producer"), _x(id) );
if ( mlt_producer_is_cut( producer ) )
{
if ( context->pass == 0 )
{
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, service, westley_playlist );
+ char *id = xml_get_id( context, service, xml_playlist );
if ( id == NULL )
return;
{
char temp[ 20 ];
xmlNode *entry = xmlNewChild( child, NULL, _x("entry"), NULL );
- id = westley_get_id( context, MLT_SERVICE( producer ), westley_existing );
+ id = xml_get_id( context, MLT_SERVICE( producer ), xml_existing );
xmlNewProp( entry, _x("producer"), _x(id) );
sprintf( temp, "%d", (int)info.frame_in );
xmlNewProp( entry, _x("in"), _x(temp) );
}
else if ( xmlStrcmp( node->name, _x("tractor") ) != 0 )
{
- char *id = westley_get_id( context, service, westley_existing );
+ char *id = xml_get_id( context, service, xml_existing );
xmlNewProp( node, _x("producer"), _x(id) );
}
}
else
{
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, service, westley_tractor );
+ char *id = xml_get_id( context, service, xml_tractor );
if ( id == NULL )
return;
if ( context->pass == 1 )
{
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, service, westley_filter );
+ char *id = xml_get_id( context, service, xml_filter );
if ( id == NULL )
return;
if ( context->pass == 1 )
{
// Get a new id - if already allocated, do nothing
- char *id = westley_get_id( context, service, westley_transition );
+ char *id = xml_get_id( context, service, xml_transition );
if ( id == NULL )
return;
if ( strcmp( mlt_type, "producer" ) == 0 )
{
char *mlt_service = mlt_properties_get( properties, "mlt_service" );
- if ( mlt_properties_get( properties, "westley" ) == NULL && ( mlt_service != NULL && !strcmp( mlt_service, "tractor" ) ) )
+ if ( mlt_properties_get( properties, "xml" ) == NULL && ( mlt_service != NULL && !strcmp( mlt_service, "tractor" ) ) )
{
context->pass = 0;
serialise_tractor( context, service, node );
{
serialise_producer( context, service, node );
}
- if ( mlt_properties_get( properties, "westley" ) != NULL )
+ if ( mlt_properties_get( properties, "xml" ) != NULL )
break;
}
}
}
-xmlDocPtr westley_make_doc( mlt_consumer consumer, mlt_service service )
+xmlDocPtr xml_make_doc( mlt_consumer consumer, mlt_service service )
{
mlt_properties properties = MLT_SERVICE_PROPERTIES( service );
xmlDocPtr doc = xmlNewDoc( _x("1.0") );
- xmlNodePtr root = xmlNewNode( NULL, _x("westley") );
+ xmlNodePtr root = xmlNewNode( NULL, _x("mlt") );
struct serialise_context_s *context = calloc( 1, sizeof( struct serialise_context_s ) );
xmlDocSetRootElement( doc, root );
}
// Make the document
- doc = westley_make_doc( this, service );
+ doc = xml_make_doc( this, service );
// Handle the output
if ( resource == NULL || !strcmp( resource, "" ) )
#include <string.h>
#include <framework/mlt.h>
-extern mlt_consumer consumer_westley_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
-extern mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_consumer consumer_xml_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+extern mlt_producer producer_xml_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
MLT_REPOSITORY
{
- MLT_REGISTER( consumer_type, "westley", consumer_westley_init );
- MLT_REGISTER( producer_type, "westley", producer_westley_init );
- MLT_REGISTER( producer_type, "westley-xml", producer_westley_init );
+ MLT_REGISTER( consumer_type, "xml", consumer_xml_init );
+ MLT_REGISTER( producer_type, "xml", producer_xml_init );
+ MLT_REGISTER( producer_type, "xml-string", producer_xml_init );
}
<?xml version='1.0' encoding='utf-8'?>
-<!-- MLT westley DTD v0.1.0 -->
+<!-- MLT XML DTD v0.1.0 -->
-<!ELEMENT westley (producer | playlist | tractor | multitrack)+ >
+<!ELEMENT mlt (producer | playlist | tractor | multitrack)+ >
<!ELEMENT property ANY >
<!ATTLIST property
name CDATA #REQUIRED
/*
- * producer_westley.c -- a libxml2 parser of mlt service networks
- * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
+ * producer_xml.c -- a libxml2 parser of mlt service networks
+ * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
* Author: Dan Dennedy <dan@dennedy.org>
*
* This library is free software; you can redistribute it and/or
#undef DEBUG
#ifdef DEBUG
-extern xmlDocPtr westley_make_doc( mlt_service service );
+extern xmlDocPtr xml_make_doc( mlt_service service );
#endif
enum service_type
this->stack_types[ this->stack_service_size++ ] = type;
// Record the tree branch on which this service lives
- if ( that != NULL && mlt_properties_get( MLT_SERVICE_PROPERTIES( that ), "_westley_branch" ) == NULL )
+ if ( that != NULL && mlt_properties_get( MLT_SERVICE_PROPERTIES( that ), "_xml_branch" ) == NULL )
{
char s[ BRANCH_SIG_LEN ];
- mlt_properties_set( MLT_SERVICE_PROPERTIES( that ), "_westley_branch", serialise_branch( this, s ) );
+ mlt_properties_set( MLT_SERVICE_PROPERTIES( that ), "_xml_branch", serialise_branch( this, s ) );
}
}
return ret;
if ( service != NULL && container != NULL )
{
- char *container_branch = mlt_properties_get( MLT_SERVICE_PROPERTIES( container ), "_westley_branch" );
- char *service_branch = mlt_properties_get( MLT_SERVICE_PROPERTIES( service ), "_westley_branch" );
+ char *container_branch = mlt_properties_get( MLT_SERVICE_PROPERTIES( container ), "_xml_branch" );
+ char *service_branch = mlt_properties_get( MLT_SERVICE_PROPERTIES( service ), "_xml_branch" );
contained = !strncmp( container_branch, service_branch, strlen( container_branch ) );
}
type = mlt_tractor_type;
// Flag it as a synthesised tractor for clean up later
- mlt_properties_set_int( MLT_SERVICE_PROPERTIES( parent ), "fezzik_synth", 1 );
+ mlt_properties_set_int( MLT_SERVICE_PROPERTIES( parent ), "loader_synth", 1 );
}
if ( type == mlt_tractor_type )
// Out will be overwritten later as we append, so we need to save it
if ( xmlStrcmp( atts[ 0 ], _x("out") ) == 0 )
- mlt_properties_set( properties, "_westley.out", ( const char* )atts[ 1 ] );
+ mlt_properties_set( properties, "_xml.out", ( const char* )atts[ 1 ] );
}
if ( mlt_properties_get( properties, "id" ) != NULL )
strcat( temp, ":" );
strncat( temp, resource, 1023 - strlen( temp ) );
}
- producer = MLT_SERVICE( mlt_factory_producer( context->profile, "fezzik", temp ) );
+ producer = MLT_SERVICE( mlt_factory_producer( context->profile, NULL, temp ) );
}
// Just in case the plugin requested doesn't exist...
if ( producer == NULL && resource != NULL )
- producer = MLT_SERVICE( mlt_factory_producer( context->profile, "fezzik", resource ) );
+ producer = MLT_SERVICE( mlt_factory_producer( context->profile, NULL, resource ) );
if ( producer == NULL )
- producer = MLT_SERVICE( mlt_factory_producer( context->profile, "fezzik", "+INVALID.txt" ) );
+ producer = MLT_SERVICE( mlt_factory_producer( context->profile, NULL, "+INVALID.txt" ) );
if ( producer == NULL )
- producer = MLT_SERVICE( mlt_factory_producer( context->profile, "fezzik", "colour:red" ) );
+ producer = MLT_SERVICE( mlt_factory_producer( context->profile, NULL, "colour:red" ) );
// Track this producer
track_service( context->destructors, producer, (mlt_destructor) mlt_producer_close );
on_start_transition( context, name, atts );
else if ( xmlStrcmp( name, _x("property") ) == 0 )
on_start_property( context, name, atts );
- else if ( xmlStrcmp( name, _x("westley") ) == 0 )
+ else if ( xmlStrcmp( name, _x("westley") ) == 0 || xmlStrcmp( name, _x("mlt") ) == 0 )
for ( ; atts != NULL && *atts != NULL; atts += 2 )
mlt_properties_set( context->producer_map, ( const char * )atts[ 0 ], ( const char * )atts[ 1 ] );
}
params_to_entities( context );
}
-// TODO: Check this with Dan... I think this is for westley parameterisation
+// TODO: Check this with Dan... I think this is for parameterisation
// but it's breaking standard escaped entities (like < etc).
static void on_entity_declaration( void *ctx, const xmlChar* name, int type,
const xmlChar* publicId, const xmlChar* systemId, xmlChar* content)
// Setup for entity declarations if not ready
if ( xmlGetIntSubset( context->entity_doc ) == NULL )
{
- xmlCreateIntSubset( context->entity_doc, _x("westley"), _x(""), _x("") );
+ xmlCreateIntSubset( context->entity_doc, _x("mlt"), _x(""), _x("") );
context->publicId = _x("");
context->systemId = _x("");
}
return exists;
}
-mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type servtype, const char *id, char *data )
+mlt_producer producer_xml_init( mlt_profile profile, mlt_service_type servtype, const char *id, char *data )
{
xmlSAXHandler *sax = calloc( 1, sizeof( xmlSAXHandler ) );
struct deserialise_context_s *context = calloc( 1, sizeof( struct deserialise_context_s ) );
struct _xmlParserCtxt *xmlcontext;
int well_formed = 0;
char *filename = NULL;
- int info = strcmp( id, "westley-xml" ) ? 0 : 1;
+ int info = strcmp( id, "xml-string" ) ? 0 : 1;
if ( data == NULL || !strcmp( data, "" ) || ( info == 0 && !file_exists( data ) ) )
return NULL;
filename = strdup( data );
parse_url( context->params, url_decode( filename, data ) );
- // We need the directory prefix which was used for the westley
+ // We need the directory prefix which was used for the xml
if ( strchr( filename, '/' ) )
{
char *root = NULL;
}
#ifdef DEBUG
- xmlDocPtr doc = westley_make_doc( service );
+ xmlDocPtr doc = xml_make_doc( service );
xmlDocFormatDump( stdout, doc, 1 );
xmlFreeDoc( doc );
service = NULL;
mlt_producer_optimise( MLT_PRODUCER( service ) );
// Handle deep copies
- if ( getenv( "MLT_WESTLEY_DEEP" ) == NULL )
+ if ( getenv( "MLT_XML_DEEP" ) == NULL )
{
// Now assign additional properties
if ( info == 0 )
mlt_properties_set( properties, "resource", data );
- // This tells consumer_westley not to deep copy
- mlt_properties_set( properties, "westley", "was here" );
+ // This tells consumer_xml not to deep copy
+ mlt_properties_set( properties, "xml", "was here" );
}
else
{
// Allow the project to be edited
- mlt_properties_set( properties, "_westley", "was here" );
+ mlt_properties_set( properties, "_xml", "was here" );
mlt_properties_set_int( properties, "_mlt_service_hidden", 1 );
}
}
-SUBDIRS = perl python ruby tcl
+SUBDIRS = java perl php python ruby tcl
all clean install:
list='$(SUBDIRS)'; \
exit 0
fi
-for i in perl php python ruby tcl
+for i in java perl php python ruby tcl
do
rm -f .$i
done
-import net.sourceforge.mltpp.*;
+import net.sourceforge.mlt.*;
public class Play {
static {
- System.loadLibrary("mltpp_java");
+ System.loadLibrary("mlt_java");
}
public static void main (String[] args) {
ln -sf ../mltpp.i .
# Invoke swig
- mkdir -p src_swig/net/sourceforge/mltpp
- swig -c++ -I../../src `pkg-config mlt-framework --cflags` -java -outdir src_swig/net/sourceforge/mltpp -package net.sourceforge.mltpp mltpp.i || exit $?
+ mkdir -p src_swig/net/sourceforge/mlt
+ swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -java -outdir src_swig/net/sourceforge/mlt -package net.sourceforge.mlt mltpp.i || exit $?
# Compile the wrapper
- g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../src `pkg-config mlt-framework --cflags` mltpp_wrap.cxx $JAVA_INCLUDE || exit $?
+ g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../mlt++ `pkg-config mlt-framework --cflags` mlt_wrap.cxx $JAVA_INCLUDE || exit $?
# Create the module
- gcc -shared mltpp_wrap.o -L../../src -lmlt++ -o libmltpp_java.so || exit $?
+ gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmlt_java.so || exit $?
# Compile the test
javac `find src_swig -name '*.java'` || exit $?
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-%module mltpp
+%module mlt
%include "carrays.i"
%array_class(unsigned char, unsignedCharArray);
%newobject Tractor::field( );
%newobject Tractor::track( int );
%newobject Frame::get_original_producer( );
-%newobject Miracle::execute( char * );
-%newobject Miracle::push( char *, Service & );
-%newobject Miracle::unit( int );
%newobject Repository::consumers( );
%newobject Repository::filters( );
%newobject Repository::producers( );
%include <MltTractor.h>
%include <MltParser.h>
%include <MltFilteredConsumer.h>
-%include <MltMiracle.h>
-%include <MltResponse.h>
#if defined(SWIGRUBY)
my $CXX = $ENV{'CXX'} || 'g++';
system( "ln -sf ../mltpp.i ." );
-system( "swig -c++ -I../../src `pkg-config mlt-framework --cflags` -perl5 mltpp.i" );
+system( "swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -perl5 mltpp.i" );
WriteMakefile(
- 'NAME' => 'mltpp',
- 'CC' => '${CXX} `pkg-config mlt-framework --cflags` -I../../src',
+ 'NAME' => 'mlt',
+ 'CC' => '${CXX} `pkg-config mlt-framework --cflags` -I../../mlt++',
'OPTIMIZE' => '-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386',
- 'LIBS' => ['-L../../src -lmlt++'],
- 'OBJECT' => 'mltpp_wrap.o',
+ 'LIBS' => ['-L../../mlt++ -lmlt++'],
+ 'OBJECT' => 'mlt_wrap.o',
'DESTDIR' => $ENV{'DESTDIR'},
);
#!/usr/bin/env perl
# Import required modules
-use mltpp;
+use mlt;
-# Not sure why the mltpp::Factory.init method fails...
-mltpp::mlt_factory_init( undef );
+# Not sure why the mlt::Factory.init method fails...
+mlt::mlt_factory_init( undef );
# Establish the MLT profile
-$profile = new mltpp::Profile( undef );
+$profile = new mlt::Profile( undef );
# Create the producer
-$p = new mltpp::Producer( $profile, $ARGV[0] );
+$p = new mlt::Producer( $profile, $ARGV[0] );
if ( $p->is_valid( ) )
{
$p->set( "eof", "loop" );
# Create the consumer
- $c = new mltpp::FilteredConsumer( $profile, "sdl" );
+ $c = new mlt::FilteredConsumer( $profile, "sdl" );
# Turn of the default rescaling
$c->set( "rescale", "none" );
print "Unable to open $ARGV[0]\n";
}
-mltpp::mlt_factory_close( );
+mlt::mlt_factory_close( );
#!/bin/sh
ln -s ../mltpp.i
-swig -c++ -I../../src `pkg-config --cflags mlt-framework` -php5 -noproxy mltpp.i
-g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread `pkg-config --cflags mlt-framework` `php-config --includes` mltpp_wrap.cpp
+swig -c++ -I../../mlt+++ `pkg-config --cflags mlt-framework` -php5 -noproxy mltpp.i
+g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread `pkg-config --cflags mlt-framework` `php-config --includes` mlt_wrap.cpp
<?php
$filename = $argv[1];
-dl("mltpp.so");
+dl("mlt.so");
mlt_factory_init(NULL);
$profile = new_profile("dv_ntsc");
$p = new_producer( $profile, $filename );
ln -sf ../mltpp.i .
# Invoke swig
- swig -c++ -I../../src `pkg-config mlt-framework --cflags` -python mltpp.i || exit $?
+ swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -python mltpp.i || exit $?
# Compile the wrapper
- g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread `pkg-config mlt-framework --cflags` -I$PYTHON_INCLUDE mltpp_wrap.cxx || exit $?
+ g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread `pkg-config mlt-framework --cflags` -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
# Create the module
- gcc -shared mltpp_wrap.o -L../../src -lmlt++ -o _mltpp.so || exit $?
+ gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o _mlt.so || exit $?
else
echo Python not installed.
exit 1
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
# Import required modules
-import mltpp
+import mlt
import time
import sys
# Start the mlt system
-mltpp.Factory().init( )
+mlt.Factory().init( )
# Establish a profile
-profile = mltpp.Profile( )
+profile = mlt.Profile( )
# Create the producer
-p = mltpp.Producer( profile, sys.argv[1] )
+p = mlt.Producer( profile, sys.argv[1] )
if p:
# Create the consumer
- c = mltpp.Consumer( profile, "sdl" )
+ c = mlt.Consumer( profile, "sdl" )
# Turn off the default rescaling
c.set( "rescale", "none" )
#!/usr/bin/env ruby
require 'mkmf'
system( "ln -sf ../mltpp.i mltpp.i" )
-system( "swig -c++ -ruby -I../../src `pkg-config mlt-framework --cflags` mltpp.i" )
-$CFLAGS += " -I../../src `pkg-config mlt-framework --cflags`"
-$LDFLAGS += " -L../../src -lmlt++"
-create_makefile('mltpp')
+system( "swig -c++ -ruby -I../../mlt++ `pkg-config mlt-framework --cflags` mltpp.i" )
+$CFLAGS += " -I../../mlt++ `pkg-config mlt-framework --cflags`"
+$LDFLAGS += " -L../../mlt++ -lmlt++"
+create_makefile('mlt')
system( 'make' )
#!/usr/bin/env ruby
# Import required modules
-require 'mltpp'
+require 'mlt'
# Create the mlt system
-Mltpp::Factory::init
+mlt::Factory::init
# Establish the mlt profile
-profile = Mltpp::Profile.new
+profile = mlt::Profile.new
# Get and check the argument
file = ARGV.shift
raise "Usage: test.rb file" if file.nil?
# Create the producer
-producer = Mltpp::Factory::producer( profile, file )
+producer = mlt::Factory::producer( profile, file )
raise "Unable to load #{file}" if !producer.is_valid
# Create the consumer
-consumer = Mltpp::Consumer.new( profile, "sdl" )
+consumer = mlt::Consumer.new( profile, "sdl" )
raise "Unable to open sdl consumer" if !consumer.is_valid
# Turn off the default rescaling
#!/usr/bin/env ruby
# Required modules
-require 'mltpp'
+require 'mlt'
# Create the mlt system
-Mltpp::Factory::init
+mlt::Factory::init
# Establish the mlt profile
-profile = Mltpp::Profile.new( "quarter_pal" )
+profile = mlt::Profile.new( "quarter_pal" )
# Get and check the argument
file = ARGV.shift
raise "Usage: thumbs.rb file name [ size ]" if file.nil? || name.nil?
# Create the producer
-producer = Mltpp::Producer.new( profile, file )
+producer = mlt::Producer.new( profile, file )
raise "Unable to load #{file}" if !producer.is_valid
# Construct the playlist
-playlist = Mltpp::Playlist.new( )
+playlist = mlt::Playlist.new( )
# Get the out point
out = producer.get_int( "out" );
[ 0, 0.25, 0.5, 0.75, 1 ].each { |x| playlist.append( producer, Integer(x*out), Integer(x*out) ) }
# Create the thumb nail generator
-generator = Mltpp::Consumer.new( profile, "avformat", "#{name}%d.jpg" )
+generator = mlt::Consumer.new( profile, "avformat", "#{name}%d.jpg" )
generator.set( "real_time", "0" )
generator.set( "progressive", "1" )
generator.set( "s", size )
ln -sf ../mltpp.i .
# Invoke swig
- swig -c++ -I../../src `pkg-config mlt-framework --cflags` -tcl mltpp.i || exit 1
+ swig -c++ -I../../mlt++ `pkg-config mlt-framework --cflags` -tcl mltpp.i || exit 1
# Compile the wrapper
- g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../src `pkg-config mlt-framework --cflags` mltpp_wrap.cxx || exit 1
+ g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../../mlt++ `pkg-config mlt-framework --cflags` mlt_wrap.cxx || exit 1
# Create the module
- gcc -shared mltpp_wrap.o -L../../src -lmlt++ -o mltpp.so || exit 1
+ gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
else
echo "Unable to locate tclsh."
exit 1
#!/usr/bin/env tclsh
-load mltpp.so
-mltpp.Factory.init
+load mlt.so
+mlt.Factory.init null
set profile [Profile]
set arg1 [lindex $argv 0]
-set p [factory_producer $profile fezzik $arg1]
+set p [factory_producer $profile loader $arg1]
set c [factory_consumer $profile sdl ""]
set r [mlt_consumer_properties $c]
mlt_properties_set $r "rescale" "none"
mlt_producer result = NULL;
// 1st Line preferences
- if ( strstr( file, ".inigo" ) )
+ if ( strstr( file, ".melt" ) )
{
char *args[ 2 ] = { file, NULL };
- result = mlt_factory_producer( "inigo", args );
+ result = mlt_factory_producer( "melt", args );
}
else if ( strstr( file, ".mpg" ) )
result = mlt_factory_producer( "mcmpeg", file );
mlt_position length = mlt_producer_get_playtime( track0 );
// Create the watermark track
- mlt_producer track1 = mlt_factory_producer( "fezzik", "pango:" );
+ mlt_producer track1 = mlt_factory_producer( NULL, "pango:" );
// Get the properties of track1
mlt_properties properties = mlt_producer_properties( track1 );