Adopt MediaRemote.
Created attachment 282329 [details] WIP
Comment on attachment 282329 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=282329&action=review > Source/WebCore/Modules/mediasource/SourceBuffer.cpp:1589 > - m_buffered->add(presentationTimestamp.toDouble(), (presentationTimestamp + frameDuration + microsecond).toDouble()); > + m_buffered->add(presentationTimestamp.toDouble(), (presentationTimestamp + frameDuration).toDouble()); Is this related? > Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:2 > + * Copyright (C) 2014-2015 Apple Inc. All rights reserved. Nit: 2014-2015 -> 2016. > Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:156 > + if (std::isfinite(duration) && duration != MediaPlayer::invalidTime()) > + CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoDuration, cfDuration.get()); Nit: you don't need to create the CFNumber unless it will be added to the info dictionary. > Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:163 > + CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoElapsedTime, cfCurrentTime.get()); Ditto. > Source/WebCore/platform/mac/RemoteCommandListenerMac.mm:60 > + auto commandInfoArray = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, sizeof(supportedCommands) / sizeof(MRMediaRemoteCommand), &kCFTypeArrayCallBacks)); You can use ARRAY_SIZE here.
Created attachment 282347 [details] WIP
Comment on attachment 282347 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=282347&action=review > Source/WebCore/platform/mac/RemoteCommandListenerMac.h:27 > +#ifndef RemoteCommandListenerMac_h > +#define RemoteCommandListenerMac_h Nit: this can use "#pragma once"
(In reply to comment #2) > Comment on attachment 282329 [details] > WIP > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282329&action=review > > > Source/WebCore/Modules/mediasource/SourceBuffer.cpp:1589 > > - m_buffered->add(presentationTimestamp.toDouble(), (presentationTimestamp + frameDuration + microsecond).toDouble()); > > + m_buffered->add(presentationTimestamp.toDouble(), (presentationTimestamp + frameDuration).toDouble()); > > Is this related? Whoops. Nope. > > Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:2 > > + * Copyright (C) 2014-2015 Apple Inc. All rights reserved. > > Nit: 2014-2015 -> 2016. Ok. > > Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:156 > > + if (std::isfinite(duration) && duration != MediaPlayer::invalidTime()) > > + CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoDuration, cfDuration.get()); > > Nit: you don't need to create the CFNumber unless it will be added to the > info dictionary. > > > Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:163 > > + CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoElapsedTime, cfCurrentTime.get()); > > Ditto. > > > Source/WebCore/platform/mac/RemoteCommandListenerMac.mm:60 > > + auto commandInfoArray = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, sizeof(supportedCommands) / sizeof(MRMediaRemoteCommand), &kCFTypeArrayCallBacks)); > > You can use ARRAY_SIZE here. Ok. (In reply to comment #4) > Comment on attachment 282347 [details] > WIP > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282347&action=review > > > Source/WebCore/platform/mac/RemoteCommandListenerMac.h:27 > > +#ifndef RemoteCommandListenerMac_h > > +#define RemoteCommandListenerMac_h > > Nit: this can use "#pragma once" Ok.
Created attachment 282348 [details] Patch
Created attachment 282349 [details] Patch
Created attachment 282351 [details] Patch for landing
Created attachment 282353 [details] Patch for landing
Comment on attachment 282353 [details] Patch for landing Clearing flags on attachment: 282353 Committed r202642: <http://trac.webkit.org/changeset/202642>
<rdar://problem/27090091>
CMake build fix. Committed r202661: <http://trac.webkit.org/changeset/202661> Committed r202662: <http://trac.webkit.org/changeset/202662>