FreeRDP
Loading...
Searching...
No Matches
capture_policy.h
1
18#ifndef FREERDP_RDPECAM_AVFOUNDATION_CAPTURE_POLICY_H
19#define FREERDP_RDPECAM_AVFOUNDATION_CAPTURE_POLICY_H
20
21/* Adjust capture limits here. These are backend policy, not protocol limits.
22 * modes.m uses these bounds to advertise native camera resolutions; nv12.c uses
23 * the same ceilings when packing samples. No additional resolutions are synthesized.
24 *
25 * The limits bound capture cost and uncompressed NV12 traffic. They also apply
26 * when the shared codec selects H.264 output. Revisit them when adding VideoToolbox
27 * encoding, but retain suitable limits for NV12 passthrough; encoder availability
28 * alone does not mean that compression was negotiated for a stream.
29 *
30 * NV12's even dimensions and plane layout, AVFoundation's available output formats,
31 * and exact lookup of previously advertised modes remain required runtime checks.
32 * The shared descriptor count limit is ECAM_MAX_MEDIA_TYPE_DESCRIPTORS in ../camera.h.
33 */
34#define CAM_AVFOUNDATION_MIN_WIDTH 160
35#define CAM_AVFOUNDATION_MIN_HEIGHT 120
36#define CAM_AVFOUNDATION_MAX_WIDTH 1920
37#define CAM_AVFOUNDATION_MAX_HEIGHT 1080
38
39/* Nominal FPS candidates in preference order, not a continuous FPS range.
40 * Mode enumeration retains the matching native frame duration and advertises its
41 * exact rational rate. Fixed rates outside this list are omitted even if the
42 * camera supports them.
43 */
44#define CAM_AVFOUNDATION_FRAME_RATES { 30, 15 }
45
46/* Native endpoint rounding tolerance: 10 ppm. This is a timing precision rule,
47 * not a performance limit; keep distinct rates such as 29.97 and 30 separate.
48 */
49#define CAM_AVFOUNDATION_FRAME_DURATION_TOLERANCE 0.00001
50
51#endif