Changeset 152391 in webkit
- Timestamp:
- Jul 4, 2013 12:44:16 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r152388 r152391 1 2013-07-04 Balazs Kelemen <b.kelemen@samsung.com> 2 3 [GStreamer] support preload="metadata" 4 https://bugs.webkit.org/show_bug.cgi?id=116817 5 6 Reviewed by Eric Carlson. 7 8 * media/video-load-preload-metadata.html: Added. 9 1 10 2013-07-03 Chris Fleizach <cfleizach@apple.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r152390 r152391 1 2013-07-04 Balazs Kelemen <b.kelemen@samsung.com> 2 3 [GStreamer] support preload="metadata" 4 https://bugs.webkit.org/show_bug.cgi?id=116817 5 6 Reviewed by Eric Carlson. 7 8 Add appropriate behavior for preload="metadata". Delay enabling download buffering 9 until playback is started in this case. This behavior fits with the standard quite 10 well and this is the most exact match we can get (at least without adding too much 11 extra complexity). What matters mostly is that we can avoid loading the media 12 before playback but we have the first frame and the metadata. 13 14 Test: media/video-load-preload-metadata.html 15 16 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 17 (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Set |m_preload| to |Auto| 18 so we will start download buffering if we did not start it yet. 19 (WebCore::MediaPlayerPrivateGStreamer::play): Ditto. 20 (MediaPlayerPrivateGStreamer::setDownloadBuffering): Only start download 21 buffering if |m_preload == Auto|. Also make sure we don't clear the download 22 flag once we started downloading because it would result in not well defined 23 behavior and it does not really makes sense. 24 (MediaPlayerPrivateGStreamer::setPreload): Set download buffering accordingly. 25 1 26 2013-07-03 Jae Hyun Park <jae.park@company100.net> 2 27 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r151797 r152391 397 397 void MediaPlayerPrivateGStreamer::prepareToPlay() 398 398 { 399 m_preload = MediaPlayer::Auto; 399 400 if (m_delayingLoad) { 400 401 m_delayingLoad = false; … … 408 409 m_isEndReached = false; 409 410 m_delayingLoad = false; 411 m_preload = MediaPlayer::Auto; 410 412 setDownloadBuffering(); 411 413 LOG_MEDIA_MESSAGE("Play"); … … 1082 1084 m_resetPipeline = true; 1083 1085 m_mediaDuration = 0; 1084 } else 1086 } else { 1087 m_resetPipeline = false; 1085 1088 cacheDuration(); 1089 } 1086 1090 1087 1091 bool didBuffering = m_buffering; … … 1518 1522 GstPlayFlags flags; 1519 1523 g_object_get(m_playBin.get(), "flags", &flags, NULL); 1520 bool shouldDownload = !isLiveStream(); 1524 1525 // We don't want to stop downloading if we already started it. 1526 if (flags & GST_PLAY_FLAG_DOWNLOAD && m_readyState > MediaPlayer::HaveNothing && !m_resetPipeline) 1527 return; 1528 1529 bool shouldDownload = !isLiveStream() && m_preload == MediaPlayer::Auto; 1521 1530 if (shouldDownload) { 1522 1531 LOG_MEDIA_MESSAGE("Enabling on-disk buffering"); … … 1536 1545 1537 1546 m_preload = preload; 1547 setDownloadBuffering(); 1538 1548 1539 1549 if (m_delayingLoad && m_preload != MediaPlayer::None) {
Note: See TracChangeset
for help on using the changeset viewer.