Changeset 181036 in webkit


Ignore:
Timestamp:
Mar 4, 2015 2:41:24 PM (9 years ago)
Author:
ddkilzer@apple.com
Message:

Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

Reviewed by Alex Christensen.

  • Configurations/WebCore.unexp:
  • Remove all weak symbols for CoreMedia.framework as they should no longer appear.
  • Modules/plugins/QuickTimePluginReplacement.mm:
  • platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • Clean up headers.
  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
  • Add soft-link functions and constants from remaining source files.
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
  • platform/mac/PlatformClockCM.mm:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:
  • Switch to using CoreMediaSoftLink.h.
  • platform/mac/SoftLinking.h:
  • platform/win/SoftLinking.h:
  • Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}() macros since it won't work with const structs.
  • platform/spi/cf/CoreMediaSPI.h:
  • Add SPI declarations for Windows originally from InbandTextTrackPrivateAVF.cpp.
Location:
trunk/Source/WebCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181024 r181036  
     12015-03-04  David Kilzer  <ddkilzer@apple.com>
     2
     3        Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
     4        <http://webkit.org/b/141870>
     5
     6        Reviewed by Alex Christensen.
     7
     8        * Configurations/WebCore.unexp:
     9        - Remove all weak symbols for CoreMedia.framework as they should
     10          no longer appear.
     11
     12        * Modules/plugins/QuickTimePluginReplacement.mm:
     13        * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
     14        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
     15        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     16        - Clean up headers.
     17
     18        * platform/cf/CoreMediaSoftLink.cpp:
     19        * platform/cf/CoreMediaSoftLink.h:
     20        - Add soft-link functions and constants from remaining source
     21          files.
     22
     23        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
     24        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
     25        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
     26        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
     27        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
     28        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
     29        * platform/mac/PlatformClockCM.mm:
     30        * platform/mediastream/mac/AVMediaCaptureSource.mm:
     31        * platform/mediastream/mac/AVVideoCaptureSource.mm:
     32        - Switch to using CoreMediaSoftLink.h.
     33
     34        * platform/mac/SoftLinking.h:
     35        * platform/win/SoftLinking.h:
     36        - Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
     37          macros since it won't work with const structs.
     38
     39        * platform/spi/cf/CoreMediaSPI.h:
     40        - Add SPI declarations for Windows originally from
     41          InbandTextTrackPrivateAVF.cpp.
     42
    1432015-03-04  Commit Queue  <commit-queue@webkit.org>
    244
  • trunk/Source/WebCore/Configurations/WebCore.unexp

    r180366 r181036  
    3232_MTAudioProcessingTapGetStorage
    3333
    34 # Source/WebCore/platform/mac/PlatformClockCM.mm
    35 _CMAudioDeviceClockCreate
    36 _CMTimebaseCreateWithMasterClock
    37 _CMTimebaseSetRate
    38 _CMTimebaseSetTime
    39 
    40 # Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp
    41 _CMBlockBufferCopyDataBytes
    42 _CMBlockBufferGetDataLength
    43 _CMFormatDescriptionGetExtensions
    44 _CMSampleBufferGetDataBuffer
    45 _CMSampleBufferGetFormatDescription
    46 _CMSampleBufferGetSampleTimingInfo
    47 
    4834# Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
    4935_MACaptionAppearanceAddSelectedLanguage
     
    7561_VTPixelTransferSessionTransferImage
    7662
    77 # Function marked ALWAYS_INLINE in header, but may not be inlined in a
    78 # Debug build.
    79 
    80 # Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
    81 _CMFormatDescriptionGetMediaSubType
    82 _CMFormatDescriptionGetMediaType
    83 _CMSampleBufferCreateCopy
    84 _CMSampleBufferCreateCopyWithNewTiming
    85 _CMSampleBufferGetDecodeTimeStamp
    86 _CMSampleBufferGetDuration
    87 _CMSampleBufferGetPresentationTimeStamp
    88 _CMSampleBufferGetSampleAttachmentsArray
    89 _CMSampleBufferGetSampleTimingInfoArray
    90 _CMSampleBufferGetTotalSampleSize
    91 _CMVideoFormatDescriptionGetPresentationDimensions
    92 
    9363# Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp
    9464_DDDFAScannerCreateFromCache
  • trunk/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm

    r180366 r181036  
    3030#import "QuickTimePluginReplacement.h"
    3131
    32 #import "CoreMediaSoftLink.h"
    3332#import "Event.h"
    3433#import "HTMLPlugInElement.h"
     
    4443#import "ScriptController.h"
    4544#import "ScriptSourceCode.h"
    46 #import "SoftLinking.h"
    4745#import "UserAgentScripts.h"
    4846#import <objc/runtime.h>
     
    5250#import <JavaScriptCore/APICast.h>
    5351#import <wtf/text/Base64.h>
     52
     53#import "CoreMediaSoftLink.h"
    5454
    5555typedef AVMetadataItem AVMetadataItemType;
  • trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.cpp

    r180481 r181036  
    3434SOFT_LINK_FRAMEWORK_SOURCE(WebCore, CoreMedia)
    3535
     36SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMBlockBufferCopyDataBytes, OSStatus, (CMBlockBufferRef theSourceBuffer, size_t offsetToData, size_t dataLength, void* destination), (theSourceBuffer, offsetToData, dataLength, destination))
     37SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMBlockBufferGetDataLength, size_t, (CMBlockBufferRef theBuffer), (theBuffer))
     38SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMFormatDescriptionGetExtensions, CFDictionaryRef, (CMFormatDescriptionRef desc), (desc))
     39SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetDataBuffer, CMBlockBufferRef, (CMSampleBufferRef sbuf), (sbuf))
     40SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, (CMSampleBufferRef sbuf), (sbuf))
     41SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetSampleTimingInfo, OSStatus, (CMSampleBufferRef sbuf, CMItemIndex sampleIndex, CMSampleTimingInfo* timingInfoOut), (sbuf, sampleIndex, timingInfoOut))
    3642SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeCompare, int32_t, (CMTime time1, CMTime time2), (time1, time2))
    3743SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeGetSeconds, Float64, (CMTime time), (time))
     
    4046SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeRangeGetEnd, CMTime, (CMTimeRange range), (range))
    4147
    42 SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTimeZero, CMTime);
     48SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms, CFStringRef)
     49SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAlignmentType_End, CFStringRef)
     50SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAlignmentType_Middle, CFStringRef)
     51SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAlignmentType_Start, CFStringRef)
     52SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_Alignment, CFStringRef)
     53SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_BackgroundColorARGB, CFStringRef)
     54SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight, CFStringRef)
     55SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_BoldStyle, CFStringRef)
     56SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_CharacterBackgroundColorARGB, CFStringRef)
     57SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_FontFamilyName, CFStringRef)
     58SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_ForegroundColorARGB, CFStringRef)
     59SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_ItalicStyle, CFStringRef)
     60SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection, CFStringRef)
     61SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_RelativeFontSize, CFStringRef)
     62SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection, CFStringRef)
     63SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_UnderlineStyle, CFStringRef)
     64SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_VerticalLayout, CFStringRef)
     65SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextMarkupAttribute_WritingDirectionSizePercentage, CFStringRef)
     66SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextVerticalLayout_LeftToRight, CFStringRef)
     67SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTextVerticalLayout_RightToLeft, CFStringRef)
     68SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTimeInvalid, CMTime)
     69SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTimeZero, CMTime)
    4370
    4471#if PLATFORM(COCOA)
    45 SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMNotificationCenterGetDefaultLocalCenter, CMNotificationCenterRef, (void), ());
     72SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMFormatDescriptionGetMediaSubType, FourCharCode, (CMFormatDescriptionRef desc), (desc))
     73SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMFormatDescriptionGetMediaType, CMMediaType, (CMFormatDescriptionRef desc), (desc))
     74SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMNotificationCenterGetDefaultLocalCenter, CMNotificationCenterRef, (void), ())
    4675SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMNotificationCenterAddListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object, UInt32 flags), (center, listener, callback, notification, object, flags))
    4776SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMNotificationCenterRemoveListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object), (center, listener, callback, notification, object))
     77SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (*callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
     78SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferCreate, OSStatus, (CFAllocatorRef allocator, CMBlockBufferRef dataBuffer, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, CMItemCount numSamples, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMItemCount numSampleSizeEntries, const size_t *sampleSizeArray, CMSampleBufferRef *sBufOut), (allocator, dataBuffer, dataReady, makeDataReadyCallback, makeDataReadyRefcon, formatDescription, numSamples, numSampleTimingEntries, sampleTimingArray, numSampleSizeEntries, sampleSizeArray, sBufOut))
     79SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferCreateCopy, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CMSampleBufferRef *sbufCopyOut), (allocator, sbuf, sbufCopyOut))
     80SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferCreateCopyWithNewTiming, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef originalSBuf, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMSampleBufferRef *sBufCopyOut), (allocator, originalSBuf, numSampleTimingEntries, sampleTimingArray, sBufCopyOut))
     81SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetDecodeTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf))
     82SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetDuration, CMTime, (CMSampleBufferRef sbuf), (sbuf))
     83SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetPresentationTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf))
     84SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetSampleAttachmentsArray, CFArrayRef, (CMSampleBufferRef sbuf, Boolean createIfNecessary), (sbuf, createIfNecessary))
     85SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetSampleTimingInfoArray, OSStatus, (CMSampleBufferRef sbuf, CMItemCount timingArrayEntries, CMSampleTimingInfo *timingArrayOut, CMItemCount *timingArrayEntriesNeededOut), (sbuf, timingArrayEntries, timingArrayOut, timingArrayEntriesNeededOut))
     86SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSampleBufferGetTotalSampleSize, size_t, (CMSampleBufferRef sbuf), (sbuf))
     87SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMSetAttachment, void, (CMAttachmentBearerRef target, CFStringRef key, CFTypeRef value, CMAttachmentMode attachmentMode), (target, key, value, attachmentMode))
     88SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimebaseCreateWithMasterClock, OSStatus, (CFAllocatorRef allocator, CMClockRef masterClock, CMTimebaseRef *timebaseOut), (allocator, masterClock, timebaseOut))
    4889SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimebaseGetTime, CMTime, (CMTimebaseRef timebase), (timebase))
     90SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate))
     91SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimebaseSetTime, OSStatus, (CMTimebaseRef timebase, CMTime time), (timebase, time))
    4992SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeCopyAsDictionary, CFDictionaryRef, (CMTime time, CFAllocatorRef allocator), (time, allocator))
     93SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMVideoFormatDescriptionGetDimensions, CMVideoDimensions, (CMVideoFormatDescriptionRef videoDesc), (videoDesc))
     94SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMVideoFormatDescriptionGetPresentationDimensions, CGSize, (CMVideoFormatDescriptionRef videoDesc, Boolean usePixelAspectRatio, Boolean useCleanAperture), (videoDesc, usePixelAspectRatio, useCleanAperture))
     95
     96SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMSampleAttachmentKey_DoNotDisplay, CFStringRef)
     97SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMSampleAttachmentKey_NotSync, CFStringRef)
     98SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately, CFStringRef)
     99SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_DrainAfterDecoding, CFStringRef)
     100SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_EmptyMedia, CFStringRef)
     101SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding, CFStringRef)
     102SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTimebaseNotification_EffectiveRateChanged, CFStringRef)
     103SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTimebaseNotification_TimeJumped, CFStringRef)
    50104#endif // PLATFORM(COCOA)
     105
     106#if PLATFORM(IOS)
     107SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMAudioClockCreate, OSStatus, (CFAllocatorRef allocator, CMClockRef *clockOut), (allocator, clockOut))
     108SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeMaximum, CMTime, (CMTime time1, CMTime time2), (time1, time2))
     109SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeMinimum, CMTime, (CMTime time1, CMTime time2), (time1, time2))
     110SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
     111SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeRangeMake, CMTimeRange, (CMTime start, CMTime duration), (start, duration))
     112SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMTimeSubtract, CMTime, (CMTime minuend, CMTime subtrahend), (minuend, subtrahend))
     113
     114SOFT_LINK_CONSTANT_SOURCE(WebCore, CoreMedia, kCMTimeIndefinite, CMTime)
     115#endif // PLATFORM(IOS)
     116
     117#if PLATFORM(MAC)
     118SOFT_LINK_FUNCTION_SOURCE(WebCore, CoreMedia, CMAudioDeviceClockCreate, OSStatus, (CFAllocatorRef allocator, CFStringRef deviceUID, CMClockRef *clockOut), (allocator, deviceUID, clockOut))
     119#endif // PLATFORM(MAC)
    51120
    52121#if PLATFORM(WIN)
  • trunk/Source/WebCore/platform/cf/CoreMediaSoftLink.h

    r180481 r181036  
    3535SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
    3636
     37SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMBlockBufferCopyDataBytes, OSStatus, (CMBlockBufferRef theSourceBuffer, size_t offsetToData, size_t dataLength, void* destination), (theSourceBuffer, offsetToData, dataLength, destination))
     38#define CMBlockBufferCopyDataBytes softLink_CoreMedia_CMBlockBufferCopyDataBytes
     39SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMBlockBufferGetDataLength, size_t, (CMBlockBufferRef theBuffer), (theBuffer))
     40#define CMBlockBufferGetDataLength softLink_CoreMedia_CMBlockBufferGetDataLength
     41SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMFormatDescriptionGetExtensions, CFDictionaryRef, (CMFormatDescriptionRef desc), (desc))
     42#define CMFormatDescriptionGetExtensions softLink_CoreMedia_CMFormatDescriptionGetExtensions
     43SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetDataBuffer, CMBlockBufferRef, (CMSampleBufferRef sbuf), (sbuf))
     44#define CMSampleBufferGetDataBuffer softLink_CoreMedia_CMSampleBufferGetDataBuffer
     45SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, (CMSampleBufferRef sbuf), (sbuf))
     46#define CMSampleBufferGetFormatDescription softLink_CoreMedia_CMSampleBufferGetFormatDescription
     47SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetSampleTimingInfo, OSStatus, (CMSampleBufferRef sbuf, CMItemIndex sampleIndex, CMSampleTimingInfo* timingInfoOut), (sbuf, sampleIndex, timingInfoOut))
     48#define CMSampleBufferGetSampleTimingInfo softLink_CoreMedia_CMSampleBufferGetSampleTimingInfo
    3749SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeCompare, int32_t, (CMTime time1, CMTime time2), (time1, time2))
    3850#define CMTimeCompare softLink_CoreMedia_CMTimeCompare
     
    4658#define CMTimeRangeGetEnd softLink_CoreMedia_CMTimeRangeGetEnd
    4759
    48 SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTimeZero, CMTime);
     60SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms, CFStringRef)
     61#define kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms get_CoreMedia_kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms()
     62SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAlignmentType_End, CFStringRef)
     63#define kCMTextMarkupAlignmentType_End get_CoreMedia_kCMTextMarkupAlignmentType_End()
     64SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAlignmentType_Middle, CFStringRef)
     65#define kCMTextMarkupAlignmentType_Middle get_CoreMedia_kCMTextMarkupAlignmentType_Middle()
     66SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAlignmentType_Start, CFStringRef)
     67#define kCMTextMarkupAlignmentType_Start get_CoreMedia_kCMTextMarkupAlignmentType_Start()
     68SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_Alignment, CFStringRef)
     69#define kCMTextMarkupAttribute_Alignment get_CoreMedia_kCMTextMarkupAttribute_Alignment()
     70SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_BackgroundColorARGB, CFStringRef)
     71#define kCMTextMarkupAttribute_BackgroundColorARGB get_CoreMedia_kCMTextMarkupAttribute_BackgroundColorARGB()
     72SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight, CFStringRef)
     73#define kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight get_CoreMedia_kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight()
     74SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_BoldStyle, CFStringRef)
     75#define kCMTextMarkupAttribute_BoldStyle get_CoreMedia_kCMTextMarkupAttribute_BoldStyle()
     76SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_CharacterBackgroundColorARGB, CFStringRef)
     77#define kCMTextMarkupAttribute_CharacterBackgroundColorARGB get_CoreMedia_kCMTextMarkupAttribute_CharacterBackgroundColorARGB()
     78SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_FontFamilyName, CFStringRef)
     79#define kCMTextMarkupAttribute_FontFamilyName get_CoreMedia_kCMTextMarkupAttribute_FontFamilyName()
     80SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_ForegroundColorARGB, CFStringRef)
     81#define kCMTextMarkupAttribute_ForegroundColorARGB get_CoreMedia_kCMTextMarkupAttribute_ForegroundColorARGB()
     82SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_ItalicStyle, CFStringRef)
     83#define kCMTextMarkupAttribute_ItalicStyle get_CoreMedia_kCMTextMarkupAttribute_ItalicStyle()
     84SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection, CFStringRef)
     85#define kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection get_CoreMedia_kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection()
     86SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_RelativeFontSize, CFStringRef)
     87#define kCMTextMarkupAttribute_RelativeFontSize get_CoreMedia_kCMTextMarkupAttribute_RelativeFontSize()
     88SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection, CFStringRef)
     89#define kCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection get_CoreMedia_kCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection()
     90SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_UnderlineStyle, CFStringRef)
     91#define kCMTextMarkupAttribute_UnderlineStyle get_CoreMedia_kCMTextMarkupAttribute_UnderlineStyle()
     92SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_VerticalLayout, CFStringRef)
     93#define kCMTextMarkupAttribute_VerticalLayout get_CoreMedia_kCMTextMarkupAttribute_VerticalLayout()
     94SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextMarkupAttribute_WritingDirectionSizePercentage, CFStringRef)
     95#define kCMTextMarkupAttribute_WritingDirectionSizePercentage get_CoreMedia_kCMTextMarkupAttribute_WritingDirectionSizePercentage()
     96SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextVerticalLayout_LeftToRight, CFStringRef)
     97#define kCMTextVerticalLayout_LeftToRight get_CoreMedia_kCMTextVerticalLayout_LeftToRight()
     98SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTextVerticalLayout_RightToLeft, CFStringRef)
     99#define kCMTextVerticalLayout_RightToLeft get_CoreMedia_kCMTextVerticalLayout_RightToLeft()
     100SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTimeInvalid, CMTime)
     101#define kCMTimeInvalid get_CoreMedia_kCMTimeInvalid()
     102SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTimeZero, CMTime)
    49103#define kCMTimeZero get_CoreMedia_kCMTimeZero()
    50104
    51105#if PLATFORM(COCOA)
    52106
    53 SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMNotificationCenterGetDefaultLocalCenter, CMNotificationCenterRef, (void), ());
     107SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMFormatDescriptionGetMediaSubType, FourCharCode, (CMFormatDescriptionRef desc), (desc))
     108#define CMFormatDescriptionGetMediaSubType softLink_CoreMedia_CMFormatDescriptionGetMediaSubType
     109SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMFormatDescriptionGetMediaType, CMMediaType, (CMFormatDescriptionRef desc), (desc))
     110#define CMFormatDescriptionGetMediaType softLink_CoreMedia_CMFormatDescriptionGetMediaType
     111SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMNotificationCenterGetDefaultLocalCenter, CMNotificationCenterRef, (void), ())
    54112#define CMNotificationCenterGetDefaultLocalCenter softLink_CoreMedia_CMNotificationCenterGetDefaultLocalCenter
    55113SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMNotificationCenterAddListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object, UInt32 flags), (center, listener, callback, notification, object, flags))
     
    57115SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMNotificationCenterRemoveListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object), (center, listener, callback, notification, object))
    58116#define CMNotificationCenterRemoveListener softLink_CoreMedia_CMNotificationCenterRemoveListener
     117SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (*callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
     118#define CMSampleBufferCallForEachSample softLink_CoreMedia_CMSampleBufferCallForEachSample
     119SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferCreate, OSStatus, (CFAllocatorRef allocator, CMBlockBufferRef dataBuffer, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, CMItemCount numSamples, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMItemCount numSampleSizeEntries, const size_t *sampleSizeArray, CMSampleBufferRef *sBufOut), (allocator, dataBuffer, dataReady, makeDataReadyCallback, makeDataReadyRefcon, formatDescription, numSamples, numSampleTimingEntries, sampleTimingArray, numSampleSizeEntries, sampleSizeArray, sBufOut))
     120#define CMSampleBufferCreate softLink_CoreMedia_CMSampleBufferCreate
     121SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferCreateCopy, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CMSampleBufferRef *sbufCopyOut), (allocator, sbuf, sbufCopyOut))
     122#define CMSampleBufferCreateCopy softLink_CoreMedia_CMSampleBufferCreateCopy
     123SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferCreateCopyWithNewTiming, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef originalSBuf, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMSampleBufferRef *sBufCopyOut), (allocator, originalSBuf, numSampleTimingEntries, sampleTimingArray, sBufCopyOut))
     124#define CMSampleBufferCreateCopyWithNewTiming softLink_CoreMedia_CMSampleBufferCreateCopyWithNewTiming
     125SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetDecodeTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf))
     126#define CMSampleBufferGetDecodeTimeStamp softLink_CoreMedia_CMSampleBufferGetDecodeTimeStamp
     127SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetDuration, CMTime, (CMSampleBufferRef sbuf), (sbuf))
     128#define CMSampleBufferGetDuration softLink_CoreMedia_CMSampleBufferGetDuration
     129SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetPresentationTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf))
     130#define CMSampleBufferGetPresentationTimeStamp softLink_CoreMedia_CMSampleBufferGetPresentationTimeStamp
     131SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetSampleAttachmentsArray, CFArrayRef, (CMSampleBufferRef sbuf, Boolean createIfNecessary), (sbuf, createIfNecessary))
     132#define CMSampleBufferGetSampleAttachmentsArray softLink_CoreMedia_CMSampleBufferGetSampleAttachmentsArray
     133SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetSampleTimingInfoArray, OSStatus, (CMSampleBufferRef sbuf, CMItemCount timingArrayEntries, CMSampleTimingInfo *timingArrayOut, CMItemCount *timingArrayEntriesNeededOut), (sbuf, timingArrayEntries, timingArrayOut, timingArrayEntriesNeededOut))
     134#define CMSampleBufferGetSampleTimingInfoArray softLink_CoreMedia_CMSampleBufferGetSampleTimingInfoArray
     135SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSampleBufferGetTotalSampleSize, size_t, (CMSampleBufferRef sbuf), (sbuf))
     136#define CMSampleBufferGetTotalSampleSize softLink_CoreMedia_CMSampleBufferGetTotalSampleSize
     137SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMSetAttachment, void, (CMAttachmentBearerRef target, CFStringRef key, CFTypeRef value, CMAttachmentMode attachmentMode), (target, key, value, attachmentMode))
     138#define CMSampleBufferGetTotalSampleSize softLink_CoreMedia_CMSampleBufferGetTotalSampleSize
     139SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimebaseCreateWithMasterClock, OSStatus, (CFAllocatorRef allocator, CMClockRef masterClock, CMTimebaseRef *timebaseOut), (allocator, masterClock, timebaseOut))
     140#define CMTimebaseCreateWithMasterClock softLink_CoreMedia_CMTimebaseCreateWithMasterClock
    59141SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimebaseGetTime, CMTime, (CMTimebaseRef timebase), (timebase))
    60142#define CMTimebaseGetTime softLink_CoreMedia_CMTimebaseGetTime
     143SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate))
     144#define CMTimebaseSetRate softLink_CoreMedia_CMTimebaseSetRate
     145SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimebaseSetTime, OSStatus, (CMTimebaseRef timebase, CMTime time), (timebase, time))
     146#define CMTimebaseSetTime softLink_CoreMedia_CMTimebaseSetTime
    61147SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeCopyAsDictionary, CFDictionaryRef, (CMTime time, CFAllocatorRef allocator), (time, allocator))
    62148#define CMTimeCopyAsDictionary softLink_CoreMedia_CMTimeCopyAsDictionary
     149SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMVideoFormatDescriptionGetDimensions, CMVideoDimensions, (CMVideoFormatDescriptionRef videoDesc), (videoDesc))
     150#define CMVideoFormatDescriptionGetDimensions softLink_CoreMedia_CMVideoFormatDescriptionGetDimensions
     151SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMVideoFormatDescriptionGetPresentationDimensions, CGSize, (CMVideoFormatDescriptionRef videoDesc, Boolean usePixelAspectRatio, Boolean useCleanAperture), (videoDesc, usePixelAspectRatio, useCleanAperture))
     152#define CMVideoFormatDescriptionGetPresentationDimensions softLink_CoreMedia_CMVideoFormatDescriptionGetPresentationDimensions
     153
     154SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMSampleAttachmentKey_DoNotDisplay, CFStringRef)
     155#define kCMSampleAttachmentKey_DoNotDisplay get_CoreMedia_kCMSampleAttachmentKey_DoNotDisplay()
     156SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMSampleAttachmentKey_NotSync, CFStringRef)
     157#define kCMSampleAttachmentKey_NotSync get_CoreMedia_kCMSampleAttachmentKey_NotSync()
     158SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately, CFStringRef)
     159#define kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately get_CoreMedia_kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately()
     160SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_DrainAfterDecoding, CFStringRef)
     161#define kCMSampleBufferAttachmentKey_DrainAfterDecoding get_CoreMedia_kCMSampleBufferAttachmentKey_DrainAfterDecoding()
     162SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_EmptyMedia, CFStringRef)
     163#define kCMSampleBufferAttachmentKey_EmptyMedia get_CoreMedia_kCMSampleBufferAttachmentKey_EmptyMedia()
     164SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding, CFStringRef)
     165#define kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding get_CoreMedia_kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding()
     166SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTimebaseNotification_EffectiveRateChanged, CFStringRef)
     167#define kCMTimebaseNotification_EffectiveRateChanged get_CoreMedia_kCMTimebaseNotification_EffectiveRateChanged()
     168SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTimebaseNotification_TimeJumped, CFStringRef)
     169#define kCMTimebaseNotification_TimeJumped get_CoreMedia_kCMTimebaseNotification_TimeJumped()
    63170
    64171#endif // PLATFORM(COCOA)
     172
     173#if PLATFORM(IOS)
     174
     175SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMAudioClockCreate, OSStatus, (CFAllocatorRef allocator, CMClockRef *clockOut), (allocator, clockOut))
     176#define CMAudioClockCreate softLink_CoreMedia_CMAudioClockCreate
     177SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeMaximum, CMTime, (CMTime time1, CMTime time2), (time1, time2))
     178#define CMTimeMaximum softLink_CoreMedia_CMTimeMaximum
     179SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeMinimum, CMTime, (CMTime time1, CMTime time2), (time1, time2))
     180#define CMTimeMinimum softLink_CoreMedia_CMTimeMinimum
     181SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
     182#define CMTimeRangeContainsTime softLink_CoreMedia_CMTimeRangeContainsTime
     183SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeRangeMake, CMTimeRange, (CMTime start, CMTime duration), (start, duration))
     184#define CMTimeRangeMake softLink_CoreMedia_CMTimeRangeMake
     185SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMTimeSubtract, CMTime, (CMTime minuend, CMTime subtrahend), (minuend, subtrahend))
     186#define CMTimeSubtract softLink_CoreMedia_CMTimeSubtract
     187
     188SOFT_LINK_CONSTANT_HEADER(WebCore, CoreMedia, kCMTimeIndefinite, CMTime)
     189#define kCMTimeIndefinite get_CoreMedia_kCMTimeIndefinite()
     190
     191#endif // PLATFORM(IOS)
     192
     193#if PLATFORM(MAC)
     194
     195SOFT_LINK_FUNCTION_HEADER(WebCore, CoreMedia, CMAudioDeviceClockCreate, OSStatus, (CFAllocatorRef allocator, CFStringRef deviceUID, CMClockRef *clockOut), (allocator, deviceUID, clockOut))
     196#define CMAudioDeviceClockCreate  softLink_CoreMedia_CMAudioDeviceClockCreate
     197
     198#endif // PLATFORM(MAC)
    65199
    66200#if PLATFORM(WIN)
  • trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm

    r180366 r181036  
    3333#import "AudioSourceProviderClient.h"
    3434#import "CARingBuffer.h"
    35 #import "CoreMediaSoftLink.h"
    3635#import "Logging.h"
    3736#import "MediaTimeAVFoundation.h"
    38 #import "SoftLinking.h"
    3937#import <AVFoundation/AVAssetTrack.h>
    4038#import <AVFoundation/AVAudioMix.h>
     
    4644
    4745#if !LOG_DISABLED
    48 #include <wtf/StringPrintStream.h>
     46#import <wtf/StringPrintStream.h>
    4947#endif
     48
     49#import "CoreMediaSoftLink.h"
    5050
    5151SOFT_LINK_FRAMEWORK(AVFoundation)
    5252SOFT_LINK_FRAMEWORK(MediaToolbox)
    5353SOFT_LINK_FRAMEWORK(AudioToolbox)
    54 SOFT_LINK_FRAMEWORK(CoreMedia)
    5554
    5655SOFT_LINK_CLASS(AVFoundation, AVPlayerItem)
    5756SOFT_LINK_CLASS(AVFoundation, AVMutableAudioMix)
    5857SOFT_LINK_CLASS(AVFoundation, AVMutableAudioMixInputParameters)
    59 
    60 SOFT_LINK_CONSTANT(CoreMedia, kCMTimebaseNotification_EffectiveRateChanged, CFStringRef)
    61 SOFT_LINK_CONSTANT(CoreMedia, kCMTimebaseNotification_TimeJumped, CFStringRef)
    62 #define kCMTimebaseNotification_EffectiveRateChanged getkCMTimebaseNotification_EffectiveRateChanged()
    63 #define kCMTimebaseNotification_TimeJumped getkCMTimebaseNotification_TimeJumped()
    6458
    6559SOFT_LINK(AudioToolbox, AudioConverterConvertComplexBuffer, OSStatus, (AudioConverterRef inAudioConverter, UInt32 inNumberPCMFrames, const AudioBufferList* inInputData, AudioBufferList* outOutputData), (inAudioConverter, inNumberPCMFrames, inInputData, outOutputData))
  • trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp

    r180366 r181036  
    3434#include "Logging.h"
    3535#include "MediaTimeAVFoundation.h"
    36 #include "SoftLinking.h"
    37 #include <CoreMedia/CoreMedia.h>
    3836#include <runtime/ArrayBuffer.h>
    3937#include <runtime/DataView.h>
     
    4846#include <wtf/StringPrintStream.h>
    4947
    50 #if !PLATFORM(WIN)
    51 #define SOFT_LINK_AVF_FRAMEWORK(Lib) SOFT_LINK_FRAMEWORK_OPTIONAL(Lib)
    52 #define SOFT_LINK_AVF_POINTER(Lib, Name, Type) SOFT_LINK_POINTER_OPTIONAL(Lib, Name, Type)
    53 #else
    54 #ifdef DEBUG_ALL
    55 #define SOFT_LINK_AVF_FRAMEWORK(Lib) SOFT_LINK_DEBUG_LIBRARY(Lib)
    56 #else
    57 #define SOFT_LINK_AVF_FRAMEWORK(Lib) SOFT_LINK_LIBRARY(Lib)
    58 #endif
    59 
    60 #define SOFT_LINK_AVF_POINTER(Lib, Name, Type) SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL(Lib, Name, Type)
    61 #endif
    62 
    63 SOFT_LINK_AVF_FRAMEWORK(CoreMedia)
    64 
    65 #if !PLATFORM(WIN)
    66 SOFT_LINK(CoreMedia, CMSampleBufferGetDataBuffer, CMBlockBufferRef, (CMSampleBufferRef sbuf), (sbuf))
    67 SOFT_LINK(CoreMedia, CMBlockBufferCopyDataBytes, OSStatus, (CMBlockBufferRef theSourceBuffer, size_t offsetToData, size_t dataLength, void* destination), (theSourceBuffer, offsetToData, dataLength, destination))
    68 SOFT_LINK(CoreMedia, CMBlockBufferGetDataLength, size_t, (CMBlockBufferRef theBuffer), (theBuffer))
    69 SOFT_LINK(CoreMedia, CMSampleBufferGetSampleTimingInfo, OSStatus, (CMSampleBufferRef sbuf, CMItemIndex sampleIndex, CMSampleTimingInfo* timingInfoOut), (sbuf, sampleIndex, timingInfoOut))
    70 SOFT_LINK(CoreMedia, CMFormatDescriptionGetExtensions, CFDictionaryRef, (CMFormatDescriptionRef desc), (desc))
    71 SOFT_LINK(CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, (CMSampleBufferRef sbuf), (sbuf))
    72 #else
    73 typedef struct OpaqueCMBlockBuffer* CMBlockBufferRef;
    74 typedef const struct opaqueCMFormatDescription* CMFormatDescriptionRef;
    75 typedef struct opaqueCMSampleBuffer* CMSampleBufferRef;
    76 
    77 #ifndef CMSAMPLEBUFFER_H
    78 extern "C" {
    79 #pragma pack(push, 4)
    80 #ifndef CMTIME_H
    81     typedef struct {
    82         int64_t value;
    83         int32_t timescale;
    84         uint32_t flags;
    85         int64_t epoch;
    86     } CMTime;
    87 #endif
    88 
    89     typedef struct {
    90         CMTime duration;
    91         CMTime presentationTimeStamp;
    92         CMTime decodeTimeStamp;
    93     } CMSampleTimingInfo;
    94 #pragma pack(pop)
    95 }
    96 #endif
    97 
    98 SOFT_LINK_DLL_IMPORT(CoreMedia, CMSampleBufferGetDataBuffer, CMBlockBufferRef, __cdecl, (CMSampleBufferRef sbuf), (sbuf))
    99 #define CMSampleBufferGetDataBuffer softLink_CMSampleBufferGetDataBuffer
    100 SOFT_LINK_DLL_IMPORT(CoreMedia, CMBlockBufferCopyDataBytes, OSStatus, __cdecl, (CMBlockBufferRef theSourceBuffer, size_t offsetToData, size_t dataLength, void* destination), (theSourceBuffer, offsetToData, dataLength, destination))
    101 #define CMBlockBufferCopyDataBytes softLink_CMBlockBufferCopyDataBytes
    102 SOFT_LINK_DLL_IMPORT(CoreMedia, CMBlockBufferGetDataLength, size_t, __cdecl, (CMBlockBufferRef theBuffer), (theBuffer))
    103 #define CMBlockBufferGetDataLength softLink_CMBlockBufferGetDataLength
    104 SOFT_LINK_DLL_IMPORT(CoreMedia, CMSampleBufferGetSampleTimingInfo, OSStatus, __cdecl, (CMSampleBufferRef sbuf, CMItemIndex sampleIndex, CMSampleTimingInfo* timingInfoOut), (sbuf, sampleIndex, timingInfoOut))
    105 #define CMSampleBufferGetSampleTimingInfo softLink_CMSampleBufferGetSampleTimingInfo
    106 SOFT_LINK_DLL_IMPORT(CoreMedia, CMFormatDescriptionGetExtensions, CFDictionaryRef, __cdecl, (CMFormatDescriptionRef desc), (desc))
    107 #define CMFormatDescriptionGetExtensions softLink_CMFormatDescriptionGetExtensions
    108 SOFT_LINK_DLL_IMPORT(CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, __cdecl, (CMSampleBufferRef sbuf), (sbuf))
    109 #define CMSampleBufferGetFormatDescription softLink_CMSampleBufferGetFormatDescription
    110 #endif
    111 
    112 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_Alignment, CFStringRef)
    113 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAlignmentType_Start, CFStringRef)
    114 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAlignmentType_Middle, CFStringRef)
    115 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAlignmentType_End, CFStringRef)
    116 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_BoldStyle, CFStringRef)
    117 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_ItalicStyle, CFStringRef)
    118 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_UnderlineStyle, CFStringRef)
    119 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection, CFStringRef)
    120 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_WritingDirectionSizePercentage, CFStringRef)
    121 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection, CFStringRef)
    122 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_VerticalLayout, CFStringRef)
    123 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextVerticalLayout_LeftToRight, CFStringRef)
    124 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextVerticalLayout_RightToLeft, CFStringRef)
    125 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight, CFStringRef)
    126 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_RelativeFontSize, CFStringRef)
    127 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_FontFamilyName, CFStringRef)
    128 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_ForegroundColorARGB, CFStringRef)
    129 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_BackgroundColorARGB, CFStringRef)
    130 SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_CharacterBackgroundColorARGB, CFStringRef)
    131 SOFT_LINK_AVF_POINTER(CoreMedia, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms, CFStringRef)
    132 
    133 #define kCMTextMarkupAttribute_Alignment getkCMTextMarkupAttribute_Alignment()
    134 #define kCMTextMarkupAlignmentType_Start getkCMTextMarkupAlignmentType_Start()
    135 #define kCMTextMarkupAlignmentType_Middle getkCMTextMarkupAlignmentType_Middle()
    136 #define kCMTextMarkupAlignmentType_End getkCMTextMarkupAlignmentType_End()
    137 #define kCMTextMarkupAttribute_BoldStyle getkCMTextMarkupAttribute_BoldStyle()
    138 #define kCMTextMarkupAttribute_ItalicStyle getkCMTextMarkupAttribute_ItalicStyle()
    139 #define kCMTextMarkupAttribute_UnderlineStyle getkCMTextMarkupAttribute_UnderlineStyle()
    140 #define kCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection getkCMTextMarkupAttribute_TextPositionPercentageRelativeToWritingDirection()
    141 #define kCMTextMarkupAttribute_WritingDirectionSizePercentage getkCMTextMarkupAttribute_WritingDirectionSizePercentage()
    142 #define kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection getkCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection()
    143 #define kCMTextMarkupAttribute_VerticalLayout getkCMTextMarkupAttribute_VerticalLayout()
    144 #define kCMTextVerticalLayout_LeftToRight getkCMTextVerticalLayout_LeftToRight()
    145 #define kCMTextVerticalLayout_RightToLeft getkCMTextVerticalLayout_RightToLeft()
    146 #define kCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight getkCMTextMarkupAttribute_BaseFontSizePercentageRelativeToVideoHeight()
    147 #define kCMTextMarkupAttribute_RelativeFontSize getkCMTextMarkupAttribute_RelativeFontSize()
    148 #define kCMTextMarkupAttribute_FontFamilyName getkCMTextMarkupAttribute_FontFamilyName()
    149 #define kCMTextMarkupAttribute_ForegroundColorARGB getkCMTextMarkupAttribute_ForegroundColorARGB()
    150 #define kCMTextMarkupAttribute_BackgroundColorARGB getkCMTextMarkupAttribute_BackgroundColorARGB()
    151 #define kCMTextMarkupAttribute_CharacterBackgroundColorARGB getkCMTextMarkupAttribute_CharacterBackgroundColorARGB()
    152 #define kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms getkCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms()
     48#include "CoreMediaSoftLink.h"
    15349
    15450namespace JSC {
  • trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp

    r180839 r181036  
    4646#include "Logging.h"
    4747#include "PlatformCALayerWin.h"
    48 #include "SoftLinking.h"
    4948#include "TimeRanges.h"
    5049#include "WebCoreAVCFResourceLoader.h"
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r181006 r181036  
    5353#import "SecurityOrigin.h"
    5454#import "SerializedPlatformRepresentationMac.h"
    55 #import "SoftLinking.h"
    5655#import "TextEncoding.h"
    5756#import "TextTrackRepresentation.h"
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

    r181006 r181036  
    3030
    3131#import "CDMSessionMediaSourceAVFObjC.h"
    32 #import "CoreMediaSoftLink.h"
    3332#import "FileSystem.h"
    3433#import "Logging.h"
     
    3736#import "MediaTimeAVFoundation.h"
    3837#import "PlatformClockCM.h"
    39 #import "SoftLinking.h"
    4038#import "WebCoreSystemInterface.h"
    4139#import <AVFoundation/AVAsset.h>
    4240#import <AVFoundation/AVTime.h>
    43 #import <CoreMedia/CMSync.h>
    4441#import <QuartzCore/CALayer.h>
    4542#import <objc_runtime.h>
     
    4845#import <wtf/NeverDestroyed.h>
    4946
    50 #pragma mark -
    51 #pragma mark Soft Linking
     47#pragma mark - Soft Linking
     48
     49#import "CoreMediaSoftLink.h"
    5250
    5351SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
    54 SOFT_LINK_FRAMEWORK_OPTIONAL(CoreMedia)
    5552
    5653SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVAsset)
     
    6562SOFT_LINK_CONSTANT(AVFoundation, AVAudioTimePitchAlgorithmSpectral, NSString*)
    6663SOFT_LINK_CONSTANT(AVFoundation, AVAudioTimePitchAlgorithmVarispeed, NSString*)
    67 SOFT_LINK_CONSTANT(CoreMedia, kCMTimebaseNotification_EffectiveRateChanged, CFStringRef)
    6864
    6965#define AVAudioTimePitchAlgorithmSpectral getAVAudioTimePitchAlgorithmSpectral()
    7066#define AVAudioTimePitchAlgorithmVarispeed getAVAudioTimePitchAlgorithmVarispeed()
    71 #define kCMTimebaseNotification_EffectiveRateChanged getkCMTimebaseNotification_EffectiveRateChanged()
    7267
    7368#pragma mark -
     
    210205{
    211206    return AVFoundationLibrary()
    212         && CoreMediaLibrary()
     207        && isCoreMediaFrameworkAvailable()
    213208        && getAVStreamDataParserClass()
    214209        && getAVSampleBufferAudioRendererClass()
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm

    r181005 r181036  
    4646#import "InbandTextTrackPrivateAVFObjC.h"
    4747#import <AVFoundation/AVAssetTrack.h>
    48 #import <CoreMedia/CMSampleBuffer.h>
    4948#import <QuartzCore/CALayer.h>
    5049#import <objc/runtime.h>
     
    5554#import <map>
    5655
    57 #pragma mark -
    58 #pragma mark Soft Linking
     56#pragma mark - Soft Linking
     57
     58#import "CoreMediaSoftLink.h"
    5959
    6060SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
    61 SOFT_LINK_FRAMEWORK_OPTIONAL(CoreMedia)
    6261
    6362SOFT_LINK_CLASS(AVFoundation, AVAssetTrack)
     
    7170SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVMediaTypeText, NSString *)
    7271
    73 SOFT_LINK_CONSTANT(CoreMedia, kCMTimeZero, CMTime);
    74 SOFT_LINK_CONSTANT(CoreMedia, kCMTimeInvalid, CMTime);
    75 SOFT_LINK_CONSTANT(CoreMedia, kCMSampleAttachmentKey_DoNotDisplay, CFStringRef)
    76 SOFT_LINK_CONSTANT(CoreMedia, kCMSampleAttachmentKey_NotSync, CFStringRef)
    77 SOFT_LINK_CONSTANT(CoreMedia, kCMSampleBufferAttachmentKey_DrainAfterDecoding, CFStringRef)
    78 SOFT_LINK_CONSTANT(CoreMedia, kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding, CFStringRef)
    79 SOFT_LINK_CONSTANT(CoreMedia, kCMSampleBufferAttachmentKey_EmptyMedia, CFStringRef)
    80 SOFT_LINK_CONSTANT(CoreMedia, kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately, CFStringRef)
    81 
    8272SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicVisual, NSString*)
    8373SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicAudible, NSString*)
     
    8676SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey, NSString*)
    8777
    88 SOFT_LINK(CoreMedia, CMFormatDescriptionGetMediaType, CMMediaType, (CMFormatDescriptionRef desc), (desc))
    89 SOFT_LINK(CoreMedia, CMSampleBufferCreate, OSStatus, (CFAllocatorRef allocator, CMBlockBufferRef dataBuffer, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, CMItemCount numSamples, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMItemCount numSampleSizeEntries, const size_t *sampleSizeArray, CMSampleBufferRef *sBufOut), (allocator, dataBuffer, dataReady, makeDataReadyCallback, makeDataReadyRefcon, formatDescription, numSamples, numSampleTimingEntries, sampleTimingArray, numSampleSizeEntries, sampleSizeArray, sBufOut))
    90 SOFT_LINK(CoreMedia, CMSampleBufferCreateCopy, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CMSampleBufferRef *sbufCopyOut), (allocator, sbuf, sbufCopyOut))
    91 SOFT_LINK(CoreMedia, CMSampleBufferCreateCopyWithNewTiming, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef originalSBuf, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMSampleBufferRef *sBufCopyOut), (allocator, originalSBuf, numSampleTimingEntries, sampleTimingArray, sBufCopyOut))
    92 SOFT_LINK(CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (*callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
    93 SOFT_LINK(CoreMedia, CMSampleBufferGetDecodeTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf))
    94 SOFT_LINK(CoreMedia, CMSampleBufferGetDuration, CMTime, (CMSampleBufferRef sbuf), (sbuf))
    95 SOFT_LINK(CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, (CMSampleBufferRef sbuf), (sbuf))
    96 SOFT_LINK(CoreMedia, CMSampleBufferGetPresentationTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf))
    97 SOFT_LINK(CoreMedia, CMSampleBufferGetSampleAttachmentsArray, CFArrayRef, (CMSampleBufferRef sbuf, Boolean createIfNecessary), (sbuf, createIfNecessary))
    98 SOFT_LINK(CoreMedia,  CMSampleBufferGetSampleTimingInfoArray, OSStatus, (CMSampleBufferRef sbuf, CMItemCount timingArrayEntries, CMSampleTimingInfo *timingArrayOut, CMItemCount *timingArrayEntriesNeededOut), (sbuf, timingArrayEntries, timingArrayOut, timingArrayEntriesNeededOut))
    99 SOFT_LINK(CoreMedia, CMSampleBufferGetTotalSampleSize, size_t, (CMSampleBufferRef sbuf), (sbuf))
    100 SOFT_LINK(CoreMedia, CMFormatDescriptionGetMediaSubType, FourCharCode, (CMFormatDescriptionRef desc), (desc))
    101 SOFT_LINK(CoreMedia, CMSetAttachment, void, (CMAttachmentBearerRef target, CFStringRef key, CFTypeRef value, CMAttachmentMode attachmentMode), (target, key, value, attachmentMode))
    102 SOFT_LINK(CoreMedia, CMVideoFormatDescriptionGetPresentationDimensions, CGSize, (CMVideoFormatDescriptionRef videoDesc, Boolean usePixelAspectRatio, Boolean useCleanAperture), (videoDesc, usePixelAspectRatio, useCleanAperture))
    103 
    10478#define AVMediaTypeVideo getAVMediaTypeVideo()
    10579#define AVMediaTypeAudio getAVMediaTypeAudio()
     
    10781#define AVSampleBufferDisplayLayerFailedToDecodeNotification getAVSampleBufferDisplayLayerFailedToDecodeNotification()
    10882#define AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey getAVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey()
    109 #define kCMTimeZero getkCMTimeZero()
    110 #define kCMTimeInvalid getkCMTimeInvalid()
    111 #define kCMSampleAttachmentKey_NotSync getkCMSampleAttachmentKey_NotSync()
    112 #define kCMSampleAttachmentKey_DoNotDisplay getkCMSampleAttachmentKey_DoNotDisplay()
    113 #define kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding getkCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding()
    114 #define kCMSampleBufferAttachmentKey_DrainAfterDecoding getkCMSampleBufferAttachmentKey_DrainAfterDecoding()
    115 #define kCMSampleBufferAttachmentKey_EmptyMedia getkCMSampleBufferAttachmentKey_EmptyMedia()
    116 #define kCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately getkCMSampleBufferAttachmentKey_DisplayEmptyMediaImmediately()
    11783
    11884#define AVMediaCharacteristicVisual getAVMediaCharacteristicVisual()
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

    r180923 r181036  
    3939#import <UIKit/UIKit.h>
    4040#import <WebCore/RuntimeApplicationChecksIOS.h>
    41 #import <WebCore/SoftLinking.h>
    4241#import <WebCore/TimeRanges.h>
    4342#import <WebCore/WebCoreThreadRun.h>
     
    6665SOFT_LINK_CLASS(UIKit, UIViewController)
    6766SOFT_LINK_CLASS(UIKit, UIColor)
    68 
    69 SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
    70 SOFT_LINK(CoreMedia, CMTimeRangeMake, CMTimeRange, (CMTime start, CMTime duration), (start, duration))
    71 SOFT_LINK(CoreMedia, CMTimeSubtract, CMTime, (CMTime minuend, CMTime subtrahend), (minuend, subtrahend))
    72 SOFT_LINK(CoreMedia, CMTimeMaximum, CMTime, (CMTime time1, CMTime time2), (time1, time2))
    73 SOFT_LINK(CoreMedia, CMTimeMinimum, CMTime, (CMTime time1, CMTime time2), (time1, time2))
    74 SOFT_LINK_CONSTANT(CoreMedia, kCMTimeIndefinite, CMTime)
    7567
    7668#define kCMTimeIndefinite getkCMTimeIndefinite()
  • trunk/Source/WebCore/platform/mac/PlatformClockCM.mm

    r180366 r181036  
    3030#import "PlatformClockCM.h"
    3131
     32#import "MediaTimeAVFoundation.h"
     33
    3234#import "CoreMediaSoftLink.h"
    33 #import "MediaTimeAVFoundation.h"
    34 #import "SoftLinking.h"
    35 #if PLATFORM(IOS)
    36 #import <CoreMedia/CMAudioClock.h>
    37 #else
    38 #import <CoreMedia/CMAudioDeviceClock.h>
    39 #endif
    40 
    41 SOFT_LINK_FRAMEWORK_OPTIONAL(CoreMedia)
    42 
    43 #if PLATFORM(IOS)
    44 SOFT_LINK(CoreMedia, CMAudioClockCreate, OSStatus, (CFAllocatorRef allocator, CMClockRef *clockOut), (allocator, clockOut))
    45 #else
    46 SOFT_LINK(CoreMedia, CMAudioDeviceClockCreate, OSStatus, (CFAllocatorRef allocator, CFStringRef deviceUID, CMClockRef *clockOut), (allocator, deviceUID, clockOut))
    47 #endif
    48 SOFT_LINK(CoreMedia, CMTimebaseCreateWithMasterClock, OSStatus, (CFAllocatorRef allocator, CMClockRef masterClock, CMTimebaseRef *timebaseOut), (allocator, masterClock, timebaseOut))
    49 SOFT_LINK(CoreMedia, CMTimebaseSetTime, OSStatus, (CMTimebaseRef timebase, CMTime time), (timebase, time))
    50 SOFT_LINK(CoreMedia, CMTimebaseSetRate, OSStatus, (CMTimebaseRef timebase, Float64 rate), (timebase, rate))
    5135
    5236using namespace WebCore;
  • trunk/Source/WebCore/platform/mac/SoftLinking.h

    r180481 r181036  
    323323    WTF_EXTERN_C_END \
    324324    namespace functionNamespace { \
    325     const variableType get_##framework##_##variableName(); \
     325    variableType get_##framework##_##variableName(); \
    326326    }
    327327
     
    331331    WTF_EXTERN_C_END \
    332332    namespace functionNamespace { \
    333     const variableType get_##framework##_##variableName(); \
    334     const variableType get_##framework##_##variableName() \
     333    variableType get_##framework##_##variableName(); \
     334    variableType get_##framework##_##variableName() \
    335335    { \
    336336        static variableType constant##framework##variableName; \
  • trunk/Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm

    r176924 r181036  
    4040#import <wtf/NeverDestroyed.h>
    4141
     42#import "CoreMediaSoftLink.h"
     43
    4244typedef AVCaptureConnection AVCaptureConnectionType;
    4345typedef AVCaptureDevice AVCaptureDeviceType;
     
    4951
    5052SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
    51 SOFT_LINK_FRAMEWORK_OPTIONAL(CoreMedia)
    5253
    5354SOFT_LINK_CLASS(AVFoundation, AVCaptureAudioDataOutput)
     
    8586#define AVCaptureSessionDidStopRunningNotification getAVCaptureSessionDidStopRunningNotification()
    8687
    87 SOFT_LINK(CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, (CMSampleBufferRef sbuf), (sbuf));
    88 SOFT_LINK(CoreMedia, CMSampleBufferGetPresentationTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf));
    89 
    9088using namespace WebCore;
    9189
  • trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

    r180366 r181036  
    3232#import "AVCaptureDeviceManager.h"
    3333#import "BlockExceptions.h"
    34 #import "CoreMediaSoftLink.h"
    3534#import "Logging.h"
    3635#import "MediaConstraints.h"
    3736#import "MediaStreamSourceStates.h"
    3837#import "NotImplemented.h"
    39 #import "SoftLinking.h"
    4038#import <AVFoundation/AVFoundation.h>
    4139#import <objc/runtime.h>
     40
     41#import "CoreMediaSoftLink.h"
    4242
    4343typedef AVCaptureConnection AVCaptureConnectionType;
     
    4848
    4949SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
    50 SOFT_LINK_FRAMEWORK_OPTIONAL(CoreMedia)
    5150
    5251SOFT_LINK_CLASS(AVFoundation, AVCaptureConnection)
     
    7473#define AVCaptureSessionPreset352x288 getAVCaptureSessionPreset352x288()
    7574#define AVCaptureSessionPresetLow getAVCaptureSessionPresetLow()
    76 
    77 SOFT_LINK(CoreMedia, CMSampleBufferGetFormatDescription, CMFormatDescriptionRef, (CMSampleBufferRef sbuf), (sbuf));
    78 SOFT_LINK(CoreMedia, CMSampleBufferGetPresentationTimeStamp, CMTime, (CMSampleBufferRef sbuf), (sbuf));
    79 SOFT_LINK(CoreMedia, CMVideoFormatDescriptionGetDimensions, CMVideoDimensions, (CMVideoFormatDescriptionRef videoDesc), (videoDesc));
    8075
    8176namespace WebCore {
  • trunk/Source/WebCore/platform/spi/cf/CoreMediaSPI.h

    r180366 r181036  
    3030
    3131#if USE(APPLE_INTERNAL_SDK)
    32 #import <CoreMedia/CMNotificationCenter.h>
     32#include <CoreMedia/CMNotificationCenter.h>
    3333#else
    3434typedef struct opaqueCMNotificationCenter *CMNotificationCenterRef;
     
    4444#endif // PLATFORM(COCOA)
    4545
     46#if PLATFORM(WIN)
     47#include <CoreMedia/CMTime.h>
     48
     49typedef struct OpaqueCMBlockBuffer* CMBlockBufferRef;
     50typedef const struct opaqueCMFormatDescription* CMFormatDescriptionRef;
     51typedef struct opaqueCMSampleBuffer* CMSampleBufferRef;
     52
     53#ifndef CMSAMPLEBUFFER_H
     54WTF_EXTERN_C_BEGIN
     55#pragma pack(push, 4)
     56typedef struct {
     57    CMTime duration;
     58    CMTime presentationTimeStamp;
     59    CMTime decodeTimeStamp;
     60} CMSampleTimingInfo;
     61#pragma pack(pop)
     62WTF_EXTERN_C_END
     63#endif
     64#endif // PLATFORM(WIN)
     65
    4666#endif // CoreMediaSPI_h
  • trunk/Source/WebCore/platform/win/SoftLinking.h

    r180481 r181036  
    207207#define SOFT_LINK_CONSTANT_HEADER(functionNamespace, framework, variableName, variableType) \
    208208    namespace functionNamespace { \
    209     const variableType get_##framework##_##variableName(); \
     209    variableType get_##framework##_##variableName(); \
    210210    }
    211211
     
    217217        *static_cast<variableType*>(context) = *ptr; \
    218218    } \
    219     const variableType get_##framework##_##variableName(); \
    220     const variableType get_##framework##_##variableName() \
     219    variableType get_##framework##_##variableName(); \
     220    variableType get_##framework##_##variableName() \
    221221    { \
    222222        static variableType constant##framework##variableName; \
Note: See TracChangeset for help on using the changeset viewer.