{ "$id":                          "https://schemas.mpai.community/OSD/V1.5/data/BasicAudioVisualSceneDescriptors.json",
  "$schema":                      "https://json-schema.org/draft/2020-12/schema",
  "title":                        "Basic Audio-Visual Scene Descriptors V1.5",
  "type":                         "object", "required": [ "Header", "MInstanceID", "BasicAVSceneDescriptorsID",
                                  "BAVSDescriptorsSpaceTime", "AVObjectCount", "BasicAVSceneDescriptors" ],
                                  "additionalProperties": false, "properties":
                                                 {
    "Header":                     { "type": "string", "pattern": "^OSD-BAVD-V[0-9]{1,2}[.][0-9]{1,2}$" },
    "MInstanceID":                { "type": "string" },
    "BasicAVSceneDescriptorsID":  { "type": "string" },
    "BAVSDescriptorsSpaceTime":   { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },

    "GravityValue":               { "type": "number" },

    "AVObjectCount":              { "type": "integer", "minimum": 0 },

    "BasicAVSceneDescriptors":    { "type": "array", "items": {
      "$anchor":                    "BasicAVSceneItem", "type": "object", "additionalProperties": false, 
                                    "required": [ "AVObjectIDOrAVObject", "PointOfView" ], "properties": {
        "AVObjectSpaceTime":      { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SpaceTime.json" },
        "AVObjectIDOrAVObject":   { "$ref": "#/$defs/ObjectIDOrObject" },
        "AVSceneEnrichment":      { "type": "array", "items": { "$ref": "#/$defs/AVSceneEnrichment" } },
        "PointOfView":            { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/PointOfView.json" } } } },

    "DataXMData":                 { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":              { "type": "string", "maxLength": 2048 } },

  "$defs":                        {

    "ObjectIDOrObject":           { "type": "array", "minItems": 1, "maxItems": 1, "items": { "oneOf": [
                                     { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/AVObject.json" },
                                     { "type": "string" } ] } },

    "AVSceneEnrichment": { "type": "object", "additionalProperties": false, "properties": {
      "EnrichmentTrace":          { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/Trace.json" },
      "Depth":                    { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Depth.json" },
      "OcclusionFlag":            { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/OcclusionFlag.json" },
      "InteractionPotential":     { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/InteractionPotential.json" },
      "SalienceScore":            { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/SalienceScore.json" } } } } }