Skip to content

Commit b7ebcdc

Browse files
committed
Merge branch 'calvaris/mpd-no-xml-parsing'
2 parents aeb0ada + c02301b commit b7ebcdc

File tree

5 files changed

+94
-1
lines changed

5 files changed

+94
-1
lines changed

package/gstreamer1/gst1-plugins-bad/Config.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,15 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH
344344
help
345345
DASH demuxer plugin
346346

347+
if BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH
348+
349+
config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH_MPD_NO_INIT_DATA_XML_PARSING
350+
bool "mpd no init data xml parsing"
351+
default n
352+
help
353+
No XML parsing will be done on MPD manifests
354+
endif
355+
347356
config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DECKLINK
348357
bool "decklink"
349358
depends on BR2_INSTALL_LIBSTDCPP

package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,13 @@ ifeq ($(GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE),y)
744744
GST1_PLUGINS_BAD_LICENSE += , UNKNOWN
745745
endif
746746

747+
ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH_MPD_NO_INIT_DATA_XML_PARSING),y)
748+
define GST1_PLUGINS_BAD_APPLY_MPD_EXTRA_PATCHES_POST_HOOK
749+
cd $(@D) && patch -p1 < ../../../package/gstreamer1/gst1-plugins-bad/mpd-extra/0011-dash-Store-entire-ContentProtection-node-in-protecti.patch
750+
endef
751+
GST1_PLUGINS_BAD_POST_PATCH_HOOKS += GST1_PLUGINS_BAD_APPLY_MPD_EXTRA_PATCHES_POST_HOOK
752+
endif
753+
747754
# Use the following command to extract license info for plugins.
748755
# # find . -name 'plugin-*.xml' | xargs grep license
749756

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
From 9ab7d685a56f41c73ef511294a331c027867a617 Mon Sep 17 00:00:00 2001
2+
From: Philippe Normand <[email protected]>
3+
Date: Mon, 12 Jul 2021 12:08:20 +0100
4+
Subject: [PATCH] dash: Store entire ContentProtection node in protection event
5+
data
6+
7+
Some manifests use the ContentProtection node to store additional information
8+
such as the license server url. Our MPD parser used to process the
9+
ContentProtection node, extracting Playready PSSH boxes. However for other DRM
10+
systems, only the `value` attribute was passed down to the protection event, so
11+
for example, Widevine data was not parsed at all and "Widevine" was passed to
12+
the event, which is not very useful for decryptors that require a PSSH init
13+
data.
14+
15+
Parsing should now be done by decryptors which will receive the entire
16+
ContentProtection XML node as a string. This gives more "freedom" to the
17+
decryptor which can then detect and parse custom nodes as well.
18+
19+
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2400>
20+
Signed-off-by: Xabier Rodriguez Calvar <[email protected]>
21+
---
22+
ext/dash/gstmpdparser.c | 38 +++++++++-----------------------------
23+
1 file changed, 9 insertions(+), 29 deletions(-)
24+
25+
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
26+
index 6535cae52..a876b3f45 100644
27+
--- a/ext/dash/gstmpdparser.c
28+
+++ b/ext/dash/gstmpdparser.c
29+
@@ -1783,35 +1783,15 @@ error:
30+
static void
31+
gst_mpdparser_parse_content_protection_node (GList ** list, xmlNode * a_node)
32+
{
33+
- gchar *value = NULL;
34+
- if (gst_mpdparser_get_xml_prop_string (a_node, "value", &value)) {
35+
- if (!g_strcmp0 (value, "MSPR 2.0")) {
36+
- xmlNode *cur_node;
37+
- for (cur_node = a_node->children; cur_node; cur_node = cur_node->next) {
38+
- if (cur_node->type == XML_ELEMENT_NODE) {
39+
- if (xmlStrcmp (cur_node->name, (xmlChar *) "pro") == 0) {
40+
- GstDescriptorType *new_descriptor;
41+
- new_descriptor = g_slice_new0 (GstDescriptorType);
42+
- *list = g_list_append (*list, new_descriptor);
43+
-
44+
- gst_mpdparser_get_xml_prop_string_stripped (a_node, "schemeIdUri",
45+
- &new_descriptor->schemeIdUri);
46+
-
47+
- gst_mpdparser_get_xml_node_content (cur_node,
48+
- &new_descriptor->value);
49+
- goto beach;
50+
- }
51+
- }
52+
- }
53+
- } else {
54+
- gst_mpdparser_parse_descriptor_type_node (list, a_node);
55+
- }
56+
- } else {
57+
- gst_mpdparser_parse_descriptor_type_node (list, a_node);
58+
- }
59+
-beach:
60+
- if (value)
61+
- g_free (value);
62+
+ GstDescriptorType *new_descriptor;
63+
+
64+
+ new_descriptor = g_slice_new0 (GstDescriptorType);
65+
+ *list = g_list_append (*list, new_descriptor);
66+
+
67+
+ GST_LOG ("attributes of %s node:", a_node->name);
68+
+ gst_mpdparser_get_xml_prop_string_stripped (a_node, "schemeIdUri",
69+
+ &new_descriptor->schemeIdUri);
70+
+ gst_mpdparser_get_xml_node_as_string (a_node, &new_descriptor->value);
71+
}
72+
73+
static void
74+
--
75+
2.30.2
76+

package/wpe/wpewebkit/Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ config BR2_PACKAGE_WPEWEBKIT_ENABLE_MEDIA_SOURCE
137137
config BR2_PACKAGE_WPEWEBKIT_USE_ENCRYPTED_MEDIA
138138
bool "Encrypted Media Extensions (EME)"
139139
default y
140+
depends on !BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH_MPD_NO_INIT_DATA_XML_PARSING
140141
help
141142
Use Enable Encrypted Media Extensions (EME) API.
142143

package/wpe/wpewebkit/wpewebkit.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif
1111

1212
ifeq ($(BR2_PACKAGE_WPEWEBKIT2_28),y)
1313
WPEWEBKIT_VERSION = 2.28
14-
WPEWEBKIT_VERSION_VALUE = 1f3eb4eb84e1d22b9ededfaf027c42ec578e9731
14+
WPEWEBKIT_VERSION_VALUE = 3a3595f1b3123d3b9e1679094e927cede65c2a22
1515
endif
1616

1717
WPEWEBKIT_SITE = $(call github,WebPlatformForEmbedded,WPEWebKit,$(WPEWEBKIT_VERSION_VALUE))

0 commit comments

Comments
 (0)