[Gambas-user] Video Player example

Ron_1st ronstk at ...239...
Mon Oct 26 03:14:47 CET 2009


On Sunday 25 October 2009, Hartmut Eilers wrote:
> Hallo Gambas Users,
> 
> >> for my Video project I need a video player which plays a video
> >> in a unvisible DrawingArea where I can grab a picture contolled
> >> by a timer. I want to show the grabbed image in a smaller preview
> >> window where one can apply effects. When pressing a button all
> >>effects should bei applied to the grabbed images in their original size
> >> and saved as a sequence of pictures.
> 
> Werner suggested:
> >DrawingArea.Visible = FALSE or
> >DrawingArea.Hide
> 
> sorry I tried both, but that didn't work, the drawingarea stays visible
> 
> Doriano suggested:
> >If this does not work, you can try to put some other graphic element
> >above (on top) the drawingarea...
> 
> this doesn't work too, because the drawingarea.grab commands grabs
> also the elements on top of the drawingarea, not only the contents of
> the drawing area as you can see on the attached screenshot.

I have made a form to contain a invoice in the past.
This form had to look the same as the printed form because the 
personel using it have some disabilities (in real, not my opinion :) )

I did a FInvoice.grab and send the picture to the printer.
The form (A4) height is greater as the screen 800x600 terminal.
On the lower half of the grabbed picture there was memory garbage and 
part of a browser page previous visit with login information!.

My conclusion is that the *.grab takes the visible part of the screen
with the dimensions determined by the control you use for *.grab instead
the in-memory surface for that control.
And more worse it uses X-servers memory to get the size you ask with *.grab.
This is out of screen area so may be a X-server bug??
 

> 
> to give you a short explanation of the app:
> the yellow marked area is the drawing area for the video player in
> the original size of the video. marked green is the video player with
> its smaller preview picturebox. orange are the smaller previews and
> controls of 2 usb cams and red is marked the recording preview, which
> shows in a smaller preview what is recorded to disk. with the record
> radio buttons you can select which source is recorded. despite of the
> showed size all recordings are done with a resolution of 352x288 pixel.
> as you can see in the green preview the grab method grabs whats visible
> of the drawingarea, not the actual contents, its like a screenshot.
> 
> thats the reason why Dorianos idea doesn't work.
> 
> @Ron_1st
> I try to get better in my postings ;)
> 
> Are there any hints or ideas how to tackle my problem ?
> 
The dummy control i.e. a frame/panel should be on top of the DrawingArea.
Resize it in code to the dimension of the DrawingArea.
I'have don this to and should work.
Just one question, the drawing you use is it a mplayer screen? 
The same way as the movieplayer from the gambas example kit?
If so then it can be the reason why it is not working now.

One other method I think about is position the DrawingArea.left 
and DrawingArea.top at negative position on the form or make
the left and/or top greater so it s outside the form, if allowed, 


> I use Gambas 2.7 as distributed with Ubuntu 8.10
> 


Best regards,

Ron_1st

-- 





More information about the User mailing list