8#ifndef META_OCEAN_MEDIA_AVF_VIDEO_ENCODER_H
9#define META_OCEAN_MEDIA_AVF_VIDEO_ENCODER_H
18#include <VideoToolbox/VideoToolbox.h>
151 inline const std::vector<uint8_t>&
data()
const;
194 inline explicit operator bool()
const;
280 bool initialize(
const unsigned int width,
const unsigned int height,
const std::string& mime =
"video/avc",
const double frameRate = 30.0,
const unsigned int bitrate =
bitrateMbps2_,
const int iFrameInterval = 1);
373 static void compressionOutputCallback(
void* outputCallbackRefCon,
void* sourceFrameRefCon, OSStatus status, VTEncodeInfoFlags infoFlags, CMSampleBufferRef sampleBuffer);
424 *
this = std::move(sample);
429 return !
data_.empty();
466 data_ = std::move(sample.data_);
477inline VideoEncoder::Sample::operator bool()
const
484 if (session !=
nullptr)
486 VTCompressionSessionInvalidate(session);
This class implements Ocean's image class.
Definition Frame.h:1969
This class implements a recursive lock object.
Definition Lock.h:31
static constexpr T minValue()
Returns the min scalar value.
Definition Numeric.h:3259
This class implements a scoped lock object for recursive lock objects.
Definition Lock.h:147
This class wraps an unmanaged object (or reference) which needs to be released after usage.
Definition ScopedObject.h:156
The namespace covering the entire Ocean framework.
Definition Accessor.h:15