⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 281183 in webkit


Ignore:
Timestamp:
Aug 18, 2021, 1:26:33 AM (5 years ago)
Author:
calvaris@igalia.com
Message:

[GStreamer][EME] Try to parse XML init datas that could possibly come from MPD manifests
​https://bugs.webkit.org/show_bug.cgi?id=229145

Reviewed by Alicia Boya Garcia.

Source/WebCore:

Added GStreamerEMEUtilities to include implementation of
InitData::extractCencIfNeeded. This tries to parse the possible
XML inside an init data that could come from MPD manifests. If it
succeeds, it keeps the parsed init data, if not, it returns the
original one.

Based on a patch by Philippe Normand.

  • platform/GStreamer.cmake:
  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.

(WebCore::markupStartElement):
(WebCore::markupEndElement):
(WebCore::markupText):
(WebCore::markupPassthrough):
(WebCore::markupError):
(WebCore::InitData::extractCencIfNeeded):

  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:

(WebCore::InitData::InitData):

Source/WTF:

  • wtf/glib/GUniquePtr.h: Added deleter for GMarkupParseContext.
Location:
trunk/Source
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r281111 r281183  
     12021-08-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][EME] Try to parse XML init datas that could possibly come from MPD manifests
     4        https://bugs.webkit.org/show_bug.cgi?id=229145
     5
     6        Reviewed by Alicia Boya Garcia.
     7
     8        * wtf/glib/GUniquePtr.h: Added deleter for GMarkupParseContext.
     9
    1102021-08-16  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Source/WTF/wtf/glib/GUniquePtr.h

    r252770 r281183  
    4848    macro(char*, g_strfreev) \
    4949    macro(GVariantIter, g_variant_iter_free) \
    50     macro(GVariantType, g_variant_type_free)
     50    macro(GVariantType, g_variant_type_free) \
     51    macro(GMarkupParseContext, g_markup_parse_context_free)
    5152
    5253#define WTF_DEFINE_GPTR_DELETER(typeName, deleterFunc) \
  • trunk/Source/WebCore/ChangeLog

    r281182 r281183  
     12021-08-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][EME] Try to parse XML init datas that could possibly come from MPD manifests
     4        https://bugs.webkit.org/show_bug.cgi?id=229145
     5
     6        Reviewed by Alicia Boya Garcia.
     7
     8        Added GStreamerEMEUtilities to include implementation of
     9        InitData::extractCencIfNeeded. This tries to parse the possible
     10        XML inside an init data that could come from MPD manifests. If it
     11        succeeds, it keeps the parsed init data, if not, it returns the
     12        original one.
     13
     14        Based on a patch by Philippe Normand.
     15
     16        * platform/GStreamer.cmake:
     17        * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
     18        (WebCore::markupStartElement):
     19        (WebCore::markupEndElement):
     20        (WebCore::markupText):
     21        (WebCore::markupPassthrough):
     22        (WebCore::markupError):
     23        (WebCore::InitData::extractCencIfNeeded):
     24        * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
     25        (WebCore::InitData::InitData):
     26
    1272021-08-17  Devin Rousso  <drousso@apple.com>
    228
  • trunk/Source/WebCore/platform/GStreamer.cmake

    r280423 r281183  
    3030        platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
    3131
     32        platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp
    3233        platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp
    3334        platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
  • trunk/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h

    r271399 r281183  
    5151            ASSERT_NOT_REACHED();
    5252        }
    53         m_payload = mappedInitData->createSharedBuffer();
     53        m_payload = extractCencIfNeeded(mappedInitData->createSharedBuffer());
    5454    }
    5555
    5656    InitData(const String& systemId, RefPtr<SharedBuffer>&& payload)
    5757        : m_systemId(systemId)
    58         , m_payload(WTFMove(payload))
     58        , m_payload(extractCencIfNeeded(WTFMove(payload)))
    5959    {
    6060    }
    … …  
    8686        return "cenc"_s;
    8787    }
     88
     89    static RefPtr<SharedBuffer> extractCencIfNeeded(RefPtr<SharedBuffer>&&);
    8890
    8991private:
Note: See TracChangeset for help on using the changeset viewer.