mpd:
- manifest_edit.plugins.mpd.descriptor_add:
    # This config file makes use of the "descriptor_add" plugin to add an
    # "Accessibility" descriptor element to a manifest.
    #
    # "descriptor_add" allows to specify the position where the descriptor
    # will be added with reference to a specific Representation or
    # Adaptation Set, inside one or more Period if necessary. This reflects
    # the general structure of a DASH manifest, which is briefly recapped
    # here to better clarify how to configure the plugin.
    #
    # Tracks in mpd manifests are specified as list of Representations
    # inside a given Adaptation Set, inside a given Period. The general
    # scheme can roughly be illustrated as
    #
    # Manifest:
    #  |- Period id:
    #     id = "id"
    #     |- AdaptationSet :
    #        contentType = "audio"
    #        |- Representation
    #        |-   ...
    #        |- Representation
    #     |- AdaptationSet :
    #        contentType = "video"
    #        |- Representation
    #        |-   ...
    #        |- Representation
    #
    # In an mpd there could be multiple periods, each with multiple
    # adaptation sets, each with multiple representations, to form an
    # arbitrarily nested structure.
    #
    # The descriptor_add plugin allows to add a descriptor to any of those.
    # This is done by selecting the desired element by means if its properties,
    # as illustrated by the following examples:
    #
    # 1) add an Accessibility descriptor to all adaptation sets in all periods.
    #
    #    periods:
    #      - '*' : '.*'
    #        adaptationSets:
    #          - '*' : '.*'
    #            plugin_config:
    #              name:"Accessibility"
    #              schemeIdUri: "<a scheme of choice>"
    #              value: "<a value of choice>" #value is optional
    #              id: "<an id of choice>" #id is optional
    #
    # 2) add an EssentialProperty to all adaptation sets having
    #    a "video" contentType, in all periods that have an 'id'
    #    property
    #
    #    periods:
    #      - id : '.*'
    #        adaptationSets:
    #          - contentType :  "video"
    #            plugin_config:
    #              name:"EssentialProperty"
    #              schemeIdUri: "<a scheme of choice>"
    #              value: "<a value of choice>" #value is optional
    #              id: "<an id of choice>" #id is optional
    #
    # 3) add SupplementalProperty to all representations, in all
    #    adaptation sets having a "video" contentType, in all periods.
    #
    #    periods:
    #      - '*' : '.*'
    #        adaptationSets:
    #          - contentType :  "video"
    #            representations:
    #              - '*' : '.*'
    #                plugin_config:
    #                  name:"SupplementalProperty"
    #                  schemeIdUri: "<a scheme of choice>"
    #                  value: "<a value of choice>" #value is optional
    #                  id: "<an id of choice>" #id is optional
    #
    # Since some descriptors can only be added to specific elements (i.e.
    # "Accessibility" can only be present in an Adaptation Set, not in a Period
    # or Representation), the plugin will check for "impossible" configurations
    # and will only perform manipulations leading to a DASH-compliant manifest.
    #
    # More details are available in manifest edit documentation.
    periods:
      - '*' : '.*'
        adaptationSets:
          - contentType :  "video"
            plugin_config:
              name: "Accessibility"
              schemeIdUri: "MyName"
              value: "MyValue"
