[cscore] Use Raw for CvSink and CvSource (#6364)

Eventually we want to get to a point where we can remove OpenCV from the internals of cscore. The start to doing that is converting the existing CvSource and CvSink methods to RawFrame.

For CvSource, this is 100% a free operation. We can do everything the existing code could have done (with one small exception we can fairly easily fix).

For CvSink, by defaut this change would incur one extra copy, but no extra allocations. A set of direct methods were added to CvSink to add a method to avoid this extra copy.
This commit is contained in:
Thad House
2024-02-12 22:33:03 -08:00
committed by GitHub
parent 4f9d73783b
commit fb947fe998
28 changed files with 666 additions and 1203 deletions

View File

@@ -33,7 +33,7 @@ class ConfigurableSourceImpl : public SourceImpl {
void NumSinksChanged() override;
void NumSinksEnabledChanged() override;
// OpenCV-specific functions
// Frame based specific functions
void NotifyError(std::string_view msg);
int CreateProperty(std::string_view name, CS_PropertyKind kind, int minimum,
int maximum, int step, int defaultValue, int value);