+2013-02-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r141695 and r141697.
+ http://trac.webkit.org/changeset/141695
+ http://trac.webkit.org/changeset/141697
+ https://bugs.webkit.org/show_bug.cgi?id=109279
+
+ broke on-disk buffering for http(s) media (Requested by philn
+ on #webkit).
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::load):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+ (MediaPlayerPrivateGStreamer):
+ * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+ (webKitWebSrcGetProtocols):
+ (webKitWebSrcSetUri):
+
2013-02-08 Dan Carney <dcarney@google.com>
[v8] isolate parameter added to all v8::peristent calls
g_source_remove(m_audioTimerHandler);
}
-KURL MediaPlayerPrivateGStreamer::convertPlaybinURL(const gchar* uri)
-{
- KURL url(KURL(), uri);
-
- ASSERT(url.protocol().substring(0, 7) == "webkit+");
- url.setProtocol(url.protocol().substring(7));
- return url;
-}
-
-void MediaPlayerPrivateGStreamer::setPlaybinURL(KURL& url)
-{
- // Clean out everything after file:// url path.
- if (url.isLocalFile()) {
- url.setQuery(String());
- url.removeFragmentIdentifier();
- }
-
- m_url = url;
-
- if (url.protocolIsInHTTPFamily())
- url.setProtocol("webkit+" + url.protocol());
-
- LOG_MEDIA_MESSAGE("Load %s", url.string().utf8().data());
- g_object_set(m_playBin.get(), "uri", url.string().utf8().data(), NULL);
-}
-
void MediaPlayerPrivateGStreamer::load(const String& url)
{
if (!initializeGStreamerAndRegisterWebKitElements())
return;
+ KURL kurl(KURL(), url);
+ String cleanUrl(url);
+
+ // Clean out everything after file:// url path.
+ if (kurl.isLocalFile())
+ cleanUrl = cleanUrl.substring(0, kurl.pathEnd());
+
if (!m_playBin) {
createGSTPlayBin();
setDownloadBuffering();
ASSERT(m_playBin);
- KURL kurl(KURL(), url);
- setPlaybinURL(kurl);
+ m_url = KURL(KURL(), cleanUrl);
+ g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL);
+
+ LOG_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data());
if (m_preload == MediaPlayer::None) {
LOG_MEDIA_MESSAGE("Delaying load.");
// though. We need to take the base of the current url and
// append the value of new-location to it.
+ gchar* currentLocation = 0;
+ g_object_get(m_playBin.get(), "uri", ¤tLocation, NULL);
+
+ KURL currentUrl(KURL(), currentLocation);
+ g_free(currentLocation);
+
KURL newUrl;
+
if (gst_uri_is_valid(newLocation))
newUrl = KURL(KURL(), newLocation);
else
- newUrl = KURL(KURL(), m_url.baseAsString() + newLocation);
+ newUrl = KURL(KURL(), currentUrl.baseAsString() + newLocation);
- RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
+ RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(currentUrl);
if (securityOrigin->canRequest(newUrl)) {
LOG_MEDIA_MESSAGE("New media url: %s", newUrl.string().utf8().data());
gst_element_get_state(m_playBin.get(), &state, 0, 0);
if (state <= GST_STATE_READY) {
// Set the new uri and start playing.
- setPlaybinURL(newUrl);
+ g_object_set(m_playBin.get(), "uri", newUrl.string().utf8().data(), NULL);
gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
return true;
}
#include "GRefPtrGStreamer.h"
#include "GStreamerVersioning.h"
#include "MediaPlayer.h"
-#include "MediaPlayerPrivateGStreamer.h"
#include "NetworkingContext.h"
#include "NotImplemented.h"
#include "ResourceHandleClient.h"
const gchar* const* webKitWebSrcGetProtocols(GType)
{
- static const char* const protocols[] = {"webkit+http", "webkit+https", 0 };
+ static const char* protocols[] = {"http", "https", 0 };
return protocols;
}
if (!uri)
return TRUE;
- KURL url = WebCore::MediaPlayerPrivateGStreamer::convertPlaybinURL(uri);
+ KURL url(KURL(), uri);
if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
g_set_error(error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, "Invalid URI '%s'", uri);
static gchar** webKitWebSrcGetProtocols(void)
{
- static gchar* protocols[] = {(gchar*) "webkit+http", (gchar*) "webkit+https", 0 };
+ static gchar* protocols[] = {(gchar*) "http", (gchar*) "https", 0 };
return protocols;
}
if (!uri)
return TRUE;
- KURL url = WebCore::MediaPlayerPrivateGStreamer::convertPlaybinURL(uri);
+ KURL url(KURL(), uri);
if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
GST_ERROR_OBJECT(src, "Invalid URI '%s'", uri);