From deblauwetom at gmail.com Mon Jun 15 10:42:38 2015 From: deblauwetom at gmail.com (Tom Deblauwe) Date: Mon, 15 Jun 2015 10:42:38 +0200 Subject: [Qtwebengine] qt 5.5.0 beta Message-ID: <557E8FFE.3090305@gmail.com> Hello, I am trying out Qt 5.5.0-beta with webengine on buildroot. I am using X11, with the xcb platform plugin. I can succesfully start regular Qt apps, but when I want to use webengine in QML, then I have a crash when the webengine qml component initializes. It crashes in a call surrounded by an "USE_OZONE" ifdef: ui::OzonePlatform::GetInstance() ->GetGpuPlatformSupport() ->OnChannelEstablished(this); Is ozone always needed? I saw in the "embedded_linux.pri" that there is also a "use_x11=0" entry. Would it work if I would set that to "use_x11=1" and leave the rest as-is? This is the backtrace I get: 0 content::GpuChildThread::OnInitialize gpu_child_thread.cc 180 0xae3c2b4a 1 IPC::Message::Dispatch ipc_message.h 152 0xae3c3e77 2 content::GpuChildThread::OnControlMessageReceived gpu_child_thread.cc 114 0xae3c2394 3 content::ChildThread::OnMessageReceived child_thread.cc 500 0xb026b2b9 4 IPC::ChannelProxy::Context::OnDispatchMessage ipc_channel_proxy.cc 274 0xb1ff09b9 5 base::internal::RunnableAdapter::Run bind_internal.h 190 0xb1ff38bd 6 base::internal::InvokeHelper, void (IPC::ChannelProxy::Context* const&, IPC::Message const&)>::MakeItSo(base::internal::RunnableAdapter, IPC::ChannelProxy::Context* const&, IPC::Message const&) bind_internal.h 898 0xb1ff3588 7 base::internal::Invoker<2, base::internal::BindState, void (IPC::ChannelProxy::Context*, IPC::Message const&), void (IPC::ChannelProxy::Context*, IPC::Message)>, void (IPC::ChannelProxy::Context*, IPC::Message const&)>::Run(base::internal::BindStateBase*) bind_internal.h 1253 0xb1ff30e2 8 base::Callback::Run() const callback.h 401 0xae2c4af3 9 base::debug::TaskAnnotator::RunTask task_annotator.cc 63 0xb1f0a6a1 10 base::MessageLoop::RunTask message_loop.cc 447 0xb1f65ecd 11 base::MessageLoop::DeferOrRunPendingTask message_loop.cc 456 0xb1f65f9e 12 base::MessageLoop::DoWork message_loop.cc 565 0xb1f664e1 13 base::MessagePumpDefault::Run message_pump_default.cc 32 0xb1f6c438 14 base::MessageLoop::RunHandler message_loop.cc 415 0xb1f65bb9 15 base::RunLoop::Run run_loop.cc 55 0xb1f97aa5 16 base::MessageLoop::Run message_loop.cc 308 0xb1f6524b 17 base::Thread::Run thread.cc 174 0xb1fcae71 18 base::Thread::ThreadMain thread.cc 228 0xb1fcb122 19 base::(anonymous namespace)::ThreadFunc platform_thread_posix.cc 80 0xb1fc0729 20 start_thread pthread_create.c 310 0xb587211f ... Best regards, Tom, From andras.becsi at theqtcompany.com Mon Jun 15 11:02:50 2015 From: andras.becsi at theqtcompany.com (Andras Becsi) Date: Mon, 15 Jun 2015 11:02:50 +0200 Subject: [Qtwebengine] qt 5.5.0 beta In-Reply-To: <557E8FFE.3090305@gmail.com> References: <557E8FFE.3090305@gmail.com> Message-ID: <557E94BA.7050804@theqtcompany.com> Hi Tom, QtWebEngine does not support embedded setups with X11 out-of-the-box, so yes, your config can possibly work if you enable use_x11 in the config pri, but it is not guaranteed to be functional, since the only supported reference platform is the one provided by the Qt Enterprise Embedded / Boot2Qt stack, which uses the eglfs platform plugin. This means you'll probably have to dig into the configuration and try out things yourself, but since your setup is basically equivalent with a desktop setup, you could also try using the desktop_linux.pri configuration. For this you'll probably have to tweak gyp_run.pro a bit. /Andras On 06/15/2015 10:42 AM, Tom Deblauwe wrote: > Hello, > > I am trying out Qt 5.5.0-beta with webengine on buildroot. I am using > X11, with the xcb platform plugin. I can succesfully start regular Qt > apps, but when I want to use webengine in QML, then I have a crash when > the webengine qml component initializes. It crashes in a call surrounded > by an "USE_OZONE" ifdef: > > ui::OzonePlatform::GetInstance() > ->GetGpuPlatformSupport() > ->OnChannelEstablished(this); > > Is ozone always needed? I saw in the "embedded_linux.pri" that there is > also a "use_x11=0" entry. Would it work if I would set that to > "use_x11=1" and leave the rest as-is? > > This is the backtrace I get: > > 0 content::GpuChildThread::OnInitialize gpu_child_thread.cc 180 > 0xae3c2b4a > 1 IPC::Message::Dispatch content::GpuChildThread, void> ipc_message.h 152 0xae3c3e77 > 2 content::GpuChildThread::OnControlMessageReceived > gpu_child_thread.cc 114 0xae3c2394 > 3 content::ChildThread::OnMessageReceived child_thread.cc 500 > 0xb026b2b9 > 4 IPC::ChannelProxy::Context::OnDispatchMessage > ipc_channel_proxy.cc 274 0xb1ff09b9 > 5 base::internal::RunnableAdapter (IPC::ChannelProxy::Context::*)(IPC::Message const&)>::Run > bind_internal.h 190 0xb1ff38bd > 6 base::internal::InvokeHelper base::internal::RunnableAdapter (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void > (IPC::ChannelProxy::Context* const&, IPC::Message > const&)>::MakeItSo(base::internal::RunnableAdapter (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, > IPC::ChannelProxy::Context* const&, IPC::Message const&) > bind_internal.h 898 0xb1ff3588 > 7 base::internal::Invoker<2, > base::internal::BindState (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void > (IPC::ChannelProxy::Context*, IPC::Message const&), void > (IPC::ChannelProxy::Context*, IPC::Message)>, void > (IPC::ChannelProxy::Context*, IPC::Message > const&)>::Run(base::internal::BindStateBase*) bind_internal.h 1253 > 0xb1ff30e2 > 8 base::Callback::Run() const callback.h 401 0xae2c4af3 > 9 base::debug::TaskAnnotator::RunTask task_annotator.cc 63 > 0xb1f0a6a1 > 10 base::MessageLoop::RunTask message_loop.cc 447 0xb1f65ecd > 11 base::MessageLoop::DeferOrRunPendingTask message_loop.cc 456 > 0xb1f65f9e > 12 base::MessageLoop::DoWork message_loop.cc 565 0xb1f664e1 > 13 base::MessagePumpDefault::Run message_pump_default.cc 32 > 0xb1f6c438 > 14 base::MessageLoop::RunHandler message_loop.cc 415 0xb1f65bb9 > 15 base::RunLoop::Run run_loop.cc 55 0xb1f97aa5 > 16 base::MessageLoop::Run message_loop.cc 308 0xb1f6524b > 17 base::Thread::Run thread.cc 174 0xb1fcae71 > 18 base::Thread::ThreadMain thread.cc 228 0xb1fcb122 > 19 base::(anonymous namespace)::ThreadFunc > platform_thread_posix.cc 80 0xb1fc0729 > 20 start_thread pthread_create.c 310 0xb587211f > ... > > Best regards, > Tom, > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > -- Best regards, András Bécsi Software Engineer | The Qt Company The Qt Company AS Sandakerveien 116 0484 Oslo, Norway Mailing address: PO Box 23 Nydalen 0410 Oslo, Norway Visit us on: http://www.qt.io From deblauwetom at gmail.com Tue Jun 16 12:59:15 2015 From: deblauwetom at gmail.com (Tom Deblauwe) Date: Tue, 16 Jun 2015 12:59:15 +0200 Subject: [Qtwebengine] open files Message-ID: <55800183.9010101@gmail.com> Hi, Thanks Andras, I could compile it and I could run a simple webengineview with the qmlscene application. I used the embedded_linux config, but I've set these different: use_x11=1 use_dbus=1 desktop_linux=1 use_ozone=0 Performance is not really great I must admit, but it works. The animations and scrolling are sluggish. Is that maybe because of the "use_ozone=0"? Maybe it would compile if I removed the "ozone_platforms_dri=0" setting? However, after a few page loads, i get a crash, indicating a "too many open files" error. Setting the open files limit even as root with "ulimit -n 60000" does not help. Maybe anybody has a clue about what could be causing this and what your limits should be set to? I also tried the pre-built 32-bit version of Qt 4.5.1 and there I have the same "too many open files" problem, so it's very probably something about my linux OS that is not correct, but how can I figure out what exactly? Or a list of what webengine needs from the OS to run properly? Best regards, Tom, From andras.becsi at theqtcompany.com Tue Jun 16 13:19:11 2015 From: andras.becsi at theqtcompany.com (Andras Becsi) Date: Tue, 16 Jun 2015 13:19:11 +0200 Subject: [Qtwebengine] open files In-Reply-To: <55800183.9010101@gmail.com> References: <55800183.9010101@gmail.com> Message-ID: <5580062F.4070202@theqtcompany.com> Hi Tom, With an embedded device running X11 I do not think you can get much better performance, unless the device is really powerfull. To use ozone, you need a platform implementation, and we only provide it for eglfs (ozone_platform_eglfs.cpp). Also use_ozone=1 is probably conflicting with desktop_linux=1, and ozone_platform_dri is just an implementation of the ozone layer withing chromium, which won't work with Qt. As I wrote previously this setup is not supported hence not tested, so your crash is probably also caused by the heavy X11 setup. I'm not sure 60000 is even a valid value for ulimit, you could try setting a more realistic limit (ulimit -Sn 8192) according to: http://unix.stackexchange.com/questions/180063/chrome-too-many-files-open-crash-sorry-jim > I also tried the pre-built 32-bit version of Qt 4.5.1 You probably mean 5.4.1 here. For these kind of issues you can always google for Chromium problems since if you see something rendered by Qt and it runs, then the Qt layer basically works and the issue is most probably in the Chromium setup and/or the system setup, so other people might also encounter it. /Andras On 06/16/2015 12:59 PM, Tom Deblauwe wrote: > Hi, > > Thanks Andras, I could compile it and I could run a simple webengineview > with the qmlscene application. I used the embedded_linux config, but > I've set these different: > > use_x11=1 > use_dbus=1 > desktop_linux=1 > use_ozone=0 > > Performance is not really great I must admit, but it works. The > animations and scrolling are sluggish. Is that maybe because of the > "use_ozone=0"? Maybe it would compile if I removed the > "ozone_platforms_dri=0" setting? > > However, after a few page loads, i get a crash, indicating a "too many > open files" error. Setting the open files limit even as root with > "ulimit -n 60000" does not help. Maybe anybody has a clue about what > could be causing this and what your limits should be set to? > I also tried the pre-built 32-bit version of Qt 4.5.1 and there I have > the same "too many open files" problem, so it's very probably something > about my linux OS that is not correct, but how can I figure out what > exactly? Or a list of what webengine needs from the OS to run properly? > > Best regards, > Tom, > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > From andras.becsi at theqtcompany.com Tue Jun 16 13:28:23 2015 From: andras.becsi at theqtcompany.com (Andras Becsi) Date: Tue, 16 Jun 2015 13:28:23 +0200 Subject: [Qtwebengine] open files In-Reply-To: <5580062F.4070202@theqtcompany.com> References: <55800183.9010101@gmail.com> <5580062F.4070202@theqtcompany.com> Message-ID: <55800857.7080703@theqtcompany.com> Hi Tom, You could try applying https://codereview.chromium.org/248193003 to the src/3rdparty/chromium snapshot, and see if that helps. /Andras On 06/16/2015 01:19 PM, Andras Becsi wrote: > Hi Tom, > > With an embedded device running X11 I do not think you can get much > better performance, unless the device is really powerfull. > > To use ozone, you need a platform implementation, and we only provide it > for eglfs (ozone_platform_eglfs.cpp). Also use_ozone=1 is probably > conflicting with desktop_linux=1, and ozone_platform_dri is just an > implementation of the ozone layer withing chromium, which won't work > with Qt. > > As I wrote previously this setup is not supported hence not tested, so > your crash is probably also caused by the heavy X11 setup. > > I'm not sure 60000 is even a valid value for ulimit, you could try > setting a more realistic limit (ulimit -Sn 8192) according to: > http://unix.stackexchange.com/questions/180063/chrome-too-many-files-open-crash-sorry-jim > > > I also tried the pre-built 32-bit version of Qt 4.5.1 > You probably mean 5.4.1 here. > > For these kind of issues you can always google for Chromium problems > since if you see something rendered by Qt and it runs, then the Qt layer > basically works and the issue is most probably in the Chromium setup > and/or the system setup, so other people might also encounter it. > > > /Andras > > > On 06/16/2015 12:59 PM, Tom Deblauwe wrote: >> Hi, >> >> Thanks Andras, I could compile it and I could run a simple webengineview >> with the qmlscene application. I used the embedded_linux config, but >> I've set these different: >> >> use_x11=1 >> use_dbus=1 >> desktop_linux=1 >> use_ozone=0 >> >> Performance is not really great I must admit, but it works. The >> animations and scrolling are sluggish. Is that maybe because of the >> "use_ozone=0"? Maybe it would compile if I removed the >> "ozone_platforms_dri=0" setting? >> >> However, after a few page loads, i get a crash, indicating a "too many >> open files" error. Setting the open files limit even as root with >> "ulimit -n 60000" does not help. Maybe anybody has a clue about what >> could be causing this and what your limits should be set to? >> I also tried the pre-built 32-bit version of Qt 4.5.1 and there I have >> the same "too many open files" problem, so it's very probably something >> about my linux OS that is not correct, but how can I figure out what >> exactly? Or a list of what webengine needs from the OS to run properly? >> >> Best regards, >> Tom, >> >> _______________________________________________ >> QtWebEngine mailing list >> QtWebEngine at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qtwebengine >> > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > -- Best regards, András Bécsi Software Engineer | The Qt Company The Qt Company AS Sandakerveien 116 0484 Oslo, Norway Mailing address: PO Box 23 Nydalen 0410 Oslo, Norway Visit us on: http://www.qt.io From joel.maranhao at gmail.com Wed Jun 17 17:38:53 2015 From: joel.maranhao at gmail.com (=?UTF-8?B?am/Dq2wgbWFyYW5ow6Nv?=) Date: Wed, 17 Jun 2015 17:38:53 +0200 Subject: [Qtwebengine] Allow WebRTC webcam request using when QtWebEngine Message-ID: Hello, How do I Allow WebRTC webcam request in QtWebEngine (using QML plugin or not)? My code sample webengine.qml import QtQuick 2.1 import QtQuick.Controls 1.1 import QtWebEngine 1.0 ApplicationWindow { width: 800 height: 600 color: "lightgray" visible: true WebEngineView { id: webview url: "https://opentokrtc.com/test" anchors.fill: parent } } On my Mac Yosemite, running the command: /usr/local/Cellar/qt5/5.4.0/bin/qmlscene webengine.qml but the video won't start because it's waiting for "Allow" camera, but not dialog pops to let me do that. In other words, is there a way to programmatically set Chromium Web Engine policy e.g. VideoCaptureAllowed -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.maranhao at gmail.com Wed Jun 17 17:40:42 2015 From: joel.maranhao at gmail.com (=?UTF-8?B?am/Dq2wgbWFyYW5ow6Nv?=) Date: Wed, 17 Jun 2015 17:40:42 +0200 Subject: [Qtwebengine] How to set User Agent in QtWebEngine QML application Message-ID: My simple test QML import QtQuick 2.1 import QtQuick.Controls 1.1 import QtWebEngine 1.0 ApplicationWindow { width: 800 height: 600 color: "lightgray" visible: true WebEngineView { id: webview url: "http://forum.qt.io/" anchors.fill: parent } } How do I pass a different User Agent string? NOTE: I was able to do that on QtWebKit QML using the QtWebView extension. Here I am interested in using QtWebEngine. Cheers, Joël -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.rossi at gmail.com Tue Jun 30 18:16:41 2015 From: pierre.rossi at gmail.com (Pierre Rossi) Date: Tue, 30 Jun 2015 18:16:41 +0200 Subject: [Qtwebengine] Allow WebRTC webcam request using when QtWebEngine In-Reply-To: References: Message-ID: Hi, I see this question apparently didn't get an answer. Starting with 5.5, there's a signal called featurePermissionRequested that is meant to work in tandem with the invokable grantFeaturePermission function. if you want to unconditionally allow access to video devices, something like this should do the trick: onFeaturePermissionRequested: { if (feature === WebEngineView.MediaVideoCapture) grantFeaturePermission(securityOrigin, feature, true } Note that this API was available as part of the experimental plugin in 5.4, which you can get by using "import QtWebEngine.experimental 1.0" (see quicktestbrowser for usage example) Cheers, -- Pierre On Wed, Jun 17, 2015 at 5:38 PM, joël maranhão wrote: > Hello, > > How do I Allow WebRTC webcam request in QtWebEngine (using QML plugin or > not)? > > My code sample webengine.qml > > import QtQuick 2.1 > import QtQuick.Controls 1.1 > import QtWebEngine 1.0 > > ApplicationWindow { > width: 800 > height: 600 > color: "lightgray" > visible: true > WebEngineView { > id: webview > url: "https://opentokrtc.com/test" > anchors.fill: parent > } > } > > On my Mac Yosemite, running the command: > > /usr/local/Cellar/qt5/5.4.0/bin/qmlscene webengine.qml > > but the video won't start because it's waiting for "Allow" camera, but not > dialog pops to let me do that. > > In other words, is there a way to programmatically set Chromium Web Engine > policy e.g. VideoCaptureAllowed > > > > _______________________________________________ > QtWebEngine mailing list > QtWebEngine at qt-project.org > http://lists.qt-project.org/mailman/listinfo/qtwebengine > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.maranhao at gmail.com Tue Jun 30 19:22:32 2015 From: joel.maranhao at gmail.com (=?UTF-8?B?am/Dq2wgbWFyYW5ow6Nv?=) Date: Tue, 30 Jun 2015 19:22:32 +0200 Subject: [Qtwebengine] Allow WebRTC webcam request using when QtWebEngine In-Reply-To: References: Message-ID: Thanks Pierre. That looks promising. 2015-06-30 18:16 GMT+02:00 Pierre Rossi : > Hi, > > I see this question apparently didn't get an answer. > > Starting with 5.5, there's a signal called featurePermissionRequested > that is meant to work in tandem with the invokable grantFeaturePermission > function. > if you want to unconditionally allow access to video devices, something > like this should do the trick: > > onFeaturePermissionRequested: { > if (feature === WebEngineView.MediaVideoCapture) > grantFeaturePermission(securityOrigin, feature, true > } > > Note that this API was available as part of the experimental plugin in > 5.4, which you can get by using "import QtWebEngine.experimental 1.0" (see > quicktestbrowser for usage example) > > Cheers, > -- > Pierre > > On Wed, Jun 17, 2015 at 5:38 PM, joël maranhão > wrote: > >> Hello, >> >> How do I Allow WebRTC webcam request in QtWebEngine (using QML plugin or >> not)? >> >> My code sample webengine.qml >> >> import QtQuick 2.1 >> import QtQuick.Controls 1.1 >> import QtWebEngine 1.0 >> >> ApplicationWindow { >> width: 800 >> height: 600 >> color: "lightgray" >> visible: true >> WebEngineView { >> id: webview >> url: "https://opentokrtc.com/test" >> anchors.fill: parent >> } >> } >> >> On my Mac Yosemite, running the command: >> >> /usr/local/Cellar/qt5/5.4.0/bin/qmlscene webengine.qml >> >> but the video won't start because it's waiting for "Allow" camera, but >> not dialog pops to let me do that. >> >> In other words, is there a way to programmatically set Chromium Web >> Engine policy e.g. VideoCaptureAllowed >> >> >> >> _______________________________________________ >> QtWebEngine mailing list >> QtWebEngine at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/qtwebengine >> >> > -- *More About Me* http://about.me/maranhao http://biowattsonline.com https://earthdata.io http://hexabana.wordpress.com http://soundcloud.com/primaer skype: joelmaranhao -------------- next part -------------- An HTML attachment was scrubbed... URL: