Skip to content

Commit

Permalink
[GStreamer][WebRTC] RTP VPx payloader tweaks
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258872

Reviewed by Xabier Rodriguez-Calvar.

Set the picture ID field size to 15 bits on VP8 and VP9 RTP payloaders, this is recommended for
WebRTC scenarios.

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

Canonical link: https://commits.webkit.org/265794@main
  • Loading branch information
philn committed Jul 6, 2023
1 parent 74c3186 commit 66f9428
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,14 @@ bool RealtimeOutgoingVideoSourceGStreamer::setPayloadType(const GRefPtr<GstCaps>

GRefPtr<GstCaps> encoderCaps;
if (encoding == "vp8"_s) {
if (gstObjectHasProperty(m_payloader.get(), "picture-id-mode"))
gst_util_set_object_arg(G_OBJECT(m_payloader.get()), "picture-id-mode", "15-bit");

encoderCaps = adoptGRef(gst_caps_new_empty_simple("video/x-vp8"));
} else if (encoding == "vp9"_s) {
if (gstObjectHasProperty(m_payloader.get(), "picture-id-mode"))
gst_util_set_object_arg(G_OBJECT(m_payloader.get()), "picture-id-mode", "15-bit");

encoderCaps = adoptGRef(gst_caps_new_empty_simple("video/x-vp9"));
if (const char* vp9Profile = gst_structure_get_string(structure, "vp9-profile-id"))
gst_caps_set_simple(encoderCaps.get(), "profile", G_TYPE_STRING, vp9Profile, nullptr);
Expand Down

0 comments on commit 66f9428

Please sign in to comment.