WebKit Bugzilla
Attachment 370040 Details for
Bug 197946
: [macOS,iOS] Add always-on logging for AVPlayerTimeControlStatus changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197946-20190516063434.patch (text/plain), 3.17 KB, created by
Eric Carlson
on 2019-05-16 06:34:34 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2019-05-16 06:34:34 PDT
Size:
3.17 KB
patch
obsolete
>Subversion Revision: 245394 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1757f4fe17bce5b1ab26df8b0f364d6ce2442dd4..be23925b67a832f48b9cf22b422f326d4c917fc5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2019-05-16 Eric Carlson <eric.carlson@apple.com> >+ >+ [macOS,iOS] Add always-on logging for AVPlayerTimeControlStatus changes >+ https://bugs.webkit.org/show_bug.cgi?id=197946 >+ <rdar://problem/50627457> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::convertEnumerationToString): >+ (WTF::LogArgument<AVPlayerTimeControlStatus>::toString): >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange): >+ > 2019-05-16 Carlos Garcia Campos <cgarcia@igalia.com> > > [FreeType] Some character sequences with a variation selector are not rendered >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index 5afd8cba1cf840817bd951797ca9660f255f8474..c123ed5ed8a318618dbc32e23e10622b656d11b6 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -200,6 +200,35 @@ enum MediaPlayerAVFoundationObservationContext { > @end > #endif > >+namespace WebCore { >+static String convertEnumerationToString(AVPlayerTimeControlStatus enumerationValue) >+{ >+ static const NeverDestroyed<String> values[] = { >+ MAKE_STATIC_STRING_IMPL("AVPlayerTimeControlStatusPaused"), >+ MAKE_STATIC_STRING_IMPL("AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate"), >+ MAKE_STATIC_STRING_IMPL("AVPlayerTimeControlStatusPlaying"), >+ }; >+ static_assert(!static_cast<size_t>(AVPlayerTimeControlStatusPaused), "AVPlayerTimeControlStatusPaused is not 0 as expected"); >+ static_assert(static_cast<size_t>(AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate) == 1, "AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate is not 1 as expected"); >+ static_assert(static_cast<size_t>(AVPlayerTimeControlStatusPlaying) == 2, "AVPlayerTimeControlStatusPlaying is not 2 as expected"); >+ ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values)); >+ return values[static_cast<size_t>(enumerationValue)]; >+} >+} >+ >+namespace WTF { >+template<typename Type> >+struct LogArgument; >+ >+template <> >+struct LogArgument<AVPlayerTimeControlStatus> { >+ static String toString(const AVPlayerTimeControlStatus status) >+ { >+ return convertEnumerationToString(status); >+ } >+}; >+}; // namespace WTF >+ > namespace WebCore { > using namespace PAL; > >@@ -3046,6 +3075,8 @@ void MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange(int timeCont > if (m_cachedTimeControlStatus == timeControlStatus) > return; > >+ ALWAYS_LOG(LOGIDENTIFIER, static_cast<AVPlayerTimeControlStatus>(timeControlStatus), ", observing = ", m_shouldObserveTimeControlStatus); >+ > if (!m_shouldObserveTimeControlStatus) > return; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197946
: 370040