3#include "../_cexports/c_webstreaming.h"
4#include "converter.hpp"
20 class JPEGConverter :
public Converter
35 return Internal::DoResCallShareOut<JPEGConverter>(
36 [&](
void *&handle) {
return CVB_CALL_CAPI(CVWSCreateConverter(CExports::CVWSCT_Jpeg, handle)); });
48 JPEGConverter(HandleGuard<Converter> &&guard, PrivateTag) noexcept
60 CExports::cvbint64_t value = 0;
61 CVB_CALL_CAPI_CHECKED(CVWSGetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGScale, value));
62 return static_cast<int>(value);
74 CVB_CALL_CAPI_CHECKED(
75 CVWSSetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGScale,
static_cast<CExports::cvbint64_t
>(scale)));
85 CExports::cvbint64_t value = 0;
86 CVB_CALL_CAPI_CHECKED(CVWSGetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGQualityLevel, value));
87 return static_cast<int>(value);
99 CVB_CALL_CAPI_CHECKED(CVWSSetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGQualityLevel,
100 static_cast<CExports::cvbint64_t
>(quality)));
20 class JPEGConverter :
public Converter {
…};
void * Handle() const noexcept
Returns C-API style handle to Converter Object.
Definition converter.hpp:44
void SetQuality(int quality)
Set the quality of the JPEG conversion.
Definition jpeg_converter.hpp:97
void SetScale(int scale)
Set the scale of the JPEG conversion.
Definition jpeg_converter.hpp:72
int Scale() const
Get the scale of the JPEG conversion.
Definition jpeg_converter.hpp:58
static JPEGConverterPtr Create()
Creates a new JPEG converter.
Definition jpeg_converter.hpp:33
int Quality() const
Get the quality of the JPEG conversion.
Definition jpeg_converter.hpp:83
Namespace for streaming images via web sockets.
Definition converter.hpp:20
std::shared_ptr< JPEGConverter > JPEGConverterPtr
Convenience shared pointer for JPEGConverter.
Definition webstreaming.hpp:31
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17