Skip to content

Commit

Permalink
[GStreamer][WebRTC] Re-enable auto header extensions on audio/video R…
Browse files Browse the repository at this point in the history
…TP payloaders

https://bugs.webkit.org/show_bug.cgi?id=271242

Reviewed by Xabier Rodriguez-Calvar.

The caps negotiation issues with auto-header-extension enabled seem to have been solved.

* Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingAudioSourceGStreamer::setPayloadType):
* Source/WebCore/platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceGStreamer.cpp:
(WebCore::RealtimeOutgoingVideoSourceGStreamer::setPayloadType):

Canonical link: https://commits.webkit.org/276400@main
  • Loading branch information
philn committed Mar 20, 2024
1 parent 2ec55eb commit 6e2652f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ bool RealtimeOutgoingAudioSourceGStreamer::setPayloadType(const GRefPtr<GstCaps>
return false;
}

// FIXME: Re-enable auto-header-extension. Currently triggers caps negotiation error.
// Align MTU with libwebrtc implementation, also helping to reduce packet fragmentation.
g_object_set(m_payloader.get(), "auto-header-extension", FALSE, "mtu", 1200, nullptr);
g_object_set(m_payloader.get(), "auto-header-extension", TRUE, "mtu", 1200, nullptr);

if (const char* minPTime = gst_structure_get_string(structure, "minptime")) {
auto time = String::fromLatin1(minPTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ bool RealtimeOutgoingVideoSourceGStreamer::setPayloadType(const GRefPtr<GstCaps>
return false;
}

// FIXME: Re-enable auto-header-extension. Currently triggers caps negotiation error.
// Align MTU with libwebrtc implementation, also helping to reduce packet fragmentation.
g_object_set(m_payloader.get(), "auto-header-extension", FALSE, "mtu", 1200, nullptr);
g_object_set(m_payloader.get(), "auto-header-extension", TRUE, "mtu", 1200, nullptr);

if (!videoEncoderSetFormat(WEBKIT_VIDEO_ENCODER(m_encoder.get()), WTFMove(encoderCaps))) {
GST_ERROR_OBJECT(m_bin.get(), "Unable to set encoder format");
Expand Down

0 comments on commit 6e2652f

Please sign in to comment.