Hello, I tried the VideoDemo but nothings happens. I clicked on the left and right buttons, in the grey areas, with left and right click but no reactions.
I tried to create a project with a VideoComponent, and call the load function on a .mp4 video but it didn’t work as well. The error result says “Can’t create window”.
Demo is looking for videos in your ‘Videos’ folder… top panel shows the list of those files.
VideoComponent uses OS video functions, and can only play supported media type. Could be that the format you chose is not support by the Windows native playback system.
Ok ! Thank you, I can display my example video in the projucer now.
The problem with my test example was to call the videoComponent.load() in the constructor of my component. So I moved it in a handleAsyncUpdate() and call a triggerAsyncUpdate() in the constructor
Yes, but you have to be very careful when doing it like that in a plugin.
DAWs often open and close your plugin really fast when they are scanning all plugins on startup. Sometimes so fast, that by the time the lambda is executed, the component doesn’t exist anymore, resulting in a crash.
You should definitely use Component::SafePointer.
Ok, perfect ! And just to be sure, is this a problem of order in the event loop (deleting the object before calling the async callback), or a thread problem here ?
There are no other threads involved here. But a message on the queue could lead to the destruction, and could already be scheduled before your callAsync message is processed.
Since this is unrelated to the original post, would you mind creating a new topic and giving there a bit more context, maybe someone can help you then…