1. 06 Jul, 2021 1 commit
    • Yacine Bandou's avatar
      qtdemux: No need for new "application/x-cbcs" caps · ce0be27c
      Yacine Bandou authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      Instead of using the new "application/x-cbcs" caps, we are just adding
      a new structure field "ciphe-mode", to indicate which encryption scheme
      is used: "cenc", "cbcs", "cbc1" or "cens".
      
      Similarly for the protection metadata, we add the "cipher-mode" field
      to specify the encryption mode with which the buffers are encrypted.
      
      "cenc": AES-CTR (no pattern)
      "cbc1": AES-CBC (no pattern)
      "cens": AES-CTR (pattern specified)
      "cbcs": AES-CBC (pattern specified, using a constant IV)
      
      Currently only "cenc" and "cbcs" are supported.
      
      Part-of: <!1013>
      ce0be27c
  2. 22 Jun, 2021 1 commit
    • Jan Schmidt's avatar
      qtdemux: Refuse seeks in BYTES format · 34a6aced
      Jan Schmidt authored
      If downstream tries to seek in BYTES format, don't pass that through
      to upstream. The byte positions downstream requests won't make any
      sense in the muxed stream. There might be other formats we want to
      pass through to upstream, but BYTES is not one of them. If we get a
      seeking query about BYTES format, refuse that too.
      
      This fixes a situation where we're playing a fragmented mp4 over http
      and qtdemux refuses the initial seek (in TIME format), but then
      h264parse/baseparse send a seek in BYTES format and everything falls
      apart.
      
      Part-of: <!1014>
      34a6aced
  3. 02 Jun, 2021 1 commit
    • Tim-Philipp Müller's avatar
      qtdemux: use g_memdup2() as g_memdup() is deprecated · 21c90afd
      Tim-Philipp Müller authored
      - atom nodes/bytereader sizes are already checked
      - palettes: are fixed/known size
      
      g_memdup() is deprecated since GLib 2.68 and we want to avoid
      deprecation warnings with recent versions of GLib.
      
      Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..).
      
      Part-of: <!993>
      21c90afd
  4. 29 Mar, 2021 1 commit
  5. 04 Feb, 2021 1 commit
  6. 14 Jan, 2021 1 commit
  7. 15 Oct, 2020 1 commit
    • Stéphane Cerveau's avatar
      meson: update glib minimum version to 2.56 · 0429c246
      Stéphane Cerveau authored
      In order to support the symbol g_enum_to_string in various
      project using GStreamer ( gst-validate etc.), the glib minimum
      version should be 2.56.0.
      
      Remove compat code as glib requirement
      is now > 2.56
      
      Version used by Ubuntu 18.04 LTS
      
      Part-of: <!774>
      0429c246
  8. 21 Sep, 2020 4 commits
  9. 16 Sep, 2020 2 commits
    • StefanBruens's avatar
      qtdemux: Add support for AAX encrypted audio streams · ee3ea2a9
      StefanBruens authored and StefanBruens's avatar StefanBruens committed
      This is modelled after the DASH Common Encryption scheme, but is somewhat
      simpler as more parts are fixed, i.e. just one encryption scheme.
      
      The output caps are fixed to 'application/x-aavd'. All information
      required for decryption are part of the 'adrm' atom, which is passed
      on as a property. The property is attached to the buffer.
      
      Part-of: <!577>
      ee3ea2a9
    • StefanBruens's avatar
      qtdemux: Add 'aavd' and related fourcc codes for AAX encrypted audio · 6e68873d
      StefanBruens authored and StefanBruens's avatar StefanBruens committed
      The 'aavd' box is contained in the 'stsd' sample description. The 'aavd'
      box follows the layout of an 'mp4a' entry, i.e. it contains a single
      standard 'esds' extension box, and the two proprietary 'adrm' and 'aabd'
      extension boxes.
      
      Part-of: <!577>
      6e68873d
  10. 07 Sep, 2020 1 commit
  11. 31 Jul, 2020 1 commit
  12. 28 Jul, 2020 1 commit
  13. 21 Jul, 2020 1 commit
    • Stéphane Cerveau's avatar
      qtdemux: add Dolby Vision fourcc · c943be8b
      Stéphane Cerveau authored
      This identifiers are registered in the MPEG-RA and defined
      to be used by the Dolby Vision AVC/HEVC streams.
      
      This is a first step to present the stream to the decoder.
      Additional box parsing of DOVIConfigurationBox is necessary
      to complete the media presentation with proper Dolby Vision
      enhancements.
      
      Part-of: <!658>
      c943be8b
  14. 15 Jul, 2020 2 commits
    • Justin Chadwell's avatar
      qtdemux: fix allocation explosion with stsd entries · 738f32d5
      Justin Chadwell authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      Previously, the user input for stsd entries is trusted completely, and
      so a maliciously crafted file could choose the length of the stsd
      entries arbitrarily and cause qtdemux to try to allocate up to 2GB of
      memory (half of a 32 bit max int).
      
      This patch fixes this by sanity checking the stsd input against the
      size of the entire stsd atom.
      
      Part-of: <!670>
      738f32d5
    • Justin Chadwell's avatar
      qtdemux: fix crashes when input stream contained no stsd entries · e6f66f46
      Justin Chadwell authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
      During trak parsing, we need to check for the existence of stsd_entries,
      otherwise, we end up with a NULL pointer to them. It is entirely
      possible for the stsd to exist, but for it to have no entries, which the
      previous checks did not take into account.
      
      This patch adds a simply check to ensure that all files that do not
      contain a stsd entry are deemed corrupt, and adds a test case to prevent
      a regression.
      
      Part-of: <!670>
      e6f66f46
  15. 18 Jun, 2020 3 commits
  16. 22 Apr, 2020 1 commit
  17. 02 Apr, 2020 1 commit
  18. 10 Mar, 2020 1 commit
  19. 28 Feb, 2020 5 commits
  20. 19 Feb, 2020 1 commit
    • Seungha Yang's avatar
      qtdemux: Parse VP Codec Configuration Box · f286f306
      Seungha Yang authored
      The VP Codec Configuration Box (vpcC) contains vp9 profile and
      colorimetry information. Especially the profile information might
      be useful for downstream to select capable decoder element.
      f286f306
  21. 14 Feb, 2020 2 commits
  22. 27 Jan, 2020 1 commit
    • Sebastian Dröge's avatar
      qtdemux: Always prefer information from v1/v2 sound sample description over... · 5877d945
      Sebastian Dröge authored
      qtdemux: Always prefer information from v1/v2 sound sample description over sample description entry
      
      ffmpeg is doing the same and various files in the wild have bogus
      information in the sample description if the same information is also
      duplicated afterwards in the v1/v2 sound sample desription.
      
      Previously we only did this for non-raw audio due to
        https://bugzilla.gnome.org/show_bug.cgi?id=374914
      but this specific file is already worked around differently. It still
      works after this change.
      
      Also remove ad-hoc GST_READ_DOUBLE_BE re-implementation and move the
      switch for legacy audio formats after reading all the sample
      descriptions as we want to override the values from there.
      5877d945
  23. 09 Jan, 2020 1 commit
    • Alicia Boya García's avatar
      qtdemux: Fix race on pad reconnection · 8dd42666
      Alicia Boya García authored and Thibault Saunier's avatar Thibault Saunier committed
      Elements emitting frames through several srcpads should use a
      flow combiner to aggregate the chain returns and therefore only return
      GST_FLOW_NOT_LINKED to upstream when all the downstream pads have
      received GST_FLOW_NOT_LINKED.
      
      In addition to that, in order to handle pads being relinked downstream,
      the flow combiner should be reset in response to RECONFIGURE events.
      This ensures that a both srcpads process a chain operation before a
      GST_FLOW_NOT_LINKED can be propagated upstream (which would usually stop
      the pipeline).
      
      Otherwise, in a configuration with two srcpads, only one linked at a
      time, after the relink the element could chain data through the now
      unlinked pad and the flow combiner would resolve as GST_FLOW_NOT_LINKED
      (stopping the pipeline) just because the now linked pad has not been
      chained yet to update the flow combiner.
      
      This patch adds handling of RECONFIGURE events to qtdemux. Also, since
      this event handling causes the flow combiner to be used from a thread
      other than the qtdemux streaming thread, usages of the flow combiner
      has been guarded by the object lock.
      8dd42666
  24. 11 Dec, 2019 1 commit
  25. 16 Oct, 2019 1 commit
  26. 05 Oct, 2019 1 commit
  27. 30 Sep, 2019 1 commit
  28. 23 Sep, 2019 1 commit
    • Matthew Waters's avatar
      build: fix werror build with newer gcc · 5ffd7333
      Matthew Waters authored
      In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                       from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/tag/tag.h:25,
                       from ../gst/isomp4/qtdemux.c:56:
      In function ‘qtdemux_inspect_transformation_matrix’,
          inlined from ‘qtdemux_parse_trak’ at ../gst/isomp4/qtdemux.c:10676:5,
          inlined from ‘qtdemux_parse_tree’ at ../gst/isomp4/qtdemux.c:14210:5:
      ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
        645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        646 |         (GObject *) (object), __VA_ARGS__);    \
            |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1062:35: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
       1062 | #define GST_DEBUG_OBJECT(obj,...) GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
            |                                   ^~~~~~~~~~~~~~~~~
      ../gst/isomp4/qtdemux.c:10294:5: note: in expansion of macro ‘GST_DEBUG_OBJECT’
      10294 |     GST_DEBUG_OBJECT (qtdemux, "Transformation matrix rotation %s",
            |     ^~~~~~~~~~~~~~~~
      ../gst/isomp4/qtdemux.c: In function ‘qtdemux_parse_tree’:
      ../gst/isomp4/qtdemux.c:10294:64: note: format string is defined here
      10294 |     GST_DEBUG_OBJECT (qtdemux, "Transformation matrix rotation %s",
            |                                                                ^~
      5ffd7333