Sunshine v2025.628.4510
Self-hosted game stream host for Moonlight.
common.h
Go to the documentation of this file.
1
5#pragma once
6
7// standard includes
8#include <bitset>
9#include <filesystem>
10#include <functional>
11#include <mutex>
12#include <string>
13
14// lib includes
15#include <boost/core/noncopyable.hpp>
16#ifndef _WIN32
17 #include <boost/asio.hpp>
18 #include <boost/process.hpp>
19#endif
20
21// local includes
22#include "src/config.h"
23#include "src/logging.h"
24#include "src/thread_safe.h"
25#include "src/utility.h"
27
28extern "C" {
29#include <moonlight-common-c/src/Limelight.h>
30}
31
32using namespace std::literals;
33
34struct sockaddr;
35struct AVFrame;
36struct AVBufferRef;
37struct AVHWFramesContext;
38struct AVCodecContext;
39struct AVDictionary;
40
41#ifdef _WIN32
42// Forward declarations of boost classes to avoid having to include boost headers
43// here, which results in issues with Windows.h and WinSock2.h include order.
44namespace boost {
45 namespace asio {
46 namespace ip {
47 class address;
48 } // namespace ip
49 } // namespace asio
50
51 namespace filesystem {
52 class path;
53 }
54
55 namespace process::inline v1 {
56 class child;
57 class group;
58 template<typename Char>
61 } // namespace process::inline v1
62} // namespace boost
63#endif
64namespace video {
65 struct config_t;
66} // namespace video
67
68namespace nvenc {
69 class nvenc_base;
70}
71
72namespace platf {
73 // Limited by bits in activeGamepadMask
74 constexpr auto MAX_GAMEPADS = 16;
75
76 constexpr std::uint32_t DPAD_UP = 0x0001;
77 constexpr std::uint32_t DPAD_DOWN = 0x0002;
78 constexpr std::uint32_t DPAD_LEFT = 0x0004;
79 constexpr std::uint32_t DPAD_RIGHT = 0x0008;
80 constexpr std::uint32_t START = 0x0010;
81 constexpr std::uint32_t BACK = 0x0020;
82 constexpr std::uint32_t LEFT_STICK = 0x0040;
83 constexpr std::uint32_t RIGHT_STICK = 0x0080;
84 constexpr std::uint32_t LEFT_BUTTON = 0x0100;
85 constexpr std::uint32_t RIGHT_BUTTON = 0x0200;
86 constexpr std::uint32_t HOME = 0x0400;
87 constexpr std::uint32_t A = 0x1000;
88 constexpr std::uint32_t B = 0x2000;
89 constexpr std::uint32_t X = 0x4000;
90 constexpr std::uint32_t Y = 0x8000;
91 constexpr std::uint32_t PADDLE1 = 0x010000;
92 constexpr std::uint32_t PADDLE2 = 0x020000;
93 constexpr std::uint32_t PADDLE3 = 0x040000;
94 constexpr std::uint32_t PADDLE4 = 0x080000;
95 constexpr std::uint32_t TOUCHPAD_BUTTON = 0x100000;
96 constexpr std::uint32_t MISC_BUTTON = 0x200000;
97
99 std::string name;
100 bool is_enabled;
101 std::string reason_disabled;
102 };
103
111
113 static gamepad_feedback_msg_t make_rumble(std::uint16_t id, std::uint16_t lowfreq, std::uint16_t highfreq) {
115 msg.type = gamepad_feedback_e::rumble;
116 msg.id = id;
117 msg.data.rumble = {lowfreq, highfreq};
118 return msg;
119 }
120
121 static gamepad_feedback_msg_t make_rumble_triggers(std::uint16_t id, std::uint16_t left, std::uint16_t right) {
123 msg.type = gamepad_feedback_e::rumble_triggers;
124 msg.id = id;
125 msg.data.rumble_triggers = {left, right};
126 return msg;
127 }
128
129 static gamepad_feedback_msg_t make_motion_event_state(std::uint16_t id, std::uint8_t motion_type, std::uint16_t report_rate) {
131 msg.type = gamepad_feedback_e::set_motion_event_state;
132 msg.id = id;
133 msg.data.motion_event_state.motion_type = motion_type;
134 msg.data.motion_event_state.report_rate = report_rate;
135 return msg;
136 }
137
138 static gamepad_feedback_msg_t make_rgb_led(std::uint16_t id, std::uint8_t r, std::uint8_t g, std::uint8_t b) {
140 msg.type = gamepad_feedback_e::set_rgb_led;
141 msg.id = id;
142 msg.data.rgb_led = {r, g, b};
143 return msg;
144 }
145
146 static gamepad_feedback_msg_t make_adaptive_triggers(std::uint16_t id, uint8_t event_flags, uint8_t type_left, uint8_t type_right, const std::array<uint8_t, 10> &left, const std::array<uint8_t, 10> &right) {
148 msg.type = gamepad_feedback_e::set_adaptive_triggers;
149 msg.id = id;
150 msg.data.adaptive_triggers = {.event_flags = event_flags, .type_left = type_left, .type_right = type_right, .left = left, .right = right};
151 return msg;
152 }
153
155 std::uint16_t id;
156
157 union {
158 struct {
159 std::uint16_t lowfreq;
160 std::uint16_t highfreq;
161 } rumble;
162
163 struct {
164 std::uint16_t left_trigger;
165 std::uint16_t right_trigger;
166 } rumble_triggers;
167
168 struct {
169 std::uint16_t report_rate;
170 std::uint8_t motion_type;
171 } motion_event_state;
172
173 struct {
174 std::uint8_t r;
175 std::uint8_t g;
176 std::uint8_t b;
177 } rgb_led;
178
179 struct {
180 uint16_t controllerNumber;
181 uint8_t event_flags;
182 uint8_t type_left;
183 uint8_t type_right;
184 std::array<uint8_t, 10> left;
185 std::array<uint8_t, 10> right;
186 } adaptive_triggers;
187 } data;
188 };
189
190 using feedback_queue_t = safe::mail_raw_t::queue_t<gamepad_feedback_msg_t>;
191
192 namespace speaker {
204
205 constexpr std::uint8_t map_stereo[] {
206 FRONT_LEFT,
207 FRONT_RIGHT
208 };
209 constexpr std::uint8_t map_surround51[] {
210 FRONT_LEFT,
211 FRONT_RIGHT,
212 FRONT_CENTER,
213 LOW_FREQUENCY,
214 BACK_LEFT,
215 BACK_RIGHT,
216 };
217 constexpr std::uint8_t map_surround71[] {
222 BACK_LEFT,
224 SIDE_LEFT,
226 };
227 } // namespace speaker
228
229 enum class mem_type_e {
230 system,
231 vaapi,
232 dxgi,
233 cuda,
234 videotoolbox,
235 unknown
236 };
237
238 enum class pix_fmt_e {
239 yuv420p,
240 yuv420p10,
241 nv12,
242 p010,
243 ayuv,
244 yuv444p16,
245 y410,
246 unknown
247 };
248
249 inline std::string_view from_pix_fmt(pix_fmt_e pix_fmt) {
250 using namespace std::literals;
251#define _CONVERT(x) \
252 case pix_fmt_e::x: \
253 return #x##sv
254 switch (pix_fmt) {
255 _CONVERT(yuv420p);
256 _CONVERT(yuv420p10);
257 _CONVERT(nv12);
258 _CONVERT(p010);
259 _CONVERT(ayuv);
260 _CONVERT(yuv444p16);
261 _CONVERT(y410);
262 _CONVERT(unknown);
263 }
264#undef _CONVERT
265
266 return "unknown"sv;
267 }
268
269 // Dimensions for touchscreen input
271 int offset_x, offset_y;
272 int width, height;
273 };
274
275 // These values must match Limelight-internal.h's SS_FF_* constants!
276 namespace platform_caps {
277 typedef uint32_t caps_t;
278
279 constexpr caps_t pen_touch = 0x01; // Pen and touch events
280 constexpr caps_t controller_touch = 0x02; // Controller touch events
281 }; // namespace platform_caps
282
284 std::uint32_t buttonFlags;
285 std::uint8_t lt;
286 std::uint8_t rt;
287 std::int16_t lsX;
288 std::int16_t lsY;
289 std::int16_t rsX;
290 std::int16_t rsY;
291 };
292
294 // The global index is used when looking up gamepads in the platform's
295 // gamepad array. It identifies gamepads uniquely among all clients.
296 int globalIndex;
297
298 // The client-relative index is the controller number as reported by the
299 // client. It must be used when communicating back to the client via
300 // the input feedback queue.
301 std::uint8_t clientRelativeIndex;
302 };
303
305 std::uint8_t type;
306 std::uint16_t capabilities;
307 std::uint32_t supportedButtons;
308 };
309
311 gamepad_id_t id;
312 std::uint8_t eventType;
313 std::uint32_t pointerId;
314 float x;
315 float y;
316 float pressure;
317 };
318
320 gamepad_id_t id;
321 std::uint8_t motionType;
322
323 // Accel: m/s^2
324 // Gyro: deg/s
325 float x;
326 float y;
327 float z;
328 };
329
331 gamepad_id_t id;
332 std::uint8_t state;
333 std::uint8_t percentage;
334 };
335
337 std::uint8_t eventType;
338 std::uint16_t rotation; // Degrees (0..360) or LI_ROT_UNKNOWN
339 std::uint32_t pointerId;
340 float x;
341 float y;
342 float pressureOrDistance; // Distance for hover and pressure for contact
343 float contactAreaMajor;
344 float contactAreaMinor;
345 };
346
347 struct pen_input_t {
348 std::uint8_t eventType;
349 std::uint8_t toolType;
350 std::uint8_t penButtons;
351 std::uint8_t tilt; // Degrees (0..90) or LI_TILT_UNKNOWN
352 std::uint16_t rotation; // Degrees (0..360) or LI_ROT_UNKNOWN
353 float x;
354 float y;
355 float pressureOrDistance; // Distance for hover and pressure for contact
356 float contactAreaMajor;
357 float contactAreaMinor;
358 };
359
360 class deinit_t {
361 public:
362 virtual ~deinit_t() = default;
363 };
364
365 struct img_t: std::enable_shared_from_this<img_t> {
366 public:
367 img_t() = default;
368
369 img_t(img_t &&) = delete;
370 img_t(const img_t &) = delete;
371 img_t &operator=(img_t &&) = delete;
372 img_t &operator=(const img_t &) = delete;
373
374 std::uint8_t *data {};
375 std::int32_t width {};
376 std::int32_t height {};
377 std::int32_t pixel_pitch {};
378 std::int32_t row_pitch {};
379
380 std::optional<std::chrono::steady_clock::time_point> frame_timestamp;
381
382 virtual ~img_t() = default;
383 };
384
385 struct sink_t {
386 // Play on host PC
387 std::string host;
388
389 // On macOS and Windows, it is not possible to create a virtual sink
390 // Therefore, it is optional
391 struct null_t {
392 std::string stereo;
393 std::string surround51;
394 std::string surround71;
395 };
396
397 std::optional<null_t> null;
398 };
399
401 virtual ~encode_device_t() = default;
402
403 virtual int convert(platf::img_t &img) = 0;
404
406 };
407
409 void *data {};
410 AVFrame *frame {};
411
412 int convert(platf::img_t &img) override {
413 return -1;
414 }
415
416 virtual void apply_colorspace() {
417 }
418
423 virtual int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) {
424 BOOST_LOG(error) << "Illegal call to hwdevice_t::set_frame(). Did you forget to override it?";
425 return -1;
426 };
427
432 virtual void init_hwframes(AVHWFramesContext *frames) {};
433
438 virtual void init_codec_options(AVCodecContext *ctx, AVDictionary **options) {};
439
444 virtual int prepare_to_derive_context(int hw_device_type) {
445 return 0;
446 };
447 };
448
450 virtual bool init_encoder(const video::config_t &client_config, const video::sunshine_colorspace_t &colorspace) = 0;
451
452 nvenc::nvenc_base *nvenc = nullptr;
453 };
454
455 enum class capture_e : int {
456 ok,
457 reinit,
458 timeout,
460 error
461 };
462
463 class display_t {
464 public:
472 using push_captured_image_cb_t = std::function<bool(std::shared_ptr<img_t> &&img, bool frame_captured)>;
473
481 using pull_free_image_cb_t = std::function<bool(std::shared_ptr<img_t> &img_out)>;
482
483 display_t() noexcept:
484 offset_x {0},
485 offset_y {0} {
486 }
487
500 virtual capture_e capture(const push_captured_image_cb_t &push_captured_image_cb, const pull_free_image_cb_t &pull_free_image_cb, bool *cursor) = 0;
501
502 virtual std::shared_ptr<img_t> alloc_img() = 0;
503
504 virtual int dummy_img(img_t *img) = 0;
505
506 virtual std::unique_ptr<avcodec_encode_device_t> make_avcodec_encode_device(pix_fmt_e pix_fmt) {
507 return nullptr;
508 }
509
510 virtual std::unique_ptr<nvenc_encode_device_t> make_nvenc_encode_device(pix_fmt_e pix_fmt) {
511 return nullptr;
512 }
513
514 virtual bool is_hdr() {
515 return false;
516 }
517
518 virtual bool get_hdr_metadata(SS_HDR_METADATA &metadata) {
519 std::memset(&metadata, 0, sizeof(metadata));
520 return false;
521 }
522
529 virtual bool is_codec_supported(std::string_view name, const ::video::config_t &config) {
530 return true;
531 }
532
533 virtual ~display_t() = default;
534
535 // Offsets for when streaming a specific monitor. By default, they are 0.
536 int offset_x, offset_y;
537 int env_width, env_height;
538
539 int width, height;
540
541 protected:
542 // collect capture timing data (at loglevel debug)
543 logging::time_delta_periodic_logger sleep_overshoot_logger = {debug, "Frame capture sleep overshoot"};
544 };
545
546 class mic_t {
547 public:
548 virtual capture_e sample(std::vector<float> &frame_buffer) = 0;
549
550 virtual ~mic_t() = default;
551 };
552
554 public:
555 virtual int set_sink(const std::string &sink) = 0;
556
557 virtual std::unique_ptr<mic_t> microphone(const std::uint8_t *mapping, int channels, std::uint32_t sample_rate, std::uint32_t frame_size) = 0;
558
564 virtual bool is_sink_available(const std::string &sink) = 0;
565
566 virtual std::optional<sink_t> sink_info() = 0;
567
568 virtual ~audio_control_t() = default;
569 };
570
571 void freeInput(void *);
572
574
575 std::filesystem::path appdata();
576
577 std::string get_mac_address(const std::string_view &address);
578
579 std::string from_sockaddr(const sockaddr *const);
580 std::pair<std::uint16_t, std::string> from_sockaddr_ex(const sockaddr *const);
581
582 std::unique_ptr<audio_control_t> audio_control();
583
592 std::shared_ptr<display_t> display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config);
593
594 // A list of names of displays accepted as display_name with the mem_type_e
595 std::vector<std::string> display_names(mem_type_e hwdevice_type);
596
602
603 boost::process::v1::child run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, const boost::process::v1::environment &env, FILE *file, std::error_code &ec, boost::process::v1::group *group);
604
605 enum class thread_priority_e : int {
606 low,
607 normal,
608 high,
609 critical
610 };
611 void adjust_thread_priority(thread_priority_e priority);
612
613 // Allow OS-specific actions to be taken to prepare for streaming
614 void streaming_will_start();
615 void streaming_will_stop();
616
617 void restart();
618
625 int set_env(const std::string &name, const std::string &value);
626
632 int unset_env(const std::string &name);
633
635 const char *buffer;
636 size_t size;
637
638 // Constructors required for emplace_back() prior to C++20
639 buffer_descriptor_t(const char *buffer, size_t size):
640 buffer(buffer),
641 size(size) {
642 }
643
645 buffer(nullptr),
646 size(0) {
647 }
648 };
649
651 // Optional headers to be prepended to each packet
652 const char *headers;
653 size_t header_size;
654
655 // One or more data buffers to use for the payloads
656 //
657 // NB: Data buffers must be aligned to payload size!
658 std::vector<buffer_descriptor_t> &payload_buffers;
659 size_t payload_size;
660
661 // The offset (in header+payload message blocks) in the header and payload
662 // buffers to begin sending messages from
663 size_t block_offset;
664
665 // The number of header+payload message blocks to send
666 size_t block_count;
667
668 std::uintptr_t native_socket;
669 boost::asio::ip::address &target_address;
670 uint16_t target_port;
671 boost::asio::ip::address &source_address;
672
679 for (const auto &desc : payload_buffers) {
680 if (offset < desc.size) {
681 return {
682 desc.buffer + offset,
683 desc.size - offset,
684 };
685 } else {
686 offset -= desc.size;
687 }
688 }
689 return {};
690 }
691 };
692
693 bool send_batch(batched_send_info_t &send_info);
694
695 struct send_info_t {
696 const char *header;
697 size_t header_size;
698 const char *payload;
699 size_t payload_size;
700
701 std::uintptr_t native_socket;
702 boost::asio::ip::address &target_address;
703 uint16_t target_port;
704 boost::asio::ip::address &source_address;
705 };
706
707 bool send(send_info_t &send_info);
708
709 enum class qos_data_type_e : int {
710 audio,
711 video
712 };
713
722 std::unique_ptr<deinit_t> enable_socket_qos(uintptr_t native_socket, boost::asio::ip::address &address, uint16_t port, qos_data_type_e data_type, bool dscp_tagging);
723
728 void open_url(const std::string &url);
729
735 bool request_process_group_exit(std::uintptr_t native_handle);
736
742 bool process_group_running(std::uintptr_t native_handle);
743
744 input_t input();
753 util::point_t get_mouse_loc(input_t &input);
754 void move_mouse(input_t &input, int deltaX, int deltaY);
755 void abs_mouse(input_t &input, const touch_port_t &touch_port, float x, float y);
756 void button_mouse(input_t &input, int button, bool release);
757 void scroll(input_t &input, int distance);
758 void hscroll(input_t &input, int distance);
759 void keyboard_update(input_t &input, uint16_t modcode, bool release, uint8_t flags);
760 void gamepad_update(input_t &input, int nr, const gamepad_state_t &gamepad_state);
761 void unicode(input_t &input, char *utf8, int size);
762
763 typedef deinit_t client_input_t;
764
770 std::unique_ptr<client_input_t> allocate_client_input_context(input_t &input);
771
778 void touch_update(client_input_t *input, const touch_port_t &touch_port, const touch_input_t &touch);
779
786 void pen_update(client_input_t *input, const touch_port_t &touch_port, const pen_input_t &pen);
787
793 void gamepad_touch(input_t &input, const gamepad_touch_t &touch);
794
800 void gamepad_motion(input_t &input, const gamepad_motion_t &motion);
801
807 void gamepad_battery(input_t &input, const gamepad_battery_t &battery);
808
817 int alloc_gamepad(input_t &input, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue);
818 void free_gamepad(input_t &input, int nr);
819
824 platform_caps::caps_t get_capabilities();
825
826#define SERVICE_NAME "Sunshine"
827#define SERVICE_TYPE "_nvstream._tcp"
828
829 namespace publish {
830 [[nodiscard]] std::unique_ptr<deinit_t> start();
831 }
832
833 [[nodiscard]] std::unique_ptr<deinit_t> init();
834
839 std::string get_host_name();
840
847 std::vector<supported_gamepad_t> &supported_gamepads(input_t *input);
848
849 struct high_precision_timer: private boost::noncopyable {
850 virtual ~high_precision_timer() = default;
851
856 virtual void sleep_for(const std::chrono::nanoseconds &duration) = 0;
857
862 virtual operator bool() = 0;
863 };
864
869 std::unique_ptr<high_precision_timer> create_high_precision_timer();
870
871} // namespace platf
Definition common.h:59
A helper class for tracking and logging short time intervals across a period of time.
Definition logging.h:166
Abstract platform-agnostic base of standalone NVENC encoder. Derived classes perform platform-specifi...
Definition nvenc_base.h:26
Definition common.h:553
virtual bool is_sink_available(const std::string &sink)=0
Check if the audio sink is available in the system.
Definition common.h:360
Definition common.h:463
virtual bool is_codec_supported(std::string_view name, const ::video::config_t &config)
Check that a given codec is supported by the display device.
Definition common.h:529
std::function< bool(std::shared_ptr< img_t > &&img, bool frame_captured)> push_captured_image_cb_t
Callback for when a new image is ready. When display has a new image ready or a timeout occurs,...
Definition common.h:472
std::function< bool(std::shared_ptr< img_t > &img_out)> pull_free_image_cb_t
Get free image from pool. Calls must be synchronized. Blocks until there is free image in the pool or...
Definition common.h:481
virtual capture_e capture(const push_captured_image_cb_t &push_captured_image_cb, const pull_free_image_cb_t &pull_free_image_cb, bool *cursor)=0
Capture a frame.
Definition common.h:546
Definition utility.h:530
mem_type_e
Definition common.h:229
@ system
System memory.
speaker_e
Definition common.h:193
@ BACK_LEFT
Back left.
Definition common.h:198
@ LOW_FREQUENCY
Low frequency.
Definition common.h:197
@ SIDE_RIGHT
Side right.
Definition common.h:201
@ MAX_SPEAKERS
Maximum number of speakers.
Definition common.h:202
@ FRONT_LEFT
Front left.
Definition common.h:194
@ SIDE_LEFT
Side left.
Definition common.h:200
@ FRONT_CENTER
Front center.
Definition common.h:196
@ BACK_RIGHT
Back right.
Definition common.h:199
@ FRONT_RIGHT
Front right.
Definition common.h:195
std::vector< supported_gamepad_t > & supported_gamepads(input_t *input)
Gets the supported gamepads for this platform backend.
Definition inputtino.cpp:130
std::shared_ptr< display_t > display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config)
Get the display_t instance for the given hwdevice_type. If display_name is empty, use the first monit...
Definition misc.cpp:864
pix_fmt_e
Definition common.h:238
@ yuv420p10
YUV 4:2:0 10-bit.
@ yuv444p16
Planar 10-bit (shifted to 16-bit) YUV 4:4:4.
@ yuv420p
YUV 4:2:0.
std::filesystem::path appdata()
Performs migration if necessary, then returns the appdata directory.
Definition misc.cpp:108
qos_data_type_e
Definition common.h:709
std::unique_ptr< high_precision_timer > create_high_precision_timer()
Create platform-specific timer capable of high-precision sleep.
Definition misc.cpp:971
bool needs_encoder_reenumeration()
Check if GPUs/drivers have changed since the last call to this function.
Definition misc.cpp:859
gamepad_feedback_e
Definition common.h:104
@ rumble_triggers
Rumble triggers.
@ set_adaptive_triggers
Set adaptive triggers.
@ set_motion_event_state
Set motion event state.
thread_priority_e
Definition common.h:605
@ critical
Critical priority.
@ high
High priority.
@ normal
Normal priority.
std::string get_host_name()
Returns the current computer name in UTF-8.
Definition misc.cpp:765
capture_e
Definition common.h:455
@ timeout
Timeout.
@ reinit
Need to reinitialize.
@ interrupted
Capture was interrupted.
Declarations for the configuration of Sunshine.
std::unique_ptr< platf::deinit_t > init(const std::filesystem::path &persistence_filepath, const config::video_t &video_config)
Initialize the implementation and perform the initial state recovery (if needed).
Definition display_device.cpp:704
Declarations for logging related functions.
Standalone NVENC encoder.
Definition nvenc_base.cpp:87
Definition common.h:408
virtual int prepare_to_derive_context(int hw_device_type)
Prepare to derive a context.
Definition common.h:444
virtual void init_codec_options(AVCodecContext *ctx, AVDictionary **options)
Provides a hook for allow platform-specific code to adjust codec options.
Definition common.h:438
virtual int set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx)
Set the frame to be encoded.
Definition common.h:423
virtual void init_hwframes(AVHWFramesContext *frames)
Initialize the hwframes context.
Definition common.h:432
Definition common.h:650
buffer_descriptor_t buffer_for_payload_offset(ptrdiff_t offset)
Returns a payload buffer descriptor for the given payload offset.
Definition common.h:678
Definition common.h:634
Definition common.h:400
Definition common.h:304
Definition common.h:330
Definition common.h:112
Definition common.h:293
Definition common.h:319
Definition common.h:283
Definition common.h:310
Definition common.h:849
virtual void sleep_for(const std::chrono::nanoseconds &duration)=0
Sleep for the duration.
Definition common.h:365
Definition common.h:449
Definition common.h:347
Definition common.h:695
Definition common.h:391
Definition common.h:385
Definition common.h:98
Definition common.h:336
Definition common.h:270
Definition utility.h:966
Definition video.h:23
Definition video_colorspace.h:20
Declarations for thread-safe data structures.
Declarations for utility functions.
Declarations for colorspace functions.