Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer gstreamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 714
    • Issues 714
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 376
    • Merge requests 376
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gstreamergstreamer
  • Merge requests
  • !1520

wavenc: fix writing channel map

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Tomasz Andrzejak requested to merge andreiltd/gstreamer:main into main Jan 13, 2022
  • Overview 0
  • Commits 1
  • Pipelines 7
  • Changes 1

Position mask should be build out of masks rather than channel values.

Try to create a wav file with following channel map:

Channels: 10 (front-left, front-right, front-center, lfe1, rear-left, rear-right, top-front-left, top-front-right, top-rear-left, top-rear-right)

with

gst-launch-1.0 -v audiotestsrc num-buffers=10 ! "audio/x-raw,channels=10,channel-mask=(bitmask)0x3303f" ! wavenc ! filesink location=out.wav
  • Before patch:

wavenc gstwavenc.c:490:gst_wavenc_sink_setcaps:<wavenc0> Channel mask input: 0x3303f output: 0x0

gst-discoverer-1.0 out.wav
Analyzing file:///out.wav
Done discovering file:///out.wav

Properties:
  Duration: 0:00:00.232199547
  Seekable: yes
  Live: no
  audio #0: WAV
    Stream ID: 108c10f8631165a7e68549fb47270246
    Language: <unknown>
    Channels: 10 (unknown layout)
    Sample rate: 44100
    Depth: 16
    Bitrate: 7056000
    Max bitrate: 0
  • After patch:

wavenc gstwavenc.c:490:gst_wavenc_sink_setcaps:<wavenc0> Channel mask input: 0x3303f output: 0x2d03f

gst-discoverer-1.0 out.wav
Analyzing file:///out.wav
Done discovering file:///out.wav

Properties:
  Duration: 0:00:00.232199547
  Seekable: yes
  Live: no
  audio #0: WAV
    Stream ID: ca23499c0f0651d11d00e976395c1db0
    Language: <unknown>
    Channels: 10 (front-left, front-right, front-center, lfe1, rear-left, rear-right, top-front-left, top-front-right, top-rear-left, top-rear-right)
    Sample rate: 44100
    Depth: 16
    Bitrate: 7056000
    Max bitrate: 0
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: main