dashdemux: copy ContentProtection element including xml namespaces
authorAlex Ashley <bugzilla@ashley-family.net>
Tue, 24 Aug 2021 13:33:42 +0000 (14:33 +0100)
committerVivia Nikolaidou <vivia@ahiru.eu>
Fri, 27 Aug 2021 10:47:06 +0000 (10:47 +0000)
commitfd1e75900db48fc008899c5712a39ca16a0681b0
treef5decd75a2833bbed2ed268a681d45313a37ac0c
parent43199bc883d68b1935b51b07a5c464f9f80c605a
dashdemux: copy ContentProtection element including xml namespaces

Commit bc09d8cc changed gstmpdparser to put the entire
<ContentProtection> element in the "value" field, so that DRMs
other than PlayReady could make use of the data inside this
element.

However, the data in the "value" field does not include any
XML namespace declarations that are used within the element. This
causes problems for a namespace aware XML parser that wants to
make use of this data.

This commit modifies the way the XML is converted to a string
so that XML namespaces are preserved in the output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2487>
ext/dash/gstxmlhelper.c
tests/check/elements/dash_mpd.c