8#ifndef META_OCEAN_MEDIA_MF_VIDEO_ENCODER_H
9#define META_OCEAN_MEDIA_MF_VIDEO_ENCODER_H
28namespace MediaFoundation
151 inline const std::vector<uint8_t>&
data()
const;
194 inline explicit operator bool()
const;
277 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);
398 data_(std::move(data)),
399 presentationTime_(presentationTime),
400 bufferFlags_(bufferFlags)
407 *
this = std::move(sample);
412 return !data_.empty();
422 return presentationTime_;
449 data_ = std::move(sample.data_);
450 presentationTime_ = sample.presentationTime_;
451 bufferFlags_ = sample.bufferFlags_;
460inline VideoEncoder::Sample::operator bool()
const
467 *
this = std::move(videoEncoder);
488 if (
this != &videoEncoder)
492 encoder_ = std::move(videoEncoder.encoder_);
496 width_ = videoEncoder.width_;
497 videoEncoder.width_ = 0u;
499 height_ = videoEncoder.height_;
500 videoEncoder.height_ = 0u;
503 videoEncoder.isStarted_ =
false;
506 videoEncoder.mfStarted_ =
false;
509 videoEncoder.mftProvidesOutputSamples_ =
false;
512 videoEncoder.outputBufferSize_ = 0u;
515 videoEncoder.codecConfigEmitted_ =
false;
This class implements Ocean's image class.
Definition Frame.h:1879
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:166
bool isValid() const
Returns whether this scoped object holds a valid object.
Definition ScopedObject.h:460
The namespace covering the entire Ocean framework.
Definition Accessor.h:15