A class to mediate between a consumer of directshow image samples and the ISampleGrabberCallback implementation, with signalling on the producer and consumer side.
More...
#include <MediaSampleExchange.h>
A class to mediate between a consumer of directshow image samples and the ISampleGrabberCallback implementation, with signalling on the producer and consumer side.
Hides the newer Windows API used for the sync primitives from the ancient DirectShow-affiliated headers.
§ get()
Sample MediaSampleExchange::get |
( |
| ) |
|
|
inline |
Retrieves the sample in an RAII wrapper, so that signalling of consumption is automatic when the sample object goes out of scope.
§ signalSampleProduced()
Signals that a sample (passed in) was produced.
The producer should not return from its callback (that is, not release that sample) until the sample has been consumed or some other event has taken place (shutdown).
§ waitForSample()
bool MediaSampleExchange::waitForSample |
( |
std::chrono::milliseconds |
timeout | ) |
|
- Returns
- true if sample was made available, false if it timed out.
§ waitForSampleConsumed()
bool MediaSampleExchange::waitForSampleConsumed |
( |
std::chrono::milliseconds |
timeout | ) |
|
- Returns
- true if sample was consumed, false if it timed out.
The documentation for this class was generated from the following files: