Value | Meaning |
---|---|
Undefined0 | undefined merge mode |
ReplaceAll1 | replace all tags (clear list and append) |
Replace2 | replace tags |
Append3 | append tags |
Prepend4 | prepend tags |
Keep5 | keep existing tags |
KeepAll6 | keep all existing tags |
Count7 | the number of merge modes |
The different tag merging modes are basically replace, overwrite and append, but they can be seen from two directions. Given two taglists: (A) the tags already in the element and (B) the ones that are supplied to the element ( e.g. via gst.tag_setter.TagSetter.mergeTags / gst.tag_setter.TagSetter.addTags or a gst.types.EventType.Tag), how are these tags merged? In the table below this is shown for the cases that a tag exists in the list (A) or does not exists (!A) and combinations thereof.
| merge mode | A + B | A + !B | !A + B | !A + !B | | ----------- | ----- | ------ | ------ | ------- | | REPLACE_ALL | B | ø | B | ø | | REPLACE | B | A | B | ø | | APPEND | A, B | A | B | ø | | PREPEND | B, A | A | B | ø | | KEEP | A | A | B | ø | | KEEP_ALL | A | A | ø | ø |