[Build][GStreamer] Update to 1.16.0
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 12:18:16 +0000 (12:18 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 12:18:16 +0000 (12:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197157

Reviewed by Xabier Rodriguez-Calvar.

The upstreamed patches were removed and a new one was added for a
regression detected in the scaletempo GStreamer element. The GNOME
Flatpak was migrated to 3.32 and I switched a few modules to Meson
on the way, as it is the preferred build system now in GStreamer
1.16.

* flatpak/files/httpd-autogen.sh:
* flatpak/flatpakutils.py:
(FlatpakPackage.install):
(WebkitFlatpak.run_in_sandbox):
* flatpak/org.webkit.CommonModules.yaml:
* flatpak/org.webkit.WebKit.yaml:
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch: Removed.
* gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch: Removed.
* gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch: Removed.
* gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch: Removed.
* gstreamer/patches/gst-plugins-bad-0005-mssdemux-fix-protection-data-double-free.patch: Removed.
* gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch: Removed.
* gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch: Removed.
* gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch: Removed.
* gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch: Removed.
* gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch: Removed.
* gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch: Removed.
* gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch: Removed.
* gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch: Removed.
* gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch: Removed.
* gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch: Removed.
* gstreamer/patches/gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch: Removed.
* gstreamer/patches/gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch: Removed.
* gstreamer/patches/gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch: Removed.
* gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch: Removed.
* gstreamer/patches/gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch: Added.
* gstreamer/patches/gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch: Removed.
* gstreamer/patches/gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
Tools/ChangeLog
Tools/flatpak/files/httpd-autogen.sh
Tools/flatpak/flatpakutils.py
Tools/flatpak/org.webkit.CommonModules.yaml
Tools/flatpak/org.webkit.WebKit.yaml
Tools/gstreamer/jhbuild.modules
Tools/gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-bad-0005-mssdemux-fix-protection-data-double-free.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch [deleted file]
Tools/gstreamer/patches/gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch [new file with mode: 0644]
Tools/gstreamer/patches/gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch [deleted file]
Tools/gstreamer/patches/gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch [deleted file]
Tools/gtk/jhbuild.modules

index 863a487..743e9ae 100644 (file)
@@ -1,3 +1,46 @@
+2019-04-24  Philippe Normand  <pnormand@igalia.com>
+
+        [Build][GStreamer] Update to 1.16.0
+        https://bugs.webkit.org/show_bug.cgi?id=197157
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        The upstreamed patches were removed and a new one was added for a
+        regression detected in the scaletempo GStreamer element. The GNOME
+        Flatpak was migrated to 3.32 and I switched a few modules to Meson
+        on the way, as it is the preferred build system now in GStreamer
+        1.16.
+
+        * flatpak/files/httpd-autogen.sh:
+        * flatpak/flatpakutils.py:
+        (FlatpakPackage.install):
+        (WebkitFlatpak.run_in_sandbox):
+        * flatpak/org.webkit.CommonModules.yaml:
+        * flatpak/org.webkit.WebKit.yaml:
+        * gstreamer/jhbuild.modules:
+        * gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch: Removed.
+        * gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch: Removed.
+        * gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch: Removed.
+        * gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch: Removed.
+        * gstreamer/patches/gst-plugins-bad-0005-mssdemux-fix-protection-data-double-free.patch: Removed.
+        * gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch: Removed.
+        * gstreamer/patches/gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch: Added.
+        * gstreamer/patches/gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch: Removed.
+        * gstreamer/patches/gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch: Removed.
+
 2019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] MiniBrowser: also set the passed bg-color when receiving arguments
index 6a0a473..1c0c483 100755 (executable)
@@ -1 +1,2 @@
-autoreconf
\ No newline at end of file
+automake --add-missing
+autoreconf --install
index 2e1bf98..9924958 100644 (file)
@@ -474,7 +474,7 @@ class FlatpakPackage(FlatpakObject):
         comment = "Installing from " + self.repo.name + " " + self.name + " " + self.arch + " " + self.branch
         self.flatpak(*args, show_output=True, comment=comment)
         if self.hash:
-            args = ["update", "--commit", self.hash]
+            args = ["update", "--commit", self.hash, self.name]
             comment = "Updating to %s" % self.hash
             self.flatpak(*args, show_output=True, comment=comment)
 
@@ -768,6 +768,7 @@ class WebkitFlatpak:
                 "JavaScriptCoreUseJIT",
                 "Malloc",
                 "WAYLAND_DISPLAY",
+                "WAYLAND_SOCKET",
                 "DISPLAY",
                 "LANG",
                 "NUMBER_OF_PROCESSORS",
index 84a3549..d1c991b 100644 (file)
   sources:
     - type: git
       url: https://gitlab.freedesktop.org/gstreamer/gstreamer.git
-      branch: 1.14.4
-    - type: patch
-      path: ../gstreamer/patches/gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch
-    - type: patch
-      path: ../gstreamer/patches/gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch
+      branch: 1.16.0
   config-opts:
-    - -Ddisable_gtkdoc=true
+    - -Dgtk_doc=disabled
+    - -Dintrospection=disabled
+    - -Dexamples=disabled
+    - -Dtests=disabled
 - name: gst-plugins-base
   buildsystem: meson
   sources:
     - type: git
       url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git
-      branch: 1.14.4
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch
+      branch: 1.16.0
   config-opts:
-    - -Ddisable_gtkdoc=true
+    - -Dgtk_doc=disabled
+    - -Dintrospection=disabled
+    - -Dexamples=disabled
+    - -Dtests=disabled
 - name: gst-plugins-good
   buildsystem: meson
   sources:
     - type: git
       url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good.git
-      branch: 1.14.4
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch
+      branch: 1.16.0
     - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch
+      path: ../gstreamer/patches/gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch
   config-opts:
-    - -Ddisable_gtkdoc=true
+    - -Dgtk_doc=disabled
+    - -Dintrospection=disabled
+    - -Dexamples=disabled
+    - -Dgtk3=disabled
 - name: x264
   config-opts:
     - "--enable-shared"
   sources:
     - type: git
       url: https://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
-      branch: 1.14.4
+      branch: 1.16.0
   config-opts:
-    - -Ddisable_gtkdoc=true
+    - -Dgtk_doc=disabled
 - name: gst-plugins-bad
   buildsystem: meson
   sources:
     - type: git
       url: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git
-      branch: 1.14.4
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch
-    - type: patch
-      path: ../gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch
+      branch: 1.16.0
   config-opts:
-    - -Ddisable_gtkdoc=true
+    - -Dgtk_doc=disabled
+    - -Dintrospection=disabled
+    - -Dexamples=disabled
 - name: ffmpeg
   sources:
     - type: archive
-      url: https://ffmpeg.org/releases/ffmpeg-3.4.5.tar.gz
-      sha256: 18f80cc9ca322134ed40d25d7489af954fa519b4e7e6289b7084f1b0a1cdf472
+      url: https://ffmpeg.org/releases/ffmpeg-4.0.4.tar.gz
+      sha256: 80bb685abfcdda7c9b6c9c5caf1d8dbb927858050d7377c2b8f3488c7e8a9b7f
   config-opts:
     - --enable-static
     - --enable-pic
   builddir: true
   sources:
     - type: archive
-      url: https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.14.4.tar.xz
-      sha256: dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da
+      url: https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.16.0.tar.xz
+      sha256: dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a
   config-opts:
-    - -Ddisable_gtkdoc=true
+    - -Dgtk_doc=disabled
 
 - name: libgcrypt # Speedup libgcrypt
   sources:
     - type: git
       url: https://dev.gnupg.org/source/libgcrypt.git
-      branch: libgcrypt-1.7.6
+      branch: libgcrypt-1.8.4
     - type: patch
       path: patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch
     - type: patch
   - type: archive
     url: http://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz
     sha256: 3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a
-  buildsystem: cmake-ninja
\ No newline at end of file
+  buildsystem: cmake-ninja
index 167e43b..b6d6126 100644 (file)
@@ -1,9 +1,9 @@
 app-id: %(PORTNAME)s
 runtime: org.gnome.Platform
-runtime-version: "3.28"
+runtime-version: "3.32"
 # Control the exact version of the Sdk/Runtime that is being used.
-sdk-hash: 31af0c10f8e42151220a728b52df0a5c37ea8e4b033825f40c30e44d11cb31d1
-runtime-hash: 6d1d0ebbd72404c61d109307eb2240542b7ad82608bc6428bba6f3eebcfc8bf3
+sdk-hash: b3b9b1d1b19ea2bb72019428ca75c7a78455e986a0f91dddf6a29c92990cc5a7
+runtime-hash: 7c9d5592d805d0b7c212190fd8118e4c78cb8ed8f81e687858972670daccff76
 sdk: org.gnome.Sdk
 command: %(COMMAND)s
 finish-args:
index 96cff31..957c7aa 100644 (file)
       href="https://chromium.googlesource.com/webm/"/>
   <repository type="git" name="aomedia.googlesource.com"
       href="https://aomedia.googlesource.com/"/>
+  <repository type="tarball" name="ffmpeg" href="https://ffmpeg.org/releases/"/>
 
-  <autotools id="orc" autogenargs="--disable-gtk-doc" autogen-sh="configure">
-    <branch module="orc/orc-${version}.tar.xz" version="0.4.28"
+  <meson id="orc" mesonargs="-Dgtk_doc=disabled">
+    <branch module="orc/orc-${version}.tar.xz" version="0.4.29"
             repo="gstreamer"
-            hash="sha256:bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"/>
-  </autotools>
+            hash="sha256:4f8901f9144b5ec17dffdb33548b5f4c7f8049b0d1023be3462cdd64ec5a3ab2"/>
+  </meson>
 
   <autotools id="openh264" supports-non-srcdir-builds="no" autogen-sh="pseudo-configure">
     <branch module="cisco/openh264/archive/v${version}.tar.gz" version="1.5.0"
             revision="master" tag="cdb083e84a71d6d31163a4f64f18dc1328fd782c" />
   </cmake>
 
-  <autotools id="gstreamer" autogen-sh="configure" autogenargs="--disable-gtk-doc --disable-introspection --disable-examples --disable-tests">
+  <meson id="gstreamer" mesonargs="-Dgtk_doc=disabled -Dintrospection=disabled -Dexamples=disabled -Dtests=disabled">
     <dependencies>
       <dep package="orc"/>
     </dependencies>
-    <branch hash="sha256:f94f6696c5f05a3b3a9183e39c5f5c0b779f75a04c0efa497e7920afa985ffc7" module="gstreamer/gstreamer-${version}.tar.xz" repo="gstreamer" version="1.14.4">
-      <patch file="gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch" strip="1" /> <!-- Merged as 05a3da347b3b8dbaf470793dc3f9ebb23e6fc67f -->
-      <patch file="gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch" strip="1" /> <!-- Merged as b89b1802df44829a0c034db5807bc893ad3c7774 -->
+    <branch hash="sha256:0e8e2f7118be437cba879353970cf83c2acced825ecb9275ba05d9186ef07c00" module="gstreamer/gstreamer-${version}.tar.xz" repo="gstreamer" version="1.16.0">
     </branch>
-  </autotools>
+  </meson>
 
-  <autotools id="gst-plugins-base"
-             autogen-sh="configure"
-             autogenargs="--disable-examples --disable-gtk-doc --disable-introspection">
+  <meson id="gst-plugins-base" mesonargs="-Dgtk_doc=disabled -Dintrospection=disabled -Dexamples=disabled">
     <if condition-set="wpe">
-      <autogenargs value="--disable-pango"/>
+      <autogenargs value="-Dpango=disabled"/>
     </if>
     <dependencies>
       <dep package="gstreamer"/>
     </dependencies>
-    <branch hash="sha256:ca6139490e48863e7706d870ff4e8ac9f417b56f3b9e4b3ce490c13b09a77461" module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" repo="gstreamer" version="1.14.4" >
-      <patch file="gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch" strip="1"/> <!-- Merged as 89d0e9cc92a86aa0227ee87406737b6d31670aea -->
+    <branch hash="sha256:4093aa7b51e28fb24dfd603893fead8d1b7782f088b05ed0f22a21ef176fb5ae" module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" repo="gstreamer" version="1.16.0" >
     </branch>
-  </autotools>
+  </meson>
 
-  <autotools id="gst-plugins-good" autogen-sh="configure" autogenargs="--disable-examples --disable-gtk-doc --disable-introspection">
+  <meson id="gst-plugins-good" mesonargs="-Dgtk_doc=disabled -Dintrospection=disabled -Dexamples=disabled -Dgtk3=disabled">
     <dependencies>
       <dep package="gst-plugins-base"/>
       <dep package="libvpx"/>
     </dependencies>
 
-    <branch hash="sha256:5f8b553260cb0aac56890053d8511db1528d53cae10f0287cfce2cb2acc70979" module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" repo="gstreamer" version="1.14.4">
-      <patch file="gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch" strip="1" /> <!-- Merged as ee4b45da24cb7465b416c230597f8efc7b2c45cb -->
-      <patch file="gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch" strip="1" /> <!-- Merged as 844423ff99e281fc831303b92861ed43ce5c1518 -->
-      <patch file="gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch" strip="1" /> <!-- Merged as 3e063703b3a51b8aaa7f75f36c4660c583a60e93 -->
-      <patch file="gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch" strip="1" /> <!-- Merged as 43a540b1cd9f162d3dae5d50e36703dfaf558a3e -->
-      <patch file="gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch" strip="1" /> <!-- Merged as 0fbde2a07928ba79b7a4ddb4585f6b1de36a74bb -->
-      <patch file="gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch" strip="1" /> <!-- Merged as 2869edeea29a022007a99db2df41b5a7e1a3025c (to be shipped in 1.16) -->
-      <patch file="gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch" strip="1" /> <!-- Merged as b6e8c6323e01249bb3ac4f121c3adc3ea8d924bf (to be shipped in 1.16) -->
-      <patch file="gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch" strip="1" /> <!-- Merged as 43ee4055c3d03a9f99acdf3c05f45e154899edef (to be shipped in 1.16) -->
-      <patch file="gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch" strip="1" /> <!-- Merged as e07ce9afb4edb2ea898763c7ea11f0af2704104e (to be shipped in 1.16) -->
-      <patch file="gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch" strip="1" /> <!-- Merged as 0432826950d4d80fe2b50ffd3757dc08155de9e3 -->
-      <patch file="gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch" strip="1" /> <!-- Merged as defae350358660e557c74e41a4fe8a8bb327e9c8 -->
-      <patch file="gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch" strip="1" /> <!-- Merged as 56669205eb2d0887596574eabb7806b31c5ba5cf -->
-      <patch file="gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch" strip="1" />
+    <branch hash="sha256:654adef33380d604112f702c2927574cfc285e31307b79e584113858838bb0fd" module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" repo="gstreamer" version="1.16.0">
+      <patch file="gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch" strip="1"/> <!-- Merged upstream, should be shipped in 1.16.1 -->
     </branch>
-  </autotools>
+  </meson>
 
-  <autotools id="gst-plugins-bad" autogen-sh="configure" autogenargs="--disable-examples --disable-gtk-doc --disable-introspection --disable-gtk3">
+  <meson id="gst-plugins-bad" mesonargs="-Dgtk_doc=disabled -Dintrospection=disabled -Dexamples=disabled">
     <dependencies>
       <dep package="graphene"/>
       <dep package="gst-plugins-base"/>
       <dep package="openh264"/>
       <dep package="aom"/>
     </dependencies>
-    <branch hash="sha256:910b4e0e2e897e8b6d06767af1779d70057c309f67292f485ff988d087aa0de5" module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" repo="gstreamer" version="1.14.4">
-      <patch file="gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch" strip="1" /> <!-- Merged as 1d96d9e842dd71882f54ddffbf6c1ccecdb03fcd (to be shipped in 1.16) -->
-      <patch file="gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch" strip="1" /> <!-- Merged as 10a37e0c3528a721084441c37af37baef0908ddc (to be shipped in 1.16) -->
-      <patch file="gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch" strip="1" /> <!-- Merged as f4fdb9770c76113f38515245fecc5f11b3ace20d (to be shipped in 1.14.5) -->
-      <patch file="gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch" strip="1" /> <!-- Merged as 19d34f6b5e1633d5ec4bb2832c58470f0c829cab (to be shipped in 1.14.5) -->
-      <patch file="gst-plugins-bad-0005-mssdemux-fix-protection-data-double-free.patch" strip="1" /> <!-- Merged as 7c136bbb5ee34dfc1a0b003f5db351f1986106a0 (to be shipped in 1.14.5) -->
+    <branch hash="sha256:22139de35626ada6090bdfa3423b27b7fc15a0198331d25c95e6b12cb1072b05" module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" repo="gstreamer" version="1.16.0">
     </branch>
+  </meson>
+
+  <autotools id="ffmpeg" autogen-template="%(srcdir)s/configure --prefix=%(prefix)s --enable-static --enable-pic --disable-avdevice --disable-postproc --disable-swscale --disable-programs --disable-ffplay --disable-ffprobe --disable-ffmpeg --disable-encoder=flac --disable-protocols --disable-devices --disable-network --disable-hwaccels --disable-dxva2 --disable-vdpau --disable-filters --enable-filter=yadif --disable-doc --disable-d3d11va --disable-dxva2 --disable-audiotoolbox --disable-videotoolbox --disable-vaapi --disable-crystalhd --disable-mediacodec --disable-nvenc --disable-mmal --disable-omx --disable-omx-rpi --disable-cuda --disable-cuvid --disable-libmfx --disable-libnpp --disable-iconv --disable-jni --disable-v4l2_m2m --enable-optimizations">
+    <branch repo="ffmpeg" version="4.0.4" module="ffmpeg-${version}.tar.gz" hash="sha256:80bb685abfcdda7c9b6c9c5caf1d8dbb927858050d7377c2b8f3488c7e8a9b7f"/>
   </autotools>
 
-  <autotools id="gst-libav" autogen-sh="configure" autogenargs="--with-libav-extra-configure='--disable-yasm' --disable-gtk-doc">
+  <meson id="gst-libav" mesonargs="-Dgtk_doc=disabled">
     <dependencies>
       <dep package="gst-plugins-base"/>
+      <dep package="ffmpeg"/>
     </dependencies>
-    <branch hash="sha256:dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da" module="gst-libav/gst-libav-${version}.tar.xz" repo="gstreamer" version="1.14.4" />
-  </autotools>
+    <branch hash="sha256:dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a" module="gst-libav/gst-libav-${version}.tar.xz" repo="gstreamer" version="1.16.0" />
+  </meson>
 
-  <autotools id="gstreamer-vaapi" autogen-sh="configure" autogenargs="--disable-examples --disable-gtk-doc">
-    <branch hash="sha256:ce18dbfe961c6a8d31270231686075586bf7a7df62b778c8e7f5ec148251d0a3" module="gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz" repo="gstreamer" version="1.14.4" />
+  <meson id="gstreamer-vaapi" mesonargs="-Dgtk_doc=disabled -Dexamples=disabled">
+    <branch hash="sha256:4e7fce626ee0590dca74b5a8341d25bac76307945131a970b414fc5895f5171f" module="gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz" repo="gstreamer" version="1.16.0" />
     <dependencies>
       <dep package="gstreamer"/>
       <dep package="gst-plugins-base"/>
       <dep package="gst-plugins-bad"/>
       <dep package="libva"/>
     </dependencies>
-   </autotools>
-
-   <autotools id="libva" autogenargs="--enable-va-messaging=no">
-     <branch module="intel/libva/releases/download/${version}/libva-${version}.tar.bz2" version="2.1.0"
-             hash="sha256:f3fa953a11d3210c3a4ee79031abdbe0863d5ce13d9b3f93f315f1eec60a4b0f"
-            checkoutdir="libva-${version}" repo="github-tarball"/>
-   </autotools>
+  </meson>
 
+  <autotools id="libva" autogenargs="--enable-va-messaging=no">
+    <branch module="intel/libva/releases/download/${version}/libva-${version}.tar.bz2" version="2.4.0"
+            hash="sha256:99263056c21593a26f2ece812aee6fe60142b49e6cd46cb33c8dddf18fc19391"
+           checkoutdir="libva-${version}" repo="github-tarball"/>
+  </autotools>
 
 </moduleset>
diff --git a/Tools/gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch b/Tools/gstreamer/patches/gst-plugins-bad-0001-aomenc-Add-support-for-10-12bit-decoding.patch
deleted file mode 100644 (file)
index 4b7a225..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-From 1d96d9e842dd71882f54ddffbf6c1ccecdb03fcd Mon Sep 17 00:00:00 2001
-From: Sean-Der <sean@siobud.com>
-Date: Wed, 27 Jun 2018 09:44:00 +0000
-Subject: [PATCH] aomenc: Add support for 10/12bit decoding
-
-https://bugzilla.gnome.org/show_bug.cgi?id=791674
----
- ext/aom/gstav1dec.c | 108 ++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 103 insertions(+), 5 deletions(-)
-
-diff --git a/ext/aom/gstav1dec.c b/ext/aom/gstav1dec.c
-index d33118e64..23b18f44c 100644
---- a/ext/aom/gstav1dec.c
-+++ b/ext/aom/gstav1dec.c
-@@ -52,15 +52,26 @@ static GstStaticPadTemplate gst_av1_dec_src_pad_template =
- GST_STATIC_PAD_TEMPLATE ("src",
-     GST_PAD_SRC,
-     GST_PAD_ALWAYS,
--    GST_STATIC_CAPS ("video/x-raw, "
--        "format = (string) \"I420\", "
--        "framerate = (fraction) [0, MAX], "
--        "width = (int) [ 4, MAX ], " "height = (int) [ 4, MAX ]")
-+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ I420, YV12, Y42B, Y444"
-+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
-+            ", I420_10LE, I420_12LE, I422_10LE, I422_12LE, Y444_10LE, Y444_12LE"
-+#else
-+            ", I420_10BE, I420_12BE, I422_10BE, I422_12BE, Y444_10BE, Y444_12BE"
-+#endif
-+            " }"))
-     );
- GST_DEBUG_CATEGORY_STATIC (av1_dec_debug);
- #define GST_CAT_DEFAULT av1_dec_debug
-+#define GST_VIDEO_FORMAT_WITH_ENDIAN(fmt,endian) GST_VIDEO_FORMAT_##fmt##endian
-+
-+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
-+#define AOM_FMT_TO_GST(fmt) GST_VIDEO_FORMAT_WITH_ENDIAN(fmt,LE)
-+#else
-+#define AOM_FMT_TO_GST(fmt) GST_VIDEO_FORMAT_WITH_ENDIAN(fmt,BE)
-+#endif
-+
- static void gst_av1_dec_set_property (GObject * object, guint prop_id,
-     const GValue * value, GParamSpec * pspec);
- static void gst_av1_dec_get_property (GObject * object, guint prop_id,
-@@ -79,6 +90,8 @@ static void gst_av1_dec_image_to_buffer (GstAV1Dec * dec,
-     const aom_image_t * img, GstBuffer * buffer);
- static GstFlowReturn gst_av1_dec_open_codec (GstAV1Dec * av1dec,
-     GstVideoCodecFrame * frame);
-+static gboolean gst_av1_dec_get_valid_format (GstAV1Dec * dec,
-+    const aom_image_t * img, GstVideoFormat * fmt);
- #define gst_av1_dec_parent_class parent_class
- G_DEFINE_TYPE (GstAV1Dec, gst_av1_dec, GST_TYPE_VIDEO_DECODER);
-@@ -309,6 +322,81 @@ gst_av1_dec_image_to_buffer (GstAV1Dec * dec, const aom_image_t * img,
-   gst_video_frame_unmap (&frame);
- }
-+gboolean
-+gst_av1_dec_get_valid_format (GstAV1Dec * dec, const aom_image_t * img,
-+    GstVideoFormat * fmt)
-+{
-+  switch (img->fmt) {
-+    case AOM_IMG_FMT_I420:
-+    case AOM_IMG_FMT_I42016:
-+      if (img->bit_depth == 8) {
-+        *fmt = img->monochrome ? GST_VIDEO_FORMAT_GRAY8 : GST_VIDEO_FORMAT_I420;
-+        return TRUE;
-+      } else if (img->bit_depth == 10) {
-+        *fmt = AOM_FMT_TO_GST (I420_10);
-+        return TRUE;
-+      } else if (img->bit_depth == 12) {
-+        *fmt = AOM_FMT_TO_GST (I420_12);
-+        return TRUE;
-+      }
-+
-+      GST_FIXME_OBJECT (dec,
-+          "Please add a 4:2:0 planar %u bit depth frame format",
-+          img->bit_depth);
-+      GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED, (NULL),
-+          ("Unsupported frame format - 4:2:0 planar %u bit depth",
-+              img->bit_depth));
-+      return FALSE;
-+
-+    case AOM_IMG_FMT_I422:
-+    case AOM_IMG_FMT_I42216:
-+      if (img->bit_depth == 8) {
-+        *fmt = GST_VIDEO_FORMAT_Y42B;
-+        return TRUE;
-+      } else if (img->bit_depth == 10) {
-+        *fmt = AOM_FMT_TO_GST (I422_10);
-+        return TRUE;
-+      } else if (img->bit_depth == 12) {
-+        *fmt = AOM_FMT_TO_GST (I422_12);
-+        return TRUE;
-+      }
-+      GST_FIXME_OBJECT (dec,
-+          "Please add a 4:2:2 planar %u bit depth frame format",
-+          img->bit_depth);
-+      GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED, (NULL),
-+          ("Unsupported frame format - 4:2:2 planar %u bit depth",
-+              img->bit_depth));
-+      return FALSE;
-+
-+    case AOM_IMG_FMT_I444:
-+    case AOM_IMG_FMT_I44416:
-+      if (img->bit_depth == 8) {
-+        *fmt = GST_VIDEO_FORMAT_Y444;
-+        return TRUE;
-+      } else if (img->bit_depth == 10) {
-+        *fmt = AOM_FMT_TO_GST (Y444_10);
-+        return TRUE;
-+      } else if (img->bit_depth == 12) {
-+        *fmt = AOM_FMT_TO_GST (Y444_12);
-+        return TRUE;
-+      }
-+      GST_FIXME_OBJECT (dec,
-+          "Please add a 4:4:4 planar %u bit depth frame format",
-+          img->bit_depth);
-+      GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED, (NULL),
-+          ("Unsupported frame format - 4:4:4 planar %u bit depth",
-+              img->bit_depth));
-+      return FALSE;
-+
-+    case AOM_IMG_FMT_YV12:
-+      *fmt = GST_VIDEO_FORMAT_YV12;
-+      return TRUE;
-+
-+    default:
-+      return FALSE;
-+  }
-+}
-+
- static GstFlowReturn
- gst_av1_dec_handle_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
- {
-@@ -318,6 +406,7 @@ gst_av1_dec_handle_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
-   aom_codec_err_t status;
-   aom_image_t *img;
-   aom_codec_iter_t iter = NULL;
-+  GstVideoFormat fmt;
-   if (!av1dec->decoder_inited) {
-     ret = gst_av1_dec_open_codec (av1dec, frame);
-@@ -349,7 +438,16 @@ gst_av1_dec_handle_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
-   img = aom_codec_get_frame (&av1dec->decoder, &iter);
-   if (img) {
--    gst_av1_dec_handle_resolution_change (av1dec, img, GST_VIDEO_FORMAT_I420);
-+    if (gst_av1_dec_get_valid_format (av1dec, img, &fmt) == FALSE) {
-+      aom_img_free (img);
-+      GST_ELEMENT_ERROR (dec, LIBRARY, ENCODE,
-+          ("Failed to decode frame"), ("Unsupported color format %d",
-+              img->fmt));
-+      gst_video_codec_frame_unref (frame);
-+      return GST_FLOW_ERROR;
-+    }
-+
-+    gst_av1_dec_handle_resolution_change (av1dec, img, fmt);
-     ret = gst_video_decoder_allocate_output_frame (dec, frame);
-     if (ret == GST_FLOW_OK) {
--- 
-2.18.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch b/Tools/gstreamer/patches/gst-plugins-bad-0002-aomenc-Handle-8-bit_depth-images-with-AOM_IMG_FMT_HI.patch
deleted file mode 100644 (file)
index 12bf661..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 10a37e0c3528a721084441c37af37baef0908ddc Mon Sep 17 00:00:00 2001
-From: Sean-Der <sean@siobud.com>
-Date: Wed, 27 Jun 2018 09:48:00 +0000
-Subject: [PATCH] aomenc: Handle 8 bit_depth images with
- AOM_IMG_FMT_HIGHBITDEPTH enabled
-
-https://bugzilla.gnome.org/show_bug.cgi?id=791674
----
- ext/aom/gstav1dec.c | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/ext/aom/gstav1dec.c b/ext/aom/gstav1dec.c
-index 23b18f44c..6e0a9bd5d 100644
---- a/ext/aom/gstav1dec.c
-+++ b/ext/aom/gstav1dec.c
-@@ -285,7 +285,7 @@ static void
- gst_av1_dec_image_to_buffer (GstAV1Dec * dec, const aom_image_t * img,
-     GstBuffer * buffer)
- {
--  int deststride, srcstride, height, width, line, comp;
-+  int deststride, srcstride, height, width, line, comp, y;
-   guint8 *dest, *src;
-   GstVideoFrame frame;
-   GstVideoInfo *info = &dec->output_state->info;
-@@ -298,13 +298,25 @@ gst_av1_dec_image_to_buffer (GstAV1Dec * dec, const aom_image_t * img,
-   for (comp = 0; comp < 3; comp++) {
-     dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp);
-     src = img->planes[comp];
--    width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp)
--        * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp);
-+    width =
-+        GST_VIDEO_FRAME_COMP_WIDTH (&frame,
-+        comp) * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp);
-     height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp);
-     deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp);
-     srcstride = img->stride[comp];
--    if (srcstride == deststride) {
-+    if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == 8) {
-+      GST_TRACE_OBJECT (dec,
-+          "HIGHBITDEPTH image with 8 bit_depth. Comp %d: %d != %d, copying "
-+          "line by line.", comp, srcstride, deststride);
-+      for (line = 0; line < height; line++) {
-+        for (y = 0; y < width; y++) {
-+          dest[y] = src[y * 2];
-+        }
-+        dest += deststride;
-+        src += srcstride;
-+      }
-+    } else if (srcstride == deststride) {
-       GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane",
-           comp, srcstride);
-       memcpy (dest, src, srcstride * height);
--- 
-2.18.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch b/Tools/gstreamer/patches/gst-plugins-bad-0003-fdkaacenc-Remove-MODE_2_1.patch
deleted file mode 100644 (file)
index 1ea08f9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From f4fdb9770c76113f38515245fecc5f11b3ace20d Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
-Date: Tue, 4 Dec 2018 17:54:42 +0100
-Subject: [PATCH] fdkaacenc: Remove MODE_2_1
-
-This is not a standard mode and no longer supported by fdk-aac 2.0.0.
-
-For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
----
- ext/fdkaac/gstfdkaacenc.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/ext/fdkaac/gstfdkaacenc.c b/ext/fdkaac/gstfdkaacenc.c
-index ad2bcb492..8410e684c 100644
---- a/ext/fdkaac/gstfdkaacenc.c
-+++ b/ext/fdkaac/gstfdkaacenc.c
-@@ -71,10 +71,6 @@ static const struct
-   GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
-           GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
-           GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}}, {
--    3, MODE_2_1, {
--  GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
--          GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
--          GST_AUDIO_CHANNEL_POSITION_LFE1}}, {
-     4, MODE_1_2_1, {
-   GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
-           GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
--- 
-2.18.1
-
diff --git a/Tools/gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch b/Tools/gstreamer/patches/gst-plugins-bad-0004-fdkaacdec-Use-WAV-channel-mapping-instead-of-interleave-setting.patch
deleted file mode 100644 (file)
index 1d820af..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 19d34f6b5e1633d5ec4bb2832c58470f0c829cab Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
-Date: Wed, 5 Dec 2018 10:10:39 +0100
-Subject: [PATCH] fdkaacdec: Use WAV channel mapping instead of interleave
- setting
-
-The latter is going away in libfdk-aac 2.0.0. Instead, MPEG-style output
-is always non-interleaved and WAV-style output is always interleaved.
-Earlier libfdk-aac also defaults interleaving accordingly.
-
-Since our reordering looks at the associated PCE indices instead of the
-actual channel order, we're agnostic to the mapping.
-
-For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
----
- ext/fdkaac/gstfdkaacdec.c | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/ext/fdkaac/gstfdkaacdec.c b/ext/fdkaac/gstfdkaacdec.c
-index c27183752..f5136b334 100644
---- a/ext/fdkaac/gstfdkaacdec.c
-+++ b/ext/fdkaac/gstfdkaacdec.c
-@@ -151,17 +151,13 @@ gst_fdkaacdec_set_format (GstAudioDecoder * dec, GstCaps * caps)
-     gst_buffer_unref (codec_data);
-   }
-+  /* Choose WAV channel mapping to get interleaving even with libfdk-aac 2.0.0
-+   * The pChannelIndices retain the indices from the standard MPEG mapping so
-+   * we're agnostic to the actual order. */
-   if ((err =
-           aacDecoder_SetParam (self->dec, AAC_PCM_OUTPUT_CHANNEL_MAPPING,
--              0)) != AAC_DEC_OK) {
--    GST_ERROR_OBJECT (self, "Failed to set output channel mapping: %d", err);
--    return FALSE;
--  }
--
--  if ((err =
--          aacDecoder_SetParam (self->dec, AAC_PCM_OUTPUT_INTERLEAVED,
-               1)) != AAC_DEC_OK) {
--    GST_ERROR_OBJECT (self, "Failed to set interleaved output: %d", err);
-+    GST_ERROR_OBJECT (self, "Failed to set output channel mapping: %d", err);
-     return FALSE;
-   }
--- 
-2.18.1
-
diff --git a/Tools/gstreamer/patches/gst-plugins-bad-0005-mssdemux-fix-protection-data-double-free.patch b/Tools/gstreamer/patches/gst-plugins-bad-0005-mssdemux-fix-protection-data-double-free.patch
deleted file mode 100644 (file)
index eb36035..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 7c136bbb5ee34dfc1a0b003f5db351f1986106a0 Mon Sep 17 00:00:00 2001
-From: Xabier Rodriguez Calvar <calvaris@igalia.com>
-Date: Mon, 18 Mar 2019 15:23:07 +0100
-Subject: [PATCH] mssdemux: fix protection data double free
-
-For not being duplicated here it was being freed when the manifest was
-being destroyed and a second time when the buffer was being destroyed.
----
- ext/smoothstreaming/gstmssdemux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
-index 85f0ec89a..bcea8ca07 100644
---- a/ext/smoothstreaming/gstmssdemux.c
-+++ b/ext/smoothstreaming/gstmssdemux.c
-@@ -489,7 +489,7 @@ gst_mss_demux_setup_streams (GstAdaptiveDemux * demux)
-     if (protected) {
-       GstBuffer *protection_buffer =
--          gst_buffer_new_wrapped ((gpointer) protection_data,
-+          gst_buffer_new_wrapped (g_strdup (protection_data),
-           strlen (protection_data));
-       GstEvent *event =
-           gst_event_new_protection (protection_system_id, protection_buffer,
--- 
-2.20.1
-
diff --git a/Tools/gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch b/Tools/gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch
deleted file mode 100644 (file)
index 680bc2d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From 89d0e9cc92a86aa0227ee87406737b6d31670aea Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Wed, 18 Apr 2018 16:06:07 -0300
-Subject: [PATCH] parsebin: Post STREAM_COLLECTION on EVENT_STREAM_COLLECTION
-
-Otherwise decodebin won't get notified about STREAM_COLLECTION comming
-from the sources and thus will never get informored about it. Without
-being informed about the stream collection decodebin won't be able to
-select any streams. It ends up not creating any output for the streams
-defined from outside parserbin.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=795364
----
- gst/playback/gstparsebin.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gst/playback/gstparsebin.c b/gst/playback/gstparsebin.c
-index 4c5bfc19d..f9662eb49 100644
---- a/gst/playback/gstparsebin.c
-+++ b/gst/playback/gstparsebin.c
-@@ -4046,6 +4046,9 @@ gst_parse_pad_event (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
-       GstStreamCollection *collection = NULL;
-       gst_event_parse_stream_collection (event, &collection);
-       gst_parse_pad_update_stream_collection (parsepad, collection);
-+      gst_element_post_message (GST_ELEMENT (parsepad->parsebin),
-+          gst_message_new_stream_collection (GST_OBJECT (parsepad->parsebin),
-+              collection));
-       break;
-     }
-     case GST_EVENT_EOS:{
--- 
-2.17.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch b/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Detect-and-expose-CEA-608-708-Closed-Caption.patch
deleted file mode 100644 (file)
index 9886d10..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-From 2869edeea29a022007a99db2df41b5a7e1a3025c Mon Sep 17 00:00:00 2001
-From: Edward Hervey <edward@centricular.com>
-Date: Wed, 31 Jan 2018 15:10:03 +0100
-Subject: [PATCH] qtdemux: Detect and expose CEA 608/708 Closed Caption tracks
-
-https://bugzilla.gnome.org/show_bug.cgi?id=606643
----
- gst/isomp4/fourcc.h        |   6 ++
- gst/isomp4/qtdemux.c       | 151 ++++++++++++++++++++++++++++++++++++-
- gst/isomp4/qtdemux_types.c |   1 +
- 3 files changed, 156 insertions(+), 2 deletions(-)
-
-diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h
-index be5c7c04e..6f467ffbb 100644
---- a/gst/isomp4/fourcc.h
-+++ b/gst/isomp4/fourcc.h
-@@ -95,6 +95,12 @@ G_BEGIN_DECLS
- #define FOURCC_avc1     GST_MAKE_FOURCC('a','v','c','1')
- #define FOURCC_avc3     GST_MAKE_FOURCC('a','v','c','3')
- #define FOURCC_avcC     GST_MAKE_FOURCC('a','v','c','C')
-+#define FOURCC_c608     GST_MAKE_FOURCC('c','6','0','8')
-+#define FOURCC_c708     GST_MAKE_FOURCC('c','7','0','8')
-+#define FOURCC_ccdp     GST_MAKE_FOURCC('c','c','d','p')
-+#define FOURCC_cdat     GST_MAKE_FOURCC('c','d','a','t')
-+#define FOURCC_cdt2     GST_MAKE_FOURCC('c','d','t','2')
-+#define FOURCC_clcp     GST_MAKE_FOURCC('c','l','c','p')
- #define FOURCC_clip     GST_MAKE_FOURCC('c','l','i','p')
- #define FOURCC_cmov     GST_MAKE_FOURCC('c','m','o','v')
- #define FOURCC_cmvd     GST_MAKE_FOURCC('c','m','v','d')
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 79ef5f55b..f732e92b3 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -5370,6 +5370,120 @@ gst_qtdemux_align_buffer (GstQTDemux * demux,
-   return buffer;
- }
-+static guint8 *
-+convert_to_ccdata (const guint8 * ccpair, guint8 ccpair_size, guint field,
-+    gsize * res)
-+{
-+  guint8 *storage;
-+  gsize i;
-+
-+  /* We are converting from pairs to triplets */
-+  *res = ccpair_size / 2 * 3;
-+  storage = g_malloc (*res);
-+  for (i = 0; i * 2 < ccpair_size; i += 1) {
-+    if (field == 1)
-+      storage[i * 3] = 0xfc;
-+    else
-+      storage[i * 3] = 0xfd;
-+    storage[i * 3 + 1] = ccpair[i * 2];
-+    storage[i * 3 + 2] = ccpair[i * 2 + 1];
-+  }
-+
-+  return storage;
-+}
-+
-+static guint8 *
-+extract_cc_from_data (QtDemuxStream * stream, const guint8 * data, gsize size,
-+    gsize * cclen)
-+{
-+  guint8 *res = NULL;
-+  guint32 atom_length, fourcc;
-+  QtDemuxStreamStsdEntry *stsd_entry;
-+
-+  GST_MEMDUMP ("caption atom", data, size);
-+
-+  /* There might be multiple atoms */
-+
-+  *cclen = 0;
-+  if (size < 8)
-+    goto invalid_cdat;
-+  atom_length = QT_UINT32 (data);
-+  fourcc = QT_FOURCC (data + 4);
-+  if (G_UNLIKELY (atom_length > size || atom_length == 8))
-+    goto invalid_cdat;
-+
-+  GST_DEBUG_OBJECT (stream->pad, "here");
-+
-+  /* Check if we have somethig compatible */
-+  stsd_entry = CUR_STREAM (stream);
-+  switch (stsd_entry->fourcc) {
-+    case FOURCC_c608:{
-+      guint8 *cdat = NULL, *cdt2 = NULL;
-+      gsize cdat_size = 0, cdt2_size = 0;
-+      /* Should be cdat or cdt2 */
-+      if (fourcc != FOURCC_cdat && fourcc != FOURCC_cdt2) {
-+        GST_WARNING_OBJECT (stream->pad,
-+            "Unknown data atom (%" GST_FOURCC_FORMAT ") for CEA608",
-+            GST_FOURCC_ARGS (fourcc));
-+        goto invalid_cdat;
-+      }
-+      /* Convert to cc_data triplet */
-+      if (fourcc == FOURCC_cdat)
-+        cdat = convert_to_ccdata (data + 8, atom_length - 8, 1, &cdat_size);
-+      else
-+        cdt2 = convert_to_ccdata (data + 8, atom_length - 8, 2, &cdt2_size);
-+      GST_DEBUG_OBJECT (stream->pad, "size:%" G_GSIZE_FORMAT " atom_length:%u",
-+          size, atom_length);
-+      /* Check for another atom ? */
-+      if (size > atom_length + 8) {
-+        guint32 new_atom_length = QT_UINT32 (data + atom_length);
-+        if (size <= atom_length + new_atom_length) {
-+          fourcc = QT_FOURCC (data + atom_length + 4);
-+          if (fourcc == FOURCC_cdat)
-+            cdat =
-+                convert_to_ccdata (data + atom_length + 8, new_atom_length - 8,
-+                1, &cdat_size);
-+          else
-+            cdt2 =
-+                convert_to_ccdata (data + atom_length + 8, new_atom_length - 8,
-+                2, &cdt2_size);
-+        }
-+      }
-+      *cclen = cdat_size + cdt2_size;
-+      res = g_malloc (*cclen);
-+      if (cdat_size)
-+        memcpy (res, cdat, cdat_size);
-+      if (cdt2_size)
-+        memcpy (res + cdat_size, cdt2, cdt2_size);
-+      g_free (cdat);
-+      g_free (cdt2);
-+    }
-+      break;
-+    case FOURCC_c708:
-+      if (fourcc != FOURCC_ccdp) {
-+        GST_WARNING_OBJECT (stream->pad,
-+            "Unknown data atom (%" GST_FOURCC_FORMAT ") for CEA708",
-+            GST_FOURCC_ARGS (fourcc));
-+        goto invalid_cdat;
-+      }
-+      *cclen = atom_length - 8;
-+      res = g_memdup (data + 8, *cclen);
-+      break;
-+    default:
-+      /* Keep this here in case other closed caption formats are added */
-+      g_assert_not_reached ();
-+      break;
-+  }
-+
-+  GST_MEMDUMP ("Output", res, *cclen);
-+  return res;
-+
-+  /* Errors */
-+invalid_cdat:
-+  GST_WARNING ("[cdat] atom is too small or invalid");
-+  return NULL;
-+}
-+
- /* the input buffer metadata must be writable,
-  * but time/duration etc not yet set and need not be preserved */
- static GstBuffer *
-@@ -5390,7 +5504,7 @@ gst_qtdemux_process_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
-   if (G_UNLIKELY (stream->subtype != FOURCC_text
-           && stream->subtype != FOURCC_sbtl &&
--          stream->subtype != FOURCC_subp)) {
-+          stream->subtype != FOURCC_subp && stream->subtype != FOURCC_clcp)) {
-     return buf;
-   }
-@@ -5408,6 +5522,23 @@ gst_qtdemux_process_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
-     return buf;
-   }
-+  if (stream->subtype == FOURCC_clcp) {
-+    guint8 *cc;
-+    gsize cclen = 0;
-+    /* For closed caption, we need to extract the information from the
-+     * [cdat],[cdt2] or [ccdp] atom */
-+    cc = extract_cc_from_data (stream, map.data, map.size, &cclen);
-+    gst_buffer_unmap (buf, &map);
-+    gst_buffer_unref (buf);
-+    if (cc) {
-+      buf = _gst_buffer_new_wrapped (cc, cclen, g_free);
-+    } else {
-+      /* Conversion failed or there's nothing */
-+      buf = NULL;
-+    }
-+    return buf;
-+  }
-+
-   nsize = GST_READ_UINT16_BE (map.data);
-   nsize = MIN (nsize, map.size - 2);
-@@ -11557,7 +11688,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
-       }
-       entry->sampled = TRUE;
-     } else if (stream->subtype == FOURCC_subp || stream->subtype == FOURCC_text
--        || stream->subtype == FOURCC_sbtl || stream->subtype == FOURCC_subt) {
-+        || stream->subtype == FOURCC_sbtl || stream->subtype == FOURCC_subt
-+        || stream->subtype == FOURCC_clcp) {
-       entry->sampled = TRUE;
-       entry->sparse = TRUE;
-@@ -14548,6 +14680,21 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
-       _codec ("XML subtitles");
-       caps = gst_caps_new_empty_simple ("application/ttml+xml");
-       break;
-+    case FOURCC_c608:
-+      _codec ("CEA 608 Closed Caption");
-+      caps =
-+          gst_caps_new_simple ("closedcaption/x-cea-608", "format",
-+          G_TYPE_STRING, "cc_data", NULL);
-+      stream->need_process = TRUE;
-+      break;
-+    case FOURCC_c708:
-+      _codec ("CEA 708 Closed Caption");
-+      caps =
-+          gst_caps_new_simple ("closedcaption/x-cea-708", "format",
-+          G_TYPE_STRING, "cdp", NULL);
-+      stream->need_process = TRUE;
-+      break;
-+
-     default:
-     {
-       caps = _get_unknown_codec_name ("text", fourcc);
-diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c
-index 88db8c2ce..1d5840394 100644
---- a/gst/isomp4/qtdemux_types.c
-+++ b/gst/isomp4/qtdemux_types.c
-@@ -213,6 +213,7 @@ static const QtNodeType qt_node_types[] = {
-   {FOURCC_pssh, "protection system specific header", 0},
-   {FOURCC_tenc, "track encryption", 0},
-   {FOURCC_stpp, "XML subtitle sample entry", 0},
-+  {FOURCC_clcp, "Closed Caption", 0},
-   {0, "unknown", 0,},
- };
--- 
-2.18.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch b/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch
deleted file mode 100644 (file)
index 0b7ab97..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3e063703b3a51b8aaa7f75f36c4660c583a60e93 Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Fri, 25 May 2018 10:17:29 +0200
-Subject: [PATCH 1/3] qtdemux: Do not run the preferred decryptor context query
- if no decryptor avalaible
-
-Ultimately this avoids a segfault as the code expect a non NULL array
-here.
----
- gst/isomp4/qtdemux.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 3e8ce7860..ec4a8adfd 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -8056,6 +8056,13 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
-   g_ptr_array_add (qtdemux->protection_system_ids, NULL);
-   filtered_sys_ids = gst_protection_filter_systems_by_available_decryptors (
-       (const gchar **) qtdemux->protection_system_ids->pdata);
-+
-+  if (!filtered_sys_ids) {
-+    GST_INFO_OBJECT (element,
-+        "No avalaible decryptor, not worth asking the user to choose.");
-+    return;
-+  }
-+
-   g_ptr_array_remove_index (qtdemux->protection_system_ids,
-       qtdemux->protection_system_ids->len - 1);
-   GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have "
--- 
-2.17.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch b/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch
deleted file mode 100644 (file)
index ca4d12a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 43a540b1cd9f162d3dae5d50e36703dfaf558a3e Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Fri, 25 May 2018 10:49:21 +0200
-Subject: [PATCH 2/3] qtdemux: Do not unref a NULL stream_tags
-
-stream->stream_tags is reset to NULL once we expose the stream and
-these have been consumed, we need to check that when cleaning up
-the stream.
----
- gst/isomp4/qtdemux.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index ec4a8adfd..4116f4c69 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -2600,7 +2600,9 @@ gst_qtdemux_stream_clear (QtDemuxStream * stream)
-     entry->sparse = FALSE;
-   }
--  gst_tag_list_unref (stream->stream_tags);
-+  if (stream->stream_tags)
-+    gst_tag_list_unref (stream->stream_tags);
-+
-   stream->stream_tags = gst_tag_list_new_empty ();
-   gst_tag_list_set_scope (stream->stream_tags, GST_TAG_SCOPE_STREAM);
-   g_free (stream->redirect_uri);
--- 
-2.17.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch b/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch
deleted file mode 100644 (file)
index c265ab4..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-From 0ba62ba4805e2cdbed17fa9934762d685be42fd4 Mon Sep 17 00:00:00 2001
-From: Xabier Rodriguez Calvar <calvaris@igalia.com>
-Date: Wed, 21 Jun 2017 17:59:21 +0200
-Subject: [PATCH 2/7] qtdemux: add context for a preferred protection
-
-qtdemux selected the first system corresponding to a working GStreamer
-decryptor. With this change, before selecting that decryptor, qtdemux
-will check if it has context (a preferred decryptor id) and if not, it
-will request it.
-
-The request includes track-id, available key system ids for the
-available decryptors and even the events so that the init data is
-accessible.
-
-[eocanha@igalia.com: select the preferred protection system even if not available]
-
-Test "4. ClearKeyVideo" in YouTube leanback EME conformance tests 2016 for
-H.264[1] uses a media file[2] with cenc encryption which embeds 'pssh' boxes
-with the init data for the Playready and Widevine encryption systems, but not
-for the ClearKey encryption system (as defined by the EMEv0.1b spec[3] and with
-the encryption system id defined in [4]).
-
-Instead, the ClearKey encryption system is manually selected by the web page
-code (even if not originally detected by qtdemux) and the proper decryption key
-is dispatched to the decryptor, which can then decrypt the video successfully.
-
-[1] http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2016.html?test_type=encryptedmedia-test&webm=false
-[2] http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/media/car_cenc-20120827-86.mp4
-[3] https://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html#simple-decryption-clear-key
-[4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=24027#c2
-
-https://bugzilla.gnome.org/show_bug.cgi?id=770107
----
- gst/isomp4/qtdemux.c | 200 +++++++++++++++++++++++++++++++++++++++++--
- gst/isomp4/qtdemux.h |   1 +
- 2 files changed, 195 insertions(+), 6 deletions(-)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 705bdf7ca..da22463f8 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -511,6 +511,8 @@ static GstIndex *gst_qtdemux_get_index (GstElement * element);
- #endif
- static GstStateChangeReturn gst_qtdemux_change_state (GstElement * element,
-     GstStateChange transition);
-+static void gst_qtdemux_set_context (GstElement * element,
-+    GstContext * context);
- static gboolean qtdemux_sink_activate (GstPad * sinkpad, GstObject * parent);
- static gboolean qtdemux_sink_activate_mode (GstPad * sinkpad,
-     GstObject * parent, GstPadMode mode, gboolean active);
-@@ -600,6 +602,7 @@ gst_qtdemux_class_init (GstQTDemuxClass * klass)
-   gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_qtdemux_set_index);
-   gstelement_class->get_index = GST_DEBUG_FUNCPTR (gst_qtdemux_get_index);
- #endif
-+  gstelement_class->set_context = GST_DEBUG_FUNCPTR (gst_qtdemux_set_context);
-   gst_tag_register_musicbrainz_tags ();
-@@ -658,6 +661,7 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
-   qtdemux->cenc_aux_info_sizes = NULL;
-   qtdemux->cenc_aux_sample_count = 0;
-   qtdemux->protection_system_ids = NULL;
-+  qtdemux->preferred_protection_system_id = NULL;
-   g_queue_init (&qtdemux->protection_event_queue);
-   gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
-   qtdemux->tag_list = gst_tag_list_new_empty ();
-@@ -2121,6 +2125,10 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
-       g_ptr_array_free (qtdemux->protection_system_ids, TRUE);
-       qtdemux->protection_system_ids = NULL;
-     }
-+    if (qtdemux->preferred_protection_system_id) {
-+      g_free (qtdemux->preferred_protection_system_id);
-+      qtdemux->preferred_protection_system_id = NULL;
-+    }
-   } else if (qtdemux->mss_mode) {
-     gst_flow_combiner_reset (qtdemux->flowcombiner);
-     for (n = 0; n < qtdemux->n_streams; n++)
-@@ -2606,6 +2614,28 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
-   return result;
- }
-+static void
-+gst_qtdemux_set_context (GstElement * element, GstContext * context)
-+{
-+  GstQTDemux *qtdemux = GST_QTDEMUX (element);
-+
-+  g_return_if_fail (GST_IS_CONTEXT (context));
-+
-+  if (gst_context_has_context_type (context,
-+          "drm-preferred-decryption-system-id")) {
-+    const GstStructure *s;
-+
-+    s = gst_context_get_structure (context);
-+    g_free (qtdemux->preferred_protection_system_id);
-+    qtdemux->preferred_protection_system_id =
-+        g_strdup (gst_structure_get_string (s, "decryption-system-id"));
-+    GST_DEBUG_OBJECT (element, "set preferred decryption system to %s",
-+        qtdemux->preferred_protection_system_id);
-+  }
-+
-+  GST_ELEMENT_CLASS (parent_class)->set_context (element, context);
-+}
-+
- static void
- qtdemux_parse_ftyp (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
- {
-@@ -3847,6 +3877,8 @@ qtdemux_parse_pssh (GstQTDemux * qtdemux, GNode * node)
-   event = gst_event_new_protection (sysid_string, pssh,
-       (parent_box_type == FOURCC_moov) ? "isobmff/moov" : "isobmff/moof");
-   for (i = 0; i < qtdemux->n_streams; ++i) {
-+    GST_TRACE_OBJECT (qtdemux,
-+        "adding protection event for stream %d and system %s", i, sysid_string);
-     g_queue_push_tail (&qtdemux->streams[i]->protection_scheme_event_queue,
-         gst_event_ref (event));
-   }
-@@ -5563,6 +5595,8 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
-     GstEvent *event;
-     while ((event = g_queue_pop_head (&stream->protection_scheme_event_queue))) {
-+      GST_TRACE_OBJECT (stream->pad, "pushing protection event: %"
-+          GST_PTR_FORMAT, event);
-       gst_pad_push_event (stream->pad, event);
-     }
-@@ -7756,12 +7790,142 @@ qtdemux_do_allocation (GstQTDemux * qtdemux, QtDemuxStream * stream)
- #endif
- }
-+static gboolean
-+pad_query (const GValue * item, GValue * value, gpointer user_data)
-+{
-+  GstPad *pad = g_value_get_object (item);
-+  GstQuery *query = user_data;
-+  gboolean res;
-+
-+  res = gst_pad_peer_query (pad, query);
-+
-+  if (res) {
-+    g_value_set_boolean (value, TRUE);
-+    return FALSE;
-+  }
-+
-+  GST_INFO_OBJECT (pad, "pad peer query failed");
-+  return TRUE;
-+}
-+
-+static gboolean
-+gst_qtdemux_run_query (GstElement * element, GstQuery * query,
-+    GstPadDirection direction)
-+{
-+  GstIterator *it;
-+  GstIteratorFoldFunction func = pad_query;
-+  GValue res = { 0, };
-+
-+  g_value_init (&res, G_TYPE_BOOLEAN);
-+  g_value_set_boolean (&res, FALSE);
-+
-+  /* Ask neighbor */
-+  if (direction == GST_PAD_SRC)
-+    it = gst_element_iterate_src_pads (element);
-+  else
-+    it = gst_element_iterate_sink_pads (element);
-+
-+  while (gst_iterator_fold (it, func, &res, query) == GST_ITERATOR_RESYNC)
-+    gst_iterator_resync (it);
-+
-+  gst_iterator_free (it);
-+
-+  return g_value_get_boolean (&res);
-+}
-+
-+static void
-+gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
-+    QtDemuxStream * stream)
-+{
-+  GstQuery *query;
-+  GstContext *ctxt;
-+  GstElement *element = GST_ELEMENT (qtdemux);
-+  GstStructure *st;
-+  gchar **filtered_sys_ids;
-+  GValue event_list = G_VALUE_INIT;
-+  GList *walk;
-+
-+  /* 1. Check if we already have the context. */
-+  if (qtdemux->preferred_protection_system_id != NULL) {
-+    GST_LOG_OBJECT (element,
-+        "already have the protection context, no need to request it again");
-+    return;
-+  }
-+
-+  g_ptr_array_add (qtdemux->protection_system_ids, NULL);
-+  filtered_sys_ids = gst_protection_filter_systems_by_available_decryptors (
-+      (const gchar **) qtdemux->protection_system_ids->pdata);
-+  g_ptr_array_remove_index (qtdemux->protection_system_ids,
-+      qtdemux->protection_system_ids->len - 1);
-+  GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have "
-+      "decryptors for %u of them, running context request",
-+      qtdemux->protection_system_ids->len, g_strv_length (filtered_sys_ids));
-+
-+  if (stream->protection_scheme_event_queue.length) {
-+    GST_TRACE_OBJECT (qtdemux, "using stream event queue, length %u",
-+        stream->protection_scheme_event_queue.length);
-+    walk = stream->protection_scheme_event_queue.tail;
-+  } else {
-+    GST_TRACE_OBJECT (qtdemux, "using demuxer event queue, length %u",
-+        qtdemux->protection_event_queue.length);
-+    walk = qtdemux->protection_event_queue.tail;
-+  }
-+
-+  g_value_init (&event_list, GST_TYPE_LIST);
-+  for (; walk; walk = g_list_previous (walk)) {
-+    GValue *event_value = g_new0 (GValue, 1);
-+    g_value_init (event_value, GST_TYPE_EVENT);
-+    g_value_set_boxed (event_value, walk->data);
-+    gst_value_list_append_and_take_value (&event_list, event_value);
-+  }
-+
-+  /*  2a) Query downstream with GST_QUERY_CONTEXT for the context and
-+   *      check if downstream already has a context of the specific type
-+   *  2b) Query upstream as above.
-+   */
-+  query = gst_query_new_context ("drm-preferred-decryption-system-id");
-+  st = gst_query_writable_structure (query);
-+  gst_structure_set (st, "track-id", G_TYPE_UINT, stream->track_id,
-+      "stream-encryption-systems", G_TYPE_STRV, filtered_sys_ids, NULL);
-+  gst_structure_set_value (st, "stream-encryption-events", &event_list);
-+  if (gst_qtdemux_run_query (element, query, GST_PAD_SRC)) {
-+    gst_query_parse_context (query, &ctxt);
-+    GST_INFO_OBJECT (element, "found context (%p) in downstream query", ctxt);
-+    gst_element_set_context (element, ctxt);
-+  } else if (gst_qtdemux_run_query (element, query, GST_PAD_SINK)) {
-+    gst_query_parse_context (query, &ctxt);
-+    GST_INFO_OBJECT (element, "found context (%p) in upstream query", ctxt);
-+    gst_element_set_context (element, ctxt);
-+  } else {
-+    /* 3) Post a GST_MESSAGE_NEED_CONTEXT message on the bus with
-+     *    the required context type and afterwards check if a
-+     *    usable context was set now as in 1). The message could
-+     *    be handled by the parent bins of the element and the
-+     *    application.
-+     */
-+    GstMessage *msg;
-+
-+    GST_INFO_OBJECT (element, "posting need context message");
-+    msg = gst_message_new_need_context (GST_OBJECT_CAST (element),
-+        "drm-preferred-decryption-system-id");
-+    st = (GstStructure *) gst_message_get_structure (msg);
-+    gst_structure_set (st, "track-id", G_TYPE_UINT, stream->track_id,
-+        "stream-encryption-systems", G_TYPE_STRV, filtered_sys_ids, NULL);
-+    gst_structure_set_value (st, "stream-encryption-events", &event_list);
-+    gst_element_post_message (element, msg);
-+  }
-+
-+  g_strfreev (filtered_sys_ids);
-+  g_value_unset (&event_list);
-+  gst_query_unref (query);
-+}
-+
- static gboolean
- gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux,
-     QtDemuxStream * stream)
- {
-   GstStructure *s;
--  const gchar *selected_system;
-+  const gchar *selected_system = NULL;
-   g_return_val_if_fail (qtdemux != NULL, FALSE);
-   g_return_val_if_fail (stream != NULL, FALSE);
-@@ -7777,17 +7941,41 @@ gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux,
-         "cenc protection system information has been found");
-     return FALSE;
-   }
--  g_ptr_array_add (qtdemux->protection_system_ids, NULL);
--  selected_system = gst_protection_select_system ((const gchar **)
--      qtdemux->protection_system_ids->pdata);
--  g_ptr_array_remove_index (qtdemux->protection_system_ids,
--      qtdemux->protection_system_ids->len - 1);
-+
-+  gst_qtdemux_request_protection_context (qtdemux, stream);
-+  if (qtdemux->preferred_protection_system_id != NULL) {
-+    const gchar *preferred_system_array[] =
-+        { qtdemux->preferred_protection_system_id, NULL };
-+
-+    selected_system = gst_protection_select_system (preferred_system_array);
-+
-+    if (selected_system) {
-+      GST_TRACE_OBJECT (qtdemux, "selected preferred system %s",
-+          qtdemux->preferred_protection_system_id);
-+    } else {
-+      GST_WARNING_OBJECT (qtdemux, "could not select preferred system %s "
-+          "because there is no available decryptor",
-+          qtdemux->preferred_protection_system_id);
-+    }
-+  }
-+
-+  if (!selected_system) {
-+    g_ptr_array_add (qtdemux->protection_system_ids, NULL);
-+    selected_system = gst_protection_select_system ((const gchar **)
-+        qtdemux->protection_system_ids->pdata);
-+    g_ptr_array_remove_index (qtdemux->protection_system_ids,
-+        qtdemux->protection_system_ids->len - 1);
-+  }
-+
-   if (!selected_system) {
-     GST_ERROR_OBJECT (qtdemux, "stream is protected, but no "
-         "suitable decryptor element has been found");
-     return FALSE;
-   }
-+  GST_DEBUG_OBJECT (qtdemux, "selected protection system is %s",
-+      selected_system);
-+
-   s = gst_caps_get_structure (CUR_STREAM (stream)->caps, 0);
-   if (!gst_structure_has_name (s, "application/x-cenc")) {
-     gst_structure_set (s,
-diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h
-index ad4da3ef2..079372356 100644
---- a/gst/isomp4/qtdemux.h
-+++ b/gst/isomp4/qtdemux.h
-@@ -151,6 +151,7 @@ struct _GstQTDemux {
-   guint64 cenc_aux_info_offset;
-   guint8 *cenc_aux_info_sizes;
-   guint32 cenc_aux_sample_count;
-+  gchar *preferred_protection_system_id;
-   /*
--- 
-2.17.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch b/Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch
deleted file mode 100644 (file)
index 3dd6bec..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 0fbde2a07928ba79b7a4ddb4585f6b1de36a74bb Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Fri, 25 May 2018 12:28:04 +0200
-Subject: [PATCH] qtdemux: Clarify field name about stream-encryption-system
-
-This field is actually only informatory and the user can potentially
-choose something else. EME tests in WebKit testsuite actually doesn't
-take it into and force another encryption system to be used, and expects
-to be given the occasion to do so.
-
-This basically also reverts 3e063703b3a51b8aaa7f75f36c4660c583a60e93.
----
- gst/isomp4/qtdemux.c | 13 +++++--------
- 1 file changed, 5 insertions(+), 8 deletions(-)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index bd3a00ccf..515687353 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -8096,12 +8096,6 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
-   filtered_sys_ids = gst_protection_filter_systems_by_available_decryptors (
-       (const gchar **) qtdemux->protection_system_ids->pdata);
--  if (!filtered_sys_ids) {
--    GST_INFO_OBJECT (element,
--        "No avalaible decryptor, not worth asking the user to choose.");
--    return;
--  }
--
-   g_ptr_array_remove_index (qtdemux->protection_system_ids,
-       qtdemux->protection_system_ids->len - 1);
-   GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have "
-@@ -8133,7 +8127,8 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
-   query = gst_query_new_context ("drm-preferred-decryption-system-id");
-   st = gst_query_writable_structure (query);
-   gst_structure_set (st, "track-id", G_TYPE_UINT, stream->track_id,
--      "stream-encryption-systems", G_TYPE_STRV, filtered_sys_ids, NULL);
-+      "available-stream-encryption-systems", G_TYPE_STRV, filtered_sys_ids,
-+      NULL);
-   gst_structure_set_value (st, "stream-encryption-events", &event_list);
-   if (gst_qtdemux_run_query (element, query, GST_PAD_SRC)) {
-     gst_query_parse_context (query, &ctxt);
-@@ -8157,7 +8152,9 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
-         "drm-preferred-decryption-system-id");
-     st = (GstStructure *) gst_message_get_structure (msg);
-     gst_structure_set (st, "track-id", G_TYPE_UINT, stream->track_id,
--        "stream-encryption-systems", G_TYPE_STRV, filtered_sys_ids, NULL);
-+        "available-stream-encryption-systems", G_TYPE_STRV, filtered_sys_ids,
-+        NULL);
-+
-     gst_structure_set_value (st, "stream-encryption-events", &event_list);
-     gst_element_post_message (element, msg);
-   }
--- 
-2.17.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch b/Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch
deleted file mode 100644 (file)
index d17df69..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-From 762e9c645ec13513c62eb5a3800d7406e01cdcb7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
-Date: Mon, 24 Apr 2017 17:22:02 +0000
-Subject: [PATCH 3/7] qtdemux: also push buffers without encryption info
- instead of dropping them
-
----
- gst/isomp4/qtdemux.c | 39 +++++++++++++++++++--------------------
- 1 file changed, 19 insertions(+), 20 deletions(-)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index da22463f8..8e9f5b9ae 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -5600,26 +5600,25 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
-       gst_pad_push_event (stream->pad, event);
-     }
--    if (info->crypto_info == NULL) {
--      GST_DEBUG_OBJECT (qtdemux, "cenc metadata hasn't been parsed yet");
--      gst_buffer_unref (buf);
--      goto exit;
--    }
--
--    /* The end of the crypto_info array matches our n_samples position,
--     * so count backward from there */
--    index = stream->sample_index - stream->n_samples + info->crypto_info->len;
--    if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) {
--      /* steal structure from array */
--      crypto_info = g_ptr_array_index (info->crypto_info, index);
--      g_ptr_array_index (info->crypto_info, index) = NULL;
--      GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u/%u]", index,
--          info->crypto_info->len);
--      if (!crypto_info || !gst_buffer_add_protection_meta (buf, crypto_info))
--        GST_ERROR_OBJECT (qtdemux, "failed to attach cenc metadata to buffer");
--    } else {
--      GST_INFO_OBJECT (qtdemux, "No crypto info with index %d and sample %d",
--          index, stream->sample_index);
-+
-+    if (info->crypto_info == NULL)
-+      GST_DEBUG_OBJECT (qtdemux, "cenc metadata hasn't been parsed yet, pushing buffer as if it wasn't encrypted");
-+    else {
-+      /* The end of the crypto_info array matches our n_samples position,
-+       * so count backward from there */
-+      index = stream->sample_index - stream->n_samples + info->crypto_info->len;
-+      if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) {
-+        /* steal structure from array */
-+        crypto_info = g_ptr_array_index (info->crypto_info, index);
-+        g_ptr_array_index (info->crypto_info, index) = NULL;
-+        GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u/%u]", index,
-+            info->crypto_info->len);
-+        if (!crypto_info || !gst_buffer_add_protection_meta (buf, crypto_info))
-+          GST_ERROR_OBJECT (qtdemux, "failed to attach cenc metadata to buffer");
-+      } else {
-+        GST_INFO_OBJECT (qtdemux, "No crypto info with index %d and sample %d",
-+            index, stream->sample_index);
-+      }
-     }
-   }
--- 
-2.17.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch b/Tools/gstreamer/patches/gst-plugins-good-0004-qtdemux-Add-initial-support-for-AV1-demuxing.patch
deleted file mode 100644 (file)
index 3f2b497..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-From b6e8c6323e01249bb3ac4f121c3adc3ea8d924bf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete@collabora.com>
-Date: Wed, 25 Jul 2018 10:43:11 -0400
-Subject: [PATCH] qtdemux: Add initial support for AV1 demuxing
-
-Following the spec at
-https://aomediacodec.github.io/av1-isobmff/
----
- gst/isomp4/fourcc.h        |  1 +
- gst/isomp4/qtdemux.c       |  4 ++++
- gst/isomp4/qtdemux_dump.c  | 49 ++++++++++++++++++++++++++++++++++++++
- gst/isomp4/qtdemux_types.c |  1 +
- 4 files changed, 55 insertions(+)
-
-diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h
-index 6f467ffbb..c06b69418 100644
---- a/gst/isomp4/fourcc.h
-+++ b/gst/isomp4/fourcc.h
-@@ -264,6 +264,7 @@ G_BEGIN_DECLS
- #define FOURCC_wide     GST_MAKE_FOURCC('w','i','d','e')
- #define FOURCC_zlib     GST_MAKE_FOURCC('z','l','i','b')
- #define FOURCC_lpcm     GST_MAKE_FOURCC('l','p','c','m')
-+#define FOURCC_av01     GST_MAKE_FOURCC('a','v','0','1')
- #define FOURCC_cfhd     GST_MAKE_FOURCC('C','F','H','D')
- #define FOURCC_ap4x     GST_MAKE_FOURCC('a','p','4','x')
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 3efb5ba9d..7a682833f 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -14651,6 +14651,10 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
-       caps = gst_caps_new_simple ("video/x-wmv",
-           "wmvversion", G_TYPE_INT, 3, "format", G_TYPE_STRING, "WVC1", NULL);
-       break;
-+    case FOURCC_av01:
-+      _codec ("AV1");
-+      caps = gst_caps_new_empty_simple ("video/x-av1");
-+      break;
-     case GST_MAKE_FOURCC ('k', 'p', 'c', 'd'):
-     default:
-     {
-diff --git a/gst/isomp4/qtdemux_dump.c b/gst/isomp4/qtdemux_dump.c
-index 5ff2e9288..25921dfe2 100644
---- a/gst/isomp4/qtdemux_dump.c
-+++ b/gst/isomp4/qtdemux_dump.c
-@@ -303,6 +303,51 @@ qtdemux_dump_stsd_avc1 (GstQTDemux * qtdemux, GstByteReader * data, guint size,
-   return TRUE;
- }
-+
-+static gboolean
-+qtdemux_dump_stsd_av01 (GstQTDemux * qtdemux, GstByteReader * data, guint size,
-+    int depth)
-+{
-+  guint compressor_len;
-+  char compressor_name[32];
-+
-+  /* Size of av01 = 78 bytes */
-+  if (size < (6 + 2 + 4 + 12 + 2 + 2 + 4 + 4 + 4 + 2 + 1 + 31 + 2 + 2))
-+    return FALSE;
-+
-+  gst_byte_reader_skip_unchecked (data, 6);
-+  GST_LOG_OBJECT (qtdemux, "%*s    data reference:%d", depth, "",
-+      GET_UINT16 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    version/rev.:  %08x", depth, "",
-+      GET_UINT32 (data));
-+  gst_byte_reader_skip_unchecked (data, 12);    /* pre-defined & reserved */
-+  GST_LOG_OBJECT (qtdemux, "%*s    width:         %u", depth, "",
-+      GET_UINT16 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    height:        %u", depth, "",
-+      GET_UINT16 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    horiz. resol:  %g", depth, "",
-+      GET_FP32 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    vert. resol.:  %g", depth, "",
-+      GET_FP32 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    data size:     %u", depth, "",
-+      GET_UINT32 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    frame count:   %u", depth, "",
-+      GET_UINT16 (data));
-+  /* something is not right with this, it's supposed to be a string but it's
-+   * not apparently, so just skip this for now */
-+  compressor_len = MAX (GET_UINT8 (data), 31);
-+  memcpy (compressor_name, gst_byte_reader_get_data_unchecked (data, 31), 31);
-+  compressor_name[compressor_len] = 0;
-+  GST_LOG_OBJECT (qtdemux, "%*s    compressor:    %s", depth, "",
-+      compressor_name);
-+  GST_LOG_OBJECT (qtdemux, "%*s    depth:         %u", depth, "",
-+      GET_UINT16 (data));
-+  GST_LOG_OBJECT (qtdemux, "%*s    color table ID:%u", depth, "",
-+      GET_UINT16 (data));
-+
-+  return TRUE;
-+}
-+
- gboolean
- qtdemux_dump_stsd (GstQTDemux * qtdemux, GstByteReader * data, int depth)
- {
-@@ -353,6 +398,10 @@ qtdemux_dump_stsd (GstQTDemux * qtdemux, GstByteReader * data, int depth)
-         if (!qtdemux_dump_unknown (qtdemux, &sub, depth + 1))
-           return FALSE;
-         break;
-+      case FOURCC_av01:
-+        if (!qtdemux_dump_stsd_av01 (qtdemux, &sub, size, depth + 1))
-+          return FALSE;
-+        break;
-       default:
-         /* Unknown stsd data, dump the bytes */
-         if (!qtdemux_dump_unknown (qtdemux, &sub, depth + 1))
-diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c
-index 1d5840394..68f98bd45 100644
---- a/gst/isomp4/qtdemux_types.c
-+++ b/gst/isomp4/qtdemux_types.c
-@@ -214,6 +214,7 @@ static const QtNodeType qt_node_types[] = {
-   {FOURCC_tenc, "track encryption", 0},
-   {FOURCC_stpp, "XML subtitle sample entry", 0},
-   {FOURCC_clcp, "Closed Caption", 0},
-+  {FOURCC_av01, "AV1 Sample Entry", 0},
-   {0, "unknown", 0,},
- };
--- 
-2.18.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch b/Tools/gstreamer/patches/gst-plugins-good-0005-qtdemux-Extract-AV1-codec_data-and-put-it-in-the-cap.patch
deleted file mode 100644 (file)
index 66b323e..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-From 43ee4055c3d03a9f99acdf3c05f45e154899edef Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete@collabora.com>
-Date: Wed, 25 Jul 2018 14:31:39 -0400
-Subject: [PATCH] qtdemux: Extract AV1 codec_data and put it in the caps
-
-Also extract the presentation-delay and put it in the caps.
----
- gst/isomp4/fourcc.h  |  1 +
- gst/isomp4/qtdemux.c | 75 ++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 76 insertions(+)
-
-diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h
-index c06b69418..e18e6c2c9 100644
---- a/gst/isomp4/fourcc.h
-+++ b/gst/isomp4/fourcc.h
-@@ -265,6 +265,7 @@ G_BEGIN_DECLS
- #define FOURCC_zlib     GST_MAKE_FOURCC('z','l','i','b')
- #define FOURCC_lpcm     GST_MAKE_FOURCC('l','p','c','m')
- #define FOURCC_av01     GST_MAKE_FOURCC('a','v','0','1')
-+#define FOURCC_av1C     GST_MAKE_FOURCC('a','v','1','C')
- #define FOURCC_cfhd     GST_MAKE_FOURCC('C','F','H','D')
- #define FOURCC_ap4x     GST_MAKE_FOURCC('a','p','4','x')
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 7a682833f..d1ce320b8 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -11187,6 +11187,81 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
-             }
-             break;
-           }
-+          case FOURCC_av01:
-+          {
-+            gint len = QT_UINT32 (stsd_entry_data) - 0x56;
-+            const guint8 *av1_data = stsd_entry_data + 0x56;
-+
-+            /* find av1C */
-+            while (len >= 0x8) {
-+              gint size;
-+
-+              if (QT_UINT32 (av1_data) <= len)
-+                size = QT_UINT32 (av1_data) - 0x8;
-+              else
-+                size = len - 0x8;
-+
-+              if (size < 1)
-+                /* No real data, so break out */
-+                break;
-+
-+              switch (QT_FOURCC (av1_data + 0x4)) {
-+                case FOURCC_av1C:
-+                {
-+                  /* parse, if found */
-+                  GstBuffer *buf;
-+                  guint8 pres_delay_field;
-+
-+                  GST_DEBUG_OBJECT (qtdemux,
-+                      "found av1C codec_data in stsd of size %d", size);
-+
-+                  /* not enough data, just ignore and hope for the best */
-+                  if (size < 5)
-+                    break;
-+
-+                  /* Content is:
-+                   * 4 bytes: atom length
-+                   * 4 bytes: fourcc
-+                   * 1 byte: version
-+                   * 3 bytes: flags
-+                   * 3 bits: reserved
-+                   * 1 bits:  initial_presentation_delay_present
-+                   * 4 bits: initial_presentation_delay (if present else reserved
-+                   * rest: OBUs.
-+                   */
-+
-+                  if (av1_data[9] != 0) {
-+                    GST_WARNING ("Unknown version %d of av1C box", av1_data[9]);
-+                    break;
-+                  }
-+
-+                  /* We skip initial_presentation_delay* for now */
-+                  pres_delay_field = *(av1_data + 12);
-+                  if (pres_delay_field & (1 << 5)) {
-+                    gst_caps_set_simple (entry->caps,
-+                        "presentation-delay", G_TYPE_INT,
-+                        (gint) (pres_delay_field & 0x0F) + 1, NULL);
-+                  }
-+                  if (size > 5) {
-+                    buf = gst_buffer_new_and_alloc (size - 5);
-+                    GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
-+                    gst_buffer_fill (buf, 0, av1_data + 13, size - 5);
-+                    gst_caps_set_simple (entry->caps,
-+                        "codec_data", GST_TYPE_BUFFER, buf, NULL);
-+                    gst_buffer_unref (buf);
-+                  }
-+                  break;
-+                }
-+                default:
-+                  break;
-+              }
-+
-+              len -= size + 8;
-+              av1_data += size + 8;
-+            }
-+
-+            break;
-+          }
-           default:
-             break;
-         }
--- 
-2.18.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch b/Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-Recognize-more-AV1-atoms.patch
deleted file mode 100644 (file)
index fd57574..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From e07ce9afb4edb2ea898763c7ea11f0af2704104e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete@collabora.com>
-Date: Wed, 25 Jul 2018 16:51:38 -0400
-Subject: [PATCH] qtdemux: Recognize more AV1 atoms
-
----
- gst/isomp4/fourcc.h        | 4 ++++
- gst/isomp4/qtdemux_types.c | 5 +++++
- 2 files changed, 9 insertions(+)
-
-diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h
-index e18e6c2c9..6c425e6f9 100644
---- a/gst/isomp4/fourcc.h
-+++ b/gst/isomp4/fourcc.h
-@@ -266,6 +266,10 @@ G_BEGIN_DECLS
- #define FOURCC_lpcm     GST_MAKE_FOURCC('l','p','c','m')
- #define FOURCC_av01     GST_MAKE_FOURCC('a','v','0','1')
- #define FOURCC_av1C     GST_MAKE_FOURCC('a','v','1','C')
-+#define FOURCC_av1f     GST_MAKE_FOURCC('a','v','1','f')
-+#define FOURCC_av1m     GST_MAKE_FOURCC('a','v','1','m')
-+#define FOURCC_av1s     GST_MAKE_FOURCC('a','v','1','s')
-+#define FOURCC_av1M     GST_MAKE_FOURCC('a','v','1','M')
- #define FOURCC_cfhd     GST_MAKE_FOURCC('C','F','H','D')
- #define FOURCC_ap4x     GST_MAKE_FOURCC('a','p','4','x')
-diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c
-index 68f98bd45..9ab2e7e3e 100644
---- a/gst/isomp4/qtdemux_types.c
-+++ b/gst/isomp4/qtdemux_types.c
-@@ -215,6 +215,11 @@ static const QtNodeType qt_node_types[] = {
-   {FOURCC_stpp, "XML subtitle sample entry", 0},
-   {FOURCC_clcp, "Closed Caption", 0},
-   {FOURCC_av01, "AV1 Sample Entry", 0},
-+  {FOURCC_av1C, "AV1 Codec Configuration", 0},
-+  {FOURCC_av1f, "AV1 Forward Key Frame sample group entry", 0},
-+  {FOURCC_av1m, "AV1 Multi-Frame sample group entry", 0},
-+  {FOURCC_av1s, "AV1 S-Frame sample group entry", 0},
-+  {FOURCC_av1M, "AV1 Metadata sample group entry", 0},
-   {0, "unknown", 0,},
- };
--- 
-2.18.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch b/Tools/gstreamer/patches/gst-plugins-good-0011-matroska-Add-the-WebM-encrypted-content-support-in-m.patch
deleted file mode 100644 (file)
index 8d30bdc..0000000
+++ /dev/null
@@ -1,842 +0,0 @@
-From 69d896a02acef5cda9d727f46818bf0221fb82eb Mon Sep 17 00:00:00 2001
-From: Yacine Bandou <yacine.bandou@softathome.com>
-Date: Sun, 30 Sep 2018 19:28:07 +0200
-Subject: [PATCH] matroska: Add the WebM encrypted content support in
- matroskademux
-
-This commit:
-
-1. Reads the WebM and Matroska ContentEncryption subelements.
-
-2. Creates a GST_PROTECTION event for each ContentEncryption, which
-   will be sent before pushing the first source buffer.
-   The DRM system id field in this event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID,
-   because it isn't specified neither by Matroska nor by the WebM spec.
-
-3. Reads the protection information of encrypted Block/SimpleBlock and
-   extracts the IV and the partitioning format (subsamples).
-
-4. Creates the metadata protection for each encrypted Block/SimpleBlock,
-   with those informations: KeyID (extracted from ContentEncryption element),
-   IV and partitioning format.
-
-5. Adds a new caps for WebM encrypted content named "application/x-webm-enc",
-   with the following new fields:
-
-   "encryption-algorithm": The encryption algorithm used.
-                           values: "None", "DES", "3DES", "Twofish", "Blowfish", "AES".
-
-   "encoding-scope": The field that describes which Elements have been modified.
-                     Values: "frame", "codec-data", "next-content".
-
-   "cipher-mode": The cipher mode used in the encryption.
-                  Values: "None", "CTR".
-
-https://bugzilla.gnome.org/show_bug.cgi?id=765275
----
- gst/matroska/matroska-demux.c       | 122 ++++++++++++-
- gst/matroska/matroska-ids.c         |  73 ++++++++
- gst/matroska/matroska-ids.h         |  53 ++++++
- gst/matroska/matroska-read-common.c | 354 ++++++++++++++++++++++++++++++++++--
- gst/matroska/matroska-read-common.h |   3 +
- 5 files changed, 586 insertions(+), 19 deletions(-)
-
-diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
-index 683380bbf..1ef7b42cc 100644
---- a/gst/matroska/matroska-demux.c
-+++ b/gst/matroska/matroska-demux.c
-@@ -173,6 +173,9 @@ static GstCaps *gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext
- static GstCaps
-     * gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext *
-     subtitlecontext, const gchar * codec_id, gpointer data, guint size);
-+static const gchar *gst_matroska_track_encryption_algorithm_name (gint val);
-+static const gchar *gst_matroska_track_encryption_cipher_mode_name (gint val);
-+static const gchar *gst_matroska_track_encoding_scope_name (gint val);
- /* stream methods */
- static void gst_matroska_demux_reset (GstElement * element);
-@@ -359,12 +362,13 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
-   GstMapInfo map;
-   gpointer data;
-   gsize size;
-+  GstBuffer *out_buf = buf;
-   g_return_val_if_fail (GST_IS_BUFFER (buf), NULL);
-   GST_DEBUG ("decoding buffer %p", buf);
--  gst_buffer_map (buf, &map, GST_MAP_READ);
-+  gst_buffer_map (out_buf, &map, GST_MAP_READ);
-   data = map.data;
-   size = map.size;
-@@ -372,15 +376,53 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
-   if (gst_matroska_decode_data (context->encodings, &data, &size,
-           GST_MATROSKA_TRACK_ENCODING_SCOPE_FRAME, FALSE)) {
--    gst_buffer_unmap (buf, &map);
--    gst_buffer_unref (buf);
--    return gst_buffer_new_wrapped (data, size);
-+    gst_buffer_unmap (out_buf, &map);
-+    if (data != map.data) {
-+      gst_buffer_unref (out_buf);
-+      out_buf = gst_buffer_new_wrapped (data, size);
-+    }
-   } else {
-     GST_DEBUG ("decode data failed");
--    gst_buffer_unmap (buf, &map);
--    gst_buffer_unref (buf);
-+    gst_buffer_unmap (out_buf, &map);
-+    gst_buffer_unref (out_buf);
-     return NULL;
-   }
-+  /* Encrypted stream */
-+  if (context->protection_info) {
-+
-+    GstStructure *info_protect = gst_structure_copy (context->protection_info);
-+    gboolean encrypted = FALSE;
-+
-+    gst_buffer_map (out_buf, &map, GST_MAP_READ);
-+    data = map.data;
-+    size = map.size;
-+
-+    if (gst_matroska_parse_protection_meta (&data, &size, info_protect,
-+            &encrypted)) {
-+      gst_buffer_unmap (out_buf, &map);
-+      if (data != map.data) {
-+        GstBuffer *tmp_buf = out_buf;
-+        out_buf =
-+            gst_buffer_copy_region (tmp_buf, GST_BUFFER_COPY_ALL,
-+            gst_buffer_get_size (tmp_buf) - size, size);
-+        gst_buffer_unref (tmp_buf);
-+        if (encrypted)
-+          gst_buffer_add_protection_meta (out_buf, info_protect);
-+        else
-+          gst_structure_free (info_protect);
-+      } else {
-+        gst_structure_free (info_protect);
-+      }
-+    } else {
-+      GST_WARNING ("Adding protection metadata failed");
-+      gst_buffer_unmap (out_buf, &map);
-+      gst_buffer_unref (out_buf);
-+      gst_structure_free (info_protect);
-+      return NULL;
-+    }
-+  }
-+
-+  return out_buf;
- }
- static void
-@@ -630,6 +672,8 @@ gst_matroska_demux_parse_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml,
-   context->dts_only = FALSE;
-   context->intra_only = FALSE;
-   context->tags = gst_tag_list_new_empty ();
-+  g_queue_init (&context->protection_event_queue);
-+  context->protection_info = NULL;
-   GST_DEBUG_OBJECT (demux, "Parsing a TrackEntry (%d tracks parsed so far)",
-       demux->common.num_streams);
-@@ -1467,6 +1511,31 @@ gst_matroska_demux_parse_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml,
-         context->stream_headers, caps);
-   }
-+  if (context->encodings) {
-+    GstMatroskaTrackEncoding *enc;
-+    guint i;
-+
-+    for (i = 0; i < context->encodings->len; i++) {
-+      enc = &g_array_index (context->encodings, GstMatroskaTrackEncoding, i);
-+      if (enc->type == GST_MATROSKA_ENCODING_ENCRYPTION /* encryption */ ) {
-+        GstStructure *s = gst_caps_get_structure (caps, 0);
-+        if (!gst_structure_has_name (s, "application/x-webm-enc")) {
-+          gst_structure_set (s, "original-media-type", G_TYPE_STRING,
-+              gst_structure_get_name (s), NULL);
-+          gst_structure_set (s, "encryption-algorithm", G_TYPE_STRING,
-+              gst_matroska_track_encryption_algorithm_name (enc->enc_algo),
-+              NULL);
-+          gst_structure_set (s, "encoding-scope", G_TYPE_STRING,
-+              gst_matroska_track_encoding_scope_name (enc->scope), NULL);
-+          gst_structure_set (s, "cipher-mode", G_TYPE_STRING,
-+              gst_matroska_track_encryption_cipher_mode_name
-+              (enc->enc_cipher_mode), NULL);
-+          gst_structure_set_name (s, "application/x-webm-enc");
-+        }
-+      }
-+    }
-+  }
-+
-   context->caps = caps;
-   /* tadaah! */
-@@ -4185,6 +4254,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
-     gboolean delta_unit = FALSE;
-     guint64 duration = 0;
-     gint64 lace_time = 0;
-+    GstEvent *protect_event;
-     stream = g_ptr_array_index (demux->common.src, stream_num);
-@@ -4204,6 +4274,12 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
-     } else {
-       lace_time = GST_CLOCK_TIME_NONE;
-     }
-+    /* Send the GST_PROTECTION event */
-+    while ((protect_event = g_queue_pop_head (&stream->protection_event_queue))) {
-+      GST_TRACE_OBJECT (demux, "pushing protection event for stream %d:%s",
-+          stream->index, GST_STR_NULL (stream->name));
-+      gst_pad_push_event (stream->pad, protect_event);
-+    }
-     /* need to refresh segment info ASAP */
-     if (GST_CLOCK_TIME_IS_VALID (lace_time) && demux->need_segment) {
-@@ -5350,6 +5426,9 @@ gst_matroska_demux_parse_id (GstMatroskaDemux * demux, guint32 id,
-         }
-         case GST_MATROSKA_ID_POSITION:
-         case GST_MATROSKA_ID_ENCRYPTEDBLOCK:
-+          /* The WebM doesn't support the EncryptedBlock element.
-+           * The Matroska spec doesn't give us more detail, how to parse this element,
-+           * for example the field TransformID isn't specified yet.*/
-         case GST_MATROSKA_ID_SILENTTRACKS:
-           GST_DEBUG_OBJECT (demux,
-               "Skipping Cluster subelement 0x%x - ignoring", id);
-@@ -6915,6 +6994,37 @@ gst_matroska_demux_get_property (GObject * object,
-   }
- }
-+static const gchar *
-+gst_matroska_track_encryption_algorithm_name (gint val)
-+{
-+  GEnumValue *en;
-+  GEnumClass *enum_class =
-+      g_type_class_ref (MATROSKA_TRACK_ENCRYPTION_ALGORITHM_TYPE);
-+  en = g_enum_get_value (G_ENUM_CLASS (enum_class), val);
-+  return en ? en->value_nick : NULL;
-+}
-+
-+static const gchar *
-+gst_matroska_track_encryption_cipher_mode_name (gint val)
-+{
-+  GEnumValue *en;
-+  GEnumClass *enum_class =
-+      g_type_class_ref (MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_TYPE);
-+  en = g_enum_get_value (G_ENUM_CLASS (enum_class), val);
-+  return en ? en->value_nick : NULL;
-+}
-+
-+static const gchar *
-+gst_matroska_track_encoding_scope_name (gint val)
-+{
-+  GEnumValue *en;
-+  GEnumClass *enum_class =
-+      g_type_class_ref (MATROSKA_TRACK_ENCODING_SCOPE_TYPE);
-+
-+  en = g_enum_get_value (G_ENUM_CLASS (enum_class), val);
-+  return en ? en->value_nick : NULL;
-+}
-+
- gboolean
- gst_matroska_demux_plugin_init (GstPlugin * plugin)
- {
-diff --git a/gst/matroska/matroska-ids.c b/gst/matroska/matroska-ids.c
-index 3be3d276b..b96404386 100644
---- a/gst/matroska/matroska-ids.c
-+++ b/gst/matroska/matroska-ids.c
-@@ -351,5 +351,78 @@ gst_matroska_track_free (GstMatroskaTrackContext * track)
-   if (track->stream_headers)
-     gst_buffer_list_unref (track->stream_headers);
-+  g_queue_foreach (&track->protection_event_queue, (GFunc) gst_event_unref,
-+      NULL);
-+  g_queue_clear (&track->protection_event_queue);
-+
-+  if (track->protection_info)
-+    gst_structure_free (track->protection_info);
-+
-   g_free (track);
- }
-+
-+GType
-+matroska_track_encryption_algorithm_get_type (void)
-+{
-+  static GType type = 0;
-+
-+  static const GEnumValue types[] = {
-+    {GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_NONE, "Not encrypted",
-+        "None"},
-+    {GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_DES, "DES encryption algorithm",
-+        "DES"},
-+    {GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_3DES, "3DES encryption algorithm",
-+        "3DES"},
-+    {GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_TWOFISH,
-+        "TwoFish encryption algorithm", "TwoFish"},
-+    {GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_BLOWFISH,
-+        "BlowFish encryption algorithm", "BlowFish"},
-+    {GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_AES, "AES encryption algorithm",
-+        "AES"},
-+    {0, NULL, NULL}
-+  };
-+
-+  if (!type) {
-+    type = g_enum_register_static ("MatroskaTrackEncryptionAlgorithm", types);
-+  }
-+  return type;
-+}
-+
-+GType
-+matroska_track_encryption_cipher_mode_get_type (void)
-+{
-+  static GType type = 0;
-+
-+  static const GEnumValue types[] = {
-+    {GST_MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_NONE, "Not defined",
-+        "None"},
-+    {GST_MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_CTR, "CTR encryption mode",
-+        "CTR"},
-+    {0, NULL, NULL}
-+  };
-+
-+  if (!type) {
-+    type = g_enum_register_static ("MatroskaTrackEncryptionCipherMode", types);
-+  }
-+  return type;
-+}
-+
-+GType
-+matroska_track_encoding_scope_get_type (void)
-+{
-+  static GType type = 0;
-+
-+  static const GEnumValue types[] = {
-+    {GST_MATROSKA_TRACK_ENCODING_SCOPE_FRAME, "Encoding scope frame", "frame"},
-+    {GST_MATROSKA_TRACK_ENCODING_SCOPE_CODEC_DATA, "Encoding scope codec data",
-+        "codec-data"},
-+    {GST_MATROSKA_TRACK_ENCODING_SCOPE_NEXT_CONTENT_ENCODING,
-+        "Encoding scope next content", "next-content"},
-+    {0, NULL, NULL}
-+  };
-+
-+  if (!type) {
-+    type = g_enum_register_static ("MatroskaTrackEncodingScope", types);
-+  }
-+  return type;
-+}
-diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h
-index c2e41e549..9b263d8a1 100644
---- a/gst/matroska/matroska-ids.h
-+++ b/gst/matroska/matroska-ids.h
-@@ -175,6 +175,9 @@
- #define GST_MATROSKA_ID_CONTENTSIGKEYID            0x47E4
- #define GST_MATROSKA_ID_CONTENTSIGALGO             0x47E5
- #define GST_MATROSKA_ID_CONTENTSIGHASHALGO         0x47E6
-+/* Added in WebM spec */
-+#define GST_MATROSKA_ID_CONTENTENCAESSETTINGS      0x47E7
-+#define GST_MATROSKA_ID_AESSETTINGSCIPHERMODE      0x47E8
- /* ID in the CUEs master */
- #define GST_MATROSKA_ID_POINTENTRY                 0xBB
-@@ -516,6 +519,17 @@ typedef enum {
-   GST_MATROSKA_STEREO_MODE_FBF_RL      = 0xE
- } GstMatroskaStereoMode;
-+typedef enum {
-+  GST_MATROSKA_ENCODING_COMPRESSION = 0x00,
-+  GST_MATROSKA_ENCODING_ENCRYPTION  = 0x01
-+} GstMatroskaEncodingType;
-+
-+/* WebM spec */
-+typedef enum {
-+  GST_MATROSKA_BLOCK_ENCRYPTED   = 0x01,
-+  GST_MATROSKA_BLOCK_PARTITIONED = 0x02
-+} GstMatroskaEncryptedBlockFlags;
-+
- typedef struct _GstMatroskaTrackContext GstMatroskaTrackContext;
- /* TODO: check if all fields are used */
-@@ -549,6 +563,11 @@ struct _GstMatroskaTrackContext {
-   gboolean      set_discont; /* TRUE = set DISCONT flag on next buffer */
-+  /* Queue to save the GST_PROTECTION events which will be sent before the first source buffer */
-+  GQueue         protection_event_queue;
-+  /* Protection information structure which will be added in protection metadata for each encrypted buffer */
-+  GstStructure * protection_info;
-+
-   /* Stream header buffer, to put into caps and send before any other buffers */
-   GstBufferList * stream_headers;
-   gboolean        send_stream_headers;
-@@ -654,6 +673,9 @@ typedef enum {
-   GST_MATROSKA_TRACK_ENCODING_SCOPE_NEXT_CONTENT_ENCODING = (1<<2)
- } GstMatroskaTrackEncodingScope;
-+#define MATROSKA_TRACK_ENCODING_SCOPE_TYPE (matroska_track_encoding_scope_get_type())
-+GType matroska_track_encoding_scope_get_type (void);
-+
- typedef enum {
-   GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_ZLIB = 0,
-   GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_BZLIB = 1,
-@@ -661,6 +683,35 @@ typedef enum {
-   GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_HEADERSTRIP = 3
- } GstMatroskaTrackCompressionAlgorithm;
-+/* The encryption algorithm used. The value '0' means that the contents
-+ * have not been encrypted but only signed.
-+ * Predefined values: 1 - DES; 2 - 3DES; 3 - Twofish; 4 - Blowfish; 5 - AES.
-+ * WebM only supports a value of 5 (AES).
-+ */
-+typedef enum {
-+  GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_NONE     = 0,
-+  GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_DES      = 1,
-+  GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_3DES     = 2,
-+  GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_TWOFISH  = 3,
-+  GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_BLOWFISH = 4,
-+  GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_AES      = 5
-+} GstMatroskaTrackEncryptionAlgorithm;
-+
-+#define MATROSKA_TRACK_ENCRYPTION_ALGORITHM_TYPE (matroska_track_encryption_algorithm_get_type())
-+GType matroska_track_encryption_algorithm_get_type (void);
-+
-+/* Defined only in WebM spec.
-+ * The cipher mode used in the encryption. Predefined values: 1 - CTR
-+ */
-+typedef enum {
-+  GST_MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_NONE    = 0,
-+  GST_MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_CTR     = 1
-+} GstMatroskaTrackEncryptionCipherMode;
-+
-+#define MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_TYPE (matroska_track_encryption_cipher_mode_get_type())
-+GType matroska_track_encryption_cipher_mode_get_type (void);
-+
-+
- typedef struct _GstMatroskaTrackEncoding {
-   guint   order;
-   guint   scope     : 3;
-@@ -668,6 +719,8 @@ typedef struct _GstMatroskaTrackEncoding {
-   guint   comp_algo : 2;
-   guint8 *comp_settings;
-   guint   comp_settings_length;
-+  guint   enc_algo  : 3;
-+  guint   enc_cipher_mode : 2;
- } GstMatroskaTrackEncoding;
- gboolean gst_matroska_track_init_video_context    (GstMatroskaTrackContext ** p_context);
-diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c
-index 419ba7f95..ffb393bf9 100644
---- a/gst/matroska/matroska-read-common.c
-+++ b/gst/matroska/matroska-read-common.c
-@@ -39,6 +39,7 @@
- #include <gst/tag/tag.h>
- #include <gst/base/gsttypefindhelper.h>
-+#include <gst/base/gstbytewriter.h>
- #include "lzo.h"
-@@ -262,9 +263,9 @@ gst_matroska_decode_content_encodings (GArray * encodings)
-         == 0)
-       continue;
--    /* Encryption not supported yet */
--    if (enc->type != 0)
--      return GST_FLOW_ERROR;
-+    /* Other than ENCODING_COMPRESSION not handled here */
-+    if (enc->type != GST_MATROSKA_ENCODING_COMPRESSION)
-+      continue;
-     if (i + 1 >= encodings->len)
-       return GST_FLOW_ERROR;
-@@ -312,9 +313,9 @@ gst_matroska_decode_data (GArray * encodings, gpointer * data_out,
-     if ((enc->scope & scope) == 0)
-       continue;
--    /* Encryption not supported yet */
--    if (enc->type != 0) {
--      ret = FALSE;
-+    /* Encryption not handled here */
-+    if (enc->type != GST_MATROSKA_ENCODING_COMPRESSION) {
-+      ret = TRUE;
-       break;
-     }
-@@ -349,6 +350,211 @@ gst_matroska_decode_data (GArray * encodings, gpointer * data_out,
-   return ret;
- }
-+/* This function parses the protection info of Block/SimpleBlock and extracts the
-+ * IV and partitioning format (subsample) information.
-+ * Set those parsed information into protection info structure @info_protect which
-+ * will be added in protection metadata of the Gstbuffer.
-+ * The subsamples format follows the same pssh box format in Common Encryption spec:
-+ * subsample number + clear subsample size (16bit bigendian) | encrypted subsample size (32bit bigendian) | ...
-+ * @encrypted is an output argument: TRUE if the current Block/SimpleBlock is encrypted else FALSE
-+ */
-+gboolean
-+gst_matroska_parse_protection_meta (gpointer * data_out, gsize * size_out,
-+    GstStructure * info_protect, gboolean * encrypted)
-+{
-+  guint8 *data;
-+  GstBuffer *buf_iv;
-+  guint8 *data_iv;
-+  guint8 *subsamples;
-+  guint8 signal_byte;
-+  gint i;
-+  GstByteReader reader;
-+
-+  g_return_val_if_fail (data_out != NULL && *data_out != NULL, FALSE);
-+  g_return_val_if_fail (size_out != NULL, FALSE);
-+  g_return_val_if_fail (info_protect != NULL, FALSE);
-+  g_return_val_if_fail (encrypted != NULL, FALSE);
-+
-+  *encrypted = FALSE;
-+  data = *data_out;
-+  gst_byte_reader_init (&reader, data, *size_out);
-+
-+  /* WebM spec:
-+   * 4.7 Signal Byte Format
-+   *  0 1 2 3 4 5 6 7
-+   * +-+-+-+-+-+-+-+-+
-+   * |X|   RSV   |P|E|
-+   * +-+-+-+-+-+-+-+-+
-+   *
-+   * Extension bit (X)
-+   * If set, another signal byte will follow this byte. Reserved for future expansion (currently MUST be set to 0).
-+   * RSV bits (RSV)
-+   * Bits reserved for future use. MUST be set to 0 and MUST be ignored.
-+   * Encrypted bit (E)
-+   * If set, the Block MUST contain an IV immediately followed by an encrypted frame. If not set, the Block MUST NOT include an IV and the frame MUST be unencrypted. The unencrypted frame MUST immediately follow the Signal Byte.
-+   * Partitioned bit (P)
-+   * Used to indicate that the sample has subsample partitions. If set, the IV will be followed by a num_partitions byte, and num_partitions * 32-bit partition offsets. This bit can only be set if the E bit is also set.
-+   */
-+  if (!gst_byte_reader_get_uint8 (&reader, &signal_byte)) {
-+    GST_ERROR ("Error reading the signal byte");
-+    return FALSE;
-+  }
-+
-+  /* Unencrypted buffer */
-+  if (!(signal_byte & GST_MATROSKA_BLOCK_ENCRYPTED)) {
-+    return TRUE;
-+  }
-+
-+  /* Encrypted buffer */
-+  *encrypted = TRUE;
-+  /* Create IV buffer */
-+  if (!gst_byte_reader_dup_data (&reader, sizeof (guint64), &data_iv)) {
-+    GST_ERROR ("Error reading the IV data");
-+    return FALSE;
-+  }
-+  buf_iv = gst_buffer_new_wrapped ((gpointer) data_iv, sizeof (guint64));
-+  gst_structure_set (info_protect, "iv", GST_TYPE_BUFFER, buf_iv, NULL);
-+  gst_buffer_unref (buf_iv);
-+
-+  /* Partitioned in subsample */
-+  if (signal_byte & GST_MATROSKA_BLOCK_PARTITIONED) {
-+    guint nb_subsample;
-+    guint32 offset = 0;
-+    guint32 offset_prev;
-+    guint32 encrypted_bytes = 0;
-+    guint16 clear_bytes = 0;
-+    GstBuffer *buf_sub_sample;
-+    guint8 nb_part;
-+    GstByteWriter writer;
-+
-+    /* Read the number of partitions (1 byte) */
-+    if (!gst_byte_reader_get_uint8 (&reader, &nb_part)) {
-+      GST_ERROR ("Error reading the partition number");
-+      return FALSE;
-+    }
-+
-+    if (nb_part == 0) {
-+      GST_ERROR ("Partitioned, but the subsample number equal to zero");
-+      return FALSE;
-+    }
-+
-+    nb_subsample = (nb_part + 2) >> 1;
-+
-+    gst_structure_set (info_protect, "subsample_count", G_TYPE_UINT,
-+        nb_subsample, NULL);
-+
-+    /* WebM Spec:
-+     *
-+     * 4.6 Subsample Encrypted Block Format
-+     *
-+     * The Subsample Encrypted Block format extends the Full-sample format by setting a "partitioned" (P) bit in the Signal Byte.
-+     * If this bit is set, the EncryptedBlock header shall include an
-+     * 8-bit integer indicating the number of sample partitions (dividers between clear/encrypted sections),
-+     * and a series of 32-bit integers in big-endian encoding indicating the byte offsets of such partitions.
-+     *
-+     *  0                   1                   2                   3
-+     *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+     * |  Signal Byte  |                                               |
-+     * +-+-+-+-+-+-+-+-+             IV                                |
-+     * |                                                               |
-+     * |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+     * |               | num_partition |     Partition 0 offset ->     |
-+     * |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
-+     * |     -> Partition 0 offset     |              ...              |
-+     * |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
-+     * |             ...               |     Partition n-1 offset ->   |
-+     * |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
-+     * |     -> Partition n-1 offset   |                               |
-+     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-+     * |                    Clear/encrypted sample data                |
-+     * |                                                               |
-+     * |                                                               |
-+     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-+     *
-+     * 4.6.1 SAMPLE PARTITIONS
-+     *
-+     * The samples shall be partitioned into alternating clear and encrypted sections,
-+     * always starting with a clear section.
-+     * Generally for n clear/encrypted sections there shall be n-1 partition offsets.
-+     * However, if it is required that the first section be encrypted, then the first partition shall be at byte offset 0
-+     * (indicating a zero-size clear section), and there shall be n partition offsets.
-+     * Please refer to the "Sample Encryption" description of the "Common Encryption"
-+     * section of the VP Codec ISO Media File Format Binding Specification for more
-+     * detail on how subsample encryption is implemented.
-+     */
-+    subsamples =
-+        g_malloc (nb_subsample * (sizeof (guint16) + sizeof (guint32)));
-+
-+    gst_byte_writer_init_with_data (&writer, subsamples,
-+        nb_subsample * (sizeof (guint16) + sizeof (guint32)), FALSE);
-+
-+    for (i = 0; i <= nb_part; i++) {
-+      offset_prev = offset;
-+      if (i == nb_part) {
-+        offset = gst_byte_reader_get_remaining (&reader);
-+      } else {
-+        if (!gst_byte_reader_get_uint32_be (&reader, &offset)) {
-+          GST_ERROR ("Error reading the partition offset");
-+          goto release_err;
-+        }
-+      }
-+
-+      if (offset < offset_prev) {
-+        GST_ERROR ("Partition offsets should not decrease");
-+        goto release_err;
-+      }
-+
-+      if (i % 2 == 0) {
-+        if ((offset - offset_prev) & 0xFFFF0000) {
-+          GST_ERROR
-+              ("The Clear Partition exceed 64KB in encrypted subsample format");
-+          goto release_err;
-+        }
-+        /* We set the Clear partition size in 16 bits, in order to
-+         * follow the same format of the box PSSH in CENC spec */
-+        clear_bytes = offset - offset_prev;
-+        if (i == nb_part)
-+          encrypted_bytes = 0;
-+      } else {
-+        encrypted_bytes = offset - offset_prev;
-+      }
-+
-+      if ((i % 2 == 1) || (i == nb_part)) {
-+        if (clear_bytes == 0 && encrypted_bytes == 0) {
-+          GST_ERROR ("Found 2 partitions with the same offsets.");
-+          goto release_err;
-+        }
-+        if (!gst_byte_writer_put_uint16_be (&writer, clear_bytes)) {
-+          GST_ERROR ("Error writing the number of clear bytes");
-+          goto release_err;
-+        }
-+        if (!gst_byte_writer_put_uint32_be (&writer, encrypted_bytes)) {
-+          GST_ERROR ("Error writing the number of encrypted bytes");
-+          goto release_err;
-+        }
-+      }
-+    }
-+
-+    buf_sub_sample =
-+        gst_buffer_new_wrapped (subsamples,
-+        nb_subsample * (sizeof (guint16) + sizeof (guint32)));
-+    gst_structure_set (info_protect, "subsamples", GST_TYPE_BUFFER,
-+        buf_sub_sample, NULL);
-+    gst_buffer_unref (buf_sub_sample);
-+  } else {
-+    gst_structure_set (info_protect, "subsample_count", G_TYPE_UINT, 0, NULL);
-+  }
-+
-+  gst_byte_reader_get_data (&reader, 0, (const guint8 **) data_out);
-+  *size_out = gst_byte_reader_get_remaining (&reader);
-+  return TRUE;
-+
-+release_err:
-+  g_free (subsamples);
-+  return FALSE;
-+}
-+
- static gint
- gst_matroska_index_compare (GstMatroskaIndex * i1, GstMatroskaIndex * i2)
- {
-@@ -2744,9 +2950,11 @@ gst_matroska_read_common_read_track_encoding (GstMatroskaReadCommon * common,
-               G_GUINT64_FORMAT, num);
-           ret = GST_FLOW_ERROR;
-           break;
--        } else if (num != 0) {
-+        }
-+
-+        if ((!common->is_webm) && (num == GST_MATROSKA_ENCODING_ENCRYPTION)) {
-           GST_ERROR_OBJECT (common->sinkpad,
--              "Encrypted tracks are not supported yet");
-+              "Encrypted tracks are supported only in WebM");
-           ret = GST_FLOW_ERROR;
-           break;
-         }
-@@ -2812,12 +3020,132 @@ gst_matroska_read_common_read_track_encoding (GstMatroskaReadCommon * common,
-         break;
-       }
--      case GST_MATROSKA_ID_CONTENTENCRYPTION:
--        GST_ERROR_OBJECT (common->sinkpad,
--            "Encrypted tracks not yet supported");
--        gst_ebml_read_skip (ebml);
--        ret = GST_FLOW_ERROR;
-+      case GST_MATROSKA_ID_CONTENTENCRYPTION:{
-+
-+        DEBUG_ELEMENT_START (common, ebml, "ContentEncryption");
-+
-+        if (enc.type != GST_MATROSKA_ENCODING_ENCRYPTION) {
-+          GST_WARNING_OBJECT (common->sinkpad,
-+              "Unexpected to have Content Encryption because it isn't encryption type");
-+          ret = GST_FLOW_ERROR;
-+          break;
-+        }
-+
-+        if ((ret = gst_ebml_read_master (ebml, &id)) != GST_FLOW_OK)
-+          break;
-+
-+        while (ret == GST_FLOW_OK &&
-+            gst_ebml_read_has_remaining (ebml, 1, TRUE)) {
-+          if ((ret = gst_ebml_peek_id (ebml, &id)) != GST_FLOW_OK)
-+            break;
-+
-+          switch (id) {
-+            case GST_MATROSKA_ID_CONTENTENCALGO:{
-+              guint64 num;
-+
-+              if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) {
-+                break;
-+              }
-+
-+              if (num > GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_AES) {
-+                GST_ERROR_OBJECT (common->sinkpad, "Invalid ContentEncAlgo %"
-+                    G_GUINT64_FORMAT, num);
-+                ret = GST_FLOW_ERROR;
-+                break;
-+              }
-+              GST_DEBUG_OBJECT (common->sinkpad,
-+                  "ContentEncAlgo: %" G_GUINT64_FORMAT, num);
-+              enc.enc_algo = num;
-+
-+              break;
-+            }
-+            case GST_MATROSKA_ID_CONTENTENCAESSETTINGS:{
-+
-+              DEBUG_ELEMENT_START (common, ebml, "ContentEncAESSettings");
-+
-+              if ((ret = gst_ebml_read_master (ebml, &id)) != GST_FLOW_OK)
-+                break;
-+
-+              while (ret == GST_FLOW_OK &&
-+                  gst_ebml_read_has_remaining (ebml, 1, TRUE)) {
-+                if ((ret = gst_ebml_peek_id (ebml, &id)) != GST_FLOW_OK)
-+                  break;
-+
-+                switch (id) {
-+                  case GST_MATROSKA_ID_AESSETTINGSCIPHERMODE:{
-+                    guint64 num;
-+
-+                    if ((ret =
-+                            gst_ebml_read_uint (ebml, &id,
-+                                &num)) != GST_FLOW_OK) {
-+                      break;
-+                    }
-+                    if (num > 3) {
-+                      GST_ERROR_OBJECT (common->sinkpad, "Invalid Cipher Mode %"
-+                          G_GUINT64_FORMAT, num);
-+                      ret = GST_FLOW_ERROR;
-+                      break;
-+                    }
-+                    GST_DEBUG_OBJECT (common->sinkpad,
-+                        "ContentEncAESSettings: %" G_GUINT64_FORMAT, num);
-+                    enc.enc_cipher_mode = num;
-+                    break;
-+                  }
-+                  default:
-+                    GST_WARNING_OBJECT (common->sinkpad,
-+                        "Unknown ContentEncAESSettings subelement 0x%x - ignoring",
-+                        id);
-+                    ret = gst_ebml_read_skip (ebml);
-+                    break;
-+                }
-+              }
-+              DEBUG_ELEMENT_STOP (common, ebml, "ContentEncAESSettings", ret);
-+              break;
-+            }
-+
-+            case GST_MATROSKA_ID_CONTENTENCKEYID:{
-+              guint8 *data;
-+              guint64 size;
-+              GstBuffer *keyId_buf;
-+              GstEvent *event;
-+
-+              if ((ret =
-+                      gst_ebml_read_binary (ebml, &id, &data,
-+                          &size)) != GST_FLOW_OK) {
-+                break;
-+              }
-+              GST_DEBUG_OBJECT (common->sinkpad,
-+                  "ContentEncrypt KeyID length : %" G_GUINT64_FORMAT, size);
-+              keyId_buf = gst_buffer_new_wrapped (data, size);
-+
-+              /* Push an event containing the Key ID into the queues of all streams. */
-+              /* system_id field is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID because it isn't specified neither in WebM nor in Matroska spec. */
-+              event =
-+                  gst_event_new_protection
-+                  (GST_PROTECTION_UNSPECIFIED_SYSTEM_ID, keyId_buf,
-+                  "matroskademux");
-+              GST_TRACE_OBJECT (common->sinkpad,
-+                  "adding protection event for stream %d", context->index);
-+              g_queue_push_tail (&context->protection_event_queue, event);
-+
-+              context->protection_info =
-+                  gst_structure_new ("application/x-cenc", "iv_size",
-+                  G_TYPE_UINT, 8, "encrypted", G_TYPE_BOOLEAN, TRUE, "kid",
-+                  GST_TYPE_BUFFER, keyId_buf, NULL);
-+
-+              gst_buffer_unref (keyId_buf);
-+              break;
-+            }
-+            default:
-+              GST_WARNING_OBJECT (common->sinkpad,
-+                  "Unknown ContentEncryption subelement 0x%x - ignoring", id);
-+              ret = gst_ebml_read_skip (ebml);
-+              break;
-+          }
-+        }
-+        DEBUG_ELEMENT_STOP (common, ebml, "ContentEncryption", ret);
-         break;
-+      }
-       default:
-         GST_WARNING_OBJECT (common->sinkpad,
-             "Unknown ContentEncoding subelement 0x%x - ignoring", id);
-diff --git a/gst/matroska/matroska-read-common.h b/gst/matroska/matroska-read-common.h
-index a6282d698..e33ef8ef4 100644
---- a/gst/matroska/matroska-read-common.h
-+++ b/gst/matroska/matroska-read-common.h
-@@ -120,6 +120,9 @@ typedef struct _GstMatroskaReadCommon {
- GstFlowReturn gst_matroska_decode_content_encodings (GArray * encodings);
- gboolean gst_matroska_decode_data (GArray * encodings, gpointer * data_out,
-     gsize * size_out, GstMatroskaTrackEncodingScope scope, gboolean free);
-+gboolean
-+gst_matroska_parse_protection_meta (gpointer * data_out, gsize * size_out,
-+    GstStructure * info_protect, gboolean * encrypted);
- gint gst_matroska_index_seek_find (GstMatroskaIndex * i1, GstClockTime * time,
-     gpointer user_data);
- GstMatroskaIndex * gst_matroska_read_common_do_index_seek (
--- 
-2.15.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch b/Tools/gstreamer/patches/gst-plugins-good-0012-matroskdemux-do-not-use-MapInfo.data-after-unmapping.patch
deleted file mode 100644 (file)
index ed0f48d..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From defae350358660e557c74e41a4fe8a8bb327e9c8 Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Wed, 3 Oct 2018 17:34:49 +0200
-Subject: [PATCH] matroskdemux: do not use MapInfo.data after unmapping
-
-And minor gst-indenting
----
- gst/matroska/matroska-demux.c       | 22 +++++++++++++---------
- gst/matroska/matroska-read-common.c |  6 ++++++
- 2 files changed, 19 insertions(+), 9 deletions(-)
-
-diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
-index 1ef7b42cc..b67112cc6 100644
---- a/gst/matroska/matroska-demux.c
-+++ b/gst/matroska/matroska-demux.c
-@@ -376,10 +376,12 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
-   if (gst_matroska_decode_data (context->encodings, &data, &size,
-           GST_MATROSKA_TRACK_ENCODING_SCOPE_FRAME, FALSE)) {
--    gst_buffer_unmap (out_buf, &map);
-     if (data != map.data) {
-+      gst_buffer_unmap (out_buf, &map);
-       gst_buffer_unref (out_buf);
-       out_buf = gst_buffer_new_wrapped (data, size);
-+    } else {
-+      gst_buffer_unmap (out_buf, &map);
-     }
-   } else {
-     GST_DEBUG ("decode data failed");
-@@ -399,11 +401,12 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
-     if (gst_matroska_parse_protection_meta (&data, &size, info_protect,
-             &encrypted)) {
--      gst_buffer_unmap (out_buf, &map);
-       if (data != map.data) {
--        GstBuffer *tmp_buf = out_buf;
--        out_buf =
--            gst_buffer_copy_region (tmp_buf, GST_BUFFER_COPY_ALL,
-+        GstBuffer *tmp_buf;
-+
-+        gst_buffer_unmap (out_buf, &map);
-+        tmp_buf = out_buf;
-+        out_buf = gst_buffer_copy_region (tmp_buf, GST_BUFFER_COPY_ALL,
-             gst_buffer_get_size (tmp_buf) - size, size);
-         gst_buffer_unref (tmp_buf);
-         if (encrypted)
-@@ -411,6 +414,7 @@ gst_matroska_decode_buffer (GstMatroskaTrackContext * context, GstBuffer * buf)
-         else
-           gst_structure_free (info_protect);
-       } else {
-+        gst_buffer_unmap (out_buf, &map);
-         gst_structure_free (info_protect);
-       }
-     } else {
-@@ -2705,10 +2709,10 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
-    * would be determined again when parsing, but anyway ... */
-   seeksegment.duration = demux->common.segment.duration;
--  flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
--  keyunit = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
--  after = ! !(flags & GST_SEEK_FLAG_SNAP_AFTER);
--  before = ! !(flags & GST_SEEK_FLAG_SNAP_BEFORE);
-+  flush = !!(flags & GST_SEEK_FLAG_FLUSH);
-+  keyunit = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
-+  after = !!(flags & GST_SEEK_FLAG_SNAP_AFTER);
-+  before = !!(flags & GST_SEEK_FLAG_SNAP_BEFORE);
-   /* always do full update if flushing,
-    * otherwise problems might arise downstream with missing keyframes etc */
-diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c
-index ffb393bf9..12085503a 100644
---- a/gst/matroska/matroska-read-common.c
-+++ b/gst/matroska/matroska-read-common.c
-@@ -2043,6 +2043,8 @@ gst_matroska_read_common_parse_metadata_id_simple_tag (GstMatroskaReadCommon *
-     const gchar *matroska_tagname;
-     const gchar *gstreamer_tagname;
-   }
-+
-+  /* *INDENT-OFF* */
-   tag_conv[] = {
-     {
-       /* The following list has the _same_ order as the one in Matroska spec. Please, don't mess it up. */
-@@ -2177,11 +2179,14 @@ gst_matroska_read_common_parse_metadata_id_simple_tag (GstMatroskaReadCommon *
-     GST_MATROSKA_TAG_ID_LICENSE, GST_TAG_LICENSE}, {    /* The license applied to the content (like Creative Commons variants). */
-     GST_MATROSKA_TAG_ID_TERMS_OF_USE, GST_TAG_LICENSE}
-   };
-+  /* *INDENT-ON* */
-   static const struct
-   {
-     const gchar *matroska_tagname;
-     const gchar *gstreamer_tagname;
-   }
-+
-+  /* *INDENT-OFF* */
-   child_tag_conv[] = {
-     {
-     "TITLE/SORT_WITH=", GST_TAG_TITLE_SORTNAME}, {
-@@ -2198,6 +2203,7 @@ gst_matroska_read_common_parse_metadata_id_simple_tag (GstMatroskaReadCommon *
-     "LICENSE/URL=", GST_TAG_LICENSE_URI}, {
-     "LICENSE/URL=", GST_TAG_LICENSE_URI}
-   };
-+  /* *INDENT-ON* */
-   GstFlowReturn ret;
-   guint32 id;
-   gchar *value = NULL;
--- 
-2.15.0
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch b/Tools/gstreamer/patches/gst-plugins-good-0013-Avoid-warning-when-reporting-about-decryptors.patch
deleted file mode 100644 (file)
index 8e626ed..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From 057c5099bfe1576c52dccd4173eae2a978e63ab0 Mon Sep 17 00:00:00 2001
-From: Philippe Normand <philn@igalia.com>
-Date: Fri, 22 Jun 2018 16:00:11 +0100
-Subject: [PATCH] qtdemux: Avoid warning when reporting about decryptors
-
-https://bugzilla.gnome.org/show_bug.cgi?id=796652
----
- gst/isomp4/qtdemux.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index d7c7ab6cb..dc255e8d7 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -8120,7 +8120,9 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
-       qtdemux->protection_system_ids->len - 1);
-   GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have "
-       "decryptors for %u of them, running context request",
--      qtdemux->protection_system_ids->len, g_strv_length (filtered_sys_ids));
-+      qtdemux->protection_system_ids->len,
-+      filtered_sys_ids ? g_strv_length (filtered_sys_ids) : 0);
-+
-   if (stream->protection_scheme_event_queue.length) {
-     GST_TRACE_OBJECT (qtdemux, "using stream event queue, length %u",
--- 
-2.17.1
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch b/Tools/gstreamer/patches/gst-plugins-good-0014-pulse-Mark-default-devices-as-default.patch
deleted file mode 100644 (file)
index 435b6d7..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-From 32c833ebb42b8e8f46c5a72a16a874bc00fc5553 Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Mon, 26 Nov 2018 13:48:56 -0300
-Subject: [PATCH] pulse: Mark default devices as "default"
-
----
- ext/pulse/pulsedeviceprovider.c | 117 +++++++++++++++++++++-----------
- ext/pulse/pulsedeviceprovider.h |   3 +
- 2 files changed, 79 insertions(+), 41 deletions(-)
-
-diff --git a/ext/pulse/pulsedeviceprovider.c b/ext/pulse/pulsedeviceprovider.c
-index a1964dab2..9b66a0e33 100644
---- a/ext/pulse/pulsedeviceprovider.c
-+++ b/ext/pulse/pulsedeviceprovider.c
-@@ -40,7 +40,7 @@ GST_DEBUG_CATEGORY_EXTERN (pulse_debug);
- static GstDevice *gst_pulse_device_new (guint id,
-     const gchar * device_name, GstCaps * caps, const gchar * internal_name,
--    GstPulseDeviceType type, GstStructure * properties);
-+    GstPulseDeviceType type, GstStructure * properties, gboolean is_default);
- G_DEFINE_TYPE (GstPulseDeviceProvider, gst_pulse_device_provider,
-     GST_TYPE_DEVICE_PROVIDER);
-@@ -65,6 +65,12 @@ enum
- };
-+typedef struct
-+{
-+  GList *devices;
-+  GstPulseDeviceProvider *self;
-+} ListDevicesData;
-+
- static void
- gst_pulse_device_provider_class_init (GstPulseDeviceProviderClass * klass)
- {
-@@ -114,6 +120,8 @@ gst_pulse_device_provider_finalize (GObject * object)
-   g_free (self->client_name);
-   g_free (self->server);
-+  g_free (self->default_sink_name);
-+  g_free (self->default_source_name);
-   G_OBJECT_CLASS (gst_pulse_device_provider_parent_class)->finalize (object);
- }
-@@ -186,7 +194,7 @@ context_state_cb (pa_context * c, void *userdata)
- }
- static GstDevice *
--new_source (const pa_source_info * info)
-+new_source (GstPulseDeviceProvider * self, const pa_source_info * info)
- {
-   GstCaps *caps;
-   GstStructure *props;
-@@ -200,11 +208,12 @@ new_source (const pa_source_info * info)
-   props = gst_pulse_make_structure (info->proplist);
-   return gst_pulse_device_new (info->index, info->description,
--      caps, info->name, GST_PULSE_DEVICE_TYPE_SOURCE, props);
-+      caps, info->name, GST_PULSE_DEVICE_TYPE_SOURCE, props,
-+      !g_strcmp0 (info->name, self->default_source_name));
- }
- static GstDevice *
--new_sink (const pa_sink_info * info)
-+new_sink (GstPulseDeviceProvider * self, const pa_sink_info * info)
- {
-   GstCaps *caps;
-   GstStructure *props;
-@@ -218,7 +227,8 @@ new_sink (const pa_sink_info * info)
-   props = gst_pulse_make_structure (info->proplist);
-   return gst_pulse_device_new (info->index, info->description,
--      caps, info->name, GST_PULSE_DEVICE_TYPE_SINK, props);
-+      caps, info->name, GST_PULSE_DEVICE_TYPE_SINK, props,
-+      !g_strcmp0 (info->name, self->default_sink_name));
- }
- static void
-@@ -233,12 +243,26 @@ get_source_info_cb (pa_context * context,
-     return;
-   }
--  dev = new_source (info);
-+  dev = new_source (self, info);
-   if (dev)
-     gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), dev);
- }
-+static void
-+get_server_info_cb (pa_context * context, const pa_server_info * info,
-+    void *userdata)
-+{
-+  GstPulseDeviceProvider *self = userdata;
-+
-+  g_free (self->default_sink_name);
-+  g_free (self->default_source_name);
-+  self->default_sink_name = g_strdup (info->default_sink_name);
-+  self->default_source_name = g_strdup (info->default_source_name);
-+
-+  pa_threaded_mainloop_signal (self->mainloop, 0);
-+}
-+
- static void
- get_sink_info_cb (pa_context * context,
-     const pa_sink_info * info, int eol, void *userdata)
-@@ -251,7 +275,7 @@ get_sink_info_cb (pa_context * context,
-     return;
-   }
--  dev = new_sink (info);
-+  dev = new_sink (self, info);
-   if (dev)
-     gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), dev);
-@@ -312,34 +336,38 @@ static void
- get_source_info_list_cb (pa_context * context, const pa_source_info * info,
-     int eol, void *userdata)
- {
--  GList **devices = userdata;
-+  ListDevicesData *data = userdata;
-   if (eol)
-     return;
--  *devices = g_list_prepend (*devices, gst_object_ref_sink (new_source (info)));
-+  data->devices =
-+      g_list_prepend (data->devices,
-+      gst_object_ref_sink (new_source (data->self, info)));
- }
- static void
- get_sink_info_list_cb (pa_context * context, const pa_sink_info * info,
-     int eol, void *userdata)
- {
--  GList **devices = userdata;
-+  ListDevicesData *data = userdata;
-   if (eol)
-     return;
--  *devices = g_list_prepend (*devices, gst_object_ref_sink (new_sink (info)));
-+  data->devices =
-+      g_list_prepend (data->devices, gst_object_ref_sink (new_sink (data->self,
-+              info)));
- }
- static GList *
- gst_pulse_device_provider_probe (GstDeviceProvider * provider)
- {
-   GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (provider);
--  GList *devices = NULL;
-   pa_mainloop *m = NULL;
-   pa_context *c = NULL;
-   pa_operation *o;
-+  ListDevicesData data = { NULL, self };
-   if (!(m = pa_mainloop_new ()))
-     return NULL;
-@@ -376,7 +404,7 @@ gst_pulse_device_provider_probe (GstDeviceProvider * provider)
-   }
-   GST_DEBUG_OBJECT (self, "connected");
--  o = pa_context_get_sink_info_list (c, get_sink_info_list_cb, &devices);
-+  o = pa_context_get_sink_info_list (c, get_sink_info_list_cb, &data);
-   while (pa_operation_get_state (o) == PA_OPERATION_RUNNING &&
-       pa_operation_get_state (o) == PA_OPERATION_RUNNING) {
-     if (pa_mainloop_iterate (m, TRUE, NULL) < 0)
-@@ -384,7 +412,7 @@ gst_pulse_device_provider_probe (GstDeviceProvider * provider)
-   }
-   pa_operation_unref (o);
--  o = pa_context_get_source_info_list (c, get_source_info_list_cb, &devices);
-+  o = pa_context_get_source_info_list (c, get_source_info_list_cb, &data);
-   while (pa_operation_get_state (o) == PA_OPERATION_RUNNING &&
-       pa_operation_get_state (o) == PA_OPERATION_RUNNING) {
-     if (pa_mainloop_iterate (m, TRUE, NULL) < 0)
-@@ -395,18 +423,38 @@ gst_pulse_device_provider_probe (GstDeviceProvider * provider)
-   pa_context_disconnect (c);
-   pa_mainloop_free (m);
--  return devices;
-+  return data.devices;
- failed:
-   return NULL;
- }
-+static gboolean
-+run_pulse_operation (GstPulseDeviceProvider * self, pa_operation * operation)
-+{
-+  if (!operation)
-+    return FALSE;
-+
-+  while (pa_operation_get_state (operation) == PA_OPERATION_RUNNING) {
-+    if (!PA_CONTEXT_IS_GOOD (pa_context_get_state ((self->context)))) {
-+      pa_operation_cancel (operation);
-+      pa_operation_unref (operation);
-+      return FALSE;
-+    }
-+
-+    pa_threaded_mainloop_wait (self->mainloop);
-+  }
-+
-+  pa_operation_unref (operation);
-+
-+  return TRUE;
-+}
-+
- static gboolean
- gst_pulse_device_provider_start (GstDeviceProvider * provider)
- {
-   GstPulseDeviceProvider *self = GST_PULSE_DEVICE_PROVIDER (provider);
--  pa_operation *initial_operation;
-   if (!(self->mainloop = pa_threaded_mainloop_new ())) {
-     GST_ERROR_OBJECT (self, "Could not create pulseaudio mainloop");
-@@ -462,27 +510,18 @@ gst_pulse_device_provider_start (GstDeviceProvider * provider)
-   pa_context_subscribe (self->context,
-       PA_SUBSCRIPTION_MASK_SOURCE | PA_SUBSCRIPTION_MASK_SINK, NULL, NULL);
--  initial_operation = pa_context_get_source_info_list (self->context,
--      get_source_info_cb, self);
--  while (pa_operation_get_state (initial_operation) == PA_OPERATION_RUNNING) {
--    if (!PA_CONTEXT_IS_GOOD (pa_context_get_state ((self->context))))
--      goto cancel_and_fail;
--
--    pa_threaded_mainloop_wait (self->mainloop);
--  }
--  pa_operation_unref (initial_operation);
-+  if (!run_pulse_operation (self, pa_context_get_server_info (self->context,
-+              get_server_info_cb, self)))
-+    goto unlock_and_fail;
--  initial_operation = pa_context_get_sink_info_list (self->context,
--      get_sink_info_cb, self);
--  if (!initial_operation)
-+  if (!run_pulse_operation (self,
-+          pa_context_get_source_info_list (self->context, get_source_info_cb,
-+              self)))
-     goto unlock_and_fail;
--  while (pa_operation_get_state (initial_operation) == PA_OPERATION_RUNNING) {
--    if (!PA_CONTEXT_IS_GOOD (pa_context_get_state ((self->context))))
--      goto cancel_and_fail;
--    pa_threaded_mainloop_wait (self->mainloop);
--  }
--  pa_operation_unref (initial_operation);
-+  if (!run_pulse_operation (self, pa_context_get_sink_info_list (self->context,
-+              get_sink_info_cb, self)))
-+    goto unlock_and_fail;
-   pa_threaded_mainloop_unlock (self->mainloop);
-@@ -495,11 +534,6 @@ unlock_and_fail:
- mainloop_failed:
-   return FALSE;
--
--cancel_and_fail:
--  pa_operation_cancel (initial_operation);
--  pa_operation_unref (initial_operation);
--  goto unlock_and_fail;
- }
- static void
-@@ -611,7 +645,7 @@ gst_pulse_device_reconfigure_element (GstDevice * device, GstElement * element)
- static GstDevice *
- gst_pulse_device_new (guint device_index, const gchar * device_name,
-     GstCaps * caps, const gchar * internal_name, GstPulseDeviceType type,
--    GstStructure * props)
-+    GstStructure * props, gboolean is_default)
- {
-   GstPulseDevice *gstdev;
-   const gchar *element = NULL;
-@@ -636,7 +670,7 @@ gst_pulse_device_new (guint device_index, const gchar * device_name,
-       break;
-   }
--
-+  gst_structure_set (props, "is-default", G_TYPE_BOOLEAN, is_default, NULL);
-   gstdev = g_object_new (GST_TYPE_PULSE_DEVICE,
-       "display-name", device_name, "caps", caps, "device-class", klass,
-       "internal-name", internal_name, "properties", props, NULL);
-@@ -644,6 +678,7 @@ gst_pulse_device_new (guint device_index, const gchar * device_name,
-   gstdev->type = type;
-   gstdev->device_index = device_index;
-   gstdev->element = element;
-+  gstdev->is_default = is_default;
-   gst_structure_free (props);
-   gst_caps_unref (caps);
-diff --git a/ext/pulse/pulsedeviceprovider.h b/ext/pulse/pulsedeviceprovider.h
-index 0892ad586..7bcd1bc47 100644
---- a/ext/pulse/pulsedeviceprovider.h
-+++ b/ext/pulse/pulsedeviceprovider.h
-@@ -50,6 +50,8 @@ struct _GstPulseDeviceProvider {
-   gchar *server;
-   gchar *client_name;
-+  gchar *default_source_name;
-+  gchar *default_sink_name;
-   pa_threaded_mainloop *mainloop;
-   pa_context *context;
-@@ -84,6 +86,7 @@ struct _GstPulseDevice {
-   GstPulseDeviceType type;
-   guint             device_index;
-   gchar            *internal_name;
-+  gboolean         is_default;
-   const gchar      *element;
- };
--- 
-2.19.1
-
diff --git a/Tools/gstreamer/patches/gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch b/Tools/gstreamer/patches/gst-plugins-good-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch
new file mode 100644 (file)
index 0000000..f6ca7cc
--- /dev/null
@@ -0,0 +1,36 @@
+From 7be2aa6f42d89ee784d5bef1c27387bda71f2cc7 Mon Sep 17 00:00:00 2001
+From: Philippe Normand <philn@igalia.com>
+Date: Tue, 23 Apr 2019 10:10:01 +0100
+Subject: [PATCH] scaletempo: Advertise interleaved layout in caps templates
+
+Scaletempo doesn't support non-interleaved layout. Not explicitely stating this
+would trigger critical warnings and a caps negotiation failure when scaletempo
+is used as playbin audio-filter.
+
+Patch suggested by George Kiagiadakis <george.kiagiadakis@collabora.com>.
+
+https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/591
+---
+ gst/audiofx/gstscaletempo.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gst/audiofx/gstscaletempo.c b/gst/audiofx/gstscaletempo.c
+index 3a719719a..83ee8fe24 100644
+--- a/gst/audiofx/gstscaletempo.c
++++ b/gst/audiofx/gstscaletempo.c
+@@ -93,9 +93,9 @@ enum
+ #define SUPPORTED_CAPS \
+ GST_STATIC_CAPS ( \
+-    GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F32)) "; " \
+-    GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F64)) "; " \
+-    GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (S16)) \
++    GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F32)) ", layout=(string)interleaved; " \
++    GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F64)) ", layout=(string)interleaved; " \
++    GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (S16)) ", layout=(string)interleaved" \
+ )
+ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+-- 
+2.20.1
+
diff --git a/Tools/gstreamer/patches/gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch b/Tools/gstreamer/patches/gstreamer-0001-protection-Add-a-new-definition-for-unspecified-syst.patch
deleted file mode 100644 (file)
index 228844c..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From 05a3da347b3b8dbaf470793dc3f9ebb23e6fc67f Mon Sep 17 00:00:00 2001
-From: Yacine Bandou <yacine.bandou@softathome.com>
-Date: Mon, 1 Oct 2018 12:11:47 +0200
-Subject: [PATCH 1/2] protection: Add a new definition for unspecified system
- protection
-
-In some cases the system protection ID is not present in the contents
-or in their metadata.
-This define is used to set the value of the "system_id" field in GstProtectionEvent,
-with this value, the application will use an external information to choose which
-protection system to use.
-
-Example: The matroskademux uses this value in the case of encrypted WebM,
-the application will choose the appropriate protection system based on the information
-received through EME API.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=797231
----
- docs/gst/gstreamer-sections.txt |  1 +
- gst/gstprotection.h             | 18 ++++++++++++++++++
- 2 files changed, 19 insertions(+)
-
-diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt
-index 492c4d592..ecc6b04e5 100644
---- a/docs/gst/gstreamer-sections.txt
-+++ b/docs/gst/gstreamer-sections.txt
-@@ -2506,6 +2506,7 @@ gst_buffer_get_protection_meta
- gst_protection_select_system
- gst_protection_filter_systems_by_available_decryptors
- GST_PROTECTION_SYSTEM_ID_CAPS_FIELD
-+GST_PROTECTION_UNSPECIFIED_SYSTEM_ID
- <SUBSECTION Standard>
- GST_PROTECTION_META_API_TYPE
- GST_PROTECTION_META_INFO
-diff --git a/gst/gstprotection.h b/gst/gstprotection.h
-index a7669eab3..0ed87e427 100644
---- a/gst/gstprotection.h
-+++ b/gst/gstprotection.h
-@@ -34,6 +34,24 @@ G_BEGIN_DECLS
-  */
- #define GST_PROTECTION_SYSTEM_ID_CAPS_FIELD "protection-system"
-+/**
-+ * GST_PROTECTION_UNSPECIFIED_SYSTEM_ID:
-+ *
-+ * The protection system value of the unspecified UUID.
-+ * In some cases the system protection ID is not present in the contents or in their
-+ * metadata, as encrypted WebM.
-+ * This define is used to set the value of the "system_id" field in GstProtectionEvent,
-+ * with this value, the application will use an external information to choose which
-+ * protection system to use.
-+ *
-+ * Example: The matroskademux uses this value in the case of encrypted WebM,
-+ * the application will choose the appropriate protection system based on the information
-+ * received through EME API.
-+ *
-+ * Since: 1.16
-+ */
-+#define GST_PROTECTION_UNSPECIFIED_SYSTEM_ID "unspecified.gstreamer.org"
-+
- typedef struct _GstProtectionMeta GstProtectionMeta;
- /**
-  * GstProtectionMeta:
--- 
-2.15.0
-
diff --git a/Tools/gstreamer/patches/gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch b/Tools/gstreamer/patches/gstreamer-0002-protection-Fix-the-string-to-define-unspecified-syst.patch
deleted file mode 100644 (file)
index f3348c9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From b89b1802df44829a0c034db5807bc893ad3c7774 Mon Sep 17 00:00:00 2001
-From: Thibault Saunier <tsaunier@igalia.com>
-Date: Wed, 3 Oct 2018 18:23:01 +0200
-Subject: [PATCH 2/2] protection: Fix the string to define unspecified system
- id
-
-Setting it to "unspecified-system-id".
----
- gst/gstprotection.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gst/gstprotection.h b/gst/gstprotection.h
-index 0ed87e427..f77a7bf97 100644
---- a/gst/gstprotection.h
-+++ b/gst/gstprotection.h
-@@ -50,7 +50,7 @@ G_BEGIN_DECLS
-  *
-  * Since: 1.16
-  */
--#define GST_PROTECTION_UNSPECIFIED_SYSTEM_ID "unspecified.gstreamer.org"
-+#define GST_PROTECTION_UNSPECIFIED_SYSTEM_ID "unspecified-system-id"
- typedef struct _GstProtectionMeta GstProtectionMeta;
- /**
--- 
-2.15.0
-
index 480d8d2..21b3fc0 100644 (file)
 
   <distutils id="meson" python3="1">
     <branch repo="github-tarball"
-            version="0.48.1"
+            version="0.50.1"
             module="mesonbuild/meson/releases/download/${version}/meson-${version}.tar.gz"
             checkoutdir="meson-${version}"
-            hash="sha256:425d12edbb81498314926afa93a3eb2fca4ca6929cbe0f8abeb6ab45d1d9fa8f"/>
+            hash="sha256:f68f56d60c80a77df8fc08fa1016bc5831605d4717b622c96212573271e14ecc"/>
   </distutils>
 
   <autotools id="xdg-dbus-proxy" autogen-sh="configure">