<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[159335] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/159335">159335</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-11-15 07:05:48 -0800 (Fri, 15 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GStreamer] Add support for Media Source API
https://bugs.webkit.org/show_bug.cgi?id=99065

Source/WebCore:

The patch integrate a Media Source player for the GStreamer backend. The implementented architecture is:
- MediaPlayerPrivateGStreamer engine is modified to support Media Source URIs (change blob:// to mediasourceblob://), in addition to the existing support for web (http/https/blob) URIs
- Similar to the existing WebKitWebSrc gstreamer element that handles web URIs, a new gstreamer element named WebKitMediaSrc is implemented to handle Media Source URIs
- WebKitMediaSrc registers its URI protocol handler, allowing uridecodebin to dynamically create the appropriate source element.
- The WebKitMediaSrc element creates a bin with 2 appsrc: One for Audio and One for Video. Pads are dynamically linked at the reception of first video and audio buffers.

Patch by Stephane Jadaud &lt;sjadaud@sii.fr&gt; on 2013-11-15
Reviewed by Philippe Normand.

Tests: Activate http/tests/media/media-source and media/media-source tests

* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::initializeGStreamerAndRegisterWebKitElements):
(WebCore::MediaPlayerPrivateGStreamer::load):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp: Added.
(WebCore::MediaSourceGStreamer::open):
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::addSourceBuffer):
(WebCore::MediaSourceGStreamer::setDuration):
(WebCore::MediaSourceGStreamer::markEndOfStream):
(WebCore::MediaSourceGStreamer::unmarkEndOfStream):
* platform/graphics/gstreamer/MediaSourceGStreamer.h: Added.
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp: Added.
(WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::append):
(WebCore::SourceBufferPrivateGStreamer::abort):
(WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h: Added.
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp: Added.
(webKitMediaSrcAddSrc):
(webkit_media_src_init):
(webKitMediaSrcFinalize):
(webKitMediaSrcSetProperty):
(webKitMediaSrcGetProperty):
(webKitMediaVideoSrcStop):
(webKitMediaAudioSrcStop):
(webKitMediaVideoSrcStart):
(webKitMediaAudioSrcStart):
(webKitMediaSrcChangeState):
(webKitMediaSrcQueryWithParent):
(webKitMediaSrcUriGetType):
(webKitMediaSrcGetProtocols):
(webKitMediaSrcGetUri):
(webKitMediaSrcSetUri):
(webKitMediaSrcUriHandlerInit):
(webKitMediaVideoSrcNeedDataMainCb):
(webKitMediaAudioSrcNeedDataMainCb):
(webKitMediaVideoSrcNeedDataCb):
(webKitMediaAudioSrcNeedDataCb):
(webKitMediaVideoSrcEnoughDataMainCb):
(webKitMediaAudioSrcEnoughDataMainCb):
(webKitMediaVideoSrcEnoughDataCb):
(webKitMediaAudioSrcEnoughDataCb):
(webKitMediaVideoSrcSeekMainCb):
(webKitMediaAudioSrcSeekMainCb):
(webKitMediaVideoSrcSeekDataCb):
(webKitMediaAudioSrcSeekDataCb):
(webKitMediaSrcSetMediaPlayer):
(webKitMediaSrcSetPlayBin):
(MediaSourceClientGstreamer::MediaSourceClientGstreamer):
(MediaSourceClientGstreamer::~MediaSourceClientGstreamer):
(MediaSourceClientGstreamer::didReceiveDuration):
(MediaSourceClientGstreamer::didReceiveData):
(MediaSourceClientGstreamer::didFinishLoading):
(MediaSourceClientGstreamer::didFail):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h: Added.

Tools:

Patch by Stephane Jadaud &lt;sjadaud@sii.fr&gt; on 2013-11-15
Reviewed by Philippe Normand.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Patch by Stephane Jadaud &lt;sjadaud@sii.fr&gt; on 2013-11-15
Reviewed by Philippe Normand.

* platform/gtk/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefileam">trunk/Source/WebCore/GNUmakefile.am</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamercpp">trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerh">trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitperlFeatureListpm">trunk/Tools/Scripts/webkitperl/FeatureList.pm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaSourceGStreamercpp">trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaSourceGStreamerh">trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerSourceBufferPrivateGStreamercpp">trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerSourceBufferPrivateGStreamerh">trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerWebKitMediaSourceGStreamercpp">trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerWebKitMediaSourceGStreamerh">trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/LayoutTests/ChangeLog        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2013-11-15  Stephane Jadaud  &lt;sjadaud@sii.fr&gt;
+
+        [GStreamer] Add support for Media Source API
+        https://bugs.webkit.org/show_bug.cgi?id=99065
+
+        Reviewed by Philippe Normand.
+
+        * platform/gtk/TestExpectations:
+
</ins><span class="cx"> 2013-11-15  Michał Pakuła vel Rutka  &lt;m.pakula@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed EFL gardening
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -249,9 +249,56 @@
</span><span class="cx"> webkit.org/b/117039 media/track/audio-track.html [ Skip ]
</span><span class="cx"> webkit.org/b/117039 media/track/video-track.html [ Skip ]
</span><span class="cx"> 
</span><del>-# Tests for MediaSource API. Feature is not yet functional.
-webkit.org/b/99065 http/tests/media/media-source [ Skip ]
</del><ins>+# Tests for MediaSource API. Feature is not totally functional.
+webkit.org/b/99065 http/tests/media/media-source/mediasource-addsourcebuffer.html [ Failure Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-append-buffer.html [ Crash ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-buffered.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-closed.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-is-type-supported.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-play.html [ Failure ]
+webkit.org/b/99065 http/tests/media/media-source/mediasource-sourcebufferlist.html [ Crash ]
+webkit.org/b/99065 http/tests/media/media-source/seek-to-end-after-duration-change.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-abort.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-add-and-remove-buffers.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-append-in-ended-state.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-async-events.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-closed-on-htmlmediaelement-destruction.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-duration-boundaryconditions.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-duration-changed.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-duration.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-errors.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-event-attributes.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-garbage-collection-before-sourceopen.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-is-type-supported.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-objects.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-play.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-reject-append-after-reopening.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-seek.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-sourcebufferlist-crash.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-state-changes.html [ Timeout ]
+webkit.org/b/99065 http/tests/media/media-source/video-media-source-zero-byte-append-in-ended-state.html [ Timeout ]
</ins><span class="cx"> 
</span><ins>+webkit.org/b/99065  media/media-source/media-source-track-enabled.html [ Failure ]
+webkit.org/b/99065  media/media-source/media-source-tracks.html [ Failure ]
+webkit.org/b/99065  media/media-source/media-source-append-failed.html [ Timeout ]
+webkit.org/b/99065  media/media-source/media-source-canplaythrough.html [ Timeout ]
+webkit.org/b/99065  media/media-source/media-source-play.html [ Timeout ]
+
</ins><span class="cx"> # Encrypted Media Extensions are not enabled.
</span><span class="cx"> webkit.org/b/99024 media/encrypted-media [ Failure Timeout ]
</span><span class="cx"> webkit.org/b/99024 fast/events/constructors/media-key-event-constructor.html [ Timeout ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Source/WebCore/ChangeLog        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -1,3 +1,78 @@
</span><ins>+2013-11-15  Stephane Jadaud  &lt;sjadaud@sii.fr&gt;
+
+        [GStreamer] Add support for Media Source API
+        https://bugs.webkit.org/show_bug.cgi?id=99065
+
+        The patch integrate a Media Source player for the GStreamer backend. The implementented architecture is:
+        - MediaPlayerPrivateGStreamer engine is modified to support Media Source URIs (change blob:// to mediasourceblob://), in addition to the existing support for web (http/https/blob) URIs
+        - Similar to the existing WebKitWebSrc gstreamer element that handles web URIs, a new gstreamer element named WebKitMediaSrc is implemented to handle Media Source URIs
+        - WebKitMediaSrc registers its URI protocol handler, allowing uridecodebin to dynamically create the appropriate source element.
+        - The WebKitMediaSrc element creates a bin with 2 appsrc: One for Audio and One for Video. Pads are dynamically linked at the reception of first video and audio buffers.
+
+        Reviewed by Philippe Normand.
+
+        Tests: Activate http/tests/media/media-source and media/media-source tests
+
+        * GNUmakefile.am:
+        * GNUmakefile.list.am:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::initializeGStreamerAndRegisterWebKitElements):
+        (WebCore::MediaPlayerPrivateGStreamer::load):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+        * platform/graphics/gstreamer/MediaSourceGStreamer.cpp: Added.
+        (WebCore::MediaSourceGStreamer::open):
+        (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
+        (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
+        (WebCore::MediaSourceGStreamer::addSourceBuffer):
+        (WebCore::MediaSourceGStreamer::setDuration):
+        (WebCore::MediaSourceGStreamer::markEndOfStream):
+        (WebCore::MediaSourceGStreamer::unmarkEndOfStream):
+        * platform/graphics/gstreamer/MediaSourceGStreamer.h: Added.
+        * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp: Added.
+        (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
+        (WebCore::SourceBufferPrivateGStreamer::append):
+        (WebCore::SourceBufferPrivateGStreamer::abort):
+        (WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
+        * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h: Added.
+        * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp: Added.
+        (webKitMediaSrcAddSrc):
+        (webkit_media_src_init):
+        (webKitMediaSrcFinalize):
+        (webKitMediaSrcSetProperty):
+        (webKitMediaSrcGetProperty):
+        (webKitMediaVideoSrcStop):
+        (webKitMediaAudioSrcStop):
+        (webKitMediaVideoSrcStart):
+        (webKitMediaAudioSrcStart):
+        (webKitMediaSrcChangeState):
+        (webKitMediaSrcQueryWithParent):
+        (webKitMediaSrcUriGetType):
+        (webKitMediaSrcGetProtocols):
+        (webKitMediaSrcGetUri):
+        (webKitMediaSrcSetUri):
+        (webKitMediaSrcUriHandlerInit):
+        (webKitMediaVideoSrcNeedDataMainCb):
+        (webKitMediaAudioSrcNeedDataMainCb):
+        (webKitMediaVideoSrcNeedDataCb):
+        (webKitMediaAudioSrcNeedDataCb):
+        (webKitMediaVideoSrcEnoughDataMainCb):
+        (webKitMediaAudioSrcEnoughDataMainCb):
+        (webKitMediaVideoSrcEnoughDataCb):
+        (webKitMediaAudioSrcEnoughDataCb):
+        (webKitMediaVideoSrcSeekMainCb):
+        (webKitMediaAudioSrcSeekMainCb):
+        (webKitMediaVideoSrcSeekDataCb):
+        (webKitMediaAudioSrcSeekDataCb):
+        (webKitMediaSrcSetMediaPlayer):
+        (webKitMediaSrcSetPlayBin):
+        (MediaSourceClientGstreamer::MediaSourceClientGstreamer):
+        (MediaSourceClientGstreamer::~MediaSourceClientGstreamer):
+        (MediaSourceClientGstreamer::didReceiveDuration):
+        (MediaSourceClientGstreamer::didReceiveData):
+        (MediaSourceClientGstreamer::didFinishLoading):
+        (MediaSourceClientGstreamer::didFail):
+        * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h: Added.
+
</ins><span class="cx"> 2013-11-14  Victor Costan  &lt;costan@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         XMLSerializer escapes &lt; &gt; &amp; correctly inside &lt;script&gt; and &lt;style&gt; tags.
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.am (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.am        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Source/WebCore/GNUmakefile.am        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx">         -I$(srcdir)/Source/WebCore/platform/mediastream \
</span><span class="cx">         -I$(srcdir)/Source/WebCore/platform/mediastream/gstreamer \
</span><span class="cx">         -I$(srcdir)/Source/WebCore/platform/mock \
</span><ins>+        -I$(srcdir)/Source/WebCore/platform/mock/mediasource \
</ins><span class="cx">         -I$(srcdir)/Source/WebCore/platform/network \
</span><span class="cx">         -I$(srcdir)/Source/WebCore/platform/network/gtk \
</span><span class="cx">         -I$(srcdir)/Source/WebCore/platform/sql \
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -3420,6 +3420,8 @@
</span><span class="cx">         Source/WebCore/html/HTMLMapElement.h \
</span><span class="cx">         Source/WebCore/html/HTMLMarqueeElement.cpp \
</span><span class="cx">         Source/WebCore/html/HTMLMarqueeElement.h \
</span><ins>+        Source/WebCore/html/HTMLMediaSource.cpp \
+        Source/WebCore/html/HTMLMediaSource.h \
</ins><span class="cx">         Source/WebCore/html/HTMLMediaElement.cpp \
</span><span class="cx">         Source/WebCore/html/HTMLMediaElement.h \
</span><span class="cx">         Source/WebCore/html/HTMLMenuElement.cpp \
</span><span class="lines">@@ -5439,6 +5441,16 @@
</span><span class="cx">         Source/WebCore/platform/mock/RTCPeerConnectionHandlerMock.h \
</span><span class="cx">         Source/WebCore/platform/mock/ScrollbarThemeMock.cpp \
</span><span class="cx">         Source/WebCore/platform/mock/ScrollbarThemeMock.h \
</span><ins>+        Source/WebCore/platform/mock/mediasource/MockBox.cpp \
+        Source/WebCore/platform/mock/mediasource/MockBox.h \
+        Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp \
+        Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h \
+        Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp \
+        Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h \
+        Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp \
+        Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.h \
+        Source/WebCore/platform/mock/mediasource/MockTracks.cpp \
+        Source/WebCore/platform/mock/mediasource/MockTracks.h \
</ins><span class="cx">         Source/WebCore/platform/network/BlobData.cpp \
</span><span class="cx">         Source/WebCore/platform/network/BlobData.h \
</span><span class="cx">         Source/WebCore/platform/network/BlobRegistry.h \
</span><span class="lines">@@ -6308,6 +6320,13 @@
</span><span class="cx">         Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h \
</span><span class="cx">         Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp \
</span><span class="cx">         Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h
</span><ins>+webcore_platform_sources += \
+        Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp \
+        Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h \
+        Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp \
+        Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.h \
+        Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp \
+        Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h
</ins><span class="cx"> endif
</span><span class="cx"> 
</span><span class="cx"> # ---
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -56,6 +56,11 @@
</span><span class="cx"> #include &lt;gst/interfaces/streamvolume.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+#include &quot;MediaSource.h&quot;
+#include &quot;WebKitMediaSourceGStreamer.h&quot;
+#endif
+
</ins><span class="cx"> // GstPlayFlags flags from playbin2. It is the policy of GStreamer to
</span><span class="cx"> // not publicly expose element-specific enums. That's why this
</span><span class="cx"> // GstPlayFlags enum has been copied here.
</span><span class="lines">@@ -229,9 +234,14 @@
</span><span class="cx">     GRefPtr&lt;GstElementFactory&gt; srcFactory = gst_element_factory_find(&quot;webkitwebsrc&quot;);
</span><span class="cx">     if (!srcFactory) {
</span><span class="cx">         GST_DEBUG_CATEGORY_INIT(webkit_media_player_debug, &quot;webkitmediaplayer&quot;, 0, &quot;WebKit media player&quot;);
</span><del>-        return gst_element_register(0, &quot;webkitwebsrc&quot;, GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
</del><ins>+        gst_element_register(0, &quot;webkitwebsrc&quot;, GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+    GRefPtr&lt;GstElementFactory&gt; WebKitMediaSrcFactory = gst_element_factory_find(&quot;webkitmediasrc&quot;);
+    if (!WebKitMediaSrcFactory)
+        gst_element_register(0, &quot;webkitmediasrc&quot;, GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_SRC);
+#endif
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -388,9 +398,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><del>-void MediaPlayerPrivateGStreamer::load(const String&amp; url, PassRefPtr&lt;MediaSource&gt;)
</del><ins>+void MediaPlayerPrivateGStreamer::load(const String&amp; url, PassRefPtr&lt;HTMLMediaSource&gt; mediaSource)
</ins><span class="cx"> {
</span><del>-    notImplemented();
</del><ins>+    String mediasourceUri = String::format(&quot;mediasource%s&quot;, url.utf8().data());
+    m_mediaSource = mediaSource;
+    load(mediasourceUri);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -1309,6 +1321,12 @@
</span><span class="cx"> 
</span><span class="cx">     if (WEBKIT_IS_WEB_SRC(m_source.get()))
</span><span class="cx">         webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC(m_source.get()), m_player);
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+    if (m_mediaSource &amp;&amp; WEBKIT_IS_MEDIA_SRC(m_source.get())) {
+        MediaSourceGStreamer::open(m_mediaSource.get(), WEBKIT_MEDIA_SRC(m_source.get()));
+        webKitMediaSrcSetPlayBin(WEBKIT_MEDIA_SRC(m_source.get()), m_playBin.get());
+    }
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateGStreamer::cancelLoad()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -33,6 +33,10 @@
</span><span class="cx"> #include &lt;gst/pbutils/install-plugins.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+#include &quot;MediaSourceGStreamer.h&quot;
+#endif
+
</ins><span class="cx"> typedef struct _GstBuffer GstBuffer;
</span><span class="cx"> typedef struct _GstMessage GstMessage;
</span><span class="cx"> typedef struct _GstElement GstElement;
</span><span class="lines">@@ -55,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">     void load(const String &amp;url);
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><del>-    void load(const String&amp; url, PassRefPtr&lt;MediaSource&gt;);
</del><ins>+    void load(const String&amp; url, PassRefPtr&lt;HTMLMediaSource&gt;);
</ins><span class="cx"> #endif
</span><span class="cx">     void commitLoad();
</span><span class="cx">     void cancelLoad();
</span><span class="lines">@@ -200,6 +204,9 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;VideoTrackPrivateGStreamer&gt;&gt; m_videoTracks;
</span><span class="cx">     RefPtr&lt;InbandTextTrackPrivate&gt; m_chaptersTrack;
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+    RefPtr&lt;HTMLMediaSource&gt; m_mediaSource;
+#endif
</ins><span class="cx"> };
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaSourceGStreamercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp (0 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Orange
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaSourceGStreamer.h&quot;
+
+#if ENABLE(MEDIA_SOURCE) &amp;&amp; USE(GSTREAMER)
+
+#include &quot;SourceBufferPrivateGStreamer.h&quot;
+#include &quot;WebKitMediaSourceGStreamer.h&quot;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+
+namespace WebCore {
+
+void MediaSourceGStreamer::open(PassRefPtr&lt;HTMLMediaSource&gt; mediaSource, WebKitMediaSrc* src)
+{
+    mediaSource-&gt;setPrivateAndOpen(adoptRef(*new MediaSourceGStreamer(src)));
+}
+
+MediaSourceGStreamer::MediaSourceGStreamer(WebKitMediaSrc* src)
+    : m_client(new MediaSourceClientGstreamer(src))
+    , m_duration(0.0)
+    , m_readyState(MediaPlayer::HaveNothing)
+{
+}
+
+MediaSourceGStreamer::~MediaSourceGStreamer()
+{
+}
+
+MediaSourceGStreamer::AddStatus MediaSourceGStreamer::addSourceBuffer(const ContentType&amp; contentType, RefPtr&lt;SourceBufferPrivate&gt;&amp; sourceBufferPrivate)
+{
+    sourceBufferPrivate = adoptRef(new SourceBufferPrivateGStreamer(m_client.get(), contentType));
+    return MediaSourceGStreamer::Ok;
+}
+
+void MediaSourceGStreamer::setDuration(double duration)
+{
+    ASSERT(m_client);
+    m_duration = duration;
+    m_client-&gt;didReceiveDuration(duration);
+}
+
+void MediaSourceGStreamer::markEndOfStream(EndOfStreamStatus)
+{
+    ASSERT(m_client);
+    m_client-&gt;didFinishLoading(0);
+}
+
+void MediaSourceGStreamer::unmarkEndOfStream()
+{
+    ASSERT(m_client);
+}
+
+}
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaSourceGStreamerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.h (0 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.h                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.h        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Orange
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MediaSourceGStreamer_h
+#define MediaSourceGStreamer_h
+
+#if ENABLE(MEDIA_SOURCE) &amp;&amp; USE(GSTREAMER)
+#include &quot;MediaSource.h&quot;
+#include &quot;WebKitMediaSourceGStreamer.h&quot;
+
+namespace WebCore {
+
+class MediaSourceGStreamer FINAL : public MediaSourcePrivate {
+public:
+    static void open(PassRefPtr&lt;HTMLMediaSource&gt;, WebKitMediaSrc*);
+    ~MediaSourceGStreamer();
+    AddStatus addSourceBuffer(const ContentType&amp;, RefPtr&lt;SourceBufferPrivate&gt;&amp;);
+    double duration() { return m_duration; }
+    void setDuration(double);
+    void markEndOfStream(EndOfStreamStatus);
+    void unmarkEndOfStream();
+    MediaPlayer::ReadyState readyState() const { return m_readyState; }
+    void setReadyState(MediaPlayer::ReadyState readyState) { m_readyState = readyState; }
+
+private:
+    RefPtr&lt;MediaSourceClientGstreamer&gt; m_client;
+    MediaSourceGStreamer(WebKitMediaSrc*);
+    double m_duration;
+    MediaPlayer::ReadyState m_readyState;
+};
+
+}
+
+#endif
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerSourceBufferPrivateGStreamercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp (0 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Orange
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;SourceBufferPrivateGStreamer.h&quot;
+
+#if ENABLE(MEDIA_SOURCE) &amp;&amp; USE(GSTREAMER)
+
+#include &quot;ContentType.h&quot;
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer(PassRefPtr&lt;MediaSourceClientGstreamer&gt; client, const ContentType&amp; contentType)
+    : m_readyState(MediaPlayer::HaveNothing)
+{
+    m_client = client;
+    m_type = contentType.type();
+}
+
+SourceBufferPrivate::AppendResult SourceBufferPrivateGStreamer::append(const unsigned char* data, unsigned length)
+{
+    AppendResult result = AppendSucceeded;
+    ASSERT(m_client);
+    m_client-&gt;didReceiveData(reinterpret_cast_ptr&lt;const char*&gt;(data), length, m_type);
+    return result;
+}
+
+void SourceBufferPrivateGStreamer::abort()
+{
+    notImplemented();
+}
+
+void SourceBufferPrivateGStreamer::removedFromMediaSource()
+{
+    notImplemented();
+}
+
+}
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerSourceBufferPrivateGStreamerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h (0 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Orange
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SourceBufferPrivateGStreamer_h
+#define SourceBufferPrivateGStreamer_h
+
+#if ENABLE(MEDIA_SOURCE) &amp;&amp; USE(GSTREAMER)
+
+#include &quot;SourceBufferPrivate.h&quot;
+#include &quot;WebKitMediaSourceGStreamer.h&quot;
+
+namespace WebCore {
+
+class SourceBufferPrivateGStreamer FINAL : public SourceBufferPrivate {
+public:
+    SourceBufferPrivateGStreamer(PassRefPtr&lt;MediaSourceClientGstreamer&gt;, const ContentType&amp;);
+    ~SourceBufferPrivateGStreamer() { }
+
+    void setClient(SourceBufferPrivateClient*) { }
+    AppendResult append(const unsigned char*, unsigned);
+    void abort();
+    void removedFromMediaSource();
+    MediaPlayer::ReadyState readyState() const { return m_readyState; }
+    void setReadyState(MediaPlayer::ReadyState readyState) { m_readyState = readyState; }
+    void evictCodedFrames() { }
+    bool isFull() { return false; }
+
+private:
+    String m_type;
+    RefPtr&lt;MediaSourceClientGstreamer&gt; m_client;
+    MediaPlayer::ReadyState m_readyState;
+};
+
+}
+
+#endif
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerWebKitMediaSourceGStreamercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp (0 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -0,0 +1,840 @@
</span><ins>+/*
+ *  Copyright (C) 2009, 2010 Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;
+ *  Copyright (C) 2013 Collabora Ltd.
+ *  Copyright (C) 2013 Orange
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitMediaSourceGStreamer.h&quot;
+
+#if ENABLE(VIDEO) &amp;&amp; ENABLE(MEDIA_SOURCE) &amp;&amp; USE(GSTREAMER)
+
+#include &quot;GStreamerVersioning.h&quot;
+#include &quot;NotImplemented.h&quot;
+#include &quot;TimeRanges.h&quot;
+#include &lt;gst/app/gstappsrc.h&gt;
+#include &lt;gst/gst.h&gt;
+#include &lt;gst/pbutils/missing-plugins.h&gt;
+#include &lt;wtf/gobject/GOwnPtr.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+typedef struct _Source {
+    GstElement* appsrc;
+    guint sourceid;        /* To control the GSource */
+    GstPad* srcpad;
+    gboolean padAdded;
+
+    guint64 offset;
+    guint64 size;
+    gboolean paused;
+
+    guint startId;
+    guint stopId;
+    guint needDataId;
+    guint enoughDataId;
+    guint seekId;
+
+    guint64 requestedOffset;
+} Source;
+
+
+#define WEBKIT_MEDIA_SRC_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_MEDIA_SRC, WebKitMediaSrcPrivate))
+
+struct _WebKitMediaSrcPrivate {
+    gchar* uri;
+    Source sourceVideo;
+    Source sourceAudio;
+    WebCore::MediaPlayer* player;
+    GstElement* playbin;
+    gint64 duration;
+    gboolean seekable;
+    gboolean noMorePad;
+    // TRUE if appsrc's version is &gt;= 0.10.27, see
+    // https://bugzilla.gnome.org/show_bug.cgi?id=609423
+    gboolean haveAppSrc27;
+    guint nbSource;
+};
+
+enum {
+    PropLocation = 1,
+    ProLast
+};
+
+static GstStaticPadTemplate srcTemplate = GST_STATIC_PAD_TEMPLATE(&quot;src_%u&quot;, GST_PAD_SRC, GST_PAD_SOMETIMES, GST_STATIC_CAPS_ANY);
+
+GST_DEBUG_CATEGORY_STATIC(webkit_media_src_debug);
+#define GST_CAT_DEFAULT webkit_media_src_debug
+
+static void webKitMediaSrcUriHandlerInit(gpointer gIface, gpointer ifaceData);
+static void webKitMediaSrcFinalize(GObject*);
+static void webKitMediaSrcSetProperty(GObject*, guint propertyId, const GValue*, GParamSpec*);
+static void webKitMediaSrcGetProperty(GObject*, guint propertyId, GValue*, GParamSpec*);
+static GstStateChangeReturn webKitMediaSrcChangeState(GstElement*, GstStateChange);
+static gboolean webKitMediaSrcQueryWithParent(GstPad*, GstObject*, GstQuery*);
+
+static void webKitMediaVideoSrcNeedDataCb(GstAppSrc*, guint, gpointer);
+static void webKitMediaVideoSrcEnoughDataCb(GstAppSrc*, gpointer);
+static gboolean webKitMediaVideoSrcSeekDataCb(GstAppSrc*, guint64, gpointer);
+static void webKitMediaAudioSrcNeedDataCb(GstAppSrc*, guint, gpointer);
+static void webKitMediaAudioSrcEnoughDataCb(GstAppSrc*, gpointer);
+static gboolean webKitMediaAudioSrcSeekDataCb(GstAppSrc*, guint64, gpointer);
+static GstAppSrcCallbacks appsrcCallbacksVideo = {
+    webKitMediaVideoSrcNeedDataCb,
+    webKitMediaVideoSrcEnoughDataCb,
+    webKitMediaVideoSrcSeekDataCb,
+    { 0 }
+};
+static GstAppSrcCallbacks appsrcCallbacksAudio = {
+    webKitMediaAudioSrcNeedDataCb,
+    webKitMediaAudioSrcEnoughDataCb,
+    webKitMediaAudioSrcSeekDataCb,
+    { 0 }
+};
+#define webkit_media_src_parent_class parent_class
+// We split this out into another macro to avoid a check-webkit-style error.
+#define WEBKIT_MEDIA_SRC_CATEGORY_INIT GST_DEBUG_CATEGORY_INIT(webkit_media_src_debug, &quot;webkitmediasrc&quot;, 0, &quot;websrc element&quot;);
+G_DEFINE_TYPE_WITH_CODE(WebKitMediaSrc, webkit_media_src, GST_TYPE_BIN,
+    G_IMPLEMENT_INTERFACE(GST_TYPE_URI_HANDLER, webKitMediaSrcUriHandlerInit);
+    WEBKIT_MEDIA_SRC_CATEGORY_INIT);
+
+static void webkit_media_src_class_init(WebKitMediaSrcClass* klass)
+{
+    GObjectClass* oklass = G_OBJECT_CLASS(klass);
+    GstElementClass* eklass = GST_ELEMENT_CLASS(klass);
+
+    oklass-&gt;finalize = webKitMediaSrcFinalize;
+    oklass-&gt;set_property = webKitMediaSrcSetProperty;
+    oklass-&gt;get_property = webKitMediaSrcGetProperty;
+
+    gst_element_class_add_pad_template(eklass, gst_static_pad_template_get(&amp;srcTemplate));
+
+    setGstElementClassMetadata(eklass, &quot;WebKit Media source element&quot;, &quot;Source&quot;, &quot;Handles Blob uris&quot;, &quot;Stephane Jadaud &lt;sjadaud@sii.fr&gt;&quot;);
+
+    /* Allows setting the uri using the 'location' property, which is used
+     * for example by gst_element_make_from_uri() */
+    g_object_class_install_property(oklass,
+        PropLocation,
+        g_param_spec_string(&quot;location&quot;, &quot;location&quot;, &quot;Location to read from&quot;, 0,
+        (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
+    eklass-&gt;change_state = webKitMediaSrcChangeState;
+
+    g_type_class_add_private(klass, sizeof(WebKitMediaSrcPrivate));
+}
+
+static void webKitMediaSrcAddSrc(WebKitMediaSrc* src, GstElement* element)
+{
+    GstPad* ghostPad;
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+    GOwnPtr&lt;gchar&gt; name;
+
+    if (!gst_bin_add(GST_BIN(src), element)) {
+        GST_DEBUG_OBJECT(src, &quot;Src element not added&quot;);
+        return;
+    }
+    GRefPtr&lt;GstPad&gt; targetsrc = adoptGRef(gst_element_get_static_pad(element, &quot;src&quot;));
+    if (!targetsrc) {
+        GST_DEBUG_OBJECT(src, &quot;Pad not found&quot;);
+        return;
+    }
+
+    gst_element_sync_state_with_parent(element);
+    name.set(g_strdup_printf(&quot;src_%u&quot;, priv-&gt;nbSource));
+    ghostPad = webkitGstGhostPadFromStaticTemplate(&amp;srcTemplate, name.get(), targetsrc.get());
+    gst_pad_set_active(ghostPad, TRUE);
+
+    priv-&gt;nbSource++;
+
+    if (priv-&gt;sourceVideo.appsrc == element)
+        priv-&gt;sourceVideo.srcpad = ghostPad;
+    else if (priv-&gt;sourceAudio.appsrc == element)
+        priv-&gt;sourceAudio.srcpad = ghostPad;
+
+    GST_OBJECT_FLAG_SET(ghostPad, GST_PAD_FLAG_NEED_PARENT);
+    gst_pad_set_query_function(ghostPad, webKitMediaSrcQueryWithParent);
+}
+
+static void webkit_media_src_init(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = WEBKIT_MEDIA_SRC_GET_PRIVATE(src);
+    src-&gt;priv = priv;
+
+    priv-&gt;sourceVideo.appsrc = gst_element_factory_make(&quot;appsrc&quot;, &quot;videoappsrc&quot;);
+    gst_app_src_set_callbacks(GST_APP_SRC(priv-&gt;sourceVideo.appsrc), &amp;appsrcCallbacksVideo, src, 0);
+    webKitMediaSrcAddSrc(src, priv-&gt;sourceVideo.appsrc);
+
+    priv-&gt;sourceAudio.appsrc = gst_element_factory_make(&quot;appsrc&quot;, &quot;audioappsrc&quot;);
+    gst_app_src_set_callbacks(GST_APP_SRC(priv-&gt;sourceAudio.appsrc), &amp;appsrcCallbacksAudio, src, 0);
+    webKitMediaSrcAddSrc(src, priv-&gt;sourceAudio.appsrc);
+}
+
+static void webKitMediaSrcFinalize(GObject* object)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(object);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    g_free(priv-&gt;uri);
+
+    GST_CALL_PARENT(G_OBJECT_CLASS, finalize, (object));
+}
+
+static void webKitMediaSrcSetProperty(GObject* object, guint propId, const GValue* value, GParamSpec* pspec)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(object);
+    switch (propId) {
+    case PropLocation:
+        gst_uri_handler_set_uri(reinterpret_cast&lt;GstURIHandler*&gt;(src), g_value_get_string(value), 0);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec);
+        break;
+    }
+}
+
+static void webKitMediaSrcGetProperty(GObject* object, guint propId, GValue* value, GParamSpec* pspec)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(object);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    switch (propId) {
+    case PropLocation:
+        g_value_set_string(value, priv-&gt;uri);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, pspec);
+        break;
+    }
+    GST_OBJECT_UNLOCK(src);
+}
+
+// must be called on main thread and with object unlocked
+static gboolean webKitMediaVideoSrcStop(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+    gboolean seeking;
+
+    GST_OBJECT_LOCK(src);
+
+    seeking = priv-&gt;sourceVideo.seekId;
+
+    if (priv-&gt;sourceVideo.startId) {
+        g_source_remove(priv-&gt;sourceVideo.startId);
+        priv-&gt;sourceVideo.startId = 0;
+    }
+
+    priv-&gt;player = 0;
+    priv-&gt;playbin = 0;
+
+    if (priv-&gt;sourceVideo.needDataId)
+        g_source_remove(priv-&gt;sourceVideo.needDataId);
+    priv-&gt;sourceVideo.needDataId = 0;
+
+    if (priv-&gt;sourceVideo.enoughDataId)
+        g_source_remove(priv-&gt;sourceVideo.enoughDataId);
+    priv-&gt;sourceVideo.enoughDataId = 0;
+
+    if (priv-&gt;sourceVideo.seekId)
+        g_source_remove(priv-&gt;sourceVideo.seekId);
+
+    priv-&gt;sourceVideo.seekId = 0;
+
+    priv-&gt;sourceVideo.paused = FALSE;
+    priv-&gt;sourceVideo.offset = 0;
+    priv-&gt;seekable = FALSE;
+
+    priv-&gt;duration = 0;
+    priv-&gt;nbSource = 0;
+
+    priv-&gt;sourceVideo.stopId = 0;
+
+    GST_OBJECT_UNLOCK(src);
+
+    if (priv-&gt;sourceVideo.appsrc) {
+        gst_app_src_set_caps(GST_APP_SRC(priv-&gt;sourceVideo.appsrc), 0);
+        if (!seeking)
+            gst_app_src_set_size(GST_APP_SRC(priv-&gt;sourceVideo.appsrc), -1);
+    }
+
+    GST_DEBUG_OBJECT(src, &quot;Stopped request&quot;);
+
+    return FALSE;
+}
+
+static gboolean webKitMediaAudioSrcStop(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+    gboolean seeking;
+
+    GST_OBJECT_LOCK(src);
+
+    seeking = priv-&gt;sourceAudio.seekId;
+
+    if (priv-&gt;sourceAudio.startId) {
+        g_source_remove(priv-&gt;sourceAudio.startId);
+        priv-&gt;sourceAudio.startId = 0;
+    }
+
+    priv-&gt;player = 0;
+
+    priv-&gt;playbin = 0;
+
+    if (priv-&gt;sourceAudio.needDataId)
+        g_source_remove(priv-&gt;sourceAudio.needDataId);
+    priv-&gt;sourceAudio.needDataId = 0;
+
+    if (priv-&gt;sourceAudio.enoughDataId)
+        g_source_remove(priv-&gt;sourceAudio.enoughDataId);
+    priv-&gt;sourceAudio.enoughDataId = 0;
+
+    if (priv-&gt;sourceAudio.seekId)
+        g_source_remove(priv-&gt;sourceAudio.seekId);
+
+    priv-&gt;sourceAudio.seekId = 0;
+
+    priv-&gt;sourceAudio.paused = FALSE;
+
+    priv-&gt;sourceAudio.offset = 0;
+
+    priv-&gt;seekable = FALSE;
+
+    priv-&gt;duration = 0;
+    priv-&gt;nbSource = 0;
+
+    priv-&gt;sourceAudio.stopId = 0;
+
+    GST_OBJECT_UNLOCK(src);
+
+    if (priv-&gt;sourceAudio.appsrc) {
+        gst_app_src_set_caps(GST_APP_SRC(priv-&gt;sourceAudio.appsrc), 0);
+        if (!seeking)
+            gst_app_src_set_size(GST_APP_SRC(priv-&gt;sourceAudio.appsrc), -1);
+    }
+
+    GST_DEBUG_OBJECT(src, &quot;Stopped request&quot;);
+
+    return FALSE;
+}
+
+// must be called on main thread and with object unlocked
+static gboolean webKitMediaVideoSrcStart(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    if (!priv-&gt;uri) {
+        GST_ERROR_OBJECT(src, &quot;No URI provided&quot;);
+        GST_OBJECT_UNLOCK(src);
+        webKitMediaVideoSrcStop(src);
+        return FALSE;
+    }
+
+    GST_OBJECT_UNLOCK(src);
+    GST_DEBUG_OBJECT(src, &quot;Started request&quot;);
+
+    return FALSE;
+}
+
+// must be called on main thread and with object unlocked
+static gboolean webKitMediaAudioSrcStart(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    if (!priv-&gt;uri) {
+        GST_ERROR_OBJECT(src, &quot;No URI provided&quot;);
+        GST_OBJECT_UNLOCK(src);
+        webKitMediaAudioSrcStop(src);
+        return FALSE;
+    }
+
+    GST_OBJECT_UNLOCK(src);
+    GST_DEBUG_OBJECT(src, &quot;Started request&quot;);
+
+    return FALSE;
+}
+
+static GstStateChangeReturn webKitMediaSrcChangeState(GstElement* element, GstStateChange transition)
+{
+    GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(element);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+        if (!priv-&gt;sourceVideo.appsrc &amp;&amp; !priv-&gt;sourceAudio.appsrc) {
+            gst_element_post_message(element,
+                gst_missing_element_message_new(element, &quot;appsrc&quot;));
+            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (0), (&quot;no appsrc&quot;));
+            return GST_STATE_CHANGE_FAILURE;
+        }
+        break;
+    default:
+        break;
+    }
+
+    ret = GST_ELEMENT_CLASS(parent_class)-&gt;change_state(element, transition);
+    if (G_UNLIKELY(ret == GST_STATE_CHANGE_FAILURE)) {
+        GST_DEBUG_OBJECT(src, &quot;State change failed&quot;);
+        return ret;
+    }
+
+    switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+        GST_DEBUG_OBJECT(src, &quot;READY-&gt;PAUSED&quot;);
+        GST_OBJECT_LOCK(src);
+        priv-&gt;sourceVideo.startId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaVideoSrcStart, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+        g_source_set_name_by_id(priv-&gt;sourceVideo.startId, &quot;[WebKit] webKitMediaVideoSrcStart&quot;);
+        priv-&gt;sourceAudio.startId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaAudioSrcStart, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+        g_source_set_name_by_id(priv-&gt;sourceAudio.startId, &quot;[WebKit] webKitMediaAudioSrcStart&quot;);
+        GST_OBJECT_UNLOCK(src);
+        break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+        GST_DEBUG_OBJECT(src, &quot;PAUSED-&gt;READY&quot;);
+        GST_OBJECT_LOCK(src);
+        priv-&gt;sourceVideo.stopId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaVideoSrcStop, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+        g_source_set_name_by_id(priv-&gt;sourceVideo.stopId, &quot;[WebKit] webKitMediaVideoSrcStop&quot;);
+        priv-&gt;sourceAudio.stopId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaAudioSrcStop, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+        g_source_set_name_by_id(priv-&gt;sourceAudio.stopId, &quot;[WebKit] webKitMediaAudioSrcStop&quot;);
+        GST_OBJECT_UNLOCK(src);
+        break;
+    default:
+        break;
+    }
+
+    return ret;
+}
+
+static gboolean webKitMediaSrcQueryWithParent(GstPad* pad, GstObject* parent, GstQuery* query)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(GST_ELEMENT(parent));
+    gboolean result = FALSE;
+
+    switch (GST_QUERY_TYPE(query)) {
+    case GST_QUERY_DURATION: {
+        GstFormat format;
+        gst_query_parse_duration(query, &amp;format, NULL);
+
+        GST_DEBUG_OBJECT(src, &quot;duration query in format %s&quot;, gst_format_get_name(format));
+        GST_OBJECT_LOCK(src);
+        if ((format == GST_FORMAT_TIME) &amp;&amp; (src-&gt;priv-&gt;duration &gt; 0)) {
+            gst_query_set_duration(query, format, src-&gt;priv-&gt;duration);
+            result = TRUE;
+        }
+        GST_OBJECT_UNLOCK(src);
+        break;
+    }
+    case GST_QUERY_URI: {
+        GST_OBJECT_LOCK(src);
+        gst_query_set_uri(query, src-&gt;priv-&gt;uri);
+        GST_OBJECT_UNLOCK(src);
+        result = TRUE;
+        break;
+    }
+    default: {
+        GRefPtr&lt;GstPad&gt; target = adoptGRef(gst_ghost_pad_get_target(GST_GHOST_PAD_CAST(pad)));
+        // Forward the query to the proxy target pad.
+        if (target)
+            result = gst_pad_query(target.get(), query);
+        break;
+    }
+    }
+
+    return result;
+}
+
+// uri handler interface
+static GstURIType webKitMediaSrcUriGetType(GType)
+{
+    return GST_URI_SRC;
+}
+
+const gchar* const* webKitMediaSrcGetProtocols(GType)
+{
+    static const char* protocols[] = {&quot;mediasourceblob&quot;, 0 };
+    return protocols;
+}
+
+static gchar* webKitMediaSrcGetUri(GstURIHandler* handler)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(handler);
+    gchar* ret;
+
+    GST_OBJECT_LOCK(src);
+    ret = g_strdup(src-&gt;priv-&gt;uri);
+    GST_OBJECT_UNLOCK(src);
+    return ret;
+}
+
+static gboolean webKitMediaSrcSetUri(GstURIHandler* handler, const gchar* uri, GError** error)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(handler);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+    if (GST_STATE(src) &gt;= GST_STATE_PAUSED) {
+        GST_ERROR_OBJECT(src, &quot;URI can only be set in states &lt; PAUSED&quot;);
+        return FALSE;
+    }
+
+    GST_OBJECT_LOCK(src);
+    g_free(priv-&gt;uri);
+    priv-&gt;uri = 0;
+    if (!uri) {
+        GST_OBJECT_UNLOCK(src);
+        return TRUE;
+    }
+
+    WebCore::URL url(WebCore::URL(), uri);
+
+    priv-&gt;uri = g_strdup(url.string().utf8().data());
+    GST_OBJECT_UNLOCK(src);
+    return TRUE;
+}
+
+static void webKitMediaSrcUriHandlerInit(gpointer gIface, gpointer)
+{
+    GstURIHandlerInterface* iface = (GstURIHandlerInterface *) gIface;
+
+    iface-&gt;get_type = webKitMediaSrcUriGetType;
+    iface-&gt;get_protocols = webKitMediaSrcGetProtocols;
+    iface-&gt;get_uri = webKitMediaSrcGetUri;
+    iface-&gt;set_uri = webKitMediaSrcSetUri;
+}
+
+// appsrc callbacks
+static gboolean webKitMediaVideoSrcNeedDataMainCb(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    // already stopped
+    if (!priv-&gt;sourceVideo.needDataId) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+
+    priv-&gt;sourceVideo.paused = FALSE;
+    priv-&gt;sourceVideo.needDataId = 0;
+    GST_OBJECT_UNLOCK(src);
+
+    return FALSE;
+}
+
+static gboolean webKitMediaAudioSrcNeedDataMainCb(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    // already stopped
+    if (!priv-&gt;sourceAudio.needDataId) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+
+    priv-&gt;sourceAudio.paused = FALSE;
+    priv-&gt;sourceAudio.needDataId = 0;
+    GST_OBJECT_UNLOCK(src);
+
+    return FALSE;
+}
+
+static void webKitMediaVideoSrcNeedDataCb(GstAppSrc*, guint length, gpointer userData)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(userData);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_DEBUG_OBJECT(src, &quot;Need more data: %u&quot;, length);
+
+    GST_OBJECT_LOCK(src);
+    if (priv-&gt;sourceVideo.needDataId || !priv-&gt;sourceVideo.paused) {
+        GST_OBJECT_UNLOCK(src);
+        return;
+    }
+
+    priv-&gt;sourceVideo.needDataId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaVideoSrcNeedDataMainCb, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+    g_source_set_name_by_id(priv-&gt;sourceVideo.needDataId, &quot;[WebKit] webKitMediaVideoSrcNeedDataMainCb&quot;);
+    GST_OBJECT_UNLOCK(src);
+}
+
+static void webKitMediaAudioSrcNeedDataCb(GstAppSrc*, guint length, gpointer userData)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(userData);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_DEBUG_OBJECT(src, &quot;Need more data: %u&quot;, length);
+
+    GST_OBJECT_LOCK(src);
+    if (priv-&gt;sourceAudio.needDataId || !priv-&gt;sourceAudio.paused) {
+        GST_OBJECT_UNLOCK(src);
+        return;
+    }
+
+    priv-&gt;sourceAudio.needDataId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaAudioSrcNeedDataMainCb, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+    g_source_set_name_by_id(priv-&gt;sourceAudio.needDataId, &quot;[WebKit] webKitMediaAudioSrcNeedDataMainCb&quot;);
+    GST_OBJECT_UNLOCK(src);
+}
+
+static gboolean webKitMediaVideoSrcEnoughDataMainCb(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    // already stopped
+    if (!priv-&gt;sourceVideo.enoughDataId) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+
+    priv-&gt;sourceVideo.paused = TRUE;
+    priv-&gt;sourceVideo.enoughDataId = 0;
+    GST_OBJECT_UNLOCK(src);
+
+    return FALSE;
+}
+
+static gboolean webKitMediaAudioSrcEnoughDataMainCb(WebKitMediaSrc* src)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_OBJECT_LOCK(src);
+    // already stopped
+    if (!priv-&gt;sourceAudio.enoughDataId) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+
+    priv-&gt;sourceAudio.paused = TRUE;
+    priv-&gt;sourceAudio.enoughDataId = 0;
+    GST_OBJECT_UNLOCK(src);
+
+    return FALSE;
+}
+
+static void webKitMediaVideoSrcEnoughDataCb(GstAppSrc*, gpointer userData)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(userData);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_DEBUG_OBJECT(src, &quot;Have enough data&quot;);
+
+    GST_OBJECT_LOCK(src);
+    if (priv-&gt;sourceVideo.enoughDataId || priv-&gt;sourceVideo.paused) {
+        GST_OBJECT_UNLOCK(src);
+        return;
+    }
+
+    priv-&gt;sourceVideo.enoughDataId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaVideoSrcEnoughDataMainCb, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+    g_source_set_name_by_id(priv-&gt;sourceVideo.enoughDataId, &quot;[WebKit] webKitMediaVideoSrcEnoughDataMainCb&quot;);
+    GST_OBJECT_UNLOCK(src);
+}
+
+static void webKitMediaAudioSrcEnoughDataCb(GstAppSrc*, gpointer userData)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(userData);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_DEBUG_OBJECT(src, &quot;Have enough data&quot;);
+
+    GST_OBJECT_LOCK(src);
+    if (priv-&gt;sourceAudio.enoughDataId || priv-&gt;sourceAudio.paused) {
+        GST_OBJECT_UNLOCK(src);
+        return;
+    }
+
+    priv-&gt;sourceAudio.enoughDataId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaAudioSrcEnoughDataMainCb, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+    g_source_set_name_by_id(priv-&gt;sourceAudio.enoughDataId, &quot;[WebKit] webKitMediaAudioSrcEnoughDataMainCb&quot;);
+    GST_OBJECT_UNLOCK(src);
+}
+
+static gboolean webKitMediaVideoSrcSeekMainCb(WebKitMediaSrc* src)
+{
+    notImplemented();
+    return FALSE;
+}
+
+static gboolean webKitMediaAudioSrcSeekMainCb(WebKitMediaSrc* src)
+{
+    notImplemented();
+    return FALSE;
+}
+
+static gboolean webKitMediaVideoSrcSeekDataCb(GstAppSrc*, guint64 offset, gpointer userData)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(userData);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_DEBUG_OBJECT(src, &quot;Seeking to offset: %&quot; G_GUINT64_FORMAT, offset);
+    GST_OBJECT_LOCK(src);
+    if (offset == priv-&gt;sourceVideo.offset &amp;&amp; priv-&gt;sourceVideo.requestedOffset == priv-&gt;sourceVideo.offset) {
+        GST_OBJECT_UNLOCK(src);
+        return TRUE;
+    }
+
+    if (!priv-&gt;seekable) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+    if (offset &gt; priv-&gt;sourceVideo.size) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+
+    GST_DEBUG_OBJECT(src, &quot;Doing range-request seek&quot;);
+    priv-&gt;sourceVideo.requestedOffset = offset;
+
+    if (priv-&gt;sourceVideo.seekId)
+        g_source_remove(priv-&gt;sourceVideo.seekId);
+    priv-&gt;sourceVideo.seekId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaVideoSrcSeekMainCb, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+    g_source_set_name_by_id(priv-&gt;sourceVideo.seekId, &quot;[WebKit] webKitMediaVideoSrcSeekMainCb&quot;);
+    GST_OBJECT_UNLOCK(src);
+
+    return TRUE;
+}
+
+static gboolean webKitMediaAudioSrcSeekDataCb(GstAppSrc*, guint64 offset, gpointer userData)
+{
+    WebKitMediaSrc* src = WEBKIT_MEDIA_SRC(userData);
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+
+    GST_DEBUG_OBJECT(src, &quot;Seeking to offset: %&quot; G_GUINT64_FORMAT, offset);
+    GST_OBJECT_LOCK(src);
+    if (offset == priv-&gt;sourceAudio.offset &amp;&amp; priv-&gt;sourceAudio.requestedOffset == priv-&gt;sourceAudio.offset) {
+        GST_OBJECT_UNLOCK(src);
+        return TRUE;
+    }
+
+    if (!priv-&gt;seekable) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+    if (offset &gt; priv-&gt;sourceAudio.size) {
+        GST_OBJECT_UNLOCK(src);
+        return FALSE;
+    }
+
+    GST_DEBUG_OBJECT(src, &quot;Doing range-request seek&quot;);
+    priv-&gt;sourceAudio.requestedOffset = offset;
+
+    if (priv-&gt;sourceAudio.seekId)
+        g_source_remove(priv-&gt;sourceAudio.seekId);
+    priv-&gt;sourceAudio.seekId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, (GSourceFunc) webKitMediaAudioSrcSeekMainCb, gst_object_ref(src), (GDestroyNotify) gst_object_unref);
+    g_source_set_name_by_id(priv-&gt;sourceAudio.seekId, &quot;[WebKit] webKitMediaAudioSrcSeekMainCb&quot;);
+    GST_OBJECT_UNLOCK(src);
+
+    return TRUE;
+}
+
+void webKitMediaSrcSetMediaPlayer(WebKitMediaSrc* src, WebCore::MediaPlayer* player)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+    priv-&gt;player = player;
+}
+
+void webKitMediaSrcSetPlayBin(WebKitMediaSrc* src, GstElement* playBin)
+{
+    WebKitMediaSrcPrivate* priv = src-&gt;priv;
+    priv-&gt;playbin = playBin;
+}
+
+MediaSourceClientGstreamer::MediaSourceClientGstreamer(WebKitMediaSrc* src)
+    : m_src(static_cast&lt;WebKitMediaSrc*&gt;(gst_object_ref(src)))
+{
+}
+
+MediaSourceClientGstreamer::~MediaSourceClientGstreamer()
+{
+    gst_object_unref(m_src);
+}
+
+void MediaSourceClientGstreamer::didReceiveDuration(double duration)
+{
+    WebKitMediaSrcPrivate* priv = m_src-&gt;priv;
+    GST_DEBUG_OBJECT(m_src, &quot;Received duration: %lf&quot;, duration);
+
+    GST_OBJECT_LOCK(m_src);
+    priv-&gt;duration = duration &gt;= 0.0 ? static_cast&lt;gint64&gt;(duration*GST_SECOND) : 0;
+    GST_OBJECT_UNLOCK(m_src);
+}
+
+void MediaSourceClientGstreamer::didReceiveData(const char* data, int length, String type)
+{
+    WebKitMediaSrcPrivate* priv = m_src-&gt;priv;
+    GstFlowReturn ret = GST_FLOW_OK;
+    GstBuffer * buffer;
+
+    if (type.startsWith(&quot;video&quot;)) {
+        if (priv-&gt;noMorePad == FALSE &amp;&amp; priv-&gt;sourceVideo.padAdded == TRUE) {
+            gst_element_no_more_pads(GST_ELEMENT(m_src));
+            priv-&gt;noMorePad = TRUE;
+        }
+        if (priv-&gt;noMorePad == FALSE &amp;&amp; priv-&gt;sourceVideo.padAdded == FALSE) {
+            gst_element_add_pad(GST_ELEMENT(m_src), priv-&gt;sourceVideo.srcpad);
+            priv-&gt;sourceVideo.padAdded = TRUE;
+        }
+        GST_OBJECT_LOCK(m_src);
+        buffer = createGstBufferForData(data, length);
+        GST_OBJECT_UNLOCK(m_src);
+
+        ret = gst_app_src_push_buffer(GST_APP_SRC(priv-&gt;sourceVideo.appsrc), buffer);
+    } else if (type.startsWith(&quot;audio&quot;)) {
+        if (priv-&gt;noMorePad == FALSE &amp;&amp; priv-&gt;sourceAudio.padAdded == TRUE) {
+            gst_element_no_more_pads(GST_ELEMENT(m_src));
+            priv-&gt;noMorePad = TRUE;
+        }
+        if (priv-&gt;noMorePad == FALSE &amp;&amp; priv-&gt;sourceAudio.padAdded == FALSE) {
+            gst_element_add_pad(GST_ELEMENT(m_src), priv-&gt;sourceAudio.srcpad);
+            priv-&gt;sourceAudio.padAdded = TRUE;
+        }
+        GST_OBJECT_LOCK(m_src);
+        buffer = createGstBufferForData(data, length);
+        GST_OBJECT_UNLOCK(m_src);
+
+        ret = gst_app_src_push_buffer(GST_APP_SRC(priv-&gt;sourceAudio.appsrc), buffer);
+    }
+
+    if (ret != GST_FLOW_OK &amp;&amp; ret != GST_FLOW_EOS)
+        GST_ELEMENT_ERROR(m_src, CORE, FAILED, (0), (0));
+}
+
+void MediaSourceClientGstreamer::didFinishLoading(double)
+{
+    WebKitMediaSrcPrivate* priv = m_src-&gt;priv;
+
+    GST_DEBUG_OBJECT(m_src, &quot;Have EOS&quot;);
+
+    GST_OBJECT_LOCK(m_src);
+    if (!priv-&gt;sourceVideo.seekId) {
+        GST_OBJECT_UNLOCK(m_src);
+        gst_app_src_end_of_stream(GST_APP_SRC(priv-&gt;sourceVideo.appsrc));
+    } else
+        GST_OBJECT_UNLOCK(m_src);
+
+    GST_OBJECT_LOCK(m_src);
+    if (!priv-&gt;sourceAudio.seekId) {
+        GST_OBJECT_UNLOCK(m_src);
+        gst_app_src_end_of_stream(GST_APP_SRC(priv-&gt;sourceAudio.appsrc));
+    } else
+        GST_OBJECT_UNLOCK(m_src);
+}
+
+void MediaSourceClientGstreamer::didFail()
+{
+    gst_app_src_end_of_stream(GST_APP_SRC(m_src-&gt;priv-&gt;sourceVideo.appsrc));
+    gst_app_src_end_of_stream(GST_APP_SRC(m_src-&gt;priv-&gt;sourceAudio.appsrc));
+}
+
+#endif // USE(GSTREAMER)
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerWebKitMediaSourceGStreamerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h (0 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ *  Copyright (C) 2009, 2010 Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;
+ *  Copyright (C) 2013 Collabora Ltd.
+ *  Copyright (C) 2013 Orange
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef WebKitMediaSourceGStreamer_h
+#define WebKitMediaSourceGStreamer_h
+#if ENABLE(VIDEO) &amp;&amp; ENABLE(MEDIA_SOURCE) &amp;&amp; USE(GSTREAMER)
+
+#include &quot;MediaPlayer.h&quot;
+#include &lt;gst/gst.h&gt;
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_MEDIA_SRC            (webkit_media_src_get_type ())
+#define WEBKIT_MEDIA_SRC(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), WEBKIT_TYPE_MEDIA_SRC, WebKitMediaSrc))
+#define WEBKIT_MEDIA_SRC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), WEBKIT_TYPE_MEDIA_SRC, WebKitMediaSrcClass))
+#define WEBKIT_IS_MEDIA_SRC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WEBKIT_TYPE_MEDIA_SRC))
+#define WEBKIT_IS_MEDIA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WEBKIT_TYPE_MEDIA_SRC))
+
+typedef struct _WebKitMediaSrc        WebKitMediaSrc;
+typedef struct _WebKitMediaSrcClass   WebKitMediaSrcClass;
+typedef struct _WebKitMediaSrcPrivate WebKitMediaSrcPrivate;
+
+struct _WebKitMediaSrc {
+    GstBin parent;
+
+    WebKitMediaSrcPrivate *priv;
+};
+
+struct _WebKitMediaSrcClass {
+    GstBinClass parentClass;
+};
+
+GType webkit_media_src_get_type(void);
+void webKitMediaSrcSetMediaPlayer(WebKitMediaSrc*, WebCore::MediaPlayer*);
+void webKitMediaSrcSetPlayBin(WebKitMediaSrc*, GstElement*);
+
+G_END_DECLS
+
+class MediaSourceClientGstreamer: public RefCounted&lt;MediaSourceClientGstreamer&gt; {
+    public:
+        MediaSourceClientGstreamer(WebKitMediaSrc*);
+        ~MediaSourceClientGstreamer();
+
+        void didReceiveDuration(double);
+        void didReceiveData(const char*, int, String);
+        void didFinishLoading(double);
+        void didFail();
+
+    private:
+        WebKitMediaSrc* m_src;
+};
+
+
+#endif // USE(GSTREAMER)
+#endif
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Tools/ChangeLog        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2013-11-15  Stephane Jadaud  &lt;sjadaud@sii.fr&gt;
+
+        [GStreamer] Add support for Media Source API
+        https://bugs.webkit.org/show_bug.cgi?id=99065
+
+        Reviewed by Philippe Normand.
+
+        * Scripts/webkitperl/FeatureList.pm:
+
</ins><span class="cx"> 2013-11-15  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Bumping GStreamer version to 1.2.1 for the dependencies
</span></span></pre></div>
<a id="trunkToolsScriptswebkitperlFeatureListpm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitperl/FeatureList.pm (159334 => 159335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitperl/FeatureList.pm        2013-11-15 14:08:00 UTC (rev 159334)
+++ trunk/Tools/Scripts/webkitperl/FeatureList.pm        2013-11-15 15:05:48 UTC (rev 159335)
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx">       define =&gt; &quot;ENABLE_MEDIA_CAPTURE&quot;, default =&gt; isEfl(), value =&gt; \$mediaCaptureSupport },
</span><span class="cx"> 
</span><span class="cx">     { option =&gt; &quot;media-source&quot;, desc =&gt; &quot;Toggle Media Source support&quot;,
</span><del>-      define =&gt; &quot;ENABLE_MEDIA_SOURCE&quot;, default =&gt; 0, value =&gt; \$mediaSourceSupport },
</del><ins>+      define =&gt; &quot;ENABLE_MEDIA_SOURCE&quot;, default =&gt; isGtk(), value =&gt; \$mediaSourceSupport },
</ins><span class="cx"> 
</span><span class="cx">     { option =&gt; &quot;media-statistics&quot;, desc =&gt; &quot;Toggle Media Statistics support&quot;,
</span><span class="cx">       define =&gt; &quot;ENABLE_MEDIA_STATISTICS&quot;, default =&gt; 0, value =&gt; \$mediaStatisticsSupport },
</span></span></pre>
</div>
</div>

</body>
</html>