Greetings,
I am playing video within an application I’m developing. The video runs perfect in Mac standalone, Mac plugin formats and Windows standalone. However, when testing in Windows VST, I am getting a crash deep within the windows video code. The video is played with JUCEs VideoComponent class. I can see the video begin to play for a split second, then it crashes on this call:
while (SUCCEEDED (mediaEvent->GetEvent (&ec, &p1, &p2, 0)))
{
mediaEvent->FreeEventParams (ec, p1, p2);
switch (ec)
{
case EC_REPAINT:
component.repaint();
break;
case EC_COMPLETE:
component.stop();
break;
case EC_USERABORT:
case EC_ERRORABORT:
case EC_ERRORABORTEX:
component.close();
break;
default:
break;
}
}
}
mediaEvent is NULL. In fact, looking a step up:
static LRESULT CALLBACK wndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (auto* c = (DirectShowContext*) GetWindowLongPtr (hwnd, GWLP_USERDATA))
{
switch (msg)
{
case WM_NCHITTEST: return HTTRANSPARENT;
case WM_ERASEBKGND: return 1;
case WM_DISPLAYCHANGE: c->displayResolutionChanged(); break;
case graphEventID: c->graphEventProc(); return 0;
default: break;
}
}
return DefWindowProc (hwnd, msg, wParam, lParam);
}
all the fields within the DirectShowContext* c, are NULL.
As i said before, the video runs fine in Windows Media Player and even runs fine in a Windows standalone version of the application I’m developing.
This seems like a pretty deep issue, so, I wanted to post to see if playing videos within a Windows VST was even possible to begin with. Some more specs:
Movie file type: .wmv
VST in Ableton 9
Windows 7 Professional 64-Bit
There seems to be problems with playing videos in Windows VST in general. I tried another case using a WebComponent to play a video with both the iframe and video tags, neither of which were able to play the video in the VST but played in my Windows browser just fine.
Does anyone know if it should be possible to play videos in Windows VST, or, will it never work?
Thanks,
Collin