Changeset 246263 in webkit
- Timestamp:
- Jun 10, 2019 8:59:14 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246232 r246263 1 2019-06-10 Youenn Fablet <youenn@apple.com> 2 3 Call was negotiated with H264 Base Profile 42e01f but encoded in High Profile 4 https://bugs.webkit.org/show_bug.cgi?id=195124 5 <rdar://problem/48453085> 6 7 Reviewed by Eric Carlson. 8 9 * webrtc/video-h264-expected.txt: Added. 10 * webrtc/video-h264.html: Added. 11 1 12 2019-06-08 Cathie Chen <cathiechen@igalia.com> 2 13 -
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r245829 r246263 1 2019-06-10 Youenn Fablet <youenn@apple.com> 2 3 Call was negotiated with H264 Base Profile 42e01f but encoded in High Profile 4 https://bugs.webkit.org/show_bug.cgi?id=195124 5 <rdar://problem/48453085> 6 7 Reviewed by Eric Carlson. 8 9 Use VTB directly instead of VCP when baseline is requested. 10 For platforms supporting the VCP-in-VTB API, use VCP for high profile, VTB for baseline. 11 For platforms not supporting the VCP-in-VTB API, use regular VTB for both baseline and high profile. 12 On MacOS, if VTB session creation fails, use VCP as a fallback. 13 Keep VTB-only code path for non internal builds. 14 15 * Source/webrtc/sdk/WebKit/EncoderUtilities.h: Removed. 16 * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h: 17 * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: 18 (-[RTCSingleVideoEncoderH264 initWithCodecInfo:simulcastIndex:]): 19 (-[RTCSingleVideoEncoderH264 hasCompressionSession]): 20 (-[RTCSingleVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]): 21 (-[RTCSingleVideoEncoderH264 resetCompressionSessionIfNeededWithFrame:]): 22 (-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): 23 (-[RTCSingleVideoEncoderH264 configureCompressionSession]): 24 (-[RTCSingleVideoEncoderH264 destroyCompressionSession]): 25 (-[RTCSingleVideoEncoderH264 setEncoderBitrateBps:]): 26 * Source/webrtc/sdk/objc/components/video_codec/helpers.cc: 27 * Source/webrtc/sdk/objc/components/video_codec/helpers.h: 28 1 29 2019-05-28 Youenn Fablet <youenn@apple.com> 2 30 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h
r243811 r246263 34 34 #if defined __has_include && __has_include(<CoreFoundation/CFPriv.h>) 35 35 36 #if (defined(TARGET_IPHONE_SIMULATOR) 36 #if (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR) 37 37 #define ENABLE_VCP_ENCODER 0 38 38 #define ENABLE_VCP_VTB_ENCODER 0 39 #elif (defined(TARGET_OS_IPHONE) 40 #define ENABLE_VCP_ENCODER __MAC_OS_X_VERSION_MAX_ALLOWED < 10150039 #elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) 40 #define ENABLE_VCP_ENCODER 1 41 41 #define ENABLE_VCP_VTB_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 42 42 #elif (defined(TARGET_OS_MAC) && TARGET_OS_MAC) 43 #define ENABLE_VCP_ENCODER (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 && __MAC_OS_X_VERSION_MAX_ALLOWED < 101500)43 #define ENABLE_VCP_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 44 44 #define ENABLE_VCP_VTB_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 45 45 #endif … … 146 146 #define VCPCompressionSessionInvalidate softLink_VideoProcessing_VCPCompressionSessionInvalidate 147 147 148 #else 149 using VCPCompressionSessionRef = void*; 148 150 #endif // ENABLE_VCP_ENCODER 149 151 -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm
r243811 r246263 32 32 #include "third_party/libyuv/include/libyuv/convert_from.h" 33 33 34 #include "sdk/WebKit/EncoderUtilities.h"35 34 #include "sdk/WebKit/WebKitUtilities.h" 36 35 … … 41 40 VT_EXPORT const CFStringRef kVTCompressionPropertyKey_Usage; 42 41 43 #if !ENABLE_VCP_ENCODER && !defined(WEBRTC_IOS) && !ENABLE_VCP_VTB_ENCODER42 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && !ENABLE_VCP_ENCODER 44 43 static inline bool isStandardFrameSize(int32_t width, int32_t height) 45 44 { … … 319 318 int32_t _width; 320 319 int32_t _height; 321 CompressionSessionRef _compressionSession; 320 bool _useVCP; 321 VTCompressionSessionRef _vtCompressionSession; 322 VCPCompressionSessionRef _vcpCompressionSession; 322 323 CVPixelBufferPoolRef _pixelBufferPool; 323 324 RTCVideoCodecMode _mode; … … 344 345 _packetizationMode = RTCH264PacketizationModeNonInterleaved; 345 346 _profile = ExtractProfile([codecInfo nativeSdpVideoFormat]); 347 #if ENABLE_VCP_VTB_ENCODER 348 _useVCP = [(__bridge NSString *)_profile containsString: @"High"]; 349 #else 350 _useVCP = false; 351 #endif 346 352 _simulcastIndex = index; 347 353 RTC_LOG(LS_INFO) << "Using profile " << CFStringToString(_profile); … … 375 381 376 382 return [self resetCompressionSessionWithPixelFormat:kNV12PixelFormat]; 383 } 384 385 - (bool)hasCompressionSession 386 { 387 return _vtCompressionSession || _vcpCompressionSession; 377 388 } 378 389 … … 382 393 RTC_DCHECK_EQ(frame.width, _width); 383 394 RTC_DCHECK_EQ(frame.height, _height); 384 if (!_callback || ! _compressionSession) {395 if (!_callback || ![self hasCompressionSession]) { 385 396 return WEBRTC_VIDEO_CODEC_UNINITIALIZED; 386 397 } … … 475 486 [self setBitrateBps:_bitrateAdjuster->GetAdjustedBitrateBps()]; 476 487 477 OSStatus status = CompressionSessionEncodeFrame(_compressionSession, 488 OSStatus status; 489 if (_vtCompressionSession) { 490 status = VTCompressionSessionEncodeFrame(_vtCompressionSession, 478 491 pixelBuffer, 479 492 presentationTimeStamp, … … 482 495 encodeParams.release(), 483 496 nullptr); 497 } else { 498 #if ENABLE_VCP_ENCODER 499 status = webrtc::VCPCompressionSessionEncodeFrame(_vcpCompressionSession, 500 pixelBuffer, 501 presentationTimeStamp, 502 kCMTimeInvalid, 503 frameProperties, 504 encodeParams.release(), 505 nullptr); 506 #else 507 status = 1; 508 #endif 509 } 484 510 if (frameProperties) { 485 511 CFRelease(frameProperties); … … 541 567 OSType framePixelFormat = [self pixelFormatOfFrame:frame]; 542 568 543 if ( _compressionSession) {569 if ([self hasCompressionSession]) { 544 570 #if defined(WEBRTC_WEBKIT_BUILD) 545 571 if (!_pixelBufferPool) { … … 619 645 CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_RealTime, kCFBooleanTrue); 620 646 621 #if ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER 622 int usageValue = 1; 623 auto usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); 624 CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_Usage, usage); 625 CFRelease(usage); 647 #if ENABLE_VCP_ENCODER 648 if (_useVCP) { 649 int usageValue = 1; 650 auto usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); 651 CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_Usage, usage); 652 CFRelease(usage); 653 } 626 654 #endif 627 655 #if ENABLE_VCP_VTB_ENCODER 656 if (_useVCP) { 628 657 CFDictionarySetValue(encoderSpecs, kVTVideoEncoderList_EncoderID, CFSTR("com.apple.videotoolbox.videoencoder.h264.rtvc")); 658 } 629 659 #endif 630 660 OSStatus status = 631 CompressionSessionCreate(nullptr, // use default allocator661 VTCompressionSessionCreate(nullptr, // use default allocator 632 662 _width, 633 663 _height, 634 kC odecTypeH264,664 kCMVideoCodecType_H264, 635 665 encoderSpecs, // use hardware accelerated encoder if available 636 666 sourceAttributes, … … 638 668 compressionOutputCallback, 639 669 nullptr, 640 &_compressionSession); 641 if (sourceAttributes) { 642 CFRelease(sourceAttributes); 643 sourceAttributes = nullptr; 644 } 645 if (encoderSpecs) { 646 CFRelease(encoderSpecs); 647 encoderSpecs = nullptr; 648 } 649 650 #if ENABLE_VCP_ENCODER || defined(WEBRTC_IOS) 651 if (status != noErr) { 652 RTC_LOG(LS_ERROR) << "Failed to create compression session: " << status; 653 return WEBRTC_VIDEO_CODEC_ERROR; 654 } 655 #endif 670 &_vtCompressionSession); 671 656 672 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 657 CFBooleanRef hwaccl_enabled = nullptr; 658 if (status == noErr) { 659 status = VTSessionCopyProperty(_compressionSession, 673 #if ENABLE_VCP_ENCODER 674 if (!_useVCP) { 675 CFBooleanRef hwaccl_enabled = nullptr; 676 if (status == noErr) { 677 status = VTSessionCopyProperty(_vtCompressionSession, 660 678 kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder, 661 679 nullptr, 662 680 &hwaccl_enabled); 663 } 664 if (status == noErr && (CFBooleanGetValue(hwaccl_enabled))) { 665 RTC_LOG(LS_INFO) << "Compression session created with hw accl enabled"; 666 } else { 667 RTC_LOG(LS_INFO) << "Compression session created with hw accl disabled"; 668 669 #if !ENABLE_VCP_ENCODER && !ENABLE_VCP_VTB_ENCODER && !defined(WEBRTC_IOS) 681 } 682 if (status == noErr && (CFBooleanGetValue(hwaccl_enabled))) { 683 RTC_LOG(LS_INFO) << "Compression session created with hw accl enabled"; 684 } else { 685 [self destroyCompressionSession]; 686 687 // Use VCP instead. 688 int usageValue = 1; 689 auto usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); 690 CFDictionarySetValue(encoderSpecs, kVTCompressionPropertyKey_Usage, usage); 691 CFRelease(usage); 692 693 RTC_LOG(LS_INFO) << "Compression session created with VCP"; 694 status = 695 webrtc::VCPCompressionSessionCreate(nullptr, // use default allocator 696 _width, 697 _height, 698 kVCPCodecType4CC_H264, 699 encoderSpecs, 700 sourceAttributes, 701 nullptr, // use default compressed data allocator 702 compressionOutputCallback, 703 nullptr, 704 &_vcpCompressionSession); 705 } 706 } 707 #else 708 if (status != noErr) { 709 if (encoderSpecs) { 710 CFRelease(encoderSpecs); 711 encoderSpecs = nullptr; 712 } 713 if (sourceAttributes) { 714 CFRelease(sourceAttributes); 715 sourceAttributes = nullptr; 716 } 717 670 718 if (!isStandardFrameSize(_width, _height)) { 671 719 _disableEncoding = true; … … 673 721 return WEBRTC_VIDEO_CODEC_ERROR; 674 722 } 723 [self destroyCompressionSession]; 675 724 676 725 CFDictionaryRef ioSurfaceValue = CreateCFTypeDictionary(nullptr, nullptr, 0); … … 688 737 ioSurfaceValue, 689 738 pixelFormat}; 690 CFDictionaryRefsourceAttributes = CreateCFTypeDictionary(keys, values, attributesSize);739 sourceAttributes = CreateCFTypeDictionary(keys, values, attributesSize); 691 740 692 741 if (ioSurfaceValue) { … … 699 748 } 700 749 701 CFMutableDictionaryRefencoderSpecs = CFDictionaryCreateMutable(nullptr, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);750 encoderSpecs = CFDictionaryCreateMutable(nullptr, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 702 751 CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, kCFBooleanFalse); 703 752 int usageValue = 1; 704 753 CFNumberRef usage = CFNumberCreate(nullptr, kCFNumberIntType, &usageValue); 705 754 CFDictionarySetValue(encoderSpecs, kVTVideoEncoderSpecification_Usage, usage); 706 707 755 if (usage) { 708 756 CFRelease(usage); 709 757 usage = nullptr; 710 758 } 711 712 [self destroyCompressionSession]; 713 714 OSStatus status = 715 CompressionSessionCreate(nullptr, // use default allocator 759 status = VTCompressionSessionCreate(nullptr, // use default allocator 716 760 _width, 717 761 _height, 718 kC odecTypeH264,719 encoderSpecs, 762 kCMVideoCodecType_H264, 763 encoderSpecs, // use hardware accelerated encoder if available 720 764 sourceAttributes, 721 765 nullptr, // use default compressed data allocator 722 766 compressionOutputCallback, 723 767 nullptr, 724 &_compressionSession); 725 if (sourceAttributes) { 726 CFRelease(sourceAttributes); 727 sourceAttributes = nullptr; 728 } 729 if (encoderSpecs) { 730 CFRelease(encoderSpecs); 731 encoderSpecs = nullptr; 732 } 733 if (status != noErr) { 734 return WEBRTC_VIDEO_CODEC_ERROR; 735 } 736 #endif 737 } 738 #endif 768 &_vtCompressionSession); 769 770 } 771 #endif // ENABLE_VCP_ENCODER 772 #endif // defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 773 if (sourceAttributes) { 774 CFRelease(sourceAttributes); 775 sourceAttributes = nullptr; 776 } 777 if (encoderSpecs) { 778 CFRelease(encoderSpecs); 779 encoderSpecs = nullptr; 780 } 781 782 if (status != noErr) { 783 RTC_LOG(LS_ERROR) << "Failed to create compression session: " << status; 784 return WEBRTC_VIDEO_CODEC_ERROR; 785 } 786 739 787 [self configureCompressionSession]; 740 788 … … 742 790 // The pixel buffer pool is dependent on the compression session so if the session is reset, the 743 791 // pool should be reset as well. 744 _pixelBufferPool = CompressionSessionGetPixelBufferPool(_compressionSession); 792 if (_vtCompressionSession) 793 _pixelBufferPool = VTCompressionSessionGetPixelBufferPool(_vtCompressionSession); 794 #if ENABLE_VCP_ENCODER 795 else 796 _pixelBufferPool = webrtc::VCPCompressionSessionGetPixelBufferPool(_vtCompressionSession); 797 #endif 745 798 #endif 746 799 return WEBRTC_VIDEO_CODEC_OK; … … 748 801 749 802 - (void)configureCompressionSession { 750 RTC_DCHECK( _compressionSession);751 SetVTSessionProperty(_ compressionSession, kVTCompressionPropertyKey_RealTime, true);752 SetVTSessionProperty(_ compressionSession, kVTCompressionPropertyKey_ProfileLevel, _profile);753 SetVTSessionProperty(_ compressionSession, kVTCompressionPropertyKey_AllowFrameReordering, false);803 RTC_DCHECK([self hasCompressionSession]); 804 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_RealTime, true); 805 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_ProfileLevel, _profile); 806 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_AllowFrameReordering, false); 754 807 #if ENABLE_VCP_ENCODER 755 SetVTSessionProperty(_compressionSession, kVTCompressionPropertyKey_Usage, 1); 808 if (_useVCP) { 809 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_Usage, 1); 810 } 756 811 #endif 757 812 [self setEncoderBitrateBps:_targetBitrateBps]; … … 765 820 766 821 // Set a relatively large value for keyframe emission (7200 frames or 4 minutes). 767 SetVTSessionProperty(_compressionSession, kVTCompressionPropertyKey_MaxKeyFrameInterval, 7200); 768 SetVTSessionProperty( 769 _compressionSession, kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, 240); 822 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_MaxKeyFrameInterval, 7200); 823 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, 240); 770 824 } 771 825 772 826 - (void)destroyCompressionSession { 773 if (_compressionSession) { 774 CompressionSessionInvalidate(_compressionSession); 775 CFRelease(_compressionSession); 776 _compressionSession = nullptr; 777 _pixelBufferPool = nullptr; 778 } 827 if (_vtCompressionSession) { 828 VTCompressionSessionInvalidate(_vtCompressionSession); 829 CFRelease(_vtCompressionSession); 830 _vtCompressionSession = nullptr; 831 } 832 #if ENABLE_VCP_ENCODER 833 if (_vcpCompressionSession) { 834 webrtc::VCPCompressionSessionInvalidate(_vcpCompressionSession); 835 CFRelease(_vcpCompressionSession); 836 _vcpCompressionSession = nullptr; 837 } 838 #endif 839 _pixelBufferPool = nullptr; 779 840 } 780 841 … … 790 851 791 852 - (void)setEncoderBitrateBps:(uint32_t)bitrateBps { 792 if ( _compressionSession) {793 SetVTSessionProperty(_ compressionSession, kVTCompressionPropertyKey_AverageBitRate, bitrateBps);853 if ([self hasCompressionSession]) { 854 SetVTSessionProperty(_vtCompressionSession, _vcpCompressionSession, kVTCompressionPropertyKey_AverageBitRate, bitrateBps); 794 855 795 856 // TODO(tkchin): Add a helper method to set array value. … … 803 864 const void *nums[2] = {bytesPerSecond, oneSecond}; 804 865 CFArrayRef dataRateLimits = CFArrayCreate(nullptr, nums, 2, &kCFTypeArrayCallBacks); 805 OSStatus status = CompressionSessionSetProperty( 806 _compressionSession, kVTCompressionPropertyKey_DataRateLimits, dataRateLimits); 866 867 OSStatus status = noErr; 868 if (_vtCompressionSession) 869 VTSessionSetProperty(_vtCompressionSession, kVTCompressionPropertyKey_DataRateLimits, dataRateLimits); 870 #if ENABLE_VCP_ENCODER 871 else 872 webrtc::VCPCompressionSessionSetProperty(_vcpCompressionSession, kVTCompressionPropertyKey_DataRateLimits, dataRateLimits); 873 #endif 874 if (status != noErr) { 875 RTC_LOG(LS_ERROR) << "VTSessionSetProperty failed to set: " << kVTCompressionPropertyKey_DataRateLimits 876 << ": " << status; 877 } 878 807 879 if (bytesPerSecond) { 808 880 CFRelease(bytesPerSecond); … … 814 886 CFRelease(dataRateLimits); 815 887 } 816 if (status != noErr) {817 RTC_LOG(LS_ERROR) << "Failed to set data rate limit";818 }819 820 888 _encoderBitrateBps = bitrateBps; 821 889 } -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/helpers.cc
r237075 r246263 36 36 37 37 // Convenience function for setting a VT property. 38 void SetVTSessionProperty( CompressionSessionRef session,38 void SetVTSessionProperty(VTCompressionSessionRef vtSession, VCPCompressionSessionRef vcpSession, 39 39 CFStringRef key, 40 40 int32_t value) { 41 RTC_DCHECK(vtSession || vcpSession); 41 42 CFNumberRef cfNum = 42 43 CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value); 43 OSStatus status = CompressionSessionSetProperty(session, key, cfNum); 44 OSStatus status = noErr; 45 if (vtSession) 46 status = VTSessionSetProperty(vtSession, key, cfNum); 47 #if ENABLE_VCP_ENCODER 48 else 49 status = webrtc::VCPCompressionSessionSetProperty(vcpSession, key, cfNum); 50 #endif 44 51 CFRelease(cfNum); 45 52 if (status != noErr) { … … 51 58 52 59 // Convenience function for setting a VT property. 53 void SetVTSessionProperty( CompressionSessionRef session,60 void SetVTSessionProperty(VTCompressionSessionRef vtSession, VCPCompressionSessionRef vcpSession, 54 61 CFStringRef key, 55 62 uint32_t value) { 63 RTC_DCHECK(vtSession || vcpSession); 56 64 int64_t value_64 = value; 57 65 CFNumberRef cfNum = 58 66 CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value_64); 59 OSStatus status = CompressionSessionSetProperty(session, key, cfNum); 67 OSStatus status = noErr; 68 if (vtSession) 69 status = VTSessionSetProperty(vtSession, key, cfNum); 70 #if ENABLE_VCP_ENCODER 71 else 72 status = webrtc::VCPCompressionSessionSetProperty(vcpSession, key, cfNum); 73 #endif 60 74 CFRelease(cfNum); 61 75 if (status != noErr) { … … 67 81 68 82 // Convenience function for setting a VT property. 69 void SetVTSessionProperty(CompressionSessionRef session, CFStringRef key, bool value) { 83 void SetVTSessionProperty(VTCompressionSessionRef vtSession, VCPCompressionSessionRef vcpSession, CFStringRef key, bool value) { 84 RTC_DCHECK(vtSession || vcpSession); 70 85 CFBooleanRef cf_bool = (value) ? kCFBooleanTrue : kCFBooleanFalse; 71 OSStatus status = CompressionSessionSetProperty(session, key, cf_bool); 86 OSStatus status = noErr; 87 if (vtSession) 88 status = VTSessionSetProperty(vtSession, key, cf_bool); 89 #if ENABLE_VCP_ENCODER 90 else 91 status = webrtc::VCPCompressionSessionSetProperty(vcpSession, key, cf_bool); 92 #endif 72 93 if (status != noErr) { 73 94 std::string key_string = CFStringToString(key); … … 78 99 79 100 // Convenience function for setting a VT property. 80 void SetVTSessionProperty( CompressionSessionRef session,101 void SetVTSessionProperty(VTCompressionSessionRef vtSession, VCPCompressionSessionRef vcpSession, 81 102 CFStringRef key, 82 103 CFStringRef value) { 83 OSStatus status = CompressionSessionSetProperty(session, key, value); 104 RTC_DCHECK(vtSession || vcpSession); 105 OSStatus status = noErr; 106 if (vtSession) 107 status = VTSessionSetProperty(vtSession, key, value); 108 #if ENABLE_VCP_ENCODER 109 else 110 status = webrtc::VCPCompressionSessionSetProperty(vcpSession, key, value); 111 #endif 84 112 if (status != noErr) { 85 113 std::string key_string = CFStringToString(key); -
trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/helpers.h
r237075 r246263 17 17 #include <string> 18 18 19 #include "sdk/WebKit/ EncoderUtilities.h"19 #include "sdk/WebKit/VideoProcessingSoftLink.h" 20 20 21 21 // Convenience function for creating a dictionary. … … 32 32 33 33 // Convenience function for setting a VT property. 34 void SetVTSessionProperty( CompressionSessionRef session,CFStringRef key, int32_t value);34 void SetVTSessionProperty(VTCompressionSessionRef session, VCPCompressionSessionRef vcpSession,CFStringRef key, int32_t value); 35 35 36 36 // Convenience function for setting a VT property. 37 void SetVTSessionProperty( CompressionSessionRef session,37 void SetVTSessionProperty(VTCompressionSessionRef session, VCPCompressionSessionRef vcpSession, 38 38 CFStringRef key, 39 39 uint32_t value); 40 40 41 41 // Convenience function for setting a VT property. 42 void SetVTSessionProperty( CompressionSessionRef session, CFStringRef key, bool value);42 void SetVTSessionProperty(VTCompressionSessionRef session, VCPCompressionSessionRef vcpSession, CFStringRef key, bool value); 43 43 44 44 // Convenience function for setting a VT property. 45 void SetVTSessionProperty( CompressionSessionRef session,45 void SetVTSessionProperty(VTCompressionSessionRef session, VCPCompressionSessionRef vcpSession, 46 46 CFStringRef key, 47 47 CFStringRef value);
Note: See TracChangeset
for help on using the changeset viewer.