25 #ifndef INCLUDED_MediaSampleExchange_h_GUID_6E82A284_0E96_4391_6408_D9602D2658D7
26 #define INCLUDED_MediaSampleExchange_h_GUID_6E82A284_0E96_4391_6408_D9602D2658D7
50 : sampleExchange_(other.sampleExchange_), sample_(other.sample_),
51 timestamp_(other.timestamp_), owning_(false) {
52 std::swap(owning_, other.owning_);
60 assert(owning_ &&
"Shouldn't try to get the contained sample from a "
61 "moved-from wrapper!");
66 assert(owning_ &&
"Shouldn't try to get the contained timestamp from a "
67 "moved-from wrapper!");
74 : sampleExchange_(exchange), sample_(sample), timestamp_(timestamp),
78 IMediaSample &sample_;
106 IMediaSample *pin{sample_};
107 return Sample{*
this, *pin, timestamp_};
115 void signalSampleConsumed();
118 IMediaSample *sample_ =
nullptr;
120 std::unique_ptr<Impl> impl_;
123 using MediaSampleExchangePtr = std::shared_ptr<MediaSampleExchange>;
127 sampleExchange_.signalSampleConsumed();
131 #endif // INCLUDED_MediaSampleExchange_h_GUID_6E82A284_0E96_4391_6408_D9602D2658D7
Sample(Sample &&other)
Move constructor.
Header providing a C++ wrapper around TimeValueC.h.
~Sample()
Destructor - signals consumer finished.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...