• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Play a video

Joined
Nov 26, 2017
Messages
59
Is there a way to show (play / stream) a video file on screen in desktop target? (mac)

Really nothing?
 
Last edited:
I'd like to ask this again. Maybe I'm too stupid to see a simple way here. Please help me out. How to play/show a video file in Cerberus?
 
There is no simple way. For Cerberus to play a video file, a custom module would have to be written to use OpenGL and a video codedec.
 
There's at least a video module for HTML5 already made, maybe this can be useful to you.
 
Ages ago I did this on BlitzMax, using MCI calls and FindWindow/SetWindowParent API. Used to work well until windows 8 - but I tried running it right before posting this on Windows 10 and it failed on fullscreen (worked on windowed mode though).

I have no clue how to do it on Macs, but on Windows playing video inside OpenGL was always a mess. Maybe under Direct-X was easier, having DirectShow - but I never used it and I don't even know if thats still supported :/

Edit: Wow, it actually works, just not on the default DX7 driver of Blitzmax. Using OpenGL or DX9 the video plays just fine :)
 
Last edited:
Nice, do you think it would work for Cerberus-x too?
 
In theory it should, yes. Just a small C file making MCI calls. But it would only work on windows/desktop target.
 
I did some tests on windows with a C library called PL_MPEG that can deal with mpeg1 videos. So far it looks promising at least on Windows.
1665933683418.png
 
I did some tests on windows with a C library called PL_MPEG that can deal with mpeg1 videos. So far it looks promising at least on Windows.
View attachment 1471
Nice. Care to share some sourcecode? I would really love to see how to code Cerberus-x extensions in Windows.
Did you use Visual Studio some other package/compiler?
 
Care to share some sourcecode?
Sure, it's just not ready yet and really ugly. So that's my approach oftentimes. Get it to a working state and then think about the structure. 😝
I am using the gcc compiler as it is configured with Cerberus and see how far I get with just wrapping some of the native functions.
If I am unsure how the api works I build the example codes as described on their github page and modify it to see what is going on.
There are some things with coupling native code to cerberus that I figure out by just looking at the transpiled code. My plan is to make a tutorial or at least a list of some useful tidbits I am using.
 
That sounds promising! I was about to make some tutorial how to make HTML5 extensions but it takes some time. I was loosing time rying to make Cerberus access fileaccess system so I started to look around for other packages but noone seemed as nice as Cerberus so then I thought..let's try to mix and make extensions.
 
HTML5 is the easiest to make stuff for. For example, I have a small routine to get the browser language:


Code:
#If TARGET="html5"

    Extern
        Function getLanguage:String() = "function (){ return navigator.userLanguage || navigator.language; }"
    Public

#End


That's it! You can now use "getLanguage" and it will return the language string from the browser :)
 
Back
Top Bottom