Floating Video Window?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
peter.s
Posts: 99
Joined: Thu Jul 10, 2008 11:47 am

Floating Video Window?

Post by peter.s » Sun Jul 13, 2008 5:18 am

Hi There,

I'm playing around with the Video Capture program which comes wit the Revolution Studio tutorials. In it they use a Image rectangle to house the video feed from a webcam. When video is in the rectangle, the video image sits "above" everything else on the screen. I'm guessing this is because the program is referencing pixels on the screen rather than constraints in a field?

Why is it done like this? (a short answer will suffice). Why not use a Player field?

When it is done this way, all new stacks and even the "Save" dialogue for the video stack gets hidden behind the Video rectangle (the one which sheets from the title bar in Mac OS X). Is there any way of "fixing" this - so it doesn't obscure the "Save" dialogue?

Cheers,

P

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Location: Kent, UK
Contact:

Post by gyroscope » Sun Jul 13, 2008 11:42 am

Hi Peter
...Studio tutorials. In it they use a Image rectangle to house the video feed from a webcam.
That's a new one for me; I didn't know that could be done... although if you use video in a player, it still will sit above everything else. There is a keyword to allow graphics to appear in front of it though but a) I can't find it in the Dictionary again and b) I couldn't get it to work at the time...

Hmm, hope that's some sort of help...

:)

Edit: at least putting the video in a player makes it appear above all else in the Rev stack/app only and not above all other app windows (if I've understood you correctly here...)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Jul 13, 2008 11:12 pm

Hi P,

Actually, video form both cam and files is displayed in a special child window. This child window is so special that it causes a few problems that cannot be solved. I believe there are several bug reports on this in the QCC.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

peter.s
Posts: 99
Joined: Thu Jul 10, 2008 11:47 am

Post by peter.s » Mon Jul 14, 2008 3:40 am

Hi Mark and Gyroscope,

If I play a video file in a player, it seems to behave like one would expect. It seems to be a part of the stack and doesn't float above other stacks. It's when the video is in the "rectangle" (child window?) that it behaves like this - at least on my Mac OS 10.4.11.

If I check "Float Above Everything" in the properties window of the other stack, it will float above the video, but then the other stack becomes Modal - which I don't want.

Is it then possible to feed a webcam to a Player field? If so how so?

Cheers,

Peter

Oh - What's the QCC?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Jul 14, 2008 9:35 am

Hi Peter,

It was possible to display iSight in a QuickTime player, using Mac OS X 10.4.x, but it no longer works with 10.5.

QCC is the quality control centre, formerly known as Bugzilla.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Mon Jul 14, 2008 10:37 am

Hi Gyroscope
That's a new one for me; I didn't know that could be done... although if you use video in a player, it still will sit above everything else. There is a keyword to allow graphics to appear in front of it though but a) I can't find it in the Dictionary again and b) I couldn't get it to work at the time...
if you set the alwaysbuffer of a player to true then you can display graphics on top of the player. The downside of this is that the controller doesnt work anymore and you have to script your own controller.
That can be easily done with a scrollbar -> slider and 2 buttons.

for the buttons
start player "p1"
and
stop player "p1"

You set the the endvalue of the scrollbar to the duration of the movie in the player

script of the scrollbar could be

----------
on mouseDown pMouseBtnNum
set the endvalue of scrollbar "S1" to the duration of player "p1"
end mouseDown

on scrollbarDrag pScrollValue
set the currenttime of player "p1" to pScrollValue
end scrollbarDrag
------------------

the thumb of the player controller doesnt change position when the alwaysbuffer is true so I would set the showcontroller of the player to false since you use your own controller anyways.

regards

Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Mon Jul 14, 2008 7:09 pm

Hi Mark,


It was possible to display iSight in a QuickTime player, using Mac OS X 10.4.x, but it no longer works with 10.5.
the example stack 'Video Capture' in -> resources -> Sample Projects works for me with the built-in iSight. Rev 2.9 System 10.5.4 Quicktime 7.5 MacBook Pro.

It would be a pitty if this beautiful example would not work.

regards

Bernd

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Location: Kent, UK
Contact:

Post by gyroscope » Tue Jul 15, 2008 12:16 am

Thank you for clearing that one up for me, Bernd. :) (I see now that alwaysbuffer isn't enough on its own...)

Hope you didn't mind the slight diversion to your thread, Peter!

:)

peter.s
Posts: 99
Joined: Thu Jul 10, 2008 11:47 am

Post by peter.s » Tue Jul 15, 2008 3:20 am

No, not at all - it's always good to learn something.

P

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Jul 15, 2008 7:57 am

Bernd,

As I tried to make clear in my earlier posts, Revolution's video grabber uses its own child window and no player object!

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Tue Jul 15, 2008 9:17 am

Mark,

shure enough, I got mixed up.

thanks for putting me back on track.

cheers

Bernd

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”