10#include "webcface/common/webcface-config.h"
21 const Image &request(std::optional<int> rows, std::optional<int> cols,
23 std::optional<ImageColorMode> color_mode,
24 std::optional<double> frame_rate)
const;
32 using Field::lastName;
68 return child(std::to_string(index));
90 template <
typename F,
typename std::enable_if_t<std::is_invocable_v<F>,
91 std::
nullptr_t> =
nullptr>
94 [callback = std::move(callback)](
const auto &) { callback(); });
103 template <
typename T>
105 onChange(std::forward<T>(callback));
123 const Image &tryRequest()
const;
139 [[deprecated(
"Ambiguous image size")]]
141 request(std::optional<int> rows, std::optional<int> cols = std::nullopt,
142 std::optional<ImageColorMode> color_mode = std::nullopt,
143 std::optional<double> frame_rate = std::nullopt)
const {
144 return request(rows, cols, ImageCompressMode::raw, 0, color_mode,
159 request(std::optional<SizeOption> size = std::nullopt,
160 std::optional<ImageColorMode> color_mode = std::nullopt,
161 std::optional<double> frame_rate = std::nullopt)
const {
162 return request(size.value_or(
SizeOption{}).rows(),
164 ImageCompressMode::raw, 0, color_mode, frame_rate);
182 [[deprecated(
"Ambiguous image size")]]
184 request(std::optional<int> rows, std::optional<int> cols,
186 std::optional<double> frame_rate = std::nullopt)
const {
187 return request(rows, cols, cmp_mode, quality, std::nullopt, frame_rate);
206 std::optional<double> frame_rate = std::nullopt)
const {
207 return request(size.value_or(
SizeOption{}).rows(),
208 size.value_or(
SizeOption{}).cols(), cmp_mode, quality,
209 std::nullopt, frame_rate);
217 std::optional<ImageFrame> tryGet()
const;
243 [[deprecated]] std::chrono::system_clock::time_point time()
const;
246 const Image &free()
const;
249 const Image &clear()
const;
255 template <
typename T,
typename std::enable_if_t<std::is_same_v<T, Image>,
256 std::
nullptr_t> =
nullptr>
258 return static_cast<Field>(*this) ==
static_cast<Field>(other);
260 template <
typename T,
typename std::enable_if_t<std::is_same_v<T, Image>,
261 std::
nullptr_t> =
nullptr>
263 return static_cast<Field>(*this) !=
static_cast<Field>(other);
(ver1.3から追加) 画像データ
Definition image_frame.h:101
(ver1.3から追加) 画像の送受信データを表すクラス
Definition image.h:20
Image operator[](int index) const
Definition image.h:67
const Image & operator=(const ImageFrame &img) const
画像をセットする
Definition image.h:117
Image child(StringInitializer field) const
「(thisの名前).(追加の名前)」を新しい名前とするField
Definition image.h:42
bool operator==(const T &other) const
Imageの参照先を比較
Definition image.h:257
Image child(int index) const
Definition image.h:50
const Image & request(std::optional< SizeOption > size, ImageCompressMode cmp_mode, int quality, std::optional< double > frame_rate=std::nullopt) const
画像を圧縮されたフォーマットでリクエストする
Definition image.h:204
const Image & onChange(F callback) const
値が変化したときに呼び出されるコールバックを設定
Definition image.h:92
const Image & request(std::optional< int > rows, std::optional< int > cols=std::nullopt, std::optional< ImageColorMode > color_mode=std::nullopt, std::optional< double > frame_rate=std::nullopt) const
画像を生画像のフォーマットでリクエストする
Definition image.h:141
bool operator!=(const T &other) const
Definition image.h:262
ImageFrame get() const
画像を返す (データがない場合0x0の画像が返る)
Definition image.h:224
void appendListener(T &&callback) const
Definition image.h:104
const Image & request(std::optional< int > rows, std::optional< int > cols, ImageCompressMode cmp_mode, int quality, std::optional< double > frame_rate=std::nullopt) const
画像を圧縮されたフォーマットでリクエストする
Definition image.h:184
Image operator[](StringInitializer field) const
Definition image.h:60
const Image & request(std::optional< SizeOption > size=std::nullopt, std::optional< ImageColorMode > color_mode=std::nullopt, std::optional< double > frame_rate=std::nullopt) const
画像を生画像のフォーマットでリクエストする
Definition image.h:159
Image parent() const
nameの最後のピリオドの前までを新しい名前とするField
Definition image.h:74
Image(const Field &base, const SharedString &field)
Definition image.h:29
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:159
Definition image_frame.h:59
SharedString のpublicなコンストラクタインタフェース (入力専用)
Definition encoding.h:215
ImageCompressMode
Definition image_frame.h:23
ClientDataの参照とメンバ名とデータ名を持つクラス
Definition field.h:71
Field parent() const
nameの最後のピリオドの前までを新しい名前とするField
Definition field.cc:33
Field child(const SharedString &field) const
Definition field.cc:42
#define WEBCFACE_DLL
Definition webcface-config.h:69
#define WEBCFACE_NS_END
Definition webcface-config.h:118
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:117
#define WEBCFACE_CALL_FP
Definition webcface-config.h:107