Bonjour & Bienvenue sur EOS-Numerique
Réseaux Sociaux : Follow us on Facebook Follow us on Twitter


Sign Up






Page 3 sur 3 PremièrePremière 123
Affichage des résultats 41 à 44 sur 44

Discussion: ED-SDK 2.7 En Delphi

  1. #41
    Membre
    Inscription
    avril 2013
    Localisation
    Lyon
    Âge
    42
    Messages
    22
    Boîtier
    EOS 1000D Modifié et EOS1100D
    Objectif(s)
    18/55 + samyang 8.5mm F3/5

    Par défaut

    Bonne nouvelle,
    J'ai effectué des centaines de test de la DLL, bon juste avec un 1100D et un 1000D, mais c'est très stable
    Pour obtenir la DLL, contactez moi.


  2. #42
    Nouvel utilisateur
    Inscription
    juillet 2015
    Localisation
    NIMES
    Âge
    51
    Messages
    1
    Boîtier
    Canon EOS 1100D
    Objectif(s)
    Rien de partiuclier :-) !

    Par défaut

    Bonjour Xifit,

    je viens de tomber sur ce sujet qui m'interresse au plus haut point.

    Pourrais-tu me faire parvenir la DLL ?

    Merci d'avance.

    Gilles

  3. #43
    Nouvel utilisateur
    Inscription
    octobre 2015
    Localisation
    Denmark
    Âge
    63
    Messages
    2
    Boîtier
    Canon EOS 1000D
    Objectif(s)
    Skilled in Optics and Delphi programming

    Par défaut

    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.

  4. #44
    Nouvel utilisateur
    Inscription
    octobre 2015
    Localisation
    Denmark
    Âge
    63
    Messages
    2
    Boîtier
    Canon EOS 1000D
    Objectif(s)
    Skilled in Optics and Delphi programming

    Par défaut Avoiding the flickering and speed up things

    Next problem in PixelKs code from 09/04/2014 17h 14 is the annoying flickering and bad timing while in zooming in liveView.

    I did fix this by downloading the fast jpeg decoder unit jpegdec.pas from http://synopse.info/files/jpegdec.zip

    I did include jpegdec in the uses clause of the CanonCamera.pas


    Code:
    unit CanonCamera;
    
    
    interface
    
    
    uses
      Windows, Messages, Classes, Sysutils, Graphics, Jpeg,
      EDSDKApi, EDSDKType, EDSDKError, ExtCtrls,
      jpegdec;  //FabInSpace did add reference to jpegdec.pas on 11-10-2015
    And I did the following changes to the last part of the unit:


    Code:
    function TCanonCamera.DownloadLiveViewImage(Image : TImage) : Boolean;
    var
      MemStream: TMemoryStream;
      Stream : EdsStreamRef;
      evfImage : EdsEvfImageRef;
      JPG: TJPEGImage;
      ImageData : Pointer;
      ImageSize : EdsUInt32;
      BMP: TBitMap;  //Added 11-10-2015
    begin
      Result := False;
      stream   := nil;
      evfImage := nil;
      try
        Self.LastError := EdsCreateMemoryStream( 0, Stream );
        if Self.LastError <> EDS_ERR_OK then
          Exit;
    
    
        try
          Self.LastError := EdsCreateEvfImageRef( Stream, evfImage );
          if Self.LastError <> EDS_ERR_OK then
            Exit;
    
    
          Self.LastError := EdsDownloadEvfImage(Self.FRef , evfImage);
          if Self.LastError <> EDS_ERR_OK then
          begin
            EdsRelease(stream);
            Exit;
          end;
    
    
          Self.LastError := EdsGetPointer(Stream, ImageData);
          if Self.LastError <> EDS_ERR_OK then
          begin
            EdsRelease(evfImage);
            EdsRelease(stream);
            Exit;
          end;
    
    
          Self.LastError := EdsGetLength(Stream, ImageSize);
          if Self.LastError <> EDS_ERR_OK then
          begin
            EdsRelease(evfImage);
            EdsRelease(stream);
            Exit;
          end;
    
    
          MemStream := TMemoryStream.Create;
          try
            MemStream.WriteBuffer(ImageData^, ImageSize);
            MemStream.position := 0;
    
    
            {Old lines from before 11-10-2015
    
    
            JPG := TJPEGImage.Create; // The Stream is a JPEG Image
            try
              JPG.LoadFromStream(MemStream);
              //JPG.SaveToFile('LVSteam.jpg');
    
    
              if not Assigned(Image.Picture.Bitmap) then
                Image.Picture.Bitmap := TBitmap.Create;
              Image.Picture.Bitmap.Assign(JPG);
    
    
              Result := True;
            Finally
              JPG.Free;
            end;       }
    
    
            //New lines elliminating flickering
            with TMemoryStream.Create do
            try
              LoadFromstream(MemStream);
    
    
              BMP := JpegDecode(memory, Size);
    
    
              if BMP <> nil
              then
                try
                  Image.Picture.Bitmap := Bmp;
                finally
                  BMP.free;
                end;
            finally
              Free;
            end;
    
    
            //end of new lines from 11-10-2015
    
    
          finally
            MemStream.Free;
          end;
    
    
        finally
          EdsRelease(evfImage);
        end;
      finally
        EdsRelease(stream);
      end;
    end;

 

 
Page 3 sur 3 PremièrePremière 123

Informations de la discussion

Utilisateur(s) sur cette discussion

Il y a actuellement 1 utilisateur(s) naviguant sur cette discussion. (0 utilisateur(s) et 1 invité(s))

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •  
Fuseau horaire GMT +1. Il est actuellement 12h29.
Powered by vBulletin® Version 4.2.5
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.
Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Auto Closing Of Threads provided by Threads Auto Close (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Copyright © Eos-numerique 2004-2023
vBulletin Skin By: PurevB.com