Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h (153381 => 153382)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h 2013-07-26 21:12:30 UTC (rev 153381)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h 2013-07-26 21:17:59 UTC (rev 153382)
@@ -165,9 +165,6 @@
SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemLegibleOutputGetTypeID, CFTypeID, __cdecl, (), ())
#define AVCFPlayerItemLegibleOutputGetTypeID softLink_AVCFPlayerItemLegibleOutputGetTypeID
-SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemRemoveOutput, void, __cdecl, (AVCFPlayerItemRef playerItem, AVCFPlayerItemOutputRef output), (playerItem, output))
-#define AVCFPlayerItemRemoveOutput softLink_AVCFPlayerItemRemoveOutput
-
SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemSeekToTimeWithToleranceAndCompletionCallback, AVCFAssetRef, __cdecl, (AVCFPlayerItemRef playerItem, CMTime time, CMTime toleranceBefore, CMTime toleranceAfter, AVCFPlayerItemSeekCompletionCallback completionCallback, void *context), (playerItem, time, toleranceBefore, toleranceAfter, completionCallback, context))
#define AVCFPlayerItemSeekToTimeWithToleranceAndCompletionCallback softLink_AVCFPlayerItemSeekToTimeWithToleranceAndCompletionCallback
@@ -262,6 +259,9 @@
SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemOutputSetSuppressPlayerRendering, void, __cdecl, (AVCFPlayerItemOutputRef output, Boolean suppressed), (output, suppressed))
#define AVCFPlayerItemOutputSetSuppressPlayerRendering softLink_AVCFPlayerItemOutputSetSuppressPlayerRendering
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemRemoveOutput, void, __cdecl, (AVCFPlayerItemRef playerItem, AVCFPlayerItemOutputRef output), (playerItem, output))
+#define AVCFPlayerItemRemoveOutput softLink_AVCFPlayerItemRemoveOutput
+
SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup, void, __cdecl, (AVCFPlayerItemRef playerItem, AVCFMediaSelectionOptionRef selectionOption, AVCFMediaSelectionGroupRef selectionGroup), (playerItem, selectionOption, selectionGroup))
#define AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup softLink_AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (153381 => 153382)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-07-26 21:12:30 UTC (rev 153381)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-07-26 21:17:59 UTC (rev 153382)
@@ -36,7 +36,11 @@
#include "FloatConversion.h"
#include "FrameView.h"
#include "GraphicsContext.h"
+#if HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
#include "InbandTextTrackPrivateAVCF.h"
+#else
+#include "InbandTextTrackPrivateLegacyAVCF.h"
+#endif
#include "KURL.h"
#include "Logging.h"
#include "PlatformCALayer.h"
@@ -44,7 +48,9 @@
#include "TimeRanges.h"
#include <AVFoundationCF/AVCFPlayerItem.h>
+#if HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
#include <AVFoundationCF/AVCFPlayerItemLegibleOutput.h>
+#endif
#include <AVFoundationCF/AVCFPlayerLayer.h>
#include <AVFoundationCF/AVFoundationCF.h>
#include <CoreMedia/CoreMedia.h>
@@ -949,7 +955,9 @@
#if !HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
void MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks()
{
+#if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
AVCFPlayerItemSelectMediaOptionInMediaSelectionGroup(avPlayerItem(m_avfWrapper), 0, safeMediaSelectionGroupForLegibleMedia(m_avfWrapper));
+#endif
Vector<RefPtr<InbandTextTrackPrivateAVF> > removedTextTracks = m_textTracks;
RetainPtr<CFArrayRef> tracks = adoptCF(AVCFPlayerItemCopyTracks(avPlayerItem(m_avfWrapper)));
@@ -1451,6 +1459,7 @@
kCMTimeZero, kCMTimeZero, &seekCompletedCallback, callbackContext());
}
+#if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
struct LegibleOutputData {
RetainPtr<CFArrayRef> m_attributedStrings;
double m_time;
@@ -1503,6 +1512,7 @@
dispatch_async_f(dispatch_get_main_queue(), legibleOutputData.leakPtr(), processCue);
}
+#endif
void AVFWrapper::setAsset(AVCFURLAssetRef asset)
{
@@ -1615,7 +1625,7 @@
return image;
}
-#if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
+#if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
AVCFMediaSelectionGroupRef AVFWrapper::safeMediaSelectionGroupForLegibleMedia() const
{
if (!avAsset())