[Gambas-user] Re; Image handling ...

Gareth Bult gareth at ...1689...
Fri Jul 27 00:30:04 CEST 2007


Urm, storage is not the issue - just the presentation.

Given I store information on a separate file server, overall performance kills filesystem storage dead.
(not to mention your average workstation doesn't have RAID or 1Tb of free storage)

The system is designed to play 1-5 frames per second for up to 32 cameras - and it does easily.
The main issue is remotely monitoring all the sites in real time via ADSL.
(so each site has it's own local capture daemon, and the monitor connects to each site direction using MySQL)
[the monitor also used a local MySQL cache to speed up repeat plays and multiple local monitors running in tandem]

Anyway ... as I said, the issue is with the display ... everything else thus far seems to be 100% ...

Gareth.


--
Gareth Bult, Encryptec Limited
Tel: 0845 25 77033, Mob: 07891 389657
Email: gareth at ...1689... 
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.

----- Original Message -----
From: "ron" <ronstk at ...239...>
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Thursday, July 26, 2007 11:02:46 PM (GMT) Europe/London
Subject: Re: [Gambas-user] Re; Image handling ...

On Thursday 26 July 2007 23:36, Gareth Bult wrote:
> Ok,
> 
> I now have nifty little app for recording all my CCTV images off a variable number of camera and it's all looking great.
> 
> However, I don't know where to start with the screen flicker problem .. it did go away initially using the draw code you suggested, but it seems to have come back as a result of using a more recent SVN.
> 
> I use a separate recorder to store the images in Blobs (MySQL) and recover them with;
> 
>   File.Save(name, resultSet!image.Data)
>   $picture = Picture.Load(name)
> 
> Then issue;
> 
>   $canvas.Refresh
> 
> Then have;
> 
> PUBLIC SUB CANVAS_Draw()
>   draw.Picture($picture, 0, 0, 320, 240)  
> END
> 
> Works well, but refresh flickering is every couple of seconds and quite frustrating as it destroys viewing "quality".
> 
> Can anyone point me in the right direction re; where to look ?
> (There doesn't "seem" to be much scope for my code to cause this ???)
> 
> tia
> Gareth.
> 
> --

Once I have made something like your app in VB and a Access database 
to store the relevant information/picture.
I did not store the pictures int the database but only the filenames.
Simple because the database is a extra layer in filemanagement and that
is done much more efficient then any database engine can do.

Think at first the OS hat to determine where the database <b>files</b> are
on access request by the database engine.
Then the database engine has to look in which record the requested picture is.
then again the OS has again work to set a pointer position in the related
database files to read the sectors.
The database engine must make a temporary file to assemble with those sectors
the required picture.
Then gambas can read that file for the picture.

If it are only filenames in the database then the database does less 
bytes skipping to seek the start of the filename 
i.e. 128 bytes for filename against several hundred kilo bytes per picture.
The OS filesystem has to follow the filepointers from begin of the database file.
The database file can be spread across the disk.

Giving the OS the filename, quick found in database, the OS filesystem can
does this more efficient.

In practice it your way was for me less then 5fps.
Using the direct file access I had to implement a delay because the fps
was to high to catch the burglar, who is arrested btw.

Even add the pictures to a compressed filesystem works more efficient then
a database for this case.

Just my 2 euro cents :)

--
Ron








-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list