Bug 114484 - Add support for MediaPlayer::minTimeSeekable()
Summary: Add support for MediaPlayer::minTimeSeekable()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on: 114483
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-11 17:45 PDT by Jer Noble
Modified: 2013-04-12 11:38 PDT (History)
5 users (show)

See Also:


Attachments
Patch (13.74 KB, patch)
2013-04-11 17:53 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (11.26 KB, patch)
2013-04-11 21:51 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (482.77 KB, application/zip)
2013-04-12 02:13 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (725.32 KB, application/zip)
2013-04-12 02:34 PDT, Build Bot
no flags Details
Patch (13.82 KB, patch)
2013-04-12 10:10 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2013-04-11 17:45:11 PDT
Add support for MediaPlayer::minTimeSeekable()
Comment 1 Jer Noble 2013-04-11 17:53:52 PDT
Created attachment 197705 [details]
Patch
Comment 2 Jer Noble 2013-04-11 21:51:16 PDT
Created attachment 197713 [details]
Patch

Fixed windows build errors by adding symbols needed by WebCoreTestSupport to exports list.
Comment 3 Jer Noble 2013-04-11 21:53:41 PDT
Wrong bug; disregard attachment 197713 [details].
Comment 4 Build Bot 2013-04-12 02:13:02 PDT
Comment on attachment 197705 [details]
Patch

Attachment 197705 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/132008

New failing tests:
media/video-seek-past-end-paused.html
Comment 5 Build Bot 2013-04-12 02:13:03 PDT
Created attachment 197734 [details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 6 Build Bot 2013-04-12 02:34:10 PDT
Comment on attachment 197705 [details]
Patch

Attachment 197705 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/81201

New failing tests:
media/video-seek-past-end-paused.html
Comment 7 Build Bot 2013-04-12 02:34:12 PDT
Created attachment 197735 [details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 8 Jer Noble 2013-04-12 08:19:01 PDT
The test failures will be fixed by bug #114483.  Marking this bug as dependent on that one.
Comment 9 Eric Carlson 2013-04-12 09:59:46 PDT
Comment on attachment 197705 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=197705&action=review

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:696
> +    double minTimeSeekable = std::numeric_limits<double>::infinity();
> +    for (NSValue *thisRangeValue in seekableRanges) {
> +        CMTimeRange timeRange = [thisRangeValue CMTimeRangeValue];
> +        if (!CMTIMERANGE_IS_VALID(timeRange) || CMTIMERANGE_IS_EMPTY(timeRange))
> +            continue;
> +
> +        double startOfRange = CMTimeGetSeconds(timeRange.start);
> +        if (minTimeSeekable > startOfRange)
> +            minTimeSeekable = startOfRange;
> +    }
> +    return minTimeSeekable;

infinity() is probably not the right value to return if seekableRanges is not empty, but does not have any valid ranges. Definitely an edge case, but probably worth special casing.
Comment 10 Jer Noble 2013-04-12 10:10:27 PDT
Created attachment 197864 [details]
Patch

Return a 0 from platformMinTimeSeekable() if -seekableTimeRanges have no valid ranges.
Comment 11 Jer Noble 2013-04-12 11:38:14 PDT
Committed r148291: <http://trac.webkit.org/changeset/148291>