You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.9 KiB

1 year ago
  1. #pragma once
  2. #include "IStream.h"
  3. #include <fsdk/IObject.h>
  4. #include <fsdk/FaceEngine.h>
  5. #include <fsdk/FSDKVersion.h>
  6. #if !defined(FSDK_VERSION_MAJOR)
  7. #error "FsdkVersion.h header is needed, but not included here"
  8. #endif
  9. #if FSDK_VERSION_MAJOR >= 5
  10. #include <fsdk/LaunchOptions.h>
  11. #endif
  12. namespace vsdk {
  13. struct IVehicleEngine;
  14. }
  15. namespace tsdk {
  16. struct ITrackEngine : fsdk::IRefCounted {
  17. /**
  18. * @brief Stops processing with all queued callbacks waiting.
  19. * @note It is a blocking function, which will wait all stored callbacks
  20. * execution.
  21. */
  22. TRACK_ENGINE_API virtual void stop() = 0;
  23. /**
  24. * @brief Create the Stream object.
  25. * @return Pointer to created object or nullptr if failed.
  26. * */
  27. TRACK_ENGINE_API virtual tsdk::IStream* createStream(StreamParams *params = nullptr) = 0;
  28. /** @brief Sets a best shot observer for all streams
  29. * @param observer pointer to the observer object, @see IBatchBestShotObserver
  30. */
  31. TRACK_ENGINE_API virtual void setBatchBestShotObserver(
  32. tsdk::IBatchBestShotObserver *observer) = 0;
  33. /** @brief Sets a visual observer for all streams
  34. * @param observer pointer to the observer object, @see IBatchVisualObserver
  35. */
  36. TRACK_ENGINE_API virtual void setBatchVisualObserver(
  37. tsdk::IBatchVisualObserver *observer) = 0;
  38. /** @brief Sets a debug observer for all streams
  39. * @param observer pointer to the observer object, @see IBatchDebugObserver
  40. */
  41. TRACK_ENGINE_API virtual void setBatchDebugObserver(
  42. tsdk::IBatchDebugObserver *observer) = 0;
  43. };
  44. /**
  45. * @brief Create the TrackerEngine object by config path.
  46. * @param [in] engine pointer to the FaceEngine object;
  47. * @param [in] configPath configuration file path;
  48. * @param [in] vehicleEngine pointer to the VehicleEngine object;
  49. * @param [in] launchOptions launch options for sdk functions;
  50. * @return fsdk ResultValue object, where value is track engine object reference.
  51. * */
  52. TRACK_ENGINE_API fsdk::ResultValue<fsdk::FSDKError, fsdk::Ref<tsdk::ITrackEngine>> createTrackEngine(
  53. fsdk::FaceEngineType* engine,
  54. const char* configPath = nullptr,
  55. vsdk::IVehicleEngine* vehicleEngine = nullptr
  56. #if FSDK_VERSION_MAJOR >= 5
  57. , const fsdk::LaunchOptions *launchOptions = nullptr
  58. #endif
  59. );
  60. /**
  61. * @brief Create the TrackerEngine object by settings provider.
  62. * @param [in] engine pointer to the FaceEngine object;
  63. * @param [in] settings provider with configuration;
  64. * @param [in] vehicleEngine pointer to the VehicleEngine object;
  65. * @param [in] launchOptions launch options for sdk functions;
  66. * @return fsdk ResultValue object, where value is track engine object reference.
  67. * */
  68. TRACK_ENGINE_API fsdk::ResultValue<fsdk::FSDKError, fsdk::Ref<tsdk::ITrackEngine>> createTrackEngine(
  69. fsdk::FaceEngineType* engine,
  70. const fsdk::ISettingsProviderPtr& provider,
  71. vsdk::IVehicleEngine* vehicleEngine = nullptr
  72. #if FSDK_VERSION_MAJOR >= 5
  73. , const fsdk::LaunchOptions *launchOptions = nullptr
  74. #endif
  75. );
  76. }