fix(api): remove enable LEFT/RIGHT stream code
This commit is contained in:
@@ -79,10 +79,12 @@ void s1s2Processor::ProcessNativeStream(
|
||||
}
|
||||
|
||||
void s1s2Processor::StartVideoStreaming() {
|
||||
Activate();
|
||||
auto streams = getTargetStreams();
|
||||
for (unsigned int j =0; j< streams.size(); j++) {
|
||||
auto stream = streams[j].stream;
|
||||
auto callback = streams[j].stream_callback;
|
||||
target_streams_[j].enabled_mode_ = Synthetic::MODE_ON;
|
||||
device_->SetStreamCallback(
|
||||
stream,
|
||||
[this, stream, callback](const device::StreamData &data) {
|
||||
@@ -99,14 +101,15 @@ void s1s2Processor::StartVideoStreaming() {
|
||||
}
|
||||
|
||||
void s1s2Processor::StopVideoStreaming() {
|
||||
Deactivate();
|
||||
auto streams = getTargetStreams();
|
||||
for (unsigned int j =0; j< streams.size(); j++) {
|
||||
auto stream = streams[j].stream;
|
||||
target_streams_[j].enabled_mode_ = Synthetic::MODE_OFF;
|
||||
device_->SetStreamCallback(stream, nullptr);
|
||||
}
|
||||
device_->Stop(Source::VIDEO_STREAMING);
|
||||
}
|
||||
|
||||
api::StreamData s1s2Processor::GetStreamData(const Stream &stream) {
|
||||
Synthetic::Mode enable_mode = Synthetic::MODE_OFF;
|
||||
auto streams = getTargetStreams();
|
||||
|
||||
@@ -180,6 +180,9 @@ void Synthetic::EnableStreamData(
|
||||
auto processor = getProcessorWithStream(stream);
|
||||
iterate_processor_CtoP_before(processor,
|
||||
[callback, try_tag](std::shared_ptr<Processor> proce){
|
||||
if (proce->Name() == "RootProcessor") {
|
||||
return;
|
||||
}
|
||||
auto streams = proce->getTargetStreams();
|
||||
int act_tag = 0;
|
||||
for (unsigned int i = 0; i < proce->getStreamsSum() ; i++) {
|
||||
@@ -203,6 +206,9 @@ void Synthetic::DisableStreamData(
|
||||
auto processor = getProcessorWithStream(stream);
|
||||
iterate_processor_PtoC_before(processor,
|
||||
[callback, try_tag](std::shared_ptr<Processor> proce){
|
||||
if (proce->Name() == "RootProcessor") {
|
||||
return;
|
||||
}
|
||||
auto streams = proce->getTargetStreams();
|
||||
int act_tag = 0;
|
||||
for (unsigned int i = 0; i < proce->getStreamsSum() ; i++) {
|
||||
|
||||
@@ -138,7 +138,7 @@ class Synthetic {
|
||||
API *api_;
|
||||
|
||||
std::shared_ptr<RootProcessor> processor_;
|
||||
|
||||
std::vector<std::shared_ptr<Processor>> processors_;
|
||||
std::shared_ptr<Plugin> plugin_;
|
||||
|
||||
CalibrationModel calib_model_;
|
||||
@@ -148,8 +148,6 @@ class Synthetic {
|
||||
std::shared_ptr<Extrinsics> extr_;
|
||||
bool calib_default_tag_;
|
||||
|
||||
std::vector<std::shared_ptr<Processor>> processors_;
|
||||
|
||||
stream_data_listener_t stream_data_listener_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user