Bug 233731 - [GStreamer] test fast/mediastream/getDisplayMedia-size.html fails
Summary: [GStreamer] test fast/mediastream/getDisplayMedia-size.html fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks: GstWebRTC
  Show dependency treegraph
 
Reported: 2021-12-01 15:56 PST by Arcady Goldmints-Orlov
Modified: 2023-04-28 02:58 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arcady Goldmints-Orlov 2021-12-01 15:56:52 PST
In bug 231286, a case was fixed wherein "a valid applyConstraints on a MediaStreamTrack is now throwing OverconstrainedError. This used to work in earlier versions of safari and has regressed only with Safari 15. Attaching a sample html page that illustrates the issue" and added a test fast/mediastream/getDisplayMedia-size.html for that issue, which fails on GTK and WPE.

The sample HTML page from that issue (https://bug-231286-attachments.webkit.org/attachment.cgi?id=440353) demonstrates the failure on the GTK minibrowser, but works fine in Firefox so presumably this is something that should be fixed.
Comment 1 Philippe Normand 2021-12-02 04:25:08 PST
(In reply to Arcady Goldmints-Orlov from comment #0)

> The sample HTML page from that issue
> (https://bug-231286-attachments.webkit.org/attachment.cgi?id=440353)
> demonstrates the failure on the GTK minibrowser, but works fine in Firefox
> so presumably this is something that should be fixed.

run-minibrowser --gtk --enable-mock-capture-devices=1 "https://bug-231286-attachments.webkit.org/attachment.cgi?id=440353" works fine here

With real devices I get a crash (sorry, no debug symbs)

(gdb) bt
#0  0x00007f457631790a in WebCore::RealtimeVideoCaptureSource::ensureIntrinsicSizeMaintainsAspectRatio() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#1  0x00007f4576c37798 in WebCore::GStreamerVideoCaptureSource::settingsDidChange(WTF::OptionSet<WebCore::RealtimeMediaSourceSettings::Flag>) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#2  0x00007f4576302a87 in WebCore::RealtimeMediaSource::notifySettingsDidChangeObservers(WTF::OptionSet<WebCore::RealtimeMediaSourceSettings::Flag>) ()
    at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#3  0x00007f457630431a in WebCore::RealtimeMediaSource::setSize(WebCore::IntSize const&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#4  0x00007f457631730b in WebCore::RealtimeVideoCaptureSource::setSizeAndFrameRate(std::optional<int>, std::optional<int>, std::optional<double>) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#5  0x00007f45763061ac in WebCore::RealtimeMediaSource::applyConstraints(WebCore::FlattenedConstraint const&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#6  0x00007f4576306382 in WebCore::RealtimeMediaSource::applyConstraints(WebCore::MediaConstraints const&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#7  0x00007f4576c36e94 in WebCore::GStreamerVideoCaptureSource::createPipewireSource(WTF::String&&, int, WTF::String&&, WebCore::MediaConstraints const*, WebCore::CaptureDevice::DeviceType) ()
    at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#8  0x00007f4576c3ba3f in WebCore::GStreamerDisplayCaptureDeviceManager::createDisplayCaptureSource(WebCore::CaptureDevice const&, WebCore::MediaConstraints const*) ()
    at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#9  0x00007f4576c389e4 in WebCore::GStreamerDisplayCaptureSourceFactory::createDisplayCaptureSource(WebCore::CaptureDevice const&, WebCore::MediaConstraints const*) ()
    at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#10 0x00007f4576306ed1 in WebCore::RealtimeMediaSourceCenter::createMediaStream(WTF::Ref<WTF::Logger const, WTF::RawPtrTraits<WTF::Logger const> >&&, WTF::Function<void (std::experimental::fundamentals_v3::expected<WTF::Ref<WebCore::MediaStreamPrivate, WTF::RawPtrTraits<WebCore::MediaStreamPrivate> >, WTF::String>&&)>&&, WTF::String&&, WebCore::CaptureDevice&&, WebCore::CaptureDevice&&, WebCore::MediaStreamRequest const&) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#11 0x00007f4575663994 in WTF::Detail::CallableWrapper<WebCore::UserMediaRequest::allow(WebCore::CaptureDevice&&, WebCore::CaptureDevice&&, WTF::String&&, WTF::CompletionHandler<void ()>&&)::$_5, void>::call()
    () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#12 0x00007f4575afb188 in WebCore::EventLoop::run() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#13 0x00007f4575b85be4 in WebCore::WindowEventLoop::didReachTimeToRun() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#14 0x00007f45761b6773 in WebCore::ThreadTimers::sharedTimerFiredInternal() () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#15 0x00007f45727ea2ec in WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::$_3::__invoke(void*) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#16 0x00007f45727e971a in WTF::RunLoop::$_0::__invoke(_GSource*, int (*)(void*), void*) () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#17 0x00007f456f0e9294 in g_main_dispatch (context=0xbb13d0) at ../glib/gmain.c:3381
#18 g_main_context_dispatch (context=0xbb13d0) at ../glib/gmain.c:4099
#19 0x00007f456f0e9638 in g_main_context_iterate (context=0xbb13d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#20 0x00007f456f0e9943 in g_main_loop_run (loop=0xc5a120) at ../glib/gmain.c:4373
#21 0x00007f45727e9cea in WTF::RunLoop::run() () at /app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0
#22 0x00007f4574c9e69c in WebKit::WebProcessMain(int, char**) () at /app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#23 0x00007f456ea40b90 in __libc_start_main (main=0x4008a0 <main>, argc=3, argv=0x7ffc6d77bb58, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc6d77bb48)
    at ../csu/libc-start.c:332
#24 0x00000000004007de in _start () at ../sysdeps/x86_64/start.S:120
Comment 2 Philippe Normand 2023-04-02 05:01:33 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12292
Comment 3 EWS 2023-04-11 07:48:31 PDT
Committed 262825@main (e5975bd98661): <https://commits.webkit.org/262825@main>

Reviewed commits have been landed. Closing PR #12292 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-04-11 07:49:20 PDT
<rdar://problem/107882604>