3#include "codec_bridge.hpp"
4#include "../global.hpp"
5#include "../utilities/system_info.hpp"
15 inline HandleGuard<CodecBridge::FormatConverter>::HandleGuard(
void *handle) noexcept
16 : HandleGuard<CodecBridge::FormatConverter>(handle, [](
void *handle) { CVB_CALL_CAPI(
ReleaseObject(handle)); })
28 class FormatConverter final
45 return Internal::DoResCallObjectOut<FormatConverter>([&](
void *&handle) {
46 return CVB_CALL_CAPI(CVCBCreateFormatConverter(
47 srcSize.
Width(), srcSize.
Height(),
static_cast<CExports::CVCBPixelFormat
>(srcFormat), dstSize.
Width(),
48 dstSize.
Height(),
static_cast<CExports::CVCBPixelFormat
>(dstFormat),
49 static_cast<CExports::CVCBInterpolation
>(method), handle));
58 return std::make_unique<FormatConverter>(
std::move(guard));
61 explicit FormatConverter(HandleGuard<FormatConverter> &&guard) noexcept
66 FormatConverter(
const FormatConverter &other) =
delete;
67 FormatConverter &operator=(
const FormatConverter &other) =
delete;
68 FormatConverter(FormatConverter &&other) =
delete;
69 FormatConverter &operator=(FormatConverter &&other) =
delete;
71 ~FormatConverter() =
default;
73 void *Handle() const noexcept
75 return handle_.Handle();
88 CVB_CALL_CAPI(CVCBFormatConverterExecute(Handle(), srcFrame.Handle(), dstFrame.Handle()));
92 HandleGuard<FormatConverter> handle_;
28 class FormatConverter final {
…};
A video frame for encoding and decoding.
Definition frame.hpp:30
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle...
Definition size_2d.hpp:20
T Height() const noexcept
Gets the vertical component of the size.
Definition size_2d.hpp:77
T Width() const noexcept
Gets the horizontal component of the size.
Definition size_2d.hpp:57
cvbbool_t ReleaseObject(OBJ &Object)
Namespace for encoding and decoding videos.
Definition codec_bridge.hpp:24
PixelFormat
Subset of FFmpeg pixel formats.
Definition codec_bridge.hpp:91
Interpolation
Interpolation method when scaling frames.
Definition codec_bridge.hpp:175
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17