FrmSamsungPlayer1F.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. //---------------------------------------------------------------------------
  2. #ifndef FrmSamsungPlayer1FH
  3. #define FrmSamsungPlayer1FH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <OleCtrls.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <ComCtrls.hpp>
  12. #include "XNSSDKDEVICELib_OCX.h"
  13. #include "XNSSDKWINDOWLib_OCX.h"
  14. #include "cxContainer.hpp"
  15. #include "cxControls.hpp"
  16. #include "cxEdit.hpp"
  17. #include "cxGraphics.hpp"
  18. #include "cxLabel.hpp"
  19. #include "cxLookAndFeelPainters.hpp"
  20. #include "cxLookAndFeels.hpp"
  21. #include "dxSkinBlack.hpp"
  22. #include "dxSkinMcSkin.hpp"
  23. #include "dxSkinsCore.hpp"
  24. #include "dxSkinBlue.hpp"
  25. #include "dxSkinCaramel.hpp"
  26. #include "dxSkinCoffee.hpp"
  27. #include "dxSkinDarkRoom.hpp"
  28. #include "dxSkinDarkSide.hpp"
  29. #include "dxSkinFoggy.hpp"
  30. #include "dxSkinGlassOceans.hpp"
  31. #include "dxSkiniMaginary.hpp"
  32. #include "dxSkinLilian.hpp"
  33. #include "dxSkinLiquidSky.hpp"
  34. #include "dxSkinLondonLiquidSky.hpp"
  35. #include "dxSkinMoneyTwins.hpp"
  36. #include "dxSkinOffice2007Black.hpp"
  37. #include "dxSkinOffice2007Blue.hpp"
  38. #include "dxSkinOffice2007Green.hpp"
  39. #include "dxSkinOffice2007Pink.hpp"
  40. #include "dxSkinOffice2007Silver.hpp"
  41. #include "dxSkinOffice2010Black.hpp"
  42. #include "dxSkinOffice2010Blue.hpp"
  43. #include "dxSkinOffice2010Silver.hpp"
  44. #include "dxSkinSeven.hpp"
  45. #include "dxSkinSharp.hpp"
  46. #include "dxSkinSilver.hpp"
  47. #include "dxSkinStardust.hpp"
  48. #include <Menus.hpp>
  49. #include "CDSCctvF.h"
  50. #include "AcesTechXPlayer2Lib_OCX.h"
  51. //---------------------------------------------------------------------------
  52. class TFrmSamsungPlayer1 : public TForm
  53. {
  54. __published: // IDE-managed Components
  55. TPanel *PnlCamera;
  56. TXnsSdkDevice *XnsSdkDevice1;
  57. TXnsSdkWindow *XnsSdkWindow1;
  58. TPopupMenu *PopupMenu1;
  59. TMenuItem *MnuConnect;
  60. TMenuItem *MnuDisconnect;
  61. TImage *ImgNoData;
  62. TTimer *TmrPlay;
  63. TTimer *TmrStop;
  64. TPanel *PnlName;
  65. TcxLabel *LblErrMsg;
  66. void __fastcall FormShow(TObject *Sender);
  67. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  68. void __fastcall FormDestroy(TObject *Sender);
  69. void __fastcall XnsSdkDevice1ConnectFailed(TObject *Sender, long nDeviceID, long nControlID);
  70. void __fastcall XnsSdkDevice1DeviceStatusChanged(TObject *Sender, long nDeviceID, long nErrorCode, long nDeviceStatus,
  71. long nHddCondition);
  72. void __fastcall MnuConnectClick(TObject *Sender);
  73. void __fastcall MnuDisconnectClick(TObject *Sender);
  74. void __fastcall TmrPlayTimer(TObject *Sender);
  75. void __fastcall TmrStopTimer(TObject *Sender);
  76. private: // User declarations
  77. public:
  78. long m_hDevice; // Device handle
  79. long m_lDeviceId; // Device handle
  80. long m_hMediaSource; // Media stream ID
  81. long m_nControlId; // Control ID
  82. bool m_bIsMediaPlay; // Media play or stop
  83. bool FInitialize;
  84. public: // User declarations
  85. bool FAutoPlay;
  86. bool FPlay;
  87. bool FInstalled;
  88. String FId;
  89. String FGroup;
  90. String FName;
  91. String FStreamingType;
  92. String FViewAddress;
  93. String FFullAddress;
  94. String FStrmAddr;
  95. String FLoc;
  96. WideString FDefModel;
  97. WideString FModelName;
  98. WideString FIpAddress;
  99. int FPort;
  100. WideString FConnId;
  101. WideString FConnPass;
  102. __fastcall TFrmSamsungPlayer1(TComponent* Owner, TXCctv *ACctv, bool AAutoPlay);
  103. void __fastcall CommClose();
  104. void __fastcall WebCamPlay();
  105. void __fastcall WebCamStop();
  106. bool __fastcall SetupWebCamera();
  107. void __fastcall ReleaseWebCamera();
  108. bool __fastcall ConnectWebCamera();
  109. bool __fastcall OpenWebCamera();
  110. void __fastcall DisconnectWebCamera();
  111. void __fastcall CloseWebCamera();
  112. int __fastcall CameraControl(int ACommand, int ASpeed);
  113. void __fastcall InitCamera(TXCctv *ACctv, bool AAutoPlay=true);
  114. void __fastcall DisplayName(String AName);
  115. int __fastcall Play(String AId,
  116. String ALoc,
  117. String AIpAddress,
  118. int APort=4520,
  119. String AConnId="admin",
  120. String AConnPass="4321",
  121. String AComModel="Samsung",
  122. String ADevModel="SNP-3371TH");
  123. void __fastcall ErrorMsg(String AErrMsg);
  124. void __fastcall Connect();
  125. void __fastcall Disconnect();
  126. void __fastcall CameraRelease();
  127. };
  128. //---------------------------------------------------------------------------
  129. //extern PACKAGE TFrmSamsungPlayer1 *FrmSamsungPlayer1;
  130. //---------------------------------------------------------------------------
  131. #endif