Skip to content
Snippets Groups Projects

audio: video: Optimize by using cached quark for meta tag

Merged Håvard Graff requested to merge hgr/gst-plugins-base:cached-quark into master
All threads resolved!

Avoid taking the global quark lock for every single buffer.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Tim-Philipp Müller added 485 commits

    added 485 commits

    Compare with previous version

  • Tim-Philipp Müller resolved all threads

    resolved all threads

  • So I was going to add the g_once_init_{enter,leave}() bits to the quark getters, then I noticed that the API naming is awkward (gst_meta_tag_audio_quark() rather than gst_audio_*), then I noticed that this is mostly for internal use in the libs anyway, apart from audioconvert/audioresample, and then I couldn't find users for this in good/bad/ugly/elsewhere (other than the rtp plugin that already does some manual caching), so then I started to make it an internal helper function in gstaudio/video, but in the end it seemed easier if every class just does its own private cache for the quark. Better in terms of performance because we can init it in _class_init() and don't need locking or atomic ops, and probably better in terms of code size + binary size too. So I went for KISS for now. We can always decide to expose API for it later after all if we want.

    Edited by Tim-Philipp Müller
  • added 1 commit

    • ccacdc81 - audio: video: Optimize by using cached quark for meta tag

    Compare with previous version

  • added 3 commits

    Compare with previous version

  • changed milestone to %1.17.2

  • Please register or sign in to reply
    Loading