Title: [152263] branches/safari-537-branch/Source/WebCore

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152262 => 152263)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-01 21:16:15 UTC (rev 152262)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-01 21:17:47 UTC (rev 152263)
@@ -1,5 +1,23 @@
 2013-07-01  Lucas Forschler  <[email protected]>
 
+        Merge r152204
+
+    2013-06-28  Eric Carlson  <[email protected]>
+
+            [Mac] adopt new AVFoundation caption API
+            https://bugs.webkit.org/show_bug.cgi?id=118207
+
+            Reviewed by Dean Jackson.
+
+            No new tests, I was not able to come up with a reliable layout test.
+
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): New, call currentTrack->resetCueValues().
+            (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]): New delegate method.
+
+2013-07-01  Lucas Forschler  <[email protected]>
+
         Merge r152185
 
     2013-06-28  Ryosuke Niwa  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (152262 => 152263)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h	2013-07-01 21:16:15 UTC (rev 152262)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h	2013-07-01 21:17:47 UTC (rev 152263)
@@ -71,6 +71,7 @@
 #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
     RetainPtr<AVPlayerItem> playerItem() const { return m_avPlayerItem; }
     void processCue(NSArray *, double);
+    void flushCues();
 #endif
     
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (152262 => 152263)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2013-07-01 21:16:15 UTC (rev 152262)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2013-07-01 21:17:47 UTC (rev 152263)
@@ -165,6 +165,7 @@
 -(void)observeValueForKeyPath:keyPath ofObject:(id)object change:(NSDictionary *)change context:(MediaPlayerAVFoundationObservationContext)context;
 #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
 - (void)legibleOutput:(id)output didOutputAttributedStrings:(NSArray *)strings nativeSampleBuffers:(NSArray *)nativeSamples forItemTime:(CMTime)itemTime;
+- (void)outputSequenceWasFlushed:(id)output;
 #endif
 @end
 
@@ -1456,6 +1457,16 @@
 
     m_currentTrack->processCue(reinterpret_cast<CFArrayRef>(attributedStrings), time);
 }
+
+void MediaPlayerPrivateAVFoundationObjC::flushCues()
+{
+    LOG(Media, "MediaPlayerPrivateAVFoundationObjC::flushCues(%p)", this);
+
+    if (!m_currentTrack)
+        return;
+    
+    m_currentTrack->resetCueValues();
+}
 #endif // HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
 
 void MediaPlayerPrivateAVFoundationObjC::setCurrentTrack(InbandTextTrackPrivateAVF *track)
@@ -1671,6 +1682,20 @@
         m_callback->processCue(strings, CMTimeGetSeconds(itemTime));
     });
 }
+
+- (void)outputSequenceWasFlushed:(id)output
+{
+    UNUSED_PARAM(output);
+
+    if (!m_callback)
+        return;
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if (!m_callback)
+            return;
+        m_callback->flushCues();
+    });
+}
 #endif
 
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to