libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
metadata.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_CORE
13#include <promeki/namespace.h>
15#include <promeki/sharedptr.h>
16#include <promeki/audiomarker.h>
17#include <promeki/enums_audio.h>
18#include <promeki/enums_color.h>
19#include <promeki/enums_video.h>
21#include <promeki/framenumber.h>
23#include <promeki/subtitle.h>
24#include <promeki/timecode.h>
25#include <promeki/transcript.h>
26#if PROMEKI_ENABLE_NETWORK
27#include <promeki/eui64.h>
28#endif
29
30PROMEKI_NAMESPACE_BEGIN
31
32class StringList;
33
64class Metadata : public VariantDatabase<"Metadata"> {
65 public:
67 using Base = VariantDatabase<"Metadata">;
68
69 using Base::Base;
70
71 // ============================================================
72 // Core metadata
73 // ============================================================
74
76 PROMEKI_DECLARE_ID(Timecode,
77 VariantSpec()
78 .setType(DataTypeTimecode)
79 .setDefault(promeki::Timecode())
80 .setDescription("SMPTE timecode associated with this media unit."));
81
82#if PROMEKI_ENABLE_PROAV
93 PROMEKI_DECLARE_ID(Subtitle,
94 VariantSpec()
95 .setType(DataTypeSubtitle)
96 .setDefault(promeki::Subtitle())
97 .setDescription(
98 "Subtitle cue active at this media unit (start <= ts < end)."));
99
114 PROMEKI_DECLARE_ID(Transcript,
115 VariantSpec()
116 .setType(DataTypeTranscript)
117 .setDefault(promeki::Transcript())
118 .setDescription(
119 "Raw transcript utterance attached to this media unit."));
120#endif
121
123 PROMEKI_DECLARE_ID(Gamma, VariantSpec()
124 .setType(DataTypeDouble)
125 .setDefault(0.0)
126 .setMin(0.0)
127 .setDescription("Gamma / transfer-function exponent."));
128
130 PROMEKI_DECLARE_ID(Title, VariantSpec()
131 .setType(DataTypeString)
132 .setDefault(String())
133 .setDescription("Title of the media."));
134
136 PROMEKI_DECLARE_ID(Copyright, VariantSpec()
137 .setType(DataTypeString)
138 .setDefault(String())
139 .setDescription("Copyright notice."));
140
142 PROMEKI_DECLARE_ID(Software, VariantSpec()
143 .setType(DataTypeString)
144 .setDefault(String())
145 .setDescription("Software that created or modified the media."));
146
148 PROMEKI_DECLARE_ID(Artist, VariantSpec()
149 .setType(DataTypeString)
150 .setDefault(String())
151 .setDescription("Artist or creator name."));
152
154 PROMEKI_DECLARE_ID(Comment, VariantSpec()
155 .setType(DataTypeString)
156 .setDefault(String())
157 .setDescription("Free-form comment."));
158
160 PROMEKI_DECLARE_ID(Date, VariantSpec()
161 .setType(DataTypeString)
162 .setDefault(String())
163 .setDescription("Creation or origination date."));
164
166 PROMEKI_DECLARE_ID(Album, VariantSpec()
167 .setType(DataTypeString)
168 .setDefault(String())
169 .setDescription("Album name (audio media)."));
170
172 PROMEKI_DECLARE_ID(License, VariantSpec()
173 .setType(DataTypeString)
174 .setDefault(String())
175 .setDescription("License information."));
176
178 PROMEKI_DECLARE_ID(TrackNumber, VariantSpec()
179 .setTypes({DataTypeInt32, DataTypeString})
180 .setDefault(String())
181 .setDescription("Track number (audio media)."));
182
184 PROMEKI_DECLARE_ID(Genre, VariantSpec()
185 .setType(DataTypeString)
186 .setDefault(String())
187 .setDescription("Genre (audio media)."));
188
190 PROMEKI_DECLARE_ID(EnableBWF, VariantSpec()
191 .setType(DataTypeBool)
192 .setDefault(false)
193 .setDescription("Enable Broadcast Wave Format metadata."));
194
196 PROMEKI_DECLARE_ID(Description, VariantSpec()
197 .setType(DataTypeString)
198 .setDefault(String())
199 .setDescription("Human-readable description of the content."));
200
202 PROMEKI_DECLARE_ID(Originator, VariantSpec()
203 .setType(DataTypeString)
204 .setDefault(String())
205 .setDescription("BWF originator name."));
206
208 PROMEKI_DECLARE_ID(OriginatorReference, VariantSpec()
209 .setTypes({DataTypeString, DataTypeUUID})
210 .setDefault(String())
211 .setDescription("BWF originator reference."));
212
214 PROMEKI_DECLARE_ID(OriginationDateTime, VariantSpec()
215 .setType(DataTypeString)
216 .setDefault(String())
217 .setDescription("BWF origination date and time."));
218
220 PROMEKI_DECLARE_ID(FrameRate, VariantSpec()
221 .setTypes({DataTypeRational, DataTypeDouble,
222 DataTypeFrameRate})
223 .setDefault(Rational<int>())
224 .setDescription("Frame rate of the associated video."));
225
230 PROMEKI_DECLARE_ID(
231 FrameRateSource,
232 VariantSpec()
233 .setType(DataTypeString)
234 .setDefault(String())
235 .setDescription("Source of the FrameRate value (file, config, or default)."));
236
238 PROMEKI_DECLARE_ID(UMID, VariantSpec()
239 .setTypes({DataTypeString, DataTypeUMID})
240 .setDefault(String())
241 .setDescription("SMPTE UMID (Unique Material Identifier)."));
242
244 PROMEKI_DECLARE_ID(CodingHistory, VariantSpec()
245 .setType(DataTypeString)
246 .setDefault(String())
247 .setDescription("BWF coding history string."));
248
249 // ============================================================
250 // Compression metadata
251 // ============================================================
252
254 PROMEKI_DECLARE_ID(CompressionLevel,
255 VariantSpec()
256 .setType(DataTypeInt32)
257 .setDefault(int32_t(0))
258 .setDescription("Compression level hint for lossy codecs."));
259
261 PROMEKI_DECLARE_ID(EnableVBR, VariantSpec()
262 .setType(DataTypeBool)
263 .setDefault(false)
264 .setDescription("Enable variable bit-rate encoding."));
265
267 PROMEKI_DECLARE_ID(VBRQuality, VariantSpec()
268 .setType(DataTypeInt32)
269 .setDefault(int32_t(0))
270 .setDescription("VBR quality setting (codec-specific)."));
271
274 PROMEKI_DECLARE_ID(CompressedSize,
275 VariantSpec()
276 .setType(DataTypeInt32)
277 .setDefault(int32_t(0))
278 .setMin(int32_t(0))
279 .setDescription("Internal allocation hint for compressed pixel formats."));
280
281 // ============================================================
282 // Streaming / frame status
283 // ============================================================
284
286 PROMEKI_DECLARE_ID(EndOfStream, VariantSpec()
287 .setType(DataTypeBool)
288 .setDefault(false)
289 .setDescription("Signals end-of-stream to downstream nodes."));
290
299 PROMEKI_DECLARE_ID(Corrupt, VariantSpec()
300 .setType(DataTypeBool)
301 .setDefault(false)
302 .setDescription("Media unit carries corrupt data."));
303
305 PROMEKI_DECLARE_ID(CorruptReason,
306 VariantSpec()
307 .setType(DataTypeString)
308 .setDefault(String())
309 .setDescription("Human-readable reason for a Corrupt marking."));
310
312 PROMEKI_DECLARE_ID(FrameNumber, VariantSpec()
313 .setType(DataTypeFrameNumber)
314 .setDefault(promeki::FrameNumber())
315 .setDescription("Frame sequence number within a stream."));
316
323 PROMEKI_DECLARE_ID(Duration,
324 VariantSpec()
325 .setType(DataTypeMediaDuration)
326 .setDefault(promeki::MediaDuration())
327 .setDescription("Clip-level duration: starting frame plus length."));
328
335 PROMEKI_DECLARE_ID(CaptureTime,
336 VariantSpec()
337 .setType(DataTypeMediaTimeStamp)
338 .setDefault(promeki::MediaTimeStamp())
339 .setDescription("Timestamp when the library or device captured this data."));
340
350 PROMEKI_DECLARE_ID(FrameBridgeTimeStamp,
351 VariantSpec()
352 .setType(DataTypeMediaTimeStamp)
353 .setDefault(promeki::MediaTimeStamp())
354 .setDescription("FrameBridge publish timestamp (SystemMonotonic)."));
355
361 PROMEKI_DECLARE_ID(RtpTimestamp, VariantSpec()
362 .setType(DataTypeUInt32)
363 .setDefault(uint32_t(0))
364 .setDescription("RTP timestamp from the packet header."));
365
367 PROMEKI_DECLARE_ID(RtpPacketCount,
368 VariantSpec()
369 .setType(DataTypeInt32)
370 .setDefault(int32_t(0))
371 .setMin(int32_t(0))
372 .setDescription("Number of RTP packets that composed this essence."));
373
374#if PROMEKI_ENABLE_PROAV
388 PROMEKI_DECLARE_ID(
389 AudioMarkers,
390 VariantSpec()
391 .setType(DataTypeAudioMarkerList)
392 .setDefault(AudioMarkerList())
393 .setDescription("Per-payload audio event markers (silence fills, "
394 "concealed loss, discontinuities, …)."));
395#endif
396
397#if PROMEKI_ENABLE_NETWORK
399 PROMEKI_DECLARE_ID(PtpGrandmasterId,
400 VariantSpec()
401 .setType(DataTypeEUI64)
402 .setDefault(EUI64())
403 .setDescription("PTP grandmaster clock identity (EUI-64)."));
404
406 PROMEKI_DECLARE_ID(PtpDomainNumber, VariantSpec()
407 .setType(DataTypeUInt8)
408 .setDefault(uint8_t(0))
409 .setMax(uint8_t(127))
410 .setDescription("PTP domain number (0-127)."));
411#endif
412
414 PROMEKI_DECLARE_ID(FrameRepeated,
415 VariantSpec()
416 .setType(DataTypeInt32)
417 .setDefault(int32_t(0))
418 .setMin(int32_t(0))
419 .setDescription("Number of times frame repeated due to underrun."));
420
422 PROMEKI_DECLARE_ID(FrameDropped, VariantSpec()
423 .setType(DataTypeInt32)
424 .setDefault(int32_t(0))
425 .setMin(int32_t(0))
426 .setDescription("Number of frames dropped before this one."));
427
438 PROMEKI_DECLARE_ID(
439 FrameSyncDrop,
440 VariantSpec()
441 .setType(DataTypeInt32)
442 .setDefault(int32_t(0))
443 .setMin(int32_t(0))
444 .setDescription(
445 "Input frames dropped between this FrameSync emit and the previous one."));
446
453 PROMEKI_DECLARE_ID(
454 FrameSyncRepeat,
455 VariantSpec()
456 .setType(DataTypeInt32)
457 .setDefault(int32_t(0))
458 .setMin(int32_t(0))
459 .setDescription("Position within a FrameSync repeat sequence (0 = fresh emit)."));
460
462 PROMEKI_DECLARE_ID(FrameLate, VariantSpec()
463 .setType(DataTypeBool)
464 .setDefault(false)
465 .setDescription("Frame arrived later than scheduled."));
466
468 PROMEKI_DECLARE_ID(FrameKeyframe, VariantSpec()
469 .setType(DataTypeBool)
470 .setDefault(false)
471 .setDescription("Frame is a keyframe / intra frame."));
472
477 PROMEKI_DECLARE_ID(ForceKeyframe,
478 VariantSpec()
479 .setType(DataTypeBool)
480 .setDefault(false)
481 .setDescription("Request encoder to emit an IDR for this frame."));
482
485 PROMEKI_DECLARE_ID(MediaDescChanged,
486 VariantSpec()
487 .setType(DataTypeBool)
488 .setDefault(false)
489 .setDescription("Frame's MediaDesc differs from previously reported."));
490
491 // ============================================================
492 // Session / capture environment
493 //
494 // These keys describe the environment a container was
495 // written in. They're populated automatically by
496 // backends whose files are meant for debugging or
497 // forensic replay (e.g. PMDF), but any writer is free
498 // to stamp them.
499 // ============================================================
500
502 PROMEKI_DECLARE_ID(SessionHostname,
503 VariantSpec()
504 .setType(DataTypeString)
505 .setDefault(String())
506 .setDescription("Runtime hostname of the machine that produced the file."));
507
509 PROMEKI_DECLARE_ID(SessionProcessId, VariantSpec()
510 .setType(DataTypeInt64)
511 .setDefault(int64_t(0))
512 .setDescription("Writer process ID at capture time."));
513
518 PROMEKI_DECLARE_ID(LibraryBuildInfo,
519 VariantSpec()
520 .setType(DataTypeString)
521 .setDefault(String())
522 .setDescription("libpromeki build identity (version, repo, date, host)."));
523
526 PROMEKI_DECLARE_ID(LibraryPlatform,
527 VariantSpec()
528 .setType(DataTypeString)
529 .setDefault(String())
530 .setDescription("Platform / compiler / C++ standard of the writer."));
531
534 PROMEKI_DECLARE_ID(LibraryFeatures,
535 VariantSpec()
536 .setType(DataTypeString)
537 .setDefault(String())
538 .setDescription("Library feature flags enabled at build time."));
539
540 // ============================================================
541 // DPX file info
542 // ============================================================
543
545 PROMEKI_DECLARE_ID(FileOrigName, VariantSpec()
546 .setType(DataTypeString)
547 .setDefault(String())
548 .setDescription("Original source filename."));
549
551 PROMEKI_DECLARE_ID(Project, VariantSpec()
552 .setType(DataTypeString)
553 .setDefault(String())
554 .setDescription("Project name."));
555
557 PROMEKI_DECLARE_ID(Reel, VariantSpec()
558 .setType(DataTypeString)
559 .setDefault(String())
560 .setDescription("Reel or input device name."));
561
562 // ============================================================
563 // DPX film info
564 // ============================================================
565
567 PROMEKI_DECLARE_ID(FilmMfgID, VariantSpec()
568 .setType(DataTypeString)
569 .setDefault(String())
570 .setDescription("Film manufacturer ID code (2 chars)."));
571
573 PROMEKI_DECLARE_ID(FilmType, VariantSpec()
574 .setType(DataTypeString)
575 .setDefault(String())
576 .setDescription("Film type (2 chars)."));
577
579 PROMEKI_DECLARE_ID(FilmOffset, VariantSpec()
580 .setType(DataTypeString)
581 .setDefault(String())
582 .setDescription("Film offset in perfs (2 chars)."));
583
585 PROMEKI_DECLARE_ID(FilmPrefix, VariantSpec()
586 .setType(DataTypeString)
587 .setDefault(String())
588 .setDescription("Film prefix (6 chars)."));
589
591 PROMEKI_DECLARE_ID(FilmCount, VariantSpec()
592 .setType(DataTypeString)
593 .setDefault(String())
594 .setDescription("Film count (4 chars)."));
595
597 PROMEKI_DECLARE_ID(FilmFormat, VariantSpec()
598 .setType(DataTypeString)
599 .setDefault(String())
600 .setDescription("Film format (e.g. Academy)."));
601
603 PROMEKI_DECLARE_ID(FilmSeqPos,
604 VariantSpec()
605 .setType(DataTypeInt32)
606 .setDefault(int32_t(0))
607 .setMin(int32_t(0))
608 .setDescription("Sequence position (frame number in sequence)."));
609
611 PROMEKI_DECLARE_ID(FilmSeqLen, VariantSpec()
612 .setType(DataTypeInt32)
613 .setDefault(int32_t(0))
614 .setMin(int32_t(0))
615 .setDescription("Sequence length (total frames in sequence)."));
616
618 PROMEKI_DECLARE_ID(FilmHoldCount,
619 VariantSpec()
620 .setType(DataTypeInt32)
621 .setDefault(int32_t(1))
622 .setMin(int32_t(1))
623 .setDescription("Held count (1 = default, >1 = repeated frame)."));
624
626 PROMEKI_DECLARE_ID(FilmShutter, VariantSpec()
627 .setType(DataTypeDouble)
628 .setDefault(0.0)
629 .setMin(0.0)
630 .setMax(360.0)
631 .setDescription("Film shutter angle in degrees."));
632
634 PROMEKI_DECLARE_ID(FilmFrameID, VariantSpec()
635 .setType(DataTypeString)
636 .setDefault(String())
637 .setDescription("Film frame identification (e.g. keycode)."));
638
640 PROMEKI_DECLARE_ID(FilmSlate, VariantSpec()
641 .setType(DataTypeString)
642 .setDefault(String())
643 .setDescription("Film slate information."));
644
645 // ============================================================
646 // DPX TV info
647 // ============================================================
648
650 PROMEKI_DECLARE_ID(FieldID,
651 VariantSpec()
652 .setType(DataTypeInt32)
653 .setDefault(int32_t(0))
654 .setRange(int32_t(0), int32_t(1))
655 .setDescription("Field number within an interlaced frame (0 or 1)."));
656
657 // ============================================================
658 // DPX image element info
659 // ============================================================
660
662 PROMEKI_DECLARE_ID(TransferCharacteristic,
663 VariantSpec()
664 .setType(DataTypeInt32)
665 .setDefault(int32_t(0))
666 .setMin(int32_t(0))
667 .setDescription("SMPTE 268M transfer characteristic code."));
668
670 PROMEKI_DECLARE_ID(Colorimetric,
671 VariantSpec()
672 .setType(DataTypeInt32)
673 .setDefault(int32_t(0))
674 .setMin(int32_t(0))
675 .setDescription("SMPTE 268M colorimetric specification code."));
676
678 PROMEKI_DECLARE_ID(
679 Orientation,
680 VariantSpec()
681 .setType(DataTypeInt32)
682 .setDefault(int32_t(0))
683 .setMin(int32_t(0))
684 .setDescription("Image orientation code (0 = left-to-right, top-to-bottom)."));
685
686 // ============================================================
687 // HDR metadata (SMPTE ST 2086 / CTA-861.3)
688 // ============================================================
689
691 PROMEKI_DECLARE_ID(MasteringDisplay,
692 VariantSpec()
693 .setType(DataTypeMasteringDisplay)
694 .setDescription("Mastering display color volume (SMPTE ST 2086)."));
695
697 PROMEKI_DECLARE_ID(ContentLightLevel,
698 VariantSpec()
699 .setType(DataTypeContentLightLevel)
700 .setDescription("Content light level info (MaxCLL / MaxFALL)."));
701
702 // ============================================================
703 // Codec VUI / color description (ISO/IEC 23091-4 / ITU-T H.273)
704 // ============================================================
705 //
706 // These mirror the @ref MediaConfig encoder-side keys, but
707 // on output: a @ref VideoDecoder parses the bitstream's VUI
708 // (H.264/HEVC) or color description (AV1) and stamps the
709 // recovered values here on every decoded @ref Image. They
710 // are distinct from the legacy DPX @c TransferCharacteristic
711 // / @c Colorimetric keys above — those carry SMPTE 268M
712 // codepoints from DPX files, while these carry H.273
713 // codepoints from a compressed bitstream.
714 //
715 // Producers should prefer picking a @ref PixelFormat that
716 // already encodes the colour space (e.g.
717 // @c YUV10_422_UYVY_LE_BT2020_PQ) when one exists — the
718 // codec / device side derives transfer / primaries /
719 // matrix / range from the @ref ColorModel via
720 // @ref ColorModel::toH273. These keys remain as the
721 // explicit override path for cases where the buffer's
722 // colour family doesn't match the wire / bitstream claim.
723
725 PROMEKI_DECLARE_ID(VideoColorPrimaries,
726 VariantSpec()
727 .setType(DataTypeEnum)
728 .setDefault(promeki::ColorPrimaries::Unspecified)
729 .setEnumType(promeki::ColorPrimaries::Type)
730 .setDescription("VUI color primaries (ISO/IEC 23091-4)."));
731
733 PROMEKI_DECLARE_ID(VideoTransferCharacteristics,
734 VariantSpec()
735 .setType(DataTypeEnum)
736 .setDefault(promeki::TransferCharacteristics::Unspecified)
737 .setEnumType(promeki::TransferCharacteristics::Type)
738 .setDescription("VUI transfer characteristics (ISO/IEC 23091-4)."));
739
741 PROMEKI_DECLARE_ID(VideoMatrixCoefficients,
742 VariantSpec()
743 .setType(DataTypeEnum)
744 .setDefault(promeki::MatrixCoefficients::Unspecified)
745 .setEnumType(promeki::MatrixCoefficients::Type)
746 .setDescription("VUI matrix coefficients (ISO/IEC 23091-4)."));
747
749 PROMEKI_DECLARE_ID(VideoRange, VariantSpec()
750 .setType(DataTypeEnum)
751 .setDefault(promeki::VideoRange::Unknown)
752 .setEnumType(promeki::VideoRange::Type)
753 .setDescription("VUI video range (Unknown / Limited / Full)."));
754
767 PROMEKI_DECLARE_ID(VideoScanMode, VariantSpec()
768 .setType(DataTypeEnum)
769 .setDefault(promeki::VideoScanMode::Unknown)
770 .setEnumType(promeki::VideoScanMode::Type)
771 .setDescription("Raster scan mode "
772 "(Progressive / Interlaced*)."));
773
774 // ============================================================
775 // Encoder per-frame statistics
776 //
777 // These keys are populated by a @ref VideoEncoder on each
778 // emitted @ref CompressedVideoPayload. They describe how
779 // the encoder coded a specific frame and are useful for
780 // rate-control tuning, quality analytics, and diagnosing
781 // bitrate / latency anomalies. A decoder will typically
782 // not repopulate them when re-decoding a stream.
783 // ============================================================
784
789 PROMEKI_DECLARE_ID(CodecFrameAvgQP, VariantSpec()
790 .setType(DataTypeInt32)
791 .setDefault(int32_t(0))
792 .setMin(int32_t(0))
793 .setDescription("Average QP of the encoded frame."));
794
798 PROMEKI_DECLARE_ID(CodecFrameSatd,
799 VariantSpec()
800 .setType(DataTypeInt32)
801 .setDefault(int32_t(0))
802 .setMin(int32_t(0))
803 .setDescription("Frame SATD (Sum of Absolute Transformed Differences)."));
804
812 PROMEKI_DECLARE_ID(CodecEncodeOrderIdx, VariantSpec()
813 .setType(DataTypeUInt32)
814 .setDefault(uint32_t(0))
815 .setDescription("Frame index in encode order."));
816
818 PROMEKI_DECLARE_ID(CodecDisplayOrderIdx, VariantSpec()
819 .setType(DataTypeUInt32)
820 .setDefault(uint32_t(0))
821 .setDescription("Frame index in display order."));
822
830 PROMEKI_DECLARE_ID(CodecTemporalId,
831 VariantSpec()
832 .setType(DataTypeInt32)
833 .setDefault(int32_t(0))
834 .setMin(int32_t(0))
835 .setDescription("Temporal scalability layer ID (0 = base layer)."));
836
844 PROMEKI_DECLARE_ID(CodecGopPosition,
845 VariantSpec()
846 .setType(DataTypeInt32)
847 .setDefault(int32_t(0))
848 .setMin(int32_t(0))
849 .setDescription("Offset from last keyframe (0 = keyframe)."));
850
858 PROMEKI_DECLARE_ID(CodecIntraBlockCount,
859 VariantSpec()
860 .setType(DataTypeInt32)
861 .setDefault(int32_t(0))
862 .setMin(int32_t(0))
863 .setDescription("Count of intra-coded blocks (codec-specific unit)."));
864
871 PROMEKI_DECLARE_ID(CodecInterBlockCount,
872 VariantSpec()
873 .setType(DataTypeInt32)
874 .setDefault(int32_t(0))
875 .setMin(int32_t(0))
876 .setDescription("Count of inter-coded blocks (codec-specific unit)."));
877
884 PROMEKI_DECLARE_ID(CodecAvgMotionVectorX,
885 VariantSpec()
886 .setType(DataTypeInt32)
887 .setDefault(int32_t(0))
888 .setDescription("Average motion vector X (codec-defined units)."));
889
892 PROMEKI_DECLARE_ID(CodecAvgMotionVectorY,
893 VariantSpec()
894 .setType(DataTypeInt32)
895 .setDefault(int32_t(0))
896 .setDescription("Average motion vector Y (codec-defined units)."));
897
922 PROMEKI_DECLARE_ID(CodecParameterSets,
923 VariantSpec()
924 .setType(DataTypeString)
925 .setDefault(String())
926 .setDescription("Out-of-band codec parameter sets "
927 "(Annex-B SPS/PPS/VPS or AV1 sequence header)."));
928
929 // ============================================================
930 // Frontend layout hints
931 //
932 // Generic per-stage layout hints for graphical editors
933 // (the promeki-pipeline demo persists Vue Flow node
934 // positions through these). Stored on
935 // @ref MediaPipelineConfig::Stage::metadata so they
936 // round-trip with the rest of the config. The wire
937 // names use the @c "Frontend." prefix to namespace UI
938 // hints away from media metadata; the C++ identifiers
939 // drop the dot because identifiers cannot contain one.
940 // ============================================================
941
943 static inline const ID FrontendX = declareID(
944 "Frontend.X", VariantSpec()
945 .setType(DataTypeDouble)
946 .setDefault(0.0)
947 .setDescription("Frontend X coordinate (pixels) for graphical editors."));
948
950 static inline const ID FrontendY = declareID(
951 "Frontend.Y", VariantSpec()
952 .setType(DataTypeDouble)
953 .setDefault(0.0)
954 .setDescription("Frontend Y coordinate (pixels) for graphical editors."));
955
956 // ============================================================
957 // Methods
958 // ============================================================
959
965 static String idToString(ID id) { return id.name(); }
966
972 static ID stringToID(const String &val) { return ID(val); }
973
980 static Metadata fromJson(const JsonObject &json, Error *err = nullptr);
981
997 String toString(unsigned int indent = 0) const;
998
1016 static Metadata fromString(const String &str, Error *err = nullptr);
1017
1019 Metadata() = default;
1020
1025 StringList dump() const;
1026
1032 bool operator==(const Metadata &other) const;
1033
1065 void applyMediaIOWriteDefaults();
1066};
1067
1068PROMEKI_NAMESPACE_END
1069
1070#endif // PROMEKI_ENABLE_CORE