Bug 145989

Summary: REGRESSION(r175251, Mavericks Only): Playback may stall
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: MediaAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch dino: review+

Description Brent Fulgham 2015-06-15 14:34:22 PDT
During testing, we found that playback on Mavericks could stall for some types of content. This was due to some changes in how the underlying media system works in more recent Operating System releases. Consequently, we will revert Mavericks to work as it had before r175251 introduced this Mavericks-specific regression.
Comment 1 Brent Fulgham 2015-06-15 14:36:13 PDT
<rdar://problem/21271919>
Comment 2 Brent Fulgham 2015-06-15 14:37:44 PDT
Created attachment 254897 [details]
Patch
Comment 3 Dean Jackson 2015-06-15 14:40:48 PDT
Comment on attachment 254897 [details]
Patch

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

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:656
> +#if USE(VIDEOTOOLBOX) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100

I think you want 101000, here and below. Although I'm quite confused, because we seem inconsistent with this.
Comment 4 Brent Fulgham 2015-06-15 14:44:05 PDT
Created attachment 254899 [details]
Patch
Comment 5 Brent Fulgham 2015-06-15 15:06:16 PDT
Created attachment 254902 [details]
Patch
Comment 6 Brent Fulgham 2015-06-15 15:49:08 PDT
Committed r185569: <http://trac.webkit.org/changeset/185569>
Comment 7 David Kilzer (:ddkilzer) 2015-06-15 21:41:46 PDT
Comment on attachment 254902 [details]
Patch

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

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2270
> +#if USE(VIDEOTOOLBOX) && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < 101000)

Is this correct?  Should the clause after "USE(VIDEOTOOLBOX) be the "opposite" of "!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000)", which would be:

#if USE(VIDEOTOOLBOX) && (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000)

Actually, it currently does not matter here because USE(VIDEOTOOLBOX) is only true on PLATFORM(MAC) at the moment, although I think this is still (more) correct given the other changes.
Comment 8 Brent Fulgham 2015-06-15 21:57:54 PDT
(In reply to comment #7)
> Comment on attachment 254902 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=254902&action=review
> 
> > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2270
> > +#if USE(VIDEOTOOLBOX) && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < 101000)
> 
> Is this correct?  Should the clause after "USE(VIDEOTOOLBOX) be the
> "opposite" of "!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) ||
> __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000)", which would be:

Oh! Yes, you are right. I got a little carried away with some copy/paste. It should actually be:

#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000

I'll try to land a fix ASAP.
Comment 9 Brent Fulgham 2015-06-15 22:07:57 PDT
Corrected macro in follow-up patch:

Committed r185580: <http://trac.webkit.org/changeset/185580>