RESOLVED FIXED 31047
[GTK] Failing test media/video-played-ranges-1.html
https://bugs.webkit.org/show_bug.cgi?id=31047
Summary [GTK] Failing test media/video-played-ranges-1.html
Philippe Normand
Reported 2009-11-03 01:05:07 PST
Failure seems similar to the one fixed in Bug 30589.
Attachments
fix playback rate setter (6.17 KB, patch)
2009-11-05 05:43 PST, Philippe Normand
no flags
don't pause pipeline if already paused, same for play() (2.42 KB, patch)
2009-11-05 05:45 PST, Philippe Normand
no flags
unskip fixed tests (1.33 KB, patch)
2009-11-05 05:45 PST, Philippe Normand
no flags
webkit coding style fixes (6.53 KB, patch)
2009-11-05 05:45 PST, Philippe Normand
no flags
fix playback rate setter (6.38 KB, patch)
2009-11-05 07:02 PST, Philippe Normand
no flags
fix playback rate setter (6.90 KB, patch)
2009-11-05 07:51 PST, Philippe Normand
no flags
don't pause pipeline if already paused, same for play() (2.42 KB, patch)
2009-11-06 00:14 PST, Philippe Normand
no flags
webkit coding style fixes (6.53 KB, patch)
2009-11-06 00:14 PST, Philippe Normand
no flags
fix playback rate setter (7.21 KB, patch)
2009-11-06 01:11 PST, Philippe Normand
zecke: review-
don't pause pipeline if already paused, same for play() (2.42 KB, patch)
2009-11-06 01:12 PST, Philippe Normand
zecke: review-
webkit coding style fixes (6.54 KB, patch)
2009-11-06 01:13 PST, Philippe Normand
no flags
fix playback rate setter (7.20 KB, patch)
2009-11-06 01:43 PST, Philippe Normand
no flags
fix playback rate setter (7.35 KB, patch)
2009-11-09 01:20 PST, Philippe Normand
no flags
fix playback rate setter (7.32 KB, patch)
2009-11-09 03:20 PST, Philippe Normand
no flags
don't pause pipeline if already paused, same for play() (2.78 KB, patch)
2009-11-10 07:08 PST, Philippe Normand
no flags
don't block the UI thread when calling gst_element_get_state() (3.35 KB, patch)
2009-11-10 07:09 PST, Philippe Normand
no flags
Philippe Normand
Comment 1 2009-11-05 05:43:58 PST
Created attachment 42561 [details] fix playback rate setter
Philippe Normand
Comment 2 2009-11-05 05:45:21 PST
Created attachment 42562 [details] don't pause pipeline if already paused, same for play()
Philippe Normand
Comment 3 2009-11-05 05:45:26 PST
Created attachment 42563 [details] unskip fixed tests
Philippe Normand
Comment 4 2009-11-05 05:45:31 PST
Created attachment 42564 [details] webkit coding style fixes
Philippe Normand
Comment 5 2009-11-05 06:14:11 PST
Quoting the HTML5 spec: When the playbackRate is negative (playback is backwards), any corresponding audio must be muted. When the playbackRate is so low or so high that the user agent cannot play audio usefully, the corresponding audio must also be muted. If the playbackRate is not 1.0, the user agent may apply pitch adjustments to the audio as necessary to render it faithfully. I will update the first patch accordingly.
Philippe Normand
Comment 6 2009-11-05 07:02:38 PST
Created attachment 42569 [details] fix playback rate setter Mute audio stream is if rate is negative or too extreme. Pitch control will be part of another patch as this patch is already big enough :)
Philippe Normand
Comment 7 2009-11-05 07:51:06 PST
Created attachment 42570 [details] fix playback rate setter
Philippe Normand
Comment 8 2009-11-06 00:14:04 PST
Created attachment 42637 [details] don't pause pipeline if already paused, same for play()
Philippe Normand
Comment 9 2009-11-06 00:14:29 PST
Created attachment 42638 [details] webkit coding style fixes
Sebastian Dröge (slomo)
Comment 10 2009-11-06 00:24:53 PST
(In reply to comment #7) > Created an attachment (id=42570) [details] > fix playback rate setter - in playbackPosition(): if returned position is GST_CLOCK_TIME_NONE (i.e. -1) you shouldn't divide it and all that, but handle it different ;) At other places positive or negative infinity is used for this. - Add a comment why the "<0.8 || > 2" case is there, that's not obvious (nor does it make much sense but the HTML5 spec says so) - check if the rate in setRate() actually changes, if it doesn't you don't need to do all that complex seeking stuff Apart from that all patches look good to me.
Philippe Normand
Comment 11 2009-11-06 01:11:07 PST
Created attachment 42639 [details] fix playback rate setter - playbackPosition() returns 0 if unknown - added comments for rate and audio mute - no need to check old rate in setRate, the HTMLMediaElement already takes care of it before calling MediaPlayer::setRate
Philippe Normand
Comment 12 2009-11-06 01:12:19 PST
Created attachment 42640 [details] don't pause pipeline if already paused, same for play() No change, rebased against setRate patch ;)
Philippe Normand
Comment 13 2009-11-06 01:13:16 PST
Created attachment 42641 [details] webkit coding style fixes No change, rebased against attachment 42640 [details]
Philippe Normand
Comment 14 2009-11-06 01:43:46 PST
Created attachment 42642 [details] fix playback rate setter
Eric Seidel (no email)
Comment 15 2009-11-06 11:24:38 PST
My mind is blown by the 4 patches on this bug. Which of these are actually up for review? Normally we try to do one-patch-per-bug to avoid such confusion. :)
Eric Seidel (no email)
Comment 16 2009-11-06 11:25:00 PST
Comment on attachment 42563 [details] unskip fixed tests Looks OK.
Eric Seidel (no email)
Comment 17 2009-11-06 11:26:17 PST
CCing media folks.
Eric Seidel (no email)
Comment 18 2009-11-06 11:26:55 PST
Comment on attachment 42641 [details] webkit coding style fixes Looks OK.
Sebastian Dröge (slomo)
Comment 19 2009-11-06 23:16:55 PST
Last patches look good for me (from the GStreamer point of view)
Holger Freyther
Comment 20 2009-11-07 00:49:32 PST
Comment on attachment 42639 [details] fix playback rate setter Could you please improve the ChangeLog? It should be a complete sentence and should describe what and why you do it. E.g. "Fix playback rate setter by remembering the rate was changed ..." I specially wonder what you try to achieve with the gst_element_get_state calls as seeking might or might not take longer than the XYZ * GST_MSECOND...
Holger Freyther
Comment 21 2009-11-07 00:54:56 PST
Comment on attachment 42640 [details] don't pause pipeline if already paused, same for play() I'm really allergic to timeouts. First they will block the GUI thread and second they will eventually fail. so increase problems instead of reducing them. If GStreamer really has a problem setting the pipeline to play twice we will have to introduce double states... The one WebKit wants the pipeline to be in and then listening to the state-changed bus message to see how our pipeline is doing... (e.g. we set it to play but the pipeline has a problem and we get an error message)...
Sebastian Dröge (slomo)
Comment 22 2009-11-07 00:57:54 PST
(In reply to comment #21) > (From update of attachment 42640 [details]) > If GStreamer really has a problem setting the pipeline to play twice It doesn't... if a state change to playing is currently pending or already finished, setting it to playing again will do nothing (same for all other states).
Philippe Normand
Comment 23 2009-11-09 01:20:04 PST
Created attachment 42739 [details] fix playback rate setter updated ChangeLog entry
Jan Alonzo
Comment 24 2009-11-09 03:07:17 PST
Comment on attachment 42739 [details] fix playback rate setter Some minor nits. > + if (position == GST_CLOCK_TIME_NONE) { > + // Position not yet available. Happens if the pipeline is in > + // NULL or READY state. > + ret = 0; > + } else Can we move the comment before the conditional to avoid the braces? > + ret = (float) (position / 1000000000.0); > + LOG_VERBOSE(Media, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position)); > + Can you please add a space between ret and LOG_VERBOSE for clarity?
Philippe Normand
Comment 25 2009-11-09 03:20:23 PST
Created attachment 42746 [details] fix playback rate setter
Jan Alonzo
Comment 26 2009-11-10 01:34:38 PST
Comment on attachment 42746 [details] fix playback rate setter r=me. I have a couple of minor suggestions though. > + // Position is available only if the pipeline is not in NULL or > + // READY state. > + if (position != GST_CLOCK_TIME_NONE) > + ret = (float) (position / 1000000000.0); We tend to avoid C-style casts and use static_cast and friends (also exists in a couple of places in this patch). > + gst_element_get_state(m_playBin, > + &state, &pending, 250 * GST_NSECOND); And also we tend to not break into multiple lines where a one-liner would suffice. Other those it's ok.
WebKit Commit Bot
Comment 27 2009-11-10 01:46:00 PST
Comment on attachment 42746 [details] fix playback rate setter Clearing flags on attachment: 42746 Committed r50726: <http://trac.webkit.org/changeset/50726>
WebKit Commit Bot
Comment 28 2009-11-10 01:46:08 PST
All reviewed patches have been landed. Closing bug.
Holger Freyther
Comment 29 2009-11-10 01:49:06 PST
One question. Why do we need to have a non null timeout value?
WebKit Commit Bot
Comment 30 2009-11-10 03:27:28 PST
Comment on attachment 42563 [details] unskip fixed tests Clearing flags on attachment: 42563 Committed r50735: <http://trac.webkit.org/changeset/50735>
WebKit Commit Bot
Comment 31 2009-11-10 03:34:55 PST
Comment on attachment 42641 [details] webkit coding style fixes Clearing flags on attachment: 42641 Committed r50736: <http://trac.webkit.org/changeset/50736>
WebKit Commit Bot
Comment 32 2009-11-10 03:35:02 PST
All reviewed patches have been landed. Closing bug.
Philippe Normand
Comment 33 2009-11-10 07:08:25 PST
Created attachment 42861 [details] don't pause pipeline if already paused, same for play()
Philippe Normand
Comment 34 2009-11-10 07:09:07 PST
Created attachment 42862 [details] don't block the UI thread when calling gst_element_get_state()
Eric Seidel (no email)
Comment 35 2009-11-10 12:56:19 PST
Should this bug be re-opened? Generally we try to do one-patch per bug so as to keep the comments from getting too long.
Philippe Normand
Comment 36 2009-11-11 00:41:13 PST
(In reply to comment #35) > Should this bug be re-opened? Generally we try to do one-patch per bug so as > to keep the comments from getting too long. Yes please reopen. I will avoid sending multiple patches for a single bug in the future.
WebKit Commit Bot
Comment 37 2009-11-12 02:32:32 PST
Comment on attachment 42861 [details] don't pause pipeline if already paused, same for play() Clearing flags on attachment: 42861 Committed r50872: <http://trac.webkit.org/changeset/50872>
WebKit Commit Bot
Comment 38 2009-11-12 02:40:03 PST
Comment on attachment 42862 [details] don't block the UI thread when calling gst_element_get_state() Clearing flags on attachment: 42862 Committed r50873: <http://trac.webkit.org/changeset/50873>
WebKit Commit Bot
Comment 39 2009-11-12 02:40:10 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.