Changeset 142251 in webkit
- Timestamp:
- Feb 8, 2013 3:15:27 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142250 r142251 1 2013-02-08 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r141695 and r141697. 4 http://trac.webkit.org/changeset/141695 5 http://trac.webkit.org/changeset/141697 6 https://bugs.webkit.org/show_bug.cgi?id=109279 7 8 broke on-disk buffering for http(s) media (Requested by philn 9 on #webkit). 10 11 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 12 (WebCore::MediaPlayerPrivateGStreamer::load): 13 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 14 (MediaPlayerPrivateGStreamer): 15 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 16 (webKitWebSrcGetProtocols): 17 (webKitWebSrcSetUri): 18 1 19 2013-02-08 Dan Carney <dcarney@google.com> 2 20 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r142005 r142251 219 219 } 220 220 221 KURL MediaPlayerPrivateGStreamer::convertPlaybinURL(const gchar* uri) 222 { 223 KURL url(KURL(), uri); 224 225 ASSERT(url.protocol().substring(0, 7) == "webkit+"); 226 url.setProtocol(url.protocol().substring(7)); 227 return url; 228 } 229 230 void MediaPlayerPrivateGStreamer::setPlaybinURL(KURL& url) 231 { 221 void MediaPlayerPrivateGStreamer::load(const String& url) 222 { 223 if (!initializeGStreamerAndRegisterWebKitElements()) 224 return; 225 226 KURL kurl(KURL(), url); 227 String cleanUrl(url); 228 232 229 // Clean out everything after file:// url path. 233 if (url.isLocalFile()) { 234 url.setQuery(String()); 235 url.removeFragmentIdentifier(); 236 } 237 238 m_url = url; 239 240 if (url.protocolIsInHTTPFamily()) 241 url.setProtocol("webkit+" + url.protocol()); 242 243 LOG_MEDIA_MESSAGE("Load %s", url.string().utf8().data()); 244 g_object_set(m_playBin.get(), "uri", url.string().utf8().data(), NULL); 245 } 246 247 void MediaPlayerPrivateGStreamer::load(const String& url) 248 { 249 if (!initializeGStreamerAndRegisterWebKitElements()) 250 return; 230 if (kurl.isLocalFile()) 231 cleanUrl = cleanUrl.substring(0, kurl.pathEnd()); 251 232 252 233 if (!m_playBin) { … … 257 238 ASSERT(m_playBin); 258 239 259 KURL kurl(KURL(), url); 260 setPlaybinURL(kurl); 240 m_url = KURL(KURL(), cleanUrl); 241 g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL); 242 243 LOG_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data()); 261 244 262 245 if (m_preload == MediaPlayer::None) { … … 1202 1185 // append the value of new-location to it. 1203 1186 1187 gchar* currentLocation = 0; 1188 g_object_get(m_playBin.get(), "uri", ¤tLocation, NULL); 1189 1190 KURL currentUrl(KURL(), currentLocation); 1191 g_free(currentLocation); 1192 1204 1193 KURL newUrl; 1194 1205 1195 if (gst_uri_is_valid(newLocation)) 1206 1196 newUrl = KURL(KURL(), newLocation); 1207 1197 else 1208 newUrl = KURL(KURL(), m_url.baseAsString() + newLocation);1209 1210 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create( m_url);1198 newUrl = KURL(KURL(), currentUrl.baseAsString() + newLocation); 1199 1200 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(currentUrl); 1211 1201 if (securityOrigin->canRequest(newUrl)) { 1212 1202 LOG_MEDIA_MESSAGE("New media url: %s", newUrl.string().utf8().data()); … … 1226 1216 if (state <= GST_STATE_READY) { 1227 1217 // Set the new uri and start playing. 1228 setPlaybinURL(newUrl);1218 g_object_set(m_playBin.get(), "uri", newUrl.string().utf8().data(), NULL); 1229 1219 gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING); 1230 1220 return true; -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r142005 r142251 90 90 GstElement* audioSink() const; 91 91 92 static KURL convertPlaybinURL(const gchar* uri);93 94 92 private: 95 93 MediaPlayerPrivateGStreamer(MediaPlayer*); … … 99 97 static void getSupportedTypes(HashSet<String>&); 100 98 static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&); 101 102 void setPlaybinURL(KURL&);103 99 104 100 static bool isAvailable(); -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r141821 r142251 28 28 #include "GStreamerVersioning.h" 29 29 #include "MediaPlayer.h" 30 #include "MediaPlayerPrivateGStreamer.h"31 30 #include "NetworkingContext.h" 32 31 #include "NotImplemented.h" … … 579 578 const gchar* const* webKitWebSrcGetProtocols(GType) 580 579 { 581 static const char* const protocols[] = {"webkit+http", "webkit+https", 0 };580 static const char* protocols[] = {"http", "https", 0 }; 582 581 return protocols; 583 582 } … … 604 603 return TRUE; 605 604 606 KURL url = WebCore::MediaPlayerPrivateGStreamer::convertPlaybinURL(uri);605 KURL url(KURL(), uri); 607 606 608 607 if (!url.isValid() || !url.protocolIsInHTTPFamily()) { … … 623 622 static gchar** webKitWebSrcGetProtocols(void) 624 623 { 625 static gchar* protocols[] = {(gchar*) " webkit+http", (gchar*) "webkit+https", 0 };624 static gchar* protocols[] = {(gchar*) "http", (gchar*) "https", 0 }; 626 625 return protocols; 627 626 } … … 648 647 return TRUE; 649 648 650 KURL url = WebCore::MediaPlayerPrivateGStreamer::convertPlaybinURL(uri);649 KURL url(KURL(), uri); 651 650 652 651 if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
Note: See TracChangeset
for help on using the changeset viewer.