leon 3 weeks ago
parent
commit
4eb208ff48
3 changed files with 4 additions and 1 deletions
  1. 1 0
      src/graph/graph.cpp
  2. 2 0
      src/nodes/stream/streamNode.cpp
  3. 1 1
      workspace/folder.json

+ 1 - 0
src/graph/graph.cpp

@@ -22,6 +22,7 @@ static ModelType string_to_model_type(const std::string& type_str)
 static GNode::DecodeType string_to_decode_type(const std::string& type_str) {
     if (type_str == "GPU") return GNode::DecodeType::GPU;
     if (type_str == "CPU") return GNode::DecodeType::CPU;
+    if (type_str == "FOLDER") return GNode::DecodeType::FOLDER;
     throw std::runtime_error("Unknown decode type string: " + type_str);
 }
 

+ 2 - 0
src/nodes/stream/streamNode.cpp

@@ -122,6 +122,7 @@ void StreamNode::work()
             else
             {
                 process_stream_folder();
+                break;
             }
 
             PLOGI.printf("StreamNode [%s]: Stream processing finished or stopped (Status: %d).",
@@ -192,6 +193,7 @@ void StreamNode::process_stream_folder()
         metaData->from = name_;
         send_output_data(metaData);
     }
+    status_ == StreamStatus::CLOSED;
     PLOGI.printf("StreamNode [%s]: Exiting FOLDER processing loop (Running: %s, Status: %d).",
             name_.c_str(), running_ ? "true" : "false", static_cast<int>(status_));
 }

+ 1 - 1
workspace/folder.json

@@ -101,7 +101,7 @@
                     "params": {
                         "stream_url": "images/",
                         "gpu_id": 1,
-                        "decode_type": "GPU",
+                        "decode_type": "FOLDER",
                         "skip_frame": 1
                     }
                 },