Video playback on windows - bug ? JUCE v5.3.2

gui
windows

#1

Hi,
I want my app to playback video, but it only works on Mac.
On windows the problem is always there:

bool createNativeWindow()
{
jassert (nativeWindow == nullptr);

        if (auto* topLevelPeer = component.getTopLevelComponent()->getPeer())
        {
            nativeWindow.reset (new NativeWindow ((HWND) topLevelPeer->getNativeHandle(), this));

            hwnd = nativeWindow->hwnd;

            if (hwnd != 0)
            {
                hdc = GetDC (hwnd);
                component.updateContextPosition();
                component.updateContextVisibility();
                return true;
            }

            nativeWindow = nullptr;
        }
        else
        {
            **jassertfalse;**.  ---->>> ERROR ON WINDOWS :confused:
        }

        return false;
    }

Is this the reason, why video demo is limited in JUCE-DEMO on windows ?

thanks
Jens


#2

Have you tried the latest tip of the develop branch? I fixed a bug in the Windows VideoComponent implementation recently.


#3

Hi,
yes I tried, but still have the same error on windows 10 … (I replaced the new video module with the latest of the develop branch).

regards
Jens


#4

Have you tested this with the VideoDemo in the JUCE DemoRunner? I can load and play .wmv files there with no issues on Windows 10.


#5

Hi,
that’s crazy, in my Demo Runner nothing happens if I press the load button …
I tried 3 different Juce versions. I will try to compile the video demo with Projucer, but need to find all the headers (windows.h) etc…
thanks
Jens


#6

Hi there,
Video.h in Demo-App isn’t working on my windows 10 and Windows Server 2012 (strato) … the buttons have no function, unable to load a video file.
is there someone which has the same problem ?

regards
Jens


#7

Do you get an error message when you click on of the load buttons? It should display an AlertWindow containing the error if there was an issue.


#8

Hi,
No, simply nothing happens. Yesterday i run it debug mode and it does the same: nothing😩
No drag and drop and no button work.
I downloaded the last version (10 hours old or like that).
And in my own code (see above) it stops, when trying to open a videofile.

The solution is to get this video demo running😉 then i can look further…

On mac, everything is ok :slight_smile:

Regard
Jens


#9

Hi,
I modified the video demo to open the file-chooser directly. And see it works :-))
It only plays “.wmv” - format at this moment. But great, it works :slight_smile:
For other formats (mov & mp4) there can be downloaded special codecs I guess ? The load-buttons in the video-demo are really not working on my computers !

regards
Jens