I stiil think the code in CCP_0.0.30_C078D67F.rar is interesting for a lot of Delphi programmers working with the Canon SDK and the Canon EOS cameraes.

It was still straight forward to compile the code in Delphi XE7. However, playing around with LiveView made it end up in dead locks. I did fix this by making a few changes to the code in the unit ThreadLiveViewStream.pas. Please notice the added synchronize command.

unit ThreadLiveViewStream;


interface


uses
Classes, CanonCamera, ExtCtrls;


type
TLiveViewStream = class(TThread)
private
{ Déclarations privées }
FCamera: TCanonCamera;
FImage: TImage;
FStatus : Boolean;
protected
procedure DownloadNextLVI;
procedure Execute; override;
public
property Status : Boolean read FStatus;
constructor Create(Camera: TCanonCamera; Image: TImage; CreateSuspended: Boolean = True);
end;


implementation


{ TLiveViewStream }


constructor TLiveViewStream.Create(Camera: TCanonCamera; Image: TImage; CreateSuspended: Boolean = True);
begin
Self.FCamera := Camera;
Self.FImage := Image;
Self.FStatus := False;
Inherited Create(CreateSuspended);
end;


//har selv oprettet denne for at udføre Synchronize
procedure TLiveViewStream.DownLoadNextLVI;
begin
Self.FStatus := FCamera.DownloadLiveViewImage(FImage); //Lecture et affichage du stream dans l'objet
end;


procedure TLiveViewStream.Execute;
begin
if not FCamera.IsInLiveView Then //demare le LV
Exit;


Self.Priority := tpLower; //tpHigher should be tpLower according to the Delphi Help


repeat
try
//FStatus := FCamera.DownloadLiveViewImage(FImage); //Lecture et affichage du stream dans l'objet
Synchronize(DownloadNextLVI); //Did add Synchronize on 11-10-2015 to prevent dead locks
except
FStatus := False;
end;
until Terminated;
End;


end.