Changeset 202429 in webkit
- Timestamp:
- Jun 24, 2016 10:46:15 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r202427 r202429 1 2016-06-02 Jer Noble <jer.noble@apple.com> 2 3 [MSE] Adopt +[AVStreamDataParser outputMIMECodecParameterForInputMIMECodecParameter:] 4 https://bugs.webkit.org/show_bug.cgi?id=158312 5 6 Reviewed by Eric Carlson. 7 8 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 9 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): 10 11 Move the declaration of AVStreamDataParser into AVFoundationSPI.h: 12 13 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: 14 (WebCore::CDMSessionAVStreamSession::update): 15 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 16 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: 17 (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): 18 * platform/spi/mac/AVFoundationSPI.h: 19 1 20 2016-06-24 Eric Carlson <eric.carlson@apple.com> 2 21 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm
r195452 r202429 29 29 #if ENABLE(ENCRYPTED_MEDIA_V2) && ENABLE(MEDIA_SOURCE) 30 30 31 #import "AVFoundationSPI.h" 31 32 #import "CDM.h" 32 33 #import "CDMPrivateMediaSourceAVFObjC.h" … … 51 52 SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVStreamSessionContentProtectionSessionIdentifierChangedNotification, NSString *) 52 53 53 @interface AVStreamDataParser : NSObject54 - (void)processContentKeyResponseData:(NSData *)contentKeyResponseData forTrackID:(CMPersistentTrackID)trackID;55 - (void)processContentKeyResponseError:(NSError *)error forTrackID:(CMPersistentTrackID)trackID;56 - (void)renewExpiringContentKeyResponseDataForTrackID:(CMPersistentTrackID)trackID;57 - (NSData *)streamingContentKeyRequestDataForApp:(NSData *)appIdentifier contentIdentifier:(NSData *)contentIdentifier trackID:(CMPersistentTrackID)trackID options:(NSDictionary *)options error:(NSError **)outError;58 @end59 60 54 @interface AVStreamSession : NSObject 61 55 - (void)addStreamDataParser:(AVStreamDataParser *)streamDataParser; … … 248 242 249 243 NSError* error = nil; 244 #pragma clang diagnostic push 245 #pragma clang diagnostic ignored "-Wdeprecated-declarations" 250 246 RetainPtr<NSData> request = [protectedSourceBuffer->parser() streamingContentKeyRequestDataForApp:certificateData.get() contentIdentifier:initData.get() trackID:protectedSourceBuffer->protectedTrackID() options:options.get() error:&error]; 247 #pragma clang diagnostic pop 251 248 252 249 if (![protectedSourceBuffer->parser() respondsToSelector:@selector(contentProtectionSessionIdentifier)]) … … 270 267 systemCode = 0; 271 268 RetainPtr<NSData> keyData = adoptNS([[NSData alloc] initWithBytes:key->data() length:key->length()]); 269 #pragma clang diagnostic push 270 #pragma clang diagnostic ignored "-Wdeprecated-declarations" 272 271 [protectedSourceBuffer->parser() processContentKeyResponseData:keyData.get() forTrackID:protectedSourceBuffer->protectedTrackID()]; 272 #pragma clang diagnostic pop 273 273 274 274 return true; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
r202350 r202429 30 30 31 31 #import "AVFoundationMIMETypeCache.h" 32 #import "AVFoundationSPI.h" 32 33 #import "CDMSessionAVStreamSession.h" 33 34 #import "CDMSessionMediaSourceAVFObjC.h" … … 245 246 return MediaPlayer::MayBeSupported; 246 247 247 NSString *typeString = [NSString stringWithFormat:@"%@; codecs=\"%@\"", (NSString *)parameters.type, (NSString *)parameters.codecs]; 248 NSString *outputCodecs = parameters.codecs; 249 if ([getAVStreamDataParserClass() respondsToSelector:@selector(outputMIMECodecParameterForInputMIMECodecParameter:)]) 250 outputCodecs = [getAVStreamDataParserClass() outputMIMECodecParameterForInputMIMECodecParameter:outputCodecs]; 251 252 NSString *typeString = [NSString stringWithFormat:@"%@; codecs=\"%@\"", (NSString *)parameters.type, (NSString *)outputCodecs]; 248 253 return [getAVURLAssetClass() isPlayableExtendedMIMEType:typeString] ? MediaPlayer::IsSupported : MediaPlayer::MayBeSupported;; 249 254 } -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
r202242 r202429 29 29 #if ENABLE(MEDIA_SOURCE) && USE(AVFOUNDATION) 30 30 31 #import "AVFoundationSPI.h" 31 32 #import "CDMSessionAVContentKeySession.h" 32 33 #import "CDMSessionMediaSourceAVFObjC.h" … … 97 98 98 99 #pragma mark - 99 #pragma mark AVStreamDataParser100 101 @interface AVStreamDataParser : NSObject102 - (void)setDelegate:(id)delegate;103 - (void)appendStreamData:(NSData *)data;104 - (void)setShouldProvideMediaData:(BOOL)shouldProvideMediaData forTrackID:(CMPersistentTrackID)trackID;105 - (BOOL)shouldProvideMediaDataForTrackID:(CMPersistentTrackID)trackID;106 - (void)providePendingMediaData;107 - (void)processContentKeyResponseData:(NSData *)contentKeyResponseData forTrackID:(CMPersistentTrackID)trackID;108 - (void)processContentKeyResponseError:(NSError *)error forTrackID:(CMPersistentTrackID)trackID;109 - (void)renewExpiringContentKeyResponseDataForTrackID:(CMPersistentTrackID)trackID;110 - (NSData *)streamingContentKeyRequestDataForApp:(NSData *)appIdentifier contentIdentifier:(NSData *)contentIdentifier trackID:(CMPersistentTrackID)trackID options:(NSDictionary *)options error:(NSError **)outError;111 @end112 113 #pragma mark -114 100 #pragma mark AVSampleBufferDisplayLayer 115 101 … … 220 206 } 221 207 222 - (void)streamDataParser:(AVStreamDataParser *)streamDataParser didProvideMediaData:(CMSampleBufferRef)sample forTrackID:(CMPersistentTrackID)trackID mediaType:(NSString *)nsMediaType flags:( NSUInteger)flags208 - (void)streamDataParser:(AVStreamDataParser *)streamDataParser didProvideMediaData:(CMSampleBufferRef)sample forTrackID:(CMPersistentTrackID)trackID mediaType:(NSString *)nsMediaType flags:(AVStreamDataParserOutputMediaDataFlags)flags 223 209 { 224 210 #if ASSERT_DISABLED -
trunk/Source/WebCore/platform/spi/mac/AVFoundationSPI.h
r201633 r202429 100 100 #endif // PLATFORM(IOS) 101 101 102 // FIXME: Wrap in a #if USE(APPLE_INTERNAL_SDK) once this SPI lands 102 #pragma mark - 103 #pragma mark AVStreamDataParser 104 105 #if USE(APPLE_INTERNAL_SDK) 106 #import <AVFoundation/AVStreamDataParser.h> 107 #else 108 109 typedef int32_t CMPersistentTrackID; 110 111 NS_ASSUME_NONNULL_BEGIN 112 typedef NS_ENUM(NSUInteger, AVStreamDataParserOutputMediaDataFlags) { 113 AVStreamDataParserOutputMediaDataReserved = 1 << 0 114 }; 115 116 @interface AVStreamDataParser : NSObject 117 - (void)setDelegate:(nullable id)delegate; 118 - (void)appendStreamData:(NSData *)data; 119 - (void)setShouldProvideMediaData:(BOOL)shouldProvideMediaData forTrackID:(CMPersistentTrackID)trackID; 120 - (BOOL)shouldProvideMediaDataForTrackID:(CMPersistentTrackID)trackID; 121 - (void)providePendingMediaData; 122 - (void)processContentKeyResponseData:(NSData *)contentKeyResponseData forTrackID:(CMPersistentTrackID)trackID; 123 - (void)processContentKeyResponseError:(NSError *)error forTrackID:(CMPersistentTrackID)trackID; 124 - (void)renewExpiringContentKeyResponseDataForTrackID:(CMPersistentTrackID)trackID; 125 - (NSData *)streamingContentKeyRequestDataForApp:(NSData *)appIdentifier contentIdentifier:(NSData *)contentIdentifier trackID:(CMPersistentTrackID)trackID options:(NSDictionary *)options error:(NSError **)outError; 126 @end 127 NS_ASSUME_NONNULL_END 128 #endif 129 130 // FIXME: Wrap in a #if USE(APPLE_INTERNAL_SDK) once these SPI land 103 131 #import <AVFoundation/AVAssetResourceLoader.h> 104 132 … … 111 139 @end 112 140 141 @interface AVStreamDataParser (AVStreamDataParserPrivate) 142 + (NSString *)outputMIMECodecParameterForInputMIMECodecParameter:(NSString *)inputMIMECodecParameter; 143 @end 144 113 145 NS_ASSUME_NONNULL_END
Note: See TracChangeset
for help on using the changeset viewer.