haikuwebkit/LayoutTests/media/video-seek-after-end-expect...

11 lines
180 B
Plaintext
Raw Permalink Normal View History

[GStreamer] cannot seek after video finished https://bugs.webkit.org/show_bug.cgi?id=114044 Patch by Balazs Kelemen <b.kelemen@sisa.samsung.com> on 2013-04-30 Reviewed by Philippe Normand. Source/WebCore: Test: media/video-seek-after-end.html Reland without wrong assertion. If seek is called after didEnd the pipeline state will not be in GST_STATE_NULL yet but it is not a problem because we handle that. Rework the seeking logic to be able to seek after reseting the pipeline. In addition to solve the actual problem this patch supposed to make seeking more robust and correct. The previous implementation tried to hide the complexity of asynchronous operations on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus but instead reported the seek as finished when it saw an asynchronous pending state (GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done. Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks. Seeks are not the only operations executed asynchronously, changing the pipeling state is similar. It means a seek can overlap with onother ongoing asynchronous operation. This change address this by introducing an invariant for seeks, which is that we only request a seek if there are no other ongoing asynchronous operations and the pipeline state is either paused or playing (which is recommended anyway according to GStreamer's documentation). This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the seek has been completed. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::toGstClockTime): Factored time conversation into a helper. (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available if the pipeline still has a pending state. As a workaround, if we are right after a seek we can use the seek time. Avoiding this situation would be possible by not allowing any asynchronous operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce this workaround. Otherwise those overlapping operations are handled fine by GStreamer. (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables. This function called when there is an intent to restart playback but it does not actually restart it. (WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline. (WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that. If there is an ongoing asynchronous operation make the seek pending, otherwise do it now. Now we handle overlapping seeks as well because I saw that it can happen in some tests. Added an early return for live streams as it doesn't makes sense to try seeking in them. (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring. (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone): (WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is now handled in asyncStateChangeDone. (WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline has an asynchronous pending state because it would fail. It does actually happen when we get a duration message after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): LayoutTests: * media/video-seek-after-end-expected.txt: Added. * media/video-seek-after-end.html: Added. Canonical link: https://commits.webkit.org/134499@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-14 12:49:06 +00:00
Test that we can seek after reached the end of the video.
AX: Audio and Video attachments are not output to VoiceOver https://bugs.webkit.org/show_bug.cgi?id=123479 Reviewed by Mario Sanchez Prada. Source/WebCore: Video and audio elements don't appear as distinct objects in the AX hierarchy, nor are they treated as replaceable objects when emitting the text. We should treat these characters like attachments, for one. On the Mac platform, we should also identify them with special subroles. Tests: platform/mac/accessibility/media-emits-object-replacement.html platform/mac/accessibility/media-role-descriptions.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::isGenericFocusableElement): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (createAccessibilityRoleMap): (-[WebAccessibilityObjectWrapper subrole]): (-[WebAccessibilityObjectWrapper roleDescription]): * editing/TextIterator.cpp: (WebCore::isRendererReplacedElement): LayoutTests: Making media elements int replaced elements has the unfortunate side-effect of causing a new line to be inserted into any test using a <video> or <audio> tag. * compositing/video/video-poster-expected.txt: * compositing/video/video-reflection-expected.txt: * compositing/visibility/visibility-simple-video-layer-expected.txt: * fast/css/first-letter-block-form-controls-crash-expected.txt: * fast/css/relative-position-replaced-in-table-display-crash-expected.txt: * fast/forms/access-key-for-all-elements-expected.txt: * fast/forms/form-associated-element-crash3-expected.txt: * fast/multicol/renderer-positioned-assert-crash-expected.txt: * fast/regions/full-screen-video-from-region-expected.txt: * fast/runin/nonblock-runin-expected.txt: * fast/spatial-navigation/snav-media-elements-expected.txt: * fullscreen/full-screen-crash-offsetLeft-expected.txt: * fullscreen/full-screen-no-style-sharing-expected.txt: * fullscreen/full-screen-stacking-context-expected.txt: * fullscreen/video-controls-drag-expected.txt: * fullscreen/video-controls-timeline-expected.txt: * fullscreen/video-cursor-auto-hide-expected.txt: * fullscreen/video-specified-size-expected.txt: * http/tests/appcache/video-expected.txt: * http/tests/media/pdf-served-as-pdf-expected.txt: * http/tests/media/reload-after-dialog-expected.txt: * http/tests/media/text-served-as-text-expected.txt: * http/tests/media/video-accept-encoding-expected.txt: * http/tests/media/video-buffered-range-contains-currentTime-expected.txt: * http/tests/media/video-cross-site-expected.txt: * http/tests/media/video-error-abort-expected.txt: * http/tests/media/video-load-suspend-expected.txt: * http/tests/media/video-play-progress-expected.txt: * http/tests/media/video-play-stall-before-meta-data-expected.txt: * http/tests/media/video-preload-expected.txt: * http/tests/media/video-redirect-expected.txt: * http/tests/media/video-referer-expected.txt: * http/tests/media/video-served-as-text-expected.txt: * http/tests/media/video-throttled-load-metadata-expected.txt: * http/tests/misc/empty-urls-expected.txt: * http/tests/security/contentSecurityPolicy/media-src-allowed-expected.txt: * http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt: * http/tests/security/local-video-poster-from-remote-expected.txt: * http/tests/security/local-video-source-from-remote-expected.txt: * http/tests/security/local-video-src-from-remote-expected.txt: * http/tests/security/text-track-crossorigin-expected.txt: * media/W3C/audio/events/event_canplay-expected.txt: * media/W3C/audio/events/event_canplay_manual-expected.txt: * media/W3C/audio/events/event_canplaythrough-expected.txt: * media/W3C/audio/events/event_canplaythrough_manual-expected.txt: * media/W3C/audio/events/event_loadeddata-expected.txt: * media/W3C/audio/events/event_loadeddata_manual-expected.txt: * media/W3C/audio/events/event_loadedmetadata-expected.txt: * media/W3C/audio/events/event_loadedmetadata_manual-expected.txt: * media/W3C/audio/events/event_loadstart-expected.txt: * media/W3C/audio/events/event_loadstart_manual-expected.txt: * media/W3C/audio/events/event_order_canplay_canplaythrough-expected.txt: * media/W3C/audio/events/event_order_canplay_playing-expected.txt: * media/W3C/audio/events/event_order_loadedmetadata_loadeddata-expected.txt: * media/W3C/audio/events/event_order_loadstart_progress-expected.txt: * media/W3C/audio/events/event_pause_manual-expected.txt: * media/W3C/audio/events/event_play-expected.txt: * media/W3C/audio/events/event_play_manual-expected.txt: * media/W3C/audio/events/event_playing-expected.txt: * media/W3C/audio/events/event_playing_manual-expected.txt: * media/W3C/audio/events/event_progress-expected.txt: * media/W3C/audio/events/event_progress_manual-expected.txt: * media/W3C/audio/events/event_timeupdate-expected.txt: * media/W3C/audio/events/event_timeupdate_manual-expected.txt: * media/W3C/audio/networkState/networkState_during_loadstart-expected.txt: * media/W3C/audio/paused/paused_false_during_play-expected.txt: * media/W3C/audio/paused/paused_true_during_pause-expected.txt: * media/W3C/audio/readyState/readyState_during_canplay-expected.txt: * media/W3C/audio/readyState/readyState_during_canplaythrough-expected.txt: * media/W3C/audio/readyState/readyState_during_loadeddata-expected.txt: * media/W3C/audio/readyState/readyState_during_loadedmetadata-expected.txt: * media/W3C/audio/readyState/readyState_during_playing-expected.txt: * media/W3C/video/canPlayType/canPlayType_application_octet_stream-expected.txt: * media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt: * media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt: * media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3-expected.txt: * media/W3C/video/canPlayType/canPlayType_bogus_type-expected.txt: * media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt: * media/W3C/video/canPlayType/canPlayType_method_exists-expected.txt: * media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt: * media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt: * media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt: * media/W3C/video/currentSrc/currentSrc_empty_if_no_src-expected.txt: * media/W3C/video/currentSrc/currentSrc_property_exists-expected.txt: * media/W3C/video/error/error_null-expected.txt: * media/W3C/video/error/error_onerror_called_on_bogus_source-expected.txt: * media/W3C/video/error/error_property_exists-expected.txt: * media/W3C/video/events/event_canplay-expected.txt: * media/W3C/video/events/event_canplay_manual-expected.txt: * media/W3C/video/events/event_canplaythrough-expected.txt: * media/W3C/video/events/event_canplaythrough_manual-expected.txt: * media/W3C/video/events/event_loadeddata-expected.txt: * media/W3C/video/events/event_loadeddata_manual-expected.txt: * media/W3C/video/events/event_loadedmetadata-expected.txt: * media/W3C/video/events/event_loadedmetadata_manual-expected.txt: * media/W3C/video/events/event_loadstart-expected.txt: * media/W3C/video/events/event_loadstart_manual-expected.txt: * media/W3C/video/events/event_order_canplay_canplaythrough-expected.txt: * media/W3C/video/events/event_order_canplay_playing-expected.txt: * media/W3C/video/events/event_order_loadedmetadata_loadeddata-expected.txt: * media/W3C/video/events/event_order_loadstart_progress-expected.txt: * media/W3C/video/events/event_pause_manual-expected.txt: * media/W3C/video/events/event_play-expected.txt: * media/W3C/video/events/event_play_manual-expected.txt: * media/W3C/video/events/event_playing-expected.txt: * media/W3C/video/events/event_playing_manual-expected.txt: * media/W3C/video/events/event_progress-expected.txt: * media/W3C/video/events/event_progress_manual-expected.txt: * media/W3C/video/events/event_timeupdate-expected.txt: * media/W3C/video/events/event_timeupdate_manual-expected.txt: * media/W3C/video/networkState/networkState_during_loadstart-expected.txt: * media/W3C/video/networkState/networkState_during_progress-expected.txt: * media/W3C/video/networkState/networkState_initial-expected.txt: * media/W3C/video/networkState/networkState_property_exists-expected.txt: * media/W3C/video/paused/paused_false_during_play-expected.txt: * media/W3C/video/paused/paused_true_during_pause-expected.txt: * media/W3C/video/preload/preload_property_exists-expected.txt: * media/W3C/video/preload/preload_reflects_auto_value-expected.txt: * media/W3C/video/preload/preload_reflects_bogus_value-expected.txt: * media/W3C/video/preload/preload_reflects_empty-expected.txt: * media/W3C/video/preload/preload_reflects_metadata-expected.txt: * media/W3C/video/preload/preload_reflects_no_value-expected.txt: * media/W3C/video/preload/preload_reflects_none-expected.txt: * media/W3C/video/preload/preload_reflects_none_autoplay-expected.txt: * media/W3C/video/readyState/readyState_during_canplay-expected.txt: * media/W3C/video/readyState/readyState_during_canplaythrough-expected.txt: * media/W3C/video/readyState/readyState_during_loadeddata-expected.txt: * media/W3C/video/readyState/readyState_during_loadedmetadata-expected.txt: * media/W3C/video/readyState/readyState_during_playing-expected.txt: * media/W3C/video/readyState/readyState_initial-expected.txt: * media/W3C/video/readyState/readyState_property_exists-expected.txt: * media/W3C/video/src/src_reflects_attribute_not_source_elements-expected.txt: * media/W3C/video/src/src_reflects_no_value-expected.txt: * media/W3C/video/src/src_removal_does_not_trigger_loadstart-expected.txt: * media/audio-mpeg-supported-expected.txt: * media/audio-mpeg4-supported-expected.txt: * media/audio-only-video-intrinsic-size-expected.txt: * media/auto-play-in-sandbox-with-allow-scripts-expected.txt: * media/before-load-member-access-expected.txt: * media/broken-video-expected.txt: * media/constructors-expected.txt: * media/controls-css-overload-expected.txt: * media/controls-drag-timebar-expected.txt: * media/controls-layout-direction-expected.txt: * media/controls-right-click-on-timebar-expected.txt: * media/csp-blocks-video-expected.txt: * media/event-attributes-expected.txt: * media/media-blocked-by-beforeload-expected.txt: * media/media-blocked-by-willsendrequest-expected.txt: * media/media-can-play-mpeg-audio-expected.txt: * media/media-can-play-mpeg4-video-expected.txt: * media/media-can-play-octet-stream-expected.txt: * media/media-can-play-type-expected.txt: * media/media-can-play-wav-audio-expected.txt: * media/media-captions-expected.txt: * media/media-captions-no-controls-expected.txt: * media/media-controller-expected.txt: * media/media-controller-playback-expected.txt: * media/media-controller-playbackrate-expected.txt: * media/media-controller-time-clamp-expected.txt: * media/media-controller-time-constant-expected.txt: * media/media-controller-time-expected.txt: * media/media-controller-timeupdate-expected.txt: * media/media-controller-unpause-expected.txt: * media/media-controls-invalid-url-expected.txt: * media/media-ended-expected.txt: * media/media-extension-with-fragment-expected.txt: * media/media-fragments/TC0001-expected.txt: * media/media-fragments/TC0002-expected.txt: * media/media-fragments/TC0003-expected.txt: * media/media-fragments/TC0004-expected.txt: * media/media-fragments/TC0005-expected.txt: * media/media-fragments/TC0006-expected.txt: * media/media-fragments/TC0009-expected.txt: * media/media-fragments/TC0011-expected.txt: * media/media-fragments/TC0012-expected.txt: * media/media-fragments/TC0014-expected.txt: * media/media-fragments/TC0015-expected.txt: * media/media-fragments/TC0017-expected.txt: * media/media-fragments/TC0024-expected.txt: * media/media-fragments/TC0027-expected.txt: * media/media-fragments/TC0028-expected.txt: * media/media-fragments/TC0029-expected.txt: * media/media-fragments/TC0030-expected.txt: * media/media-fragments/TC0031-expected.txt: * media/media-fragments/TC0032-expected.txt: * media/media-fragments/TC0033-expected.txt: * media/media-fragments/TC0034-expected.txt: * media/media-fragments/TC0035-expected.txt: * media/media-fragments/TC0036-expected.txt: * media/media-fragments/TC0037-expected.txt: * media/media-fragments/TC0038-expected.txt: * media/media-fragments/TC0039-expected.txt: * media/media-fragments/TC0044-expected.txt: * media/media-fragments/TC0051-expected.txt: * media/media-fragments/TC0052-expected.txt: * media/media-fragments/TC0053-expected.txt: * media/media-fragments/TC0054-expected.txt: * media/media-fragments/TC0055-expected.txt: * media/media-fragments/TC0058-expected.txt: * media/media-fragments/TC0059-expected.txt: * media/media-fragments/TC0061-expected.txt: * media/media-fragments/TC0062-expected.txt: * media/media-fragments/TC0063-expected.txt: * media/media-fragments/TC0064-expected.txt: * media/media-fragments/TC0065-expected.txt: * media/media-fragments/TC0066-expected.txt: * media/media-fragments/TC0067-expected.txt: * media/media-fragments/TC0068-expected.txt: * media/media-fragments/TC0069-expected.txt: * media/media-fragments/TC0070-expected.txt: * media/media-fragments/TC0071-expected.txt: * media/media-fragments/TC0072-expected.txt: * media/media-fragments/TC0073-expected.txt: * media/media-fragments/TC0074-expected.txt: * media/media-fragments/TC0075-expected.txt: * media/media-fragments/TC0076-expected.txt: * media/media-fragments/TC0077-expected.txt: * media/media-fragments/TC0078-expected.txt: * media/media-fragments/TC0079-expected.txt: * media/media-fragments/TC0080-expected.txt: * media/media-fragments/TC0081-expected.txt: * media/media-fragments/TC0082-expected.txt: * media/media-fragments/TC0083-expected.txt: * media/media-fragments/TC0084-expected.txt: * media/media-fragments/TC0085-expected.txt: * media/media-fragments/TC0086-expected.txt: * media/media-fragments/TC0087-expected.txt: * media/media-fragments/TC0088-expected.txt: * media/media-fragments/TC0089-expected.txt: * media/media-fragments/TC0090-expected.txt: * media/media-fragments/TC0091-expected.txt: * media/media-fragments/TC0092-expected.txt: * media/media-fragments/TC0093-expected.txt: * media/media-fragments/TC0094-expected.txt: * media/media-fullscreen-inline-expected.txt: * media/media-preload-no-delay-loadevent-expected.txt: * media/no-autoplay-with-user-gesture-requirement-expected.txt: * media/nodesFromRect-shadowContent-expected.txt: * media/restore-from-page-cache-expected.txt: * media/sources-fallback-codecs-expected.txt: * media/track/add-and-remove-track-expected.txt: * media/track/audio-track-expected.txt: * media/track/opera/interfaces/TextTrack/addCue-expected.txt: * media/track/opera/interfaces/TextTrack/removeCue-expected.txt: * media/track/opera/interfaces/TextTrackCue/align-expected.txt: * media/track/opera/interfaces/TextTrackCue/endTime-expected.txt: * media/track/opera/interfaces/TextTrackCue/id-expected.txt: * media/track/opera/interfaces/TextTrackCue/pauseOnExit-expected.txt: * media/track/opera/interfaces/TextTrackCue/startTime-expected.txt: * media/track/opera/interfaces/TextTrackCue/track-expected.txt: * media/track/opera/interfaces/TextTrackCueList/getCueById-expected.txt: * media/track/opera/interfaces/TextTrackCueList/length-expected.txt: * media/track/text-track-cue-is-reachable-expected.txt: * media/track/text-track-is-reachable-expected.txt: * media/track/track-active-cues-expected.txt: * media/track/track-add-remove-cue-expected.txt: * media/track/track-add-track-expected.txt: * media/track/track-addtrack-kind-expected.txt: * media/track/track-automatic-subtitles-expected.txt: * media/track/track-css-all-cues-expected.txt: * media/track/track-css-cue-lifetime-expected.txt: * media/track/track-css-matching-default-expected.txt: * media/track/track-css-matching-expected.txt: * media/track/track-css-matching-lang-expected.txt: * media/track/track-css-matching-timestamps-expected.txt: * media/track/track-css-property-whitelist-expected.txt: * media/track/track-css-user-override-expected.txt: * media/track/track-cue-container-rendering-position-expected.txt: * media/track/track-cue-empty-text-crash-expected.txt: * media/track/track-cue-inline-assertion-crash-expected.txt: * media/track/track-cue-mutable-expected.txt: * media/track/track-cue-mutable-fragment-expected.txt: * media/track/track-cue-negative-timestamp-expected.txt: * media/track/track-cue-nothing-to-render-expected.txt: * media/track/track-cue-overlap-snap-to-lines-not-set-expected.txt: * media/track/track-cue-rendering-empty-cue-crash-expected.txt: * media/track/track-cue-rendering-expected.txt: * media/track/track-cue-rendering-on-resize-expected.txt: * media/track/track-cue-rendering-rtl-expected.txt: * media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: * media/track/track-cue-rendering-tree-is-removed-properly-expected.txt: * media/track/track-cue-rendering-with-padding-expected.txt: * media/track/track-cues-cuechange-expected.txt: * media/track/track-cues-enter-exit-expected.txt: * media/track/track-cues-missed-expected.txt: * media/track/track-cues-pause-on-exit-expected.txt: * media/track/track-cues-seeking-expected.txt: * media/track/track-cues-sorted-before-dispatch-expected.txt: * media/track/track-default-attribute-expected.txt: * media/track/track-disabled-addcue-expected.txt: * media/track/track-disabled-expected.txt: * media/track/track-element-load-event-expected.txt: * media/track/track-in-band-cues-added-once-expected.txt: * media/track/track-in-band-duplicate-tracks-when-source-changes-expected.txt: * media/track/track-in-band-expected.txt: * media/track/track-in-band-legacy-api-expected.txt: * media/track/track-in-band-style-expected.txt: * media/track/track-kind-expected.txt: * media/track/track-large-timestamp-expected.txt: * media/track/track-legacyapi-with-automatic-mode-expected.txt: * media/track/track-load-from-element-readyState-expected.txt: * media/track/track-load-from-src-readyState-expected.txt: * media/track/track-long-captions-file-expected.txt: * media/track/track-mode-disabled-crash-expected.txt: * media/track/track-mode-expected.txt: * media/track/track-mode-not-changed-by-new-track-expected.txt: * media/track/track-mode-triggers-loading-expected.txt: * media/track/track-remove-active-cue-crash-expected.txt: * media/track/track-remove-by-setting-innerHTML-expected.txt: * media/track/track-remove-quickly-expected.txt: * media/track/track-text-track-cue-list-expected.txt: * media/track/track-texttracks-expected.txt: * media/track/track-webvtt-tc000-empty-expected.txt: * media/track/track-webvtt-tc001-utf8-expected.txt: * media/track/track-webvtt-tc002-bom-expected.txt: * media/track/track-webvtt-tc003-newlines-expected.txt: * media/track/track-webvtt-tc004-magic-header-expected.txt: * media/track/track-webvtt-tc005-header-comment-expected.txt: * media/track/track-webvtt-tc006-cue-identifiers-expected.txt: * media/track/track-webvtt-tc007-cue-no-id-expected.txt: * media/track/track-webvtt-tc008-timings-no-hours-expected.txt: * media/track/track-webvtt-tc009-timings-hour-expected.txt: * media/track/track-webvtt-tc010-no-timings-expected.txt: * media/track/track-webvtt-tc011-blank-lines-expected.txt: * media/track/track-webvtt-tc013-settings-expected.txt: * media/track/track-webvtt-tc014-alignment-expected.txt: * media/track/track-webvtt-tc015-positioning-expected.txt: * media/track/track-webvtt-tc016-align-positioning-expected.txt: * media/track/track-webvtt-tc017-line-position-expected.txt: * media/track/track-webvtt-tc018-align-text-line-position-expected.txt: * media/track/track-webvtt-tc019-cue-size-expected.txt: * media/track/track-webvtt-tc020-cue-size-align-expected.txt: * media/track/track-webvtt-tc021-valign-expected.txt: * media/track/track-webvtt-tc022-entities-expected.txt: * media/track/track-webvtt-tc023-markup-expected.txt: * media/track/track-webvtt-tc024-timestamp-expected.txt: * media/track/track-webvtt-tc025-class-markup-expected.txt: * media/track/track-webvtt-tc026-voice-expected.txt: * media/track/track-webvtt-tc027-empty-cue-expected.txt: * media/track/track-webvtt-tc028-unsupported-markup-expected.txt: * media/track/track-word-breaking-expected.txt: * media/track/tracklist-is-reachable-expected.txt: * media/track/video-track-expected.txt: * media/unsupported-rtsp-expected.txt: * media/unsupported-tracks-expected.txt: * media/video-append-source-expected.txt: * media/video-autoplay-expected.txt: * media/video-beforeload-remove-source-expected.txt: * media/video-buffered-expected.txt: * media/video-canvas-drawing-expected.txt: * media/video-canvas-drawing-output-expected.txt: * media/video-controls-captions-trackmenu-hide-on-click-outside-expected.txt: * media/video-controls-captions-trackmenu-includes-enabled-track-expected.txt: * media/video-controls-expected.txt: * media/video-controls-transformed-expected.txt: * media/video-controls-with-mutation-event-handler-expected.txt: * media/video-controls-zoomed-expected.txt: * media/video-currentTime-delay-expected.txt: * media/video-currentTime-expected.txt: * media/video-currentTime-set-expected.txt: * media/video-currentTime-set2-expected.txt: * media/video-delay-load-event-expected.txt: * media/video-display-aspect-ratio-expected.txt: * media/video-dom-autoplay-expected.txt: * media/video-dom-preload-expected.txt: * media/video-dom-src-expected.txt: * media/video-duration-known-after-eos-expected.txt: * media/video-error-does-not-exist-expected.txt: * media/video-load-networkState-expected.txt: * media/video-load-preload-metadata-expected.txt: * media/video-load-preload-none-expected.txt: * media/video-load-readyState-expected.txt: * media/video-load-require-user-gesture-expected.txt: * media/video-loop-expected.txt: * media/video-mouse-focus-expected.txt: * media/video-muted-expected.txt: * media/video-no-autoplay-expected.txt: * media/video-pause-empty-events-expected.txt: * media/video-pause-immediately-expected.txt: * media/video-play-empty-events-expected.txt: * media/video-play-pause-events-expected.txt: * media/video-play-pause-exception-expected.txt: * media/video-play-require-user-gesture-expected.txt: * media/video-playbackrate-expected.txt: * media/video-played-collapse-expected.txt: * media/video-played-ranges-1-expected.txt: * media/video-played-reset-expected.txt: * media/video-plays-past-end-of-test-expected.txt: * media/video-poster-blocked-by-willsendrequest-expected.txt: * media/video-poster-delayed-expected.txt: * media/video-poster-expected.txt: * media/video-poster-scale-expected.txt: * media/video-preload-expected.txt: * media/video-replaces-poster-expected.txt: * media/video-reverse-play-duration-expected.txt: * media/video-seek-after-end-expected.txt: * media/video-seek-by-small-increment-expected.txt: * media/video-seek-multiple-expected.txt: * media/video-seek-no-src-exception-expected.txt: * media/video-seek-past-end-playing-expected.txt: * media/video-seekable-expected.txt: * media/video-seeking-expected.txt: * media/video-set-rate-from-pause-expected.txt: * media/video-single-valid-source-expected.txt: * media/video-size-expected.txt: * media/video-source-error-expected.txt: * media/video-source-error-no-candidate-expected.txt: * media/video-source-expected.txt: * media/video-source-inserted-expected.txt: * media/video-source-load-expected.txt: * media/video-source-none-supported-expected.txt: * media/video-source-type-expected.txt: * media/video-src-blob-expected.txt: * media/video-src-change-expected.txt: * media/video-src-empty-expected.txt: * media/video-src-expected.txt: * media/video-src-invalid-poster-expected.txt: * media/video-src-invalid-remove-expected.txt: * media/video-src-none-expected.txt: * media/video-src-plus-source-expected.txt: * media/video-src-remove-expected.txt: * media/video-src-set-expected.txt: * media/video-src-source-expected.txt: * media/video-timeupdate-during-playback-expected.txt: * media/video-timeupdate-reverse-play-expected.txt: * media/video-volume-expected.txt: * media/video-width-height-expected.txt: * platform/mac/accessibility/media-element-expected.txt: * platform/mac/accessibility/media-emits-object-replacement-expected.txt: Added. * platform/mac/accessibility/media-emits-object-replacement.html: Added. * platform/mac/accessibility/media-role-descriptions-expected.txt: Added. * platform/mac/accessibility/media-role-descriptions.html: Added. * platform/mac/compositing/video/video-object-fit-expected.txt: * platform/mac/fullscreen/video-controls-override-expected.txt: * platform/mac/media/media-can-play-wav-audio-expected.txt: * platform/mac/media/media-can-play-webm-expected.txt: * platform/mac/media/video-seek-past-end-paused-expected.txt: Canonical link: https://commits.webkit.org/142070@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-06 14:15:42 +00:00
[GStreamer] cannot seek after video finished https://bugs.webkit.org/show_bug.cgi?id=114044 Patch by Balazs Kelemen <b.kelemen@sisa.samsung.com> on 2013-04-30 Reviewed by Philippe Normand. Source/WebCore: Test: media/video-seek-after-end.html Reland without wrong assertion. If seek is called after didEnd the pipeline state will not be in GST_STATE_NULL yet but it is not a problem because we handle that. Rework the seeking logic to be able to seek after reseting the pipeline. In addition to solve the actual problem this patch supposed to make seeking more robust and correct. The previous implementation tried to hide the complexity of asynchronous operations on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus but instead reported the seek as finished when it saw an asynchronous pending state (GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done. Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks. Seeks are not the only operations executed asynchronously, changing the pipeling state is similar. It means a seek can overlap with onother ongoing asynchronous operation. This change address this by introducing an invariant for seeks, which is that we only request a seek if there are no other ongoing asynchronous operations and the pipeline state is either paused or playing (which is recommended anyway according to GStreamer's documentation). This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the seek has been completed. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::toGstClockTime): Factored time conversation into a helper. (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available if the pipeline still has a pending state. As a workaround, if we are right after a seek we can use the seek time. Avoiding this situation would be possible by not allowing any asynchronous operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce this workaround. Otherwise those overlapping operations are handled fine by GStreamer. (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables. This function called when there is an intent to restart playback but it does not actually restart it. (WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline. (WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that. If there is an ongoing asynchronous operation make the seek pending, otherwise do it now. Now we handle overlapping seeks as well because I saw that it can happen in some tests. Added an early return for live streams as it doesn't makes sense to try seeking in them. (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring. (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone): (WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is now handled in asyncStateChangeDone. (WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline has an asynchronous pending state because it would fail. It does actually happen when we get a duration message after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (MediaPlayerPrivateGStreamer): LayoutTests: * media/video-seek-after-end-expected.txt: Added. * media/video-seek-after-end.html: Added. Canonical link: https://commits.webkit.org/134499@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-05-14 12:49:06 +00:00
EVENT(playing)
EVENT(ended)
EVENT(seeked)
EVENT(playing)
EXPECTED (video.currentTime.toFixed(2) == '3') OK
END OF TEST