Bug 58961

Summary: Live streams sometimes won't play with AVFoundation backend
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: Other   
Attachments:
Description Flags
Proposed patch.
none
Proposed patch.
none
Patch, with bug number. darin: review+

Eric Carlson
Reported 2011-04-19 21:20:02 PDT
A <video> element with an http live stream displays the first frame of video but can not be played.
Attachments
Proposed patch. (6.91 KB, patch)
2011-04-19 21:58 PDT, Eric Carlson
no flags
Proposed patch. (6.76 KB, patch)
2011-05-05 14:29 PDT, Eric Carlson
no flags
Patch, with bug number. (6.89 KB, patch)
2011-05-05 14:48 PDT, Eric Carlson
darin: review+
Eric Carlson
Comment 1 2011-04-19 21:20:22 PDT
Eric Carlson
Comment 2 2011-04-19 21:58:54 PDT
Created attachment 90305 [details] Proposed patch.
WebKit Review Bot
Comment 3 2011-04-19 22:01:26 PDT
Attachment 90305 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:480: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Carlson
Comment 4 2011-04-21 07:11:42 PDT
Eric Carlson
Comment 5 2011-05-05 14:08:40 PDT
Live streams still sometimes won't play.
Eric Carlson
Comment 6 2011-05-05 14:10:04 PDT
The problem happens when seekToTime: is called on the AVPlayerItem immediately after AVFoundation reports that the stream's metadata is available, and neither the completion handler nor the periodic time observer fires. This leaves WebKit waiting for the seek to complete.
Eric Carlson
Comment 7 2011-05-05 14:12:43 PDT
Two issues here: 1) the periodic time observer is an autorelease object, but we don't retain it so it it is deleted and *can't* ever fire. 1) our AVFoundation media engine state machine should not try to track when a seek is in progress, and should instead depend on AVFoundation to notify of buffering state changes.
Eric Carlson
Comment 8 2011-05-05 14:29:54 PDT
Created attachment 92467 [details] Proposed patch.
WebKit Review Bot
Comment 9 2011-05-05 14:32:37 PDT
Attachment 92467 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Eric Carlson
Comment 10 2011-05-05 14:48:01 PDT
Created attachment 92475 [details] Patch, with bug number.
Eric Carlson
Comment 11 2011-05-05 19:30:57 PDT
Note You need to log in before you can comment on or make changes to this bug.