Classes | |
struct | Impl |
Public Member Functions | |
void | signalSampleProduced (IMediaSample *sample, osvr::util::time::TimeValue const ×tamp) |
void | signalSampleProduced (IMediaSample *sample) |
bool | waitForSample (std::chrono::milliseconds timeout) |
Sample | get () |
bool | waitForSampleConsumed (std::chrono::milliseconds timeout) |
Friends | |
class | Sample |
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.
Definition at line 89 of file MediaSampleExchange.h.
void MediaSampleExchange::signalSampleProduced | ( | IMediaSample * | sample, |
osvr::util::time::TimeValue const & | timestamp | ||
) |
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).
Definition at line 46 of file MediaSampleExchange.cpp.
bool MediaSampleExchange::waitForSample | ( | std::chrono::milliseconds | timeout | ) |
Definition at line 62 of file MediaSampleExchange.cpp.
|
inline |
Retrieves the sample in an RAII wrapper, so that signalling of consumption is automatic when the sample object goes out of scope.
Definition at line 105 of file MediaSampleExchange.h.
bool MediaSampleExchange::waitForSampleConsumed | ( | std::chrono::milliseconds | timeout | ) |
Definition at line 73 of file MediaSampleExchange.cpp.