Bug 233826 - [GStreamer] Fill in client-name property on audio sinks
Summary: [GStreamer] Fill in client-name property on audio sinks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-03 10:24 PST by Philippe Normand
Modified: 2021-12-08 12:23 PST (History)
13 users (show)

See Also:


Attachments
Patch (12.24 KB, patch)
2021-12-06 06:40 PST, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (12.50 KB, patch)
2021-12-08 09:46 PST, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2021-12-03 10:24:27 PST
SSIA
Comment 1 Philippe Normand 2021-12-06 06:40:41 PST
Created attachment 446036 [details]
Patch
Comment 2 Philippe Normand 2021-12-06 06:42:56 PST
Comment on attachment 446036 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446036&action=review

> Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:458
> +    }), role.releaseImpl().leakRef());

Hm, this is not looking good... i'll revisit this part.
Comment 3 Xabier Rodríguez Calvar 2021-12-07 07:27:06 PST
Comment on attachment 446036 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446036&action=review

> Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:145
> -        g_signal_connect(audioSink.get(), "child-added", G_CALLBACK(autoAudioSinkChildAddedCallback), nullptr);
> +        g_signal_connect(audioSink.get(), "child-added", G_CALLBACK(+[](GstChildProxy*, GObject* object, gchar*, gpointer) {
> +            if (GST_IS_AUDIO_BASE_SINK(object))
> +                g_object_set(GST_AUDIO_BASE_SINK(object), "buffer-time", static_cast<gint64>(100000), nullptr);
> +        }), nullptr);

Please, mention this drive-by reorganization on the changelog.

>> Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:458
>> +    }), role.releaseImpl().leakRef());
> 
> Hm, this is not looking good... i'll revisit this part.

Definitely looking not good. I guess you'll have to g_strdup and use g_signal_connect_data to provide the GClosureNotify to destroy it.

> Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:310
> +GstElement* createAutoAudioSink(String role);
> +GstElement* createPlatformAudioSink(const char* role);

Why don't you use const String& for both?
Comment 4 Philippe Normand 2021-12-08 09:46:05 PST
Created attachment 446378 [details]
Patch
Comment 5 EWS 2021-12-08 12:21:56 PST
Committed r286676 (244982@main): <https://commits.webkit.org/244982@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446378 [details].
Comment 6 Radar WebKit Bug Importer 2021-12-08 12:23:21 PST
<rdar://problem/86224065>