Modified: trunk/Source/WebCore/ChangeLog (158333 => 158334)
--- trunk/Source/WebCore/ChangeLog 2013-10-31 00:32:58 UTC (rev 158333)
+++ trunk/Source/WebCore/ChangeLog 2013-10-31 00:50:06 UTC (rev 158334)
@@ -1,3 +1,27 @@
+2013-10-30 Brent Fulgham <bfulg...@apple.com>
+
+ [Win] Legible Output callbacks should happen on notification queue
+ https://bugs.webkit.org/show_bug.cgi?id=123545
+
+ Reviewed by Eric Carlson.
+
+ Modify the callback creation for Legible Output items so that they
+ are made on our notification queue. The use of the main queue was a
+ holdover from some temporary code used during earlier development.
+
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+ (WebCore::AVFWrapper::AVFWrapper): Assert this happens on the main thread.
+ (WebCore::AVFWrapper::~AVFWrapper): Ditto.
+ (WebCore::destroyAVFWrapper): Ditto.
+ (WebCore::AVFWrapper::createPlayer): Ditto.
+ (WebCore::AVFWrapper::createPlayerItem): Ditto.
+ Also, instruct LegibleOutput callbacks to happen on our notification
+ queue, rather than the main thread.
+ (WebCore::AVFWrapper::createAVCFVideoLayer): Assert this happens on the main thread.
+ (WebCore::AVFWrapper::destroyVideoLayer): Ditto.
+ (WebCore::AVFWrapper::createImageGenerator): Ditto.
+ (WebCore::AVFWrapper::destroyImageGenerator): Ditto.
+
2013-10-30 Alexey Proskuryakov <a...@apple.com>
XHR.response is null when requesting empty file as arraybuffer
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (158333 => 158334)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-10-31 00:32:58 UTC (rev 158333)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-10-31 00:50:06 UTC (rev 158334)
@@ -1162,6 +1162,7 @@
, m_currentTrack(0)
{
ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
LOG(Media, "AVFWrapper::AVFWrapper(%p)", this);
m_notificationQueue = dispatch_queue_create("MediaPlayerPrivateAVFoundationCF.notificationQueue", 0);
@@ -1171,6 +1172,7 @@
AVFWrapper::~AVFWrapper()
{
ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
LOG(Media, "AVFWrapper::~AVFWrapper(%p %d)", this, m_objectID);
destroyVideoLayer();
@@ -1251,6 +1253,8 @@
static void destroyAVFWrapper(void* context)
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
AVFWrapper* avfWrapper = static_cast<AVFWrapper*>(context);
if (!avfWrapper)
return;
@@ -1306,6 +1310,8 @@
void AVFWrapper::createPlayer(IDirect3DDevice9* d3dDevice)
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
ASSERT(!avPlayer() && avPlayerItem());
RetainPtr<CFMutableDictionaryRef> optionsRef = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
@@ -1347,6 +1353,8 @@
void AVFWrapper::createPlayerItem()
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
ASSERT(!avPlayerItem() && avAsset());
// Create the player item so we begin loading media data.
@@ -1382,7 +1390,7 @@
callbackInfo.context = callbackContext();
callbackInfo.legibleOutputCallback = AVFWrapper::legibleOutputCallback;
- AVCFPlayerItemLegibleOutputSetCallbacks(m_legibleOutput.get(), &callbackInfo, dispatch_get_main_queue());
+ AVCFPlayerItemLegibleOutputSetCallbacks(m_legibleOutput.get(), &callbackInfo, dispatchQueue());
AVCFPlayerItemLegibleOutputSetAdvanceIntervalForCallbackInvocation(m_legibleOutput.get(), legibleOutputAdvanceInterval);
AVCFPlayerItemLegibleOutputSetTextStylingResolution(m_legibleOutput.get(), AVCFPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly);
AVCFPlayerItemAddOutput(m_avPlayerItem.get(), m_legibleOutput.get());
@@ -1608,6 +1616,8 @@
void AVFWrapper::createAVCFVideoLayer()
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
if (!avPlayer() || m_avCFVideoLayer)
return;
@@ -1618,6 +1628,8 @@
void AVFWrapper::destroyVideoLayer()
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
LOG(Media, "AVFWrapper::destroyVideoLayer(%p)", this);
m_layerClient = nullptr;
m_caVideoLayer = 0;
@@ -1643,6 +1655,8 @@
void AVFWrapper::createImageGenerator()
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
if (!avAsset() || m_imageGenerator)
return;
@@ -1658,6 +1672,8 @@
void AVFWrapper::destroyImageGenerator()
{
+ ASSERT(isMainThread());
+ ASSERT(dispatch_get_main_queue() == dispatch_get_current_queue());
LOG(Media, "AVFWrapper::destroyImageGenerator(%p)", this);
m_imageGenerator = 0;
}