Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Krfb Krfb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Network
  • KrfbKrfb
  • Merge requests
  • !14

pipewire: fix image format conversion

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Tobias Junghans requested to merge junghans/krfb:master into master Oct 26, 2020
  • Overview 4
  • Commits 1
  • Changes 1

According to the docs, QImage::convertTo() performs an in-place format conversion after detaching, i.e. it does not operate on the buffer passed to its constructor (which wouldn't even work if a larger buffer is required for the target format). Therefore two flaws in the current implementation need to be fixed:

  • memcpy() has to copy the converted image data to the target buffer
  • the target format should always be QImage::Format_RGBX8888 according to the return value of PWFrameBuffer::depth() - only streams in SPA_VIDEO_FORMAT_RGBx format can be copied directly.

This fixes wrong colors in my setup (QEMU VM with Debian Testing and Gnome) where the PipeWire stream is supplied in SPA_VIDEO_FORMAT_BGRx format.

Edited Oct 26, 2020 by Tobias Junghans
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master