Webrtcsink on Windows (MSVC) doesn't work when forced to use H264

Hi, I’m currently developing an application with webrtcsink which needs to run on Windows. I’ve installed the MSVC versions of the devel and runtime packages from the official site (Mingw version doen’t seem to include webrtcsink). Running this command

gst-launch-1.0 videotestsrc ! videoconvert ! webrtcsink signaller::uri="<signaller>"

works fine and even uses the amfh264enc encoder (I have an AMD gpu, haven’t tested with Nvidia). When using the option video-caps="video/x-h264" the pipeline fails and this is what I get (with GST_DEBUG="webrtcsink:6"):

Use Windows high-resolution clock, precision: 1 ms
Setting pipeline to PAUSED ...
0:00:00.038104800  9480 0000017113AFE1E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1877:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::prepare:<webrtcsink0> preparing
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.043992300  9480 0000017113AF5400 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3614:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::sink_event:<webrtcsink0:video_0> Received caps event Caps { seqnum: Seqnum(34), running-time-offset: 0, structure: Some(GstEventCaps { caps: (GstCaps) video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive }), caps: Caps(video/x-raw(memory:SystemMemory) { width: (gint) 320, height: (gint) 240, framerate: (GstFraction) 30/1, multiview-mode: (gchararray) "mono", format: (gchararray) "A444_16LE", pixel-aspect-ratio: (GstFraction) 1/1, interlace-mode: (gchararray) "progressive" }) }
New clock: GstSystemClock
Redistribute latency...
0:00:00.067521000  9480 0000017113BBA990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3285:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive and output caps ANY with codec Codec { name: "H264", caps: Caps(video/x-h264(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x17113aa07e0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x17113ad7000, type: GstElementFactory } }, output_filter: None }) }
0:00:00.086029900  9480 0000017113BBA990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3291:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline
0:00:00.205004200  9480 0000017113BBA990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:4109:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x171315645a0, type: GstAmfH264Enc } }
0:00:00.213273400  9480 0000017113BBA990 ERROR             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1565:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::configure_congestion_control:<webrtcsink0> Bitrate handling is not supported yet for amfh264enc
Got context from element 'amfh264enc0': gst.d3d11.device.handle=context, device=(GstD3D11Device)"\(GstD3D11Device\)\ d3d11device1", adapter=(uint)0, adapter-luid=(gint64)56230, device-id=(uint)29471, vendor-id=(uint)4098, hardware=(boolean)true, description=(string)"AMD\ Radeon\ RX\ 5600\ XT";
0:00:00.302217000  9480 0000017113BBA990 WARN              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3373:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Error in discovery pipeline: Error {
    structure: Some(
        GstMessageError {
            gerror: (GError) ((GError*) 0000017113FB01A0),
            debug: (gchararray) "../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline1/GstAppSrc:appsrc0:\nstreaming stopped, reason not-negotiated (-4)",
            details: Structure(
                details {
                    flow-return: (gint) -4,
                },
            ),
        },
    ),
    source: Some(
        (
            Object {
                inner: TypedObjectRef {
                    inner: 0x0000017113ca4ec0,
                    type: GstAppSrc,
                },
            },
            "appsrc0",
        ),
    ),
    error: Error {
        domain: gst-stream-error-quark,
        code: 1,
        message: "Internal data stream error.",
    },
    debug: Some(
        "../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline1/GstAppSrc:appsrc0:\nstreaming stopped, reason not-negotiated (-4)",
    ),
    details: Some(
        details {
            flow-return: (gint) -4,
        },
    ),
}
0:00:00.331777500  9480 0000017113BBA990 WARN              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3523:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::lookup_caps::{{closure}}:<webrtcsink0> Codec discovery pipeline failed: Internal data stream error.
0:00:00.337422500  9480 0000017113BBA990 ERROR             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3729:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_stream_discovery_if_needed::{{closure}}:<webrtcsink0> Error running discovery: No caps found for stream video_0
ERROR: from element /GstPipeline:pipeline0/GstWebRTCSink:webrtcsink0: There is no codec present that can handle the stream's type.
Additional debug info:
net\webrtc\src\webrtcsink\imp.rs(3730): gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_stream_discovery_if_needed::{{closure}} (): /GstPipeline:pipeline0/GstWebRTCSink:webrtcsink0:
Failed to look up output caps: No caps found for stream video_0
Execution ended after 0:00:00.307780600
Setting pipeline to NULL ...
0:00:00.354291900  9480 0000017113AFE1E0 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:1892:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> unpreparing
0:00:00.358899900  9480 0000017113AFE1E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1916:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> Waiting for codec discoveries to finish
0:00:00.363736900  9480 0000017113AFE1E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1923:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> No codec discovery is running anymore
0:00:00.368664900  9480 0000017113AFE1E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1934:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> Ending sessions
0:00:00.373187200  9480 0000017113AFE1E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1938:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> All sessions have started finalizing
0:00:00.378754700  9480 0000017113AFE1E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1954:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> All sessions are done finalizing
Freeing pipeline ...

Setting other video caps works properly.
This is the output for the working command (the first one in this post):

Use Windows high-resolution clock, precision: 1 ms
Setting pipeline to PAUSED ...
0:00:00.039868500 10332 000002B853F811E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1877:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::prepare:<webrtcsink0> preparing
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.045579800 10332 000002B853F78400 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3614:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::sink_event:<webrtcsink0:video_0> Received caps event Caps { seqnum: Seqnum(34), running-time-offset: 0, structure: Some(GstEventCaps { caps: (GstCaps) video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive }), caps: Caps(video/x-raw(memory:SystemMemory) { width: (gint) 320, height: (gint) 240, framerate: (GstFraction) 30/1, multiview-mode: (gchararray) "mono", format: (gchararray) "A444_16LE", pixel-aspect-ratio: (GstFraction) 1/1, interlace-mode: (gchararray) "progressive" }) }
New clock: GstSystemClock
Redistribute latency...
0:00:00.068198000 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3285:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive and output caps ANY with codec Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f75d20, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f5a380, type: GstElementFactory } }, output_filter: None }) }
0:00:00.085537600 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3291:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline
0:00:00.134698200 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:4109:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x2b8541e5dc0, type: GstVP8Enc } }
0:00:00.143054200 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1581:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::configure_congestion_control:<rtpvp8pay0> Mapping TWCC extension to ID 1
0:00:00.158401100 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3285:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive and output caps ANY with codec Codec { name: "H264", caps: Caps(video/x-h264(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(97), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f317e0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f58000, type: GstElementFactory } }, output_filter: None }) }
0:00:00.178402100 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3291:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline
0:00:00.300399100 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:4109:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x2b851cbb810, type: GstAmfH264Enc } }
0:00:00.308822800 10332 000002B854033990 ERROR             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1565:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::configure_congestion_control:<webrtcsink0> Bitrate handling is not supported yet for amfh264enc
Got context from element 'amfh264enc0': gst.d3d11.device.handle=context, device=(GstD3D11Device)"\(GstD3D11Device\)\ d3d11device1", adapter=(uint)0, adapter-luid=(gint64)56230, device-id=(uint)29471, vendor-id=(uint)4098, hardware=(boolean)true, description=(string)"AMD\ Radeon\ RX\ 5600\ XT";
0:00:00.356636600 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3285:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive and output caps ANY with codec Codec { name: "VP9", caps: Caps(video/x-vp9(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(98), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f75ee0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f5a540, type: GstElementFactory } }, output_filter: None }) }
0:00:00.373410700 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3291:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline
0:00:00.420909300 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:4109:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x2b8545f81d0, type: GstVP9Enc } }
0:00:00.429429600 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1581:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::configure_congestion_control:<rtpvp9pay0> Mapping TWCC extension to ID 1
0:00:00.439973700 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3285:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive and output caps ANY with codec Codec { name: "H265", caps: Caps(video/x-h265(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(99), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f318c0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f581c0, type: GstElementFactory } }, output_filter: None }) }
0:00:00.459495300 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3291:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline
0:00:00.506469300 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:4109:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x2b87308cbd0, type: GstAmfH265Enc } }
0:00:00.514752800 10332 000002B854033990 ERROR             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1565:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::configure_congestion_control:<webrtcsink0> Bitrate handling is not supported yet for amfh265enc
0:00:00.530040200 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3285:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive and output caps ANY with codec Codec { name: "AV1", caps: Caps(video/x-av1(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(100), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f52ee0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f530e0, type: GstElementFactory } }, output_filter: None }) }
0:00:00.549079400 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3291:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Running discovery pipeline
0:00:00.597354200 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:4109:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x2b8732570d0, type: GstRav1Enc } }
0:00:00.605464100 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1581:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::configure_congestion_control:<rtpav1pay0> Mapping TWCC extension to ID 1
0:00:00.611085200 10332 000002B854033990 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3406:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Discovery pipeline got caps Caps(application/x-rtp(memory:SystemMemory) { media: (gchararray) "video", clock-rate: (gint) 90000, encoding-name: (gchararray) "VP8", payload: (gint) 96, ssrc: (guint) 1894116499, timestamp-offset: (guint) 204165525, seqnum-offset: (guint) 20857, a-framerate: (gchararray) "30", extmap-1: (gchararray) "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01" })
0:00:00.624267900 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3422:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Codec discovery pipeline for caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive with codec Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f75d20, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f5a380, type: GstElementFactory } }, output_filter: None }) } succeeded: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8, payload=(int)96, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01;
0:00:00.647741300 10332 000002B854033990 WARN              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3373:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Error in discovery pipeline: Error {
    structure: Some(
        GstMessageError {
            gerror: (GError) ((GError*) 000002B8541C8770),
            debug: (gchararray) "../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline2/GstAppSrc:appsrc1:\nstreaming stopped, reason not-negotiated (-4)",
            details: Structure(
                details {
                    flow-return: (gint) -4,
                },
            ),
        },
    ),
    source: Some(
        (
            Object {
                inner: TypedObjectRef {
                    inner: 0x000002b854200740,
                    type: GstAppSrc,
                },
            },
            "appsrc1",
        ),
    ),
    error: Error {
        domain: gst-stream-error-quark,
        code: 1,
        message: "Internal data stream error.",
    },
    debug: Some(
        "../libs/gst/base/gstbasesrc.c(3177): gst_base_src_loop (): /GstPipeline:pipeline2/GstAppSrc:appsrc1:\nstreaming stopped, reason not-negotiated (-4)",
    ),
    details: Some(
        details {
            flow-return: (gint) -4,
        },
    ),
}
0:00:00.667554700 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc0> Failed to push buffer: Pad is flushing
... bunch of similar lines (I could not copy the entire output due to the character limit) ...
0:00:00.691285700 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc0> Failed to push buffer: Pad is flushing
0:00:00.696646300 10332 000002B854033990 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3406:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Discovery pipeline got caps Caps(application/x-rtp(memory:SystemMemory) { media: (gchararray) "video", clock-rate: (gint) 90000, encoding-name: (gchararray) "VP9", payload: (gint) 98, ssrc: (guint) 1228874170, timestamp-offset: (guint) 4189931118, seqnum-offset: (guint) 10468, a-framerate: (gchararray) "30", extmap-1: (gchararray) "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01" })
0:00:00.701492200 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc0> Failed to push buffer: Pad is flushing
0:00:00.713972800 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc1> Failed to push buffer: Pad is flushing
0:00:00.709741600 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3422:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Codec discovery pipeline for caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive with codec Codec { name: "VP9", caps: Caps(video/x-vp9(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(98), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f75ee0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f5a540, type: GstElementFactory } }, output_filter: None }) } succeeded: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP9, payload=(int)98, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01;
0:00:00.718437800 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc0> Failed to push buffer: Pad is flushing
... same ...
0:00:00.768546300 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc2> Failed to push buffer: Pad is flushing
0:00:00.762618100 10332 000002B854033990 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3406:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Discovery pipeline got caps Caps(application/x-rtp(memory:SystemMemory) { media: (gchararray) "video", clock-rate: (gint) 90000, encoding-name: (gchararray) "H265", sprop-vps: (gchararray) "QAEMAf//AiAAAAMAsAAAAwAAAwC6LAk=", sprop-sps: (gchararray) "QgEBAiAAAAMAsAAAAwAAAwC6oAoIDxNy5JClZLj/wABAAFqDAwKCAAADAAIAAAMAPYg=", sprop-pps: (gchararray) "RAHg88BMkA==", payload: (gint) 99, ssrc: (guint) 2807407616, timestamp-offset: (guint) 1874228004, seqnum-offset: (guint) 30377, a-framerate: (gchararray) "30" })
0:00:00.772964000 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc0> Failed to push buffer: Pad is flushing
0:00:00.792008500 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc1> Failed to push buffer: Pad is flushing
0:00:00.787620900 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3422:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Codec discovery pipeline for caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive with codec Codec { name: "H265", caps: Caps(video/x-h265(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(99), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f318c0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f581c0, type: GstElementFactory } }, output_filter: None }) } succeeded: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265, sprop-vps=(string)"QAEMAf//AiAAAAMAsAAAAwAAAwC6LAk\=", sprop-sps=(string)"QgEBAiAAAAMAsAAAAwAAAwC6oAoIDxNy5JClZLj/wABAAFqDAwKCAAADAAIAAAMAPYg\=", sprop-pps=(string)"RAHg88BMkA\=\=", payload=(int)99;
0:00:00.796061900 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc2> Failed to push buffer: Pad is flushing
... same ...
0:00:01.446920000 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc3> Failed to push buffer: Pad is flushing
0:00:01.454511100 10332 000002B854033990 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3406:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Discovery pipeline got caps Caps(application/x-rtp(memory:SystemMemory) { media: (gchararray) "video", clock-rate: (gint) 90000, encoding-name: (gchararray) "AV1", payload: (gint) 100, ssrc: (guint) 3825858446, timestamp-offset: (guint) 915859864, seqnum-offset: (guint) 10554, a-framerate: (gchararray) "30", extmap-1: (gchararray) "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01" })
0:00:01.467404300 10332 000002B854033990 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:3422:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<webrtcsink0> Codec discovery pipeline for caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)A444_16LE, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive with codec Codec { name: "AV1", caps: Caps(video/x-av1(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(100), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f52ee0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x2b853f530e0, type: GstElementFactory } }, output_filter: None }) } succeeded: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)AV1, payload=(int)100, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01;
0:00:01.468137600 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc0> Failed to push buffer: Pad is flushing
... same ...
0:00:01.503324100 10332 000002B853F78400 LOG               webrtcsink net\webrtc\src\webrtcsink\imp.rs:3664:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::feed_discoveries:<appsrc3> Failed to push buffer: Pad is flushing
0:00:01.510805900 10332 000002B854033990 WARN              webrtcsink net\webrtc\src\webrtcsink\imp.rs:3523:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::lookup_caps::{{closure}}:<webrtcsink0> Codec discovery pipeline failed: Internal data stream error.
handling interrupt.9.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.623359300
Setting pipeline to NULL ...
0:00:04.671592300 10332 000002B853F811E0 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:1892:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> unpreparing
0:00:04.675182600 10332 000002B853F811E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1916:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> Waiting for codec discoveries to finish
0:00:04.679390500 10332 000002B853F811E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1923:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> No codec discovery is running anymore
0:00:04.684055600 10332 000002B853F811E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1934:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> Ending sessions
0:00:04.687846200 10332 000002B853F811E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1938:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> All sessions have started finalizing
0:00:04.692129200 10332 000002B853F811E0 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:1941:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> Stopping signaller
0:00:04.695873600 10332 000002B853F811E0 INFO              webrtcsink net\webrtc\src\webrtcsink\imp.rs:1943:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> Stopped signaller
0:00:04.700597800 10332 000002B853F811E0 DEBUG             webrtcsink net\webrtc\src\webrtcsink\imp.rs:1954:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<webrtcsink0> All sessions are done finalizing

This is my first time using Gstreamer, so I may have misunderstood the purpose of the video-caps property. If so, how can I limit the codecs used? I also tried linking amfh264enc directly into webrtcsink with some success but I’m not sure if it’s the correct way to do so.