| Summary: | Pass additional AVFoundation options during iOS playback | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||
| Component: | Media | Assignee: | Brent Fulgham <bfulgham> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, calvaris, commit-queue, eric.carlson, esprehn+autocc, glenn, gyuyoung.kim, jer.noble, philipj, sergio | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Brent Fulgham
2014-03-21 17:38:04 PDT
Created attachment 227516 [details]
Patch
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 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 Committed r166250: <http://trac.webkit.org/changeset/166250> |