Thanks for sharing that. Read more below...

On Sat, Nov 20, 2021 at 8:54 AM José María García Pérez <
josemaria.alk...@gmail.com> wrote:

> I implemented some examples in the Nim programming language. Nim compiles
> into C (among other languages).
>
> I like that it gives you the feeling of python despite it is using actual
> types.
>
> The code looks as follows:
> ```
> import mlt, os
> var f = initFactory()
>
> # Create the default consumer
> var p = newProfile()
> var sdl = newFactoryConsumer(p, "sdl2")
>
> # Create via the default producer
> var clip = newFactoryProducer(p, resource =
> "avformat:/home/jose/Descargas/sygic.mp4")
>
> var filter = newFactoryFilter(p, "frei0r.pixeliz0r")
> filter["BlockSizeX"] = 0.1
> filter["BlockSizeY"] = 0.2
>
> clip > filter
> filter > sdl
>
>

So, the > operator is mapped to both mlt_service_connect_producer() and
mlt_service_attach()? I do not understand how the sdl consumer is
connecting to the filter because the filter should be *attached* to the
producer, and the consumer *connected* to the producer.



> # Start the consumer
> sdl.start
>
> while not sdl.stopped:
> sleep(1)
> ```
> As I said, it compiles to C. If compiled in release mode, the executable
> only takes 115kb.
>
> This is just a starting point. You can see some more examples here:
> https://github.com/mantielero/mlt.nim/tree/master/examples
>
> Regards,
> José María
>
>
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to