Simplify dual-channel capture and error handling

Compared with b5b045a:

- Model CH0 and CH1 as independent channel sessions sharing one device connection.

- Keep one outstanding frame per channel and tighten read/release ownership validation.

- Unify facade and PCIES2MM diagnostic details in a per-channel ChannelErrorState.

- Treat polling timeouts and stop wakeups as expected control flow instead of persistent faults.

- Report detailed errors only when an API operation actually fails.

- Remove obsolete preview timing/error diagnostics and the redundant debug error API.

- Refresh the public and internal API references, architecture diagrams, and learning guides.
This commit is contained in:
Mark.lin
2026-08-27 11:10:51 +08:00
parent b5b045a41a
commit f380a8a143
21 changed files with 1658 additions and 545 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include <mutex>
#include <string>
#include <utility>
namespace gvfg::internal
{
class ChannelErrorState final
{
public:
void set(std::string message)
{
std::lock_guard<std::mutex> lock(mutex_);
message_ = std::move(message);
}
void clear()
{
std::lock_guard<std::mutex> lock(mutex_);
message_.clear();
}
std::string message() const
{
std::lock_guard<std::mutex> lock(mutex_);
return message_;
}
private:
mutable std::mutex mutex_;
std::string message_;
};
}