Files
GVFG_Standalone/sdk/gvfg/src/gvfg_error_state.h
T
Mark.lin f380a8a143 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.
2026-08-27 11:10:51 +08:00

35 lines
657 B
C++

#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_;
};
}