From: Dan Dennedy Date: Sat, 9 May 2009 18:46:58 +0000 (-0700) Subject: Complete reorganization and renaming to usable state. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f3446f5950a6b36815e8d977f02c897d075688b6;p=mlt Complete reorganization and renaming to usable state. Signed-off-by: Dan Dennedy --- diff --git a/Makefile b/Makefile index 21f01cca..513a780e 100644 --- a/Makefile +++ b/Makefile @@ -30,15 +30,13 @@ install: 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: diff --git a/README b/README index aaac6e23..b753f645 100644 --- a/README +++ b/README @@ -1,12 +1,12 @@ -MLT/Miracle README ------------------- +MLT FRAMEWORK README +-------------------- Sponsored by Ushodaya Enterprises Limited Written by Charles Yates and Dan Dennedy 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, diff --git a/demo/README b/demo/README index a9a5a087..19f356af 100644 --- a/demo/README +++ b/demo/README @@ -11,9 +11,9 @@ what details to look for. 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 diff --git a/demo/consumers.ini b/demo/consumers.ini index b02695fc..44f6a4c1 100644 --- a/demo/consumers.ini +++ b/demo/consumers.ini @@ -2,8 +2,8 @@ SDL Default sdl 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 diff --git a/demo/demo b/demo/demo index 98777ca7..ef440003 100755 --- a/demo/demo +++ b/demo/demo @@ -85,11 +85,11 @@ do 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 diff --git a/demo/demo.ini b/demo/demo.ini index b01b0493..d023fa2a 100644 --- a/demo/demo.ini +++ b/demo/demo.ini @@ -11,7 +11,7 @@ mlt_levels Audio and Video Levels clip*.dv 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 diff --git a/demo/entity.westley b/demo/entity.mlt similarity index 63% rename from demo/entity.westley rename to demo/entity.mlt index 0f6a6b94..3eacefd7 100644 --- a/demo/entity.westley +++ b/demo/entity.mlt @@ -1,11 +1,11 @@ - + ]> - + pango Hello &name;, My name is Inigo Montoya. - + diff --git a/demo/mlt_all b/demo/mlt_all index d563da88..7f12a707 100644 --- a/demo/mlt_all +++ b/demo/mlt_all @@ -1,3 +1,3 @@ -inigo \ +melt \ clip* \ $* diff --git a/demo/mlt_attributes b/demo/mlt_attributes index e4fffb5e..195c6ef3 100644 --- a/demo/mlt_attributes +++ b/demo/mlt_attributes @@ -1,4 +1,4 @@ -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" \ diff --git a/demo/mlt_audio_stuff b/demo/mlt_audio_stuff index c0074c1a..25c345c8 100644 --- a/demo/mlt_audio_stuff +++ b/demo/mlt_audio_stuff @@ -1,4 +1,4 @@ -inigo \ +melt \ clip*.dv \ -track music1.ogg \ -filter volume:0.5 normalise= track=0 \ diff --git a/demo/mlt_avantika_title b/demo/mlt_avantika_title index 89d0242d..43a148f4 100644 --- a/demo/mlt_avantika_title +++ b/demo/mlt_avantika_title @@ -1,3 +1,3 @@ -inigo \ -pango.westley \ +melt \ +pango.mlt \ $* diff --git a/demo/mlt_bouncy b/demo/mlt_bouncy index 5315ec9b..e973288e 100644 --- a/demo/mlt_bouncy +++ b/demo/mlt_bouncy @@ -1,4 +1,4 @@ -inigo \ +melt \ clip3.dv \ -filter \ watermark:clip1.dv \ diff --git a/demo/mlt_bouncy_ball b/demo/mlt_bouncy_ball index 1aedb5cd..d138392b 100644 --- a/demo/mlt_bouncy_ball +++ b/demo/mlt_bouncy_ball @@ -1,4 +1,4 @@ -inigo \ +melt \ clip3.dv \ -track \ clip1.dv \ diff --git a/demo/mlt_clock_in_and_out b/demo/mlt_clock_in_and_out index f19dd5ef..9de40f2c 100644 --- a/demo/mlt_clock_in_and_out +++ b/demo/mlt_clock_in_and_out @@ -1,4 +1,4 @@ -inigo \ +melt \ clip2.dv in=100 out=174 -blank 99 clip3.dv in=100 \ -track \ -blank 49 clip3.mpeg in=100 out=249 \ diff --git a/demo/mlt_composite_transition b/demo/mlt_composite_transition index cc38ec84..73a5f498 100644 --- a/demo/mlt_composite_transition +++ b/demo/mlt_composite_transition @@ -1,4 +1,4 @@ -inigo \ +melt \ clip1.dv out=74 \ -track \ -blank 49 clip2.mpeg \ diff --git a/demo/mlt_effect_in_middle b/demo/mlt_effect_in_middle index 0fc3974e..da4c78d8 100644 --- a/demo/mlt_effect_in_middle +++ b/demo/mlt_effect_in_middle @@ -1,4 +1,4 @@ -inigo \ +melt \ clip1.mpeg in=100 out=500 \ -filter greyscale in=100 out=199 \ $* diff --git a/demo/mlt_fade_black b/demo/mlt_fade_black index 376fe865..8d90c8af 100644 --- a/demo/mlt_fade_black +++ b/demo/mlt_fade_black @@ -1,4 +1,4 @@ -inigo \ +melt \ colour:black out=199 \ -track \ clip3.mpeg in=100 out=299 \ diff --git a/demo/mlt_fade_in_and_out b/demo/mlt_fade_in_and_out index fbe1fa35..ac610f27 100644 --- a/demo/mlt_fade_in_and_out +++ b/demo/mlt_fade_in_and_out @@ -1,4 +1,4 @@ -inigo \ +melt \ clip1.dv out=74 -blank 99 clip3.dv in=25 \ -track \ -blank 49 clip2.mpeg out=149 \ diff --git a/demo/mlt_intro b/demo/mlt_intro index 4b008489..bcea2f81 100644 --- a/demo/mlt_intro +++ b/demo/mlt_intro @@ -1,4 +1,4 @@ -inigo \ +melt \ music1.ogg in=100 out=224 \ -track \ watermark1.png out=124 \ diff --git a/demo/mlt_jcut b/demo/mlt_jcut index a5d844ef..e93cef5d 100644 --- a/demo/mlt_jcut +++ b/demo/mlt_jcut @@ -1,4 +1,4 @@ -inigo \ +melt \ -blank 49 \ clip2.dv in=100 \ -track \ diff --git a/demo/mlt_lcut b/demo/mlt_lcut index 45f81ddc..ddede0d9 100644 --- a/demo/mlt_lcut +++ b/demo/mlt_lcut @@ -1,4 +1,4 @@ -inigo \ +melt \ clip1.dv out=100 \ -track \ -blank 49 \ diff --git a/demo/mlt_levels b/demo/mlt_levels index 16bf9f52..2932cc4a 100644 --- a/demo/mlt_levels +++ b/demo/mlt_levels @@ -1,4 +1,4 @@ -inigo \ +melt \ *.dv \ -filter gamma:1.5 \ -filter volume normalise=-20db \ diff --git a/demo/mlt_my_name_is b/demo/mlt_my_name_is index bd6bc3f4..15d57fc1 100644 --- a/demo/mlt_my_name_is +++ b/demo/mlt_my_name_is @@ -1,4 +1,4 @@ -inigo \ +melt \ clip3.dv \ -track \ "+My name is Inigo Montoya.txt" out=99 -blank 49 "+Prepare to die!.txt" out=99 \ diff --git a/demo/mlt_news b/demo/mlt_news index 3399f1f2..6b6187e1 100644 --- a/demo/mlt_news +++ b/demo/mlt_news @@ -1,4 +1,4 @@ -inigo \ +melt \ colour:black out=199 \ -track \ clip1.dv in=0 out=0 -repeat 99 clip1.dv \ diff --git a/demo/mlt_obscure b/demo/mlt_obscure index 0c0f8382..2cc07648 100644 --- a/demo/mlt_obscure +++ b/demo/mlt_obscure @@ -1,4 +1,4 @@ -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 \ diff --git a/demo/mlt_push b/demo/mlt_push index bcbc8bf7..c327d4a9 100644 --- a/demo/mlt_push +++ b/demo/mlt_push @@ -1,4 +1,4 @@ -inigo \ +melt \ -blank 49 colour:black out=25 -blank 999 \ -track \ clip3.dv in=200 out=275 \ diff --git a/demo/mlt_slideshow b/demo/mlt_slideshow index efe0d06d..488624be 100644 --- a/demo/mlt_slideshow +++ b/demo/mlt_slideshow @@ -1,4 +1,4 @@ -inigo \ +melt \ Scotland/.all.jpg ttl=75 \ -filter luma:luma1.pgm luma.softness=0.1 luma.invert=0 \ $* diff --git a/demo/mlt_slideshow_black b/demo/mlt_slideshow_black index ddbf5954..b08fbe0a 100644 --- a/demo/mlt_slideshow_black +++ b/demo/mlt_slideshow_black @@ -1,3 +1,3 @@ -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 \ $* diff --git a/demo/mlt_squeeze b/demo/mlt_squeeze index a56780cf..7674b244 100644 --- a/demo/mlt_squeeze +++ b/demo/mlt_squeeze @@ -1,4 +1,4 @@ -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 \ diff --git a/demo/mlt_squeeze_box b/demo/mlt_squeeze_box index dfa0ced9..ff52b049 100644 --- a/demo/mlt_squeeze_box +++ b/demo/mlt_squeeze_box @@ -1,4 +1,4 @@ -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 \ diff --git a/demo/mlt_ticker b/demo/mlt_ticker index f6a8329d..1ffe5130 100644 --- a/demo/mlt_ticker +++ b/demo/mlt_ticker @@ -1,4 +1,4 @@ -inigo \ +melt \ clip1.dv out=299 \ -track \ colour:black out=299 \ diff --git a/demo/mlt_title_over_gfx b/demo/mlt_title_over_gfx index e9b7f662..c643ef7a 100644 --- a/demo/mlt_title_over_gfx +++ b/demo/mlt_title_over_gfx @@ -1,4 +1,4 @@ -inigo \ +melt \ watermark1.png out=9999 \ -track \ "+title over gfx.txt" fgcolour=0x000000ff \ diff --git a/demo/mlt_titleshadow_watermark b/demo/mlt_titleshadow_watermark index 79ef8aec..a87a1a8d 100644 --- a/demo/mlt_titleshadow_watermark +++ b/demo/mlt_titleshadow_watermark @@ -1,4 +1,4 @@ -inigo \ +melt \ "+hello~world.txt" align=1 out=1000 \ -track "+hello~world.txt" align=1 out=1000 fgcolour=0x000000ff \ -track watermark1.png out=1000 \ diff --git a/demo/mlt_voiceover b/demo/mlt_voiceover index 338f4d8d..50a27cdb 100644 --- a/demo/mlt_voiceover +++ b/demo/mlt_voiceover @@ -1,4 +1,4 @@ -inigo \ +melt \ "+voice over demo.txt" \ font="Sans Bold 72" \ fgcolour=0x00000000 \ diff --git a/demo/mlt_watermark b/demo/mlt_watermark index b832d5be..2e5d5efb 100644 --- a/demo/mlt_watermark +++ b/demo/mlt_watermark @@ -1,4 +1,4 @@ -inigo \ +melt \ clip2.dv out=1000 \ -track \ watermark1.png out=1000 \ diff --git a/demo/new.westley b/demo/new.mlt similarity index 100% rename from demo/new.westley rename to demo/new.mlt diff --git a/demo/pango.westley b/demo/pango.mlt similarity index 98% rename from demo/pango.westley rename to demo/pango.mlt index 4684d48c..9c1a9a9f 100644 --- a/demo/pango.westley +++ b/demo/pango.mlt @@ -1,5 +1,5 @@ - + clip1.dv @@ -31,4 +31,4 @@ HíÉà~ÉÒ+àeôÒ`ò­÷ +y«ÉKÉ §ÉÉWð~É]]> centre - + diff --git a/demo/svg.westley b/demo/svg.mlt similarity index 99% rename from demo/svg.westley rename to demo/svg.mlt index a41ff4a5..6764295e 100644 --- a/demo/svg.westley +++ b/demo/svg.mlt @@ -8,7 +8,7 @@ ]> - + @@ -47,4 +47,4 @@ - + diff --git a/docs/framework.txt b/docs/framework.txt index 1c2bafb0..f42d18b1 100644 --- a/docs/framework.txt +++ b/docs/framework.txt @@ -1,8 +1,8 @@ Framework Documentation -Copyright (C) 2004 Ushodaya Enterprises Limited +Copyright (C) 2004-2009 Ushodaya Enterprises Limited Author: Charles Yates -Last Revision: 2004-10-08 +Last Revision: 2005-05-08 MLT FRAMEWORK @@ -44,7 +44,7 @@ Target Audience: 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 @@ -187,12 +187,12 @@ Hello World: 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 @@ -205,11 +205,11 @@ Hello World: 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. @@ -256,7 +256,7 @@ Factories: +------------------+------------------------------------+------------------+ |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 | +------------------+------------------------------------+------------------+ @@ -573,7 +573,7 @@ Practicalities and Optimisations: 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: @@ -714,8 +714,8 @@ 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 ); @@ -1179,7 +1179,7 @@ mlt_service: 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. diff --git a/docs/install.txt b/docs/install.txt index b8883229..3acc7604 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -1,8 +1,8 @@ Installation Documentation -Copyright (C) 2004 Ushodaya Enterprises Limited +Copyright (C) 2004-2009 Ushodaya Enterprises Limited Author: Charles Yates -Last Revision: 2004-04-13 +Last Revision: 2009-05-08 INSTALL @@ -26,7 +26,6 @@ Directories + 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 (**) @@ -34,14 +33,10 @@ Directories + 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. @@ -90,7 +85,7 @@ Dependencies 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/ ----------- ---------------------------------------------------------- @@ -144,14 +139,6 @@ Installation $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 diff --git a/docs/melt.txt b/docs/melt.txt index 854c1c12..84d505bb 100644 --- a/docs/melt.txt +++ b/docs/melt.txt @@ -1,16 +1,16 @@ -Inigo Documentation +Melt Documentation Copyright (C) 2004-2009 Ushodaya Enterprised Limited Author: Charles Yates -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. @@ -20,7 +20,7 @@ Preamble: 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 @@ -65,7 +65,7 @@ General rules: 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 @@ -106,14 +106,14 @@ Basics: 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. @@ -123,7 +123,7 @@ Properties: 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, @@ -136,11 +136,11 @@ Multiple Files: 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 @@ -154,14 +154,14 @@ Filters: 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. @@ -172,7 +172,7 @@ Groups: 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. @@ -180,14 +180,14 @@ Groups: 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: @@ -201,20 +201,20 @@ 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 :-). @@ -227,17 +227,17 @@ Mixes: 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 @@ -264,7 +264,7 @@ Mix and Attach: 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. @@ -287,7 +287,7 @@ Introducing Tracks and Blanks: 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: @@ -304,11 +304,11 @@ Introducing Tracks and Blanks: 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: @@ -330,7 +330,7 @@ Transitions: 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 @@ -363,7 +363,7 @@ Reversing a Transition: 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 \ @@ -372,19 +372,19 @@ Reversing a Transition: 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: @@ -394,8 +394,8 @@ 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 diff --git a/docs/mlt++.txt b/docs/mlt++.txt index 7784cae9..1dacd8dd 100644 --- a/docs/mlt++.txt +++ b/docs/mlt++.txt @@ -342,22 +342,22 @@ Events 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( ); } @@ -368,7 +368,7 @@ Events } }; - 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. @@ -462,41 +462,41 @@ Events ------ -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 ) { } @@ -508,28 +508,28 @@ Servers and Westley Docs // 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 ); } }; diff --git a/docs/mlt-xml.txt b/docs/mlt-xml.txt index 1f42538d..9ac58b2c 100644 --- a/docs/mlt-xml.txt +++ b/docs/mlt-xml.txt @@ -1,27 +1,27 @@ -Westley Documentation +MLT XML Schema Documentation -Copyright (C) 2004 Ushodaya Enterprised Limited +Copyright (C) 2004-2009 Ushodaya Enterprised Limited Authors: Charles Yates -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). @@ -33,19 +33,19 @@ Introduction: 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; @@ -53,33 +53,33 @@ Rules: 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: - + clip1.dv - + - 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: - + clip1.mpeg 1 - + NB: This relies on the mpeg being handled by the avformat producer, rather than the mcmpeg one. See services.txt for more details. @@ -95,8 +95,8 @@ Basic Producers: 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: @@ -108,7 +108,7 @@ Playlists: As an example, the following defines two basic producers and a playlist with 3 items: - + clip1.dv @@ -120,7 +120,7 @@ Playlists: - + Here we see how the playlist defines the in/out points of the basic producers. @@ -129,7 +129,7 @@ Playlists: 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. @@ -181,17 +181,17 @@ Interlude - Introducing Multitracks: 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: - + clip1.dv @@ -216,7 +216,7 @@ Tractors: greyscale - + 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 @@ -245,7 +245,7 @@ Tractors: let's assume we wish to watermark all output, then we could use the following: - + clip1.dv @@ -279,7 +279,7 @@ Tractors: watermark1.png - + Here we employ another tractor and we define a single track (being the tractor we previously defined) and apply a watermarking filter there. @@ -300,7 +300,7 @@ Tractors: clip. Remember, nothing is affected like mixing or compositing until one applies a transition or appropriate filter. - + clip1.dv @@ -332,7 +332,7 @@ Tractors: 1.0 - + 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 @@ -345,19 +345,19 @@ Tractors: 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: - + @@ -371,18 +371,18 @@ Flexibility: - + 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 , , and 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 , , and 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: - + @@ -390,11 +390,11 @@ Flexibility: - + Yes, filters and transitions can be added to the above example after the closing multitrack tag () 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 or , then the edit points apply to the playlist @@ -410,7 +410,7 @@ Flexibility: 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. @@ -418,7 +418,7 @@ Flexibility: This form of authoring will be easier for many to visualise as a non-linear editor's timeline. Here is a more complex example: - + @@ -440,14 +440,14 @@ Flexibility: - + 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 @@ -462,7 +462,7 @@ Flexibility: 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: @@ -471,46 +471,46 @@ Flexibility: 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: - ]> - + pango &msg; - + 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 @@ -524,14 +524,14 @@ Tips and Technique: If one finds the above hierarchical, abbreviated format intuitive, start with a simple template and fill and extend as needed: - + ...add a playlist for each track... ...add filters and transitions... - + 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 diff --git a/docs/policies.txt b/docs/policies.txt index f2fb0336..5aad1d19 100644 --- a/docs/policies.txt +++ b/docs/policies.txt @@ -7,11 +7,11 @@ Policies 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, diff --git a/docs/services.txt b/docs/services.txt index 63d6c5a3..810eb5c1 100644 --- a/docs/services.txt +++ b/docs/services.txt @@ -2,7 +2,7 @@ Service Documentation Authors: Charles Yates Dan Dennedy -Last Revision: $Date$ +Last Revision: 2009-05-08 SERVICES @@ -62,7 +62,7 @@ Producers Fails to play beyond first frame of video of sources with PTS not starting at 0 (video4linux). - fezzik + loader Description @@ -281,10 +281,10 @@ Producers 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 @@ -357,7 +357,7 @@ Producers load all pictures with matching extension from a directory. - If filename contains the string "/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." - diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index 552b8ce3..eb651f40 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -76,7 +76,7 @@ static void mlt_factory_create_done( mlt_listener listener, mlt_properties owner /** 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". * @@ -138,7 +138,7 @@ mlt_repository mlt_factory_init( const char *directory ) 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" ); diff --git a/src/framework/mlt_playlist.c b/src/framework/mlt_playlist.c index 91f9fa81..36ba9b7e 100644 --- a/src/framework/mlt_playlist.c +++ b/src/framework/mlt_playlist.c @@ -283,12 +283,12 @@ static int mlt_playlist_virtual_append( mlt_playlist this, mlt_producer source, // 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 ); diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index f43738bd..e5ad81af 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -726,7 +726,7 @@ static mlt_producer mlt_producer_clone( mlt_producer this ) 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 ); diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 97ee02de..fb353a57 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -193,7 +193,7 @@ static inline int generate_hash( const char *name ) /** 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 diff --git a/src/melt/io.c b/src/melt/io.c index 77d13b96..520d74fc 100644 --- a/src/melt/io.c +++ b/src/melt/io.c @@ -1,5 +1,5 @@ /* - * io.c -- inigo input/output + * io.c -- melt input/output * Copyright (C) 2002-2003 Ushodaya Enterprises Limited * Author: Charles Yates * diff --git a/src/melt/io.h b/src/melt/io.h index 70387ba8..ccec2c0f 100644 --- a/src/melt/io.h +++ b/src/melt/io.h @@ -1,5 +1,5 @@ /* - * io.h -- inigo input/output + * io.h -- melt input/output * Copyright (C) 2002-2003 Ushodaya Enterprises Limited * Author: Charles Yates * diff --git a/src/melt/melt.c b/src/melt/melt.c index 698908e7..6392da6b 100644 --- a/src/melt/melt.c +++ b/src/melt/melt.c @@ -1,5 +1,5 @@ /* - * inigo.c -- MLT command line utility + * melt.c -- MLT command line utility * Copyright (C) 2002-2008 Ushodaya Enterprises Limited * Author: Charles Yates * @@ -319,7 +319,7 @@ int main( int argc, char **argv ) { int i; mlt_consumer consumer = NULL; - mlt_producer inigo = NULL; + mlt_producer melt = NULL; FILE *store = NULL; char *name = NULL; mlt_profile profile = NULL; @@ -335,7 +335,7 @@ int main( int argc, char **argv ) 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 { @@ -404,7 +404,7 @@ query_all: } 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" "\n" "This is free software; see the source for copying conditions. There is NO\n" @@ -441,22 +441,22 @@ query_all: 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 ++ ) @@ -486,24 +486,24 @@ query_all: 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 ); @@ -517,7 +517,7 @@ query_all: 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" @@ -560,8 +560,8 @@ query_all: 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 ); diff --git a/src/modules/core/factory.c b/src/modules/core/factory.c index 369a649e..5d84e132 100644 --- a/src/modules/core/factory.c +++ b/src/modules/core/factory.c @@ -40,7 +40,7 @@ extern mlt_filter filter_transition_init( mlt_profile profile, mlt_service_type 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 ); @@ -72,7 +72,7 @@ MLT_REPOSITORY 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 ); diff --git a/src/modules/core/filter_watermark.c b/src/modules/core/filter_watermark.c index 2e88e082..f1ab0e41 100644 --- a/src/modules/core/filter_watermark.c +++ b/src/modules/core/filter_watermark.c @@ -253,7 +253,7 @@ mlt_filter filter_watermark_init( mlt_profile profile, mlt_service_type type, co { 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 diff --git a/src/modules/core/loader.dict b/src/modules/core/loader.dict index bdcc0e1b..94561344 100644 --- a/src/modules/core/loader.dict +++ b/src/modules/core/loader.dict @@ -1,8 +1,10 @@ http://*=avformat -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" ); @@ -198,7 +198,7 @@ mlt_producer producer_consumer_init( mlt_profile profile, mlt_service_type type, 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 ) { diff --git a/src/modules/core/producer_hold.c b/src/modules/core/producer_hold.c index f30aa0c3..1f50f62b 100644 --- a/src/modules/core/producer_hold.c +++ b/src/modules/core/producer_hold.c @@ -1,6 +1,6 @@ /* * producer_hold.c -- frame holding producer - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * Author: Charles Yates * * This library is free software; you can redistribute it and/or @@ -39,8 +39,8 @@ mlt_producer producer_hold_init( mlt_profile profile, mlt_service_type type, con // 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 ) diff --git a/src/modules/core/producer_loader.c b/src/modules/core/producer_loader.c index 816c1bd7..8d84ce0e 100644 --- a/src/modules/core/producer_loader.c +++ b/src/modules/core/producer_loader.c @@ -1,6 +1,6 @@ /* - * 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 * * This library is free software; you can redistribute it and/or @@ -74,7 +74,7 @@ static mlt_producer create_producer( mlt_profile profile, char *file ) 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 ); } @@ -120,7 +120,7 @@ static void create_filter( mlt_profile profile, mlt_producer producer, char *eff 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; @@ -140,7 +140,7 @@ static void attach_normalisers( mlt_profile profile, mlt_producer producer ) 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 ); } @@ -160,7 +160,7 @@ static void attach_normalisers( mlt_profile profile, mlt_producer producer ) 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; @@ -172,10 +172,10 @@ mlt_producer producer_fezzik_init( mlt_profile profile, mlt_service_type type, c 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 diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index 04a518f5..a48b4dd3 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -1330,7 +1330,7 @@ mlt_transition transition_composite_init( mlt_profile profile, mlt_service_type 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 ); diff --git a/src/modules/core/transition_luma.c b/src/modules/core/transition_luma.c index f08d84f7..3a4eb168 100644 --- a/src/modules/core/transition_luma.c +++ b/src/modules/core/transition_luma.c @@ -582,7 +582,7 @@ mlt_transition transition_luma_init( mlt_profile profile, mlt_service_type type, 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 ); diff --git a/src/modules/core/transition_region.c b/src/modules/core/transition_region.c index 52bcb0f8..bd072120 100644 --- a/src/modules/core/transition_region.c +++ b/src/modules/core/transition_region.c @@ -434,7 +434,7 @@ mlt_transition transition_region_init( mlt_profile profile, mlt_service_type typ 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 ); diff --git a/src/modules/kdenlive/producer_framebuffer.c b/src/modules/kdenlive/producer_framebuffer.c index 10dc22fe..9a439421 100644 --- a/src/modules/kdenlive/producer_framebuffer.c +++ b/src/modules/kdenlive/producer_framebuffer.c @@ -199,14 +199,14 @@ mlt_producer producer_framebuffer_init( mlt_profile profile, mlt_service_type ty 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. @@ -231,7 +231,7 @@ mlt_producer producer_framebuffer_init( mlt_profile profile, mlt_service_type ty *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; @@ -241,8 +241,8 @@ mlt_producer producer_framebuffer_init( mlt_profile profile, mlt_service_type ty // 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 diff --git a/src/modules/kino/avi.h b/src/modules/kino/avi.h index d22d5e6f..137c9529 100644 --- a/src/modules/kino/avi.h +++ b/src/modules/kino/avi.h @@ -15,123 +15,6 @@ * 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 diff --git a/src/modules/kino/riff.cc b/src/modules/kino/riff.cc index 44a082ca..6a57b87e 100644 --- a/src/modules/kino/riff.cc +++ b/src/modules/kino/riff.cc @@ -15,63 +15,6 @@ * 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" diff --git a/src/modules/melt/factory.c b/src/modules/melt/factory.c index c1b2d0e7..e815e423 100644 --- a/src/modules/melt/factory.c +++ b/src/modules/melt/factory.c @@ -21,11 +21,11 @@ #include #include -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 ); } diff --git a/src/modules/melt/producer_melt.c b/src/modules/melt/producer_melt.c index 88ea2a57..05b571fa 100644 --- a/src/modules/melt/producer_melt.c +++ b/src/modules/melt/producer_melt.c @@ -1,5 +1,5 @@ /* - * 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 * @@ -24,9 +24,9 @@ #include -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 ); @@ -43,7 +43,7 @@ mlt_producer producer_inigo_file_init( mlt_profile profile, mlt_service_type typ } } - mlt_producer result = producer_inigo_init( profile, type, id, args ); + mlt_producer result = producer_melt_init( profile, type, id, args ); if ( result != NULL ) { @@ -69,7 +69,7 @@ static void track_service( mlt_field field, void *service, mlt_destructor destru 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 ); @@ -120,7 +120,7 @@ static mlt_transition create_transition( mlt_profile profile, mlt_field field, c 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; @@ -136,7 +136,7 @@ mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, co 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 ); @@ -369,7 +369,7 @@ mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, co 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 ++ ); @@ -437,7 +437,7 @@ mlt_producer producer_inigo_init( mlt_profile profile, mlt_service_type type, co 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 ); diff --git a/src/modules/motion_est/Makefile b/src/modules/motion_est/Makefile index 953f8982..14e6ebaa 100644 --- a/src/modules/motion_est/Makefile +++ b/src/modules/motion_est/Makefile @@ -34,20 +34,20 @@ install: all 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),) diff --git a/src/modules/motion_est/README b/src/modules/motion_est/README index 5542d3f2..ee7de177 100644 --- a/src/modules/motion_est/README +++ b/src/modules/motion_est/README @@ -16,49 +16,49 @@ EXAMPLES: Estimate the motion: - > inigo -filter motion_est + > melt -filter motion_est To display the motion vectors as pretty arrows: - > inigo -filter motion_est -filter vismv + > melt -filter motion_est -filter vismv 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 + > melt -filter crop_detect -filter motion_est -filter vismv 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 + > melt -filter motion_est -filter vismv -consumer melt real_time=0 If you'd like to see the motion vectors without the median denoising function, do this: - > inigo -filter motion_est denoise=0 -filter vismv + > melt -filter motion_est denoise=0 -filter vismv To reconstruct each frame by applying the motion to the previous frame: - > inigo -filter motion_est show_reconstruction=1 + > melt -filter motion_est show_reconstruction=1 To compare the reconstructed frame and the real frame (while paused): - > inigo -filter motion_est show_reconstruction=1 toggle_when_paused=1 + > melt -filter motion_est show_reconstruction=1 toggle_when_paused=1 To show the difference (residual) between the reconstructed frame the real frame: - > inigo -filter motion_est show_residual=1 + > melt -filter motion_est show_residual=1 To automatically track an object in the frame, try this: - > inigo -filter autotrack_rectangle:X,Y:WxH debug=1 + > melt -filter autotrack_rectangle:X,Y:WxH debug=1 (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 + > melt -filter autotrack_rectangle:X,Y:WxH obscure=1 There is now a slow motion producer that does interpolation based on the motion vectors: - > inigo slowmotion: _speed=0.1 method=1 debug=1 + > melt slowmotion: _speed=0.1 method=1 debug=1 NOTES (and deficiencies): diff --git a/src/modules/motion_est/producer_slowmotion.c b/src/modules/motion_est/producer_slowmotion.c index e66db091..016b5d59 100644 --- a/src/modules/motion_est/producer_slowmotion.c +++ b/src/modules/motion_est/producer_slowmotion.c @@ -367,8 +367,8 @@ mlt_producer producer_slowmotion_init( mlt_profile profile, mlt_service_type typ { 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 ); @@ -381,8 +381,8 @@ mlt_producer producer_slowmotion_init( mlt_profile profile, mlt_service_type typ // 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 ); diff --git a/src/modules/plus/filter_affine.c b/src/modules/plus/filter_affine.c index cbf6caac..0ba2f9d5 100644 --- a/src/modules/plus/filter_affine.c +++ b/src/modules/plus/filter_affine.c @@ -50,7 +50,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * { 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 ); } diff --git a/src/modules/xml/consumer_xml.c b/src/modules/xml/consumer_xml.c index 29174be2..9e85e6ec 100644 --- a/src/modules/xml/consumer_xml.c +++ b/src/modules/xml/consumer_xml.c @@ -1,6 +1,6 @@ /* - * 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 * * This library is free software; you can redistribute it and/or @@ -57,20 +57,20 @@ static void serialise_service( serialise_context context, mlt_service service, x 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; @@ -82,7 +82,7 @@ static char *westley_get_id( serialise_context context, mlt_service service, wes 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" ); @@ -96,25 +96,25 @@ static char *westley_get_id( serialise_context context, mlt_service service, wes { 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; } @@ -133,7 +133,7 @@ static char *westley_get_id( serialise_context context, mlt_service service, wes 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 ); } @@ -145,7 +145,7 @@ static char *westley_get_id( serialise_context context, mlt_service service, wes 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 ); @@ -182,7 +182,7 @@ static void serialise_properties( serialise_context context, mlt_properties prop 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 && @@ -233,10 +233,10 @@ static inline void serialise_service_filters( serialise_context context, mlt_ser 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" ); @@ -269,7 +269,7 @@ static void serialise_producer( serialise_context context, mlt_service service, { 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; @@ -289,7 +289,7 @@ static void serialise_producer( serialise_context context, mlt_service service, } 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" )) ); @@ -315,7 +315,7 @@ static void serialise_multitrack( serialise_context context, mlt_service service 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; @@ -329,7 +329,7 @@ static void serialise_multitrack( serialise_context context, mlt_service service 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 ) ) { @@ -358,7 +358,7 @@ static void serialise_playlist( serialise_context context, mlt_service service, 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; @@ -413,7 +413,7 @@ static void serialise_playlist( serialise_context context, mlt_service service, { 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) ); @@ -438,7 +438,7 @@ static void serialise_playlist( serialise_context context, mlt_service service, } 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) ); } } @@ -456,7 +456,7 @@ static void serialise_tractor( serialise_context context, mlt_service service, x 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; @@ -492,7 +492,7 @@ static void serialise_filter( serialise_context context, mlt_service service, xm 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; @@ -521,7 +521,7 @@ static void serialise_transition( serialise_context context, mlt_service service 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; @@ -551,7 +551,7 @@ static void serialise_service( serialise_context context, mlt_service service, x 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 ); @@ -564,7 +564,7 @@ static void serialise_service( serialise_context context, mlt_service service, x { serialise_producer( context, service, node ); } - if ( mlt_properties_get( properties, "westley" ) != NULL ) + if ( mlt_properties_get( properties, "xml" ) != NULL ) break; } @@ -623,11 +623,11 @@ static void serialise_service( serialise_context context, mlt_service service, x } } -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 ); @@ -707,7 +707,7 @@ static int consumer_start( mlt_consumer this ) } // Make the document - doc = westley_make_doc( this, service ); + doc = xml_make_doc( this, service ); // Handle the output if ( resource == NULL || !strcmp( resource, "" ) ) diff --git a/src/modules/xml/factory.c b/src/modules/xml/factory.c index 87853f89..9de62282 100644 --- a/src/modules/xml/factory.c +++ b/src/modules/xml/factory.c @@ -21,12 +21,12 @@ #include #include -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 ); } diff --git a/src/modules/xml/mlt-xml.dtd b/src/modules/xml/mlt-xml.dtd index 4b926d7c..bb7e1610 100644 --- a/src/modules/xml/mlt-xml.dtd +++ b/src/modules/xml/mlt-xml.dtd @@ -1,8 +1,8 @@ - + - + * * This library is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ #undef DEBUG #ifdef DEBUG -extern xmlDocPtr westley_make_doc( mlt_service service ); +extern xmlDocPtr xml_make_doc( mlt_service service ); #endif enum service_type @@ -112,10 +112,10 @@ static int context_push_service( deserialise_context this, mlt_service that, enu 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; @@ -213,8 +213,8 @@ static int add_producer( deserialise_context context, mlt_service service, mlt_p 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 ) ); } @@ -345,7 +345,7 @@ static void on_start_multitrack( deserialise_context context, const xmlChar *nam 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 ) @@ -391,7 +391,7 @@ static void on_start_playlist( deserialise_context context, const xmlChar *name, // 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 ) @@ -504,18 +504,18 @@ static void on_end_producer( deserialise_context context, const xmlChar *name ) 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 ); @@ -1093,7 +1093,7 @@ static void on_start_element( void *ctx, const xmlChar *name, const xmlChar **at 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 ] ); } @@ -1207,7 +1207,7 @@ static void on_internal_subset( void *ctx, const xmlChar* name, 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) @@ -1228,7 +1228,7 @@ static xmlEntityPtr on_get_entity( void *ctx, const xmlChar* name ) // 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(""); } @@ -1333,7 +1333,7 @@ static int file_exists( char *file ) 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 ) ); @@ -1342,7 +1342,7 @@ mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type servty 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; @@ -1363,7 +1363,7 @@ mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type servty 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; @@ -1446,7 +1446,7 @@ mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type servty } #ifdef DEBUG - xmlDocPtr doc = westley_make_doc( service ); + xmlDocPtr doc = xml_make_doc( service ); xmlDocFormatDump( stdout, doc, 1 ); xmlFreeDoc( doc ); service = NULL; @@ -1481,19 +1481,19 @@ mlt_producer producer_westley_init( mlt_profile profile, mlt_service_type servty 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 ); } } diff --git a/src/swig/Makefile b/src/swig/Makefile index 26ae9ddb..510cce8b 100644 --- a/src/swig/Makefile +++ b/src/swig/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = perl python ruby tcl +SUBDIRS = java perl php python ruby tcl all clean install: list='$(SUBDIRS)'; \ diff --git a/src/swig/configure b/src/swig/configure index 794113a8..44fe6ee5 100755 --- a/src/swig/configure +++ b/src/swig/configure @@ -14,7 +14,7 @@ else echo "Usage: ./configure [ all | language * ]" 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 diff --git a/src/swig/java/Play.java b/src/swig/java/Play.java index 35918dbf..b6f576c1 100644 --- a/src/swig/java/Play.java +++ b/src/swig/java/Play.java @@ -1,9 +1,9 @@ -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) { diff --git a/src/swig/java/build b/src/swig/java/build index 0f8ba2ed..6da401c5 100755 --- a/src/swig/java/build +++ b/src/swig/java/build @@ -14,14 +14,14 @@ then 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 $? diff --git a/src/swig/mltpp.i b/src/swig/mltpp.i index f6060b73..8014d6de 100644 --- a/src/swig/mltpp.i +++ b/src/swig/mltpp.i @@ -18,7 +18,7 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -%module mltpp +%module mlt %include "carrays.i" %array_class(unsigned char, unsignedCharArray); @@ -50,9 +50,6 @@ namespace Mlt { %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( ); @@ -83,8 +80,6 @@ namespace Mlt { %include %include %include -%include -%include #if defined(SWIGRUBY) diff --git a/src/swig/perl/Makefile.PL b/src/swig/perl/Makefile.PL index 07e1827e..e766beb6 100644 --- a/src/swig/perl/Makefile.PL +++ b/src/swig/perl/Makefile.PL @@ -4,13 +4,13 @@ use ExtUtils::MakeMaker; 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'}, ); diff --git a/src/swig/perl/play.pl b/src/swig/perl/play.pl index 87047b94..3cad5687 100755 --- a/src/swig/perl/play.pl +++ b/src/swig/perl/play.pl @@ -1,16 +1,16 @@ #!/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( ) ) { @@ -18,7 +18,7 @@ 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" ); @@ -43,4 +43,4 @@ else print "Unable to open $ARGV[0]\n"; } -mltpp::mlt_factory_close( ); +mlt::mlt_factory_close( ); diff --git a/src/swig/php/build b/src/swig/php/build index a06ed48f..0df09edd 100644 --- a/src/swig/php/build +++ b/src/swig/php/build @@ -1,6 +1,6 @@ #!/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 diff --git a/src/swig/php/play.php b/src/swig/php/play.php index 7cfa2fdc..37c5839d 100755 --- a/src/swig/php/play.php +++ b/src/swig/php/play.php @@ -1,6 +1,6 @@