@vux
Well I needed a video plugin that wouldn’t cause problems with renderers on 2 different screens, and it had to work in october, so when I found out about how easy it was to write plugins for vvvv since 24.1, and found out about the nVlc library, everything kind of came together so I decided to start writing my own implementation, since I wasn’t aware of any other development in that area. The same questions about problems with filestream etc. kept popping up on the forum over and over again.
So the first version just played video or audio files and simple images and webcam or other directshow input devoces, and offered speed- and volume-control, allowed play/pause and seeking. It also allows to decode to a smaller (or bigger) texture size, if you don’t need the full resolution in your textures.
The reason I like Using LibVLC is that I can allow the user to make use of VLC’s builtin filters like deinterlace, crop, etc. etc. (example simply set filename to c:\video.wmv | deinterlace=1) will take care of this. A user can decide he only wants to play the audio from a video file, and no decoding of the video will be done, or the other way around. (example c:\video.wmv | aout=none).
Anyway, I use 2 textures per device (front and back) AND 2 memory-planes for decoding the video (so at this time, everything is somewhat memory hungry :). When decoding to memory-plane A, I can copy memory-plane B (in another thread) to the back-textures for every device, and when that is done, I flip the front- and backtextures, and start decoding to memoryplane B, and use A for copying.
(I have been thinking about using 3 textures, so that I would only need to copy the data to another texture, when there is more than one device.)
I have a first version that is stable I think, that doesn’t ‘preload’ another video yet. And it slows down vvvv when media_player_start or media_player_stop is called, because these calls take quite some time.
The newer version, which preloads video2 in the background AND also controls VLC in a separate thread (so that even the calls to media_player_start and stop etc. don’t slow down vvvv’s mainloop) is almost stable, but since debugging threaded apps can be quite complicated it might take me another few days to get that fixed. Also I think I still have a memory leak somewhere.
And I need to make in spreadable, but I don’t know if/how I can do that with the current PluginInterface yet. If it’s possible, please let me know how.
I am getting somewhere, but when it’s stable there will probably be a lot that can be improved performance wise.