MYNT-EYE-S-SDK/src/api/synthetic.h

59 lines
1.2 KiB
C
Raw Normal View History

2018-04-26 05:33:37 +03:00
#ifndef MYNTEYE_SYNTHETIC_H_ // NOLINT
#define MYNTEYE_SYNTHETIC_H_
#pragma once
2018-04-27 04:58:53 +03:00
#include <map>
2018-04-26 09:44:47 +03:00
#include <memory>
#include <vector>
#include "api/api.h"
2018-04-26 05:33:37 +03:00
MYNTEYE_BEGIN_NAMESPACE
class API;
2018-04-26 09:44:47 +03:00
class Processor;
2018-04-26 05:33:37 +03:00
class Synthetic {
public:
2018-04-26 09:44:47 +03:00
using stream_callback_t = API::stream_callback_t;
2018-04-27 04:58:53 +03:00
typedef enum Mode {
MODE_NATIVE, // Native stream
MODE_SYNTHETIC, // Synthetic stream
MODE_LAST // Unsupported
} mode_t;
2018-04-26 05:33:37 +03:00
explicit Synthetic(API *api);
~Synthetic();
2018-04-27 04:58:53 +03:00
mode_t GetMode(const Stream &stream) const;
2018-04-26 09:44:47 +03:00
bool Supports(const Stream &stream) const;
2018-04-27 04:58:53 +03:00
void EnableStreamData(const Stream &stream);
void DisableStreamData(const Stream &stream);
2018-04-26 09:44:47 +03:00
void SetStreamCallback(const Stream &stream, stream_callback_t callback);
bool HasStreamCallback(const Stream &stream) const;
void StartVideoStreaming();
void StopVideoStreaming();
void WaitForStreams();
api::StreamData GetStreamData(const Stream &stream);
std::vector<api::StreamData> GetStreamDatas(const Stream &stream);
2018-04-26 05:33:37 +03:00
private:
2018-04-27 04:58:53 +03:00
void InitStreamSupports();
2018-04-26 05:33:37 +03:00
API *api_;
2018-04-26 09:44:47 +03:00
2018-04-27 04:58:53 +03:00
std::map<Stream, mode_t> stream_supports_mode_;
2018-04-26 09:44:47 +03:00
std::vector<std::shared_ptr<Processor>> processors_;
2018-04-26 05:33:37 +03:00
};
MYNTEYE_END_NAMESPACE
#endif // MYNTEYE_SYNTHETIC_H_ NOLINT