Changeset 88945 in webkit


Ignore:
Timestamp:
Jun 15, 2011 9:26:45 AM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-06-14 Jer Noble <jer.noble@apple.com>

Reviewed by Eric Carlson.

(AVFoundation) Apple event video appears as live stream and is not seekable
https://bugs.webkit.org/show_bug.cgi?id=62694

No new tests; There are no media-player port specific tests yet.

Work around a bug in apple.com live stream javascript controller library. When an AVAsset returns an indefinite time
for its duration, return 0 if the asset has no tracks, and infinity otherwise. This keeps the apple.com controller
from identifying the stored stream as a live stream.

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88943 r88945  
     12011-06-14  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        (AVFoundation) Apple event video appears as live stream and is not seekable
     6        https://bugs.webkit.org/show_bug.cgi?id=62694
     7
     8        No new tests; There are no media-player port specific tests yet.
     9
     10        Work around a bug in apple.com live stream javascript controller library.  When an AVAsset returns an indefinite time
     11        for its duration, return 0 if the asset has no tracks, and infinity otherwise.  This keeps the apple.com controller
     12        from identifying the stored stream as a live stream.
     13
     14        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
     15        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
     16
    1172011-06-15  Andrey Kosyakov  <caseq@chromium.org>
    218
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm

    r88847 r88945  
    443443        return narrowPrecisionToFloat(CMTimeGetSeconds(cmDuration));
    444444
    445     if (CMTIME_IS_INDEFINITE(cmDuration))
    446         return numeric_limits<float>::infinity();
     445    if (CMTIME_IS_INDEFINITE(cmDuration)) {
     446        if (![[m_avAsset.get() tracks] count])
     447            return 0;
     448        else
     449            return numeric_limits<float>::infinity();
     450    }
    447451
    448452    LOG(Media, "MediaPlayerPrivateAVFoundationObjC::platformDuration(%p) - invalid duration, returning %.0f", this, invalidTime());
Note: See TracChangeset for help on using the changeset viewer.