Changeset 50873 in webkit
- Timestamp:
- Nov 12, 2009 2:39:57 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r50872 r50873 1 2009-11-12 Philippe Normand <pnormand@igalia.com> 2 3 Reviewed by Jan Alonzo. 4 5 https://bugs.webkit.org/show_bug.cgi?id=31047 6 [GTK] Failing test media/video-played-ranges-1.html 7 8 Follow-up of r50726, don't block the UI thread when calling 9 gst_element_get_state(). Also fixed a compilation warning and some 10 static casts. 11 12 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 13 (WebCore::playbackPosition): 14 (WebCore::MediaPlayerPrivate::seek): 15 (WebCore::MediaPlayerPrivate::setRate): 16 1 17 2009-11-12 Philippe Normand <pnormand@igalia.com> 2 18 -
trunk/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
r50872 r50873 117 117 // Position is available only if the pipeline is not in NULL or 118 118 // READY state. 119 if (position != GST_CLOCK_TIME_NONE)120 ret = (float) (position / 1000000000.0);119 if (position != static_cast<gint64>(GST_CLOCK_TIME_NONE)) 120 ret = static_cast<float>(position) / static_cast<float>(GST_SECOND); 121 121 122 122 LOG_VERBOSE(Media, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position)); … … 392 392 GstState pending; 393 393 394 gst_element_get_state(m_playBin, 395 &state, &pending, 250 * GST_NSECOND);396 if (state != GST_STATE_PLAYING && state != GST_STATE_PAUSED)394 gst_element_get_state(m_playBin, &state, &pending, 0); 395 if ((state != GST_STATE_PLAYING && state != GST_STATE_PAUSED) 396 || (pending == GST_STATE_PAUSED)) 397 397 return; 398 398 … … 419 419 // If we are at beginning of media, start from the end to 420 420 // avoid immediate EOS. 421 if (currentPosition == 0 || currentPosition == -1)421 if (currentPosition <= 0) 422 422 end = duration() * GST_SECOND; 423 423 else … … 431 431 GST_SEEK_TYPE_SET, end)) 432 432 LOG_VERBOSE(Media, "Set rate to %f failed", rate); 433 else {433 else 434 434 g_object_set(m_playBin, "mute", mute, NULL); 435 // Wait some time for the seek to complete.436 gst_element_get_state(m_playBin, 0, 0, 40 * GST_MSECOND);437 }438 435 } 439 436
Note: See TracChangeset
for help on using the changeset viewer.