8#ifndef META_OCEAN_MEDIA_ANDROID_VIDEO_ENCODER_H
9#define META_OCEAN_MEDIA_ANDROID_VIDEO_ENCODER_H
11#if defined(__ANDROID_API__) && __ANDROID_API__ >= 24
13#ifndef OCEAN_MEDIA_ANDROID_VIDEOENCODER_AVAILABLE
14 #define OCEAN_MEDIA_ANDROID_VIDEOENCODER_AVAILABLE
153 inline const std::vector<uint8_t>&
data()
const;
196 inline explicit operator bool()
const;
233 using Samples = std::vector<Media::Android::VideoEncoder::Sample>;
362 static Frame frameFromBuffer(
const unsigned int width,
const unsigned int height, uint8_t*
const buffer,
size_t size,
const int32_t androidFormat,
const int32_t androidColorRange);
380 data_(std::move(data)),
381 presentationTime_(presentationTime),
382 bufferFlags_(bufferFlags)
389 *
this = std::move(sample);
394 return !data_.empty();
404 return presentationTime_;
431 data_ = std::move(sample.data_);
432 presentationTime_ = sample.presentationTime_;
433 bufferFlags_ = sample.bufferFlags_;
435 sample.presentationTime_ = -1;
442inline VideoEncoder::Sample::operator bool()
const
449 *
this = std::move(videoEncoder);
470 if (
this != &videoEncoder)
474 encoder_ = std::move(videoEncoder.encoder_);
477 videoEncoder.isStarted_ =
false;
This class implements Ocean's image class.
Definition Frame.h:1879
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition Frame.h:183
@ FORMAT_Y_UV12_LIMITED_RANGE
Pixel format with 8 bits Y frame as entire block, followed by 8 bits 2x2 sub-sampled U and V zipped (...
Definition Frame.h:808
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
bool isValid() const
Returns whether this scoped object holds a valid release function (which will be invoked once the obj...
Definition ScopedObject.h:351
The namespace covering the entire Ocean framework.
Definition Accessor.h:15