[Gambas-devel] V4L2 for Gambas ...

Ron_1st ronstk at ...124...
Wed Jan 21 20:40:32 CET 2009


On Wednesday 21 January 2009, Gareth Bult wrote:
> >I think that Ron_1st wanted to say, in his mail, that you can use subclasses 
> >just for grouping device properties.

Yes that is correct.

> 
> Mmm, but that doesn't necessarily help you when you come to "use" the component ... 
> 
> To be realistic, if this was useful you would have;
> 
> component.dimensions.width
> component.dimensions.height
> component.dimensions.top
> component.dimensions.left 
> 
> Would we not?
> 
> ... yet we don't .. (!)
> 
> ;-)

OK I get your point and that make sense too.

But...

If component is the GUI part of webcam then this is correct
if that GUI shows the video frames that do have also width/height
and that is what you set/get with v4l(2).

webcam.width 
webcam.height
	sets the width/height of the GUI part, viewport

webcam.video.width 
	set/get the width of the video frame

and if we have this way a subclass for video it make sense to have also 

webcam.audio
	for audio settings volume, mute
webcam.control
	i.e.snapshot button/mechanical moter move etc.


You are now working mainly on the .video part, other can
take the audio or control parts.

These assemble together the webcam as hardware device that can
be used in a frame/panel/whatever to create a webcam object
that can put in toolbox and dropped on a form as instand ready object.

Second this works nice with autocomplete too and filters just the right
properties/methods/events for the particulair part of webcam.

I hope this clear out why I suggested the subclasses.
Second this component is in my view usable for webcam/camera/tvcard
My 1'st webcam is connected to a tvcard composite connector.
My 2'nd webcam is PWC646 philips webcam with sound connected via USB
My 3'rd webcam is LogitecExpres with snapshot button connected via USB
All using v4l and or v4l2


Just example where panel1 is the GUI part for a webcam:

Panel1.width
Panel1.webcam.width
Panel1.stream (what stream? audio or video)
Panel1.webcam.stream (same?)

OK can be also
Panel1.webcam.frames
Panel1.webcam.audio

I do understand you want something to get working and thats my way to
for private toys but on the longterm mostly I see also that KISS is
not always right to be flexible and a well definied design pays back.

In this case you are the (re)creator and should do the way you like most.
If others (me?) do not like they can improve it there way, that the profit of OSS :)
Go simply your way and be happy.


Best regards,

Ron_1st

-- 
 A: Delete the text you reply on.
 Q: What to do to get my post on top?
 A: Because it messes up the order in which people normally read text. 
 Q: Why is top-posting such a bad thing? 
 A: Top-posting. 
 Q: What is the most annoying thing in e-mail? 
 




More information about the Devel mailing list