gstpipewiresrc: format mismatch / "no more input formats" not handled well, hangs for GST_PIPEWIRE_DEFAULT_TIMEOUT/30 seconds two times
On 0.3.63 / master in case of a format mismatch Pipewire / gstpipewiresrc
takes very long to propagate the error state and make Gstreamer pipelines fail. Further more there's quite a lot of logging to the system journal. Notably this prevents clients from easily falling back to another gstreamer pipeline on error.
Reproducer: pw-crash-reproducer.py (you may have to change the [96,4096,16]
fields to something not matching your screen resolution)
Example log:
pipewire[330517]: pw.context: params Spa:Enum:ParamId:EnumFormat: 0:0 Invalid argument (input format (no more input formats))
pipewire[330517]: default: Object: size 240, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pipewire[330517]: default: Id 2 (Spa:Enum:MediaType:video)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pipewire[330517]: default: Id 1 (Spa:Enum:MediaSubtype:raw)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pipewire[330517]: default: Choice: type Spa:Enum:Choice:None, flags 00000000 20 4
pipewire[330517]: default: Id 8 (Spa:Enum:VideoFormat:BGRx)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pipewire[330517]: default: Choice: type Spa:Enum:Choice:Step, flags 00000000 48 8
pipewire[330517]: default: Rectangle 96x96
pipewire[330517]: default: Rectangle 96x96
pipewire[330517]: default: Rectangle 4096x4096
pipewire[330517]: default: Rectangle 16x16
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pipewire[330517]: default: Choice: type Spa:Enum:Choice:None, flags 00000000 24 8
pipewire[330517]: default: Fraction 0/1
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pipewire[330517]: default: Choice: type Spa:Enum:Choice:None, flags 00000000 24 8
pipewire[330517]: default: Fraction 30/1
pipewire[330517]: pw.context: params Spa:Enum:ParamId:EnumFormat: 1:0 Invalid argument (output format (no more input formats))
pipewire[330517]: default: Object: size 208, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pipewire[330517]: default: Id 2 (Spa:Enum:MediaType:video)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pipewire[330517]: default: Id 1 (Spa:Enum:MediaSubtype:raw)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pipewire[330517]: default: Id 8 (Spa:Enum:VideoFormat:BGRx)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:modifier (131074), flags 00000008
pipewire[330517]: default: Long 72057594037927935
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pipewire[330517]: default: Rectangle 1920x1080
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pipewire[330517]: default: Fraction 0/1
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pipewire[330517]: default: Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pipewire[330517]: default: Fraction 7865349/131072
pipewire[330517]: default: Fraction 1/1
pipewire[330517]: default: Fraction 7865349/131072
pipewire[330517]: default: Object: size 184, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
pipewire[330517]: default: Id 2 (Spa:Enum:MediaType:video)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
pipewire[330517]: default: Id 1 (Spa:Enum:MediaSubtype:raw)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
pipewire[330517]: default: Id 8 (Spa:Enum:VideoFormat:BGRx)
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
pipewire[330517]: default: Rectangle 1920x1080
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
pipewire[330517]: default: Fraction 0/1
pipewire[330517]: default: Prop: key Spa:Pod:Object:Param:Format:Video:maxFramerate (131077), flags 00000000
pipewire[330517]: default: Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
pipewire[330517]: default: Fraction 7865349/131072
pipewire[330517]: default: Fraction 1/1
pipewire[330517]: default: Fraction 7865349/131072
pipewire[330517]: pw.link: (57.0 -> 60.0) negotiating -> error (no more input formats)