Changeset 230708 in webkit
- Timestamp:
- Apr 17, 2018 7:55:42 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230706 r230708 1 2018-04-17 Eric Carlson <eric.carlson@apple.com> 2 3 [iOS] AirPlay device name is sometimes wrong 4 https://bugs.webkit.org/show_bug.cgi?id=184543 5 <rdar://problem/39105498> 6 7 Reviewed by Jer Noble. 8 9 No new tests, this can only be tested with a specific hardware setup. 10 11 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 12 (WebCore::exernalDeviceDisplayNameForPlayer): Get the device name from the AVOutputContext 13 when possible. 14 1 15 2018-04-17 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 16 -
trunk/Source/WebCore/PAL/ChangeLog
r230689 r230708 1 2018-04-17 Eric Carlson <eric.carlson@apple.com> 2 3 [iOS] AirPlay device name is sometimes wrong 4 https://bugs.webkit.org/show_bug.cgi?id=184543 5 <rdar://problem/39105498> 6 7 Reviewed by Jer Noble. 8 9 * pal/spi/mac/AVFoundationSPI.h: Declare more AVOutputContext SPI. 10 1 11 2018-04-16 Brent Fulgham <bfulgham@apple.com> 2 12 -
trunk/Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h
r227552 r230708 32 32 33 33 #import <AVFoundation/AVAssetCache_Private.h> 34 #import <AVFoundation/AVOutputContext .h>34 #import <AVFoundation/AVOutputContext_Private.h> 35 35 #import <AVFoundation/AVPlayerItem_Private.h> 36 36 #import <AVFoundation/AVPlayerLayer_Private.h> … … 59 59 #endif // (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) 60 60 61 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)61 #if ENABLE(WIRELESS_PLAYBACK_TARGET) || PLATFORM(IOS) 62 62 63 63 NS_ASSUME_NONNULL_BEGIN 64 64 65 65 @class AVOutputContext; 66 @class AVOutputDevice; 66 67 @interface AVOutputContext : NSObject <NSSecureCoding> 67 68 @property (nonatomic, readonly) NSString *deviceName; 68 69 + (instancetype)outputContext; 69 @end 70 70 + (nullable AVOutputContext *)sharedAudioPresentationOutputContext; 71 @property (readonly) BOOL supportsMultipleOutputDevices; 72 @property (readonly) NSArray<AVOutputDevice *> *outputDevices; 73 @end 74 75 #if !PLATFORM(IOS) 71 76 @interface AVPlayer (AVPlayerExternalPlaybackSupportPrivate) 72 77 @property (nonatomic, retain) AVOutputContext *outputContext; 73 78 @end 74 75 NS_ASSUME_NONNULL_END 76 77 #endif // ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 79 #else 80 typedef NS_ENUM(NSInteger, AVPlayerExternalPlaybackType) { 81 AVPlayerExternalPlaybackTypeNone, 82 AVPlayerExternalPlaybackTypeAirPlay, 83 AVPlayerExternalPlaybackTypeTVOut, 84 }; 85 86 @interface AVPlayer (AVPlayerExternalPlaybackSupportPrivate) 87 @property (nonatomic, readonly) AVPlayerExternalPlaybackType externalPlaybackType; 88 @end 89 #endif 90 91 NS_ASSUME_NONNULL_END 92 93 #endif // ENABLE(WIRELESS_PLAYBACK_TARGET) || PLATFORM(IOS) 78 94 79 95 #import <AVFoundation/AVAssetCache.h> … … 95 111 96 112 #endif // PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR) 97 98 #if PLATFORM(IOS)99 typedef NS_ENUM(NSInteger, AVPlayerExternalPlaybackType) {100 AVPlayerExternalPlaybackTypeNone,101 AVPlayerExternalPlaybackTypeAirPlay,102 AVPlayerExternalPlaybackTypeTVOut,103 };104 105 @interface AVPlayer (AVPlayerExternalPlaybackSupportPrivate)106 @property (nonatomic, readonly) AVPlayerExternalPlaybackType externalPlaybackType;107 @end108 #endif109 113 110 114 #if !PLATFORM(IOS) -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm
r230177 r230708 38 38 #import <wtf/MainThread.h> 39 39 40 typedef AVOutputContext AVOutputContextType; 41 typedef AVOutputDeviceMenuController AVOutputDeviceMenuControllerType; 40 typedef AVOutputContext AVOutputContextWKType; 41 typedef AVOutputDeviceMenuController AVOutputDeviceMenuControllerWKType; 42 42 43 43 44 SOFTLINK_AVKIT_FRAMEWORK() … … 87 88 } 88 89 89 AVOutputDeviceMenuController Type *MediaPlaybackTargetPickerMac::devicePicker()90 AVOutputDeviceMenuControllerWKType *MediaPlaybackTargetPickerMac::devicePicker() 90 91 { 91 92 if (!getAVOutputDeviceMenuControllerClass()) … … 95 96 LOG(Media, "MediaPlaybackTargetPickerMac::devicePicker - allocating picker"); 96 97 97 RetainPtr<AVOutputContext Type> context = adoptNS([allocAVOutputContextInstance() init]);98 RetainPtr<AVOutputContextWKType> context = adoptNS([allocAVOutputContextInstance() init]); 98 99 m_outputDeviceMenuController = adoptNS([allocAVOutputDeviceMenuControllerInstance() initWithOutputContext:context.get()]); 99 100 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r230265 r230708 223 223 SOFT_LINK_CLASS(AVFoundation, AVMediaSelectionGroup) 224 224 SOFT_LINK_CLASS(AVFoundation, AVMediaSelectionOption) 225 SOFT_LINK_CLASS(AVFoundation, AVOutputContext) 225 226 226 227 SOFT_LINK_POINTER(AVFoundation, AVMediaCharacteristicLegible, NSString *) … … 2788 2789 { 2789 2790 #if HAVE(CELESTIAL) 2790 NSString *displayName = nil;2791 2792 2791 if (!AVFoundationLibrary()) 2793 2792 return nil; 2793 2794 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 2795 if ([getAVOutputContextClass() respondsToSelector:@selector(sharedAudioPresentationOutputContext)]) { 2796 AVOutputContext *outputContext = [getAVOutputContextClass() sharedAudioPresentationOutputContext]; 2797 2798 if (![outputContext respondsToSelector:@selector(supportsMultipleOutputDevices)] 2799 || ![outputContext supportsMultipleOutputDevices] 2800 || ![outputContext respondsToSelector:@selector(outputDevices)]) 2801 return [outputContext deviceName]; 2802 2803 auto outputDeviceNames = adoptNS([[NSMutableArray alloc] init]); 2804 for (AVOutputDevice *outputDevice in [outputContext outputDevices]) 2805 [outputDeviceNames addObject:[[outputDevice name] copy]]; 2806 2807 return [outputDeviceNames componentsJoinedByString:@" + "]; 2808 } 2809 #endif 2794 2810 2795 2811 if (player.externalPlaybackType != AVPlayerExternalPlaybackTypeAirPlay) … … 2800 2816 return nil; 2801 2817 2818 NSString *displayName = nil; 2802 2819 for (NSDictionary *pickableRoute in pickableRoutes) { 2803 2820 if (![pickableRoute[AVController_RouteDescriptionKey_RouteCurrentlyPicked] boolValue])
Note: See TracChangeset
for help on using the changeset viewer.