Changes between Version 3 and Version 4 of QtWebKitMediaElementSupport


Ignore:
Timestamp:
Feb 25, 2010 8:56:32 PM (10 years ago)
Author:
nicholas.young@nokia.com
Comment:

Added information about QtMultimedia Integration

Legend:

Unmodified
Added
Removed
Modified
  • QtWebKitMediaElementSupport

    v3 v4  
    11= Details of the QtWebKit HTML5 media element implementation =
     2
     3= QtMultimedia (Qt4.7+) =
     4In Qt4.7 we introduced the QtMultimedia integration. The QtMultimedia API was able to fill many of the holes in the existing Phonon integration.
     5
     6Files: MediaPlayerPrivateQt.cpp, MediaPlayerPrivateQt.h
     7
     8== Background: QtMultimedia ==
     9QtMultimedia provides a collection of cross platform media playback APIs. These APIs are wrapped around various media services. For example, on Windows the default is a DirectShow service, on Mac the default is a QuickTime service, and on Linux the default is a gstreamer service. Enterprising users can also write their own media services.
     10
     11Important Note: Not all of these media services will support all of the features specified in the API. We continue to work hard to support as many features as possible, but ultimately some features will not be able to be supported on all services/platforms. Generally in these cases we will attempt to gracefully degrade the service.
     12
     13API's used in the webkit integration with less than universal support:
     14 * QMediaPlayer::supportedMimeTypes() (Will often return an empty list)
     15 * QMediaPlayerControl::availablePlaybackRanges() (Will often return a single interval, 0..duration, rather than buffered ranges)
     16 * QtMultimedia::Size meta data and "bytes-loaded" extended meta data (Will often not be emitted)
     17 * QMediaPlayer::setMedia() with a QNetworkRequest (Will often take the URL and ignore the rest of the information)
     18
     19== Rendering ==
     20For the most part, the QtMultimedia integration is a thin wrapper around QMediaPlayer and QGraphicsVideoItem, which are high level classes within QtMultimedia. QGraphicsVideoItem uses software rendering, using the same QPainter which renders the web view. This means that webkit can safely draw on top of the video (such a controls, overlapping elements, etc).
     21
     22This said, QGraphicsVideoItem is not entirely unaccelerated. For the GL paint engine we do scaling, color space conversion and blt in hardware. On the N900, we display XVideo in a window, then composite the web view above using a hardware chroma key overlay. On the desktop, unaccelerated performance is reasonable. Your mileage will vary depending on graphics engine and operating system. OpenGL is fast for those places where it is supported. The raster graphics system is also pretty reasonable. X/11 is unfortunately quite poor. There are also plans to introduce other acceleration techniques in to QGraphicsVideoItem in the future.
     23
     24Given the use of QGraphicsVideoItem, it was also very easy to support the QGraphicsView-based accelerated compositing code path, so that's supported too.
     25
     26== Loading ==
     27This backend attempts to pass all of the information required by the backend to retrieve a media source. For http[s] sources, this includes cookies and a referer header.
     28As previously stated, this is not yet universally supported. The best support for HTTP loading is currently with the QuickTime media service.
     29
     30This allows us to support services such as youtube/html5 and vimeo/html5.
     31
     32== Repository ==
     33You can get my clone of WebKit, with the latest QtMultimedia integration at: http://gitorious.org/~nickyoung/webkit/nickyoungs-webkit
     34There is also an experimental branch on this repository, which contains support for fullscreen mode, as well as performance measuring tools.
     35
     36= Phonon (<Qt4.7) =
    237
    338[[Image(http://chaos.troll.no/~tavestbo/webkit/mediaelement/screenshot.png)]]