Skip to content
Snippets Groups Projects
  1. Jan 17, 2020
    • Nirbheek Chauhan's avatar
      msdk: Fix increasing memory usage in dynamic pipelines · 1dd3fb27
      Nirbheek Chauhan authored
      Our context is non-persistent, and we propagate it throughout the
      pipeline. This means that if we try to reuse any gstmsdk element by
      removing it from the pipeline and then re-adding it, we'll clone the
      mfxSession and create a new gstmsdk context as a child of the old one
      inside `gst_msdk_context_new_with_parent()`.
      
      Normally this only allocates a few KB inside the driver, but on
      Windows it seems to allocate tens of MBs which leads to linearly
      increasing memory usage for each PLAYING->NULL->PLAYING state cycle
      for the process. The contexts will only be freed when the pipeline
      itself goes to `NULL`, which would defeat the purpose of dynamic
      pipelines.
      
      Essentially, we need to optimize the case in which the element is
      removed from the pipeline and re-added and the same context is re-set
      on it. To detect that case, we set the context on `old_context`, and
      compare it to the new one when preparing the context. If they're the
      same, we don't need to do anything.
      
      Fixes gstreamer/gst-plugins-bad#946
      1dd3fb27
    • Nirbheek Chauhan's avatar
      msdk: Reorganize context preparation code · eb66a2eb
      Nirbheek Chauhan authored
      Split it out into a separate function with early exits to make the
      flow clearer, and document what the function is doing clearly.
      No functional changes.
      eb66a2eb
    • Nirbheek Chauhan's avatar
    • Nirbheek Chauhan's avatar
      msdk: Only use video memory when using hardware codecs · 6efc8ff4
      Nirbheek Chauhan authored
      If we're using the software implementation, we should not use video
      memory because that will be too slow.
      6efc8ff4
    • Nirbheek Chauhan's avatar
      msdk: Use gst_clear_object() · ce2a94f5
      Nirbheek Chauhan authored
      `gst_object_replace()` is not supposed to be used for unreffing and
      NULLing objects.
      ce2a94f5
  2. Jan 15, 2020
  3. Jan 14, 2020
  4. Jan 13, 2020
  5. Jan 12, 2020
  6. Jan 11, 2020
  7. Jan 10, 2020
  8. Jan 09, 2020
Loading