Bug 85378 - [Qt] Playing a big video downloads the whole video at once.
Summary: [Qt] Playing a big video downloads the whole video at once.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 09:02 PDT by Yael
Modified: 2014-02-03 03:20 PST (History)
6 users (show)

See Also:


Attachments
This is a patch with a suggested solution to bug #85378 (1.48 KB, patch)
2013-06-07 02:47 PDT, Frank Svendsbøe
pnormand: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yael 2012-05-02 09:02:33 PDT
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.
Comment 1 Simon Hausmann 2012-05-02 11:00:31 PDT
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.
Comment 2 Yael 2012-05-02 16:50:31 PDT
(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;
}
Comment 3 Yael 2012-05-03 05:12:30 PDT
I see that there is already a Qt bug for this https://bugreports.qt-project.org/browse/QTBUG-25327
Comment 4 Philippe Normand 2012-05-16 13:19:02 PDT
So I guess this issue is Qt-only? Retitling accordingly then. Unless I misunderstood something :)
Comment 5 Yael 2012-05-17 05:29:42 PDT
(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 :)
Comment 6 Frank Svendsbøe 2013-06-07 02:47:49 PDT
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 7 Philippe Normand 2013-06-07 02:55:17 PDT
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 :)
Comment 8 Jocelyn Turcotte 2014-02-03 03:20:44 PST
=== 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.