Re: [Lazarus] Play video from memory

2015-03-14 Thread aradeonas

Hi. Silvio you are right,That is a miss understanding. Here another test
with DelphiFFmpeg,I don't have full version and I can test it with
Delphi. I made a test that play video from memory but there is a delay
between changing files,Can any one test this demo and help me with this?
My goal is buffer second one before first one and after first one
finished play second almost imminently. I also attached Delphi project.

 unit Unit2;

 interface

 uses Winapi.Windows, Winapi.Messages, System.SysUtils,
 System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls,
 Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, FFBaseComponent, MemoryProtocol,
 Vcl.FFPlay, Vcl.StdCtrls, Vcl.MemoryAccess;

 type TForm2 = class(TForm) FFPlayer: TFFPlayer; Panel1: TPanel;
 Button1: TButton; MAA: TMemoryAccessAdapter; ListBox1: TListBox;
 Timer1: TTimer; procedure FormCreate(Sender: TObject); procedure
 Button1Click(Sender: TObject); procedure MAAClose(Sender: TObject);
 function MAAOpen(Sender: TObject; AURLContext: Pointer; const
 APrivateData: string; AFlags: Integer): Boolean; function
 MAARead(Sender: TObject; var Buffer; Count: Integer): Integer;
 function MAASeek(Sender: TObject; const Offset: Int64; Origin:
 TSeekOrigin): Int64; function MAAWrite(Sender: TObject; const Buffer;
 Count: Integer): Integer; procedure FFPlayerState(Sender: TObject;
 APlayState: TPlayState); procedure Timer1Timer(Sender: TObject);
 private { Private declarations } public FStream: TStream; LFileName:
 string; ci: Integer; changing: Boolean; l1,l2:Integer; n1,n2:Integer;
 nn:Boolean; procedure AddMsgLog(AMsg: string); procedure
 PlayNext(ADelta: Integer = 1); procedure TryPlay(AIsDiskFile:
 Boolean); end;

 var Form2: TForm2;

 implementation

 {$R *.dfm}

 procedure TForm2.AddMsgLog(AMsg: string); begin
 ListBox1.Items.Add(AMsg); ListBox1.TopIndex := ListBox1.Items.Count
 - 1; end;

 procedure TForm2.Button1Click(Sender: TObject); begin
 FFPlayer.TryOpen(Format('memory:%d', [Integer(MAA.Stream)]),
 Panel1.Handle, False); end;

 procedure TForm2.FFPlayerState(Sender: TObject; APlayState:
 TPlayState); const CPlayState: array [TPlayState] of string =
 ('Play', 'Pause', 'Resume', 'Step', 'Stop', 'End'); begin // OnState
 event handler

 // show state AddMsgLog(CPlayState[APlayState]);

 case APlayState of psPlay: begin l2:=GetTickCount; AddMsgLog('---Play
 time: ' + inttostr(l2 - l1)); end; psStop: begin n2:=GetTickCount;
 AddMsgLog('---Stop time: ' + inttostr(n2 - n1)); end; psEnd: begin
 l1:=GetTickCount; n1:=GetTickCount; FFPlayer.Pause; if ci  2 then if
 not changing then PlayNext; // FFPlayer.Seek(0, [sfBackward]); //
 LFileName := 'C:\ffmpeg\bin\tmp\OUTPUT1.mp4'; //
 FFPlayer.TryOpen(Format('memory:%d', [Integer(MAA.Stream)]),
 Panel1.Handle, False); // FFPlayer.Resume; end; end; end;

 procedure TForm2.FormCreate(Sender: TObject); begin ci := 0; changing
 := False;
 FFPlayer.SetLicenseKey('FSXX----');
 FStream := nil; if not FFPlayer.AVLibLoaded then begin if not
 FFPlayer.LoadAVLib(ExtractFilePath(Application.ExeName) + 'LibAV')
 then begin ShowMessage('h'); end; register_memory_protocol; end;

 end;

 procedure TForm2.MAAClose(Sender: TObject); begin if FStream  nil
 then FreeAndNil(FStream); end;

 function TForm2.MAAOpen(Sender: TObject; AURLContext: Pointer; const
 APrivateData: string; AFlags: Integer): Boolean;

 function GetFileSize(const FileName: String): Int64; var SearchRec:
 TSearchRec; begin if FindFirst(ExpandFileName(FileName), faAnyFile,
 SearchRec) = 0 then Result := SearchRec.Size else Result := -1; end;

 var LFileSize: Int64; t1, t2: Integer; begin t1 := GetTickCount;
 Result := False;

 if FStream  nil then FreeAndNil(FStream);

 LFileName := 'C:\ffmpeg\bin\tmp\OUTPUT' + inttostr(ci) + '.mp4';
 LFileSize := GetFileSize(LFileName); if LFileSize = 0 then
 AddMsgLog('file error') else if LFileSize  1024 * 1024 * 10 then
 begin // less than 10 MB, use TMemoryStream FStream :=
 TMemoryStream.Create; (FStream as
 TMemoryStream).LoadFromFile(LFileName); end else // for large file,
 use TFileStream FStream := TFileStream.Create(LFileName, fmOpenRead);

 Result := FStream  nil; t2 := GetTickCount; AddMsgLog('Open time: '
 + inttostr(t2 - t1)); end;

 function TForm2.MAARead(Sender: TObject; var Buffer; Count: Integer):
 Integer; var t1, t2: Integer; begin t1 := GetTickCount; if not
 Assigned(FStream) then begin Result := -1; Exit; end; Result :=
 FStream.Read(Buffer, Count); AddMsgLog(Format('MAA read from input
 stream %d - %d', [Count, Result])); t2 := GetTickCount;
 AddMsgLog('Reed time: ' + inttostr(t2 - t1)); end;

 function TForm2.MAASeek(Sender: TObject; const Offset: Int64; Origin:
 TSeekOrigin): Int64; var t1, t2: Integer; begin t1 := GetTickCount; if
 not Assigned(FStream) then begin Result := -1; Exit; end; Result :=
 FStream.Seek(Offset, Origin); AddMsgLog(Format('MAA seek input stream
 [whence: %d] %d - %d', [Ord(Origin), Offset, Result])); t2 :=
 GetTickCount; AddMsgLog('Seek time: ' + 

[Lazarus] TDBCalendar problems

2015-03-14 Thread Donald Ziesig

Hi All!

I have been trying to get the TDBCalendar control to update my database 
with no success.  If I manually update the date field in the table, the 
value is immediately reflected in the control - it changes to the 
correct date.  On the other hand, if I put the dataset in Edit or Insert 
mode and change the control's date, nothing happens after posting the 
data.  The field retains its original value (either blank or the date I 
manually entered).


While trying to debug this, I found a method 
TFieldDataLink.UpdateRecord which is invoked by many of the included 
files (*.inc) from DBCtrls.pp, but I can't find anywhere in the source 
code where this method is declared.  Since this is where I would expect 
the value to be written in the table,  and debugger step-into doesn't, 
I am at a dead end in debugging.


Am I missing something simple in the use of TDBCalendar (likely) or am I 
doing something that no one has ever tested (unlikely)?


Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Someone help built qt4pas.dll for win64

2015-03-14 Thread vfclists .
On 14 March 2015 at 12:50, FreeMan freema...@delphiturkiye.com wrote:

 :
 I'm s lucky :)
 Sure, I'm be happy, if I help somebody. I upload Qt4Pas5.7z (255kb). to
 our web site. just this dll file is enough for run my application.
 this is my dll compiled in w8 x64 with qt 4.8.6.
 http://www.delphiturkiye.com/files/Qt4Pas5.7z

 All qt 4.8.6 bin and lib folders size 1gb.
 qt-4.8.6-x64-mingw482r3-seh-rev1.7z file size 261mb but not sure about
 copyright problem.
 Yes, its good idea add 64 or some spell separate 3264bit version.
 And sorry for late answer.


 On 13.03.2015 19:02, zeljko wrote:

 That project for Qt64 is removed today (link you added at form), so no
 available binaries.
 Also, it will be nice that you upload somewhere that libQt4Pas.dll for
 64bit so other ppl can use it.
 Besides that I propose rename of libQt4Pas.dll to libQt4Pas64.dll for
 64bit target (of course in that case qt45.pas will be changed so it loads
 libQt4Pas64.dll) because of easier deployment of both targets under windows.

 zeljko



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Can you upload the files removed from the sourceforge repo as well?
The licensing terms should remain the same and probably be verified from
whatever licensing files that are contained in it.


-- 
Frank Church

===
http://devblog.brahmancreations.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Google Code closing down

2015-03-14 Thread Graeme Geldenhuys
If you haven't seen yet, Google announced that they will be closing 
down Google Code. My only concern is that some niche projects used in 
and that such code could be lost if not migrated to another service. 
So if you have the time and know of a project that needs migration, 
please do so. It is always sad to see open source code (no matter how 
old) simply lost.


Regards,
 Graeme




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Someone help built qt4pas.dll for win64

2015-03-14 Thread vfclists .
On 13 March 2015 at 17:02, zeljko zel...@holobit.net wrote:

 On 03/13/2015 01:38 PM, FreeMan wrote:

 On 12.03.2015 20:57, zeljko wrote:

 QMAKE_CXXFLAGS += -fpermissive should be added to the Qt4Pas.pro

 zeljko

 Thank you, I can compile now. And I added message in forum
 How to build QT4pas5.dll win64
 http://forum.lazarus.freepascal.org/index.php/topic,27706.0.html


 That project for Qt64 is removed today (link you added at form), so no
 available binaries.
 Also, it will be nice that you upload somewhere that libQt4Pas.dll for
 64bit so other ppl can use it.


+1
I was eyeing this thread with the intention of trying out my own build as
well, as my recent attempts to run Qt builds on Windows failed.
It seems the owner deleted them in a huff.


 Besides that I propose rename of libQt4Pas.dll to libQt4Pas64.dll for
 64bit target (of course in that case qt45.pas will be changed so it loads
 libQt4Pas64.dll) because of easier deployment of both targets under windows.

 zeljko



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
Frank Church

===
http://devblog.brahmancreations.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Help - turbopower ipro - anchors

2015-03-14 Thread Juha Manninen
Unfortunately Turbopower_ipro is buggy. There are many rendering errors.
Your best chance is to debug and fix the code. If you can do that,
please send a patch and it will be helpful for everybody.

Regards,
Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Help - turbopower ipro - anchors

2015-03-14 Thread Martin

Hi,

Sorry to post for help, it's my last resort! If anyone has any 
experience with turbopower_ipro, I would be very grateful if you could 
give me a little help please?


I've been knocking something up using similar code found in 
examples/turbopower_ipro/mainunit.pas for a bunch of local html documents.


I am using the OpenHTMLFile(const Filename : string) procedure (from the 
examples folder), and this fails unless it is an html file. It doesn't 
take anchor values. So I intercept the hotlinks and call 
MakeAnchorVisible(Anchor) on the htmlpanel if it is an anchor (but found 
finally after the reading the source code that I had to remove the 
leading # first), or OpenHTMLFile if it is a document. All good so far.


Showing anchors work if they relate to the same html document currently 
loaded (e.g. link = '#section02'), as I only call MakeAnchorVisible** 
and not OpenHTMLFile. If a HotLink points to another document and an 
anchor at the same time, e.g. something like 'doc-002.htm#section03' 
then I have a problem. I split the url, load the html document and then 
call MakeAnchorVisible on the trailing anchor value.


The problem is the page loads but the anchor does not show. 
MakeAnchorVisible seems to do nothing, the top of the html is shown at 
the top of the panel, which is what OpenHTMLFile does. I have tried all 
sorts of weird and wonderful things to get this to work. All to no avail.


I am guessing that I am calling MakeAnchorVisible before the htmlpanel 
has finished parsing all the nodes in the displayed html, so it does not 
know where that anchor is and does nothing??? I can't seem to find a 
suitable event (e.g. IHaveFinishedLoadingAndParsingHTML!) to call 
MakeAnchorVisible.


As usual sitting here on my lonesome, wearing my Total Noob hat, I am 
probably going about things completely the wrong way and have approached 
this wrong from the beginning. Kick me if necessary :-)


Will take a little break I think and come back to this tomorrow (Sunday) 
as my brain is frizzled!


Thanks in advance.

Martin

**Actually the start of the anchor shows at the bottom of the htmlpanel, 
which is not what you would want. I fixed this by calling Scroll(hsaEnd) 
on the panel first, which scrolls the panel to the end of the html 
document, before calling MakeAnchorVisible. This way the anchor shows at 
the top of the htmlpanel and you can read the section without scrolling.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Someone help built qt4pas.dll for win64

2015-03-14 Thread FreeMan

:
I'm s lucky :)
Sure, I'm be happy, if I help somebody. I upload Qt4Pas5.7z (255kb). to 
our web site. just this dll file is enough for run my application.

this is my dll compiled in w8 x64 with qt 4.8.6.
http://www.delphiturkiye.com/files/Qt4Pas5.7z

All qt 4.8.6 bin and lib folders size 1gb.
qt-4.8.6-x64-mingw482r3-seh-rev1.7z file size 261mb but not sure about 
copyright problem.

Yes, its good idea add 64 or some spell separate 3264bit version.
And sorry for late answer.

On 13.03.2015 19:02, zeljko wrote:
That project for Qt64 is removed today (link you added at form), so no 
available binaries.
Also, it will be nice that you upload somewhere that libQt4Pas.dll for 
64bit so other ppl can use it.
Besides that I propose rename of libQt4Pas.dll to libQt4Pas64.dll for 
64bit target (of course in that case qt45.pas will be changed so it 
loads libQt4Pas64.dll) because of easier deployment of both targets 
under windows.


zeljko 



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] lazbuild CheckIfCurPkgOutDirNeedsCompile Missing state file for

2015-03-14 Thread FreeMan

fpc r30183  lazarus r48342 yosemite.  xcode 6.2 and tools are upgraded.

make[2]: Leaving directory `/opt/lazarus/components/macroscript'
make[1]: Leaving directory `/opt/lazarus/components'
make: Leaving directory `/opt/lazarus'
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Missing state file for 
FCL 1.0.1: /opt/lazarus/packager/units/x86_64-darwin/FCL.compiled

...
Missing state file for all laz and my 3rd party packages's get this 
warning


I know this is not error, but code is has to work, just let you know

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Someone help built qt4pas.dll for win64

2015-03-14 Thread Giuliano Colla

Il 13/03/2015 18:02, zeljko ha scritto:

On 03/13/2015 01:38 PM, FreeMan wrote:

On 12.03.2015 20:57, zeljko wrote:

QMAKE_CXXFLAGS += -fpermissive should be added to the Qt4Pas.pro

zeljko

Thank you, I can compile now. And I added message in forum
How to build QT4pas5.dll win64
http://forum.lazarus.freepascal.org/index.php/topic,27706.0.html


That project for Qt64 is removed today (link you added at form), so no 
available binaries.
Also, it will be nice that you upload somewhere that libQt4Pas.dll for 
64bit so other ppl can use it.


If you don't have a place to upload it, just send it to me as an 
attachment (to my personal e-mail, because the list doesn't accept too 
large things), and I can make it available in a website I'm webmaster of.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] IDE main form height not saving and loading

2015-03-14 Thread FreeMan
I hide component palette from main form. and move toolbar to up. 
decrease IDE main form height, then restart IDE, toolbars position 
saved, but IDE main form height not saved, view default size.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] lazbuild CheckIfCurPkgOutDirNeedsCompile Missing state file for

2015-03-14 Thread FreeMan

On 14.03.2015 17:44, Mattias Gaertner wrote:

make[2]: Leaving directory `/opt/lazarus/components/macroscript'

What did you do?

I didn't understand what you mean ?
Log not start from there, I get warning message in log and add 1-2 lines 
before. I have not error, I builded IDE and start using now

This is my commandline:

./lazbuild --pcp=/Users/$User_Name/.lazarus --quiet --build-all 
--skip-dependencies --build-ide= --ws=qt --cpu=x86_64 --compiler=ppcx64



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] lazbuild CheckIfCurPkgOutDirNeedsCompile Missing state file for

2015-03-14 Thread FreeMan

On 14.03.2015 18:15, Mattias Gaertner wrote:

Your log showed a warning that the packages were not built properly.
If you want to know if this warning is serious you have to tell us what
you did.
Ok. I remove lazarus now, and run my script again. Downlaod svn lazarus 
then make. finished without error.

then execute that commandline ./lazbuild ...
then I get this errors now:
I removed same lines
.
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Missing state file for 
laz_fpspreadsheetexport_visual 1.4.2: 
/opt/proje_laz/components/all_libs/fpspreadsheet/x86_64-darwin-qt/laz_fpspreadsheetexport_visual.compiled

An unhandled exception occurred at $:
EAccessViolation: Access violation
  $
  $000130CF
  $00012D07
  $00017480

TFPCMsgFilePool.Destroy file still used: 
/opt/freepascal/3.1.1/compiler/msg/errore.msg

An unhandled exception occurred at $00010055A618:
Exception: TFPCMsgFilePool.Destroy some files are still used
  $00010055A618
  $000100019B35
  $00010001DAFE

For test, Run lazarus IDe, its worked, then from tools menu configure - 
build lazarus IDE builded ! restarted and all packs added !!!

Test my project, its compiled, running and debuging.

Log not start from there, I get warning message in log and add 1-2 lines
before. I have not error, I builded IDE and start using now
This is my commandline:

./lazbuild --pcp=/Users/$User_Name/.lazarus --quiet --build-all
--skip-dependencies --build-ide= --ws=qt --cpu=x86_64 --compiler=ppcx64

Well, if you pass --skip-dependencies, then you are an expert and
you know what you are doing. Or the opposite.

Mattias
yes I don't need compile every time same codes, I'm not change packs, if 
I add new one, work on it Imean try learn how to work then use it.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] lazbuild CheckIfCurPkgOutDirNeedsCompile Missing state file for

2015-03-14 Thread Mattias Gaertner
On Sat, 14 Mar 2015 15:30:48 +0200
FreeMan freema...@delphiturkiye.com wrote:

 fpc r30183  lazarus r48342 yosemite.  xcode 6.2 and tools are upgraded.

Good.

 make[2]: Leaving directory `/opt/lazarus/components/macroscript'

What did you do?

 make[1]: Leaving directory `/opt/lazarus/components'
 make: Leaving directory `/opt/lazarus'
 TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Missing state file for 
 FCL 1.0.1: /opt/lazarus/packager/units/x86_64-darwin/FCL.compiled
 ...
 Missing state file for all laz and my 3rd party packages's get this 
 warning
 
 I know this is not error, but code is has to work, just let you know

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] lazbuild CheckIfCurPkgOutDirNeedsCompile Missing state file for

2015-03-14 Thread Mattias Gaertner
On Sat, 14 Mar 2015 17:56:56 +0200
FreeMan freema...@delphiturkiye.com wrote:

 On 14.03.2015 17:44, Mattias Gaertner wrote:
  make[2]: Leaving directory `/opt/lazarus/components/macroscript'
  What did you do?
 I didn't understand what you mean ?

Your log showed a warning that the packages were not built properly.
If you want to know if this warning is serious you have to tell us what
you did.


 Log not start from there, I get warning message in log and add 1-2 lines 
 before. I have not error, I builded IDE and start using now
 This is my commandline:
 
 ./lazbuild --pcp=/Users/$User_Name/.lazarus --quiet --build-all 
 --skip-dependencies --build-ide= --ws=qt --cpu=x86_64 --compiler=ppcx64

Well, if you pass --skip-dependencies, then you are an expert and
you know what you are doing. Or the opposite.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus