Skip to content

Commit

Permalink
Cherry-pick 274464@main (41a2e3c). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=268559

    [GStreamer] Include MpegAudioParse plugin in Brcm Nexus gstreamer pipeline
    https://bugs.webkit.org/show_bug.cgi?id=268559

    Reviewed by Xabier Rodriguez-Calvar.

    On broadcom/nexus with progressive audio, gst_element_query_duration()
    returns wrong values, which is avoided by forcing mpegaudioparse.

    See: WebPlatformForEmbedded/WPEWebKit#1213

    Original author: suresh-khurdiya-epam <skhurdiya.contractor@libertyglobal.com>

    * Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
    (WebCore::ensureGStreamerInitialized): Override mpegaudioparse rank

    Canonical link: https://commits.webkit.org/274464@main

Canonical link: https://commits.webkit.org/266719.370@webkitglib/2.42
  • Loading branch information
vivienne-w authored and aperezdc committed Mar 14, 2024
1 parent e2049d6 commit 3314d2d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,19 @@ bool ensureGStreamerInitialized()
gst_mpegts_initialize();
#endif

#if PLATFORM(BCM_NEXUS)
{
auto registry = gst_registry_get();
GRefPtr<GstPluginFeature> brcmaudfilter = adoptGRef(gst_registry_lookup_feature(registry, "brcmaudfilter"));
GRefPtr<GstPluginFeature> mpegaudioparse = adoptGRef(gst_registry_lookup_feature(registry, "mpegaudioparse"));

if (brcmaudfilter && mpegaudioparse) {
GST_INFO("overriding mpegaudioparse rank with brcmaudfilter rank + 1");
gst_plugin_feature_set_rank(mpegaudioparse.get(), gst_plugin_feature_get_rank(brcmaudfilter.get()) + 1);
}
}
#endif

registerAppsinkWithWorkaroundsIfNeeded();
#endif
});
Expand Down

0 comments on commit 3314d2d

Please sign in to comment.