Video-to-texture plugin with audio support and everything

Many thanks to @ymmtny for the macOS and iOS builds, the plugin is now live on the solar2D plugin repository here

I have added a simple usage example here. Include the plugin in your project like so and you’ll be ready to go:

plugins = {
    ["plugin.movie"] = {
        publisherId = "com.ansh3ll"
    },
},

Windows, macOS, Android and iOS are all supported. In case of any issues, don’t hesitate to reach out. Have a nice day.

2 Likes

I got an error on Corona Simulator(Mac) when I relaunch it.

Blockquote
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 Corona Simulator 0x10279a05d Rtt::ArrayRtt::CPUResource*::Remove(int, int, bool) + 81
1 Corona Simulator 0x1027c1050 Rtt::Renderer::~Renderer() + 326
2 Corona Simulator 0x1027bf45c Rtt::GLRenderer::~GLRenderer() + 14
3 Corona Simulator 0x1027497ef Rtt::Display::~Display() + 291
4 Corona Simulator 0x102749844 Rtt::Display::~Display() + 14
5 Corona Simulator 0x102796e7a Rtt::Runtime::~Runtime() + 286
6 Corona Simulator 0x1026c4938 Rtt::PlatformPlayer::~PlatformPlayer() + 40
7 Corona Simulator 0x1026c4bfb Rtt::PlatformSimulator::~PlatformSimulator() + 37
8 Corona Simulator 0x1026b3bb0 Rtt::MacSimulator::~MacSimulator() + 14
9 Corona Simulator 0x102697b05 -[AppDelegate closeSimulator:] + 24

@pickerel Same spot as you see in @ymmtny’s crash above. I do think it just needs that fix I mentioned, or alternatively to make those LightPtrArrays. Maybe I can submit a PR in the near future.

Ok. I wish you can submit a PR to fix it.

I can trigger it pretty quickly with the audio / video sync test. With the LightPtrArray idea I was able to relaunch many times without incident.

I’ll post this as an issue first with the two-line fix included (I ran the idea by Scott), and submit a PR if necessary down the line. My fork + branches need some spring cleaning, at the moment. :smiley:

EDIT: Issue posted here

After release ‘MovieTexture’ created by ‘newMovieRect’, the system.getInfo(“textureMemoryUsed”) api return wrong value.
If we use ‘newMovieLoop’ api to play a video in a loop, the system.getInfo(“textureMemoryUsed”) will return negative value after a while.

I did submit a PR and it’s now been pulled, so I expect the fix will be in the next release.

@S_JetJaguar This is with releaseSelf()?

UPDATE: Fix is in the most recent build, just released.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.