In this case, at this point, I'm fine with just receiving the event. But I'm
not sure how. I tried this:
def callback(*args):
pass
consumer.listen("consumer-fatal-error", None, callback)
And get the following error:
TypeError: in method 'Properties_listen', argument 4 of type 'mlt_listener'
Thanks for the pointer to Flowblade. I've searched its source code, and as far
as I can tell, it doesn't use events.
/Rickard
On Sat, Jul 22, 2023, at 22:07, Dan Dennedy wrote:
> You can receive the event in Python, but the arguments are useless with
> special SWIG binding definition. Flowblade uses MLT python binding. You
> should consult its code for advice. The regular MLT developers have very
> little experience with it.
>
> On Sat, Jul 22, 2023 at 1:00 PM Rickard Lindberg <[email protected]>
> wrote:
>> __
>> After reading a bit about Python and SWIG and reading the source code for
>> MLT (src/swig/mlt.i in particular), I think that `consumer.listen` is not
>> yet usable from Python. There seems to be no way to register a Python
>> function as a callback. The mlt.i file seems to have some special handling
>> for events for Ruby though. Perhaps something similar is needed for Python?
>>
>> But it makes me wonder, is there no way to programmatically detect errors
>> from a consumer in Python?
>>
>>
>> /Rickard
>>
>> On Sat, Jul 22, 2023, at 10:55, Rickard Lindberg wrote:
>>> Hi,
>>>
>>> I see that there is a "consumer-fatal-error" event. Should that one be
>>> used? Or
>>> is there a property set that indicates status?
>>>
>>> Also, I was not able to figure out Python syntax for listening to events.
>>> Does
>>> anyone know what arg2 and arg3 is supposed to be below?
>>>
>>> consumer.listen("consumer-fatal-error", arg2, arg3)
>>>
>>> /Rickard
>>>
>>>
>>> _______________________________________________
>>> Mlt-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/mlt-devel
>>>
>>
>> _______________________________________________
>> Mlt-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mlt-devel
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel