Bug 58961 - Live streams sometimes won't play with AVFoundation backend
Summary: Live streams sometimes won't play with AVFoundation backend
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) Other
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2011-04-19 21:20 PDT by Eric Carlson
Modified: 2011-05-05 19:30 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch. (6.91 KB, patch)
2011-04-19 21:58 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Proposed patch. (6.76 KB, patch)
2011-05-05 14:29 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch, with bug number. (6.89 KB, patch)
2011-05-05 14:48 PDT, Eric Carlson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 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.
Comment 1 Eric Carlson 2011-04-19 21:20:22 PDT
<rdar://9284748>
Comment 2 Eric Carlson 2011-04-19 21:58:54 PDT
Created attachment 90305 [details]
Proposed patch.
Comment 3 WebKit Review Bot 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.
Comment 4 Eric Carlson 2011-04-21 07:11:42 PDT
http://trac.webkit.org/changeset/84497
Comment 5 Eric Carlson 2011-05-05 14:08:40 PDT
Live streams still sometimes won't play.
Comment 6 Eric Carlson 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.
Comment 7 Eric Carlson 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.
Comment 8 Eric Carlson 2011-05-05 14:29:54 PDT
Created attachment 92467 [details]
Proposed patch.
Comment 9 WebKit Review Bot 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.
Comment 10 Eric Carlson 2011-05-05 14:48:01 PDT
Created attachment 92475 [details]
Patch, with bug number.
Comment 11 Eric Carlson 2011-05-05 19:30:57 PDT
http://trac.webkit.org/changeset/85913