Playing a video, e.g. 2 hours movie from youtube is downloading the whole video at once. When using a constrained mobile platform this can cause issues as too much traffic and memory is needed. gstreamer is issuing callbacks to webkit to block the load (webKitWebSrcEnoughDataCb). And these callbacks are translated into "defersLoading" calls. But in Qt port, we don't really block the load. I am not sure if this is an issue with GTK port, if it handle "defersLoading" better than Qt port.
We've had the same issue in the N9 and ended up with this: https://gitorious.org/+qtwebkit-webkit2-dev/webkit/qtwebkit-webkit2-dev/commit/fdfb545bb8a35aebfaa4ea9bd33236d43463f4e7 The bug about deferring not working in QNAM should not happen in trunk/qt5, but the issue about the read buffer size. Adjusting the read buffer size used in the QNetworkReply is still something we could do.
(In reply to comment #1) > We've had the same issue in the N9 and ended up with this: > > https://gitorious.org/+qtwebkit-webkit2-dev/webkit/qtwebkit-webkit2-dev/commit/fdfb545bb8a35aebfaa4ea9bd33236d43463f4e7 > > The bug about deferring not working in QNAM should not happen in trunk/qt5, but the issue about the read buffer size. > > Adjusting the read buffer size used in the QNetworkReply is still something we could do. Thanks for sharing. This looks promising, but in Qt5 I found this: void QNetworkReplyHttpImpl::setReadBufferSize(qint64 size) { Q_UNUSED(size); // FIXME, unsupported right now return; }
I see that there is already a Qt bug for this https://bugreports.qt-project.org/browse/QTBUG-25327
So I guess this issue is Qt-only? Retitling accordingly then. Unless I misunderstood something :)
(In reply to comment #4) > So I guess this issue is Qt-only? Retitling accordingly then. Unless I misunderstood something :) It is Qt specific, sorry :)
Created attachment 204019 [details] This is a patch with a suggested solution to bug #85378 The related bug in Qt has been fixed, but the problem remains in WebKit. This attached patch will limit the read reply buffer to 10MB, thus avoiding large media content to consume too much memory.
Comment on attachment 204019 [details] This is a patch with a suggested solution to bug #85378 Missing ChangeLog, please read http://www.webkit.org/coding/contributing.html :)
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.