BBC BASIC for Windows
Programming >> Sound, Music and Video >> Is it possible to overlay sprite on video? http://bb4w.conforums.com/index.cgi?board=multimedia&action=display&num=1425878935 Is it possible to overlay sprite on video?
Post by ColinWA on Mar 9th, 2015, 05:28am
Hi All,
I hope some of you more experienced BB4W programmers might have a solution to my rather unusual problem. I need to present small images on top of a playing video. These small images must pop up, at times specified within my program, and disappear again in response to particular key presses. I'm playing the videos using the DirectShow routine Richard posted quite some time ago, which seems well suited to my purpose, as it enables me to execute program commands while the videos play. But I can't get anything to display on top of the playing videos. I reckoned perhaps a sprite might work, but my sprites disappear behind the video, and I can't figure out a way to make the sprite (or, indeed, any other small image) display on top of the playing video.
Could anyone please advise me whether there's a way of accomplishing this? I'd greatly appreciate your help.
All best,
Colin
Re: Is it possible to overlay sprite on video?
Post by rtr2 on Mar 9th, 2015, 09:54am
Could anyone please advise me whether there's a way of accomplishing this? I'd greatly appreciate your help.
I performed the following simple 'proof of principle' experiment. I first ran a BBC BASIC program which displays sprites on a full-screen transparent window (originally written to make dinosaurs roam all over the desktop!). Whilst that was running I ran another BBC BASIC program which displayed a video in a Direct Show window.
Result: the sprites appeared in front of the video! I tried this both in Windows XP (no DWM) and in Windows 8.1 (with DWM) and it worked fine in both.
So I conclude that there should be no problem in overlaying sprites on Direct Show video this way, except that of course because you have two entirely separate windows (the video window and the transparent window with the sprites) you would need to keep them aligned if the user is allowed to move or resize the video window.
Richard.
Re: Is it possible to overlay sprite on video?
Post by rtr2 on Mar 13th, 2015, 08:09am