Pipewiresrc audio inputs caps error, recognized as image or video

Hi
I’m on Gentoo Linux 6.7.10 with pipewire 1.0.4 and gstreamer 1.22.3 on hyprland (Wayland) with 13th Gen Intel(R) Core™ i7-13700KF

when I execute gst-device-monitor-1.0 Audio/Source it shows my usb camera and my built in audio device and how to use them as pipewiresrc with gst-launch.

when I try to use any of the devices to record a wav file i get the error
wrong name 'audio/x-raw', expected video/ or image/

if i use alsasrc or connect the camera to my mac and using the camera with osxaudiosrc i have no problems at all, it seems that only pipewiresrc is causing problems.

for an example lets take my camera, the device monitor shows this information:


	name  : HD Pro Webcam C920 Analog Stereo
	class : Audio/Source
	caps  : audio/x-raw, layout=interleaved, format=S16LE, rate=[ 16000, 32000 ], channels=2
	properties:
		alsa.card = 0
		alsa.card_name = HD Pro Webcam C920
		alsa.class = generic
		alsa.device = 0
		alsa.driver_name = snd_usb_audio
		alsa.id = USB Audio
		alsa.long_card_name = HD Pro Webcam C920 at usb-0000:00:14.0-9.2, high speed
		alsa.name = USB Audio
		alsa.resolution_bits = 16
		alsa.subclass = generic-mix
		alsa.subdevice = 0
		alsa.subdevice_name = subdevice #0
		api.alsa.card.longname = HD Pro Webcam C920 at usb-0000:00:14.0-9.2, high speed
		api.alsa.card.name = HD Pro Webcam C920
		api.alsa.path = front:0
		api.alsa.pcm.card = 0
		api.alsa.pcm.stream = capture
		audio.channels = 2
		audio.position = FL,FR
		card.profile.device = 0
		device.api = alsa
		device.class = sound
		device.id = 51
		device.profile.description = Analog Stereo
		device.profile.name = analog-stereo
		device.routes = 1
		factory.name = api.alsa.pcm.source
		media.class = Audio/Source
		node.description = HD Pro Webcam C920 Analog Stereo
		node.name = alsa_input.usb-046d_HD_Pro_Webcam_C920_B71E5BFF-02.analog-stereo
		node.nick = HD Pro Webcam C920
		node.pause-on-idle = false
		object.path = alsa:pcm:0:front:0:capture
		priority.driver = 2009
		priority.session = 2009
		factory.id = 18
		clock.quantum-limit = 8192
		client.id = 32
		node.driver = true
		factory.mode = split
		audio.adapt.follower = 
		library.name = audioconvert/libspa-audioconvert
		object.id = 47
		object.serial = 63
	gst-launch-1.0 pipewiresrc target-object=63 ! ...

and this is what i execute and the result i’m seeing:

$ gst-launch-1.0 --gst-debug-level=3 pipewiresrc target-object=67 ! audioconvert ! audioresample ! wavenc ! filesink location=output.wav
Setting pipeline to PAUSED ...
0:00:00.013516685 88390 0x7fe13c000b70 FIXME                default gstutils.c:4036:gst_pad_create_stream_id_internal:<pipewiresrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.019058825 88390 0x7fe134002550 ERROR             video-info video-info.c:540:gst_video_info_from_caps: wrong name 'audio/x-raw', expected video/ or image/
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: pipewireclock0
Redistribute latency...
0:00:00.0 / 99:99:99.

i’m not sure if the next information is also helpful but just in case, i’m trying to write my first plugin for gstreamer, and i noticed that only the first buffer contains metadata, but the rest do not, which is causing clock time to be set at 99:99:99, i didn’t notice this behavior testing it with anything else, every packet would get a metadata.

i feel inlove with the gstreamer project but i’m new to everything here so i’m not sure if that’s a bug or i’m missing something, so any information would be greatly appreciated.

thank you

i got some more information for another guy who tested and it seems like there is a bug with pipewiresrc