|
FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
|
Internal helpers for constructing FDL JSON objects with canonical key order. More...
#include "fdl/fdl_core.h"#include "fdl_doc.h"#include "fdl_handles.h"#include <jsoncons/json.hpp>#include <string>Go to the source code of this file.
Typedefs | |
| using | fdl::detail::ojson = jsoncons::ojson |
| Use ojson (ordered JSON) to preserve key insertion order for canonical serialization. | |
Functions | |
| ojson | fdl::detail::make_root (const char *uuid, int version_major, int version_minor, const char *fdl_creator, const char *default_framing_intent) |
| Build a minimal FDL root document object with canonical key order. | |
Primitive builders — canonical key order | |
| ojson | fdl::detail::make_version (int major, int minor) |
| Build a version object with major and minor fields. | |
| ojson | fdl::detail::make_dimensions_int (int64_t width, int64_t height) |
| Build an integer dimensions object (width, height). | |
| ojson | fdl::detail::make_dimensions_float (double width, double height) |
| Build a floating-point dimensions object (width, height). | |
| ojson | fdl::detail::make_point_float (double x, double y) |
| Build a floating-point point object (x, y). | |
| ojson | fdl::detail::make_round_strategy (const char *even, const char *mode) |
| Build a rounding strategy object (even, mode). | |
Sub-object builders — canonical key order | |
| ojson | fdl::detail::make_framing_intent (const char *id, const char *label, int64_t aspect_w, int64_t aspect_h, double protection) |
| Build a framing intent object with aspect ratio and protection. | |
| ojson | fdl::detail::make_context (const char *label, const char *context_creator) |
| Build a context object with label and creator. | |
| ojson | fdl::detail::make_canvas (const char *id, const char *label, const char *source_canvas_id, int64_t dim_w, int64_t dim_h, double squeeze) |
| Build a canvas object with dimensions and squeeze. | |
| ojson | fdl::detail::make_framing_decision (const char *id, const char *label, const char *framing_intent_id, double dim_w, double dim_h, double anchor_x, double anchor_y) |
| Build a framing decision object with dimensions and anchor point. | |
| ojson | fdl::detail::make_canvas_template (const char *id, const char *label, int64_t target_w, int64_t target_h, double target_squeeze, fdl_geometry_path_t fit_source, fdl_fit_method_t fit_method, fdl_halign_t halign, fdl_valign_t valign, fdl_round_strategy_t rounding) |
| Build a canvas template object with all transform parameters. | |
Internal helpers for constructing FDL JSON objects with canonical key order.
Each make_* function creates an ojson object with keys inserted in the FDL specification's canonical order, ready for serialization.
| ojson fdl::detail::make_version | ( | int | major, |
| int | minor | ||
| ) |
Build a version object with major and minor fields.
Build a version object {"major":…,"minor":…}.
| major | Major version number. |
| minor | Minor version number. |
| ojson fdl::detail::make_dimensions_int | ( | int64_t | width, |
| int64_t | height | ||
| ) |
Build an integer dimensions object (width, height).
Build an integer dimensions object {"width":…,"height":…}.
| width | Width in pixels. |
| height | Height in pixels. |
| ojson fdl::detail::make_dimensions_float | ( | double | width, |
| double | height | ||
| ) |
Build a floating-point dimensions object (width, height).
Build a floating-point dimensions object {"width":…,"height":…}.
| width | Width. |
| height | Height. |
| ojson fdl::detail::make_point_float | ( | double | x, |
| double | y | ||
| ) |
Build a floating-point point object (x, y).
Build a point object {"x":…,"y":…}.
| x | X coordinate. |
| y | Y coordinate. |
| ojson fdl::detail::make_round_strategy | ( | const char * | even, |
| const char * | mode | ||
| ) |
Build a rounding strategy object (even, mode).
Build a round_strategy object {"even":…,"mode":…}.
| even | Rounding even string ("even" or "whole"). |
| mode | Rounding mode string ("up", "down", or "round"). |
| ojson fdl::detail::make_root | ( | const char * | uuid, |
| int | version_major, | ||
| int | version_minor, | ||
| const char * | fdl_creator, | ||
| const char * | default_framing_intent | ||
| ) |
Build a minimal FDL root document object with canonical key order.
| uuid | Document UUID string. |
| version_major | FDL spec major version. |
| version_minor | FDL spec minor version. |
| fdl_creator | Creator identifier string. |
| default_framing_intent | ID of the default framing intent. |
| ojson fdl::detail::make_framing_intent | ( | const char * | id, |
| const char * | label, | ||
| int64_t | aspect_w, | ||
| int64_t | aspect_h, | ||
| double | protection | ||
| ) |
Build a framing intent object with aspect ratio and protection.
Build a framing_intent JSON object.
| id | Intent identifier. |
| label | Human-readable label. |
| aspect_w | Aspect ratio width component. |
| aspect_h | Aspect ratio height component. |
| protection | Protection factor (0.0–1.0, 0 = no protection). |
| ojson fdl::detail::make_context | ( | const char * | label, |
| const char * | context_creator | ||
| ) |
Build a context object with label and creator.
Build a context JSON object.
| label | Context label. |
| context_creator | Creator identifier. |
| ojson fdl::detail::make_canvas | ( | const char * | id, |
| const char * | label, | ||
| const char * | source_canvas_id, | ||
| int64_t | dim_w, | ||
| int64_t | dim_h, | ||
| double | squeeze | ||
| ) |
Build a canvas object with dimensions and squeeze.
Build a canvas JSON object.
| id | Canvas identifier. |
| label | Human-readable label. |
| source_canvas_id | ID of the source canvas (may be same as id). |
| dim_w | Canvas width in pixels. |
| dim_h | Canvas height in pixels. |
| squeeze | Anamorphic squeeze ratio (1.0 for spherical). |
| ojson fdl::detail::make_framing_decision | ( | const char * | id, |
| const char * | label, | ||
| const char * | framing_intent_id, | ||
| double | dim_w, | ||
| double | dim_h, | ||
| double | anchor_x, | ||
| double | anchor_y | ||
| ) |
Build a framing decision object with dimensions and anchor point.
Build a framing_decision JSON object.
| id | Decision identifier. |
| label | Human-readable label. |
| framing_intent_id | ID of the referenced framing intent. |
| dim_w | Framing width. |
| dim_h | Framing height. |
| anchor_x | Anchor X offset within canvas. |
| anchor_y | Anchor Y offset within canvas. |
| ojson fdl::detail::make_canvas_template | ( | const char * | id, |
| const char * | label, | ||
| int64_t | target_w, | ||
| int64_t | target_h, | ||
| double | target_squeeze, | ||
| fdl_geometry_path_t | fit_source, | ||
| fdl_fit_method_t | fit_method, | ||
| fdl_halign_t | halign, | ||
| fdl_valign_t | valign, | ||
| fdl_round_strategy_t | rounding | ||
| ) |
Build a canvas template object with all transform parameters.
Build a canvas_template JSON object.
| id | Template identifier. |
| label | Human-readable label. |
| target_w | Target canvas width in pixels. |
| target_h | Target canvas height in pixels. |
| target_squeeze | Target anamorphic squeeze. |
| fit_source | Geometry path for fit source layer. |
| fit_method | Fit method (width, height, fill, fit_all). |
| halign | Horizontal alignment. |
| valign | Vertical alignment. |
| rounding | Rounding strategy for dimensions. |