//---------------------------------------------------------------------------

#ifndef FrmAcesCamFH
#define FrmAcesCamFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <OleCtrls.hpp>
#include "CDSFacilityF.h"
#include <ADODB.hpp>
#include <DB.hpp>
#include "AcesTechXPlayer2Lib_OCX.h"
#include <Menus.hpp>
//---------------------------------------------------------------------------
typedef struct tagPlayerinfo
{
    bool    Installed;
    bool    IsCctv;
    String  ID;
    String  NAME;
    String  RTSP_ADDR;
    void  **Data;
} PLAYER_INFO;

class TFrmAcesCam : public TForm
{
__published:	// IDE-managed Components
    TPanel *PnlBack;
    TTimer *TmrShow;
    TPanel *PnlBlob;
    TADOQuery *pADO;
    TImage *ImgBlob;
    TAcesTechXPlayer2 *AcesTechXPlayer21;
    TPopupMenu *PopupMenu1;
    TMenuItem *MnuConnect;
    TMenuItem *MnuDisconnect;
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall MnuConnectClick(TObject *Sender);
    void __fastcall MnuDisconnectClick(TObject *Sender);
private:	// User declarations

    bool    FDispBlob;
    DWORD   FProcessId;
    HWND    FWnd;
public:		// User declarations

    PLAYER_INFO FObj;

    bool    FAutoPlay;
    bool    FPlay;
    long    FConHandle;

    //bool    FInstalled;
    String  FId;
    String  FGroup;
    String  FName;
    String  FStreamingType;
    String  FViewAddress;
    String  FFullAddress;

    void __fastcall InitCamera(void *ACctv, bool AAutoPlay=true);

    void __fastcall Connect();
    void __fastcall Disconnect();
    void __fastcall CameraRelease();

    void __fastcall RefreshPlayer();

    __fastcall TFrmAcesCam(TComponent* Owner);
};
//---------------------------------------------------------------------------
//extern PACKAGE TFrmAcesCam *FrmAcesCam;
//---------------------------------------------------------------------------
#endif

