Bug 130624 - Pass additional AVFoundation options during iOS playback
Summary: Pass additional AVFoundation options during iOS playback
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-21 17:38 PDT by Brent Fulgham
Modified: 2014-03-25 14:01 PDT (History)
10 users (show)

See Also:


Attachments
Patch (6.16 KB, patch)
2014-03-21 17:43 PDT, Brent Fulgham
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 Brent Fulgham 2014-03-21 17:38:04 PDT
Pass <video> attribute to AVFoundation during playback on iOS devices.
Comment 1 Brent Fulgham 2014-03-21 17:43:42 PDT
Created attachment 227516 [details]
Patch
Comment 2 Brent Fulgham 2014-03-21 17:45:04 PDT
<rdar://problem/16396300>
Comment 3 Darin Adler 2014-03-22 08:00:06 PDT
Comment on attachment 227516 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        [iOS] Pass additional options to AVFoudnation during playback.

Typo: foudnation

> Source/WebCore/html/HTMLMediaElement.cpp:6018
> +    if (value)
> +        *value = fastGetAttribute(attributeName);

It’s not good for performance to call fastHasAttribute and then fastGetAttribute on the same name. That’s a double hash table lookup. The code should be restructured so it only does one of the two. If you call fastGetAttribute, you can check “has” by checking isNull on the result.

> Source/WebCore/html/HTMLMediaElement.h:134
> +    virtual bool doesHaveAttribute(const AtomicString&, AtomicString* = 0) const override;

Should be nullptr, not 0.

Second argument needs a name. Not at all obvious what the AtomicString* is for.

> Source/WebCore/platform/graphics/MediaPlayer.h:251
> +    virtual bool doesHaveAttribute(const AtomicString&, AtomicString* = 0) const { return false; }

Should be nullptr, not 0.

Second argument needs a name. Not at all obvious what the AtomicString* is for.

> Source/WebCore/platform/graphics/MediaPlayer.h:303
> +    bool doesHaveAttribute(const AtomicString&, AtomicString* = 0) const;

Should be nullptr, not 0.

Second argument needs a name. Not at all obvious what the AtomicString* is for.
Comment 4 Brent Fulgham 2014-03-25 10:02:59 PDT
Comment on attachment 227516 [details]
Patch

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

>> Source/WebCore/ChangeLog:3
>> +        [iOS] Pass additional options to AVFoudnation during playback.
> 
> Typo: foudnation

Fixed

>> Source/WebCore/html/HTMLMediaElement.cpp:6018
>> +        *value = fastGetAttribute(attributeName);
> 
> It’s not good for performance to call fastHasAttribute and then fastGetAttribute on the same name. That’s a double hash table lookup. The code should be restructured so it only does one of the two. If you call fastGetAttribute, you can check “has” by checking isNull on the result.

Done.

>> Source/WebCore/html/HTMLMediaElement.h:134
>> +    virtual bool doesHaveAttribute(const AtomicString&, AtomicString* = 0) const override;
> 
> Should be nullptr, not 0.
> 
> Second argument needs a name. Not at all obvious what the AtomicString* is for.

Done.

>> Source/WebCore/platform/graphics/MediaPlayer.h:303
>> +    bool doesHaveAttribute(const AtomicString&, AtomicString* = 0) const;
> 
> Should be nullptr, not 0.
> 
> Second argument needs a name. Not at all obvious what the AtomicString* is for.

Done
Comment 5 Brent Fulgham 2014-03-25 14:01:14 PDT
Committed r166250: <http://trac.webkit.org/changeset/166250>